/* LIFTOFF base styles. Layout concept: black ground, one statement per band, big numbers, quiet tiles.
   Single dark look by choice. Every colour is a token. View-specific rules go in css/<view>.css. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --tile: #111113;
  --inset: #1A1A1D;
  --hair: #232326;
  --hair-ground: #1D1D20;
  --track: #2C2C30;
  --bar-idle: #3A3A3F;
  --chip-line: #38383D;
  --btn-line: #6E6E73;
  --fg: #F5F5F7;
  --fg-2: #A1A1A6;
  --fg-3: #86868B;
  --live: #7FD6C6;
  --alert: #D09A6A;
  --font: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --radius-tile: 24px;
  --gap-section: 88px;
  --gap-tile: 16px;
}

body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.5; }

.lf { box-sizing: border-box; min-height: 100%; background: var(--bg); color: var(--fg);
  padding-left: max(clamp(20px, 4vw, 64px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(20px, 4vw, 64px), env(safe-area-inset-right, 0px));
  padding-block: 0 40px; display: flex; flex-direction: column; gap: 56px; }
.lf *, .lf *::before, .lf *::after { box-sizing: border-box; }
.lf a { color: inherit; text-decoration: none; }
.lf :focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
.lf h1, .lf h2, .lf h3, .lf p { margin: 0; }
.lf button { font-family: inherit; }

/* Header */
.lf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 32px; min-height: 60px; border-bottom: 1px solid var(--hair-ground); }
.lf-brand { display: flex; align-items: center; gap: 10px; }
.lf-brand__mark { font-size: 15px; font-weight: 700; letter-spacing: 0.26em; }
.lf-chip { font-size: 11px; line-height: 1; padding: 4px 8px; border: 1px solid var(--chip-line); border-radius: 999px; color: var(--fg-2); white-space: nowrap; }
.lf-nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
.lf-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--fg-2); }
.lf-nav a:hover { color: var(--fg); }
.lf-nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }
.lf-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; background: transparent; border: 0; color: var(--fg-2); font-size: 13px; cursor: pointer; }
.lf-switch__track { display: inline-flex; align-items: center; justify-content: flex-start; width: 30px; height: 18px; padding: 2px; border-radius: 999px; background: var(--track); }
.lf-switch__knob { width: 14px; height: 14px; border-radius: 999px; background: var(--fg-3); }
.lf-switch[aria-pressed="true"] { color: var(--fg); }
.lf-switch[aria-pressed="true"] .lf-switch__track { background: var(--fg); justify-content: flex-end; }
.lf-switch[aria-pressed="true"] .lf-switch__knob { background: var(--bg); }

/* Views */
.view { display: flex; flex-direction: column; gap: var(--gap-section); }
.section { display: flex; flex-direction: column; gap: 28px; }
.h1 { font-size: clamp(40px, 5vw, 56px); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.sub { font-size: clamp(17px, 1.6vw, 21px); color: var(--fg-2); }
.pagehead { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; }
.section__head { display: flex; align-items: baseline; gap: 12px; }
.note { font-size: 12px; color: var(--fg-3); }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 48px; }
.hero__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero__label { font-size: 17px; font-weight: 400; color: var(--fg-2); }
.hero__num { font-size: clamp(72px, 10vw, 144px); font-weight: 600; line-height: 0.95; letter-spacing: -0.045em; }
.hero__media { flex: 1.5 1 380px; min-width: 0; display: flex; justify-content: center; }
.globe { position: relative; width: 100%; max-width: 720px; aspect-ratio: 1 / 1; }
.globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.lf .btn--primary { background: var(--fg); color: var(--bg); }
.lf .btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--btn-line); color: var(--fg); }
.btn--sm { min-height: 36px; padding: 0 16px; font-size: 13px; }

