/* ==========================================================================
   IMPRINT — Design System
   Travel app redesign · 2026
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- 2. Tokens ---------- */
:root,
[data-theme="light"] {
  --bg:            #FBFAF8;   /* warm paper, not clinical white */
  --bg-sunk:       #F1EFEA;
  --surface:       #FFFFFF;
  --surface-2:     #F6F4F0;
  --surface-3:     #EDEAE4;
  --line:          rgba(16,18,24,.09);
  --line-strong:   rgba(16,18,24,.16);
  --text:          #101218;
  --text-2:        #5A616F;
  --text-3:        #8B92A1;
  --scrim:         rgba(10,11,14,.55);
  --shadow-sm: 0 1px 2px rgba(16,18,24,.05), 0 1px 1px rgba(16,18,24,.03);
  --shadow-md: 0 4px 12px rgba(16,18,24,.07), 0 1px 3px rgba(16,18,24,.05);
  --shadow-lg: 0 18px 40px -12px rgba(16,18,24,.20), 0 4px 10px rgba(16,18,24,.05);
  --map-base:      #EDE9E1;
  --map-road:      #FFFFFF;
  --map-water:     #A9D4E4;
  --map-park:      #C6DDB4;
  --map-label:     rgba(16,18,24,.42);
  --city-dot:      #6E2005;   /* footprint city pins — readable on both land fills */
  /* Ink on a semantic tint. --brand-ink solved this for orange; the other three
     saturated hues have exactly the same problem, and unlike --brand-ink they are
     SCHEME-DEPENDENT: darkening is only needed over a light background. Found
     while building iOS, which had been re-deriving all three at call sites. */
  --amber-ink:     #B87400;
  --jade-ink:      #00785A;
  --rose-ink:      #A8003A;
}

[data-theme="dark"] {
  --bg:            #08090C;
  --bg-sunk:       #050609;
  --surface:       #14161C;
  --surface-2:     #1B1E26;
  --surface-3:     #242832;
  --line:          rgba(255,255,255,.09);
  --line-strong:   rgba(255,255,255,.18);
  --text:          #F3F5F9;
  --text-2:        #9BA3B4;
  --text-3:        #6B7385;
  --scrim:         rgba(0,0,0,.6);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 6px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 22px 48px -12px rgba(0,0,0,.7);
  --map-base:      #0E141C;
  --map-road:      #1F2836;
  --map-water:     #0A1C28;
  --map-park:      #111B15;
  --map-label:     rgba(255,255,255,.34);
  --city-dot:      #FFD98A;
  /* Dark needs no darkening: the tint is already dark, so the saturated hue is
     the legible choice and these collapse back onto the base colours. */
  --amber-ink:     #F5A623;
  --jade-ink:      #00B37E;
  --rose-ink:      #FF2D6F;
}

:root {
  /* Brand — carried over from the orange globe pins, now the signature */
  --brand:      #FF5B29;
  --brand-hi:   #FF7A4D;
  --brand-lo:   #E8410F;
  --brand-soft: rgba(255,91,41,.12);
  --brand-ink:  #6E2005;

  --sky:        #2E6BFF;   /* flights, live, links */
  --sky-soft:   rgba(46,107,255,.12);
  --jade:       #00B37E;   /* on time, visited, success */
  --jade-soft:  rgba(0,179,126,.14);
  --amber:      #F5A623;   /* delayed, warning */
  --amber-soft: rgba(245,166,35,.15);
  --rose:       #FF2D6F;   /* likes */
  --violet:     #6C5CE7;   /* map pins, itinerary order */
  --violet-soft:rgba(108,92,231,.14);

  /* Radii */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px; --r-2xl: 34px; --r-full: 999px;

  /* Type */
  --font: ui-sans-serif, -apple-system, "SF Pro Text", "SF Pro Display", "Inter",
          "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

/* ---------- 3. Base ---------- */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.011em;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); letter-spacing: -0.02em; }

/* ---------- 4. Documentation page shell ---------- */
.doc {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  padding: 28px 20px 40px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.rail__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
/* The app icon itself — `web/public/logo/mark.png`, which carries its own blue
   tile and its own rounded corners inside the artwork.
   ⚠️ No gradient, no shadow and no overflow clip here. This used to paint an
   orange tile behind a centred glyph, and against the real mark that is a frame
   of the OLD brand drawn around the new one. The inline size overrides in both
   documents still work: the picture fills whatever box they set. */
.rail__mark {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
}
.rail__mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.rail__name { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; }
.rail__tag { font-size: 11.5px; color: var(--text-3); margin: 0 0 22px 44px; margin-top: -4px; }
.rail__group { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); margin: 22px 0 8px 10px; }
.rail a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 13.5px; color: var(--text-2); font-weight: 500;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.rail a:hover { background: var(--surface-2); color: var(--text); }
.rail a.is-active { background: var(--brand-soft); color: var(--brand-lo); font-weight: 650; }
[data-theme="dark"] .rail a.is-active { color: var(--brand-hi); }
.rail__num { font-size: 10.5px; color: var(--text-3); font-family: var(--mono); width: 18px; }

