/* === DESIGN TOKENS === */
:root {
  --bg: #f8f9fb;
  --card: #ffffff;
  --ink: #0f1729;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #1a56db;
  --accent-hover: #1e40af;
  --accent-soft: #eff6ff;
  --accent-2: #dbeafe;
  --danger: #ea580c;
  --danger-soft: #fff7ed;
  --success: #2563eb;
  --success-soft: #eff6ff;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 20px 40px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --transition: 0.15s ease;
  --font-scale: 1;
}

/* === DARK MODE (#52) === */
[data-theme="dark"] {
  --bg: #0f1729;
  --card: #1a2332;
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --line: #2d3a4d;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: #1e2d4a;
  --accent-2: #1e3a5f;
  --danger: #fb923c;
  --danger-soft: #431407;
  --success: #60a5fa;
  --success-soft: #172554;
  --warning: #f59e0b;
  --warning-soft: #2a1f0a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.5), 0 20px 40px rgba(0,0,0,0.4);
}
[data-theme="dark"] header.site {
  background: rgba(15,23,41,0.9);
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--card);
  color: var(--ink);
}
[data-theme="dark"] .warn { background: #2a1010; }
[data-theme="dark"] .copy-btn.copied { background: #0a2618; border-color: #166534; }

/* === HIGH CONTRAST (#91) === */
[data-contrast="high"] {
  --line: #888;
  --muted: #555;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.15);
  --shadow: 0 2px 6px rgba(0,0,0,0.15);
}
[data-contrast="high"] a,
[data-contrast="high"] button { text-decoration-thickness: 2px; }
[data-theme="dark"][data-contrast="high"] { --line: #556; --muted: #aab; }

/* === FONT SCALE (#92) === */
html { font-size: calc(16px * var(--font-scale)); }

/* === BASE === */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-2); color: var(--ink); }

/* === LAYOUT === */
.wrap { width: min(1120px, 94vw); margin: 0 auto; }
.stack { display: grid; gap: 12px; }
.stack h2 { margin-bottom: -4px; }
.stack p, .stack ul, .stack ol { margin: 0; }
.stack > .sub { margin-bottom: 2px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* === HELLO BAR === */
.hello-bar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hello-btn {
  display: inline-block;
  color: var(--accent);
  background: #fff;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  transition: background var(--transition), transform 0.1s ease;
  white-space: nowrap;
}
.hello-btn:hover { background: #e8f0fe; }
.hello-btn:active { transform: scale(0.97); }
[data-theme="dark"] .hello-bar { background: var(--accent-soft); color: var(--ink); border-bottom-color: var(--line); }
[data-theme="dark"] .hello-btn { background: var(--accent); color: #fff; }
[data-theme="dark"] .hello-btn:hover { background: var(--accent-hover); }

/* === HEADER === */
header.site {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(248,249,251,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
@media (max-width: 768px) {
  .header-inner { gap: 6px; }
  .header-updated { display: none; }
  .country-banner { display: none; }
  .header-location-select { max-width: 120px; }
}
.brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* === SITE NAV === */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: var(--bg-alt);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  margin-left: auto;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  min-width: 36px;
  min-height: 36px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}
@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 12px;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 99;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
  .nav-toggle { display: flex; }
  header.site { position: relative; }
}

/* === MAIN === */
main { padding: 24px 0 60px; }

/* === HERO === */
.hero {
  padding: 24px;
}
h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sub { color: var(--muted); margin: 0; }
.hero > .sub { text-align: center; }

/* === CARDS === */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
}
.card[data-converter] { padding: 20px 24px; }
.card[data-converter].stack { gap: 16px; }

/* === CONVERTER CONTROLS === */
.amount-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
  letter-spacing: 0.01em;
  grid-column: 1 / -1;
}
.controls { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.controls.has-swap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px minmax(0, 1fr); }
.controls-one { grid-template-columns: max-content; justify-content: center; }
.controls-one button[data-run] {
  min-height: 52px;
  min-width: 200px;
  font-size: 1.05rem;
  padding: 0 24px;
}
.btn-secondary {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-secondary:hover { background: var(--line); color: var(--ink); }

/* === FORM ELEMENTS === */
input, select, button, textarea {
  min-height: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 1rem;
  font-family: var(--font);
  padding: 0 14px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform 0.1s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-2);
  outline: none;
}
textarea { padding: 12px 14px; resize: vertical; }
.card[data-converter] select {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.card[data-converter] select:hover {
  border-color: var(--accent);
}

/* === BUTTONS === */
button {
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s ease;
}
button:hover { background: var(--accent-hover); }
button:active { transform: scale(0.98); }
button.secondary { background: var(--accent-soft); color: var(--accent); }
button.secondary:hover { background: var(--accent-2); }
.btn {
  min-height: 48px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 16px;
  border: none;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  transition: background var(--transition), transform 0.1s ease;
}
.btn:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn.secondary { background: var(--accent-soft); color: var(--accent); }

/* === SWAP BUTTON === */
.swap-btn {
  min-height: 44px;
  min-width: 44px;
  width: 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  justify-self: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background var(--transition), border-color var(--transition);
}
.swap-btn:hover {
  background: var(--accent-2);
  border-color: var(--accent);
}
.swap-btn.swapped { transform: rotate(180deg); }

/* === PILL / BADGE === */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-2);
  color: var(--accent);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* === RATE DISPLAY === */
.rate {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
  color: var(--ink);
}
.card[data-converter] .rate {
  text-align: center;
  justify-self: center;
  width: 100%;
  margin: 8px 0;
}
.rate-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.copy-btn {
  min-height: 32px;
  min-width: auto;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-2);
  cursor: pointer;
}
.copy-btn:hover { background: var(--accent-2); }
.copy-btn.copied { background: var(--success-soft); color: var(--success); border-color: var(--accent-2); }

/* === RATE CONTEXT BAR === */
.rate-context {
  padding: 16px 0 0;
}
.rate-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.rate-bar {
  flex: 1;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}
.rate-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--danger) 0%, var(--warning) 30%, var(--success) 70%);
  transition: width 0.6s ease;
}
.rate-bar-marker {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: var(--ink);
  border: 2px solid var(--card);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: var(--shadow-sm);
  transition: left 0.6s ease;
}
.rate-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rate-verdict {
  margin: 12px 0 4px;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 800;
  text-align: center;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.rate-verdict--good { color: var(--success); }
.rate-verdict--ok { color: var(--warning); }
.rate-verdict--poor { color: var(--danger); }

/* === SPARKLINE === */
.sparkline-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}
.sparkline {
  width: 100%;
  height: 80px;
}
.sparkline polyline {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.sparkline .spark-area {
  opacity: 0.08;
}

/* === PRESETS === */
.presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.preset {
  min-height: 32px;
  min-width: auto;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.preset:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* === TIME MACHINE === */
.time-machine {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px 0 0;
}
.time-machine-item {
  background: var(--accent-soft);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}
.time-machine-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.time-machine-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.time-machine-delta {
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 2px;
}
.time-machine-delta.better { color: var(--success); }
.time-machine-delta.worse { color: var(--danger); }


/* === RECENT PAIRS === */
.recent-pairs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding: 4px 0;
}
.recent-pairs-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}
.recent-pair-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  transition: border-color var(--transition), background var(--transition);
}
.recent-pair-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* === META / CONTEXT === */
.meta, small { color: var(--muted); font-size: 0.9rem; }
.card[data-converter] [data-window] { font-size: 0.95rem; line-height: 1.6; }
.card[data-converter] .meta { margin-top: 2px; }

