/* Lodestar - private household resilience
   Design language: private-bank. Warm ivory paper, deep navy, one brass accent used sparingly,
   serif for headlines and figures, sans for everything you operate, hairlines instead of fills,
   status shown as a thin marker plus a label (never colour alone). */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --serif: 'Newsreader Variable', 'Newsreader', 'Iowan Old Style', Georgia, 'Times New Roman', serif;

  --bg: #f1eee6;
  --bg-2: #e9e5d9;
  --surface: #fdfcf9;
  --surface-2: #f7f4ed;
  --surface-3: #ece8de;
  --shell: rgba(26, 40, 68, 0.05);
  --line: #e7e1d4;
  --line-strong: #d5ccb9;
  --ink: #0f1726;
  --ink-2: #374052;
  --ink-3: #5f6575;
  --accent: #14284b;
  --accent-2: #1f3d6e;
  --accent-ink: #fbf8f1;
  --accent-soft: #e9ecf2;
  --accent-line: #c5cde0;
  --brass: #7a5f22;
  --brass-2: #b08d45;
  --brass-soft: #f2eadb;

  --steady: #3f7d63;   --steady-ink: #2c6049;   --steady-soft: #e5eee8;
  --watch: #b08a2e;    --watch-ink: #765b13;    --watch-soft: #f3ecd6;
  --prepare: #bf6a2c;  --prepare-ink: #8a4716;  --prepare-soft: #f4e4d6;
  --act: #a63a30;      --act-ink: #8a2820;      --act-soft: #f3dfdb;

  --lv1: #5b9474; --lv2: #c6a23c; --lv3: #cc7a3f; --lv4: #a8392f;
  --m-sea: #e6e1d3;
  --m-0: #d8d1bf;
  --m-1: #b3cab8;
  --m-2: #e4d291;
  --m-3: #e0a56f;
  --m-4: #bf5f51;
  --m-edge: rgba(253, 252, 249, 0.85);
  --r0: #a9c5b3; --r1: #c3d3ad; --r2: #e4d291; --r3: #ebc27f; --r4: #e0a56f; --r5: #d0805a; --r6: #bf5f51; --r7: #a64a3f;
  --m-void: #ebe7dc; --m-sea2: #dce5e3; --m-sphere: rgba(20, 40, 75, 0.2); --m-grat: rgba(20, 40, 75, 0.07); --m-hatch: rgba(15, 23, 38, 0.3);

  --nav-bg: #0b1424;
  --nav-bg-2: #0f1b32;
  --nav-ink: #efe9dc;
  --nav-ink-2: #8f9cb3;
  --nav-line: rgba(255, 255, 255, 0.07);
  --nav-active: rgba(255, 255, 255, 0.07);
  --nav-brass: #cfab62;

  --glass: rgba(253, 252, 249, 0.78);
  --scrim: rgba(8, 13, 24, 0.46);

  --ring: 0 0 0 1px rgba(26, 40, 68, 0.07);
  --hi: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --sh-1: 0 0 0 1px rgba(26, 40, 68, 0.06), 0 1px 1px rgba(26, 40, 68, 0.03), 0 8px 22px -12px rgba(26, 40, 68, 0.14);
  --sh-2: 0 0 0 1px rgba(26, 40, 68, 0.08), 0 2px 4px rgba(26, 40, 68, 0.04), 0 22px 44px -20px rgba(26, 40, 68, 0.24);
  --shadow-float: 0 34px 80px -26px rgba(11, 20, 36, 0.5), 0 6px 16px rgba(11, 20, 36, 0.1);

  --r-shell: 22px;
  --r-surface: 16px;
  --r-control: 10px;
  --r-chip: 6px;
  --bezel: 6px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --nav-w: 264px;
  --gutter: 44px;
  --tabbar-h: 66px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}