.main { padding: 0 0 120px; min-width: 0; }
.wrap { max-width: 1360px; padding: 0 48px; margin: 0 auto; }

/* Doc header */
.hero { padding: 76px 0 56px; border-bottom: 1px solid var(--line); }
.hero__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 18px; }
.hero h1 { font-size: 62px; line-height: 1.02; letter-spacing: -0.04em; font-weight: 760; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { font-size: 18.5px; color: var(--text-2); max-width: 64ch; margin-top: 22px; line-height: 1.55; }

/* Section */
.section { padding: 64px 0 48px; scroll-margin-top: 0; }
/* NOTE for implementers: any element that opts a subtree into the opposite theme
   must re-declare BOTH background and color. `color` is only set on <body>, so
   descendants otherwise inherit the computed value instead of re-resolving
   var(--text) against the new tokens. `.screen` does this — see §6. */
.section__head { max-width: 76ch; margin-bottom: 36px; }
.section__kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); padding: 5px 11px; border-radius: var(--r-full);
  background: var(--brand-soft); margin-bottom: 16px; }
.section h2 { font-size: 38px; letter-spacing: -0.035em; line-height: 1.1; font-weight: 720; }
.section__lede { font-size: 17px; color: var(--text-2); margin-top: 14px; line-height: 1.6; }

/* Change notes */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 14px; margin: 30px 0 40px; }
.note { padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.note h4 { font-size: 13.5px; font-weight: 660; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.note p { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.note--fix h4::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--jade); flex: none; }
.note--new h4::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.note--kill h4::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); flex: none; }

/* Frame row */
.frames { display: flex; gap: 40px; overflow-x: auto; padding: 8px 4px 34px; scroll-snap-type: x proximity; }
.frames::-webkit-scrollbar { height: 8px; }
.frames::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.frame { flex: none; scroll-snap-align: start; }
.frame__cap { margin-top: 16px; width: 390px; }
.frame__cap b { font-size: 13.5px; font-weight: 640; display: block; }
.frame__cap span { font-size: 12.5px; color: var(--text-2); line-height: 1.5; display: block; margin-top: 3px; }

/* ---------- 5. Device frames ---------- */
.device {
  width: 390px; height: 844px; flex: none;
  border-radius: 54px; padding: 11px;
  background: linear-gradient(160deg, #3A3D46, #16181D 40%, #2A2D35);
  box-shadow: var(--shadow-lg), 0 0 0 1.5px rgba(255,255,255,.09) inset;
  position: relative;
}
.screen {
  width: 100%; height: 100%; border-radius: 43px; overflow: hidden;
  background: var(--bg); color: var(--text);
  position: relative; display: flex; flex-direction: column;
  isolation: isolate;
}
.notch {
  position: absolute; top: 21px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 30px; border-radius: var(--r-full); background: #000; z-index: 60;
}
.statusbar {
  height: 54px; flex: none; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 30px 8px; font-size: 14px; font-weight: 640; letter-spacing: -0.01em; z-index: 55;
}
.statusbar--over { position: absolute; top: 0; left: 0; right: 0; color: #fff; }
.statusbar__icons { display: flex; align-items: center; gap: 6px; }

.desktop {
  width: 1180px; flex: none; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg);
}
.desktop__bar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); }
.desktop__dots { display: flex; gap: 6px; }
.desktop__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.desktop__url { flex: 1; text-align: center; font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.desktop__body { display: flex; height: 700px; background: var(--bg); color: var(--text); }
.frame__cap--wide { width: 1180px; }

/* ---------- 6. App chrome ---------- */
.appbody { flex: 1; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.scrollarea { flex: 1; overflow: hidden; padding: 0 18px; }
.scrollarea--flush { padding: 0; }

.appbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 18px 14px; flex: none; }
.appbar__title { font-size: 27px; font-weight: 730; letter-spacing: -0.035em; }
.appbar__sub { font-size: 13px; color: var(--text-3); margin-top: 1px; }
.appbar__actions { display: flex; align-items: center; gap: 8px; }

.iconbtn {
  width: 36px; height: 36px; border-radius: var(--r-full); display: grid; place-items: center;
  background: var(--surface-2); color: var(--text); flex: none; position: relative;
  border: 1px solid transparent;
}
.iconbtn--ghost { background: transparent; }
.iconbtn--glass { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(14px); }
.iconbtn__dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand); border: 2px solid var(--bg); }

