/* Layout: phone — one column (header, tabs, level card, content); from 960px — level rail on the left, tabs and content on the right.
   Long views open as a full screen on phones and as a right-hand panel on wide screens; short ones (checklist, language) as a bottom sheet. */
:root{
  --bg:#f3f5f7; --surface:#ffffff; --sunk:#eef1f4; --line:#d9dfe6; --line2:#edf0f3; --fg:#16202b; --fg2:#3f4b58; --muted:#5b6876; --accent:#24507a; --on-accent:#ffffff;
  --l0:#2f8a57; --l1:#c79a12; --l2:#d46a1c; --l3:#c0332d; --none:#c9d1da;
  --l0-bg:#e5f3ea; --l1-bg:#fbf2d6; --l2-bg:#fbe7d8; --l3-bg:#f8dfdd;
  --l0-bg2:#cfe8d8; --l1-bg2:#f5e7bb; --l2-bg2:#f6d3b8; --l3-bg2:#f0c4c1;
  --l0-ink:#1d5a38; --l1-ink:#6e5300; --l2-ink:#8a3f0c; --l3-ink:#8f1f1a; --l-text:#3b3415;
  --v0:#dfe4ea; --v1:#e2b93a; --v2:#e0782a; --v3:#c0332d; --v-ink:#16202b; --v3-ink:#ffffff;
  --guide-bg:#16202b; --guide-fg:#e4eaf0; --guide-muted:#a9b6c3; --guide-line:#3a4756; --guide-btn:#e4eaf0; --guide-btn-fg:#16202b;
  --scrim:rgba(15,21,28,.45); --shadow:rgba(15,21,28,.18);
  --f-display:"Unbounded","Golos Text",system-ui,sans-serif;
  --f-body:"Golos Text",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-mono:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#0f151c; --surface:#16202a; --sunk:#1c2833; --line:#283543; --line2:#1f2a35; --fg:#e4eaf0; --fg2:#c3ccd5; --muted:#93a1b0; --accent:#7fb0de; --on-accent:#0f151c;
  --l0:#4cbf7c; --l1:#e2b93a; --l2:#f08a3e; --l3:#ef5a52; --none:#3a4756;
  --l0-bg:#16301f; --l1-bg:#352b0e; --l2-bg:#3a2210; --l3-bg:#3d1716;
  --l0-bg2:#1d3f29; --l1-bg2:#463914; --l2-bg2:#4b2c15; --l3-bg2:#4f1e1c;
  --l0-ink:#7fd6a0; --l1-ink:#f0cf6a; --l2-ink:#f6a66b; --l3-ink:#f58a84; --l-text:#e4dcc2;
  --v0:#3a4756; --guide-bg:#1c2833; --guide-line:#3a4756; --scrim:rgba(0,0,0,.6); --shadow:rgba(0,0,0,.5); color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0f151c; --surface:#16202a; --sunk:#1c2833; --line:#283543; --line2:#1f2a35; --fg:#e4eaf0; --fg2:#c3ccd5; --muted:#93a1b0; --accent:#7fb0de; --on-accent:#0f151c;
  --l0:#4cbf7c; --l1:#e2b93a; --l2:#f08a3e; --l3:#ef5a52; --none:#3a4756;
  --l0-bg:#16301f; --l1-bg:#352b0e; --l2-bg:#3a2210; --l3-bg:#3d1716;
  --l0-bg2:#1d3f29; --l1-bg2:#463914; --l2-bg2:#4b2c15; --l3-bg2:#4f1e1c;
  --l0-ink:#7fd6a0; --l1-ink:#f0cf6a; --l2-ink:#f6a66b; --l3-ink:#f58a84; --l-text:#e4dcc2;
  --v0:#3a4756; --guide-bg:#1c2833; --guide-line:#3a4756; --scrim:rgba(0,0,0,.6); --shadow:rgba(0,0,0,.5); color-scheme:dark}

*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--f-body);font-size:15px;line-height:1.5;-webkit-text-size-adjust:100%}
body.lock{overflow:hidden}
a{color:var(--accent)}
button{font:inherit;color:inherit;cursor:pointer}
button:disabled{cursor:default;opacity:.35}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
h1,h2,h3{margin:0;text-wrap:balance}
p{margin:0}
.eyebrow{font-family:var(--f-mono);font-size:.7rem;text-transform:uppercase;letter-spacing:.11em;color:var(--muted)}
.mono{font-family:var(--f-mono);font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
.small{font-size:.8rem}
.h-lg{font-family:var(--f-display);font-weight:500;font-size:1.3rem;line-height:1.25}
@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* ---------- frame ---------- */
.shell{max-width:1200px;margin:0 auto;padding:16px 16px 48px;display:grid;grid-template-columns:minmax(0,1fr);gap:18px;
  grid-template-areas:"top" "tabs" "rail" "main" "foot"}
.top{grid-area:top;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 12px}
.brand{font-family:var(--f-display);font-weight:700;font-size:1.05rem;line-height:1.2;color:var(--fg);text-decoration:none;max-width:12em}
.tagline{grid-column:1;grid-row:2;display:none}
.pill{grid-column:2;grid-row:1;min-height:44px;padding:0 12px 0 14px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-family:var(--f-mono);font-size:.8rem;display:inline-flex;align-items:center;gap:4px}
.tabs{grid-area:tabs;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;background:var(--sunk);border-radius:12px}
.tabs-in{display:contents}
.tabs button,.tabs .tab-link{min-height:40px;border:0;border-radius:9px;background:transparent;color:var(--fg2)}
.tabs .tab-link{display:flex;align-items:center;justify-content:center;text-decoration:none}
.tabs .tab-link:hover{color:var(--fg)}
.tabs button[aria-selected="true"]{background:var(--surface);color:var(--fg);font-weight:600;box-shadow:0 1px 2px var(--shadow)}
.main{grid-area:main;min-width:0;display:flex;flex-direction:column;gap:24px}
.main > div{display:flex;flex-direction:column;gap:24px;min-width:0}
.foot{grid-area:foot;border-top:1px solid var(--line);padding-top:16px;font-size:.8rem;color:var(--muted);display:flex;flex-direction:column;gap:6px;max-width:72ch}
.foot b{color:var(--fg)}
.state{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:24px;display:flex;flex-direction:column;gap:8px}
.state h2{font-family:var(--f-display);font-weight:500;font-size:1.1rem}
body[data-tab="dyn"] .rail{display:none}
body.has-banner{padding-top:60px}
.banner{position:fixed;left:0;right:0;top:0;z-index:30;min-height:60px;padding:8px 16px;padding-top:calc(8px + env(safe-area-inset-top,0px));background:var(--fg);color:var(--bg);display:flex;align-items:center;justify-content:space-between;gap:12px}
.banner .eyebrow{color:inherit;opacity:.7;display:block}
.bn-t{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.bn-b{min-height:40px;padding:0 14px;border:0;border-radius:999px;background:var(--bg);color:var(--fg);font-weight:600;white-space:nowrap}

/* ---------- level rail ---------- */
.lv-green{--lv:var(--l0);--lvbg:var(--l0-bg);--lvbg2:var(--l0-bg2);--lvink:var(--l0-ink)}
.lv-yellow{--lv:var(--l1);--lvbg:var(--l1-bg);--lvbg2:var(--l1-bg2);--lvink:var(--l1-ink)}
.lv-orange{--lv:var(--l2);--lvbg:var(--l2-bg);--lvbg2:var(--l2-bg2);--lvink:var(--l2-ink)}
.lv-red{--lv:var(--l3);--lvbg:var(--l3-bg);--lvbg2:var(--l3-bg2);--lvink:var(--l3-ink)}
.c-green{--c:var(--l0)} .c-yellow{--c:var(--l1)} .c-orange{--c:var(--l2)} .c-red{--c:var(--l3)}
.rail{grid-area:rail;min-width:0;background:var(--lvbg);border-radius:18px;overflow:hidden;display:flex;flex-direction:column}
.hero{padding:20px;display:flex;flex-direction:column;gap:12px;color:var(--l-text)}
.ladder{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;align-items:end}
.ladder i{height:8px;border-radius:4px;background:var(--c);opacity:.32}
.ladder i.on{height:15px;opacity:1}
.lvl-row{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 12px}
.lvl{font-family:var(--f-display);font-weight:700;font-size:clamp(2.1rem,9vw,2.6rem);line-height:1;color:var(--lvink)}
.lvl-st{display:flex;flex-direction:column;align-items:flex-end;text-align:right;font-size:.82rem;color:var(--l-text);opacity:.9}
.why{font-size:.9rem;line-height:1.45}
.why b{font-weight:600;color:var(--lvink)}
.stale{font-size:.85rem;padding:8px 12px;border-radius:8px;background:var(--l2-bg);color:var(--fg)}
.check-row{width:100%;min-height:54px;padding:8px 20px;border:0;background:var(--lvbg2);color:var(--fg);display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;text-align:left}
.check-row.quiet{display:block;font-size:.85rem;color:var(--l-text)}
.cr-l{display:flex;flex-direction:column;line-height:1.3}
.cr-n{font-size:.8rem;color:var(--l-text)}
.cr-dots{display:flex;gap:4px}
.cr-dots i{width:9px;height:9px;border-radius:50%;border:1.5px solid var(--lvink)}
.cr-dots i.on{background:var(--lvink)}
.rail-x{display:none}
.strip14{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:3px}
.strip14 i{height:22px;border-radius:3px;background:var(--c,transparent)}
.strip14 i.nr{border:1px dashed var(--lvink);opacity:.35}
.rail-note{font-size:.78rem;color:var(--l-text);border-top:1px solid var(--lvbg2);padding-top:12px}

/* ---------- blocks ---------- */
.blk{display:flex;flex-direction:column;gap:12px;min-width:0}
.blk-h{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:6px 12px}
.blk-h h2{font-family:var(--f-display);font-weight:500;font-size:1.05rem}
.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;min-width:0}
.lnk{background:none;border:0;padding:0;color:var(--accent);font-size:.85rem;text-decoration:none;min-height:32px;display:inline-flex;align-items:center;gap:4px}
.lnk.sm{min-height:28px;font-size:.8rem}
.inl{background:none;border:0;padding:0;color:var(--accent);text-align:left;text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--accent) 35%,transparent);text-underline-offset:3px}
.hl{display:flex;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line2)}
.hl-t{display:flex;flex-direction:column;gap:4px;min-width:0}
.hl-m{font-family:var(--f-mono);font-size:.7rem;color:var(--muted);letter-spacing:.04em}
.ichip{flex:none;width:30px;height:30px;border:0;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-family:var(--f-mono);font-size:.75rem;font-weight:600;color:var(--v-ink);background:var(--v0)}
.ichip.v1{background:var(--v1)} .ichip.v2{background:var(--v2)} .ichip.v3{background:var(--v3);color:var(--v3-ink)}
.ichip.v0{color:var(--fg)}
.card-foot{min-height:50px;border:0;background:none;color:var(--accent);font-weight:500}
.bars-card{padding:16px;gap:4px}
.brow{display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:5px;text-align:center}
.marks{font-size:.72rem;font-weight:600;color:var(--accent);height:16px}
.bars{align-items:end;height:90px;border-bottom:1px solid var(--line)}
.bar{border:0;padding:0;border-radius:4px 4px 0 0;background:var(--v0);min-height:12px;width:100%}
.bar.v1{background:var(--v1)} .bar.v2{background:var(--v2)} .bar.v3{background:var(--v3)}
.bar:hover{filter:brightness(.92)}
.nums{font-family:var(--f-mono);font-size:.7rem;color:var(--muted);padding-top:2px}
.bars-lg{font-size:.75rem;color:var(--muted);padding-top:6px}
.lvlines{display:flex;flex-direction:column;gap:6px;padding-top:12px;margin-top:6px;border-top:1px solid var(--line2);font-size:.9rem}
.lvline.dim{color:var(--muted)}
.sw{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;background:var(--c,var(--v0));vertical-align:0}
.sw.v1{background:var(--v1)} .sw.v2{background:var(--v2)} .sw.v3{background:var(--v3)}
.sw.nr{background:transparent;border:1px dashed var(--muted)}
.navrow{min-height:52px;padding:0 12px 0 16px;border:0;border-bottom:1px solid var(--line2);background:none;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;text-align:left;color:var(--fg)}
.navrow:last-child{border-bottom:0}
.navrow-n{font-family:var(--f-mono);font-size:.78rem;color:var(--muted)}
.navrow svg,.check-row svg{color:var(--muted)}
.archnav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.archnav-b{min-height:54px;padding:6px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);display:flex;flex-direction:column;align-items:flex-start;line-height:1.3}
.archnav-b.r{align-items:flex-end}
.archnav-b span:first-child{font-size:.75rem}