@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
  --bg: #070c15;
    --bg-2: #0a111d;
    --surface: #0e1522;
    --surface-2: #121b2c;
    --surface-3: #19243a;
    --shell: rgba(255, 255, 255, 0.035);
    --line: #1c2941;
    --line-strong: #2b3b59;
    --ink: #ece7da;
    --ink-2: #b9c0cf;
    --ink-3: #8893a8;
    --accent: #e8e1d0;
    --accent-2: #f3eddc;
    --accent-ink: #0b1424;
    --accent-soft: #16223a;
    --accent-line: #2b3b59;
    --brass: #cfab62;
    --brass-2: #e0bf7a;
    --brass-soft: #241d0f;
    --steady: #5ea486;  --steady-ink: #86c4a8;  --steady-soft: #10241c;
    --watch: #d1a94a;   --watch-ink: #dcbb6a;   --watch-soft: #272010;
    --prepare: #d98a4e; --prepare-ink: #e5a577; --prepare-soft: #2a1c10;
    --act: #cf5a4e;     --act-ink: #e88b80;     --act-soft: #2e1614;
    --lv1: #5ea486; --lv2: #d1a94a; --lv3: #d98a4e; --lv4: #cf5a4e;
    --m-sea: #0a1220;
    --m-0: #17233a;
    --m-1: #2b5845;
    --m-2: #7a6a2e;
    --m-3: #98592d;
    --m-4: #8f3a33;
    --m-edge: rgba(7, 12, 21, 0.9);
    --r0: #2a6b55; --r1: #3f6b45; --r2: #7a6a2e; --r3: #8a6a2a; --r4: #98592d; --r5: #964330; --r6: #8f3a33; --r7: #7a2a25;
    --m-void: #060b14; --m-sea2: #0a1626; --m-sphere: rgba(255, 255, 255, 0.12); --m-grat: rgba(255, 255, 255, 0.05); --m-hatch: rgba(255, 255, 255, 0.24);
    --nav-bg: #060b14;
    --nav-bg-2: #0a1222;
    --nav-line: rgba(255, 255, 255, 0.06);
    --glass: rgba(14, 21, 34, 0.76);
    --scrim: rgba(0, 0, 0, 0.62);
    --ring: 0 0 0 1px rgba(255, 255, 255, 0.07);
    --hi: inset 0 1px 0 rgba(255, 255, 255, 0.045);
    --sh-1: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
    --sh-2: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 26px 50px -22px rgba(0, 0, 0, 0.85);
    --shadow-float: 0 34px 80px -26px rgba(0, 0, 0, 0.9), 0 6px 16px rgba(0, 0, 0, 0.5);
  
  }
}
:root[data-theme='dark'] {
  --bg: #070c15;
  --bg-2: #0a111d;
  --surface: #0e1522;
  --surface-2: #121b2c;
  --surface-3: #19243a;
  --shell: rgba(255, 255, 255, 0.035);
  --line: #1c2941;
  --line-strong: #2b3b59;
  --ink: #ece7da;
  --ink-2: #b9c0cf;
  --ink-3: #8893a8;
  --accent: #e8e1d0;
  --accent-2: #f3eddc;
  --accent-ink: #0b1424;
  --accent-soft: #16223a;
  --accent-line: #2b3b59;
  --brass: #cfab62;
  --brass-2: #e0bf7a;
  --brass-soft: #241d0f;
  --steady: #5ea486;  --steady-ink: #86c4a8;  --steady-soft: #10241c;
  --watch: #d1a94a;   --watch-ink: #dcbb6a;   --watch-soft: #272010;
  --prepare: #d98a4e; --prepare-ink: #e5a577; --prepare-soft: #2a1c10;
  --act: #cf5a4e;     --act-ink: #e88b80;     --act-soft: #2e1614;
  --lv1: #5ea486; --lv2: #d1a94a; --lv3: #d98a4e; --lv4: #cf5a4e;
  --m-sea: #0a1220;
  --m-0: #17233a;
  --m-1: #2b5845;
  --m-2: #7a6a2e;
  --m-3: #98592d;
  --m-4: #8f3a33;
  --m-edge: rgba(7, 12, 21, 0.9);
  --r0: #2a6b55; --r1: #3f6b45; --r2: #7a6a2e; --r3: #8a6a2a; --r4: #98592d; --r5: #964330; --r6: #8f3a33; --r7: #7a2a25;
  --m-void: #060b14; --m-sea2: #0a1626; --m-sphere: rgba(255, 255, 255, 0.12); --m-grat: rgba(255, 255, 255, 0.05); --m-hatch: rgba(255, 255, 255, 0.24);
  --nav-bg: #060b14;
  --nav-bg-2: #0a1222;
  --nav-line: rgba(255, 255, 255, 0.06);
  --glass: rgba(14, 21, 34, 0.76);
  --scrim: rgba(0, 0, 0, 0.62);
  --ring: 0 0 0 1px rgba(255, 255, 255, 0.07);
  --hi: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --sh-1: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
  --sh-2: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 26px 50px -22px rgba(0, 0, 0, 0.85);
  --shadow-float: 0 34px 80px -26px rgba(0, 0, 0, 0.9), 0 6px 16px rgba(0, 0, 0, 0.5);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  letter-spacing: 0.002em;
}
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, [role='button'], .tappable { touch-action: manipulation; }
button, [role='button'], .seg button, .chip-btn, .tab { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--ink); text-underline-offset: 3px; }
input, textarea, select { font-size: 16px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.ico { width: 18px; height: 18px; flex: none; fill: currentColor; }
.ico.sm { width: 15px; height: 15px; }
.ico.lg { width: 22px; height: 22px; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.nav { display: none; }
.main { min-width: 0; padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 36px); }

body::after {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.032; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
:root[data-theme='dark'] body::after { mix-blend-mode: screen; opacity: 0.02; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) body::after { mix-blend-mode: screen; opacity: 0.02; } }
body { background-image: radial-gradient(1200px 520px at 85% -8%, color-mix(in srgb, var(--brass) 9%, transparent), transparent 70%), radial-gradient(900px 500px at -10% 105%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%); background-attachment: fixed; }

.topbar {
  position: sticky; top: calc(var(--safe-top) + 10px); z-index: 20;
  display: flex; align-items: center; gap: 12px;
  margin: calc(var(--safe-top) + 10px) 12px 0; padding: 8px 10px 8px 12px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-radius: 20px; box-shadow: var(--sh-1);
}
.topbar .title { font-family: var(--serif); font-size: 21px; font-weight: 420; letter-spacing: -0.005em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .actions { display: flex; align-items: center; gap: 8px; }
.brandmark { display: inline-flex; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(160deg, var(--nav-bg-2), var(--nav-bg)); color: var(--nav-brass); align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 10px -4px rgba(11, 20, 36, 0.5); }
.brandmark .ico { width: 17px; height: 17px; }

.page { padding: 26px 16px 8px; max-width: 1320px; margin: 0 auto; display: grid; gap: 20px; align-content: start; }
.page > * { min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; margin-bottom: 8px; }
.page-head h1 { font-family: var(--serif); font-size: 34px; line-height: 1.06; letter-spacing: -0.018em; font-weight: 350; font-variation-settings: 'opsz' 60; }
.page-head .sub { color: var(--ink-3); margin-top: 10px; max-width: 64ch; font-size: 14.5px; line-height: 1.55; }
.page-head .grow { flex: 1; min-width: 220px; }
.page-head .tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; min-width: 0; max-width: 100%; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.page-head .eyebrow { margin-bottom: 10px; color: var(--brass); }

.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border-radius: 26px; box-shadow: var(--sh-2);
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 50px; padding: 4px 2px;
  font-size: 11.5px; font-weight: 550; letter-spacing: 0.01em; color: var(--ink-3);
  border-radius: 20px;
  transition: transform 150ms var(--ease-out), color 150ms var(--ease-out), background-color 200ms var(--ease-out);
}
.tab .ico { width: 23px; height: 23px; }
.tab:active { transform: scale(0.96); }
.tab[aria-current='page'] { color: var(--ink); background: var(--surface-3); }
.tab[aria-current='page'] .ico { color: var(--brass); }
.tab .pip { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; font-size: 11px; font-weight: 600; line-height: 16px; text-align: center; color: #fff; background: var(--act); }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: calc(var(--nav-w) + 12px) minmax(0, 1fr); }
  .nav {
    display: flex; flex-direction: column; gap: 3px;
    position: sticky; top: 12px; height: calc(100dvh - 24px); margin: 12px 0 12px 12px; padding: 20px 12px 14px;
    background: linear-gradient(180deg, var(--nav-bg-2), var(--nav-bg) 70%); color: var(--nav-ink);
    border-radius: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.04), 0 40px 70px -34px rgba(7, 12, 22, 0.7);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .tabbar { display: none; }
  .topbar { display: none; }
  .main { padding-bottom: 56px; }
  .page { padding: 52px var(--gutter) 8px; gap: 24px; }
  .page-head h1 { font-size: 46px; }
}

.nav .brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; margin-bottom: 4px; }
.nav .brand .brandmark { background: rgba(255, 255, 255, 0.04); width: 34px; height: 34px; border-radius: 11px; box-shadow: inset 0 0 0 1px rgba(207, 171, 98, 0.35); }
.nav .brand b { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; line-height: 1.2; color: var(--nav-ink); }
.nav .brand span { display: block; font-size: 11px; color: var(--nav-ink-2); line-height: 1.3; margin-top: 4px; letter-spacing: 0.02em; }
.nav .group { margin: 20px 12px 6px; font-size: 11px; font-weight: 600; color: #627190; letter-spacing: 0.2em; text-transform: uppercase; }
.nav a.item {
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px;
  color: var(--nav-ink-2); text-decoration: none; border-radius: 12px; font-weight: 450; font-size: 13.5px;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 150ms var(--ease-out);
}
.nav a.item .ico { transition: color 160ms var(--ease-out); }
.nav a.item:active { transform: scale(0.98); }
.nav a.item[aria-current='page'] { background: var(--nav-active); color: var(--nav-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.nav a.item[aria-current='page'] .ico { color: var(--nav-brass); }
.nav a.item .count { margin-left: auto; font-size: 11px; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 99px; background: rgba(207, 90, 78, 0.16); color: #f0a49c; font-weight: 600; }
.nav .foot { margin-top: auto; padding: 14px 6px 0; border-top: 1px solid var(--nav-line); display: grid; gap: 8px; }
.nav .foot .state { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--nav-ink-2); padding: 0 6px; }
.nav .foot .dot { width: 6px; height: 6px; border-radius: 99px; background: #5ea486; flex: none; box-shadow: 0 0 0 3px rgba(94, 164, 134, 0.18); }
.nav .foot .dot.off { background: #6b7684; box-shadow: none; }
.nav .foot .dot.warn { background: var(--watch); }
.nav .foot .btn { background: rgba(255, 255, 255, 0.05); color: var(--nav-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }

@media (hover: hover) and (pointer: fine) {
  .nav a.item:hover { background: rgba(255, 255, 255, 0.05); color: var(--nav-ink); }
  .tab:hover { color: var(--ink); }
}

/* ---------- surfaces ---------- */
.grid { display: grid; gap: 14px; }
.panel {
  background: var(--surface);
  border-radius: var(--r-surface);
  box-shadow: var(--sh-1), var(--hi);
  min-width: 0;
  overflow: clip;
}
.panel.pad { padding: 28px; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 22px 28px 0; }
.panel-h h2, .panel-h h3 { font-family: var(--serif); font-size: 21px; font-weight: 400; letter-spacing: -0.008em; color: var(--ink); flex: 1; line-height: 1.2; }
.panel-h .tools { display: flex; gap: 6px; align-items: center; }
.panel-b { padding: 16px 28px 28px; }
.panel-b.flush { padding: 12px 0 0; }
.panel .row-list { display: grid; padding-top: 12px; }
.panel-b.flush .row-list { padding-top: 0; }
.sec-title { font-size: 11.5px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.16em; text-transform: uppercase; margin: 28px 0 12px; display: flex; align-items: center; gap: 8px; }
.sec-title:first-child { margin-top: 0; }

/* double bezel: a machined tray around a glass plate. Inner radius = outer radius - padding. */
.bezel { padding: var(--bezel); border-radius: var(--r-shell); background: var(--shell); box-shadow: var(--ring); }
.bezel > .bezel-in { border-radius: calc(var(--r-shell) - var(--bezel)); background: var(--surface); box-shadow: var(--hi), 0 1px 2px rgba(26, 40, 68, 0.05); overflow: clip; min-width: 0; }

.display { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 5vw, 52px); line-height: 1.04; letter-spacing: -0.02em; margin: 12px 0 14px; font-variation-settings: 'opsz' 72; }
.lede { color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 56ch; }

/* summary strip */
.summary { display: grid; grid-template-columns: 1fr; }
.sum-post { padding: 30px 28px 28px; position: relative; --p-solid: var(--steady); }
.sum-post[data-p='watch'] { --p-solid: var(--watch); }
.sum-post[data-p='prepare'] { --p-solid: var(--prepare); }
.sum-post[data-p='act'] { --p-solid: var(--act); }
.sum-post .eyebrow { display: flex; align-items: center; gap: 9px; }
.sum-post .eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 99px; background: var(--p-solid); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-solid) 18%, transparent); }
.sum-post .word { font-family: var(--serif); font-feature-settings: 'lnum' 1; font-variation-settings: 'opsz' 72; font-size: clamp(60px, 9vw, 96px); line-height: 0.98; letter-spacing: -0.03em; font-weight: 280; margin: 20px 0 16px; color: var(--ink); }
.sum-post .why { color: var(--ink-2); max-width: 54ch; font-size: 14.5px; line-height: 1.6; }
.sum-c { padding: 24px 28px; text-align: left; border-top: 1px solid var(--line); display: grid; gap: 8px; align-content: start; transition: background-color 180ms var(--ease-out); min-width: 0; }
.sum-c .fig { font-family: var(--serif); font-feature-settings: 'lnum' 1, 'tnum' 1; font-variation-settings: 'opsz' 72; font-size: clamp(44px, 5vw, 60px); line-height: 1; font-weight: 300; letter-spacing: -0.03em; margin-top: 6px; }
.sum-c .fig small { font-family: var(--font); font-size: 13px; letter-spacing: 0; color: var(--ink-3); font-weight: 500; margin-left: 8px; }
.sum-c .fig.dim { font-size: 28px; color: var(--ink-3); padding: 12px 0; }
.sum-c .sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.sum-c .sub.good { color: var(--steady-ink); } .sum-c .sub.bad { color: var(--act-ink); }
.sum-c .bar { height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.sum-c .bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transition: transform 600ms var(--ease-out); }
@media (min-width: 560px) { .summary { grid-template-columns: repeat(3, 1fr); } .sum-post { grid-column: 1 / -1; } }
@media (min-width: 560px) and (max-width: 1099px) { .sum-c + .sum-c { border-left: 1px solid var(--line); } }
@media (min-width: 1100px) {
  .summary { grid-template-columns: 1.65fr 1fr 1fr 1fr; }
  .sum-post { grid-column: auto; padding: 36px 36px 32px; }
  .sum-c { border-top: 0; border-left: 1px solid var(--line); padding: 36px 28px; }
}
@media (hover: hover) and (pointer: fine) { button.sum-c:hover { background: var(--surface-2); } }
button.sum-c:active { background: var(--surface-2); }

.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 28px; max-width: 460px; }
.ladder .step { display: grid; gap: 8px; }
.ladder .bar { height: 3px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.ladder .bar::after { content: ''; position: absolute; inset: 0; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform 640ms var(--ease-out); }
.ladder .step.on .bar::after { transform: scaleX(1); }
.ladder .step span { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.ladder .step.cur span { color: var(--ink); }
.ladder .step:nth-child(1) { --c: var(--steady); }
.ladder .step:nth-child(2) { --c: var(--watch); }
.ladder .step:nth-child(3) { --c: var(--prepare); }
.ladder .step:nth-child(4) { --c: var(--act); }

.banner {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 22px; border-radius: var(--r-surface);
  background: var(--surface); box-shadow: var(--sh-1), var(--hi), inset 3px 0 0 var(--brass);
}
.banner .ico { margin-top: 1px; color: var(--brass); }
.banner b { display: block; font-weight: 600; }
.banner .body { flex: 1; min-width: 0; }
.banner .go { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.banner.act { box-shadow: var(--sh-1), var(--hi), inset 3px 0 0 var(--act); background: color-mix(in srgb, var(--act) 4%, var(--surface)); }
.banner.act .ico { color: var(--act); }
.banner.prepare { box-shadow: var(--sh-1), var(--hi), inset 3px 0 0 var(--prepare); }
.banner.prepare .ico { color: var(--prepare); }
.banner.watch { box-shadow: var(--sh-1), var(--hi), inset 3px 0 0 var(--watch); }
.banner.watch .ico { color: var(--watch); }
.banner.ok { box-shadow: var(--sh-1), var(--hi), inset 3px 0 0 var(--steady); }
.banner.ok .ico { color: var(--steady); }

/* metric cards */
.metrics, .kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.metric { padding: 22px 24px; background: var(--surface); border: 0; border-radius: var(--r-surface); box-shadow: var(--sh-1), var(--hi); display: grid; gap: 6px; align-content: start; text-align: left; min-width: 0; transition: box-shadow 200ms var(--ease-out), transform 150ms var(--ease-out); }
button.metric:active { transform: scale(0.98); }
.metric .k { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.metric .k .ico { display: none; }
.metric .v { font-family: var(--serif); font-feature-settings: 'lnum' 1, 'tnum' 1; font-variation-settings: 'opsz' 72; font-size: 42px; line-height: 1.05; font-weight: 300; letter-spacing: -0.025em; margin-top: 4px; }
.metric .v small { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.metric .d { font-size: 12.5px; color: var(--ink-3); }
.metric .d.bad { color: var(--act-ink); }
.metric .d.good { color: var(--steady-ink); }
.metric .d.warn { color: var(--prepare-ink); }
@media (min-width: 720px) { .metrics, .kpis { grid-template-columns: repeat(4, 1fr); } }
@media (hover: hover) and (pointer: fine) { button.metric:hover { box-shadow: var(--sh-2), var(--hi); } }

.ttr .big { font-family: var(--serif); font-feature-settings: 'lnum' 1, 'tnum' 1; font-size: clamp(56px, 12vw, 80px); line-height: 1; font-weight: 300; letter-spacing: -0.03em; margin: 14px 0 8px; }
.ttr .big small { font-family: var(--font); font-size: 0.22em; letter-spacing: 0; color: var(--ink-3); font-weight: 500; margin-left: 8px; }
.ttr .cmp { color: var(--ink-3); font-size: 13px; }
.gauge { height: 3px; border-radius: 3px; background: var(--surface-3); margin: 18px 0 8px; position: relative; overflow: hidden; }
.gauge i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transform-origin: left; transition: transform 600ms var(--ease-out); }
.gauge i.warn { background: var(--prepare); }
.gauge i.bad { background: var(--act); }
.gauge i.ok { background: var(--steady); }

/* ---------- rows ---------- */
.row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px 28px; text-align: left;
  border-top: 1px solid var(--line);
  background: transparent; min-height: 60px;
  transition: background-color 160ms var(--ease-out);
}
.row:first-child { border-top: 0; }
.row.top { align-items: flex-start; }
.row .lead { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.row .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row .t { font-weight: 520; overflow-wrap: anywhere; }
.row .s { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; line-height: 1.5; }
.row .end { flex: none; display: flex; align-items: center; gap: 8px; color: var(--ink-3); }
button.row:active { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { button.row:hover, a.row:hover { background: var(--surface-2); } }
.row.done .t { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-chip); font-size: 11.5px; font-weight: 520; letter-spacing: 0.01em; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip .ico { width: 13px; height: 13px; }
.chip.steady { color: var(--steady-ink); background: var(--steady-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--steady) 30%, transparent); }
.chip.watch { color: var(--watch-ink); background: var(--watch-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--watch) 34%, transparent); }
.chip.prepare { color: var(--prepare-ink); background: var(--prepare-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--prepare) 34%, transparent); }
.chip.act { color: var(--act-ink); background: var(--act-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--act) 34%, transparent); }
.chip.accent { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.chip.solid-act { background: var(--act); color: #fff; box-shadow: none; }
.chip.outline { color: var(--ink-3); background: transparent; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-control);
  font-weight: 520; font-size: 13.5px; letter-spacing: 0.005em; white-space: nowrap;
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 1px rgba(26, 40, 68, 0.04);
  transition: transform 150ms var(--ease-out), background-color 160ms var(--ease-out), box-shadow 200ms var(--ease-out), color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.96); }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.danger { background: linear-gradient(180deg, color-mix(in srgb, var(--act) 90%, #fff), var(--act)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 16px -8px color-mix(in srgb, var(--act) 70%, transparent); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 50px; padding: 0 28px; font-size: 14.5px; border-radius: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn.icon-only { width: 32px; padding: 0; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--surface-2); }
  .btn.primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 90%, #fff), var(--accent-2)); }
  .btn.danger:hover { filter: brightness(1.06); background: linear-gradient(180deg, color-mix(in srgb, var(--act) 90%, #fff), var(--act)); }
  .btn.ghost:hover { background: var(--surface-3); }
}

.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 12px; box-shadow: inset 0 1px 2px rgba(26, 40, 68, 0.06); }
.seg button { height: 32px; padding: 0 14px; border-radius: 9px; font-weight: 520; font-size: 13px; color: var(--ink-3); white-space: nowrap; transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 150ms var(--ease-out); }
.seg button:active { transform: scale(0.96); }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(26, 40, 68, 0.12), 0 0 0 1px rgba(26, 40, 68, 0.05); }
.seg.scroll { display: flex; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg.scroll button { flex: none; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.01em; }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--surface); color: var(--ink);
  border: 0; border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 1px 2px rgba(26, 40, 68, 0.05);
  transition: box-shadow 180ms var(--ease-out), background-color 160ms var(--ease-out);
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in srgb, var(--brass) 24%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 0.8; }
.field-row { display: grid; gap: 12px; }
@media (min-width: 560px) { .field-row.two { grid-template-columns: 1fr 1fr; } .field-row.three { grid-template-columns: 1fr 1fr 1fr; } }
.field-row .field { margin-bottom: 14px; }

.check {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 22px; height: 22px; margin: 0; border-radius: 4px;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; cursor: pointer;
  transition: background 140ms var(--ease-out), border-color 140ms, transform 120ms var(--ease-out);
}
.check:active { transform: scale(0.9); }
.check::after { content: ''; width: 12px; height: 7px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 160ms var(--ease-out); }
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.check.steady:checked { background: var(--steady); border-color: var(--steady); }
.check-wrap { display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -10px -10px -12px; flex: none; }

.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; flex: none; margin: 0; transition: background 160ms; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 99px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 200ms var(--ease-out); }
.switch:checked { background: var(--accent); }
.switch::after { background: var(--surface); }
.switch:checked::after { transform: translateX(18px); }

.range { width: 100%; accent-color: var(--accent); min-height: 32px; }

/* ---------- tripwires ---------- */
.tier-head { display: flex; align-items: center; gap: 12px; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.tier-head h2 { font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: -0.005em; flex: 1; }
.tier-head .meaning { font-size: 12.5px; color: var(--ink-3); font-weight: 400; display: block; margin-top: 1px; }
.tier-dot { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.tier-dot.watch { background: var(--watch); } .tier-dot.prepare { background: var(--prepare); } .tier-dot.act { background: var(--act); } .tier-dot.steady { background: var(--steady); }
.tw .state { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; padding: 3px 8px; border-radius: 4px; background: transparent; color: var(--ink-3); white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line-strong); }
.tw[data-s='reported'] .state { color: var(--watch-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--watch) 60%, transparent); }
.tw[data-s='confirmed'] .state { font-weight: 600; }
.tw[data-s='confirmed'][data-tier='watch'] .state { background: var(--watch-soft); color: var(--watch-ink); box-shadow: inset 0 0 0 1px var(--watch); }
.tw[data-s='confirmed'][data-tier='prepare'] .state { background: var(--prepare-soft); color: var(--prepare-ink); box-shadow: inset 0 0 0 1px var(--prepare); }
.tw[data-s='confirmed'][data-tier='act'] .state { background: var(--act-soft); color: var(--act-ink); box-shadow: inset 0 0 0 1px var(--act); }
.tw[data-s='confirmed'] { background: var(--surface-2); }

.evidence { display: grid; gap: 8px; }
.evidence .ev { padding: 12px 14px; border-radius: var(--r-control); background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 2px; }
.evidence .ev .who { font-weight: 600; font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.evidence .ev .who .when { margin-left: auto; font-weight: 400; color: var(--ink-3); font-size: 12px; }

.src-list { display: grid; gap: 6px; }
.src-list a { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--r-control); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.src-list a .ico { color: var(--ink-3); margin-left: auto; }

/* ---------- plans ---------- */
.plan-card { padding: 28px; display: grid; gap: 12px; text-align: left; width: 100%; transition: border-color 140ms, background 140ms; }
.plan-card:active { background: var(--surface-2); }
.plan-card h3 { font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: -0.01em; }
.plan-card p { color: var(--ink-3); }
.plan-card .meta { display: flex; gap: 8px; flex-wrap: wrap; }
@media (hover: hover) and (pointer: fine) { .plan-card:hover { border-color: var(--line-strong); } }
.progress { height: 3px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ink); transition: width 360ms var(--ease-out); }
.progress.ok i { background: var(--steady); }
.runbar { position: sticky; top: calc(var(--safe-top) + 58px); z-index: 10; display: flex; gap: 14px; align-items: center; padding: 12px 16px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: var(--r-surface); margin-bottom: 14px; }
.runbar .clock { font-family: var(--serif); font-size: 28px; font-weight: 400; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.runbar .grow { flex: 1; min-width: 0; }
@media (min-width: 1024px) { .runbar { top: 12px; } }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.tbl th:first-child, .tbl td:first-child { padding-left: 28px; } .tbl th:last-child, .tbl td:last-child { padding-right: 28px; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 11.5px; letter-spacing: 0.13em; text-transform: uppercase; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.scorebar { display: inline-block; width: 72px; height: 3px; background: var(--surface-3); position: relative; overflow: hidden; vertical-align: middle; margin-right: 10px; }
.scorebar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.rate { display: inline-flex; gap: 3px; }
.rate button { width: 26px; height: 26px; border-radius: 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); background: transparent; box-shadow: inset 0 0 0 1px var(--line); transition: background 120ms, color 120ms, transform 100ms var(--ease-out); }
.rate button:active { transform: scale(0.92); }
.rate button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); }

/* ---------- people ---------- */
.avatar { width: 38px; height: 38px; border-radius: 99px; display: grid; place-items: center; font-family: var(--serif); font-weight: 500; font-size: 16px; background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); flex: none; letter-spacing: 0.02em; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.avatar.safe { box-shadow: inset 0 0 0 1.5px var(--steady); }
.avatar.stale { box-shadow: inset 0 0 0 1.5px var(--prepare); }
.avatar.help { box-shadow: inset 0 0 0 1.5px var(--act); }
.fam-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); padding: 18px 28px 26px; }
.fam-tile { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); text-align: left; transition: transform 120ms var(--ease-out); }
.fam-tile:active { transform: scale(0.97); }
.fam-tile .n { font-weight: 500; }
.fam-tile .s { font-size: 12px; color: var(--ink-3); }

