/* ==========================================================================
   LONGSTAY — cobalt / dark skin
   --------------------------------------------------------------------------
   Dark canvas, one cobalt blue block colour, oversized white display type,
   generous radii, pill controls, and a device frame that shows the product
   UI in light mode. Everything is driven by the tokens in §01.
   ========================================================================== */

/* 01. TOKENS ============================================================== */
:root {
  /* surfaces */
  --bg: #1a1a1c;
  --bg-2: #212124;
  --bg-3: #2a2a2e;
  --bg-4: #303036;
  --panel: #0c0c0d;

  /* the one accent */
  --blue: #2b46f0;
  --blue-2: #1f36cc;
  --blue-3: #7284ff;
  --blue-soft: rgba(43, 70, 240, .18);

  /* ink */
  --fg: #f6f6f8;
  --fg-2: #c7c7cf;
  --muted: #8e8e9a;
  --muted-2: #8a8a96;

  /* lines */
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --line-3: rgba(255, 255, 255, .3);

  /* light screen (the device mock) */
  --screen: #f3f3f5;
  --screen-2: #ffffff;
  --screen-ink: #14141a;
  --screen-muted: #6c6c78;
  --screen-line: rgba(0, 0, 0, .1);

  /* semantics */
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;

  /* type */
  --display: "Inter Tight", "Inter", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --sans: "Inter", "Inter Tight", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* metrics */
  --wrap: 1280px;
  --gut: 40px;
  --nav-h: 68px;
  --r: 22px;
  --r-md: 16px;
  --r-sm: 10px;
  --r-pill: 999px;
}

/* 02. RESET / BASE ======================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; }

::selection { background: var(--blue); color: #fff; }

:focus-visible { outline: 2px solid var(--blue-3); outline-offset: 3px; }

/* 03. TYPE HELPERS ======================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}
.eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-3);
  flex: none;
}
.hero-panel .eyebrow,
.hero-top .eyebrow { color: rgba(255, 255, 255, .66); }
.hero-panel .eyebrow::before { background: #fff; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tiny { font-size: 10px; line-height: 1.5; }
.small { font-size: 13px; line-height: 1.62; color: var(--muted); }
.dim { color: var(--muted-2); }
.mint {
  background: var(--blue);
  color: #fff;
  padding: 1px 7px;
  border-radius: 6px;
  display: inline-block;
}

.h-display {
  font-family: var(--display);
  font-size: clamp(38px, 5.4vw, 74px);
  line-height: .94;
  letter-spacing: -.035em;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  text-wrap: balance;
}
.h-display em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px #fff;
}
@supports not (-webkit-text-stroke: 1px #fff) {
  .h-display em { color: #dfe4ff; }
}
.h-sec {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.06;
  letter-spacing: -.03em;
  font-weight: 700;
  color: var(--fg);
}

.lede {
  font-size: 15px;
  line-height: 1.62;
  color: var(--fg-2);
  max-width: 58ch;
}
.hero-panel .lede { color: rgba(255, 255, 255, .78); }
.hero-panel .lede strong { color: #fff; font-weight: 600; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg);
  border-bottom: 1px solid var(--line-3);
  padding-bottom: 3px;
  transition: color .18s, border-color .18s;
}
.link span { transition: transform .2s; }
.link:hover { color: var(--blue-3); border-color: var(--blue-3); }
.link:hover span { transform: translateX(3px); }

/* 04. LAYOUT ============================================================== */
.wrap {
  width: min(var(--wrap), calc(100% - var(--gut) * 2));
  margin: 0 auto;
}

.section { padding: 78px 0; }
.section.tight { padding: 40px 0 78px; }

.hr {
  width: min(var(--wrap), calc(100% - var(--gut) * 2));
  height: 1px;
  margin: 0 auto;
  background: var(--line);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.grid-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.sec-num {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  padding: 0 9px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
}
.sec-sub {
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.68;
  color: var(--muted);
  margin-bottom: 30px;
}

/* 05. NAV ================================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(26, 26, 28, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  width: min(var(--wrap), calc(100% - var(--gut) * 2));
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--blue);
  color: #fff;
  border-radius: 9px;
}
.brand-word {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--fg);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: var(--r-pill);
  transition: color .16s, background .16s;
}
.nav-links a:hover { color: var(--fg); background: var(--bg-2); }
.nav-links a.on { color: #fff; background: var(--bg-3); }
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-verified {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
.nav-verified i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
}
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 32px;
  padding: 8px 6px;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
}

.langsw {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: 2px;
  flex: none;
}
.langsw a {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  color: var(--muted);
  line-height: 1.5;
}
.langsw a.on { background: var(--fg); color: #111; }

/* 06. HERO ================================================================ */
.hero { padding: 26px 0 0; }

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
}
.hero-top .tiny { color: var(--muted-2); letter-spacing: .12em; text-transform: uppercase; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

/* the cobalt block */
.hero-panel {
  background: var(--blue);
  color: #fff;
  border-radius: var(--r);
  padding: 30px 34px 34px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  min-height: 486px;
}
.panel-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .92);
}
.panel-kicker span:last-child { color: rgba(255, 255, 255, .92); }
.hp-mid {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
}
.hero-panel .h-display { margin-bottom: 0; }
.hero-panel .lede { max-width: 44ch; font-size: 14.5px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* device frame */
.hero-device { display: flex; }
.device {
  flex: 1;
  background: var(--panel);
  border-radius: 28px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.device-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 12px;
}
.device-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  display: block;
}
.device-bar i:first-child { background: var(--blue-3); }
.device-bar span {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .62);
}
.screen {
  flex: 1;
  background: var(--screen);
  color: var(--screen-ink);
  border-radius: 20px;
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}
.scr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--screen-muted);
}
.scr-head b {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--screen-ink);
  font-weight: 600;
}
.scr-body { display: flex; flex-direction: column; gap: 14px; }

/* stat rows live inside the light screen */
.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--screen-line);
}
.stat-row:last-child { border-bottom: 0; }
.stat-row .k {
  font-size: 12px;
  color: var(--screen-muted);
  line-height: 1.35;
}
.stat-row .v {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--screen-ink);
}
.stat-row .v.mint { color: #fff; }

.hero-widget { margin-top: 2px; }
.hero-widget label {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--screen-muted);
  margin-bottom: 8px;
}
.income-field {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: var(--r-sm);
  padding: 0 12px;
  height: 44px;
  background: var(--screen-2);
}
.income-field > span:first-child {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--screen-muted);
}
.income-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--screen-ink);
  outline: none;
  -moz-appearance: textfield;
}
.income-field input::-webkit-outer-spin-button,
.income-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.income-field .tiny { color: var(--screen-muted); }

.hw-out {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.hw-big {
  font-family: var(--display);
  font-size: 46px;
  line-height: .82;
  letter-spacing: -.05em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--screen-ink);
}
.hw-txt {
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.55;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--screen-muted);
}
.hw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.hw-lab {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--screen-muted);
}

/* mosaic under the hero */
.hero-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.mosaic-cell {
  grid-column: span 2;
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  min-height: 96px;
  background: var(--bg-2);
  transition: background .18s;
}
.mosaic-cell:hover { background: var(--bg-3); }

.m-links { padding: 0; gap: 0; }
.m-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg);
}
.m-links a + a { border-top: 1px solid var(--line); }
.m-links a span { color: var(--blue-3); transition: transform .2s; }
.m-links a:hover span { transform: translateX(4px); }

.m-count {
  background: var(--blue);
  color: #fff;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.m-count:hover { background: var(--blue-2); }
.mc-n {
  font-family: var(--display);
  font-size: 52px;
  line-height: .78;
  letter-spacing: -.05em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mc-l {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-align: right;
  line-height: 1.5;
  padding-bottom: 4px;
  color: rgba(255, 255, 255, .8);
}

.hero-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 18px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted-2);
  max-width: 74ch;
}
.hero-note svg { flex: none; margin-top: 1px; color: var(--blue-3); }

/* 07. TICKER ============================================================== */
.ticker { margin-top: 26px; }
.ticker-in {
  width: min(var(--wrap), calc(100% - var(--gut) * 2));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  background: var(--bg-2);
  border-radius: var(--r-pill);
}
.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.ticker-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-3);
  display: inline-block;
}
.ticker-list {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  min-width: 0;
}
.ticker-list a {
  font-size: 12px;
  color: var(--muted);
  padding: 0 16px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
  transition: color .16s;
}
.ticker-list a:first-child { border-left: 0; padding-left: 0; }
.ticker-list a b { color: var(--fg); font-weight: 500; }
.ticker-list a:hover { color: var(--fg); }

