/* ============================================================
   Ratewave — currency converter
   Dark is the primary look (money screens are dark & warm).
   Light mode is cool banknote paper, not cream.
   ============================================================ */

/* ---- Dark tokens (default) ---- */
:root {
  --ink:        #0E1A1C;   /* deep vault teal, not black */
  --surface:    #14262A;
  --surface-2:  #1B3236;
  --line:       #2A464C;
  --line-soft:  #21393E;

  --text:       #EAF2EE;   /* warm banknote white */
  --text-dim:   #9DB6B0;
  --text-faint: #6E8983;

  --gold:       #C9A96A;   /* brass / coin — hairlines, wordmark */
  --gold-dim:   #8f7a4d;

  --up:         #4ED8A0;   /* market up */
  --up-soft:    rgba(78,216,160,0.14);
  --down:       #EF6461;   /* market down */
  --down-soft:  rgba(239,100,97,0.14);

  --focus:      #7FD9C0;

  --shadow:     0 18px 50px -24px rgba(0,0,0,0.7);
  --radius:     18px;
  --radius-sm:  11px;

  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;

  color-scheme: dark;
}

/* ---- Light tokens ---- */
:root[data-theme="light"] {
  --ink:        #EDF1EF;   /* cool paper */
  --surface:    #FBFCFB;
  --surface-2:  #FFFFFF;
  --line:       #D3DEDA;
  --line-soft:  #E2E9E6;

  --text:       #12262A;
  --text-dim:   #4C6560;
  --text-faint: #7B928D;

  --gold:       #9A7B39;
  --gold-dim:   #b9a06a;

  --up:         #12996B;
  --up-soft:    rgba(18,153,107,0.12);
  --down:       #CE4A45;
  --down-soft:  rgba(206,74,69,0.12);

  --focus:      #147a5c;

  --shadow:     0 18px 44px -26px rgba(20,50,54,0.35);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; }

/* Guilloché — faint engraved banknote lines behind the hero */
.guilloche {
  position: fixed;
  top: -20vh; left: 50%;
  width: 140vmax; height: 90vh;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background:
    repeating-radial-gradient(circle at 50% 22%,
      transparent 0, transparent 26px,
      color-mix(in srgb, var(--gold) 22%, transparent) 26px,
      color-mix(in srgb, var(--gold) 22%, transparent) 27px,
      transparent 27px, transparent 54px);
  -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 62%);
          mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 62%);
}
:root[data-theme="light"] .guilloche { opacity: 0.32; }

/* ---- Layout ----
   The three sections (hero / history / majors) are placed on a CSS grid whose
   template is switched by [data-layout] (see the LAYOUT VARIANTS block below).
   max-width is 1500px so wide screens actually get used. */
.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  padding: 10px 32px 60px;
  display: grid;
  gap: 26px;
  align-items: start;
  /* fallback = single column; overridden per data-layout */
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "hero" "history" "majors";
}
.wrap > .hero    { grid-area: hero; }
.wrap > .history { grid-area: history; }
.wrap > .majors  { grid-area: majors; }
.wrap > .panel   { margin-top: 0; }   /* spacing comes from grid gap, not margins */