/* Bottom tab bar */
.tabbar {
  flex: none; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 9px 8px 26px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(24px) saturate(1.6);
  border-top: 1px solid var(--line); position: relative; z-index: 40;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--text-3); position: relative; }
.tab span { font-size: 10.5px; font-weight: 580; letter-spacing: -0.005em; }
.tab.is-active { color: var(--brand); }
.tab.is-active span { font-weight: 680; }

/* Unread count on a tab — a number, not a dot: an unread chat is countable */
.tab__badge {
  position: absolute; top: -3px; left: 50%; margin-left: 4px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-full);
  background: var(--brand); color: #fff; font-size: 9.5px; font-weight: 720;
  font-style: normal; display: grid; place-items: center;
  border: 2px solid var(--bg); box-sizing: content-box;
}

/* Create moved out of the tab bar so the fifth slot could go to Chats.
   Bottom-right is also the better thumb target on a 6.7" phone. */
.tabbar__fab {
  position: absolute; right: 16px; top: -66px;
  width: 54px; height: 54px; border-radius: 18px;
  background: linear-gradient(150deg, var(--brand-hi), var(--brand-lo));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 10px 26px -6px rgba(232,65,15,.6), 0 2px 6px rgba(0,0,0,.12);
}
.tab__fab {
  width: 46px; height: 46px; margin-top: -14px; border-radius: 16px;
  background: linear-gradient(150deg, var(--brand-hi), var(--brand-lo));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 8px 20px -4px rgba(232,65,15,.55);
}

/* Presence dot on an avatar */
.avatar-wrap { position: relative; flex: none; }
.presence { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--jade); border: 2.5px solid var(--surface); }
.presence--away { background: var(--amber); }
.presence--off { background: var(--text-3); }

/* ---------- 7. Primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card--flat { border-radius: var(--r-md); }
.card--sunk { background: var(--surface-2); border-color: transparent; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px;
  border-radius: var(--r-full); background: var(--surface-2); color: var(--text-2);
  font-size: 12.5px; font-weight: 560; white-space: nowrap; border: 1px solid transparent;
}
.chip.is-active { background: var(--text); color: var(--bg); font-weight: 640; }
.chip--outline { background: transparent; border-color: var(--line-strong); }

.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: var(--r-full); font-size: 11px; font-weight: 680; letter-spacing: -0.005em;
  white-space: nowrap; flex: none;
}
.pill--live { background: var(--jade); color: #fff; }
.pill--delay { background: var(--amber-soft); color: var(--amber-ink); }
.pill--sky { background: var(--sky-soft); color: var(--sky); }
.pill--brand { background: var(--brand-soft); color: var(--brand-lo); }
[data-theme="dark"] .pill--brand { color: var(--brand-hi); }
.pill--glass { background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(10px); }
.pill--ghost { background: var(--surface-2); color: var(--text-2); }

.dot-live { width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 0 currentColor; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 70%,100% { box-shadow: 0 0 0 6px transparent; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 20px; border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 640; letter-spacing: -0.012em;
  background: var(--surface-2); color: var(--text);
  white-space: nowrap; flex: none;
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(232,65,15,.6); }
.btn--dark { background: var(--text); color: var(--bg); }
.btn--outline { background: transparent; border: 1px solid var(--line-strong); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn--block { width: 100%; }

.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.sechead { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }
.sechead h3 { font-size: 17.5px; font-weight: 690; letter-spacing: -0.025em; }
.sechead a { font-size: 13px; color: var(--text-3); font-weight: 560; }

.avatar { border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff; overflow: hidden; }
/* Round, and small enough to sit inside a line of text — the airline mark in
   front of a flight number. The squircle (border-radius override) is the
   list-row treatment; on a card it reads as a second boarding pass. */
.avatar--22 { width: 22px; height: 22px; font-size: 9px; }
.avatar--28 { width: 28px; height: 28px; }
.avatar--34 { width: 34px; height: 34px; font-size: 12px; }
.avatar--44 { width: 44px; height: 44px; font-size: 14px; }
.avatar--64 { width: 64px; height: 64px; font-size: 20px; }
.stack { display: flex; }
.stack .avatar { border: 2px solid var(--surface); margin-left: -9px; }
.stack .avatar:first-child { margin-left: 0; }

.segmented { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--r-md); }
.segmented button { flex: 1; height: 32px; border-radius: var(--r-sm); font-size: 13px;
  font-weight: 580; color: var(--text-2); white-space: nowrap; }