/* guide */
.guide{background:var(--guide-bg);color:var(--guide-fg);border-radius:18px;padding:20px;display:flex;flex-wrap:wrap;gap:16px 32px;align-items:center}
.guide-t{flex:1 1 280px;display:flex;flex-direction:column;gap:6px;min-width:0}
.guide-h{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
.guide-h h2{font-family:var(--f-display);font-weight:500;font-size:1.05rem}
.guide-h .mono,.guide-t p{color:var(--guide-muted);font-size:.85rem}
.guide-h .mono{font-size:.7rem}
.guide-a{flex:1 1 280px;display:flex;flex-direction:column;gap:10px;min-width:0}
.guide-dl{min-height:56px;padding:8px 16px;border-radius:12px;background:var(--guide-btn);color:var(--guide-btn-fg);text-decoration:none;display:flex;justify-content:space-between;align-items:center;gap:12px}
.gd-l{display:flex;flex-direction:column;line-height:1.3}
.gd-l span{font-size:.75rem;opacity:.75}
.guide-o{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:.8rem;color:var(--guide-muted)}
.guide-o a{min-height:34px;padding:0 10px;display:inline-flex;align-items:center;border:1px solid var(--guide-line);border-radius:999px;color:var(--guide-fg);text-decoration:none}
.guide-lic{flex-basis:100%;font-size:.72rem;color:var(--guide-muted)}
.guide-lic a{color:var(--guide-fg)}

/* share kit */
.sharebox{padding:16px;gap:14px;margin-top:10px}
.shareacc>summary{cursor:pointer;list-style:none;min-height:44px;align-items:center}
.shareacc>summary::-webkit-details-marker{display:none}
.shareacc>summary svg{flex:none;transition:transform .15s}
.shareacc[open]>summary svg{transform:rotate(180deg)}
.share-imgs{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}
.share-fig{margin:0;display:flex;flex-direction:column;gap:6px;min-width:0}
.share-fig img{width:100%;height:auto;max-width:100%;border-radius:10px;border:1px solid var(--line);display:block}
.share-fig figcaption{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 8px;font-size:.8rem;color:var(--muted)}
.share-msg{display:flex;flex-direction:column;gap:6px}
.share-mh{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 10px;font-size:.88rem;font-weight:500}
.share-msg textarea{width:100%;min-width:0;resize:vertical;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--sunk);color:var(--fg);font:inherit;font-size:.88rem;line-height:1.45}
.btn.sm{min-height:40px}