/* 08. TILES =============================================================== */
.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 176px;
  padding: 18px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  transition: background .18s;
}
.tile:hover { background: var(--bg-3); }
.tile-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.tile-name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-visa {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-num {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tile-num small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-left: 3px;
}
.tile-meta {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: auto;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.tile-meta > div {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tile-meta b {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  font-weight: 500;
  white-space: nowrap;
}

/* 09. FIELD-GROUP CARDS =================================================== */
.gcard {
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
}
.gcard-n {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.gcard h3 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.1;
  margin: 8px 0 4px;
}
.gcard .q {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.gcard ul { margin-top: auto; }
.gcard li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--fg-2);
}
.gcard li:last-child { border-bottom: 0; padding-bottom: 0; }

/* 10. CARDS / ROWS ======================================================== */
.card {
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 20px;
}
.card-hover { transition: background .18s; }
.card-hover:hover { background: var(--bg-3); }

.rows { display: block; }
.row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.row:last-child { border-bottom: 0; }
.row-k {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.row-k.mono {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--muted-2);
}
.row-v {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg);
}
.row-v .sub {
  display: block;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
  margin-top: 3px;
}
.row-v .hl {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  padding: 2px 7px;
}
.row-v .no { color: var(--muted); }

/* 11. CHIPS =============================================================== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: transparent;
  transition: background .16s, color .16s, border-color .16s;
}
.chip:hover { border-color: var(--line-3); color: var(--fg); }
.chip.on { background: var(--fg); border-color: var(--fg); color: #111; }
.chip .c {
  font-size: 9px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.chip.on .c { color: rgba(0, 0, 0, .55); }
.chip .cc { border: 0; padding: 0; width: auto; height: auto; background: none; }
/* inside the light screen */
.screen .chip {
  background: var(--screen-2);
  border-color: rgba(0, 0, 0, .14);
  color: #2a2a33;
  font-size: 9px;
  padding: 5px 10px;
}
.screen .chip:hover { border-color: rgba(0, 0, 0, .3); color: #111; }
.screen .chip .cc { color: var(--screen-muted); border: 0; }

/* 12. BUTTONS ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: background .16s, color .16s, border-color .16s;
  white-space: nowrap;
}
.btn::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
  opacity: .55;
}
.btn-sm { padding: 9px 15px; font-size: 9px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--fg); color: #111; border-color: var(--fg); }
.btn-primary::before { background: var(--blue); opacity: 1; }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover::before { background: #fff; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--fg); background: var(--fg); color: #111; }
/* on the cobalt block the primary flips to white-on-blue */
.hero-panel .btn-primary { background: #fff; border-color: #fff; color: #111; }
.hero-panel .btn-primary::before { background: var(--blue); }
.hero-panel .btn-primary:hover { background: #111; border-color: #111; color: #fff; }
.hero-panel .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .42); }
.hero-panel .btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }
.cta .btn-primary { background: #fff; border-color: #fff; color: #111; }
.cta .btn-primary:hover { background: #111; border-color: #111; color: #fff; }

/* 13. CTA BAND ============================================================ */
.cta {
  background: var(--blue);
  color: #fff;
  border-radius: var(--r);
  padding: 46px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
}
.cta h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.04;
  letter-spacing: -.03em;
  font-weight: 800;
  max-width: 20ch;
}
.cta p {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .78);
  max-width: 52ch;
}

/* 14. FOOTER ============================================================== */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding: 46px 0 26px;
}
.foot-in {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding-bottom: 34px;
}
.foot-brand .brand-word {
  font-size: 20px;
  display: block;
  margin-bottom: 10px;
}
.foot-brand p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 40ch;
}
.foot-col h5 {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
  margin-bottom: 12px;
}
.foot-col a {
  display: block;
  font-size: 12.5px;
  color: var(--fg-2);
  padding: 4px 0;
  transition: color .16s;
}
.foot-col a:hover { color: var(--fg); }
.foot-legal {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: start;
}
.foot-legal p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
  max-width: 92ch;
}
.foot-legal .r {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

/* 15. PAGE HEAD =========================================================== */
.phead { padding: 44px 0 34px; }
.phead .eyebrow {
  margin-bottom: 20px;
  padding: 6px 13px 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  color: var(--fg-2);
}
.phead h1 {
  font-family: var(--display);
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: .98;
  letter-spacing: -.04em;
  font-weight: 800;
  max-width: 20ch;
  margin-bottom: 18px;
  text-wrap: balance;
}
.phead .lede { max-width: 64ch; font-size: 14.5px; }
.phead-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}
.phead-row h1 { margin-bottom: 0; }
.phead-row .stats {
  display: flex;
  gap: 30px;
  flex: none;
  padding-bottom: 4px;
}
.phead-row .stats > div { display: flex; flex-direction: column; gap: 7px; }
.phead-row .stats .tiny {
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.num {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.form-note { color: var(--ok); }

/* 16. FILTERS (browse) ==================================================== */
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 24px;
  padding: 22px;
  background: var(--bg-2);
  border-radius: var(--r-md);
}
.f-field { min-width: 0; }
.f-field.wide { grid-column: span 2; }
.f-lab {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.f-lab .val {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--fg);
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
.inp {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 13px;
  color: var(--fg);
  border-radius: var(--r-sm);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color .16s, background .16s;
}
.inp:hover { border-color: var(--line-3); }
.inp:focus { border-color: var(--blue-3); background: #16161a; }
.inp::placeholder { color: var(--muted-2); }
select.inp {
  background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%), linear-gradient(135deg, var(--fg) 50%, transparent 50%);
  background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: none;
  outline: none;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--blue) var(--pct, 100%), rgba(255, 255, 255, .12) var(--pct, 100%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  background: #fff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px var(--blue-soft);
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--blue); }
input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  cursor: pointer;
}

.toggles {
  display: flex;
  align-items: center;
  gap: 22px;
  grid-column: span 2;
  flex-wrap: wrap;
  align-self: end;
  padding-bottom: 12px;
}
.tg {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--fg-2);
  cursor: pointer;
  user-select: none;
}
.tg input { position: absolute; opacity: 0; pointer-events: none; }
.tg .box {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-3);
  border-radius: 6px;
  background: transparent;
  position: relative;
  flex: none;
  transition: background .16s, border-color .16s;
}
.tg input:checked + .box { background: var(--blue); border-color: var(--blue); }
.tg input:checked + .box::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2.5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(42deg);
}
.tg input:focus-visible + .box { outline: 2px solid var(--blue-3); outline-offset: 2px; }

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 12px;
}
.results-count { font-size: 12.5px; color: var(--muted); }
.results-count b {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg);
  font-weight: 600;
}
.results-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}
.results-sort .inp { width: auto; height: 36px; font-size: 12px; }