/* === DETECTED BANNER === */
.detected-banner:empty { display: none; }
.detected-banner {
  display: block;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.detected-banner a {
  font-weight: 600;
}

/* === PAIR FACTS === */
.pair-facts {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px;
  display: grid;
  gap: 10px;
  animation: fadeSlideUp 0.3s ease-out;
}
.pair-facts-head {
  display: flex;
  align-items: center;
}
.pair-facts-live {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-2);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.live-hero-badge {
  margin: 0;
}
.pair-facts-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.pair-facts-row:last-child { border-bottom: none; }
.pair-facts-label { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.pair-facts-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.pair-facts-delta { font-weight: 700; font-size: 0.88rem; }
.pair-facts-delta.up { color: var(--success); }
.pair-facts-delta.down { color: var(--danger); }

/* === HISTORY === */
.history-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  animation: fadeSlideUp 0.3s ease-out;
}
.history-block h3 {
  margin: 0;
  padding: 14px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}
.history-block .sub { margin: 12px 16px 0; }
.history-links { margin: 8px 16px 12px; color: var(--muted); display: flex; gap: 4px; flex-wrap: wrap; }
.history-range {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  min-height: 0;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background var(--transition);
}
.history-range:hover { background: var(--accent-soft); }
.history-range.active {
  background: var(--accent);
  color: #fff;
}
.history-table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table td {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
.history-table tbody tr:nth-child(even) td { background: var(--bg); }
.history-table tbody tr:hover td { background: var(--accent-soft); }

/* === LINKS GRID === */
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--card);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.links a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* === HUB LIVE PAIR DASHBOARD === */
.hub-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.hub-live-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hub-live-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.hub-live-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hub-live-flag { font-size: 1.1rem; }
.hub-live-codes {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.hub-live-data {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hub-live-rate {
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.hub-live-change {
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.hub-live-change.up { color: var(--success); }
.hub-live-change.down { color: var(--danger); }
.hub-live-bar { display: flex; flex-direction: column; gap: 2px; }
.hub-bar-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.hub-bar-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.hub-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .hub-live-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hub-live-card { padding: 10px 12px; }
  .hub-live-rate { font-size: 0.92rem; }
}

/* CLS prevention for popular rates grid */
[data-popular-grid] { min-height: 400px; }
@media (max-width: 600px) { [data-popular-grid] { min-height: 800px; } }

/* Mobile FAB */
.fab-convert {
  display: none;
  position: fixed; bottom: 20px; right: 20px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 24px;
  padding: 10px 20px; font-weight: 600; font-size: 0.9rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  cursor: pointer; z-index: 900;
}
.fab-convert:hover { opacity: 0.9; }
@media (max-width: 768px) { .fab-convert { display: block; } }

/* === NOTICE === */
.notice {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
}
.warn { border-left-color: var(--danger); background: var(--danger-soft); }

/* === MARKUP COMPARISON === */
.markup-comparison { margin: 12px 0; }
.markup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.markup-row:last-child { border-bottom: none; }
.markup-provider { font-weight: 700; font-size: 0.92rem; }
.markup-range { font-weight: 700; font-size: 0.92rem; text-align: right; font-variant-numeric: tabular-nums; }
.markup-note { font-size: 0.8rem; color: var(--muted); grid-column: 1 / -1; }
.markup-row.markup-best { background: var(--success-soft); border-radius: var(--radius) var(--radius) 0 0; }
.markup-row.markup-worst { background: var(--danger-soft); border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 480px) {
  .markup-row { grid-template-columns: 1fr; }
  .markup-range { text-align: left; }
}

/* === METHODOLOGY META === */
.methodology-meta {
  font-size: 0.85rem;
  color: var(--muted);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

/* === FAQ ACCORDION === */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  padding: 14px 0;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color var(--transition);
}
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* === CUE STRIP === */
.cue-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cue-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}
.cue-pair-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cue-pair-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform 0.1s ease;
  white-space: nowrap;
  text-decoration: none;
}
.cue-pair-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.cue-pair-pill:active { transform: scale(0.97); }

/* === INFER GRID === */
.infer-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.infer-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.infer-card b {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.infer-card p {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

/* === MARKET MATRIX === */
.matrix-wrap { overflow-x: auto; }
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-variant-numeric: tabular-nums;
}
.matrix-table th,
.matrix-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.9rem;
}
.matrix-table th {
  background: var(--bg);
  font-weight: 700;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.matrix-table tbody tr:hover td { background: var(--accent-soft); }
.matrix-table a { font-weight: 600; }

/* === USD RATES TABLE === */
.usd-rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.usd-rates-table th,
.usd-rates-table td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
}
.usd-rates-table th {
  background: var(--bg);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.usd-rates-table tbody tr:hover td { background: var(--accent-soft); }
.usd-rates-table a { font-weight: 600; text-decoration: none; color: var(--accent); }
.usd-rates-table a:hover { text-decoration: underline; }
.chg-toggle { display: inline-flex; gap: 2px; }
.chg-pill {
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.chg-pill:hover { background: var(--accent-soft); color: var(--accent); }
.chg-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === HOWTO === */
.howto-steps {
  font-size: 0.88rem;
  color: var(--muted);
  text-align: left;
  max-width: 520px;
  margin: 0 auto;
}
.howto-steps summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.howto-steps ol {
  margin-top: 12px;
  padding-left: 0;
  list-style: none;
  counter-reset: howto;
}
.howto-steps li {
  counter-increment: howto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.howto-steps li::before {
  content: counter(howto);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
}
/* === HELP ICON (inline [?]) === */
.help-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.help-icon-link:hover { background: var(--accent); color: #fff; }
/* === DATA TIER BADGE === */
.data-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}
.data-tier-badge--realtime { background: var(--success-soft); color: var(--success); }
.data-tier-badge--hourly { background: var(--accent-soft); color: var(--accent); }
.data-tier-badge--daily { background: var(--bg-alt, #f3f4f6); color: var(--muted); }
.data-tier-badge--derived { background: var(--bg-alt, #f3f4f6); color: var(--muted); font-style: italic; }
/* === CONTENT TABLE (inline article tables) === */
.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 8px 0;
}
.content-table th {
  text-align: left;
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 2px solid var(--line);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.content-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.content-table tr:last-child td { border-bottom: none; }

/* === CONTENT VISIBILITY (below-fold) === */
[data-market-hours],
[data-provider-comp],
[data-conv-tables],
.history-block,
article.card {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

/* === FOOTER === */
footer { padding-top: 30px; color: var(--muted); font-size: 0.9rem; }
.site-footer {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h3 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.footer-links { display: grid; gap: 6px; }
.footer-links a {
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent-hover); }
.footer-note { margin: 16px 0 0; color: var(--muted); font-size: 0.82rem; text-align: center; }
.footer-note p { margin: 0 0 8px; }
.footer-feedback {
  text-align: center;
  padding: 24px 0 20px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.footer-feedback p { margin: 0 0 12px; font-size: 0.9rem; color: var(--muted); }
.footer-feedback-btn {
  display: inline-block;
  padding: 10px 32px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.footer-feedback-btn:hover { background: var(--accent); color: #fff; }

/* === SKELETON LOADING === */
.skeleton {
  height: 2.4rem;
  width: 60%;
  margin: 8px auto;
  background: linear-gradient(90deg, var(--line) 25%, var(--accent-soft) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton-sm {
  height: 1rem;
  width: 40%;
}

/* === ANIMATIONS === */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .controls { grid-template-columns: 1fr; }
  .controls.has-swap { grid-template-columns: 1fr; }
  .swap-btn {
    width: 100%;
    min-width: unset;
    border-radius: var(--radius);
  }
  .infer-grid { grid-template-columns: 1fr 1fr; }
  .cue-strip { flex-direction: column; align-items: flex-start; }
  .time-machine { grid-template-columns: 1fr; }
  .hero { padding: 16px; }
  .card[data-converter] { padding: 16px; }
}
@media (max-width: 480px) {
  .infer-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.4rem; }
  .rate { font-size: 1.4rem; }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === FOOTER CONTROLS (#52, #40, #92) === */
.footer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hdr-btn {
  min-height: 44px;
  min-width: 44px;
  width: 44px;
  touch-action: manipulation;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.hdr-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.hdr-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.lang-select {
  min-height: 32px;
  min-width: auto;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

/* === COUNTRY FLAG BANNER (#14) === */
.header-updated {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.country-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
/* Push country banner right when header-updated is absent */
.brand + .country-banner { margin-left: auto; }
.header-location-select {
  min-height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 160px;
  text-overflow: ellipsis;
}
.header-location-select:hover { border-color: var(--accent); color: var(--accent); }
.header-location-select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); outline: none; }

/* === RATE FRESHNESS INDICATOR (#24) === */
.freshness-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.freshness-dot.fresh { background: var(--success); animation: pulse-dot 2s infinite; }
.freshness-dot.aging { background: var(--warning); }
.freshness-dot.stale { background: var(--muted); }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

/* === INVERSE RATE (#18) === */
.inverse-rate {
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* === FAVORITE PAIRS (#27) === */
.fav-pairs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}
.fav-pair-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.fav-pair-btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.fav-star {
  min-height: auto;
  min-width: auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fav-star svg { display: block; }
.fav-star:hover { color: var(--warning); border-color: var(--warning); }
.fav-star.starred { color: var(--warning); background: var(--warning-soft); border-color: var(--warning); }

/* === CONVERSION TABLES (#17) === */
.conv-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.conv-table-direction {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}
.conv-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}
.conv-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: left;
  padding: 6px 10px;
  border-bottom: 2px solid var(--line);
}
.conv-table thead th:last-child { text-align: right; }
.conv-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.conv-table td:first-child { font-weight: 600; }
.conv-table td:last-child { text-align: right; }
.conv-table tr:last-child td { border-bottom: none; }
.conv-table tr:hover td { background: var(--accent-soft); }
@media (max-width: 768px) {
  .conv-tables { grid-template-columns: 1fr; }
}

/* === MULTI-CURRENCY (#16) === */
.multi-ccy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.multi-ccy-row:last-child { border-bottom: none; }
.multi-ccy-value { font-weight: 700; flex: 1; }
.multi-ccy-rate { font-size: 0.82rem; color: var(--muted); }
.add-ccy-wrap {
  margin-top: 8px;
}
.add-ccy-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  appearance: auto;
}
.add-ccy-select:hover { border-color: var(--accent); color: var(--accent); }
.add-ccy-select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
.add-ccy-btn {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-2);
  cursor: pointer;
}
.add-ccy-btn:hover { background: var(--accent-2); }

/* === RATE STATS GRID (#29) === */
.rate-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 12px 0 0;
  font-variant-numeric: tabular-nums;
}
.rate-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.rate-stat:nth-last-child(-n+2) { border-bottom: none; }
.rate-stat:nth-child(odd) { border-right: 1px solid var(--line); }
.rate-stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.rate-stat-value {
  font-size: 0.92rem;
  font-weight: 700;
}
@media (max-width: 480px) {
  .rate-stats-grid { grid-template-columns: 1fr; }
  .rate-stat:nth-child(odd) { border-right: none; }
  .rate-stat:last-child { border-bottom: none; }
  .rate-stat:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* === HERO UPDATED TIMESTAMP === */
.hero-updated {
  font-size: 0.82rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 2px 8px 2px 6px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.live-badge .pulse-dot-inline {
  background: #fff;
  margin-right: 0;
}

/* === INTERACTIVE CHART (#28) === */
.chart-timeframes {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 0 0;
}
.chart-timeframes button {
  padding: 4px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chart-timeframes button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.chart-timeframes button:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
}
.chart-container {
  position: relative;
  width: 100%;
  padding: 8px 0;
}
.chart-canvas {
  width: 100%;
  height: 200px;
  cursor: crosshair;
}
.chart-tf-btn {
  min-height: 28px;
  min-width: auto;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  cursor: pointer;
}
.chart-tf-btn:hover { background: var(--accent-soft); }
.chart-tf-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chart-tooltip {
  position: absolute;
  padding: 4px 8px;
  background: var(--ink);
  color: var(--card);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.1s;
}
.chart-tooltip.visible { opacity: 1; }

/* === HISTORICAL DATE PICKER (#35) === */
.date-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.date-picker-row input[type="date"] {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  background: var(--card);
  color: var(--ink);
}
.date-picker-result {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* === DAILY DIGEST EMAIL (#55) === */
.email-signup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius);
}
.email-signup-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}
.email-signup-row {
  display: flex;
  gap: 8px;
}
.email-signup input[type="email"] {
  flex: 1;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font-size: 0.88rem;
  background: var(--card);
  color: var(--ink);
}
.email-signup button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  white-space: nowrap;
}
.email-signup-note,
.rate-alert-note {
  color: var(--muted);
  font-size: 0.75rem;
}
.rate-alert-note { margin-top: 8px; display: block; }
.rate-alert-note a { color: var(--muted); text-decoration: underline; }

/* === RATE PROVENANCE BADGE === */
.rate-provenance-wrap { text-align: center; min-height: 20px; }
.rate-provenance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  position: relative;
}
.rate-provenance-label { font-weight: 600; }
.rate-provenance-detail { font-weight: 400; }
.rate-provenance--calculated .rate-provenance-label { color: var(--accent, #1a56db); }
.rate-provenance-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 0.65rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-weight: 600;
}
.rate-provenance-info:hover { background: var(--bg-alt, #f1f5f9); }
.rate-provenance-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  max-width: 320px;
  width: max-content;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.5;
  z-index: 100;
  text-align: left;
}
.rate-provenance-popover p { margin: 0 0 6px; }
.rate-provenance-popover p:last-child { margin-bottom: 0; }
.rate-provenance-popover a { color: var(--accent, #1a56db); text-decoration: underline; }

@media (max-width: 768px) {
  .email-signup-row { flex-wrap: wrap; }
  .email-signup input[type="email"] { min-width: 0; }
}

/* === RATE ALERT (#56) === */
.rate-alert-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.rate-alert-sentence {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}
.rate-alert-bell { font-size: 1rem; }
.rate-alert-sentence select {
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 0 8px;
  font-size: 0.88rem;
  background: var(--bg);
  font-weight: 600;
  color: var(--accent);
}
.rate-alert-sentence input[type="text"] {
  width: 90px;
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  background: var(--bg);
  color: var(--ink);
}
.rate-alert-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rate-alert-ref {
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: 2px;
}
.rate-alert-chip {
  min-height: 26px;
  min-width: auto;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.rate-alert-chip.active,
.rate-alert-chip:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.rate-alert-submit-row {
  display: flex;
  gap: 8px;
}
.rate-alert-submit-row input[type="email"] {
  flex: 1;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font-size: 0.88rem;
  background: var(--bg);
  color: var(--ink);
}
.rate-alert-done {
  font-weight: 600;
  margin: 0;
  font-size: 0.92rem;
  color: var(--accent);
}
@media (max-width: 768px) {
  .rate-alert-sentence { font-size: 0.85rem; }
  .rate-alert-submit-row { flex-wrap: wrap; }
  .rate-alert-submit-row input[type="email"] { min-width: 0; }
}

/* === DASHBOARD (#59) === */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.dash-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
}
.dash-card:hover { box-shadow: var(--shadow); }
.dash-card-pair {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.dash-card-rate {
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dash-card-change {
  font-size: 0.85rem;
  font-weight: 600;
}
.dash-card-change.up { color: var(--success); }
.dash-card-change.down { color: var(--danger); }
.dash-card-mini-spark {
  height: 32px;
  margin: 6px 0;
}
.dash-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: var(--bg);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
.dash-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* === MARKET HOURS TABLE (#68) === */
.market-hours-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.market-hours-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: left;
  padding: 6px 12px;
  border-bottom: 2px solid var(--line);
}
.market-hours-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.market-hours-table td:first-child { font-weight: 700; }
.market-hours-table tr:last-child td { border-bottom: none; }
.market-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.market-status-badge.open { background: var(--success-soft); color: var(--success); }
.market-status-badge.closed { background: var(--bg); color: var(--danger); }
.pulse-dot-inline {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 4px;
  vertical-align: middle;
  animation: pulse-dot 2s infinite;
}

/* === FUN FACT CARD (#99) === */
.fun-fact-card {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 12px 0;
  text-align: left;
}
.fun-fact-icon { font-size: 1.3rem; margin-right: 6px; vertical-align: middle; }
.fun-fact-label {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  vertical-align: middle;
}
.fun-fact-text {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}
.fun-fact-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.fun-fact-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.fun-fact-btn:hover { background: var(--accent); color: #fff; }
.fun-fact-share {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.fun-fact-share .share-icon-btn {
  width: 30px;
  height: 30px;
  min-height: 30px;
}

/* === SHARE BUTTON (#87) === */
.share-btn {
  min-height: 32px;
  min-width: auto;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
}
.share-btn:hover { color: var(--accent); border-color: var(--accent); }
.share-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 4px 0;
}
a.share-icon-btn,
button.share-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
a.share-icon-btn:hover,
button.share-icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* === BANK MARKUP CALCULATOR (#94) === */
.markup-calc {
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.markup-calc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.markup-calc input {
  min-height: 36px;
  width: 140px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 10px;
  background: var(--card);
  color: var(--ink);
}
.markup-result {
  font-weight: 700;
  font-size: 1rem;
  padding: 8px 0;
}
.markup-result .danger { color: var(--danger); }

/* === PROVIDER COMPARISON (#93) === */
.provider-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.provider-table th {
  padding: 6px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
}
.provider-table th:last-child { text-align: right; }
.provider-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.provider-table td:last-child { text-align: right; font-weight: 700; }
.provider-table tr:last-child td { border-bottom: none; }
.provider-table .highlight { background: var(--success-soft); }
.provider-table .highlight td { font-weight: 700; }
.provider-visit {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  margin-left: 6px;
  opacity: 0.65;
  transition: opacity 0.15s;
}
.provider-visit::after { content: " \2192"; }
.provider-visit:hover { opacity: 1; text-decoration: underline; }
.provider-savings-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--success-soft);
  border-radius: 8px;
}
.provider-savings {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
}
.provider-savings-cta {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.provider-savings-cta:hover {
  background: var(--accent);
  color: #fff;
}
.provider-disclosure {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}
/* CFD risk warning (ESMA compliance) - forex broker table only */
.cfd-risk-warning {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-radius: 8px;
  background: var(--danger-soft);
  font-size: 0.8rem;
  line-height: 1.5;
}
.cfd-risk-warning p { margin: 0; }
.cfd-risk-warning strong { font-weight: 700; }
.cfd-risk-brokers {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.75rem;
  color: var(--muted);
}
.cfd-risk-brokers li { margin: 2px 0; }

/* === CONFETTI (#98) === */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-fall 1.5s ease-out forwards;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(120px) rotate(720deg); }
}

/* === EXIT-INTENT MODAL (#57) === */
.exit-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.exit-modal {
  background: #0f1729;
  color: #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 92vw;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  text-align: center;
  position: relative;
}
.exit-modal h3 {
  margin: 0 0 10px;
  font-size: 1.6rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.exit-modal p {
  margin: 0 0 20px;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
}
.exit-modal-x {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none !important;
  border: none !important;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  line-height: 1;
  transition: color var(--transition);
  border-radius: 0;
  box-shadow: none;
}
.exit-modal-x:hover { color: #fff; background: none !important; }
.exit-modal-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}
.exit-modal-form input[type="email"] {
  flex: 1;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0 14px;
  font-size: 0.92rem;
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.exit-modal-form input[type="email"]::placeholder { color: #64748b; }
.exit-modal-form button {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}
.exit-modal-form button:hover { background: #1d4ed8; }
.exit-modal-note {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  margin-bottom: 0;
}
.exit-modal-note a { color: #60a5fa; text-decoration: none; }
.exit-modal-note a:hover { text-decoration: underline; }
.exit-modal-close {
  display: none;
}
@media (max-width: 768px) {
  .exit-modal { padding: 24px 20px; }
  .exit-modal-form { flex-wrap: wrap; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* === FREQUENT FLYER COUNTER === */
.conv-counter {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
  opacity: 0.6;
}

/* === FEEDBACK MODAL (Hello Bar) === */
.feedback-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.feedback-modal {
  background: #0f1729;
  color: #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 92vw;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  position: relative;
}
.feedback-modal h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: #fff;
  font-weight: 700;
}
.feedback-modal .feedback-q {
  margin: 0 0 20px;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
}
.feedback-modal .feedback-q em {
  color: #60a5fa;
  font-style: italic;
}
.feedback-modal-x {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  line-height: 1;
  transition: color var(--transition);
}
.feedback-modal-x:hover { color: #fff; }
.feedback-form { display: flex; flex-direction: column; gap: 12px; }
.feedback-form textarea {
  width: 100%;
  border: 1px solid #334155;
  border-radius: var(--radius);
  background: #1e293b;
  color: #f1f5f9;
  padding: 12px;
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  min-height: 80px;
  transition: border-color var(--transition);
}
.feedback-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
.feedback-form textarea::placeholder { color: #64748b; }
.feedback-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.feedback-row input {
  border: 1px solid #334155;
  border-radius: var(--radius);
  background: #1e293b;
  color: #f1f5f9;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 0.88rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.feedback-row input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
.feedback-row input::placeholder { color: #64748b; }
.feedback-submit {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s ease;
}
.feedback-submit:hover { background: #2563eb; }
.feedback-submit:active { transform: scale(0.98); }
@media (max-width: 480px) {
  .feedback-row { grid-template-columns: 1fr; }
  .feedback-modal { padding: 24px 20px; }
}

/* === EXPERT ONBOARDING MODAL === */
.expert-onboard-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.expert-onboard-modal {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 560px;
  width: 94vw;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}
.expert-onboard-modal h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}
.expert-onboard-intro {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 20px;
  line-height: 1.5;
}
.expert-onboard-x {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.expert-onboard-group { margin-bottom: 16px; }
.expert-onboard-group:last-of-type { margin-bottom: 20px; }
.expert-onboard-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 2px;
}
.expert-onboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.expert-onboard-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: background 0.15s;
}
.expert-onboard-row:hover { background: var(--accent-soft); }
.expert-onboard-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.expert-onboard-icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}
.expert-onboard-name {
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap;
}
/* Mode modal (non-Expert): icon + bullets */
.mode-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.mode-modal-header h3 { margin: 0; font-size: 1.2rem; }
.mode-modal-icon { font-size: 1.6rem; line-height: 1; }
.mode-modal-bullets {
  margin: 0 0 8px;
  padding: 0 0 0 20px;
  list-style: none;
}
.mode-modal-bullets li {
  position: relative;
  padding: 7px 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.mode-modal-bullets li:last-child { border-bottom: none; }
.mode-modal-bullets li::before {
  content: "✓";
  position: absolute;
  left: -20px;
  color: var(--accent);
  font-weight: 700;
}
.mode-modal-ok {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.mode-modal-ok:hover { opacity: 0.9; }
.mode-modal-feature-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}
.mode-modal-feature-link:hover { color: var(--accent); }
@media (max-width: 480px) {
  .expert-onboard-modal { padding: 22px 18px; }
  .expert-onboard-grid { grid-template-columns: 1fr; }
}

/* === TOAST (#53) === */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--ink);
  color: var(--card);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(10px); } }

/* === KEYBOARD SHORTCUTS MODAL (#20) === */
.shortcuts-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 360px;
  width: 90vw;
  z-index: 1001;
  box-shadow: var(--shadow-lg);
}
.shortcuts-modal h3 { margin: 0 0 12px; }
.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.shortcut-row:last-child { border-bottom: none; }
.shortcut-key {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 600;
}
.shortcuts-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.2s, color 0.2s;
}
.shortcuts-link:hover { color: var(--accent); border-color: var(--accent); }
.shortcuts-link svg { flex-shrink: 0; }

/* === MOBILE BOTTOM SHEET (#48) === */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 80vh;
  background: var(--card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin: 10px auto;
}
.bottom-sheet-search {
  margin: 0 16px 8px;
}
.bottom-sheet-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 1rem;
  background: var(--bg);
  color: var(--ink);
}
.bottom-sheet-list {
  overflow-y: auto;
  flex: 1;
  padding: 0 16px 16px;
}
.bottom-sheet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  border-radius: 8px;
}
.bottom-sheet-item:hover { background: var(--accent-soft); }
.bottom-sheet-item-flag { font-size: 1.4rem; }
.bottom-sheet-item-code { font-weight: 700; }
.bottom-sheet-item-name { color: var(--muted); font-size: 0.88rem; }
.bottom-sheet-group-label {
  padding: 10px 8px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* === ACCESSIBILITY === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 8px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius);
  z-index: 200;
}

/* === QR CODE & SHARE SETTINGS === */
.share-settings-wrap {
  text-align: center;
  margin-top: 12px;
}
.share-settings-btn {
  font-size: 0.82rem;
  width: auto;
  padding: 0 10px;
}
.qr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}
.qr-modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.qr-modal h3 { margin: 0 0 4px; font-size: 1.1rem; }
.qr-modal .sub { margin: 0 0 4px; }
.qr-canvas-wrap {
  margin: 16px auto;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius);
  display: inline-block;
}
.qr-canvas-wrap canvas,
.qr-canvas-wrap img {
  display: block;
}
.qr-url-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  margin-bottom: 12px;
  text-align: center;
  font-family: var(--font);
}
.qr-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.qr-actions button {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  transition: all var(--transition);
}
.qr-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.qr-actions button[data-qr-copy] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.qr-actions button[data-qr-copy]:hover {
  background: #1d4ed8;
}

/* === USER MODE BAR (Travel Money/Money Transfers/Business/Real Estate/Trader) === */
.mode-bar-label {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 2px;
}
.mode-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 4px 0 8px;
}
.mode-bar-pulse .mode-btn {
  animation: modePulse 2s ease-in-out 1;
  animation-delay: 3s;
  animation-fill-mode: both;
}
@keyframes modePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 3px var(--accent-soft); }
}
.mode-nudge-hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
  text-align: center;
}
.mode-nudge-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}
.mode-nudge-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
  vertical-align: middle;
}
.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 2px solid var(--line);
  background: var(--card);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  user-select: none;
  white-space: nowrap;
}
.mode-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.mode-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.25);
}
.mode-icon { font-size: 0.95rem; }
.mode-label { font-size: 0.82rem; }
.mode-tip-wrap { margin: 0; }
.mode-tip {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
}
@media (max-width: 768px) {
  .mode-btn { padding: 6px 10px; font-size: 0.78rem; gap: 4px; }
  .mode-icon { font-size: 0.85rem; }
}
@media (max-width: 480px) {
  .mode-bar { gap: 4px; }
  .mode-btn { padding: 5px 8px; font-size: 0.75rem; }
  .mode-icon { font-size: 0.8rem; }
}

/* === TOGGLE BAR (Expert/Crypto/Metals) === */
.toggle-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.toggle-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.toggle-pill .toggle-switch {
  display: inline-block;
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: var(--line);
  position: relative;
  transition: background var(--transition);
}
.toggle-pill.active .toggle-switch {
  background: rgba(255,255,255,0.4);
}
.toggle-pill .toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition);
}
.toggle-pill.active .toggle-switch::after {
  transform: translateX(12px);
}

/* === MODE-SPECIFIC DENSITY (#25) === */
[data-density="compact"] .card { padding: 14px 16px; }
[data-density="compact"] .stack { gap: 8px; }
[data-density="compact"] .controls { gap: 6px; }
[data-density="compact"] .rate-stat-label { font-size: 0.72rem; }
[data-density="compact"] .rate-stat-value { font-size: 0.92rem; }
[data-density="compact"] h2 { font-size: 1.1rem; }
[data-density="compact"] h3 { font-size: 1rem; }
[data-density="compact"] .sub { font-size: 0.82rem; }
[data-density="compact"] .hero > .sub { font-size: unset; }
[data-density="compact"] .presets .preset { padding: 4px 10px; font-size: 0.8rem; }
[data-density="moderate"] .card { padding: 18px 20px; }
[data-density="moderate"] .stack { gap: 10px; }

/* === MODE RESULT EXTRA (#4-8) === */
.mode-result-extra {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.5;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  padding: 0;
  text-decoration: underline;
}
.link-btn:hover { color: var(--ink); }

/* === MODE HIGHLIGHT PULSE (#10) === */
@keyframes modeHighlight {
  0% { box-shadow: 0 0 0 0 rgba(26,86,219,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(26,86,219,0.15); }
  100% { box-shadow: 0 0 0 0 rgba(26,86,219,0); }
}
.mode-highlight {
  animation: modeHighlight 1.5s ease;
  border-radius: var(--radius-lg);
}

/* === BREADCRUMB NAVIGATION (SEO) === */
.breadcrumb-nav {
  margin-bottom: -8px;
}
.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: calc(0.82rem * var(--font-scale, 1));
  color: var(--muted);
}
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before {
  content: "›";
  margin: 0 6px;
  color: var(--muted);
  font-size: calc(0.9rem * var(--font-scale, 1));
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

/* === CONVERSION TABLE (SEO) === */
.conversion-table {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(0.9rem * var(--font-scale, 1));
}
.conversion-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: calc(0.82rem * var(--font-scale, 1));
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.conversion-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.conversion-table tr:last-child td { border-bottom: none; }
.conversion-table tr:hover { background: var(--accent-soft); }
.conversion-table td:first-child {
  font-weight: 500;
  white-space: nowrap;
}
.conversion-table td:last-child {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
@media (max-width: 480px) {
  .conversion-table th, .conversion-table td { padding: 6px 8px; }
}

/* === GLOSSARY === */
.glossary-list { margin: 0; }
.glossary-list dt {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 0 4px;
  border-bottom: none;
}
.glossary-list dt:not(:first-of-type) {
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.glossary-list dd {
  margin: 0 0 4px;
  padding: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

/* === CONTENT ENRICHMENT === */
.misconceptions-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.misconceptions-list li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}
.misconceptions-list li strong {
  color: var(--ink);
}
.did-you-know {
  background: var(--bg);
  border-left: 3px solid var(--accent);
}
.did-you-know ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.did-you-know li {
  padding: 8px 0;
  line-height: 1.6;
}
.did-you-know li + li {
  border-top: 1px solid var(--line);
}
.sources-section {
  border-top: 2px solid var(--line);
  margin-top: 8px;
}
.sources-section h2 {
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sources-section p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* (Top pair cards on /pairs/ pages reuse .hub-live-* styles) */

/* === QUICK CONVERT PILLS (homepage) === */
.quick-convert-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
@media (max-width: 480px) {
  .quick-convert-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-bottom: 4px;
  }
}

/* === CURRENCY BROWSE NAME (homepage hub-live-card reuse) === */
.hub-live-name {
  font-size: 0.82rem;
  color: var(--muted);
}

/* === RATE FRESHNESS TEXT (homepage) === */
.rate-freshness-text a {
  color: var(--accent);
  text-decoration: none;
}
.rate-freshness-text a:hover {
  text-decoration: underline;
}

/* === #90 CLIENT-SIDE RATE CACHE === */
/* (no CSS needed - pure JS) */

/* === #17 ANIMATED DIGIT TRANSITIONS === */
.digit-tick {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.digit-tick-up { animation: digitUp 0.3s ease; }
.digit-tick-down { animation: digitDown 0.3s ease; }
@keyframes digitUp {
  0% { transform: translateY(8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes digitDown {
  0% { transform: translateY(-8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .digit-tick-up, .digit-tick-down { animation: none; }
}

/* === #18 RATE AGE COUNTDOWN === */
.rate-age {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-left: 8px;
}
.rate-age-ring {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  position: relative;
}
.rate-age-ring svg {
  width: 18px;
  height: 18px;
  transform: rotate(-90deg);
}
.rate-age-ring circle {
  fill: none;
  stroke-width: 2.5;
}
.rate-age-ring .ring-bg { stroke: var(--line); }
.rate-age-ring .ring-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

/* === #21 GOLD SHIMMER ON GOOD RATES === */
@keyframes goldShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.rate-gold-shimmer {
  background: linear-gradient(90deg, transparent 30%, rgba(234,179,8,0.12) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: goldShimmer 3s ease-in-out infinite;
  border-radius: var(--radius);
  position: relative;
}
.rate-gold-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b45309;
  background: rgba(234,179,8,0.15);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 6px;
}
[data-theme="dark"] .rate-gold-badge {
  color: #fbbf24;
  background: rgba(234,179,8,0.2);
}

/* === #22 TIME-OF-DAY GREETING === */
.greeting-bar {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 6px 0;
  text-align: center;
}
.greeting-bar strong { color: var(--ink); }

/* === #23 SEASONAL THEMES === */
/* Applied dynamically via JS - minimal base */
.seasonal-accent { transition: color 0.3s ease; }

/* === #24 RATE OF THE DAY === */
.rate-of-day {
  background: linear-gradient(135deg, var(--accent-soft), var(--card));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rate-of-day-icon { font-size: 1.2rem; }
.rate-of-day-text { flex: 1; }
.rate-of-day-text strong { color: var(--ink); }
.rate-of-day a { color: var(--accent); text-decoration: none; font-weight: 600; }
.rate-of-day a:hover { text-decoration: underline; }
.rate-of-day--weak {
  background: linear-gradient(135deg, var(--danger-soft), var(--card));
  border-color: var(--danger);
}
.rate-of-day--weak a { color: var(--danger); }

/* === BADGE STRIP (compact in-converter summary) === */
.badge-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 0;
  font-size: 1rem;
  color: var(--muted);
}
.badge-strip-more {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.badge-strip-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  margin-left: 4px;
}
.badge-strip-link:hover { text-decoration: underline; }

/* === #25 ACHIEVEMENT BADGES === */
.badge-tray {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 12px auto;
  max-width: 720px;
  text-align: center;
}
.badge-tray-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.badge-tray-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  min-width: 90px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.badge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  animation: badgeShimmer 1.5s ease infinite;
}
@keyframes badgeShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.badge-card:hover {
  background: linear-gradient(90deg, var(--accent-soft) 0%, rgba(255,255,255,0.6) 50%, var(--accent-soft) 100%);
  background-size: 200% 100%;
  animation: badgeShimmer 1.5s ease infinite;
}
.badge-card-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.badge-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.badge-card.new {
  animation: badgePop 0.4s ease;
  border-color: var(--accent);
}
@keyframes badgePop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* === #27 MILESTONE CELEBRATIONS === */
@keyframes milestoneGlow {
  0% { box-shadow: 0 0 0 0 rgba(26,86,219,0.3); }
  50% { box-shadow: 0 0 12px 4px rgba(26,86,219,0.15); }
  100% { box-shadow: 0 0 0 0 rgba(26,86,219,0); }
}
.milestone-glow { animation: milestoneGlow 1s ease; }

/* === #28 PAIR POPULARITY (merged with conversion counter) === */
.pair-popularity {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 8px 0 4px;
  font-style: italic;
}

/* === #29 / #95 WELCOME BACK BANNER === */
.welcome-back {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.welcome-back-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  line-height: 1;
}
.welcome-back strong { font-weight: 600; }
.welcome-back .wb-change {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.welcome-back .wb-change.up { color: var(--success); }
.welcome-back .wb-change.down { color: var(--danger); }

/* === #53 VOLATILITY + #55 MOMENTUM ROW === */
.trader-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 10px;
}

/* === #53 VOLATILITY BADGE === */
.vol-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.vol-badge.vol-1 { background: #dbeafe; color: #1e40af; }
.vol-badge.vol-2 { background: #d1fae5; color: #065f46; }
.vol-badge.vol-3 { background: #fef3c7; color: #92400e; }
.vol-badge.vol-4 { background: #fed7aa; color: #9a3412; }
.vol-badge.vol-5 { background: #fecaca; color: #991b1b; }
[data-theme="dark"] .vol-badge.vol-1 { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .vol-badge.vol-2 { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .vol-badge.vol-3 { background: #78350f; color: #fde68a; }
[data-theme="dark"] .vol-badge.vol-4 { background: #7c2d12; color: #fdba74; }
[data-theme="dark"] .vol-badge.vol-5 { background: #7f1d1d; color: #fca5a5; }

/* === #55 MOMENTUM INDICATOR === */
.momentum-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.momentum-badge.bullish { background: var(--success-soft); color: var(--success); }
.momentum-badge.bearish { background: var(--danger-soft); color: var(--danger); }
.momentum-badge.neutral { background: var(--accent-soft); color: var(--muted); }

/* === #54 BEST DAY OF WEEK === */
.best-day-insight {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 4px 0;
  line-height: 1.5;
}

/* === #60 ANOMALY DETECTION === */
.anomaly-banner {
  background: var(--warning-soft);
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.anomaly-icon { font-size: 1.1rem; }

/* === #56 AUTO-REFRESH INDICATOR === */
.auto-refresh-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  margin-left: 6px;
  animation: pulse-dot 2s infinite;
}

/* === #15 SESSION HISTORY === */
.session-history {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.session-history.open { max-height: 400px; overflow-y: auto; }
.session-history-toggle {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition);
  text-decoration: none;
}
.session-history-toggle:hover {
  color: var(--accent);
  text-decoration: underline;
}
.session-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.session-history-item:last-child { border-bottom: none; }
.session-history-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.session-history-pair { font-weight: 500; }
.session-history-result { color: var(--ink); font-variant-numeric: tabular-nums; }

/* === #12 TWO-WAY INPUT === */
.output-editable {
  cursor: text;
  border-bottom: 1px dashed var(--line);
  transition: border-color var(--transition);
}
.output-editable:hover { border-color: var(--accent); }
.to-amount-input {
  background: none;
  border: none;
  border-bottom: 2px solid var(--accent);
  color: var(--ink);
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  padding: 0;
  width: 100%;
  outline: none;
}

/* === #13 COMMAND PALETTE === */
.cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  animation: fadeIn 0.15s ease;
}
.cmd-palette {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(520px, 92vw);
  overflow: hidden;
}
.cmd-palette-input {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  font-family: var(--font);
  background: var(--card);
  color: var(--ink);
  outline: none;
}
.cmd-palette-input::placeholder { color: var(--muted); }
.cmd-palette-results {
  max-height: 300px;
  overflow-y: auto;
  padding: 4px 0;
}
.cmd-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background var(--transition);
}
.cmd-result:hover, .cmd-result.active { background: var(--accent-soft); }
.cmd-result-icon { font-size: 1rem; opacity: 0.7; }
.cmd-result-text { flex: 1; }
.cmd-result-label { font-size: 0.92rem; font-weight: 500; }
.cmd-result-hint { font-size: 0.78rem; color: var(--muted); }
.cmd-palette-hint {
  padding: 8px 18px;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}

/* === #63 HOW WE MAKE MONEY === */
.transparency-box {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.transparency-box strong { font-weight: 600; }
.transparency-box a { color: var(--accent); }

/* === #2 INLINE PROVIDER CTA === */
.inline-provider-cta {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 4px 0;
  line-height: 1.5;
}
.inline-provider-cta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.inline-provider-cta a:hover { text-decoration: underline; }

/* === #3 INTENT FORK (single mode-aware CTA) === */
.intent-fork {
  padding: 6px 0;
}
.intent-cta {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-style: italic;
  transition: color var(--transition);
}
.intent-cta:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* === #11 TYPEAHEAD COMBO BOX === */
.currency-typeahead {
  position: relative;
  flex: 1;
  min-width: 0;
}
.currency-typeahead-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--card);
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition);
}
.currency-typeahead-input:focus { border-color: var(--accent); }
.currency-typeahead-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
}
.currency-typeahead-dropdown.open { display: block; }
.typeahead-option {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.typeahead-option:hover, .typeahead-option.active { background: var(--accent-soft); }
.typeahead-option .ta-code { font-weight: 600; min-width: 36px; }
.typeahead-option .ta-name { color: var(--muted); font-size: 0.82rem; }

/* === #46 SHAKE TO REFRESH === */
.shake-toast {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* === #49 SWIPE BETWEEN PAIRS === */
.swipe-hint {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  padding: 4px 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.swipe-hint.visible { opacity: 1; }

/* === #92 CONNECTION-AWARE === */
.slow-conn-notice {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  padding: 4px 0;
}

/* === #89 SKELETON LOADING (enhanced) === */
.skeleton-chart {
  height: 200px;
  width: 100%;
  background: linear-gradient(90deg, var(--line) 25%, var(--accent-soft) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}
.skeleton-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.skeleton-stat {
  height: 52px;
  background: linear-gradient(90deg, var(--line) 25%, var(--accent-soft) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}
.skeleton-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skeleton-row {
  height: 32px;
  background: linear-gradient(90deg, var(--line) 25%, var(--accent-soft) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* === #71 TRAVEL MONEY AFFILIATE === */
.travel-money-cta {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}
.travel-money-cta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.travel-money-cta a:hover { text-decoration: underline; }

/* === ALERTS SYSTEM === */

/* Post-submit action buttons */
.rate-alert-post-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.rate-alert-telegram-btn {
  background: #0088cc;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.rate-alert-telegram-btn:hover { background: #006daa; }
.rate-alert-telegram-btn:disabled { opacity: 0.6; cursor: default; }
.rate-alert-manage-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.rate-alert-manage-btn:hover { background: var(--accent-soft); }

/* Verification notice */
.rate-alert-verify {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 8px 0 0;
}

/* Channel checkboxes */
.rate-alert-channels {
  margin-top: 8px;
  display: flex;
  gap: 16px;
}
.rate-alert-channel-opt {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* My Alerts Panel (modal) */
.alerts-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.alerts-panel {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  max-width: 520px;
  width: 92vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  position: relative;
}
.alerts-panel h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 700;
}
.alerts-panel-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.alerts-panel-close:hover { color: var(--ink); }
.alerts-panel-loading { color: var(--muted); font-size: 0.9rem; }
.alerts-panel-warn {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.alerts-panel-tg-link { margin-bottom: 16px; }

/* Alert list */
.alerts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.alert-item:last-child { border-bottom: none; }
.alert-icon { font-size: 1rem; }
.alert-desc { font-weight: 600; flex: 1; min-width: 120px; }
.alert-status {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--border);
  color: var(--muted);
  text-transform: capitalize;
}
.alert-status-active .alert-status { background: var(--success-soft); color: var(--success); }
.alert-status-paused .alert-status { background: var(--border); color: var(--muted); }
.alert-status-triggered .alert-status { background: var(--success-soft); color: var(--success); }
.alert-channels {
  font-size: 0.75rem;
  color: var(--muted);
}
.alert-actions {
  display: flex;
  gap: 4px;
}
.alert-action-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s;
}
.alert-action-btn:hover { background: var(--accent-soft); }
.alert-action-cancel { color: var(--danger); border-color: var(--danger); }
.alert-action-cancel:hover { background: var(--danger-soft); }

.alerts-panel-delete {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.alerts-panel-delete small { display: block; margin-top: 0.25rem; }
.alerts-delete-btn {
  background: none;
  border: none;
  color: var(--danger);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  padding: 0;
}
.alerts-delete-btn:hover { color: var(--fg); }
.alerts-delete-btn:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 600px) {
  .alerts-panel { padding: 18px 16px; }
  .alert-item { font-size: 0.82rem; }
  .alert-actions { width: 100%; justify-content: flex-end; }
}