/* ---------- trends ---------- */
.dyn-h{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:var(--surface)}
.seg button{min-height:38px;padding:0 14px;border:0;background:transparent;font-family:var(--f-mono);font-size:.78rem;color:var(--fg2)}
.seg button+button{border-left:1px solid var(--line)}
.seg button[aria-pressed="true"]{background:var(--fg);color:var(--bg)}
.seg.wide{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-radius:12px}
.seg.wide button{font-family:var(--f-body);font-size:.9rem}
.mx-wrap{overflow-x:auto;background:var(--surface);border:1px solid var(--line);border-radius:14px}
.mx{--cw:28px;min-width:max-content;display:flex;flex-direction:column}
.mx-r{display:grid;grid-template-columns:minmax(150px,220px) repeat(var(--n),var(--cw));column-gap:3px;align-items:center;min-height:44px;padding:0 12px;border:0;border-bottom:1px solid var(--line2);background:var(--surface);text-align:left;width:100%;color:var(--fg)}
.mx-h{min-height:30px;font-family:var(--f-mono);font-size:.7rem;color:var(--muted)}
.mx-o{border-bottom:2px solid var(--fg)}
.mx-r.open{background:var(--sunk)}
.mx-n{position:sticky;left:0;z-index:1;background:inherit;font-size:.82rem;line-height:1.25;padding:6px 8px 6px 0}
.mx-h .mx-n{background:var(--surface)}
.mx-o .mx-n{font-weight:600;font-size:.88rem}
.mx-c{height:26px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-family:var(--f-mono);font-size:.75rem;color:var(--v-ink);background:var(--v0)}
.mx-h .mx-c{background:none;color:var(--muted)}
.mx-h .mx-c.cur{color:var(--fg);font-weight:600}
.mx-c.v0{background:var(--sunk);color:var(--muted)} .mx-c.v1{background:var(--v1)} .mx-c.v2{background:var(--v2)} .mx-c.v3{background:var(--v3);color:var(--v3-ink)}
.mx-c.nr{background:transparent;border:1px dashed var(--none)}
.mx-c.lvc{background:var(--c)}
.mx-c.lvc.nr{background:transparent}
.mx-r:not(.mx-h) .mx-c.cur{box-shadow:inset 0 0 0 2px var(--fg);font-weight:600}
.mx-g{padding:12px 12px 4px;font-family:var(--f-mono);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);position:sticky;left:0;width:max-content}
.mx-det{padding:8px 12px 14px;background:var(--sunk);border-bottom:1px solid var(--line2);display:flex;flex-direction:column;gap:6px;max-width:min(92vw,640px);position:sticky;left:0;font-size:.88rem}
.new{color:var(--accent);font-weight:600;font-size:.7rem}
.btn{min-height:44px;padding:0 14px;border:1px solid var(--accent);border-radius:10px;background:var(--surface);color:var(--accent);font-weight:500;display:inline-flex;align-items:center;gap:8px;align-self:flex-start}