/* 17. DATA TABLE (browse) ================================================= */
.dtable {
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 0 20px;
}
.dhead, .drow {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, .82fr)) minmax(0, .9fr) 34px;
  gap: 14px;
  align-items: center;
}
.dhead {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.drow {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: background .14s;
}
.drow:last-child { border-bottom: 0; }
.drow:hover { background: rgba(255, 255, 255, .03); }
.dc {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.dname {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.dvisa {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dval {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.dval .dv { display: inline-block; }
.dval.strong .dv {
  background: var(--blue);
  color: #fff;
  border-radius: 6px;
  padding: 3px 7px;
  font-weight: 500;
}
.dval.dim { color: var(--muted-2); font-size: 11px; }
.dpick {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  transition: all .16s;
}
.dpick:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.empty {
  padding: 60px 0;
  text-align: center;
}
.empty h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto 18px;
  line-height: 1.6;
}

.tip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  font-size: 12px;
  line-height: 1.62;
  color: var(--muted);
}
.tip svg { flex: none; margin-top: 2px; color: var(--blue-3); }
.tip b { color: var(--fg); font-weight: 600; }
.tip em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--fg); }
.tip .mono { color: var(--fg); }

/* 18. COMPARE TRAY ======================================================== */
.tray {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 160%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  transition: transform .28s cubic-bezier(.3, .8, .3, 1);
  max-width: calc(100% - 32px);
}
.tray.show { transform: translate(-50%, 0); }
.tray-sel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.tray-sel .cc { border-color: var(--line-2); color: var(--fg); }
.vs-sep {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 0 7px;
}
.tray .btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.tray .btn-primary::before { background: #fff; }
.tray .btn-primary:hover { background: #fff; border-color: #fff; color: #111; }
.tray .btn-primary:hover::before { background: var(--blue); }
.tray-x {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9a9aa6;
  padding: 8px 10px;
  border-radius: var(--r-pill);
}
.tray-x:hover { color: var(--fg); background: rgba(255, 255, 255, .06); }

/* 19. COMPARE ============================================================= */
.cmp-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  padding: 22px;
  background: var(--bg-2);
  border-radius: var(--r-md);
}
.cmp-swap {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--fg-2);
  transition: all .16s;
}
.cmp-swap:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.verdict {
  margin-top: 20px;
  padding: 24px 26px;
  background: var(--blue);
  border-radius: var(--r-md);
  color: #fff;
}
.verdict .k {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .9);
  margin-bottom: 12px;
}
.verdict ul { display: grid; gap: 8px; }
.verdict li {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .84);
  padding-left: 18px;
  position: relative;
}
.verdict li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
}
.verdict li b { color: #fff; font-weight: 600; }
.verdict .link { color: #fff; border-color: rgba(255, 255, 255, .45); }
.verdict .link:hover { color: #111; border-color: #fff; background: #fff; }

.cmp {
  margin-top: 24px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 4px 22px 10px;
}
.cmp-head {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--line-2);
  align-items: center;
}
.cmp-head .lbl {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.cmp-hc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cmp-hc .nm {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.cmp-hc .vs {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 2px;
}
.cmp-sec {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 20px 0 8px;
  align-items: baseline;
}
.cmp-sec > div:first-child {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.cmp-sec .q {
  font-size: 11.5px;
  color: var(--muted-2);
  font-family: var(--mono);
  letter-spacing: .04em;
}
.cmp-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.cmp-row .cl {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cmp-row .cv {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-2);
  min-width: 0;
}
.cmp-row .cv.win {
  color: #fff;
  font-weight: 500;
  justify-self: start;
  max-width: 100%;
  padding: 1px 8px;
  margin-left: -8px;
  border-radius: 5px;
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px rgba(91, 112, 255, .3);
}
.cmp-row .cv.na { color: var(--muted-2); }

/* 20. ELIGIBILITY ========================================================= */
.elig-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding-top: 26px;
}
.elig-form {
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 22px;
  position: sticky;
  top: calc(var(--nav-h) + 18px);
}
.elig-form .f-field + .f-field { margin-top: 16px; }
.elig-form .f-lab { margin-bottom: 7px; }
/* dark variant of the numeric field — the light one belongs to the device mock */
.elig-form .income-field {
  background: var(--panel);
  border-color: var(--line-2);
}
.elig-form .income-field > span:first-child { color: var(--muted); }
.elig-form .income-field input { color: var(--fg); }
.elig-form .income-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.elig-out-top {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-2);
}
.elig-big {
  font-family: var(--display);
  font-size: 68px;
  line-height: .78;
  letter-spacing: -.055em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.elig-big small {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--muted-2);
  font-weight: 400;
}
.elig-out-top .t {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  padding-bottom: 4px;
}
.elig-out-top .t b {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg);
  font-weight: 600;
}
.elig-tabs {
  display: flex;
  gap: 6px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.etab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all .16s;
}
.etab span {
  font-size: 9px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.etab:hover { color: var(--fg); border-color: var(--line-3); }
.etab.on { color: #111; background: var(--fg); border-color: var(--fg); }
.etab.on span { background: var(--blue); color: #fff; padding: 1px 5px; border-radius: 5px; }

.erow {
  display: grid;
  grid-template-columns: 30px minmax(0, 1.5fr) minmax(0, 1.2fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition: background .14s;
}
.erow:hover { background: rgba(255, 255, 255, .03); }
.erow .idx {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.erow .who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.erow .who .nm {
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.erow .who .vs {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.erow .bar {
  height: 4px;
  background: rgba(255, 255, 255, .1);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.erow .bar i {
  position: absolute;
  inset: 0;
  background: var(--blue);
  border-radius: 2px;
  transform-origin: left center;
  transition: transform .5s cubic-bezier(.3, .8, .3, 1);
}
.erow.miss .bar i { background: var(--line-3); }
.erow .delta {
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  white-space: nowrap;
}
.erow .delta.miss { color: var(--bad); }
.elig-form .btn { margin-top: 18px; }

/* 21. RANKINGS ============================================================ */
.rank-board {
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 20px 20px 14px;
}
.rank-board .k {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.rank-board h3 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin: 7px 0 5px;
}
.rank-board .sub {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.rrow {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0 15px;
  position: relative;
  border-bottom: 0;
}
/* faint track + cobalt fill = a bar chart drawn as underlines */
.rrow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .13);
}
.rrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  width: var(--w, 0%);
  background: var(--blue);
  transition: width .6s cubic-bezier(.3, .8, .3, 1);
}
.rrow .n {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.rrow .nm {
  font-size: 12.5px;
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rrow .nm b { font-weight: 600; color: var(--fg); }
.rrow .v {
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}
.rrow:hover .v { color: var(--fg); }

/* 22. CHANGES ============================================================= */
.month { margin-bottom: 34px; }
.month-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 2px;
}
.month-h .m {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.03em;
}
.month-h .c {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.chg {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  transition: background .14s;
}
.chg:hover { background: rgba(255, 255, 255, .03); }
.chg-d {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.chg-b .top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.chg-b .nm {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.chg-b .fld {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: 2px 8px;
}
.chg-b .diff {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.chg-b .from {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--muted-2);
  text-decoration-thickness: 1px;
}
.chg-b .arrow { color: var(--muted-2); }
.chg-b .to {
  background: var(--blue);
  color: #fff;
  border-radius: 6px;
  padding: 2px 7px;
}
.chg-b p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 76ch;
}

/* 23. COUNTRY PAGE ======================================================== */
.c-banner {
  padding: 14px 18px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 20px;
  border-radius: var(--r-sm);
}
.c-banner.warn { background: rgba(251, 191, 36, .12); color: var(--warn); }
.c-banner.bad { background: rgba(248, 113, 113, .12); color: var(--bad); }

.c-head { padding: 26px 0 26px; }
.c-head-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.c-head-top .tiny { color: var(--muted-2); letter-spacing: .12em; text-transform: uppercase; }
.c-title {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 76px);
  line-height: .9;
  letter-spacing: -.045em;
  font-weight: 800;
}
.c-visa {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
}
.c-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}
.c-meta > div {
  background: var(--bg-2);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.c-meta b {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  font-weight: 500;
}

.c-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  padding: 30px 0 16px;
  align-items: start;
}
.c-main { min-width: 0; }

.grp { margin-bottom: 30px; }
.grp-h {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 2px;
}
.grp-n {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: #fff;
  background: var(--blue);
  border-radius: var(--r-pill);
  padding: 3px 9px;
  flex: none;
}
.grp-t {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.025em;
}
.grp-q {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted-2);
}
.note-card {
  padding: 20px 22px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  border-left: 3px solid var(--blue);
}
.note-card .k {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.note-card p { font-size: 13px; line-height: 1.62; color: var(--fg-2); }

.src-list { display: grid; }
.src {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.src:last-child { border-bottom: 0; }
.src .host {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 2px;
}
.src a {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
}
.src a:hover { color: var(--blue-3); border-color: var(--blue-3); }

.feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 16px 18px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  font-size: 12px;
  color: var(--muted);
}

.aside {
  position: sticky;
  top: calc(var(--nav-h) + 18px);
  display: grid;
  gap: 14px;
}
.aside-card {
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 18px;
}
.aside-card .k {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}
.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.kv:last-of-type { border-bottom: 0; margin-bottom: 4px; }
.k2 { font-size: 11.5px; color: var(--muted); }
.v2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.aside-card .btn { margin-top: 12px; }

.partner {
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 18px;
}
.partner .k {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.partner h4 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin: 8px 0 7px;
}
.partner p {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 12px;
}
.partner a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--fg);
}
.partner a:hover { color: var(--blue-3); }
.partner a span { color: var(--muted-2); }
.partner .disc {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted-2);
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

/* 24. PROSE / LEGAL / CONTACT ============================================= */
.prose {
  max-width: 74ch;
  padding: 30px 0 20px;
}
.prose h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
  margin: 38px 0 12px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 24px 0 8px;
}
.prose p {
  font-size: 14px;
  line-height: 1.72;
  color: var(--fg-2);
  margin-bottom: 14px;
}
.prose p b, .prose p strong { color: var(--fg); font-weight: 600; }
.prose a { color: var(--fg); border-bottom: 1px solid var(--line-3); }
.prose a:hover { color: var(--blue-3); border-color: var(--blue-3); }
.prose ul { margin: 0 0 16px; display: grid; gap: 9px; }
.prose li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg-2);
}
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.prose li b { color: var(--fg); font-weight: 600; }

.callout {
  background: var(--bg-2);
  border-left: 3px solid var(--blue);
  border-radius: var(--r-sm);
  padding: 18px 22px;
  margin: 22px 0;
}
.callout p { margin-bottom: 0; }
.callout p + p { margin-top: 10px; }

.def-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 24px;
}
.def { background: var(--bg-2); border-radius: var(--r-sm); padding: 16px; }
.def .t {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.def .d { font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.st-ok { color: var(--ok); }
.st-warn { color: var(--warn); }
.st-bad { color: var(--bad); }

/* 25. SMALL PARTS ========================================================= */
.cc {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--fg-2);
  background: transparent;
  line-height: 1;
}
.cc.lg {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 12px;
  border-color: var(--line-3);
  color: var(--fg);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  background: var(--muted-2);
}
.pill-ok { color: var(--ok); border-color: rgba(74, 222, 128, .34); }
.pill-ok i { background: var(--ok); }
.pill-warn { color: var(--warn); border-color: rgba(251, 191, 36, .34); }
.pill-warn i { background: var(--warn); }
.pill-bad { color: var(--bad); border-color: rgba(248, 113, 113, .34); }
.pill-bad i { background: var(--bad); }

.lv {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 16px;
  padding: 0 5px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .04em;
  line-height: 1;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  color: var(--muted-2);
  vertical-align: middle;
}
.lv2 { border-color: var(--line-3); color: var(--fg-2); }
.lv3 { background: var(--blue); border-color: var(--blue); color: #fff; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.skip:focus { left: 12px; top: 12px; }

.rv { opacity: 0; transform: translateY(14px); }
.rv.in {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}

/* 26. SPLIT HEADLINE REVEAL =============================================== */
.st-word { display: inline-block; }
.st-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.38em);
  transition:
    opacity .7s cubic-bezier(.22, 1, .36, 1) calc(var(--st-i, 0) * 26ms),
    transform 1s cubic-bezier(.16, 1, .3, 1) calc(var(--st-i, 0) * 26ms);
}
.st-in .st-char { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .st-char { opacity: 1; transform: none; transition: none; }
}

/* 27. RESPONSIVE ========================================================== */
@media (max-width: 1120px) {
  :root { --gut: 26px; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .hero-panel { min-height: 440px; padding: 26px 26px 28px; }
  .c-body { grid-template-columns: minmax(0, 1fr) 268px; gap: 28px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-field.wide { grid-column: span 2; }
  .toggles { grid-column: span 2; }
  .dhead, .drow { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, .9fr)) minmax(0, .9fr) 30px; }
  .dhead > div:nth-child(5), .drow > div:nth-child(5) { display: none; }
}

@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 10px var(--gut) 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 14px; font-size: 10px; }
  .nav-burger { display: flex; }
  .nav-verified { display: none; }
  .nav-right .btn-primary { display: none; }

  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-panel { min-height: 0; }
  .hero-mosaic { grid-template-columns: repeat(2, 1fr); }
  .mosaic-cell { grid-column: span 2; }
  .m-links { display: grid; grid-template-columns: 1fr 1fr; }
  .m-links a + a { border-top: 0; border-left: 1px solid var(--line); }

  .section { padding: 56px 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .grid-tiles { grid-template-columns: repeat(2, 1fr); }
  .cta { grid-template-columns: minmax(0, 1fr); padding: 32px 26px; gap: 24px; }
  .foot-in { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot-legal { grid-template-columns: 1fr; gap: 12px; }

  .c-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .aside { position: static; grid-template-columns: 1fr 1fr; }
  .partner { grid-column: span 2; }
  .c-meta { grid-template-columns: repeat(2, 1fr); }

  .elig-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .elig-form { position: static; }

  .cmp-head, .cmp-sec, .cmp-row { grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .cmp-picker { grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); }
  .def-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { --gut: 16px; }
  body { font-size: 14.5px; }
  .nav-right { gap: 8px; }
  .hero { padding-top: 18px; }
  .hero-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero-panel { padding: 22px 20px 24px; gap: 18px; }
  .device { border-radius: 22px; padding: 8px; }
  .screen { padding: 16px; border-radius: 16px; }
  .hero-mosaic { grid-template-columns: 1fr; }
  .mosaic-cell, .m-links, .partner { grid-column: span 1; }
  .m-links { grid-template-columns: 1fr; }
  .m-links a + a { border-top: 1px solid var(--line); border-left: 0; }
  .grid-tiles { grid-template-columns: 1fr; }
  .ticker-in { flex-direction: column; align-items: flex-start; gap: 8px; border-radius: var(--r-md); }
  .ticker-list { flex-wrap: wrap; gap: 4px 0; }
  .ticker-list a { padding: 0 12px 0 0; border-left: 0; font-size: 11.5px; white-space: normal; }
  .sec-head { align-items: flex-start; }
  .foot-in { grid-template-columns: 1fr; }
  .aside { grid-template-columns: 1fr; }
  .dhead { display: none; }
  /* stacked picker: full-width selects beat truncated labels */
  .cmp-picker { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .cmp-swap { justify-self: center; width: 38px; height: 38px; }
  .dtable { padding: 0 14px; }
  .drow {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 8px 12px;
    padding: 16px 0;
  }
  .drow .dval {
    grid-column: 1;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: baseline;
    gap: 10px;
    font-size: 11.5px;
  }
  .drow .dval .dv { text-align: right; }
  .drow .dval::before {
    content: attr(data-l);
    flex: 0 0 auto;
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted-2);
  }
  .drow .dpick { grid-column: 2; grid-row: 1; }
  .drow .dc { grid-column: 1; }
  .erow { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .erow .bar { display: none; }
  .cmp-head, .cmp-sec, .cmp-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cmp-head .lbl { grid-column: span 2; }
  .cmp-sec > div:first-child { grid-column: span 2; }
  .cmp-row .cl { grid-column: span 2; }
  .cmp-sec .q { grid-column: 1 / -1 !important; }
  .cmp { padding: 4px 16px 10px; }
  .chg { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .phead-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .phead h1 { max-width: none; }
  .cta h2 { font-size: 26px; }
  .tray { left: 12px; right: 12px; transform: translate(0, 180%); border-radius: var(--r-md); max-width: none; }
  .tray.show { transform: none; }
  .tray-sel { font-size: 9px; }
}

/* 28. CHINESE LAYER ======================================================= */
html[lang="zh-Hans"] body { font-family: var(--sans); }

html[lang="zh-Hans"] .h-display {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.14;
  letter-spacing: -.01em;
  font-weight: 800;
  text-transform: none;
}
html[lang="zh-Hans"] .h-display em {
  color: #fff;
  -webkit-text-stroke: 0;
}
html[lang="zh-Hans"] .h-sec {
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.28;
  letter-spacing: 0;
  font-weight: 700;
}
html[lang="zh-Hans"] .phead h1 {
  max-width: 24em;
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 800;
}
html[lang="zh-Hans"] .c-title {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.1;
  letter-spacing: 0;
}
html[lang="zh-Hans"] .cta h2 {
  line-height: 1.26;
  letter-spacing: 0;
  max-width: 26em;
  font-weight: 800;
}
html[lang="zh-Hans"] .eyebrow {
  letter-spacing: .1em;
  text-transform: none;
  font-size: 10px;
}
html[lang="zh-Hans"] .sec-num { font-family: var(--sans); letter-spacing: 0; }
html[lang="zh-Hans"] .nav-links a,
html[lang="zh-Hans"] .btn,
html[lang="zh-Hans"] .link,
html[lang="zh-Hans"] .chip,
html[lang="zh-Hans"] .etab,
html[lang="zh-Hans"] .foot-col h5,
html[lang="zh-Hans"] .f-lab,
html[lang="zh-Hans"] .dhead,
html[lang="zh-Hans"] .c-meta > div,
html[lang="zh-Hans"] .gcard-n,
html[lang="zh-Hans"] .month-h .c,
html[lang="zh-Hans"] .chg-b .fld,
html[lang="zh-Hans"] .pill,
html[lang="zh-Hans"] .ticker-label,
html[lang="zh-Hans"] .hero-widget label,
html[lang="zh-Hans"] .hw-txt,
html[lang="zh-Hans"] .hw-lab,
html[lang="zh-Hans"] .mc-l,
html[lang="zh-Hans"] .hero-note,
html[lang="zh-Hans"] .panel-kicker {
  letter-spacing: .04em;
  text-transform: none;
}
html[lang="zh-Hans"] .nav-links a,
html[lang="zh-Hans"] .btn,
html[lang="zh-Hans"] .link,
html[lang="zh-Hans"] .etab,
html[lang="zh-Hans"] .foot-col h5,
html[lang="zh-Hans"] .f-lab,
html[lang="zh-Hans"] .dhead,
html[lang="zh-Hans"] .c-meta > div,
html[lang="zh-Hans"] .ticker-label,
html[lang="zh-Hans"] .hero-widget label,
html[lang="zh-Hans"] .panel-kicker {
  font-family: var(--sans);
  font-size: 10.5px;
}
html[lang="zh-Hans"] .btn { font-size: 11.5px; padding: 13px 22px; }
html[lang="zh-Hans"] .btn-sm { font-size: 10.5px; padding: 9px 15px; }
html[lang="zh-Hans"] .nav-links a { font-size: 11px; }
html[lang="zh-Hans"] .dhead { font-size: 9px; }
html[lang="zh-Hans"] .f-lab { font-size: 10px; }
html[lang="zh-Hans"] .pill { font-size: 9px; }
html[lang="zh-Hans"] .tile-visa {
  letter-spacing: 0;
  font-size: 9.5px;
  text-transform: none;
}
html[lang="zh-Hans"] .tile-meta > div {
  letter-spacing: 0;
  text-transform: none;
  font-size: 9px;
}
html[lang="zh-Hans"] .hw-txt { font-size: 10px; line-height: 1.5; }
html[lang="zh-Hans"] .mc-l { font-size: 10px; }
html[lang="zh-Hans"] .c-visa { letter-spacing: .04em; }
html[lang="zh-Hans"] .gcard h3,
html[lang="zh-Hans"] .rank-board h3,
html[lang="zh-Hans"] .cmp-sec > div:first-child {
  letter-spacing: 0;
  line-height: 1.3;
}
html[lang="zh-Hans"] .gcard li { font-size: 12.5px; }
html[lang="zh-Hans"] .prose h2 { line-height: 1.4; letter-spacing: 0; }
html[lang="zh-Hans"] .lede { line-height: 1.75; }
html[lang="zh-Hans"] .sec-sub { line-height: 1.8; }
html[lang="zh-Hans"] .langsw a { letter-spacing: 0; }

/* 9.5px CJK is illegible — the stacked card labels switch to the sans stack and a step up */
html[lang="zh-Hans"] .drow .dval::before {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--muted);
}

/* ==========================================================================
   17. FIELD NOTES — editorial reading block (home)
   --------------------------------------------------------------------------
   One lead essay with a tall photograph, two shorter pieces with landscape
   photographs, then a strip of numbers computed from the live dataset.
   Bright beach photography is slightly desaturated so it sits inside the
   dark cobalt shell without turning into a light box.
   ========================================================================== */
.notes { padding-top: 74px; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}

.feature-fig, .short-fig { margin: 0; }
.feature-fig img, .short-fig img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-3);
  filter: saturate(.9) contrast(1.02) brightness(.96);
  transition: filter .35s ease;
}
.feature-fig:hover img, .short-fig:hover img {
  filter: saturate(1) contrast(1.02) brightness(1);
}
.feature-fig img { aspect-ratio: 4 / 5; }
.short-fig img { aspect-ratio: 16 / 10; }

.feature-fig figcaption, .short-fig figcaption {
  margin-top: 14px;
  padding-left: 13px;
  border-left: 2px solid var(--blue);
  max-width: 50ch;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* shared article typography */
.art-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.art-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--blue);
  color: #fff;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.art-meta-r { font-size: 10px; letter-spacing: .05em; color: var(--muted-2); }

.art-title {
  font-family: var(--display);
  font-size: clamp(27px, 3.3vw, 43px);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 700;
  color: var(--fg);
  text-wrap: balance;
  margin-bottom: 18px;
}
.art-title.sm {
  font-size: clamp(21px, 2.1vw, 27px);
  line-height: 1.2;
  margin-bottom: 15px;
}

.art-lede {
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--fg-2);
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.feature-body > p:not(.art-lede),
.short-body > p {
  max-width: 64ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg-2);
  margin-bottom: 16px;
}

.pull {
  margin: 26px 0;
  padding: 2px 0 2px 22px;
  border-left: 2px solid var(--blue);
}
.pull p {
  font-family: var(--display);
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.34;
  letter-spacing: -.02em;
  font-weight: 600;
  color: var(--fg);
  text-wrap: balance;
}

.art-link { margin-top: 6px; }
.notes-hr { margin: 62px auto 56px; }

.shorts { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.short { display: flex; flex-direction: column; }
.short-fig { margin-bottom: 24px; }
.short-body { display: flex; flex-direction: column; flex: 1; }
.short-body p:last-of-type { margin-bottom: 22px; }
.short-body .art-link { margin-top: auto; align-self: flex-start; }

/* live numbers */
.notes-strip {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
  overflow: hidden;
}
.ns-item {
  padding: 22px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ns-item:last-child { border-right: 0; }
.ns-num {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--fg);
}
.ns-lab { font-size: 11px; line-height: 1.5; color: var(--muted); }
.notes-src { margin-top: 14px; color: var(--muted-2); letter-spacing: .04em; }

/* responsive */
@media (max-width: 1000px) {
  .feature { grid-template-columns: 1fr; gap: 36px; }
  .feature-fig { max-width: 720px; }
  .feature-fig img { aspect-ratio: 16 / 10; }
}
@media (max-width: 900px) {
  .shorts { gap: 30px; }
}
@media (max-width: 760px) {
  .shorts { grid-template-columns: 1fr; gap: 48px; }
  .notes-strip { grid-template-columns: 1fr 1fr; }
  .ns-item:nth-child(2) { border-right: 0; }
  .ns-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .notes { padding-top: 60px; }
  .notes-strip { grid-template-columns: 1fr; }
  .ns-item { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; }
  .ns-item:last-child { border-bottom: 0; }
  .feature-fig img { aspect-ratio: 4 / 3; }
  .art-lede { font-size: 15px; }
  .notes-hr { margin: 46px auto 42px; }
}

/* Chinese copy: more leading, no tight Latin tracking */
html[lang="zh-Hans"] .art-title { letter-spacing: 0; line-height: 1.34; }
html[lang="zh-Hans"] .art-lede { line-height: 1.85; font-size: 15.5px; }
html[lang="zh-Hans"] .feature-body > p:not(.art-lede),
html[lang="zh-Hans"] .short-body > p { line-height: 1.95; }
html[lang="zh-Hans"] .pull p { line-height: 1.65; letter-spacing: 0; font-size: 19px; }
html[lang="zh-Hans"] .art-tag,
html[lang="zh-Hans"] .art-meta-r { font-family: var(--sans); letter-spacing: .04em; }
html[lang="zh-Hans"] .feature-fig figcaption,
html[lang="zh-Hans"] .short-fig figcaption { line-height: 1.8; }

/* ==========================================================================
   29. STAGE + MORPHING NAV
   --------------------------------------------------------------------------
   Full-screen brand hero and morphing dropdown ported from the Halden
   homepage. Scoped to stage-* / mp-* plus two local custom properties so
   the rest of the cobalt skin is untouched. No new fonts, no new accent.
   ========================================================================== */
:root {
  --stage-ease: cubic-bezier(.22, 1, .36, 1);
  --stage-morph: .5s;
}

/* ---- 29.1 full-screen stage ------------------------------------------- */
.stage {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  overflow: hidden;
  isolation: isolate;
  background: #12171d;
}
.stage-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #16232b url("https://images.pexels.com/photos/16881038/pexels-photo-16881038.jpeg?auto=compress&cs=tinysrgb&w=2400") center 45% / cover no-repeat;
  animation: stageIn 2.4s var(--stage-ease) both;
}
@keyframes stageIn {
  from { transform: scale(1.09); filter: brightness(.55); }
  to   { transform: scale(1);    filter: brightness(1); }
}
.stage-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(8, 11, 16, .58) 0%, rgba(8, 11, 16, .12) 24%, rgba(8, 11, 16, .30) 62%, var(--bg) 100%),
    linear-gradient(90deg, rgba(8, 11, 16, .52) 0%, rgba(8, 11, 16, 0) 68%);
}
.stage-in {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(64px, 10vh, 120px) 0 clamp(96px, 15vh, 160px);
}
.stage-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .74);
  animation: stageUp .9s var(--stage-ease) .25s both;
}
.stage-eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-3);
  box-shadow: 0 0 0 4px rgba(91, 112, 255, .2);
  flex: none;
}
.stage-title {
  max-width: 16ch;
  margin: 26px 0 0;
  font-family: var(--display);
  font-size: clamp(42px, 6.2vw, 86px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.045em;
  color: #fff;
  text-wrap: balance;
  animation: stageUp 1s var(--stage-ease) .38s both;
}
.stage-sub {
  max-width: 54ch;
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.72;
  color: rgba(255, 255, 255, .8);
  animation: stageUp 1s var(--stage-ease) .5s both;
}
.stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  animation: stageUp 1s var(--stage-ease) .62s both;
}
.stage .btn-primary { background: #fff; border-color: #fff; color: #111; }
.stage .btn-primary::before { background: var(--blue); }
.stage .btn-primary:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.stage .btn-primary:hover::before { background: #fff; }
.stage .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .46); }
.stage .btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }

.stage-stats {
  width: 100%;
  max-width: 880px;
  margin-top: clamp(34px, 6vh, 60px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-md);
  background: rgba(12, 15, 21, .42);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  overflow: hidden;
  animation: stageUp 1s var(--stage-ease) .74s both;
}
.ss-item {
  padding: 18px 22px;
  border-right: 1px solid rgba(255, 255, 255, .12);
  min-width: 0;
}
.ss-item:last-child { border-right: 0; }
.ss-n {
  display: block;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: #fff;
}
.ss-l {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .62);
}
.stage-cue {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
  animation: stageCueIn 1s var(--stage-ease) .95s both;
  transition: color .2s ease;
}
.stage-cue:hover { color: #fff; }
.stage-cue svg { width: 11px; height: 13px; opacity: .85; }
@keyframes stageUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes stageCueIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---- 29.2 morphing dropdown, scoped to the sticky nav ------------------ */
.nav-links a.mp-trigger { display: inline-flex; align-items: center; gap: 6px; }
.mp-chev { width: 8px; height: 5px; opacity: .65; transition: transform .35s var(--stage-ease); }
.mp-trigger[aria-expanded="true"] { color: var(--fg); background: var(--bg-2); }
.mp-trigger[aria-expanded="true"] .mp-chev { transform: rotate(180deg); }

.mp-dd {
  --sx: 0px;
  --sw: 400px;
  --sh: 300px;
  --ss: .97;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  z-index: 70;
  width: var(--sw);
  height: var(--sh);
  transform: translateX(var(--sx)) scale(var(--ss));
  transform-origin: 50% 0;
  opacity: 0;
  pointer-events: none;
  border-radius: var(--r-md);
  /* Opaque surface: the stage headline is very large and would ghost through
     any translucency here, hurting menu legibility. Depth comes from the
     border + shadow instead of a backdrop blur. */
  background: #15151a;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .78), 0 2px 10px rgba(0, 0, 0, .3);
  overflow: hidden;
  transition:
    transform var(--stage-morph) var(--stage-ease),
    width var(--stage-morph) var(--stage-ease),
    height var(--stage-morph) var(--stage-ease),
    opacity .3s ease;
}
.mp-dd.open { --ss: 1; opacity: 1; pointer-events: auto; }
.mp-dd.instant { transition: opacity .3s ease, transform var(--stage-morph) var(--stage-ease); }
.mp-dd.instant.snap { transition: none; }

.mp-panel {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  filter: blur(8px);
  transform: translateX(0);
  transition:
    opacity .26s ease,
    transform var(--stage-morph) var(--stage-ease),
    filter .4s ease,
    visibility 0s linear var(--stage-morph);
}
.mp-panel[data-state="exit-left"]  { transform: translateX(-56px); }
.mp-panel[data-state="exit-right"] { transform: translateX(56px); }
.mp-panel[data-state="active"] {
  opacity: 1;
  visibility: visible;
  filter: blur(0);
  transform: translateX(0);
  transition:
    opacity .36s ease .06s,
    transform var(--stage-morph) var(--stage-ease),
    filter .45s ease .04s,
    visibility 0s;
}
.mp-panel.snap { transition: none !important; }

/* Panel A — DATABASE */
#p-database { width: 664px; height: 358px; display: grid; grid-template-columns: 236px 1fr; }
.mp-list { display: flex; flex-direction: column; padding: 8px; gap: 2px; min-width: 0; }
.mp-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 12px;
  border-radius: var(--r-sm);
  transition: background .3s;
  min-height: 0;
}
.mp-item.is-active { background: rgba(255, 255, 255, .065); }
.mp-item strong { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--fg); }
.mp-item span { font-size: 12.5px; line-height: 1.42; color: var(--muted); }
.mp-media { position: relative; overflow: hidden; border-radius: 0 15px 15px 0; }
.mp-media::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 70px;
  z-index: 2;
  background: linear-gradient(to right, rgba(20, 20, 24, .55), rgba(20, 20, 24, 0));
}
.mp-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  filter: blur(10px);
  transition: opacity .6s ease, transform .9s var(--stage-ease), filter .6s ease;
}
.mp-media img.is-active { opacity: 1; transform: scale(1); filter: blur(0); z-index: 1; }