/* Full-width page heading under the logo (spans the whole window; content below stays centered). */
.pagehead {
  position: relative;
  z-index: 1;
  padding: 8px 32px 20px;
  border-bottom: 1px solid var(--line);
}
.pagehead::after {                     /* short gold accent sitting on the divider, under the text */
  content: "";
  position: absolute;
  left: 32px; bottom: -1px;
  width: 54px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.topbar {
  position: relative;
  z-index: 2;
  max-width: none;          /* full-width masthead */
  margin: 0 auto;
  padding: 20px 32px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark { color: var(--gold); flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.2px;
}
.topbar-right { display: inline-flex; align-items: center; gap: 14px; }
.rate-date {
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--gold-dim); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* ---- Hero / converter ---- */
/* container-type lets the converter reflow to its COLUMN width (not the viewport),
   so it stacks nicely when the hero sits in a narrow split/sidebar column. */
.hero { padding-top: 20px; text-align: left; container-type: inline-size; }
.hero-kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 5vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.4px;
  margin: 0;
}

/* Wise-style converter: [ From ] | swap-on-divider | [ To ] */
.converter {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cvt-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 30px;
  min-width: 0;
}
.cvt-label { font-size: 14px; color: var(--text-dim); font-weight: 500; }
.cvt-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.cvt-amount {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.cvt-symbol {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--text);
  flex: none;
}
.cvt-to .cvt-symbol { color: var(--gold); }

.amount-input, .result-amount {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-variant-numeric: tabular-nums;
  text-align: left;
  outline: none;
  padding: 0;
  white-space: nowrap;
}
.amount-input { color: var(--text); font-weight: 500; }
.amount-input::placeholder { color: var(--text-faint); }
.result-amount { color: var(--gold); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* currency picker: flag + CODE - Name + chevron */
.ccy-picker {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 11px 14px;
  border-radius: 12px;
  flex: 0 1 auto;
  max-width: 66%;
  min-width: 0;
}
.ccy-picker:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.ccy-flag {
  width: 32px; height: 24px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.18) inset;
  background: var(--surface-2);
  flex: none;
}
.ccy-code { font-weight: 600; font-size: 19px; letter-spacing: 0.2px; flex: none; }
.ccy-name {
  font-size: 17px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.ccy-name::before { content: "\2013\00a0"; }   /* en dash + nbsp */
.chev { color: var(--text-faint); flex: none; }

/* divider column with the swap centered on the line */
.cvt-mid { position: relative; width: 1px; background: var(--line); align-self: stretch; }
.swap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.8,.3,1.4), color .15s, border-color .15s;
}
.swap:hover { color: var(--gold); border-color: var(--gold-dim); }
.swap:active { transform: translate(-50%, -50%) rotate(180deg); }