/* ---------- charts ---------- */
.spark { width: 100%; height: 84px; display: block; }
.spark .area { fill: var(--accent-soft); }
.spark .line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark .grid { stroke: var(--line); stroke-width: 1; }
.spark-wrap { display: grid; grid-template-columns: 52px 1fr; align-items: start; }
.spark-y { position: relative; font-size: 11px; color: var(--ink-3); }
.spark-y span { position: absolute; left: 0; transform: translateY(-50%); line-height: 1; }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); opacity: 0; transition: opacity 260ms var(--ease-out); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.scrim.in { opacity: 1; }
.sheet {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0;
  max-height: min(92dvh, 880px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-float), var(--hi);
  transform: translateY(100%); transition: transform 360ms var(--ease-drawer);
  padding-bottom: var(--safe-bottom);
  will-change: transform; overscroll-behavior: contain;
}
.sheet.in { transform: translateY(0); }
.sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line-strong); margin: 9px auto 0; flex: none; touch-action: none; }
.sheet-h { display: flex; align-items: center; gap: 10px; padding: 14px 24px 10px; flex: none; }
.sheet-h h2 { flex: 1; font-family: var(--serif); font-size: 26px; font-weight: 380; letter-spacing: -0.012em; line-height: 1.15; }
.sheet-b { overflow-y: auto; overscroll-behavior: contain; padding: 6px 24px 24px; flex: 1; }
.sheet-f { display: flex; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); flex: none; background: var(--surface); border-radius: 0; }
.sheet-f .btn { flex: 1; }
@media (min-width: 720px) {
  .sheet { left: auto; right: 14px; top: 14px; bottom: 14px; width: 500px; max-height: none; border-radius: 26px; transform: translateX(calc(100% + 30px)); overflow: hidden; }
  .sheet.in { transform: translateX(0); }
  .sheet .grab { display: none; }
  .sheet.wide { width: 660px; }
}

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 80; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 24px); display: grid; gap: 8px; justify-items: center; pointer-events: none; padding: 0 16px; }
@media (min-width: 1024px) { .toasts { bottom: 28px; left: calc(var(--nav-w) + 12px); } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 480px; padding: 13px 18px; border-radius: 16px; background: linear-gradient(180deg, var(--nav-bg-2), var(--nav-bg)); color: var(--nav-ink); font-weight: 450; box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, 0.08); opacity: 0; transform: translateY(12px) scale(0.97); transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out); }
.toast.in { opacity: 1; transform: none; }
.toast button { color: var(--nav-brass); font-weight: 600; text-underline-offset: 3px; text-decoration: underline; }