/* Bar between hairlines (next launch) */
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 24px 0; border-top: 1px solid var(--hair-ground); border-bottom: 1px solid var(--hair-ground); }
.strip__label { font-size: 15px; color: var(--fg-2); }
.strip__name { display: inline-flex; align-items: center; gap: 12px; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.strip__meta { font-size: 15px; color: var(--fg-2); }
.strip__end { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.count { display: inline-flex; align-items: baseline; gap: 14px; font-variant-numeric: tabular-nums; }
.count__n { font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.count__u { font-size: 14px; color: var(--fg-3); margin-left: 4px; }

/* Stats without boxes */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 32px 24px; }
.stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat__num { font-size: clamp(44px, 5vw, 64px); font-weight: 600; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.stat__unit { font-size: 17px; font-weight: 400; color: var(--fg-2); letter-spacing: 0; }
.stat__label { font-size: 15px; color: var(--fg-2); }

/* Tiles */
.tiles { display: flex; flex-wrap: wrap; gap: var(--gap-tile); }
.tile { flex: 1 1 320px; min-width: 0; background: var(--tile); border-radius: var(--radius-tile); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.tile--wide { flex: 2 1 560px; }
.tile--spread { justify-content: space-between; min-height: 240px; }
.tile__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.tile__label { font-size: 15px; font-weight: 500; color: var(--fg-2); }
.tile__link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 13px; color: var(--fg-2); }
.lf .tile__link:hover { color: var(--fg); }
.tile__body { display: flex; flex-direction: column; gap: 12px; }
.big { display: flex; align-items: baseline; gap: 8px; }
.big__num { font-size: 64px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.big__unit { font-size: 17px; color: var(--fg-2); }
.mid { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-2); }
.grid-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: var(--gap-tile); }
.grid-tiles .tile { flex: none; }

/* Rows with hairlines */
.rows { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; min-height: 58px; padding: 12px 0; border-top: 1px solid var(--hair); }
.rows--ground .row { border-top-color: var(--hair-ground); }
.row__date { flex: 0 0 96px; font-size: 13px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.row__name { flex: 1 1 200px; min-width: 0; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 17px; font-weight: 600; }
.row__meta { font-size: 13px; color: var(--fg-2); }
.row__end { margin-left: auto; font-size: 13px; color: var(--fg-2); text-align: right; font-variant-numeric: tabular-nums; }
.tag { font-size: 11px; line-height: 16px; font-weight: 500; padding: 1px 8px; border: 1px solid var(--chip-line); border-radius: 999px; color: var(--fg-2); white-space: nowrap; }

/* Label and value rows */
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hair); }
.kv__k { font-size: 14px; color: var(--fg-3); }
.kv__v { font-size: 15px; text-align: right; }

/* Status marks */
.mark { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.mark--ok { color: var(--fg); }
.mark--fail { color: var(--alert); }
.mark--pending { color: var(--fg-2); }
.mark--live { color: var(--fg); }
.dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 999px; background: var(--live); }

/* Bars */
.meter { display: flex; height: 4px; border-radius: 999px; background: var(--track); overflow: hidden; }
.meter__fill { background: var(--bar-idle); border-radius: 999px; }
.meter__fill--hi { background: var(--fg); }
.barlist { display: flex; flex-direction: column; gap: 14px; }
.barlist__item { display: flex; flex-direction: column; gap: 6px; }
.barlist__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; }
.barlist__top span:first-child { color: var(--fg-2); }
.barlist__top span:last-child { font-variant-numeric: tabular-nums; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 96px; }
.cols__bar { flex: 1 1 0; background: var(--bar-idle); border-radius: 2px; min-height: 2px; }
.cols__bar--hi { background: var(--fg); }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--fg-3); }

/* Filter pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--chip-line); color: var(--fg-2); font-size: 13px; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--fg); color: var(--bg); box-shadow: none; }

/* Tables */
.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { font-size: 13px; font-weight: 400; color: var(--fg-3); text-align: right; padding: 0 0 12px 16px; white-space: nowrap; }
.table th:first-child, .table td:first-child { text-align: left; padding-left: 0; }
.table td { text-align: right; padding: 14px 0 14px 16px; border-top: 1px solid var(--hair); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Novice mode: glosses exist in the page but show only when the switch is on */
.gloss { display: none; align-items: baseline; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--inset); font-size: 13px; color: var(--fg-2); }
.gloss__term { color: var(--live); font-weight: 600; white-space: nowrap; }
.glosses { display: none; flex-wrap: wrap; gap: 8px; }
.is-novice .gloss { display: inline-flex; }
.is-novice .glosses { display: flex; }

/* Unverified marker */
.star { color: var(--alert); font-size: max(0.5em, 12px); font-weight: 400; vertical-align: super; letter-spacing: 0; }

/* Footer */
.lf-foot { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-top: 20px; border-top: 1px solid var(--hair-ground); font-size: 12px; color: var(--fg-3); }

@media (max-width: 640px) {
  .strip__end { margin-left: 0; }
  .row__date { flex-basis: 84px; }
  .tile { padding: 22px; }
  .count__n { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) { .lf * { animation: none !important; transition: none !important; } }