/* Panel B — COMPARE */
#p-compare { width: 446px; height: 308px; padding: 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mp-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  isolation: isolate;
  min-width: 0;
}
.mp-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .9s var(--stage-ease), filter .5s;
}
.mp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(8, 11, 16, .9) 0%, rgba(8, 11, 16, .38) 38%, rgba(8, 11, 16, 0) 62%);
}
.mp-card:hover img, .mp-card:focus-visible img { transform: scale(1.05); filter: brightness(1.08); }
.mp-card strong { font-size: 15px; font-weight: 600; margin-bottom: 5px; color: #fff; }
.mp-card span { font-size: 12.5px; line-height: 1.42; color: rgba(255, 255, 255, .7); }

/* Panel C — ELIGIBILITY */
#p-eligibility { width: 232px; height: 218px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.mp-link {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--fg-2);
  transition: background .25s, color .25s;
}
.mp-link:hover, .mp-link:focus-visible { background: rgba(255, 255, 255, .065); color: #fff; }

/* ---- 29.3 responsive ---------------------------------------------------- */
@media (max-width: 1120px) {
  .stage-title { font-size: clamp(40px, 6vw, 70px); }
  .stage-stats { max-width: 100%; }
}
@media (max-width: 900px) {
  /* the burger menu owns navigation below this breakpoint */
  .mp-dd { display: none !important; }
  .mp-chev { display: none; }
  .stage-in { padding: 60px 0 100px; }
  .stage-title { max-width: 18ch; }
  .stage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ss-item:nth-child(2) { border-right: 0; }
  .ss-item:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, .12); }
}
@media (max-width: 620px) {
  .stage-in { padding: 44px 0 96px; }
  .stage-title { font-size: clamp(34px, 9.2vw, 52px); max-width: 15ch; margin-top: 20px; }
  .stage-sub { font-size: 13.5px; line-height: 1.7; margin-top: 16px; }
  .stage-actions { margin-top: 22px; gap: 8px; }
  .stage-actions .btn { padding: 12px 16px; font-size: 9px; }
  .stage-stats { margin-top: 30px; }
  .ss-item { padding: 14px 15px; }
  .ss-n { font-size: 19px; }
  .ss-l { font-size: 10px; }
  .stage-cue { bottom: 18px; font-size: 9px; gap: 8px; }
}