/* ---------- misc ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 34px 20px; color: var(--ink-3); }
.empty .ico { width: 30px; height: 30px; color: var(--ink-3); }
.empty b { color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 20px; }
.empty p { max-width: 38ch; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 550; text-align: right; }
.stack { display: grid; gap: 18px; }
.cluster { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.split { display: grid; gap: 18px; }
.hr { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.note { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13px; }
.explain { font-size: 13.5px; color: var(--ink-2); display: grid; gap: 10px; }
.explain code, .code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
pre.code { padding: 12px; overflow: auto; border-radius: 10px; line-height: 1.5; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 99px; margin-right: 6px; vertical-align: -1px; }
.install-hint { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-control); background: var(--surface-2); border: 1px solid var(--line); }


/* ---------- onboarding ---------- */
.onb { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--safe-top) + 24px) 18px calc(var(--safe-bottom) + 24px); background: var(--bg); }
.onb-card { width: 100%; max-width: 560px; display: grid; gap: 22px; }
.onb-card h1 { font-family: var(--serif); font-size: clamp(38px, 8vw, 52px); line-height: 1.04; letter-spacing: -0.02em; font-weight: 300; }
.onb-card .lede { color: var(--ink-2); font-size: 16px; max-width: 48ch; }
.onb-steps { display: flex; gap: 6px; }
.onb-steps i { height: 2px; flex: 1; background: var(--surface-3); transition: background 220ms; }
.onb-steps i.on { background: var(--ink); }
.person-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; min-height: 46px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); }
.tag-input input { flex: 1; min-width: 120px; border: 0; outline: 0; background: transparent; padding: 6px; min-height: 32px; }
.tag-input .chip { height: 30px; }
.tag-input .chip button { display: grid; place-items: center; }

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Screens are visited many times a day: a short fade only. The one staggered entrance is the first screen after load. */
  .view-in > * { animation: fadein 150ms var(--ease-out) both; }
  .first-load .view-in > * { animation: rise 420ms var(--ease-out) both; }
  .first-load .view-in > *:nth-child(2) { animation-delay: 60ms; }
  .first-load .view-in > *:nth-child(3) { animation-delay: 120ms; }
  .first-load .view-in > *:nth-child(n + 4) { animation-delay: 180ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
  .live.ok i { animation: pulse 2.6s var(--ease-in-out) 3; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
  .wm-pulse { animation: ping 2.8s var(--ease-out) infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(3.4); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .view-in > * { animation: fadein 200ms linear both; }
  @keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
  .sheet { transition: opacity 160ms linear; transform: none; opacity: 0; }
  .sheet.in { opacity: 1; }
  .wm-pulse { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .tabbar, .runbar, .scrim { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: var(--line-strong); }
}

/* ---------- print: break-glass card ---------- */
.print-only { display: none; }
@media print {
  html, body { background: #fff !important; color: #000; }
  body::before, body::after { display: none !important; }
  .shell, .tabbar, .toasts, .scrim, .sheet, .skip { display: none !important; }
  .print-only { display: block !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; margin: 0; padding: 10px 14px; clip: auto; z-index: 100; background: var(--surface); color: var(--ink); border-radius: 8px; box-shadow: var(--shadow-pop, 0 8px 24px rgba(0,0,0,.2)); }
.ico { fill: currentColor; }
a.tab, a.btn, a.item, a.row { text-decoration: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* ====================================================================== world, country, feed */
.lvl { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; border-radius: 99px; font-size: 12px; font-weight: 560; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); white-space: nowrap; }
.lvl i { width: 8px; height: 8px; border-radius: 99px; background: var(--m-0); box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.lvl.l1 i { background: var(--lv1); } .lvl.l2 i { background: var(--lv2); } .lvl.l3 i { background: var(--lv3); } .lvl.l4 i { background: var(--lv4); }
.lvl.l4 { color: var(--act-ink); } .lvl.l3 { color: var(--prepare-ink); }
.gauge4 { display: inline-grid; grid-auto-flow: column; gap: 3px; vertical-align: middle; }
.gauge4 i { width: 12px; height: 5px; border-radius: 2px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.gauge4.l1 i.on { background: var(--lv1); box-shadow: none; } .gauge4.l2 i.on { background: var(--lv2); box-shadow: none; } .gauge4.l3 i.on { background: var(--lv3); box-shadow: none; } .gauge4.l4 i.on { background: var(--lv4); box-shadow: none; }

.live { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); white-space: nowrap; }
.live i { width: 6px; height: 6px; border-radius: 99px; background: var(--ink-3); }
.live.ok i { background: var(--steady); box-shadow: 0 0 0 3px color-mix(in srgb, var(--steady) 22%, transparent); }
.live.warn i { background: var(--watch); } .live.bad i { background: var(--act); }
.live-slot { display: none; }
@media (min-width: 420px) { .live-slot { display: inline-flex; } }

/* map */
.map-panel { position: relative; background: var(--m-void); --map-h: 420px; }
.atlas .map-panel .wm { height: auto; aspect-ratio: 1.62; min-height: 420px; max-height: 78dvh; }
.map-panel.mini { --map-h: clamp(300px, 36vw, 400px); }
.wm { position: relative; width: 100%; height: var(--map-h); overflow: hidden; background: var(--m-void); }
.wm-svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline: none; user-select: none; -webkit-user-select: none; }
.wm-svg:focus-visible { outline: 2px solid var(--brass); outline-offset: -3px; }
.wm.dragging .wm-svg { cursor: grabbing; }
.wm-void { fill: var(--m-void); }
.wm-sphere { fill: var(--m-sea2); stroke: var(--m-sphere); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wm-grat { fill: none; stroke: var(--m-grat); stroke-width: 0.6; vector-effect: non-scaling-stroke; pointer-events: none; }
.wm-hatch { fill: url(#wm-hatch); stroke: none; pointer-events: none; }
.wm-hatch-line { stroke: var(--m-hatch); stroke-width: 1.1; }
.wm-micro { stroke: color-mix(in srgb, var(--ink) 55%, transparent); stroke-width: 0.9; }
.wm-micro.sel { stroke: var(--ink); stroke-width: 2; }
.wm-c { fill: var(--m-0); stroke: var(--m-edge); stroke-width: 0.7; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill 240ms var(--ease-out), opacity 200ms; cursor: pointer; }
.wm-c[data-l='1'] { fill: var(--m-1); } .wm-c[data-l='2'] { fill: var(--m-2); } .wm-c[data-l='3'] { fill: var(--m-3); } .wm-c[data-l='4'] { fill: var(--m-4); }
.wm-c[data-m~='cit'] { stroke: var(--brass-2); stroke-width: 1.3; stroke-dasharray: 1 2.4; stroke-linecap: round; }
.wm-c[data-m~='watch'] { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 2.5; }
.wm-c[data-m~='dest'] { stroke: var(--brass); stroke-width: 1.5; stroke-dasharray: 2 2; }
.wm-c[data-m~='home'] { stroke: var(--brass); stroke-width: 2.1; stroke-dasharray: none; }
.wm-c.sel { stroke: var(--ink); stroke-width: 2.2; stroke-dasharray: none; }
.wm-dot { stroke-width: 1.2; }
@media (hover: hover) and (pointer: fine) { .wm:not(.dragging) .wm-c:hover { filter: brightness(0.92) saturate(1.1); } }
.wm-h { stroke: var(--surface); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; fill-opacity: 0.92; }
.wm-h.t2 { fill: var(--lv2); } .wm-h.t3 { fill: var(--lv3); } .wm-h.t4 { fill: var(--lv4); }
.wm-h.quake { fill: transparent; stroke: var(--lv4); stroke-width: 1.6; fill-opacity: 1; }
.wm-h.quake.t2 { stroke: var(--lv2); } .wm-h.quake.t3 { stroke: var(--lv3); } .wm-h.quake.t4 { stroke: var(--lv4); }
.wm-pulse { fill: none; stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.wm-pulse.t4 { stroke: var(--lv4); } .wm-pulse.t3 { stroke: var(--lv3); } .wm-pulse.t2 { stroke: var(--lv2); }
.wm-pin { fill: var(--accent); stroke: var(--surface); vector-effect: non-scaling-stroke; }
.wm-tip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--nav-bg); color: var(--nav-ink); font-size: 12.5px; box-shadow: var(--shadow-float); max-width: 240px; }
.wm-tip .tt-l { color: var(--nav-ink-2); font-size: 11.5px; }
.wm-ctl { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: grid; gap: 1px; padding: 3px; border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sh-2); }
.wm-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--ink-2); transition: background-color 160ms var(--ease-out), transform 150ms var(--ease-out); }
.wm-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .wm-btn:hover { background: var(--surface-3); color: var(--ink); } }

.map-status { position: absolute; left: 14px; top: 14px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 8px; border-radius: 99px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sh-1); font-size: 12px; color: var(--ink-2); max-width: calc(100% - 28px); }
.map-status > span:not(.live) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .map-status > span:not(.live) { display: none; } }
.map-panel .legend { position: absolute; left: 14px; bottom: 14px; z-index: 3; padding: 8px 12px; border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sh-1); font-size: 11.5px; gap: 6px 14px; color: var(--ink-2); max-width: calc(100% - 80px); }
.legend span { display: inline-flex; align-items: center; }
.legend i.lg { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.legend i.lg.l1 { background: var(--m-1); } .legend i.lg.l2 { background: var(--m-2); } .legend i.lg.l3 { background: var(--m-3); } .legend i.lg.l4 { background: var(--m-4); }
.legend i.lg.haz { border-radius: 99px; } .legend i.lg.haz.t2 { background: var(--lv2); } .legend i.lg.haz.t3 { background: var(--lv3); } .legend i.lg.haz.t4 { background: var(--lv4); }
.legend i.lg.mk { background: transparent; box-shadow: inset 0 0 0 2px var(--brass); }
.legend .sm { color: var(--ink-3); }
@media (max-width: 640px) { .map-panel .legend .sm { display: none; } }
.map-panel.mini .panel-h.overlay { position: absolute; z-index: 3; left: 0; right: 0; top: 0; padding: 16px 18px; pointer-events: none; }
.map-panel.mini .panel-h.overlay > * { pointer-events: auto; }
.map-panel.mini .panel-h.overlay h2 { flex: none; }
.map-panel.mini .panel-h.overlay .cluster { gap: 10px; padding: 4px 12px 4px 14px; border-radius: 99px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sh-1); }
.map-panel.mini .panel-h.overlay h2 { font-size: 17px; }
.map-panel.mini .panel-h.overlay .tools .btn { background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sh-1); }
.region-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px; background: var(--surface); border-top: 1px solid var(--line); }
.reg { display: inline-flex; align-items: center; gap: 10px; padding: 5px 10px 5px 14px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 160ms var(--ease-out), transform 150ms var(--ease-out); }
.reg:active { transform: scale(0.97); }
.reg-n { font-weight: 520; font-size: 13px; }
.pdot { width: 8px; height: 8px; border-radius: 99px; background: var(--steady); } .pdot.watch { background: var(--watch); } .pdot.prepare { background: var(--prepare); } .pdot.act { background: var(--act); }
@media (hover: hover) and (pointer: fine) { .reg:hover { background: var(--surface-3); } }