.rate-line {
  margin: 20px 0 6px;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 24px;
}
.rate-quote {
  font-size: 15px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.rate-quote strong { color: var(--text); font-weight: 600; }
.rate-change {
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 2px 9px;
  border-radius: 999px;
}
.rate-change.up   { color: var(--up);   background: var(--up-soft); }
.rate-change.down { color: var(--down); background: var(--down-soft); }
.rate-change.flat { color: var(--text-dim); background: color-mix(in srgb, var(--text) 8%, transparent); }

/* Popular pairs */
.pairs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 18px;
}
.pair-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: color .15s, border-color .15s, background .15s;
}
.pair-chip:hover { color: var(--text); border-color: var(--gold-dim); }
.pair-chip.active {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}
:root[data-theme="light"] .pair-chip.active { color: #fff; }

/* ---- Panels ---- */
.panel {
  margin-top: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.panel-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.2px;
}

.ranges { display: inline-flex; gap: 2px; background: var(--ink); border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px; }
.ranges button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: color .15s, background .15s;
}
.ranges button:hover { color: var(--text); }
.ranges button[aria-selected="true"] {
  color: var(--ink);
  background: var(--gold);
}
:root[data-theme="light"] .ranges button[aria-selected="true"] { color: #fff; }

/* Chart */
.chart-wrap {
  position: relative;
  width: 100%;
  height: 300px;
}
.chart { width: 100%; height: 100%; display: block; overflow: visible; }
.chart-line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { r: 4.5; stroke: var(--surface); stroke-width: 2.5; }
.chart-grid { stroke: var(--line-soft); stroke-width: 1; }
.chart-axislabel { fill: var(--text-faint); font-size: 11px; font-family: var(--font-ui); }
.chart-crosshair { stroke: var(--gold-dim); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.chart-cursor { r: 4; fill: var(--gold); stroke: var(--surface); stroke-width: 2; opacity: 0; }

.chart-tip {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -120%);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 12.5px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 22px -10px rgba(0,0,0,0.5);
}
.chart-tip .tip-rate { font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tip .tip-date { color: var(--text-dim); font-size: 11.5px; }

.chart-state {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  padding: 20px;
}
.chart-state button {
  margin-top: 10px;
  border: 1px solid var(--gold-dim);
  background: transparent;
  color: var(--gold);
  padding: 7px 16px;
  border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 18px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-k { font-size: 12px; color: var(--text-faint); }
.stat-v { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-v.up { color: var(--up); }
.stat-v.down { color: var(--down); }

/* Live rates table (Wise "compare rates" style) — deliberately NOT inside a panel card */
.rates-title {
  font-family: var(--font-display);
  font-weight: 600; font-size: 20px; letter-spacing: -0.2px;
  margin: 0 0 14px;
}
.rate-row, .rates-head {
  display: grid;
  grid-template-columns: minmax(150px, 1.7fr) minmax(80px, 1fr) minmax(92px, 0.9fr) minmax(120px, 1.2fr) 40px;
  align-items: center;
  gap: 16px;
}
.rates-head {
  padding: 4px 16px 12px;
  font-size: 13px; color: var(--text-dim); font-weight: 500;
}

/* Inverse toggle */
.inverse {
  display: inline-flex; align-items: center; gap: 9px;
  border: 0; background: transparent; color: var(--text-dim);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; padding: 0;
}
.inverse-track {
  width: 38px; height: 22px; border-radius: 999px; flex: none;
  background: var(--line); position: relative; transition: background .2s;
}
.inverse-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-dim); transition: transform .2s, background .2s;
}
.inverse[aria-checked="true"] .inverse-track { background: var(--gold); }
.inverse[aria-checked="true"] .inverse-thumb { transform: translateX(16px); background: var(--ink); }

/* rows */
.rate-row {
  width: 100%; border: 0; background: transparent; color: inherit; font: inherit;
  text-align: left; padding: 13px 16px; border-radius: 12px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.rate-row:hover { background: var(--surface); }
.rates-rows .rate-row:nth-child(even) { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.rates-rows .rate-row:nth-child(even):hover { background: var(--surface); }
.rate-base {
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.rate-base:hover { background: var(--surface-2); border-color: var(--gold-dim); }

.rr-ccy { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.rr-ccy .ccy-flag { width: 30px; height: 22px; }
.rate-base .rr-ccy .ccy-flag { width: 34px; height: 25px; }
.rr-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate-base .rr-name { font-size: 16px; }
.rr-amount { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.rate-base .rr-amount { font-family: var(--font-display); font-size: 18px; }

.chg-chip {
  display: inline-block; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 3px 9px; border-radius: 999px;
}
.chg-chip.up { color: var(--up); background: var(--up-soft); }
.chg-chip.down { color: var(--down); background: var(--down-soft); }
.chg-chip.flat { color: var(--text-dim); background: color-mix(in srgb, var(--text) 8%, transparent); }

.spark { width: 120px; height: 34px; display: block; }
.spark .line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

.rr-action { display: flex; justify-content: flex-end; color: var(--text-faint); }
.rate-row:hover .rr-action { color: var(--gold); }

.rates-foot { display: flex; justify-content: flex-end; padding: 16px 16px 0; }
.rates-updated { font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .rate-row, .rates-head { grid-template-columns: minmax(120px, 1.6fr) 1fr auto 34px; gap: 10px; }
  .rh-chart, .rr-chart { display: none; }
}
@media (max-width: 470px) {
  .rate-row, .rates-head { grid-template-columns: 1.5fr 1fr auto; }
  .rh-change, .rr-change, .rh-action, .rr-action { display: none; }
}

/* Footer */
.foot {
  position: relative; z-index: 1;
  max-width: 720px;
  margin: 30px auto 0;
  padding: 0 22px 44px;
  text-align: center;
}
.foot p { font-size: 12.5px; color: var(--text-faint); line-height: 1.6; margin: 0; }
.foot a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Currency picker sheet ---- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(6,14,15,0.55);
  backdrop-filter: blur(2px);
  animation: fade .18s ease;
}
.sheet-panel {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 48px));
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: pop .2s cubic-bezier(.2,.8,.3,1.2);
}
.sheet-head { display: flex; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line-soft); }
.sheet-search {
  flex: 1 1 auto;
  background: var(--ink);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  outline: none;
}
.sheet-search:focus { border-color: var(--gold-dim); }
.sheet-close {
  flex: none;
  width: 40px; border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: transparent; color: var(--text-dim);
  cursor: pointer; font-size: 15px;
}
.sheet-close:hover { color: var(--text); }
.sheet-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.sheet-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.sheet-item:hover, .sheet-item.hi { background: var(--surface-2); }
.sheet-item[aria-selected="true"] { outline: 1px solid var(--gold-dim); }
.sheet-item .ccy-flag { width: 26px; height: 20px; }
.sheet-item .si-code { font-weight: 600; font-size: 14px; width: 42px; flex: none; }
.sheet-item .si-name { font-size: 13px; color: var(--text-dim); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop  { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }

/* Focus visibility */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.loading { opacity: .5; }

/* ---- Responsive ---- */
@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .panel, .converter { border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   LAYOUT VARIANTS  (switched by [data-layout] on <html>)
   ============================================================ */

/* Split — converter left, chart right; majors full width below. */
[data-layout="split"] .wrap {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  grid-template-areas:
    "head head"
    "hero history"
    "majors majors";
}

/* Sidebar — converter as a sticky left rail, chart + majors stacked on the right.
   Columns are 1:3 (rail : content). */
[data-layout="sidebar"] .wrap {
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  grid-template-areas:
    "head head"
    "hero history"
    "hero majors";
}
[data-layout="sidebar"] .hero { position: sticky; top: 18px; }

/* Stacked — one wide centered column, big full-width chart. */
[data-layout="stacked"] .wrap {
  grid-template-columns: minmax(0, 1120px);
  justify-content: center;
  grid-template-areas: "head" "hero" "history" "majors";
}

/* Classic — the original narrow single column. */
[data-layout="classic"] .wrap {
  max-width: 960px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "hero" "history" "majors";
}

/* Hero alignment: left when it's a column, centered when it's a full row. */
[data-layout="split"] .hero,
[data-layout="sidebar"] .hero { text-align: left; padding-top: 0; }
[data-layout="split"] .rate-line,
[data-layout="sidebar"] .rate-line,
[data-layout="split"] .pairs,
[data-layout="sidebar"] .pairs { justify-content: flex-start; }

/* Keep the converter from stretching absurdly wide in the centered layouts. */
[data-layout="stacked"] .converter,
[data-layout="classic"] .converter { max-width: 820px; margin-inline: auto; }
[data-layout="stacked"] .chart-wrap { height: 340px; }

/* Converter reflows to its OWN column width (container query on .hero).
   The amount/result scale with the rail (cqi) so big numbers never clip in a narrow
   1:3 sidebar column, whatever the window width. */
@container (max-width: 700px) {
  .converter { grid-template-columns: 1fr; }          /* stack From over To */
  .cvt-mid { width: auto; height: 1px; }              /* divider becomes horizontal */
  .swap:active { transform: translate(-50%, -50%) rotate(180deg); }
  .cvt-side { padding: 24px 22px; }
  .amount-input, .result-amount, .cvt-symbol { font-size: clamp(20px, 7cqi, 30px); }
}

/* On real phones, always fall back to a single column regardless of variant. */
@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "hero" "history" "majors" !important;
    max-width: 640px;
  }
  [data-layout="sidebar"] .hero { position: static; }
  [data-layout="split"] .hero,
  [data-layout="sidebar"] .hero { text-align: center; }
  [data-layout="split"] .rate-line,
  [data-layout="sidebar"] .rate-line,
  [data-layout="split"] .pairs,
  [data-layout="sidebar"] .pairs { justify-content: center; }
}

/* ============================================================
   DISPLAY FONT VARIANTS  (switched by [data-font] on <html>)
   Body/UI stays Inter; only the display family changes.
   ============================================================ */
:root[data-font="newsreader"] { --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif; }
:root[data-font="sora"]       { --font-display: 'Sora', system-ui, sans-serif; }
:root[data-font="schibsted"]  { --font-display: 'Schibsted Grotesk', system-ui, sans-serif; }

/* per-font optical tweaks so each reads its best */
[data-font="newsreader"] .hero-kicker { font-weight: 500; letter-spacing: -0.2px; }
[data-font="sora"] .hero-kicker { letter-spacing: -0.6px; font-weight: 600; }
[data-font="sora"] .brand-name  { letter-spacing: -0.3px; }
[data-font="sora"] .amount-input,
[data-font="sora"] .result-amount { font-weight: 500; letter-spacing: -0.3px; }
[data-font="schibsted"] .hero-kicker { letter-spacing: -0.5px; font-weight: 600; }
[data-font="schibsted"] .amount-input,
[data-font="schibsted"] .result-amount { font-weight: 500; }

/* (preview variant switcher removed — sidebar layout + Schibsted font are now baked in) */