/* ---- 29.4 Chinese layer ------------------------------------------------- */
html[lang="zh-Hans"] .stage-title {
  font-size: clamp(34px, 5.4vw, 66px);
  letter-spacing: -.02em;
  line-height: 1.22;
  max-width: 13ch;
}
html[lang="zh-Hans"] .stage-sub { line-height: 1.9; }
html[lang="zh-Hans"] .stage-eyebrow { letter-spacing: .1em; }

/* ---- 29.5 reduced motion ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  :root { --stage-morph: .01s; }
  .stage-bg,
  .stage-eyebrow, .stage-title, .stage-sub, .stage-actions, .stage-stats, .stage-cue {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
  }
  .mp-panel, .mp-media img { filter: none !important; }
}

/* ==========================================================================
   30. HOME — ambient background layer (index.html only)
   --------------------------------------------------------------------------
   The flat black canvas below the full-screen hero gets a subtle data grid,
   drifting cobalt glow and a fine film grain — enough to give the editorial
   sections depth without stealing attention from the content. Everything is
   scoped to [data-page="home"] so the other ten pages stay untouched.
   ========================================================================== */

/* 30.1 base canvas: fixed grid + ambient cobalt glow + grain ------------ */
body[data-page="home"] {
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 58vw 52vh at 4% 6%,  rgba(43, 70, 240, .26), transparent 64%),
    radial-gradient(ellipse 50vw 46vh at 96% 38%, rgba(91, 112, 255, .20), transparent 62%),
    radial-gradient(ellipse 52vw 48vh at 8% 92%, rgba(43, 70, 240, .17), transparent 62%),
    radial-gradient(ellipse 44vw 42vh at 90% 96%, rgba(91, 112, 255, .13), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 180px 180px, auto, auto, auto, auto, 68px 68px, 68px 68px;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat;
  background-attachment: fixed;
}