/* Four segments only fit at a slightly tighter size on a 390 px screen */
.segmented--4 button { font-size: 12px; letter-spacing: -0.02em; }
/* The dynamic Today segment — present only when today has a flight or a plan */
.segmented button.seg-today.is-active { background: var(--brand); color: #fff; }
[data-theme="dark"] .segmented button.seg-today.is-active { background: var(--brand); color: #fff; }
.segmented button.is-active { background: var(--surface); color: var(--text); font-weight: 660; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .segmented button.is-active { background: var(--surface-3); }

.scroller { display: flex; gap: 8px; overflow: hidden; }
.divider { height: 1px; background: var(--line); }

/* ---------- 8. Photo placeholders (art-directed, no external assets) ---------- */
.photo { position: relative; overflow: hidden; background: var(--surface-3); }
.photo > * { position: relative; z-index: 3; }
.photo::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.photo__sil { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; z-index: 1;
  background-repeat: no-repeat; background-size: 100% 100%; background-position: bottom; }
.sil-city  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath fill='%23000' opacity='.62' d='M0 100V62h18V48h16v22h18V38h16v20h18V26h12v26h20v14h22V44h16v16h20V30h14v26h22v12h22V46h16v18h20V36h16v22h20v12h22V50h18v12h20V42h16v24h18v34z'/%3E%3C/svg%3E"); }
.sil-mount { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath fill='%23000' opacity='.5' d='M0 100V74l58-40 44 30 48-38 60 46 52-30 58 34 80-40v38z'/%3E%3Cpath fill='%23000' opacity='.32' d='M0 100V84l70-28 60 24 70-30 76 34 60-22 64 26v12z'/%3E%3C/svg%3E"); }
.sil-wave  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath fill='%23000' opacity='.28' d='M0 100V60c40-14 70 10 110 4s60-24 100-18 70 26 110 20 60-18 80-14v48z'/%3E%3C/svg%3E"); }
.sil-torii { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath fill='%23000' opacity='.55' d='M120 100V38h-14V26h188v12h-14v62h-14V38h-132v62zM100 18h200v6H100z'/%3E%3Cpath fill='%23000' opacity='.4' d='M0 100V88h400v12z'/%3E%3C/svg%3E"); }
.sil-palm  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath fill='%23000' opacity='.5' d='M300 100V42c-16-6-30-2-40 8 6-18 22-26 40-24-10-14-26-18-42-12 14-14 32-14 44-2 2-16 14-26 30-28-12 10-18 20-18 32 14-8 30-6 40 4-16-4-30 0-40 10 14 2 24 10 28 22-8-12-20-18-34-16v64z'/%3E%3Cpath fill='%23000' opacity='.35' d='M0 100V90h400v10z'/%3E%3C/svg%3E"); }

.ph-tokyo  { background: linear-gradient(178deg,#16233F 0%,#3B4E7E 32%,#8A6E9A 58%,#E68A5C 80%,#FFC98A 100%); }
.ph-night  { background: linear-gradient(178deg,#070B16 0%,#141F3C 42%,#2A2456 72%,#5B2E63 100%); }
.ph-hk     { background: linear-gradient(178deg,#0C2438 0%,#1B4F63 38%,#3E8FA0 66%,#96D0CE 100%); }
.ph-beijing{ background: linear-gradient(178deg,#4A1F16 0%,#96371E 34%,#D0662E 64%,#F0A65E 100%); }
.ph-alaska { background: linear-gradient(178deg,#0E2233 0%,#255A6B 36%,#5D9E9A 64%,#C9E3D6 100%); }
.ph-lisbon { background: linear-gradient(178deg,#3D1E44 0%,#8A3A5C 34%,#E0715E 66%,#FFC287 100%); }
.ph-seoul  { background: linear-gradient(178deg,#191933 0%,#3A2F5E 38%,#7E4E86 68%,#E29AA4 100%); }
.ph-bali   { background: linear-gradient(178deg,#0B3B3A 0%,#1E7A6C 36%,#5FBE93 64%,#D8EFB8 100%); }
.ph-swiss  { background: linear-gradient(178deg,#1B3350 0%,#4C7CA6 36%,#A8CBDE 68%,#F0F6F8 100%); }
.ph-food   { background: linear-gradient(150deg,#5B1F12 0%,#A8462A 40%,#E0894A 72%,#F7D6A8 100%); }
.ph-street { background: linear-gradient(178deg,#1A1420 0%,#43263A 38%,#8A4356 68%,#D98E76 100%); }
.ph-park   { background: linear-gradient(178deg,#123020 0%,#2E6B3E 38%,#7FB05C 68%,#DCE8A8 100%); }

.photo--dim::before { content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(6,8,12,0) 32%, rgba(6,8,12,.82) 100%); }
.photo--dim-all::before { content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(6,8,12,.45) 0%, rgba(6,8,12,.15) 45%, rgba(6,8,12,.86) 100%); }

/* ---------- 8b. Rotating earth ---------- */
/* The world strip is 344 user units wide and drawn twice, side by side, then
   translated by exactly one strip width — so the loop is seamless. Clipped to a
   circle with a radial vignette over it, a flat strip reads as a sphere. */
@keyframes earth-spin { from { transform: translateX(0); } to { transform: translateX(-344px); } }
.earth-strip { animation: earth-spin 60s linear infinite; }
.earth-strip--fast { animation-duration: 34s; }
@media (prefers-reduced-motion: reduce) { .earth-strip { animation: none; } }

/* ---------- 9. Map placeholder ---------- */
.map {
  position: relative; overflow: hidden; background: var(--map-base);
  background-image:
    repeating-linear-gradient(97deg, transparent 0 43px, var(--map-road) 43px 47px),
    repeating-linear-gradient(7deg,  transparent 0 52px, var(--map-road) 52px 55px),
    repeating-linear-gradient(97deg, transparent 0 137px, var(--map-road) 137px 145px),
    repeating-linear-gradient(7deg,  transparent 0 163px, var(--map-road) 163px 170px);
}
/* Water bodies are anchored off-canvas so only a coastline arc is visible —
   an on-canvas circle reads as a blob, an off-canvas one reads as a bay. */
.map::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(62% 44% at 116% 106%, var(--map-water) 0 62%, transparent 63%),
    radial-gradient(34% 26% at -10% -8%, var(--map-water) 0 62%, transparent 63%),
    radial-gradient(11% 8% at 20% 33%, var(--map-park) 0 72%, transparent 73%),
    radial-gradient(8% 6.5% at 26% 37%, var(--map-park) 0 72%, transparent 73%),
    radial-gradient(7% 5.5% at 66% 15%, var(--map-park) 0 72%, transparent 73%),
    radial-gradient(5% 7% at 71% 19%, var(--map-park) 0 72%, transparent 73%),
    radial-gradient(6% 9% at 50% 70%, var(--map-park) 0 72%, transparent 73%);
}
.map > * { position: relative; z-index: 3; }
.map--dark { --map-base:#0E141C; --map-road:#1F2836; --map-water:#0A1C28; --map-park:#111B15; }
/* A WORLD map, not a street map. The road grating and the coastline blobs above
   are a city render and read as noise under continents — flat ocean here, with
   the land drawn on top from `#w-land`. Water and land are the theme's own
   `--map-water` / `--surface-3`, which is what all three canvases use. */
.map--world { background-image: none; background-color: var(--map-water); }
.map--world::before { display: none; }

.mapdim::after { content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(8,10,14,.5), transparent 40%, rgba(8,10,14,.62)); }

.pin {
  position: absolute; width: 26px; height: 26px; border-radius: 50% 50% 50% 2px;
  transform: rotate(-45deg); background: var(--violet); color: #fff;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 720; z-index: 5;
  box-shadow: 0 4px 10px rgba(0,0,0,.35); border: 2px solid #fff;
}
.pin span { transform: rotate(45deg); }
.pin--done { background: var(--jade); }
.pin--hotel { background: var(--amber); }
.pin--brand { background: var(--brand); }

/* ---------- 10. Flight components ---------- */
.flightcard {
  border-radius: var(--r-xl); overflow: hidden; position: relative; color: #fff;
  background: linear-gradient(155deg,#101A33 0%,#16233F 42%,#221C43 100%);
  box-shadow: 0 18px 36px -18px rgba(16,24,52,.65);
}
.flightcard::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 88% -14%, rgba(46,107,255,.42), transparent 62%),
              radial-gradient(90% 70% at 4% 108%, rgba(255,91,41,.24), transparent 60%);
}
.flightcard > * { position: relative; }

.route { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.route__code { font-size: 34px; font-weight: 740; letter-spacing: -0.045em; line-height: 1; }
.route__city { font-size: 12.5px; opacity: .62; margin-top: 5px; }
.route__time { font-size: 15px; font-weight: 640; margin-top: 9px; }
.route--right { text-align: right; }

.progline { position: relative; height: 2px; border-radius: 2px; background: rgba(255,255,255,.22); margin: 0 6px; }
.progline i { position: absolute; inset: 0 auto 0 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--sky), #7FA9FF); }
.progline .plane { position: absolute; top: 50%; translate: -50% -50%; color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.progline--dashed { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.3) 0 5px, transparent 5px 10px);
  background-color: transparent; }

.tiles { display: grid; gap: 8px; }
.tile { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-md); padding: 11px 12px; }
.tile__k { font-size: 10px; font-weight: 660; letter-spacing: .09em; text-transform: uppercase; opacity: .55; }
.tile__v { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin-top: 3px; }
.tile__v small { font-size: 12px; font-weight: 560; opacity: .6; }

.boardingpass { position: relative; }
.boardingpass::before, .boardingpass::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); top: var(--notch-y, 50%); translate: 0 -50%; z-index: 6;
  border: 1px solid var(--line);
}
.boardingpass::before { left: -10px; }
.boardingpass::after  { right: -10px; }

/* ---------- 11. Lists / rows ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.row__title { font-size: 14.5px; font-weight: 620; letter-spacing: -0.015em; }
.row__meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.thumb { width: 54px; height: 54px; border-radius: var(--r-md); flex: none; }
.thumb--lg { width: 74px; height: 74px; border-radius: var(--r-md); }

.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 20px;
  width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: -26px; top: 16px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--surface); border: 2.5px solid var(--line-strong); }
.tl-item--now::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.tl-item--done::before { background: var(--jade); border-color: var(--jade); }
.tl-time { font-size: 11.5px; font-weight: 680; color: var(--text-3); letter-spacing: .02em; }
.tl-walk { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3);
  padding: 2px 0 10px; }

/* ---------- 12. Masonry (Explore) ---------- */
.masonry { columns: 2; column-gap: 10px; }
.masonry > * { break-inside: avoid; margin-bottom: 10px; }

.post { border-radius: var(--r-md); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.post__body { padding: 9px 10px 10px; }
.post__title { font-size: 13px; font-weight: 620; line-height: 1.34; letter-spacing: -0.012em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post__foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.post__author { font-size: 11.5px; color: var(--text-3); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post__like { display: flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--text-3); }

/* ---------- 13. Stats ---------- */
.statgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { padding: 15px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.stat__v { font-size: 25px; font-weight: 730; letter-spacing: -0.035em; line-height: 1.1; }
.stat__v small { font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: -0.01em; }
.stat__k { font-size: 11.5px; color: var(--text-3); margin-top: 3px; font-weight: 540; }

.ring { --p: 62; --c: var(--brand); width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0);
  display: grid; place-items: center; }
.ring::after { content: ""; position: absolute; }
.ring i { width: 50px; height: 50px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; }

.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }

/* Badges (§4.7). The tile holds an illustrated MEDALLION, not a glyph — the set
   is 23 rendered badges served from /badges/, and the emoji version this drew
   until 2026-08-11 went with the twelve client-side predicates behind it.
   A locked tile goes greyscale AND dims: dimming alone leaves a full-colour
   render that still reads as earned at 68 px. */
.badgegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.badge { aspect-ratio: 1; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--surface-2); position: relative; }
.badge__art { width: 68%; height: 68%; object-fit: contain; transform: translateY(-6px); }
.badge--locked { opacity: .35; }
.badge--locked .badge__art { filter: grayscale(1); }
.badge__label { position: absolute; bottom: 5px; left: 0; right: 0; text-align: center;
  font-size: 8.5px; font-weight: 640; color: var(--text-3); letter-spacing: .01em; }

/* Passport stamps (§4.7). Rendered in both documents; the FEATURE is not built —
   a stamp is minted from a landing already in the flight log, so it needs a
   persisted table the badge ledger deliberately deferred. The double border and
   the tilt are what read as "stamp" at 100 px, so both are structural. */
.stampgrid { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 9px; }
.stamp { position: relative; aspect-ratio: 1; display: grid; place-items: center; text-align: center;
  padding: 7px; border-radius: 50%; border: 2px solid currentColor; color: var(--brand);
  rotate: -6deg; opacity: .92; }
.stamp::after { content: ""; position: absolute; inset: 5px; border-radius: inherit;
  border: 1px solid currentColor; opacity: .45; }
.stamp:nth-child(2n) { rotate: 5deg; }
.stamp:nth-child(3n) { rotate: -2deg; }
.stamp em { display: block; font-style: normal; font-size: 17px; line-height: 1; margin-bottom: 3px; }
/* The stamp's flag is artwork, not a glyph: it needs centring the way text
   did not. */
.stamp em .flag { margin: 0 auto; }
.stamp b { display: block; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; line-height: 1.15; }
.stamp span { display: block; font-size: 8px; font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; opacity: .72; margin-top: 2px; }
.stamp--locked { color: var(--text-3); border-style: dashed; border-width: 1.5px; opacity: .4; rotate: 0deg; }
.stamp--locked::after { display: none; }

/* Country flags — the pack the iOS app draws, inlined in the sprite. Circular
   artwork, so no radius and no border: the disc IS the shape. Never an emoji
   here, which renders at text weight beside artwork and reads as a different
   class of object. */
.flag { width: 26px; height: 26px; flex: none; display: block; }
.flagrow { display: flex; align-items: center; gap: 8px; overflow-x: auto; }
.flagrow::-webkit-scrollbar { display: none; }

/* The distance drill-down: the fill IS the bar and the planet rides on it. */
.planetbar { position: relative; display: flex; align-items: center; height: 56px; }
.planetbar__track { position: absolute; inset: 0; border-radius: var(--r-full); background: var(--surface-2); }
/* min-width holds the planet on its own fill — a 0.06 % bar would otherwise
   leave the Sun hanging half off the end of it. */
.planetbar__fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: var(--r-full);
  background: var(--brand); min-width: 56px; }
.planetbar svg { position: relative; z-index: 2; width: 38px; height: 38px; margin-left: 9px; }
.planetbar__label { position: relative; z-index: 2; flex: 1; text-align: right; padding-right: 16px;
  font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text); }
.planetbar__label b { font-size: 17px; font-weight: 730; }
/* White only once the label sits over orange; on the track it would vanish. */
.planetbar.is-full .planetbar__label { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); }

/* The countries drill-down: a grey world filling with BRAND from the bottom.
   Unmasking the artwork's OWN colours fills with ocean blue, which reads as a
   rendering artefact — the colour that arrives has nothing to do with you.
   The fill is a plain disc rather than a tint of the artwork, and is exactly the
   same silhouette: the planet is a circle of r=256 in a 512 viewBox. */
.worldfill { position: relative; width: 148px; height: 148px; flex: none; }
.worldfill__base { position: absolute; inset: 0; width: 100%; height: 100%;
  filter: grayscale(1); opacity: .28; }
/* Clipped from the bottom by its own height. A floor of 6 px, not 3: this is the
   bottom of a CIRCLE, where the chord is narrowest, so the sliver that reads as
   "not nothing" on a bar is a fleck here. */
.worldfill__clip { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden;
  height: max(6px, var(--fill, 0%)); }
.worldfill__clip svg { position: absolute; left: 0; bottom: 0; width: 148px; height: 148px; }

/* Status pill — used by both documents to mark what is built vs planned.
   Ink tokens, not re-derived hexes; this rule used to carry four of them. */
.st { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 9px; border-radius: var(--r-full);
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.st--live { background: var(--jade-soft); color: var(--jade-ink); }
.st--wip { background: var(--amber-soft); color: var(--amber-ink); }
.st--none { background: var(--surface-3); color: var(--text-3); }

/* ---------- 14. Sheet / modal ---------- */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  box-shadow: 0 -18px 44px rgba(0,0,0,.28); padding: 10px 18px 30px; }
.sheet__grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line-strong);
  margin: 0 auto 14px; }
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 45; backdrop-filter: blur(2px); }

/* ---------- 15. Chat ---------- */
.bubble { max-width: 74%; padding: 9px 13px; border-radius: 18px; font-size: 14px; line-height: 1.42; }
.bubble--in  { background: var(--surface-2); border-bottom-left-radius: 5px; align-self: flex-start; }
.bubble--out { background: var(--brand); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }

/* ---------- 16. Editor (desktop) ---------- */
.toolbar { display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line); }
.toolbar button { width: 30px; height: 30px; border-radius: var(--r-xs); display: grid; place-items: center;
  font-size: 13px; color: var(--text-2); font-weight: 600; }
.toolbar button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.toolbar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 5px; }

/* ---------- 17. Swatches ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 12px; }
.swatch { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.swatch i { display: block; height: 68px; }
.swatch b { display: block; font-size: 12.5px; font-weight: 620; padding: 9px 11px 1px; }
.swatch code { display: block; font-family: var(--mono); font-size: 11px; color: var(--text-3); padding: 0 11px 10px; }

.typescale { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.typescale > div { display: flex; align-items: baseline; gap: 24px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.typescale > div:last-child { border-bottom: 0; }
.typescale code { font-family: var(--mono); font-size: 11px; color: var(--text-3); width: 168px; flex: none; }

/* Text must stay inline, so the marker is absolute rather than a flex item */
.speclist { display: grid; gap: 10px; }
.speclist li { position: relative; padding-left: 22px; font-size: 14px;
  color: var(--text-2); line-height: 1.55; }
.speclist li b { color: var(--text); font-weight: 640; }
.speclist li::before { content: "→"; position: absolute; left: 0; top: 0;
  color: var(--brand); font-weight: 700; }

table.spec { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.spec th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-3); padding: 0 14px 10px; font-weight: 700; }
table.spec td { padding: 13px 14px; border-top: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
table.spec td:first-child { color: var(--text); font-weight: 620; white-space: nowrap; }

/* ---------- 18. Utilities ---------- */
.f { display: flex; } .fc { display: flex; flex-direction: column; }
.ac { align-items: center; } .ab { align-items: baseline; } .as { align-items: flex-start; }
.jb { justify-content: space-between; } .jc { justify-content: center; }
.g4{gap:4px}.g6{gap:6px}.g8{gap:8px}.g10{gap:10px}.g12{gap:12px}.g14{gap:14px}.g16{gap:16px}.g20{gap:20px}
.grow { flex: 1; min-width: 0; }
.mt2{margin-top:2px}.mt4{margin-top:4px}.mt6{margin-top:6px}.mt8{margin-top:8px}.mt10{margin-top:10px}
.mt12{margin-top:12px}.mt14{margin-top:14px}.mt16{margin-top:16px}.mt20{margin-top:20px}.mt24{margin-top:24px}
.mb2{margin-bottom:2px}.mb4{margin-bottom:4px}.mb6{margin-bottom:6px}.mb8{margin-bottom:8px}
.mb10{margin-bottom:10px}.mb12{margin-bottom:12px}.mb14{margin-bottom:14px}.mb16{margin-bottom:16px}
.mb18{margin-bottom:18px}.mb20{margin-bottom:20px}.mb24{margin-bottom:24px}
.p10{padding:10px}.p12{padding:12px}.p14{padding:14px}.p16{padding:16px}.p18{padding:18px}
.tc { text-align: center; } .tr { text-align: right; }
.t3 { color: var(--text-3); } .t2 { color: var(--text-2); }
.fs10{font-size:10px}.fs11{font-size:11px}.fs12{font-size:12px}.fs13{font-size:13px}
.fs14{font-size:14px}.fs15{font-size:15px}.fs16{font-size:16px}.fs17{font-size:17px}
.fs19{font-size:19px}.fs22{font-size:22px}.fs26{font-size:26px}.fs32{font-size:32px}
.w5{font-weight:500}.w6{font-weight:600}.w65{font-weight:650}.w7{font-weight:700}.w73{font-weight:730}
.tight { letter-spacing: -0.03em; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel { position: relative; }
.abs-fill { position: absolute; inset: 0; }
.round { border-radius: var(--r-full); }
.op6 { opacity: .6; } .op7 { opacity: .7; } .op8 { opacity: .8; }

/* Children of .photo must keep their own positioning */
.photo > .statusbar--over, .photo > .abs-fill { position: absolute; }
.badge__label { z-index: 2; }

/* Inline code in documentation prose */
code { font-family: var(--mono); font-size: .88em; padding: 1px 5px; border-radius: var(--r-xs);
  background: var(--surface-2); color: var(--text-2); letter-spacing: -0.01em; }
.frame__cap code, .note code, .speclist code { font-size: .85em; }
table.spec code { background: var(--surface-3); }
.swatch code { background: none; padding: 0 11px 10px; }

/* ---------- 18b. Per-section theme switch ---------- */
/* Tokens are declared on [data-theme], so stamping data-theme on a <section>
   re-themes only that subtree. Screens that hard-code data-theme="dark"
   (flight tracking, create sheet, passport) are unaffected by design. */
.section > .wrap { position: relative; }

/* ---------- 18b. Global preview bar ---------- */
/* One control for the whole document: platform + theme. Fixed, so it stays
   reachable at any scroll position. Both flags live on <html>. */
.gbar {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 300; display: flex; align-items: center; gap: 6px; padding: 5px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(22px) saturate(1.7);
  border: 1px solid var(--line); border-radius: var(--r-full);
  box-shadow: var(--shadow-lg);
}
.gbar__div { width: 1px; height: 22px; background: var(--line); flex: none; }
.gseg { display: flex; gap: 2px; }
.gseg button {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 16px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 620; color: var(--text-3); white-space: nowrap;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.gseg button svg { flex: none; }
.gseg button:hover { color: var(--text-2); }
.gseg--theme button.is-active { background: var(--text); color: var(--bg); }
.gseg--plat  button.is-active { background: var(--brand); color: #fff; }

@media (max-width: 560px) {
  .gbar { bottom: 14px; padding: 4px; }
  .gseg button { height: 32px; padding: 0 12px; font-size: 12.5px; gap: 5px; }
}

/* ---------- 18c. Platform preview (iOS ⇄ Web) ---------- */
.frames--web { display: none; }
[data-platform="web"] .frames--ios { display: none; }
[data-platform="web"] .frames--web { display: flex; }

/* Web app shell used by every desktop frame */
.webrail {
  width: 232px; flex: none; padding: 18px 14px;
  border-right: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column;
}
.webnav {
  display: flex; align-items: center; gap: 10px; margin-bottom: 2px;
  padding: 9px 11px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 550; color: var(--text-2);
}
.webnav svg { flex: none; }
.webnav.is-active { background: var(--brand-soft); color: var(--brand-lo); font-weight: 660; }
[data-theme="dark"] .webnav.is-active { color: var(--brand-hi); }
.webmain { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.webhead {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 24px; border-bottom: 1px solid var(--line);
}
.webbody { flex: 1; overflow: hidden; padding: 20px 24px; }
.webbody--flush { padding: 0; }
.webcols { display: flex; gap: 20px; align-items: flex-start; }

@media (max-width: 1080px) {
  .doc { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .wrap { padding: 0 24px; }
  .hero h1 { font-size: 42px; }
}
