/* Currency converter */
.converter { display: grid; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; position: relative; }
.conv-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; align-items: center; background: var(--navy-800); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 12px 10px; }
/* The amount takes all the room left; currency.js shrinks the font for long numbers (24 → 20 → 17 → 14px) */
.conv-box input { width: 100%; border: 0; background: none; font-size: 24px; font-weight: 800; text-align: right; min-width: 0; padding: 4px 0; box-shadow: none !important;
  font-variant-numeric: tabular-nums; text-overflow: clip; }
.conv-box small { grid-column: 1 / -1; }
.cur-pick { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--pill); color: var(--text); padding: 8px 12px; cursor: pointer; font: inherit; }
.cur-pick .flag { font-size: 1.3rem; line-height: 1; }
.swap-btn { justify-self: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--accent); color: var(--navy-950); font-size: 1.3rem; cursor: pointer; margin: -18px 0; z-index: 1; display: inline-flex; align-items: center; justify-content: center; }
.result-line { text-align: center; font-size: 1.05rem; font-weight: 800; color: var(--text); margin: 8px 0 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.result-line:empty { display: none; }
.rate-line { text-align: center; font-weight: 700; color: var(--accent); margin: 6px 0 0; }
.rate-table-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.rate-table-head h2 { margin: 0; }
.rate-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.rate-table th, .rate-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.rate-table th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.rate-table td:nth-child(2), .rate-table th:nth-child(2), .rate-table td:nth-child(3), .rate-table th:nth-child(3) { text-align: right; }
.rate-table td:nth-child(2) { font-weight: 700; font-variant-numeric: tabular-nums; }
.rate-table small { display: block; color: var(--text-muted); }
.rate-table .flag { font-size: 1.2rem; margin-right: 8px; }
.chg { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.chg.up { color: var(--success); } .chg.down { color: var(--danger); } .chg.flat { color: var(--text-muted); }
.cur-dialog { width: min(480px, 94vw); max-height: 80vh; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--navy-800); color: var(--text); }
.cur-dialog::backdrop { background: rgba(0,0,0,.6); }
.cur-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 0; }
.cur-dialog-head h2 { margin: 0; font-size: 1.1rem; }
.cur-search { margin: 12px 16px; width: calc(100% - 32px); }
.cur-list { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; max-height: 55vh; }
.cur-list button { width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cur-list button:hover, .cur-list button[aria-selected="true"] { background: var(--gold-soft); }
.cur-list .flag { font-size: 1.3rem; }
.cur-list small { color: var(--text-muted); margin-left: auto; }
@media (max-width: 380px) { .cur-pick { padding: 7px 9px; gap: 4px; } .cur-pick .flag { font-size: 1.1rem; } }