/* 30.2 slow-drifting light orbs — sit behind the real content ---------- */
body[data-page="home"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 26% 32%, rgba(43, 70, 240, .16), transparent 34%),
    radial-gradient(circle at 74% 72%, rgba(91, 112, 255, .14), transparent 36%);
  animation: homeOrbDrift 26s ease-in-out infinite alternate;
}
@keyframes homeOrbDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3vw, -4vh, 0) scale(1.1); }
}

/* keep real content above the ambient layer (the stage stays opaque) ---- */
body[data-page="home"] main,
body[data-page="home"] .foot {
  position: relative;
  z-index: 1;
}

/* 30.3 section dividers pick up a hint of cobalt ----------------------- */
body[data-page="home"] .hr {
  background: linear-gradient(90deg,
    transparent, var(--line-2) 18%, rgba(91, 112, 255, .38) 50%, var(--line-2) 82%, transparent);
}

/* 30.4 a faint wash behind the field-notes band ------------------------ */
body[data-page="home"] .notes { position: relative; }
body[data-page="home"] .notes::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(43, 70, 240, .045), transparent 70%);
}

/* 30.5 respect reduced motion ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"]::before { animation: none; }
}

/* 31. static SEO country pages — related-routes link list ------------- */
.linklist { display: flex; flex-direction: column; }
.linklist a {
  display: block;
  padding: 10px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition: color .16s;
}
.linklist a:last-child { border-bottom: 0; padding-bottom: 2px; }
.linklist a:hover { color: var(--fg); }
.linklist a span { float: right; color: var(--blue, #5b70ff); }

/* 32. shortlist — save candidates, export CSV / PDF ------------------- */
.sl-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 11px; border: 1px solid var(--line-2);
  background: transparent; color: var(--fg-2); border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: border-color .16s, color .16s, background .16s;
}
.sl-btn:hover { border-color: var(--blue-3); color: var(--fg); background: rgba(255,255,255,.03); }
.sl-ico { font-size: 15px; line-height: 1; color: var(--muted); }
.sl-btn.has .sl-ico { color: #ffd166; }
.sl-num {
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--bg-4); color: var(--fg-2);
  font-size: 10px; display: inline-grid; place-items: center;
}
.sl-btn.has .sl-num { background: var(--blue); color: #fff; }

.dfav {
  flex: 0 0 auto; width: 26px; height: 26px; margin-left: auto;
  border: 1px solid var(--line); border-radius: 7px;
  background: rgba(255,255,255,.03); color: var(--muted);
  font-size: 15px; line-height: 1; cursor: pointer;
  transition: color .16s, border-color .16s, background .16s;
}
.dfav:hover { color: #ffd166; border-color: rgba(255,209,102,.5); }
.dfav.on { color: #ffd166; border-color: rgba(255,209,102,.5); background: rgba(255,209,102,.1); }
.c-head, .cmp-hc { position: relative; }
.c-head .dfav, .cmp-hc .dfav {
  position: absolute; top: 14px; right: 14px; margin: 0;
  width: 32px; height: 32px; font-size: 18px;
}

.sl-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sl-mask.open { opacity: 1; pointer-events: auto; }
.sl-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: min(440px, 100vw); display: flex; flex-direction: column;
  background: var(--bg-2); border-left: 1px solid var(--line);
  transform: translateX(102%); transition: transform .25s ease;
  box-shadow: -20px 0 60px rgba(0,0,0,.35);
}
.sl-panel.open { transform: none; }
body.sl-open { overflow: hidden; }
.sl-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 22px 16px; border-bottom: 1px solid var(--line);
}
.sl-title { font-family: var(--display); font-size: 24px; font-weight: 700; margin: 6px 0 0; letter-spacing: -.02em; }
.sl-x {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.sl-x:hover { color: var(--fg); border-color: var(--line-3); }
.sl-body { flex: 1; overflow-y: auto; padding: 10px 22px 18px; }
.sl-item {
  display: grid; grid-template-columns: 24px minmax(0,1fr) auto 26px;
  align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line);
}
.sl-item:last-child { border-bottom: 0; }
.sl-i { font: 600 10px/1 var(--mono, monospace); color: var(--muted-2); }
.sl-who { min-width: 0; }
.sl-who a { display: block; font-size: 13px; font-weight: 600; color: var(--fg); text-decoration: none; }
.sl-who a:hover { color: var(--blue-3); }
.sl-who > span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-facts { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 11px; color: var(--fg-2); white-space: nowrap; }
.sl-rm {
  width: 26px; height: 26px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--muted-2); font-size: 18px; line-height: 1; cursor: pointer;
}
.sl-rm:hover { color: var(--bad, #ff6b6b); border-color: var(--line); }
.sl-empty { text-align: center; padding: 64px 12px; color: var(--muted); }
.sl-empty-i { font-size: 44px; color: var(--muted-2); margin-bottom: 12px; }
.sl-empty p { margin: 0 0 6px; font-size: 14px; }
.sl-foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 22px 6px; border-top: 1px solid var(--line); }
.sl-foot .btn { margin: 0; flex: 1 1 auto; }
.sl-note { margin: 0; padding: 4px 22px 18px; font-size: 10px; color: var(--muted-2); line-height: 1.5; }
@media (max-width: 760px) {
  .sl-btn .sl-label { display: none; }
  .sl-panel { width: 100vw; }
  .c-head .dfav, .cmp-hc .dfav { top: 10px; right: 10px; }
}

/* ==========================================================================
   33. INNER PAGES — ambient grid background (every page except home)
   --------------------------------------------------------------------------
   The reference is a deep blue-grey field (#20222e) with a soft cobalt-violet
   bloom in the upper-right and a fine 85px hairline grid — the same visual
   language as the home hero, but flatter and more uniform so dense tables and
   forms stay readable. Applied to all ten inner pages (and the 87 static
   country pages) in one place; only body owns the canvas, cards stay opaque
   so nothing behind them affects legibility.
   ========================================================================== */

body:not([data-page="home"]) {
  background-color: #20222e;
  background-image:
    /* soft cobalt-violet bloom, anchored upper-right */
    radial-gradient(ellipse 78% 66% at 82% 6%, rgba(91, 112, 255, .30), transparent 70%),
    /* a quieter second pool low-left so the field is not one-sided */
    radial-gradient(ellipse 58% 52% at 8% 96%, rgba(43, 70, 240, .12), transparent 68%),
    /* faint film grain */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E"),
    /* the 85px hairline grid */
    linear-gradient(rgba(190, 200, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 200, 255, .055) 1px, transparent 1px);
  background-size: auto, auto, 160px 160px, 85px 85px, 85px 85px;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat;
  background-attachment: fixed;
}

/* 33.1 real content sits above the canvas ------------------------------- */
body:not([data-page="home"]) main,
body:not([data-page="home"]) .foot {
  position: relative;
  z-index: 1;
}

/* 33.2 a soft spotlight under each page header -------------------------- */
body:not([data-page="home"]) .phead,
body:not([data-page="home"]) .c-head {
  background-image: radial-gradient(ellipse 60% 130% at 16% 0%, rgba(91, 112, 255, .10), transparent 72%);
}

/* 33.3 dividers pick up the same cobalt thread as home ------------------ */
body:not([data-page="home"]) .hr {
  background: linear-gradient(90deg,
    transparent, var(--line-2) 18%, rgba(91, 112, 255, .34) 50%, var(--line-2) 82%, transparent);
}

/* ==========================================================================
   34. WORLD MAP page (data-page="map")
   --------------------------------------------------------------------------
   Controls, the compliant live map container, the no-SDK dot-distribution
   fallback and the income legend. The ambient grid from §33 shows through.
   ========================================================================== */
.phead-sub { max-width: 720px; margin-top: 14px; color: var(--fg-2); font-size: 15px; line-height: 1.6; }
.map-layout { padding-bottom: 60px; }

.map-controls {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px;
  padding: 16px; margin-bottom: 12px;
  background: rgba(12, 12, 13, .72); border: 1px solid var(--line); border-radius: var(--r-md);
}
.mf { display: flex; flex-direction: column; gap: 7px; font: 600 11px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mf input, .mf select {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--fg); font: 400 14px/1 var(--sans); text-transform: none; letter-spacing: 0;
}
.mf input::placeholder { color: var(--muted-2); }
.mf select { cursor: pointer; }
.mf input:focus, .mf select:focus { border-color: var(--blue-3); outline: none; }

.map-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 4px 12px; flex-wrap: wrap; }
.map-count { font: 600 12px/1 var(--mono); color: var(--fg); }
.map-key { font-size: 11px; color: var(--muted); }

.map-stage {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: #12161f; min-height: 460px;
}
.live-map { width: 100%; height: 460px; }
.map-view.hide, .map-notice.hide, .kp-msg.hide, .kp-clear.hide { display: none; }
.map-notice {
  position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 32px));
  padding: 18px; text-align: left;
  background: rgba(12, 12, 13, .95); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  color: var(--fg-2); font-size: 12px; line-height: 1.5;
}
.map-notice .kp-msg { margin-bottom: 12px; padding: 8px 10px; border-radius: 8px; background: rgba(251, 191, 36, .09); border: 1px solid rgba(251, 191, 36, .22); color: #e9c877; font-size: 11.5px; }
.kp-top { display: flex; align-items: center; gap: 8px; color: var(--fg); font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.kp-ico { color: var(--blue-3); font-size: 18px; line-height: 1; }
.map-notice p { margin: 0 0 12px; color: var(--muted); font-size: 11.5px; }
.kp-row { display: flex; gap: 8px; }
.kp-row input {
  flex: 1; min-width: 0; height: 38px; padding: 0 11px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--fg); font: 400 12.5px/1 var(--mono);
}
.kp-row input:focus { border-color: var(--blue-3); outline: none; }
.kp-row button {
  flex: 0 0 auto; height: 38px; padding: 0 16px; border: 0; border-radius: var(--r-sm);
  background: var(--blue); color: #fff; font: 600 12.5px/1 var(--sans); cursor: pointer;
}
.kp-row button:hover { background: var(--blue-3); }
.kp-help { margin-top: 11px; display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; color: var(--muted-2); }
.kp-help a { color: var(--blue-3); text-decoration: none; }
.kp-help a:hover { text-decoration: underline; }
.kp-clear {
  position: absolute; z-index: 6; left: 50%; bottom: 12px; transform: translateX(-50%);
  padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(12, 12, 13, .9); color: var(--muted); font-size: 11px; cursor: pointer;
  white-space: nowrap;
}
.kp-clear:hover { color: var(--fg); border-color: var(--line-3); }

/* dot distribution (equirectangular, no borders) */
.dotsvg { display: block; width: 100%; height: 460px; }
.dotsvg .grat { stroke: rgba(190, 200, 255, .07); stroke-width: 1; }
.dot circle { transition: r .15s, stroke .15s; }
.dot:hover circle { r: 12; stroke: #fff; }
.dot.hide { display: none; }

/* Tencent InfoWindow content — self-contained dark card.
   enableCustom:true renders a white bubble, so the card paints its own
   background and the name is high-contrast and enlarged for readability. */
.mip {
  position: relative;
  min-width: 196px; max-width: 260px;
  padding: 12px 14px 12px;
  font-family: var(--sans);
  color: #fff;
  background: linear-gradient(160deg, #23232a 0%, #17171c 100%);
  border: 1px solid rgba(150,160,255,.28);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0,0,0,.46), 0 2px 8px rgba(0,0,0,.4);
}
.mip::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3px; border-radius: 3px; background: var(--blue, #5b70ff);
}
.mip-t {
  display: block; font-size: 17px; line-height: 1.3; font-weight: 800;
  letter-spacing: -.01em; color: #fff; text-decoration: none;
}
.mip-t:hover, .mip-t:focus-visible { color: #aab6ff; outline: none; }
.mip-t .mip-arrow { font-size: 14px; color: #8f9bb5; margin-left: 3px; }
.mip-v { margin-top: 5px; font-size: 12.5px; font-weight: 600; color: #cfd0db; }
.mip-i { margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.1); font: 500 11.5px/1.45 var(--mono); color: #a9a9b5; }

/* Hover / selected name label pinned beside a map marker.
   Lives in the map stage, positioned via TMap's projectToContainer(). */
.map-stage { position: relative; }
.mk-label {
  position: absolute; z-index: 5; left: 0; top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none; white-space: nowrap;
  padding: 5px 10px; border-radius: 999px;
  font: 700 12px/1.2 var(--sans); color: #fff;
  background: rgba(18,18,22,.94);
  border: 1px solid rgba(150,160,255,.4);
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
  opacity: 0; transition: opacity .12s;
}
.mk-label.show { opacity: 1; }
.mk-label.on { background: var(--blue, #5b70ff); border-color: #fff; }
@media (prefers-reduced-motion: reduce) { .mk-label { transition: none; } }

.map-legend-wrap { margin-top: 18px; }
.map-legend-title { font: 600 11px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.map-legend-title span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted-2); }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.lg {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  background: rgba(12, 12, 13, .6); border: 1px solid var(--line); border-radius: 999px;
  color: var(--fg-2); font-size: 12px; cursor: pointer; transition: border-color .15s, background .15s;
}
.lg:hover { border-color: var(--line-3); }
.lg.on { border-color: var(--blue-3); background: rgba(43, 70, 240, .16); color: var(--fg); }
.lg i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.lg b { font: 600 11px/1 var(--mono); color: var(--muted); }
.map-foot { margin-top: 18px; max-width: 900px; color: var(--muted-2); line-height: 1.6; }

@media (max-width: 760px) {
  .map-controls { grid-template-columns: 1fr; }
  .live-map, .dotsvg, .map-stage { min-height: 360px; height: 360px; }
}

/* ==========================================================================
   35. TRUST BADGES — source strength + freshness (trust.js + static pages)
   Derived from real fields only. Small, quiet, and legible on the dark skin.
   ========================================================================== */
.tb {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 7px 0 6px; margin-left: 4px; vertical-align: middle;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  font: 600 10px/1 var(--mono); letter-spacing: .01em;
  white-space: nowrap; color: var(--fg-2);
}
.tb i { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; background: currentColor; }
.tb-src.tb-dual   { color: #6fd7a3; border-color: rgba(74, 222, 128, .28); background: rgba(74, 222, 128, .08); }
.tb-src.tb-single { color: #e6bd6a; border-color: rgba(251, 191, 36, .28); background: rgba(251, 191, 36, .08); }
.tb-age.tb-fresh  { color: #7cc9a6; border-color: rgba(74, 222, 128, .22); }
.tb-age.tb-aging  { color: #e6bd6a; border-color: rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .07); }
.tb-age.tb-stale  { color: #f08a8a; border-color: rgba(248, 113, 113, .34); background: rgba(248, 113, 113, .09); }
.tb-age.tb-unknown{ color: var(--muted); }
/* in database rows the badge sits inside a compact value cell — keep it tight */
.dval .tb { height: 16px; padding: 0 6px 0 5px; font-size: 9.5px; }
.c-meta .tb { margin-left: 5px; }
.lang-zh .tb { font-family: var(--sans); font-weight: 500; }

/* ==========================================================================
   36. ACCESSIBILITY — skip link + no-JavaScript notice
   ========================================================================== */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 999;
  transform: translateY(-180%);
  padding: 10px 16px; border-radius: 10px;
  background: var(--blue); color: #fff;
  font: 600 13px/1 var(--sans); text-decoration: none;
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--fg); outline-offset: 2px; }

.noscript-bar {
  max-width: 760px; margin: 20px auto 0; padding: 16px 20px;
  border: 1px solid rgba(251, 191, 36, .38); border-radius: 12px;
  background: rgba(251, 191, 36, .08); color: var(--fg);
  font: 400 13px/1.7 var(--sans); text-align: center;
}
.noscript-bar strong { color: var(--warn); }
.noscript-bar a { color: var(--blue-3); text-decoration: underline; }
.noscript-bar .ns-zh { display: block; margin-top: 6px; color: var(--fg-2); }