.atlas-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.rail { display: grid; gap: 20px; align-content: start; min-width: 0; }
@media (min-width: 1100px) {
  .atlas-grid { grid-template-columns: minmax(0, 1fr) 410px; }
  .atlas .rail .cp-wrap { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
.srch { position: relative; display: flex; align-items: center; }
.srch .ico { position: absolute; left: 13px; color: var(--ink-3); pointer-events: none; }
.srch .input { padding-left: 38px; width: min(240px, 100%); min-height: 40px; border-radius: 12px; }

/* feed */
.feed { display: grid; padding-top: 6px; }
.fr { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 15px 28px; border-top: 1px solid var(--line); --tone: var(--ink-3); }
.fr:first-child { border-top: 0; }
.fr.l1 { --tone: var(--lv1); } .fr.l2 { --tone: var(--lv2); } .fr.l3 { --tone: var(--lv3); } .fr.l4 { --tone: var(--lv4); }
.fr-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 28%, transparent); }
.fr-b { min-width: 0; display: grid; gap: 3px; }
.fr-t { text-align: left; font-weight: 520; line-height: 1.4; color: var(--ink); transition: color 150ms; }
.fr-t:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.fr-m { font-size: 12px; color: var(--ink-3); }
.fr-x { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.fr-a { display: flex; gap: 14px; margin-top: 4px; }
.fr-a a, .fr-a button { font-size: 12.5px; font-weight: 550; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; text-decoration: none; padding: 2px 0; }
.fr-a a:hover, .fr-a button:hover { text-decoration: underline; text-underline-offset: 3px; }
.feed.big .fr { padding: 18px 28px; }

/* country panel */
.cp { padding: 28px; display: grid; gap: 4px; }
.cp.compact { padding: 4px 0 8px; }
.cp-wrap { background: var(--surface); }
.cp-h { margin-bottom: 8px; }
.cp-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); }
.cp-title { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
.cp-title h2 { font-family: var(--serif); font-size: 38px; font-weight: 320; letter-spacing: -0.02em; line-height: 1.04; flex: 1; font-variation-settings: 'opsz' 72; }
.cp.compact .cp-title h2 { display: none; }
.cp-score { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cp-sub { font-size: 12.5px; color: var(--ink-3); }
.cp-s { padding-top: 22px; margin-top: 18px; border-top: 1px solid var(--line); }
.cp-s h3 { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.cp-note { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; margin-top: 12px; }
.gv { display: grid; }
.gv-r { display: grid; grid-template-columns: 112px 1fr auto; gap: 4px 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.gv-r:first-child { border-top: 0; padding-top: 0; }
.gv-n { font-weight: 550; font-size: 13px; }
.gv-l { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.gv-l b { font-weight: 560; }
.gv-m { grid-column: 2 / 4; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.gv-m:empty { display: none; }
.gv-a { grid-column: 3; grid-row: 1; color: var(--ink-3); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; transition: background-color 150ms, color 150ms; }
.gv-a:hover { background: var(--surface-3); color: var(--ink); }
.cp-list { display: grid; gap: 4px; }
.cp-li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; margin: 0 -12px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background-color 150ms; }
a.cp-li:hover { background: var(--surface-2); }
.cp-li .ico { margin-top: 2px; color: var(--ink-3); }
.cp-li.l4 .ico { color: var(--lv4); } .cp-li.l3 .ico { color: var(--lv3); } .cp-li.l2 .ico { color: var(--lv2); }
.cp-li.basis-citizen .ico, .cp-li.basis-cta .ico, .cp-li.basis-freedom .ico { color: var(--steady); }
.cp-li.basis-claim .ico { color: var(--watch); }
.cp-li span { display: grid; gap: 1px; font-weight: 520; min-width: 0; font-size: 13.5px; }
.cp-li small { font-weight: 400; color: var(--ink-3); font-size: 12px; line-height: 1.45; }
.cp-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }

/* household and citizenship */
.hero-panel { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.hero-panel .panel-b { padding: 40px 36px 36px; }
.tri { display: grid; gap: 14px; margin: 28px 0 8px; }
@media (min-width: 800px) { .tri { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.tri-i { display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-1), var(--hi); }
.tri-i b { font-weight: 600; }
.tri-i p { color: var(--ink-3); font-size: 13px; line-height: 1.55; }
.tri-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--brass); background: var(--brass-soft); }
.haven { display: flex; flex-wrap: wrap; gap: 8px; }
.hv { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 160ms var(--ease-out), transform 150ms var(--ease-out); text-align: left; }
.hv:active { transform: scale(0.97); }
.hv b { font-weight: 560; font-size: 13px; }
.hv small { color: var(--ink-3); font-size: 11.5px; }
@media (hover: hover) and (pointer: fine) { .hv:hover { background: var(--surface-3); } }
.cit-row { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cit-top { display: flex; gap: 8px; }
.cit-row .field { margin: 0; }
.access-line { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 28px; border-top: 1px solid var(--line); text-align: left; color: var(--ink-2); background: var(--surface-2); line-height: 1.45; transition: background-color 160ms; }
.access-line .ico:first-child { color: var(--brass); }
.access-line span { flex: 1; }
@media (hover: hover) and (pointer: fine) { .access-line:hover { background: var(--surface-3); } }
.cits { display: flex; gap: 4px; margin-top: 4px; }
.cits span { font-size: 11px; font-weight: 650; letter-spacing: 0.08em; padding: 1px 5px; border-radius: 4px; background: var(--brass-soft); color: var(--brass); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; }
.pick-list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; display: grid; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.pick { display: flex; align-items: center; gap: 10px; padding: 11px 14px; text-align: left; border-top: 1px solid var(--line); transition: background-color 140ms; }
.pick:first-child { border-top: 0; }
.pick small { margin-left: auto; color: var(--ink-3); }
.pick[aria-selected='true'] { background: var(--accent-soft); }
.pick[aria-selected='true'] .ico { color: var(--steady); }
.person-block { display: grid; gap: 8px; margin-bottom: 14px; }
.person-block .person-row { margin-bottom: 0; }
.cp-sheet .sheet-b { padding-top: 0; }

@media (min-width: 900px) {
  .split.s-8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
  .split.s-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .split.s-6-6 { grid-template-columns: 1fr 1fr; }
  .split.s-3 { grid-template-columns: repeat(3, 1fr); }
  .split.s-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) { .map-row { align-items: stretch !important; } .map-row > .panel:last-child .feed { max-height: 460px; overflow-y: auto; overscroll-behavior: contain; } }

/* ===== safety index: dial, band chip, ramp legend, small states ===== */
.band { --c: var(--ink-3); display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 5px 0 10px; border-radius: 99px; font-size: 12px; font-weight: 580; color: var(--ink); background: color-mix(in srgb, var(--c) 16%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 42%, transparent); white-space: nowrap; }
.band i { width: 9px; height: 9px; border-radius: 99px; background: var(--c); flex: none; }
.band b { font-variant-numeric: tabular-nums; min-width: 26px; height: 18px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-size: 11.5px; font-weight: 640; background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 36%, transparent); }
.band:not(:has(b)) { padding-right: 11px; }
.band.none { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); }

.cp-dial { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.cp-num { --c: var(--ink-3); flex: none; min-width: 112px; padding: 12px 16px 10px; border-radius: 18px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); display: flex; align-items: baseline; gap: 6px; justify-content: center; }
.cp-num .n { font-family: var(--serif); font-size: 52px; line-height: 0.95; font-weight: 340; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.cp-num .of { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.cp-num .dash { font-size: 14px; font-weight: 560; color: var(--ink-3); padding: 12px 0; }
.cp-dial-r { display: grid; gap: 3px; min-width: 0; }
.cp-band { font-family: var(--serif); font-size: 26px; font-weight: 360; letter-spacing: -0.015em; line-height: 1.1; }
.cp-conf { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); }
.cp-conf i { width: 22px; height: 6px; border-radius: 99px; background: linear-gradient(90deg, currentColor var(--fill, 33%), var(--line-strong) 0); }
.cp-conf.c-high i { --fill: 100%; } .cp-conf.c-medium i { --fill: 66%; } .cp-conf.c-low i { --fill: 33%; }

.rampbar { margin: 4px 0 6px; }
.rb-track { position: relative; height: 10px; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(26, 40, 68, 0.12); }
.rb-mark { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 3px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.rb-ticks { position: relative; height: 18px; margin-top: 7px; font-size: 11.5px; color: var(--ink-3); }
.rb-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.rb-ticks span:first-child { transform: none; }
.rb-ticks span:last-child { transform: translateX(-100%); }

.cp-lens { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.cp-lens label { font-size: 12.5px; color: var(--ink-3); }
.cp-lens .select { height: 34px; padding-block: 0; min-width: 0; width: auto; font-size: 13px; }
.gv-pts { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gv-n small { display: block; font-weight: 450; font-size: 11.5px; color: var(--brass); }
.cp-math { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 6px; font-size: 13px; }
.cp-math > div { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); }
.cp-math b { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.cp-math .tot { padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; }
.docs-ok { color: var(--steady-ink) !important; }

.method .lede { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.method .steps { padding-inline-start: 20px; margin: 16px 0 0; display: grid; gap: 12px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.method .steps b { color: var(--ink); font-weight: 600; }
.method p { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.band-list { display: grid; gap: 8px; }
.band-row { display: grid; grid-template-columns: 14px 84px 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.band-row i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(26, 40, 68, 0.14); }

.legend-ramp { display: flex !important; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface); position: static !important; width: auto; }
.lg-ramp { display: grid; gap: 4px; min-width: 240px; flex: 1 1 280px; max-width: 460px; }
.lg-t { font-size: 12px; font-weight: 580; color: var(--ink-2); }
.lg-r { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.lg-lens { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.lg-lens .select { height: 32px; padding-block: 0; font-size: 12.5px; width: auto; }
.legend i.lg.hatch { background: repeating-linear-gradient(135deg, var(--ink-3) 0 1.5px, transparent 1.5px 4px); box-shadow: inset 0 0 0 1px var(--line-strong); }
.legend-ramp .rb-ticks { height: 16px; margin-top: 5px; font-size: 11.5px; }
.legend-ramp .sm { display: inline-flex !important; align-items: center; }
@media (max-width: 640px) { .rb-ticks span:nth-child(2), .rb-ticks span:nth-child(4) { display: none; } }

.micro-tray { border-top: 1px solid var(--line); background: var(--surface); }
.micro-tray summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 13px; font-weight: 540; color: var(--ink-2); min-height: 44px; }
.micro-tray summary::-webkit-details-marker { display: none; }
.micro-tray summary .muted { margin-left: 2px; font-weight: 450; font-variant-numeric: tabular-nums; }
.micro-tray summary > .ico:last-child { margin-left: auto; transition: transform 200ms var(--ease-out); }
.micro-tray[open] summary > .ico:last-child { transform: rotate(180deg); }
.mt-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 16px; }
.mt-i { --c: var(--ink-3); display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 6px 0 10px; border-radius: 99px; font-size: 12.5px; color: var(--ink); background: color-mix(in srgb, var(--c) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 36%, transparent); transition: transform 150ms var(--ease-out), box-shadow 150ms var(--ease-out); }
.mt-i:active { transform: scale(0.96); }
.mt-i i { width: 9px; height: 9px; border-radius: 99px; background: var(--c); }
.mt-i b { font-weight: 620; font-variant-numeric: tabular-nums; font-size: 11.5px; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; background: var(--surface); }
.mt-i b:empty { display: none; }
.mt-i:has(b:empty) { padding-right: 10px; }
@media (hover: hover) and (pointer: fine) { .mt-i:hover { box-shadow: inset 0 0 0 1px var(--c); } }
@media (prefers-reduced-motion: reduce) { .micro-tray summary > .ico:last-child { transition: none; } }
.map-stage { position: relative; }
@media (max-width: 640px) { .map-panel .map-stage .legend.legend-ramp { position: static; } }

/* ===== person editor ===== */
.pform { display: grid; gap: 18px; }
.tabs2 { display: flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 12px; position: sticky; top: 0; z-index: 2; box-shadow: inset 0 1px 2px rgba(26, 40, 68, 0.06); }
.tab2 { flex: 1; min-height: 40px; padding: 0 10px; border-radius: 9px; font-size: 13px; font-weight: 540; color: var(--ink-3); white-space: nowrap; transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 150ms var(--ease-out); }
.tab2:active { transform: scale(0.97); }
.tab2[aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(26, 40, 68, 0.12), 0 0 0 1px rgba(26, 40, 68, 0.05); }
.tab2[hidden] { display: none; }
.tabpanel[hidden] { display: none; }
.tabpanel:focus-visible { outline-offset: 6px; }
.pf-pane { display: grid; gap: 16px; align-content: start; }
.pf-pane .field { margin: 0; }
.pf-pane .sec-title { margin-top: 12px; }
.pf-intro { font-size: 13.5px; line-height: 1.6; color: var(--ink-3); max-width: 62ch; text-wrap: pretty; }
.cit-papers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 4px; }
.doc-card { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.doc-card .field { margin: 0; }
.doc-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-h > .ico { color: var(--brass); }
.doc-h b { font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: -0.01em; margin-right: auto; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.doc-cover { font-size: 12.5px; line-height: 1.55; color: var(--ink-3); text-wrap: pretty; }
.hrow { display: flex; gap: 8px; align-items: flex-start; }
.hrow > .btn { margin-top: 4px; }
.hgrid { flex: 1; display: grid; grid-template-columns: 1.3fr 0.9fr 1.4fr; gap: 8px; min-width: 0; }
.hgrid.two { grid-template-columns: 1fr 1.4fr; }
.hgrid.med { grid-template-columns: 1.3fr 1fr; }
.hgrid.med .mini { grid-column: auto; }
.hgrid .med-left, .hgrid.med > small { grid-column: 1 / -1; }
.mini { display: grid; gap: 4px; font-size: 12px; color: var(--ink-3); }
.hgrid.med { grid-template-columns: repeat(3, 1fr); }
.hgrid.med > input:nth-child(1) { grid-column: 1 / 3; }
.hgrid.med > input:nth-child(2) { grid-column: 3; }
.med-left { font-size: 12.5px; color: var(--ink-3); }
.med-left.low { color: var(--prepare-ink); font-weight: 560; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .hgrid, .hgrid.two { grid-template-columns: 1fr; } .hgrid.med { grid-template-columns: 1fr 1fr; } .hgrid.med > input:nth-child(1), .hgrid.med > input:nth-child(2) { grid-column: 1 / -1; } .row2 { grid-template-columns: 1fr; } .tab2 { padding: 0 4px; font-size: 12.5px; } }
.btn.danger-quiet { color: var(--act-ink); }
@media (hover: hover) and (pointer: fine) { .btn.danger-quiet:hover { background: var(--act-soft); } }
@media (prefers-reduced-motion: reduce) { .tab2 { transition: none; } }
h1[tabindex='-1']:focus { outline: none; }

/* ===== documents page ===== */
.doc-people { display: grid; gap: 28px; padding: 6px 22px 24px; }
.doc-person { display: grid; gap: 14px; }
.dp-h { display: flex; align-items: center; gap: 12px; }
.dp-h b { font-size: 15px; font-weight: 600; margin-right: auto; }
.wallet { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
.wcard { text-align: start; display: grid; gap: 6px; align-content: start; padding: 16px 18px 16px; border-radius: 18px; color: var(--ink); position: relative; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 60%);
  box-shadow: inset 0 0 0 1px var(--line), var(--sh-1), var(--hi);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.wcard::after { content: ''; position: absolute; inset-inline-end: -26px; top: -26px; width: 92px; height: 92px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--brass) 28%, transparent); pointer-events: none; }
.wcard:active { transform: scale(0.985); }
.wcard.k-passcard, .wcard.k-id { background: linear-gradient(160deg, color-mix(in srgb, var(--brass) 8%, var(--surface)), var(--surface) 60%); }
.wcard.k-residence, .wcard.k-visa { background: linear-gradient(160deg, color-mix(in srgb, var(--steady) 8%, var(--surface)), var(--surface) 60%); }
.wc-top { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 580; color: var(--brass); letter-spacing: 0.02em; }
.wc-name { font-family: var(--serif); font-size: 24px; font-weight: 360; letter-spacing: -0.015em; line-height: 1.1; margin-top: 4px; }
.wc-num { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; font-size: 13px; color: var(--ink-3); }
.wc-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.wc-date { font-size: 12.5px; color: var(--ink-3); }
.wc-cov { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.wc-where { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .wcard:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-strong), var(--sh-2), var(--hi); } }
@media (prefers-reduced-motion: reduce) { .wcard { transition: none; } .wcard:hover { transform: none; } }
@media (max-width: 640px) { .doc-people { padding-inline: 16px; } }

/* ===== citizenship page ===== */
.cit-lines { display: grid; gap: 10px; margin-top: 8px; }
.cit-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.cl-n { font-weight: 560; font-size: 14px; }
.cl-n small { margin-inline-start: 8px; font-weight: 450; font-size: 12px; color: var(--ink-3); }
.hv { --c: var(--ink-3); }

/* ===== members ===== */
.row.mem .end { align-self: center; }
.you-tag { margin-inline-start: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--brass); }
.role-row { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; }
.role-row p { color: var(--ink-3); line-height: 1.5; margin: 0; }
.consq { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.seg-roles { display: grid; width: 100%; }
@media (max-width: 480px) { .role-row { grid-template-columns: 1fr; gap: 6px; } }

/* ===== print pack: paper pages sized in a unit that scales on screen and is exactly 1mm on paper ===== */
.pack { --u: 1mm; color: #14161c; font-family: var(--font); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pack-preview .pack { --u: min(1mm, calc((100cqw - 36px) / 210)); display: grid; gap: calc(var(--u) * 8); justify-items: center; }
.pack-preview { container-type: inline-size; background: var(--surface-3); border-radius: 18px; padding: 18px; max-height: calc(100dvh - 150px); overflow: auto; overscroll-behavior: contain; }
.pack-preview:focus-visible { outline-offset: -3px; }
.pp { position: relative; box-sizing: border-box; width: calc(var(--u) * 210); height: calc(var(--u) * 297); padding: calc(var(--u) * 15) calc(var(--u) * 16) calc(var(--u) * 14); background: #fff; color: #14161c; overflow: hidden; display: flex; flex-direction: column; font-size: calc(var(--u) * 3.45); line-height: 1.45; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 12px 30px -12px rgba(26, 40, 68, 0.28); }
.paper-letter .pp { width: calc(var(--u) * 215.9); height: calc(var(--u) * 279.4); }
.pp-h { padding-bottom: calc(var(--u) * 4); margin-bottom: calc(var(--u) * 5); border-bottom: calc(var(--u) * 0.35) solid #14161c; }
.pp-k { font-size: calc(var(--u) * 2.7); letter-spacing: 0.16em; text-transform: uppercase; color: #5b5f6b; font-weight: 600; }
.pp h1 { font-family: var(--serif); font-weight: 380; font-size: calc(var(--u) * 8.4); line-height: 1.05; letter-spacing: -0.015em; margin: calc(var(--u) * 1.6) 0 0; color: #14161c; }
.pp h2 { font-size: calc(var(--u) * 2.9); letter-spacing: 0.14em; text-transform: uppercase; color: #3a3e49; font-weight: 650; margin: calc(var(--u) * 6) 0 calc(var(--u) * 2); padding-bottom: calc(var(--u) * 1); border-bottom: calc(var(--u) * 0.2) solid #9a9ea8; break-after: avoid; }
.pp h2:first-child { margin-top: 0; }
.pp-b { flex: 1; min-height: 0; overflow: hidden; }
.pp-f { display: flex; justify-content: space-between; gap: calc(var(--u) * 6); padding-top: calc(var(--u) * 2.6); margin-top: calc(var(--u) * 4); border-top: calc(var(--u) * 0.2) solid #9a9ea8; font-size: calc(var(--u) * 2.5); color: #5b5f6b; }
.pp p { margin: 0 0 calc(var(--u) * 2); }
.pp .lede { color: #3a3e49; font-size: calc(var(--u) * 3.5); max-width: 62ch; }
.pp .note { font-size: calc(var(--u) * 2.9); color: #4a4e59; margin-top: calc(var(--u) * 2.5); }
.pp .sub { font-size: calc(var(--u) * 2.8); color: #5b5f6b; }
.pp ul, .pp ol { margin: 0; padding-inline-start: calc(var(--u) * 5); display: grid; gap: calc(var(--u) * 1.1); }
.pp table { width: 100%; border-collapse: collapse; font-size: calc(var(--u) * 3.1); }
.pp th { text-align: start; font-size: calc(var(--u) * 2.6); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 650; color: #4a4e59; padding: calc(var(--u) * 1.4) calc(var(--u) * 2) calc(var(--u) * 1.4) 0; border-bottom: calc(var(--u) * 0.3) solid #14161c; }
.pp td { padding: calc(var(--u) * 1.5) calc(var(--u) * 2) calc(var(--u) * 1.5) 0; border-bottom: calc(var(--u) * 0.2) solid #c3c6cd; vertical-align: top; overflow-wrap: anywhere; }
.pp table.kvt th { width: 30%; text-transform: none; letter-spacing: 0; font-size: calc(var(--u) * 3.1); font-weight: 600; color: #14161c; border-bottom: calc(var(--u) * 0.2) solid #c3c6cd; }
.pp .mono { font-family: var(--mono, ui-monospace, monospace); font-size: calc(var(--u) * 2.9); letter-spacing: 0.04em; }
.pp .ck { display: inline-block; width: calc(var(--u) * 3.2); height: calc(var(--u) * 3.2); border: calc(var(--u) * 0.3) solid #14161c; border-radius: calc(var(--u) * 0.5); vertical-align: -0.15em; margin-inline-end: calc(var(--u) * 2); }
.pp td .ck { margin: 0; }
.pp .cl { list-style: none; padding: 0; }
.pp .cl li.done { color: #6b6f7a; }
.pp .cl li.done .ck { background: linear-gradient(#14161c, #14161c) center / 60% 60% no-repeat; }
.pp .two { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--u) * 8); }
.pp .hs { break-inside: avoid; margin-bottom: calc(var(--u) * 5); }
.pp .hs h2 { font-family: var(--serif); text-transform: none; letter-spacing: 0; font-size: calc(var(--u) * 5); font-weight: 420; color: #14161c; }
.pp .score { display: flex; align-items: center; gap: calc(var(--u) * 6); margin-bottom: calc(var(--u) * 3); }
.pp .sc-n { min-width: calc(var(--u) * 30); text-align: center; padding: calc(var(--u) * 3) calc(var(--u) * 4); border: calc(var(--u) * 0.4) solid #14161c; border-radius: calc(var(--u) * 3); font-family: var(--serif); font-size: calc(var(--u) * 12); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pp .sc-b { font-family: var(--serif); font-size: calc(var(--u) * 6); line-height: 1.1; }
.pp-cards .pp-b { overflow: visible; }
.cards { display: grid; grid-template-columns: repeat(2, calc(var(--u) * 85.6)); grid-auto-rows: calc(var(--u) * 54); gap: calc(var(--u) * 5) calc(var(--u) * 6); justify-content: center; margin-top: calc(var(--u) * 4); }
.wc { box-sizing: border-box; border: calc(var(--u) * 0.3) dashed #14161c; border-radius: calc(var(--u) * 2.4); padding: calc(var(--u) * 3) calc(var(--u) * 3.6); display: flex; flex-direction: column; gap: calc(var(--u) * 1); overflow: hidden; font-size: calc(var(--u) * 2.85); line-height: 1.3; }
.wc-h { display: flex; justify-content: space-between; align-items: baseline; gap: calc(var(--u) * 2); border-bottom: calc(var(--u) * 0.25) solid #14161c; padding-bottom: calc(var(--u) * 1.2); margin-bottom: calc(var(--u) * 0.6); }
.wc-h b { font-family: var(--serif); font-size: calc(var(--u) * 4.6); font-weight: 450; }
.wc-h span { font-weight: 650; }
.wc-f { margin-top: auto; padding-top: calc(var(--u) * 1); border-top: calc(var(--u) * 0.2) solid #9a9ea8; display: grid; gap: calc(var(--u) * 0.4); font-size: calc(var(--u) * 2.6); }
.wc-l b, .wc-f b { font-weight: 650; }
.pack:not(.color) .sc-n { background: none !important; }

.pack-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.pack-opts { position: sticky; top: 16px; }
.pack-opts .opts { display: grid; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.opts .opt:first-child { border-top: 0; padding-top: 0; }
.opt b { display: block; font-size: 13.5px; font-weight: 560; }
.opt small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; margin-top: 2px; }
.pack-opts .btn.block { margin-top: 16px; }
.cty-list { margin: 6px 0 10px; }
.chip.pill-x { cursor: pointer; transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out); }
.chip.pill-x:active { transform: scale(0.96); }
@media (max-width: 1000px) { .pack-grid { grid-template-columns: minmax(0, 1fr); } .pack-opts { position: static; } .pack-preview { max-height: none; } }

@media print {
  #print-root .pack { --u: 1mm; display: block; }
  #print-root .pp { margin: 0; padding: 0; width: auto; height: auto; min-height: 269mm; overflow: visible; box-shadow: none; break-after: page; page-break-after: always; border-radius: 0; }
  #print-root .paper-letter .pp { min-height: 251.4mm; }
  #print-root .pp-b { overflow: visible; flex: none; }
  #print-root .pp-f { margin-top: 6mm; }
  #print-root .cards { justify-content: start; }
  #print-root .pp:last-child { break-after: auto; page-break-after: auto; }
}

.pack-warn { display: none; margin-bottom: 12px; }
.pack-warn.on { display: flex; }
.map-panel .legend.legend-ramp { left: auto; bottom: auto; right: auto; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); padding: 14px 18px; width: auto; }
.map-panel .legend.legend-ramp { width: 100%; max-width: none; box-sizing: border-box; right: auto; }

/* ---- trajectory and nationality strength ---- */
.tl { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2, color-mix(in srgb, var(--ink) 4%, transparent)); display: grid; gap: 8px; }
.tl-t { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.tl-t span { color: var(--ink-3); }
.tl small { color: var(--ink-3); font-size: 11.5px; line-height: 1.45; }
.tl-better .tl-t { color: var(--steady, #2f7d4f); } .tl-worse .tl-t { color: var(--act, #b3412d); }
.tl-better .tl-t b, .tl-worse .tl-t b { color: inherit; }
.tl-building { grid-auto-flow: column; justify-content: start; align-items: start; gap: 10px; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.tl-spark { width: 100%; height: 40px; display: block; overflow: visible; }
.tl-spark .area { fill: color-mix(in srgb, var(--ink) 7%, transparent); }
.tl-spark .line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tl-spark .dot { fill: var(--ink); }
.cp-sh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cp-sh h3 { margin: 0; }
.q-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.q-chip { --c: var(--ink-3); display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); font-size: 12.5px; font-weight: 560; white-space: nowrap; }
.q-chip b { font-family: var(--serif); font-size: 19px; font-weight: 400; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1; }
.q-chip.est { border-style: dashed; }
.q-break { display: grid; gap: 12px; }
.q-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) 52px; align-items: center; gap: 12px; font-size: 13.5px; }
.q-row .q-l { display: grid; gap: 1px; min-width: 0; } .q-row small { color: var(--ink-3); font-size: 11.5px; line-height: 1.35; }
.q-row b { text-align: end; font-variant-numeric: tabular-nums; } .q-row.off b { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.q-bar { height: 6px; border-radius: 99px; background: var(--line-strong); overflow: hidden; }
.q-bar i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--ink); transform-origin: left; }
.method h3 { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 10px; }
.q-method { display: grid; gap: 14px; } .q-method p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.q-bands { display: grid; gap: 6px; } .q-bands div { display: flex; justify-content: space-between; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--line); } .q-bands span { color: var(--ink-3); }
.rank-list { display: grid; }
.rank-r { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: none; border-inline: 0; border-top: 0; width: 100%; text-align: start; color: inherit; font: inherit; cursor: pointer; }
.rank-r:last-child { border-bottom: 0; } .rank-r:hover { background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
.rank-n { font-family: var(--serif); font-size: 24px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rank-t { display: grid; gap: 6px; min-width: 0; } .rank-t b { font-weight: 600; } .rank-t small { color: var(--ink-3); font-size: 12px; }
.rank-t .q-bar { height: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .tl-spark .line { stroke-dasharray: 100; animation: tl-draw 700ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; }
  .tl-spark .dot { animation: tl-pop 300ms 600ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; }
  .q-bar i { animation: bar-grow 600ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; }
  .rank-r { animation: rise 320ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; animation-delay: calc(var(--i, 0) * 45ms); }
}
@keyframes tl-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes tl-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tl-spark .dot { transform-box: fill-box; transform-origin: center; }

/* ---- residency ---- */
.res-seg { max-width: 100%; }
.res-list { display: grid; }
.res-r { padding: 16px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.res-r:last-child { border-bottom: 0; }
.res-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .res-top b { font-size: 15px; font-weight: 600; } .res-top .grow { flex: 1; }
.res-bar { position: relative; height: 8px; border-radius: 99px; background: var(--line-strong); overflow: hidden; }
.res-bar i { position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: inherit; background: var(--ink); transform-origin: left; }
.res-r.near .res-bar i { background: var(--prepare, #b8791f); } .res-r.over .res-bar i { background: var(--act, #b3412d); }
.res-nums { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--ink-3); } .res-nums b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.res-left { margin-inline-start: auto; }
.spt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .spt > div { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.spt small { color: var(--ink-3); font-size: 11.5px; } .spt b { font-family: var(--serif); font-size: 28px; font-weight: 380; font-variant-numeric: tabular-nums; line-height: 1.05; } .spt span { color: var(--ink-3); font-size: 12px; }
.res-total { margin: 14px 0 8px; font-size: 14px; }
.prog-list { display: grid; }
.prog { display: grid; gap: 10px; width: 100%; text-align: start; padding: 16px 20px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; cursor: pointer; }
.prog:last-child { border-bottom: 0; } .prog:hover { background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
.prog-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; } .prog-top b { display: block; font-weight: 600; } .prog-top small { color: var(--ink-3); font-size: 12.5px; }
.prog-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; } .prog-steps i { height: 4px; border-radius: 99px; background: var(--line-strong); } .prog-steps i.on { background: var(--ink); }
.prog-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-3); font-size: 12.5px; }
.prog-flag { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.4; } .prog-flag.act { color: var(--act, #b3412d); } .prog-flag.prepare { color: var(--prepare-ink, #8a5a12); }
@media (prefers-reduced-motion: no-preference) {
  .res-bar i { animation: bar-grow 700ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; animation-delay: calc(var(--i, 0) * 60ms); }
  .res-r, .prog { animation: rise 320ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; animation-delay: calc(var(--i, 0) * 45ms); }
}

/* ---- coats of arms: always black and white ---- */
.arms-plate { flex: none; width: var(--s, 52px); height: var(--s, 52px); display: grid; place-items: center; border-radius: 14px; background: #f3f0e8; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.arms-plate:not(:has(img)) { display: none; }
.arms { width: 78%; height: 78%; object-fit: contain; filter: grayscale(1) contrast(1.25); }
.pp-h { position: relative; } .pp-arms { position: absolute; inset-block-start: 0; inset-inline-end: 0; height: calc(18 * var(--u, 1mm)); width: auto; max-width: calc(18 * var(--u, 1mm)); object-fit: contain; filter: grayscale(1) contrast(1.3); }
@media (prefers-reduced-motion: no-preference) { .arms-plate { animation: arms-in 420ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both; } }
@keyframes arms-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