/* ---------- overlay panel ---------- */
.ov{position:fixed;inset:0;z-index:40}
.scrim{position:absolute;inset:0;background:var(--scrim)}
.ov-panel{position:absolute;inset:0;background:var(--surface);overflow-y:auto;overscroll-behavior:contain;outline:none;padding-bottom:env(safe-area-inset-bottom,0px)}
.ov-bar{position:sticky;top:0;z-index:2;min-height:56px;padding:0 8px;padding-top:env(safe-area-inset-top,0px);background:var(--surface);border-bottom:1px solid var(--line2);display:flex;align-items:center;justify-content:space-between}
.ov-back{min-height:44px;padding:0 8px;border:0;background:none;color:var(--accent);display:inline-flex;align-items:center;gap:4px}
.ov-tools{display:flex;gap:2px;margin-left:auto}
.ib{width:44px;height:44px;border:0;border-radius:10px;background:none;display:inline-flex;align-items:center;justify-content:center;color:var(--fg)}
.ov-x{background:var(--sunk)}
.ov .ov-x{display:none}
.ov-body{padding:20px 16px 48px;display:flex;flex-direction:column;gap:18px;max-width:720px;margin:0 auto}
.v-h{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.v-s{display:flex;flex-direction:column;gap:8px}
.v-s h3{font-size:.95rem;font-weight:600}
.v-box{background:var(--sunk);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:10px}
.vb-h{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 10px}
.lvpill{display:inline-flex;align-items:center;gap:6px;font-size:.78rem;font-weight:600;padding:3px 10px;border-radius:999px;background:var(--lvbg);color:var(--lvink)}
.lvpill i{width:8px;height:8px;border-radius:50%;background:var(--lv)}
.vpill{font-size:.8rem;font-weight:600;padding:3px 10px;border-radius:999px;background:var(--sunk)}
.vpill.v1{background:var(--l1-bg);color:var(--l1-ink)} .vpill.v2{background:var(--l2-bg);color:var(--l2-ink)} .vpill.v3{background:var(--l3-bg);color:var(--l3-ink)}
.tags{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.chg{font-weight:500}
.sp{display:flex;flex-direction:column;gap:10px}
.sp p{font-size:1rem;line-height:1.6}
.cite,.ref,.gb{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:5px;font-family:var(--f-mono);font-size:.68rem;font-weight:600;text-decoration:none;vertical-align:2px;border:1px solid var(--accent);color:var(--accent);background:transparent}
.cite{min-width:26px;height:24px}
.g-a{background:var(--accent);color:var(--on-accent)}
.g-c{border-style:dashed}
.cite.on{outline:2px solid var(--l1);outline-offset:1px}
.ref{margin-left:2px}
.srccard{background:var(--sunk);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:8px;font-size:.88rem}
.sc-h,.sc-f{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 12px}
.runrow{width:100%;min-height:50px;padding:6px 0;border:0;border-bottom:1px solid var(--line2);background:none;display:grid;grid-template-columns:48px 10px minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;color:var(--fg);font-size:.88rem;line-height:1.35}
.runrow .mono{font-size:.75rem;color:var(--muted)}
.runrow.cur{cursor:default}
.runrow.cur .mono{color:var(--fg);font-weight:600}
.dot{width:10px;height:10px;border-radius:50%;background:var(--c)}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chipb{min-height:40px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-size:.88rem}
.chipb[aria-pressed="true"]{background:var(--fg);border-color:var(--fg);color:var(--bg)}
.hist{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:3px;align-items:end;height:60px}
.hist i{border-radius:3px 3px 0 0;background:var(--v0)}
.hist i.v1{background:var(--v1)} .hist i.v2{background:var(--v2)} .hist i.v3{background:var(--v3)}
.hist i.nr{height:60px;background:transparent;border:1px dashed var(--none)}
.axis{display:flex;justify-content:space-between;font-family:var(--f-mono);font-size:.68rem;color:var(--muted)}
.chg-l{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px;font-size:.85rem}
.chg-l li{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px}
.evi{display:grid;grid-template-columns:22px minmax(0,1fr) 14px;gap:10px;padding:11px 0;border-bottom:1px solid var(--line2);color:var(--fg);text-decoration:none}
.evi.target,.srccard.target{scroll-initial-target:nearest;background:var(--lvbg);outline:2px solid var(--accent);border-radius:10px;padding-left:10px;padding-right:10px}
.evi .gb{width:22px;height:22px;padding:0}
.evi-t{display:flex;flex-direction:column;gap:2px;font-size:.9rem;line-height:1.4}
.evi-m{font-size:.75rem;color:var(--muted)}
.evi-x{color:var(--accent);font-size:.8rem}
.wide{min-height:48px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--accent);font-weight:500}
.acc{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.acc-h{width:100%;min-height:52px;padding:0;border:0;border-bottom:1px solid var(--line2);background:none;display:grid;grid-template-columns:auto minmax(0,1fr) auto 18px;gap:10px;align-items:center;text-align:left;color:var(--fg)}
.acc-b{padding:0 0 8px 40px;display:flex;flex-direction:column}
.rladder{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}
.rl{border:1px solid var(--line);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:6px;font-size:.9rem}
.rl .sw{background:var(--c);opacity:.6}
.rl-h{display:flex;align-items:center;gap:2px}
.rl-s{margin-left:auto;font-size:.8rem;color:var(--muted)}
.rl p{color:var(--fg2)}
.rl.on{border:2px solid var(--c);background:var(--sunk)}
.rl.on .sw{opacity:1}
.rl.on .rl-s{color:var(--fg);font-weight:600}
.gaps{margin:0;padding-left:1.1em;display:flex;flex-direction:column;gap:12px}
.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tile{background:var(--sunk);border-radius:12px;padding:10px 6px;display:flex;flex-direction:column;align-items:center;font-size:.75rem;color:var(--muted)}
.tile b{font-size:1.35rem;color:var(--fg)}
.dots{display:inline-flex;gap:2px}
.dots i{width:7px;height:7px;border-radius:2px;background:var(--v0)}
.dots.s1 i:nth-child(-n+1),.dots.s2 i:nth-child(-n+2),.dots.s3 i:nth-child(-n+3),.dots.s4 i{background:var(--accent)}
.srow{min-height:44px;padding:6px 0;border-bottom:1px solid var(--line2);display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--fg);text-decoration:none;font-size:.9rem}
.srow-n{flex-basis:100%;font-size:.75rem;color:var(--muted)}
.flag{font-size:.7rem;padding:1px 8px;border-radius:999px;background:var(--sunk);color:var(--muted);margin-left:6px;white-space:nowrap}
.flag.sent{color:var(--accent)}
.tbl-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px}
.tbl{border-collapse:collapse;width:100%;font-size:.82rem}
.tbl th,.tbl td{padding:8px 10px;border-bottom:1px solid var(--line2);text-align:left;vertical-align:top}
.tbl th{font-weight:600;color:var(--muted);font-size:.75rem;white-space:nowrap}
.tbl a{color:var(--fg)}
.nw{white-space:nowrap}
.cal-nav{display:flex;justify-content:space-between;align-items:center}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.cal.wd span{text-align:center;font-size:.72rem;color:var(--muted)}
.cd{height:46px;border:0;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:var(--f-mono);font-size:.82rem;line-height:1.1;background:var(--c);color:var(--v-ink);font-weight:600}
.cd.c-green,.cd.c-red{color:#ffffff}
.cd-r{font-size:.55rem;letter-spacing:-.05em}
.cd.nr{background:transparent;border:1px dashed var(--none);color:var(--muted);font-weight:400}
.cd.pre,.cd.fut{background:var(--sunk);color:var(--muted);opacity:.6;font-weight:400}
.cd.sel{outline:2px solid var(--fg);outline-offset:2px}
.cal-lg{display:flex;flex-wrap:wrap;gap:4px 14px}

/* ---------- bottom sheet ---------- */
.sh{position:fixed;inset:0;z-index:50}
.sh-panel{position:absolute;left:0;right:0;bottom:0;max-height:88vh;overflow-y:auto;background:var(--surface);border-radius:20px 20px 0 0;padding:10px 20px calc(24px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:14px;box-shadow:0 -8px 24px var(--shadow);outline:none}
.grip{align-self:center;width:40px;height:4px;border-radius:2px;background:var(--none)}
.sh-h{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.sh-h h2{font-family:var(--f-display);font-weight:500;font-size:1.1rem}
.sh .ov-x{display:inline-flex}
.prog{height:6px;border-radius:3px;background:var(--sunk);overflow:hidden}
.prog i{display:block;height:100%;background:var(--lv)}
.checks{display:flex;flex-direction:column}
.checks label{min-height:52px;display:flex;gap:12px;align-items:center;border-bottom:1px solid var(--line2);cursor:pointer}
.checks input{width:22px;height:22px;flex:none;accent-color:var(--accent)}
.checks label.done span{color:var(--muted);text-decoration:line-through}
.prev{background:var(--sunk);border-radius:12px;padding:0 14px}
.prev summary{min-height:48px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;list-style:none}
.prev summary::-webkit-details-marker{display:none}
.prev-l{font-size:.75rem;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.prev ul{margin:4px 0 12px;padding-left:1.1em;font-size:.88rem;display:flex;flex-direction:column;gap:4px}
.radios{display:flex;flex-direction:column}
.radio{min-height:56px;padding:0;border:0;border-bottom:1px solid var(--line2);background:none;display:grid;grid-template-columns:minmax(0,1fr) 22px;grid-template-rows:auto auto;column-gap:12px;align-items:center;text-align:left;color:var(--fg)}
.r-t{grid-column:1}
.r-n{grid-column:1;font-size:.75rem;color:var(--muted)}
.r-dot{grid-column:2;grid-row:1/3;width:22px;height:22px;border-radius:50%;border:2px solid var(--none)}
.radio.on .r-t{font-weight:600}
.radio.on .r-dot{border-color:var(--accent);box-shadow:inset 0 0 0 4px var(--surface);background:var(--accent)}

/* ---------- wide screens: level rail, side panel ---------- */
@media (min-width:960px){
  .shell{grid-template-columns:340px minmax(0,1fr);column-gap:40px;row-gap:22px;padding-top:24px;
    grid-template-areas:"top top" "rail tabs" "rail main" "rail foot";align-items:start}
  .tagline{display:block}
  .brand{max-width:none;font-size:1.2rem}
  .pill{grid-row:1/3}
  .rail{position:sticky;top:20px;grid-row:2/5;padding:24px;gap:18px}
  body[data-tab="dyn"] .rail{display:flex}
  .hero{padding:0}
  .lvl-st{align-items:flex-start;text-align:left}
  .check-row{border-radius:12px;padding:8px 16px}
  .rail-x{display:flex;flex-direction:column;gap:8px}
  .rail-x .lbl{font-size:.8rem;color:var(--l-text)}
  .tabs{display:flex;background:none;padding:0;gap:28px;border-bottom:1px solid var(--line);border-radius:0}
  .tabs button,.tabs .tab-link{flex:none;padding:0;border-radius:0;min-height:44px;border-bottom:2px solid transparent;margin-bottom:-1px}
  .tabs button[aria-selected="true"]{background:none;box-shadow:none;border-bottom-color:var(--fg)}
  .ov-panel{left:auto;width:480px;max-width:100%;box-shadow:-12px 0 32px var(--shadow)}
  .ov .ov-back{display:none}
  .ov .ov-x{display:inline-flex}
  .ov-bar{padding-left:20px}
  .ov-body{padding:20px 24px 48px}
  .sh-panel{left:50%;right:auto;bottom:auto;top:50%;transform:translate(-50%,-50%);width:440px;border-radius:20px}
  .grip{display:none}
  .mx{--cw:32px}
}

/* ---------- Today Map widget ---------- */
.today-map-blk{margin-top:2px}
.today-map-card{overflow:hidden}
.today-map-badge{font-size:.75rem;font-weight:normal;color:var(--muted);margin-left:8px;padding:2px 8px;border-radius:999px;background:var(--sunk);border:1px solid var(--line);vertical-align:middle}
.today-map-split{display:grid;grid-template-columns:minmax(0,1fr)}
@media (min-width:760px){
  .today-map-split{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);min-height:330px}
}
.today-map-view{position:relative;width:100%;min-height:260px;height:100%;background:var(--sunk)}
.today-map-view .maplibregl-map{width:100%;height:100%}
.today-map-view .maplibregl-canvas{outline:none}
.today-map-info{padding:14px 16px;display:flex;flex-direction:column;gap:12px;background:var(--surface);border-top:1px solid var(--line2);justify-content:flex-start}
@media (min-width:760px){
  .today-map-info{border-top:0;border-left:1px solid var(--line2);overflow-y:auto;max-height:360px}
}
.today-map-chips{display:flex;flex-wrap:wrap;gap:6px}
.tm-chip{border:1px solid var(--line);border-radius:8px;padding:4px 10px;font-size:.8rem;background:var(--sunk);color:var(--fg2);display:inline-flex;align-items:center;gap:6px;cursor:pointer;transition:background .12s,border-color .12s,color .12s;text-align:left}
.tm-chip:hover{color:var(--fg);border-color:var(--muted)}
.tm-chip.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--fg);font-weight:600}
.tm-chip-cnt{font-size:.7rem;font-family:var(--f-mono);padding:1px 5px;border-radius:999px;background:color-mix(in srgb,var(--fg) 10%,transparent)}
.today-map-detail{display:flex;flex-direction:column;gap:8px}
.tm-ev-card{background:var(--sunk);border:1px solid var(--line);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:6px}
.tm-ev-h{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.tm-ev-tag{font-family:var(--f-mono);font-size:.75rem;font-weight:600;display:inline-flex;align-items:center;gap:5px}
.tm-ev-tag.g-mil{color:#d94b41}
.tm-ev-tag.g-hyb{color:#d97706}
.tm-ev-tag.g-pol{color:#2563eb}
.tm-ev-tag.g-civ{color:#059669}
.tm-dist{font-family:var(--f-mono);font-size:.75rem;color:var(--accent);font-weight:600}
.tm-ev-t{font-size:.85rem;line-height:1.45;color:var(--fg);margin:0}
.tm-ev-f{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:.75rem;color:var(--muted);padding-top:4px;border-top:1px solid var(--line2)}
.today-map-empty{padding:18px 16px;display:flex;align-items:center;gap:10px;font-size:.88rem;color:var(--muted)}
.today-map-empty-dot{width:8px;height:8px;border-radius:50%;background:#4cbf7c;flex:none}

/* Custom markers for today map */
.tm-vln-marker{position:relative;width:14px;height:14px;pointer-events:none}
.tm-vln-dot{position:absolute;left:2px;top:2px;width:10px;height:10px;border-radius:50%;background:#2563eb;border:2px solid #ffffff;box-shadow:0 1px 4px rgba(0,0,0,.4)}
.tm-vln-pulse{position:absolute;left:-3px;top:-3px;width:20px;height:20px;border-radius:50%;background:rgba(37,99,235,.35);animation:tm-pulse 2s cubic-bezier(0,0,.2,1) infinite}
.tm-vln-lbl{position:absolute;left:16px;top:-3px;font-family:var(--f-body);font-size:11px;font-weight:700;color:#ffffff;text-shadow:0 1px 3px rgba(0,0,0,.9),0 0 6px rgba(0,0,0,.8);white-space:nowrap;pointer-events:none}
@keyframes tm-pulse{0%{transform:scale(.7);opacity:1}100%{transform:scale(2.2);opacity:0}}

.tm-pin{cursor:pointer;display:flex;flex-direction:column;align-items:center;transform:translate(-50%,-100%);transition:transform .15s}
.tm-pin:hover,.tm-pin.active{transform:translate(-50%,-100%) scale(1.15);z-index:10}
.tm-pin-body{font-family:var(--f-mono);font-size:10px;font-weight:700;color:#ffffff;padding:2px 6px;border-radius:5px;box-shadow:0 2px 6px rgba(0,0,0,.4);border:1.5px solid #ffffff;text-shadow:0 1px 2px rgba(0,0,0,.6);line-height:1.2}
.tm-pin.g-mil .tm-pin-body{background:#d94b41}
.tm-pin.g-hyb .tm-pin-body{background:#d97706}
.tm-pin.g-pol .tm-pin-body{background:#2563eb}
.tm-pin.g-civ .tm-pin-body{background:#059669}
.tm-pin-arrow{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #ffffff;margin-top:-1px}
.tm-pin.active .tm-pin-body{box-shadow:0 0 0 2px var(--accent),0 4px 10px rgba(0,0,0,.5)}

