/* ==========================================================================
   Global FX Journal — Design System
   Premium editorial finance: deep navy, warm white, teal/emerald, gold accents
   ========================================================================== */

:root {
  --navy-900: #071324;
  --navy-800: #0b1f3a;
  --navy-700: #12335a;
  --navy-600: #1b4774;
  --ink: #16202c;
  --graphite: #2a2f36;
  --muted: #5c6b7a;
  --muted-2: #8695a4;
  --line: #e3e8ee;
  --line-strong: #cfd8e2;
  --paper: #ffffff;
  --warm: #f8f6f1;
  --mist: #eef2f6;
  --mist-2: #e4ebf2;
  --teal: #12a594;
  --teal-dark: #0c8578;
  --emerald: #0e7c66;
  --gold: #c9a227;
  --gold-soft: #e8d49a;
  --up: #0e9f6e;
  --down: #d64545;
  --up-bg: #e8f6ef;
  --down-bg: #fdecec;

  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06), 0 2px 8px rgba(11, 31, 58, 0.05);
  --shadow-md: 0 6px 24px rgba(11, 31, 58, 0.09);
  --shadow-lg: 0 18px 48px rgba(7, 19, 36, 0.18);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --wrap-wide: 1400px;
  --header-h: 66px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.18; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid rgba(18, 165, 148, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: var(--wrap-wide); }
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.section--warm { background: var(--warm); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy-800); color: #e8eef5; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head__text { max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-dark); margin-bottom: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--teal); display: inline-block; }
.section-title { font-family: var(--serif); font-size: clamp(24px, 3vw, 36px); color: var(--navy-800); }
.section-sub { color: var(--muted); margin: 8px 0 0; font-size: 16px; max-width: 620px; }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--news { grid-template-columns: 1.55fr 1fr; gap: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  padding: 11px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--navy-800); color: #fff; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  min-height: 44px;
}
.btn:hover { background: var(--navy-700); }
.btn:active { transform: translateY(1px); }
.btn--teal { background: var(--teal); }
.btn--teal:hover { background: var(--teal-dark); }
.btn--ghost { background: transparent; color: var(--navy-800); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--mist); }
.btn--light { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.35); }
.btn--light:hover { background: rgba(255,255,255,0.22); }
.btn--sm { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.btn--block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--graphite);
  border-radius: var(--radius-pill); padding: 6px 13px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--teal); color: var(--teal-dark); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--mist); color: var(--navy-700); border-radius: 4px; padding: 3px 8px;
}
.tag--teal { background: rgba(18,165,148,.12); color: var(--teal-dark); }
.tag--gold { background: rgba(201,162,39,.16); color: #8a6d12; }
.tag--outline { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }

.delta { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.delta--up { color: var(--up); }
.delta--down { color: var(--down); }
.delta--flat { color: var(--muted); }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- Data status ---------- */
.datastatus {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); background: var(--mist);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 14px;
}
.datastatus__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.datastatus--demo { background: #fdf8ea; border-color: #ecdcae; color: #7a6212; }
.datastatus--demo .datastatus__dot { background: var(--gold); }
.datastatus code { font-family: var(--mono); font-size: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: 18px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand__name { font-weight: 800; font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy-800); line-height: 1.05; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; flex: 1; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav__link { flex: none; }
.nav__link {
  padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--graphite);
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav__link:hover { background: var(--mist); color: var(--navy-800); text-decoration: none; }
.nav__link.is-current { color: var(--teal-dark); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--graphite); display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { border-color: var(--teal); color: var(--teal-dark); }
.menu-btn { display: none; }

.mobile-nav {
  display: none; border-top: 1px solid var(--line); background: #fff;
  padding: 10px 0 18px; max-height: calc(100vh - var(--header-h)); overflow: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav__group { padding: 6px 0 14px; }
.mobile-nav__link {
  display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 12px 4px; font-size: 16px; font-weight: 600; color: var(--navy-800);
  border-bottom: 1px solid var(--line);
}

/* ---------- Search panel ---------- */
.search-panel {
  display: none; border-top: 1px solid var(--line); background: var(--warm); padding: 16px 0;
}
.search-panel.is-open { display: block; }
.search-field { position: relative; }
.search-field input {
  width: 100%; padding: 14px 16px 14px 46px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: #fff; font-size: 16px;
}
.search-field svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-results { margin-top: 12px; display: grid; gap: 6px; max-height: 46vh; overflow: auto; }
.search-result {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px; cursor: pointer;
}
.search-result:hover { border-color: var(--teal); }
.search-result__kind { margin-left: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy-900); color: #eaf1f8; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(7,19,36,0.94) 6%, rgba(9,25,46,0.78) 42%, rgba(10,32,56,0.44) 78%, rgba(15,56,84,0.5) 100%);
}
.hero__inner { position: relative; padding: 58px 0 46px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: start; }

.hero__kicker {
  display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-soft);
  border: 1px solid rgba(232,212,154,0.4); border-radius: var(--radius-pill); padding: 6px 14px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 700; color: #fff;
  font-size: clamp(34px, 5.2vw, 62px); line-height: 1.04; margin: 16px 0 0; letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--gold-soft); }
.hero__lede { font-size: clamp(15px, 1.6vw, 19px); color: #b9cbdb; max-width: 560px; margin: 14px 0 0; }
.hero__meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 20px; }
.hero__stat { border-left: 2px solid rgba(255,255,255,0.24); padding-left: 12px; }
.hero__stat b { display: block; font-size: 20px; color: #fff; font-variant-numeric: tabular-nums; }
.hero__stat span { font-size: 12px; color: #93a8bd; text-transform: uppercase; letter-spacing: .08em; }

.fx-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.fx-quick__btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.24); color: #dbe7f2;
  border-radius: var(--radius-pill); padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.fx-quick__btn:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ---------- Converter ---------- */
.converter {
  background: #fff; color: var(--ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.4);
  padding: 22px; position: relative;
}
.converter__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.converter__title { font-family: var(--serif); font-size: 21px; color: var(--navy-800); }
.converter__tabs { display: flex; gap: 4px; background: var(--mist); border-radius: var(--radius-pill); padding: 4px; margin-bottom: 16px; }
.converter__tab {
  flex: 1; border: 0; background: none; cursor: pointer; padding: 9px 8px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.converter__tab.is-active { background: #fff; color: var(--navy-800); box-shadow: var(--shadow-sm); }

.field { margin-bottom: 14px; }
.field__label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field__row { display: flex; gap: 10px; }
.amount-input {
  flex: 1; min-width: 0; padding: 14px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  font-size: 20px; font-weight: 700; color: var(--navy-800); font-variant-numeric: tabular-nums; background: #fff;
}
.amount-input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(18,165,148,.16); }
.amount-input.is-invalid { border-color: var(--down); box-shadow: 0 0 0 3px rgba(214,69,69,.14); }

/* currency combobox */
.combo { position: relative; min-width: 158px; flex: none; }
.combo__btn {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
  border: 1.5px solid var(--line-strong); background: #fff; border-radius: var(--radius);
  padding: 11px 12px; cursor: pointer; min-height: 52px;
}
.combo__btn:hover { border-color: var(--teal); }
.combo__flag { display: flex; align-items: center; flex: none; }

/* Real flag images (img/flags/<iso>.png) */
.flag-img {
  display: inline-block; vertical-align: -3px;
  width: 24px; height: 18px; border-radius: 3px; object-fit: cover; flex: none;
  background: var(--mist-2);
  box-shadow: 0 0 0 1px rgba(11, 31, 58, 0.14);
}
[data-theme="dark"] .flag-img { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22); }
.flag-badge {
  display: inline-grid; place-items: center; vertical-align: -3px;
  width: 24px; height: 18px; border-radius: 3px; flex: none;
  background: var(--teal); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.flag-img--sm { width: 20px; height: 15px; }
.combo__code { font-weight: 800; font-size: 15px; color: var(--navy-800); }
.combo__name { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo__caret { margin-left: auto; color: var(--muted); flex: none; }
.combo__pop {
  position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; left: auto; width: min(340px, 86vw);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 8px; display: none;
}
.combo__pop.is-open { display: block; }
.combo__search { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; font-size: 15px; }
.combo__list { max-height: 260px; overflow: auto; }
.combo__opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.combo__opt:hover, .combo__opt.is-active { background: var(--mist); }
.combo__opt b { color: var(--navy-800); }
.combo__opt small { color: var(--muted); margin-left: auto; }
.combo__empty { padding: 14px; color: var(--muted); font-size: 13px; text-align: center; }

.swap-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.swap-row__line { flex: 1; height: 1px; background: var(--line); }
.swap-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: #fff; color: var(--navy-800); display: grid; place-items: center; cursor: pointer;
  transition: transform .3s ease, border-color .15s ease, color .15s ease;
}
.swap-btn:hover { border-color: var(--teal); color: var(--teal-dark); }
.swap-btn.is-spinning { transform: rotate(180deg); }

.result-card {
  background: linear-gradient(140deg, var(--navy-800), var(--navy-700) 70%, #16507a);
  color: #fff; border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden;
}
.result-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 160px; height: 160px;
  border-radius: 50%; background: radial-gradient(circle, rgba(18,165,148,.5), transparent 70%);
}
.result-card__label { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #9db8cf; }
.result-card__value { font-size: clamp(26px, 4vw, 38px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0 2px; word-break: break-word; }
.result-card__rate { font-size: 13.5px; color: #b9cbdb; font-variant-numeric: tabular-nums; }
.result-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.result-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-btn {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff;
  border-radius: var(--radius-pill); padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.mini-btn:hover { background: rgba(255,255,255,.26); }
.mini-btn[disabled] { opacity: .5; cursor: not-allowed; }

.quick-amounts { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.quick-amounts button {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 8px; padding: 8px 12px;
  font-size: 13px; font-weight: 600; color: var(--graphite); cursor: pointer; font-variant-numeric: tabular-nums;
}
.quick-amounts button:hover { border-color: var(--teal); color: var(--teal-dark); }

.converter__foot { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.converter__error {
  display: none; margin-top: 14px; background: var(--down-bg); border: 1px solid #f3c9c9; color: #8f2f2f;
  border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px;
}
.converter__error.is-open { display: flex; align-items: center; gap: 12px; }
.converter__error .btn { margin-left: auto; }

.skeleton { background: linear-gradient(90deg, var(--mist) 25%, #f6f9fc 37%, var(--mist) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* reverse rate strip */
.reverse-strip { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.reverse-strip__item { background: var(--mist); border-radius: var(--radius); padding: 10px 12px; font-size: 12.5px; color: var(--muted); }
.reverse-strip__item b { display: block; color: var(--navy-800); font-size: 14.5px; font-variant-numeric: tabular-nums; }

/* ---------- Market cards ---------- */
.market-rail { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 14px; }
.market-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
}
.market-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.market-card__pair { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: var(--navy-800); }
.market-card__rate { font-size: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.market-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted-2); }
.market-card__spark { height: 34px; }

/* ---------- Sparkline / charts ---------- */
.spark { width: 100%; height: 100%; display: block; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.chart-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }

/* ---------- Rates table ---------- */
.rates-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.rates-toolbar__search { position: relative; flex: 1; min-width: 220px; }
.rates-toolbar__search input { width: 100%; padding: 11px 14px 11px 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); }
.rates-toolbar__search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
table.rates { width: 100%; border-collapse: collapse; min-width: 880px; }
table.rates th, table.rates td { padding: 13px 14px; text-align: right; border-bottom: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.rates th:first-child, table.rates td:first-child { text-align: left; }
table.rates th:nth-child(2), table.rates td:nth-child(2) { text-align: left; }
table.rates thead th {
  position: sticky; top: 0; background: var(--mist); color: var(--navy-700); font-size: 11.5px;
  letter-spacing: .06em; text-transform: uppercase; font-weight: 700; z-index: 2; cursor: pointer;
}
table.rates thead th:hover { color: var(--teal-dark); }
table.rates thead th .sort { opacity: .45; font-size: 10px; }
table.rates thead th.is-sorted .sort { opacity: 1; color: var(--teal-dark); }
table.rates tbody tr:hover { background: #fbfdff; }
table.rates .cur-cell { display: flex; align-items: center; gap: 10px; text-align: left; }
table.rates .cur-cell .flag-img { flex: none; }
table.rates .cur-cell b { color: var(--navy-800); font-size: 14px; }
table.rates .cur-cell small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.rank-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--mist); font-size: 12px; font-weight: 700; color: var(--navy-700); }

.table-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- News ---------- */
.lead-story { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--navy-900); color: #fff; cursor: pointer; border: 0; text-align: left; width: 100%; padding: 0; display: block; }
.lead-story__media { aspect-ratio: 16/9; }
.lead-story__media img { width: 100%; height: 100%; object-fit: cover; }
.lead-story__body {
  position: absolute; inset: auto 0 0 0; padding: 28px;
  background: linear-gradient(0deg, rgba(6,16,30,.95) 12%, rgba(6,16,30,.7) 52%, rgba(6,16,30,0) 100%);
}
.lead-story__body h3 { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 40px); color: #fff; margin: 10px 0; }
.lead-story__body p { color: #c3d3e2; max-width: 720px; margin: 0; }
.story-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #9fb4c8; }
.story-meta__sep { opacity: .55; }
.story-meta--dark { color: #c3d3e2; }
.article-hero .story-meta .tag { background: rgba(255,255,255,.14); color: #e9f1f8; }

/* Headlines section */
.story-col { min-width: 0; }
.story-col__title { font-family: var(--serif); font-size: 20px; line-height: 1.25; color: var(--navy-800); margin: 0 0 14px; }
.story-list--tight { margin-top: 22px; }

.story-list { display: grid; gap: 16px; }
.story-card {
  display: grid; grid-template-columns: 118px 1fr; gap: 14px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; text-align: left; width: 100%;
}
.story-card:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.story-card__media { border-radius: 8px; overflow: hidden; aspect-ratio: 1/1; }
.story-card__media img { width: 100%; height: 100%; object-fit: cover; }
.story-card h4 { font-size: 16px; color: var(--navy-800); line-height: 1.3; margin: 4px 0 6px; }
.story-card p { font-size: 13px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-card__foot { display: flex; gap: 10px; align-items: center; font-size: 11.5px; color: var(--muted-2); margin-top: 8px; flex-wrap: wrap; }
.story-card--text { grid-template-columns: 1fr; padding: 16px; }
.story-card--text .story-card__media { display: none; }
.story-card--text h4 { font-size: 17px; }

/* Section banner — the only large photographic moments on the page */
.section-banner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  margin: 0 0 26px; aspect-ratio: 21/9; background: var(--navy-800);
}
.section-banner img { width: 100%; height: 100%; object-fit: cover; }
.section-banner figcaption {
  position: absolute; inset: auto 0 0 0; margin: 0; padding: 18px 22px;
  background: linear-gradient(0deg, rgba(6,16,30,.88) 8%, rgba(6,16,30,.45) 60%, rgba(6,16,30,0) 100%);
  color: #d7e4f0; font-size: 12.5px;
}
.section-banner--navy figcaption { color: #cddbe8; }

.article-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  cursor: pointer; text-align: left; display: flex; flex-direction: column; padding: 0; width: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card__media { aspect-ratio: 16/10; background: var(--mist); }
.article-card__media img { width: 100%; height: 100%; object-fit: cover; }
.article-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-card h3 { font-family: var(--serif); font-size: 20px; color: var(--navy-800); line-height: 1.28; }
.article-card p { font-size: 14px; color: var(--muted); margin: 0; }
.article-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted-2); flex-wrap: wrap; }
.article-card--horizontal { flex-direction: row; }
.article-card--horizontal .article-card__media { aspect-ratio: auto; width: 46%; flex: none; }
.article-card--wide .article-card__media { aspect-ratio: 21/9; }
.article-card--text { border: 0; border-top: 3px solid var(--navy-800); border-radius: 0; box-shadow: none; padding-top: 16px; }
.article-card--text:hover { transform: none; box-shadow: none; }
.article-card--text .article-card__body { padding: 0; }

.section-stories { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }

/* ---------- Regions ---------- */
.region-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; -webkit-overflow-scrolling: touch; }
.region-panel { display: none; }
.region-panel.is-active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.region-head { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; margin-bottom: 22px; }
.region-head__media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/10; }
.region-head__media img { width: 100%; height: 100%; object-fit: cover; }
.region-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; }
.region-stats div b { display: block; font-size: 19px; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.region-stats div span { font-size: 12px; color: var(--muted); }

/* ---------- Spotlight ---------- */
.spotlight { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.spot-card {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 190px; cursor: pointer;
  border: 0; text-align: left; color: #fff; background: var(--navy-800); padding: 0; display: block;
}
.spot-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .48; }
.spot-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,19,36,.94), rgba(7,19,36,.28)); }
.spot-card__body { position: relative; z-index: 1; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 190px; }
.spot-card__code { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); font-weight: 700; }
.spot-card h3 { font-family: var(--serif); font-size: 21px; color: #fff; margin: 6px 0 4px; }
.spot-card p { font-size: 12.5px; color: #c3d3e2; margin: 0; }

/* ---------- Deep reads / magazine ---------- */
.feature-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--navy-800); color: #fff; }
.feature-hero__media { min-height: 340px; }
.feature-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.feature-hero__body { padding: 34px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.feature-hero__body h3 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); color: #fff; }
.feature-hero__body p { color: #bccddd; margin: 0; }

.read-list { display: grid; gap: 0; }
.read-item { display: grid; grid-template-columns: 54px 1fr auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; }
.read-item:hover h4 { color: var(--teal-dark); }
.read-item__idx { font-family: var(--serif); font-size: 26px; color: var(--line-strong); font-weight: 700; }
.read-item h4 { font-size: 17px; color: var(--navy-800); margin: 0 0 4px; }
.read-item p { margin: 0; font-size: 13px; color: var(--muted); }
.read-item__rt { font-size: 12px; color: var(--muted-2); white-space: nowrap; }

/* ---------- Digital markets ---------- */
.coin-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.coin-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.coin-card__top { display: flex; align-items: center; gap: 10px; }
.coin-card__logo { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 13px; }
.coin-card__price { font-size: 24px; font-weight: 800; margin: 10px 0 2px; font-variant-numeric: tabular-nums; color: var(--navy-800); }
.coin-bar { height: 8px; border-radius: 4px; background: var(--mist); overflow: hidden; margin-top: 6px; }
.coin-bar span { display: block; height: 100%; background: var(--teal); }

.checklist { display: grid; gap: 12px; }
.checklist li { display: flex; gap: 10px; font-size: 14px; color: var(--muted); list-style: none; }
.checklist li::before { content: "—"; color: var(--gold); font-weight: 700; flex: none; }
.risk-list li::before { content: "!"; color: var(--down); }

/* ---------- Editors' picks ---------- */
.pick-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
}
.pick-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: stretch; gap: 16px;
  height: 100%; width: 100%; padding: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-align: left; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.pick-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--teal); transform: scaleY(0); transform-origin: top;
  transition: transform .22s ease;
}
.pick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.pick-card:hover::before { transform: scaleY(1); }
.pick-card__rank {
  flex: none; width: 46px; padding-top: 1px;
  font-family: var(--serif); font-size: 27px; font-weight: 700; line-height: 1;
  color: var(--teal); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.pick-card__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.pick-card__meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted-2);
}
.pick-card__meta .tag { font-size: 10.5px; }
.pick-card h4 {
  margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.3; color: var(--navy-800);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pick-card p {
  margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Newsletter ---------- */
.newsletter { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input {
  flex: 1; min-width: 220px; padding: 13px 16px; border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff; font-size: 15px;
}
.newsletter input::placeholder { color: #9fb4c8; }
.newsletter input:focus { outline: none; border-color: var(--teal); background: rgba(255,255,255,.16); }
.form-note { flex-basis: 100%; margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; }
.form-note--ok { color: #8ce0cd; }
.form-note--err { color: #ffb4b4; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #9fb4c8; padding: 44px 0 22px; font-size: 14px; }
.footer-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-brand { max-width: 440px; }
.footer-tag { margin: 10px 0 12px; font-size: 13.5px; line-height: 1.6; color: #9fb4c8; }
.footer-mail { color: var(--gold-soft); font-size: 14px; font-weight: 600; word-break: break-all; }
.footer-mail:hover { color: #fff; }
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-link-btn {
  display: inline-flex; align-items: center; min-height: 42px; padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.24); border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06); color: #dbe7f2;
  font-size: 13.5px; font-weight: 600;
}
.footer-link-btn:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.42); color: #fff; text-decoration: none; }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #7d93a8; }

/* ---------- Article page ---------- */
.article-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--teal); width: 0; z-index: 120; transition: width .08s linear; }
.article-hero { background: var(--navy-800); color: #fff; }
.article-hero__inner { padding: 34px 0 40px; }
.article-hero h1 { font-family: var(--serif); font-size: clamp(28px, 4.4vw, 48px); color: #fff; margin: 14px 0; max-width: 900px; }
.article-hero__dek { font-size: clamp(16px, 2vw, 20px); color: #bccddd; max-width: 780px; }
.article-hero__media { aspect-ratio: 21/9; overflow: hidden; border-radius: var(--radius-lg); margin-top: 26px; }
.article-hero__media img { width: 100%; height: 100%; object-fit: cover; }
figcaption { font-size: 12.5px; color: var(--muted-2); margin-top: 8px; }

.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 44px; align-items: start; }
.article-body { font-size: 18px; line-height: 1.75; color: #24313f; max-width: 720px; }
.article-body h2 { font-family: var(--serif); font-size: 27px; color: var(--navy-800); margin: 34px 0 12px; }
.article-body h3 { font-size: 20px; color: var(--navy-800); margin: 26px 0 10px; }
.article-body p { margin: 0 0 1.15em; }
.article-body ul, .article-body ol { margin: 0 0 1.2em 1.2em; }
.article-body li { margin-bottom: .5em; }
.article-body blockquote {
  margin: 26px 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--teal);
  font-family: var(--serif); font-size: 21px; color: var(--navy-800); font-style: italic;
}
.article-body figure { margin: 28px 0; }
.article-body figure img { border-radius: var(--radius); }

.keyfacts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: 26px 0; }
.keyfact { background: var(--mist); border-radius: var(--radius); padding: 14px; }
.keyfact b { display: block; font-size: 21px; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.keyfact span { font-size: 12.5px; color: var(--muted); }

.article-side { position: sticky; top: calc(var(--header-h) + 18px); display: grid; gap: 20px; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.side-card h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc { display: grid; gap: 8px; font-size: 14px; }
.toc button { background: none; border: 0; padding: 0; text-align: left; color: var(--graphite); cursor: pointer; font-size: 14px; }
.toc button:hover { color: var(--teal-dark); }
.side-mini { display: grid; gap: 12px; }
.side-mini__item { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: center; cursor: pointer; text-align: left; background: none; border: 0; padding: 0; width: 100%; }
.side-mini__item img { width: 62px; height: 48px; object-fit: cover; border-radius: 6px; }
.side-mini__item b { font-size: 13px; color: var(--navy-800); line-height: 1.35; display: block; }

.source-note { background: var(--mist); border-radius: var(--radius); padding: 16px; font-size: 13px; color: var(--muted); }
.source-note b { color: var(--navy-800); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted-2); flex-wrap: wrap; }
.breadcrumb button { background: none; border: 0; padding: 0; color: var(--muted-2); cursor: pointer; font-size: 12.5px; }
.breadcrumb button:hover { color: var(--teal-dark); }
.breadcrumb--light button, .breadcrumb--light span { color: #8fa6bb; }

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--navy-800); color: #fff; }
.page-head__inner { padding: 30px 0 36px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(28px, 4vw, 44px); color: #fff; margin: 12px 0 10px; }
.page-head p { color: #b9cbdb; max-width: 720px; margin: 0; font-size: 17px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 150;
  background: var(--navy-800); color: #fff; border-radius: var(--radius-pill); padding: 12px 22px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 22px; z-index: 100; width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy-800); color: #fff; border: 0; cursor: pointer; display: none; place-items: center;
  box-shadow: var(--shadow-md);
}
.to-top.is-open { display: grid; }

/* ---------- Language switch ---------- */
.lang-switch {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 4px 0 12px; flex: none;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  background: #fff; color: var(--graphite);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lang-switch:hover { border-color: var(--teal); }
.lang-switch:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.16); }
.lang-switch__ico { width: 16px; height: 16px; opacity: .7; flex: none; }
.lang-switch select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-color: transparent; border: 0; outline: none; color: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer;
  max-width: 132px; padding: 8px 22px 8px 2px; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 11px) 52%, calc(100% - 7px) 52%;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}
.lang-switch select option { color: #16202c; background: #fff; }
[data-theme="dark"] .lang-switch { background: #0d1c33; border-color: var(--line-strong); color: #dbe7f2; }
[data-theme="dark"] .lang-switch select option { color: #e7eef6; background: #0d1c33; }

/* ---------- Google Translate plumbing (widget is kept off-screen) -------- */
#google_translate_element {
  position: fixed !important; left: -9999px !important; top: 0 !important;
  width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none;
}
body { top: 0 !important; }
body > .skiptranslate,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate { display: none !important; }
#goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font { background: transparent !important; }

/* ---------- Utilities ---------- */
.stack-8 > * + * { margin-top: 8px; }.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hide { display: none !important; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   Horizontal-overflow safety (mobile)
   Prevents the page from being dragged left / right on narrow screens.
   `overflow-x: clip` is used after `hidden` as a modern fallback that does
   not create a scroll container, so the sticky header keeps working.
   ========================================================================== */
html { overflow-x: hidden; overflow-x: clip; }
body { overflow-x: hidden; overflow-x: clip; overflow-wrap: break-word; }

.hero__grid > *, .grid > *, .section-stories > *, .article-layout > *,
.region-head > *, .newsletter > *, .market-rail > *, .spotlight > *,
.coin-grid > *, .pick-row > *, .read-item > *, .story-card > *,
.article-card > *, .side-mini__item > *, .pick-card > *, .story-meta > *,
.region-stats > *, .article-body > *, .table-pager > * { min-width: 0; }

.toast { max-width: min(92vw, 420px); white-space: normal; text-align: center; }
.converter__tab { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chart-tip { max-width: 84vw; }
.article-body, .side-card, .story-card h4, .read-item h4,
.pick-card h4, .article-card h3, .market-card__pair { overflow-wrap: break-word; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr; gap: 30px; }
  .market-rail { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .spotlight, .coin-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .article-layout { grid-template-columns: 1fr; }
  .article-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pick-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .section { padding: 42px 0; }
  .nav { display: none; }
  .section-banner { aspect-ratio: 16/9; margin-bottom: 20px; }
  .pick-card { padding: 16px; gap: 14px; }
  .pick-card__rank { width: 38px; font-size: 24px; }
  .pick-card h4 { font-size: 17px; }
  .pick-card p { font-size: 13px; }
  .grid--3, .grid--news, .section-stories { grid-template-columns: 1fr; }
  .story-col + .story-col { margin-top: 2px; }
  .story-col + .story-col .story-col__title { padding-top: 18px; border-top: 1px solid var(--line); }
  .lead-story__body { padding: 20px 18px; }
  .feature-hero { grid-template-columns: 1fr; }
  .feature-hero__media { min-height: 220px; aspect-ratio: 16/9; }
  .region-head { grid-template-columns: 1fr; }
  .newsletter { grid-template-columns: 1fr; }
  .lead-story__body { position: relative; padding: 20px; }
  .lead-story__media { aspect-ratio: 4/3; }
  .article-card--horizontal { flex-direction: column; }
  .article-card--horizontal .article-card__media { width: 100%; aspect-ratio: 16/10; }
  .keyfacts { grid-template-columns: 1fr; }
  .article-body { font-size: 17px; }
}

@media (max-width: 640px) {
  :root { --header-h: 58px; }
  .wrap { padding: 0 16px; }
  .market-rail { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .market-card__rate { font-size: 19px; }
  .spotlight, .coin-grid, .grid--4, .grid--2, .pick-row { grid-template-columns: 1fr; }
  .pick-row { grid-auto-rows: auto; gap: 12px; }
  .pick-card { padding: 16px 14px; gap: 12px; }
  .pick-card__rank { width: 32px; font-size: 21px; }
  .pick-card h4 { font-size: 16.5px; -webkit-line-clamp: 4; }
  .pick-card p { font-size: 13px; -webkit-line-clamp: 4; }
  .footer-grid { grid-template-columns: 1fr; }
  .field__row { flex-direction: column; }
  .combo { min-width: 0; width: 100%; }
  .combo__pop { width: 100%; left: 0; right: auto; }
  .reverse-strip { grid-template-columns: 1fr; }
  .story-card { grid-template-columns: 96px 1fr; }
  .story-meta { gap: 8px 10px; font-size: 12px; }
  .story-meta__sep { display: none; }
  .lead-story__media { aspect-ratio: 16/10; }
  .lead-story__body h3 { font-size: 22px; }
  .lead-story__body p { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .story-list { gap: 10px; }
  .story-list--tight { margin-top: 16px; }
  .story-card--text { padding: 14px; }
  .story-card--text h4 { font-size: 16px; }
  .story-card p { font-size: 13px; }
  .story-card__foot { gap: 8px; font-size: 11px; }
  .story-col + .story-col .story-col__title { padding-top: 14px; }
  .lang-switch { height: 36px; padding: 0 2px 0 10px; }
  .lang-switch__ico { display: none; }
  .lang-switch select { max-width: 100px; font-size: 12px; padding: 8px 20px 8px 2px; }
  .footer-links { width: 100%; }
  .footer-link-btn { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .hero__inner { padding: 34px 0 32px; }
  .converter { padding: 18px 16px; }
  .converter__tab { font-size: 11.5px; padding: 9px 4px; }
  .to-top { right: 14px; bottom: 14px; }
  .read-item { grid-template-columns: 34px 1fr; }
  .read-item__rt { display: none; }
}

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

/* ==========================================================================
   In-page overlay panel (articles, currency pages, information pages)
   ========================================================================== */
.overlay {
  position: fixed; inset: 0; z-index: 130; background: var(--paper);
  display: none; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.overlay.is-open { display: block; }
.overlay__bar {
  position: sticky; top: 0; z-index: 3; padding: 10px 0;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .overlay__bar { background: rgba(8,20,38,.95); }
.overlay__panel { min-height: 60vh; }
html.is-locked, body.is-locked { overflow: hidden; }
.toc-link { display: block; color: var(--graphite); font-size: 14px; }
.toc-link:hover { color: var(--teal-dark); }
.chart-tip {
  position: absolute; pointer-events: none; background: #0b1f3a; color: #fff;
  padding: 7px 11px; border-radius: 8px; font-size: 12px; opacity: 0;
  transform: translate(-50%, -140%); white-space: nowrap; transition: opacity .12s ease;
}
[id] { scroll-margin-top: 78px; }

@media (max-width: 640px) {
  [id] { scroll-margin-top: 66px; }
  .overlay__bar { padding: 8px 0; }
}

/* ==========================================================================
   Dark theme
   ========================================================================== */
[data-theme="dark"] {
  --ink: #e7eef6;
  --graphite: #cbd8e6;
  --muted: #94a7ba;
  --muted-2: #7c8fa3;
  --line: #1e2f47;
  --line-strong: #2c4059;
  --paper: #081426;
  --warm: #0b1a2f;
  --mist: #101f37;
  --mist-2: #152743;
  --navy-800: #e9f1f8;
  --navy-700: #c9dcec;
  --navy-600: #a9c4dc;
  --gold-soft: #e0c884;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 26px rgba(0,0,0,.45);
}
[data-theme="dark"] body { background: var(--paper); color: var(--ink); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { color: inherit; }
[data-theme="dark"] .site-header { background: rgba(8,20,38,.94); border-bottom-color: var(--line); }
[data-theme="dark"] .mobile-nav, [data-theme="dark"] .search-panel { background: #0b1a2f; border-color: var(--line); }
[data-theme="dark"] .icon-btn,
[data-theme="dark"] .chip,
[data-theme="dark"] .quick-amounts button,
[data-theme="dark"] .article-card,
[data-theme="dark"] .story-card,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .side-card,
[data-theme="dark"] .coin-card,
[data-theme="dark"] .pick-card,
[data-theme="dark"] .table-wrap,
[data-theme="dark"] .search-result,
[data-theme="dark"] .converter,
[data-theme="dark"] .combo__btn,
[data-theme="dark"] .combo__pop,
[data-theme="dark"] .combo__search,
[data-theme="dark"] .amount-input,
[data-theme="dark"] .rates-toolbar__search input,
[data-theme="dark"] .market-card { background: #0d1c33; border-color: var(--line-strong); }
[data-theme="dark"] .section--warm { background: #0b1a2f; }
[data-theme="dark"] .section--mist { background: #0e1e36; }
[data-theme="dark"] .section--navy,
[data-theme="dark"] .page-head,
[data-theme="dark"] .article-hero { background: #061224; }
[data-theme="dark"] .site-footer { background: #050e1c; }
[data-theme="dark"] .btn { background: #1b4774; color: #fff; }
[data-theme="dark"] .btn:hover { background: #22578c; }
[data-theme="dark"] .btn--ghost { background: transparent; color: #e7eef6; border-color: var(--line-strong); }
[data-theme="dark"] .btn--ghost:hover { background: #12233c; }
[data-theme="dark"] .chip.is-active, [data-theme="dark"] .chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #032420; }
[data-theme="dark"] .result-card { background: linear-gradient(140deg, #12335a, #1b4774 70%, #16507a); }
[data-theme="dark"] table.rates thead th { background: #101f37; }
[data-theme="dark"] table.rates tbody tr:hover { background: #0e1e36; }
[data-theme="dark"] .datastatus { background: #101f37; border-color: var(--line-strong); }
[data-theme="dark"] .datastatus--demo { background: #1d1a0e; border-color: #4a4020; color: #dcc98a; }
[data-theme="dark"] .tag { background: #16263f; color: #cfe0f0; }
[data-theme="dark"] .tag--teal { background: rgba(18,165,148,.18); color: #79e2d2; }
[data-theme="dark"] .tag--gold { background: rgba(201,162,39,.2); color: #e6cf8e; }
[data-theme="dark"] .keyfact, [data-theme="dark"] .reverse-strip__item, [data-theme="dark"] .source-note { background: #101f37; }
[data-theme="dark"] .article-body { color: #cfdcea; }
[data-theme="dark"] .article-body blockquote { color: #e9f1f8; }
[data-theme="dark"] .combo__opt:hover, [data-theme="dark"] .combo__opt.is-active { background: #16263f; }
[data-theme="dark"] .combo__opt b, [data-theme="dark"] .search-result b { color: #eef5fb; }
[data-theme="dark"] .nav__link:hover { background: #12233c; }
[data-theme="dark"] .to-top { background: #1b4774; }
[data-theme="dark"] .read-item { border-bottom-color: var(--line); }
[data-theme="dark"] .read-item__idx { color: #24384f; }
[data-theme="dark"] .chart-legend { color: var(--muted); }
