/* Oresight — field-survey look: stage bands like strata, one curve as the identity.
   Colours are CSS variables so Settings can change every one of them. */
:root{
  --bg:#f2f3ef; --panel:#fbfbf8; --ink:#1b2320; --muted:#5d6862; --rule:#d6dad3;
  --band:#e7eae3; --band2:#eef0ea; --accent:#1d6f55;
  --c-build:#207e5d; --c-mid:#be8127; --c-low:#8a321a; --c-early:#4d4594; --tmpl:#8a7a3e;
  --display:"Barlow Condensed","Arial Narrow",Arial,sans-serif;
  --body:"Public Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --tabh:62px; --r:12px; --maxw:980px;
}
@media (prefers-color-scheme:dark){:root{
  --bg:#1f2522; --panel:#28302c; --ink:#e8ede9; --muted:#a3afa8; --rule:#3a4640;
  --band:#2a332e; --band2:#242c28; --accent:#5cc9a0;
  --c-build:#58c69b; --c-mid:#fea702; --c-low:#d85154; --c-early:#7e79ca; --tmpl:#d0bd74;
  color-scheme:dark}}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font-family:var(--body);font-size:15.5px;line-height:1.5;
  -webkit-tap-highlight-color:transparent;padding-bottom:calc(var(--tabh) + env(safe-area-inset-bottom,0px) + 16px)}
h1,h2,h3{font-family:var(--display);font-weight:600;letter-spacing:.005em;margin:0;line-height:1.08;text-wrap:balance}
h1{font-size:32px;font-weight:700} h2{font-size:23px;margin-top:10px} h3{font-size:19px}
p{margin:0}
a{color:var(--accent)}
.small{font-size:13px} .muted{color:var(--muted)}
.eyebrow{font-size:13px;color:var(--muted)}
button{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
svg use{pointer-events:none}

/* header */
header.top{position:sticky;top:0;z-index:6;background:var(--bg);display:flex;align-items:center;gap:6px;
  padding:calc(env(safe-area-inset-top,0px) + 8px) 12px 8px;border-bottom:1px solid var(--rule)}
.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font-family:var(--display);font-weight:700;font-size:25px;letter-spacing:.01em;min-width:0}
.brand .logo{width:30px;height:30px;border-radius:8px;flex:none}
.iconbtn{display:inline-grid;place-items:center;width:40px;height:40px;border:0;background:none;border-radius:10px;cursor:pointer;color:var(--ink);flex:none}
.iconbtn svg{width:24px;height:24px}
.iconbtn.small{width:34px;height:34px;border:1px solid var(--rule);background:var(--panel)}
.iconbtn:active{background:var(--band)}

main{max-width:var(--maxw);margin:0 auto;padding:16px}
.view{display:flex;flex-direction:column;gap:14px}
.panel{background:var(--panel);border:1px solid var(--rule);border-radius:var(--r);padding:10px}
.chart{width:100%;height:auto;display:block;overflow:visible;touch-action:manipulation}
.chart text{font-family:var(--body);fill:var(--muted);font-variant-numeric:tabular-nums}
.maphead{display:flex;flex-direction:column;gap:6px}
.maphead p{max-width:60ch}

/* Separate published project cohort. Bars show coverage, never a failure complement. */
.history-panel{padding:18px}
.history-panel h2{margin:3px 0 7px}
.history-scope{max-width:76ch}
.history-panel>details{margin-top:12px}
.history-panel summary{cursor:pointer;font-weight:600}
.history-body,.history-method{display:flex;flex-direction:column;gap:14px;padding-top:14px}
#historyResults{display:flex;flex-direction:column;gap:14px}
.history-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.history-totals>div{display:flex;flex-direction:column;gap:4px;border-left:2px solid var(--rule);padding-left:12px;font-size:12px}
.history-totals strong,.history-rate strong{font-family:var(--mono);font-size:25px;font-weight:500;font-variant-numeric:tabular-nums}
.history-totals b{font-size:13px}
.history-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.history-heading label{display:flex;align-items:center;gap:8px}
.history-key{display:flex;gap:10px 16px;flex-wrap:wrap;color:var(--muted)}
.history-key>span{display:inline-flex;align-items:center;gap:6px}
.history-key i{width:12px;height:12px;border:1px solid var(--muted)}
.history-within{background:var(--accent)}
.history-later{background:var(--c-mid)}
.history-unknown{background:repeating-linear-gradient(135deg,var(--panel),var(--panel) 3px,var(--rule) 3px,var(--rule) 6px)}
.history-stages{display:grid;grid-template-columns:1fr;gap:10px}
.history-stage{border:1px solid var(--rule);border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:10px}
.history-stage-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.history-stage h3{font-size:23px;margin-top:4px}
.history-stage .eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.08em}
.history-rate{display:flex;flex-direction:column;align-items:flex-end;font-size:12px;flex:none}
.history-rate strong{font-size:31px;line-height:1.2}
.history-rate strong{color:var(--accent)}
.history-bar{display:flex;height:16px;border:1px solid var(--rule);overflow:hidden;border-radius:3px}
.history-bar>span{height:100%}
.history-breakdown{display:flex;justify-content:space-between;gap:8px;margin:0;font-size:12px}
.history-breakdown dt{color:var(--muted)}
.history-breakdown dd{margin:2px 0 0;font-family:var(--mono)}
.history-breakdown dd span{color:var(--muted)}
.history-small{border:1px solid var(--c-mid);border-radius:4px;color:var(--c-mid);padding:2px 5px;white-space:nowrap}
.history-cohort-note p{margin-top:6px;color:var(--muted)}
.history-inspect{align-self:flex-start;font-size:12px}
.history-failure-note{border-left:3px solid var(--c-mid);padding:8px 12px;background:var(--band2)}
.history-failure-note p{margin-top:4px}
.history-record-controls{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}
.history-record-controls label{display:flex;flex-direction:column;gap:4px;font-size:12px;max-width:100%}
.history-record-controls select{max-width:100%}
.history-record-table{overflow:auto;max-height:420px;margin-top:10px;border:1px solid var(--rule);border-radius:8px}
.history-record-table table{width:100%;border-collapse:collapse;min-width:680px;font-size:12px}
.history-record-table th,.history-record-table td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--rule);vertical-align:top}
.history-record-table thead th{position:sticky;top:0;background:var(--band2);z-index:1}
.history-record-table caption{text-align:left;padding:8px 10px;color:var(--muted)}
@media(max-width:600px){.history-panel{padding:14px}.history-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.history-stage h3{font-size:21px}.history-stage-heading{gap:8px}.history-rate strong{font-size:27px}.history-rate span{font-size:10px;max-width:100px;text-align:right}.history-breakdown{font-size:11px;gap:6px}}

/* controls */
.controls{display:flex;gap:8px;align-items:stretch;flex-wrap:wrap}
.measure{display:flex;gap:6px;align-items:center;flex:1;min-width:0}
.seg{display:inline-flex;border:1px solid var(--rule);border-radius:10px;overflow:hidden;background:var(--panel);flex:none}
.seg button{border:0;background:transparent;color:var(--muted);font-size:13.5px;padding:8px 11px;cursor:pointer;white-space:nowrap}
.seg button[aria-pressed="true"]{background:var(--ink);color:var(--bg);font-weight:600}
.measure .seg{flex:1;min-width:0}
.measure .seg button{flex:1;padding:6px 4px;font-size:12.5px;line-height:1.15;white-space:normal}
.measure .info{width:36px;height:36px;color:var(--muted)}
.measure .info svg{width:20px;height:20px}
.filterbtn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--rule);background:var(--panel);border-radius:10px;padding:0 12px;min-height:38px;cursor:pointer;font-size:14px}
.filterbtn svg{width:18px;height:18px}
.filterbtn .count{background:var(--accent);color:var(--panel);border-radius:99px;font-size:12px;min-width:20px;height:20px;display:grid;place-items:center;padding:0 6px}
.search{width:100%;font:inherit;font-size:16px;padding:11px 14px;border-radius:12px;border:1px solid var(--rule);background:var(--panel);color:var(--ink)}
select{font:inherit;font-size:14.5px;padding:8px 10px;border-radius:10px;border:1px solid var(--rule);background:var(--panel);color:var(--ink)}
.sortbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sortbar #count{margin-left:auto}
.btn{border:1px solid var(--rule);background:var(--panel);border-radius:12px;padding:11px 16px;font-size:15px;font-weight:600;cursor:pointer;text-decoration:none;color:var(--ink);text-align:center}
.btn.primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.linkbtn{border:0;background:none;color:var(--accent);font-weight:600;cursor:pointer;padding:6px}
.chip{font-size:13.5px;padding:7px 12px;border-radius:99px;border:1px solid var(--rule);background:var(--panel);color:var(--ink);cursor:pointer;white-space:nowrap;flex:none;display:inline-flex;align-items:center;gap:6px}
.chip[aria-pressed="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.more{align-self:center}

/* legend doubles as a phase filter */
.legend{display:flex;flex-wrap:wrap;gap:6px}
.legend .chip{font-size:13px;padding:5px 10px}
.legend .chip[aria-pressed="true"]{background:var(--panel);color:var(--ink);border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.legend .chip.off{opacity:.45}
.sw{width:10px;height:10px;border-radius:50%;display:inline-block;flex:none}
.sw.line{width:18px;height:0;border-radius:0;border-top:2.5px solid var(--tmpl)}
.legend .lkey{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);padding:5px 4px}
.learnlink{display:inline-flex;align-items:center;gap:6px;font-weight:600;text-decoration:none;align-self:flex-start}
.learnlink svg{width:18px;height:18px}

/* what changed since the last visit (watchlist) */
.changes{background:var(--panel);border:1px solid var(--rule);border-left:3px solid var(--accent);border-radius:var(--r);padding:10px 14px;display:flex;flex-direction:column;gap:6px}
.changes h3{font-size:17px}
.changes ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:4px;font-size:14.5px}
.changes a{font-weight:600;text-decoration:none}
/* compare */
.cmpwrap{overflow:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--rule);border-radius:var(--r);background:var(--panel)}
table.cmp{border-collapse:collapse;min-width:100%;font-size:14px}
table.cmp th,table.cmp td{padding:8px 12px;border-bottom:1px solid var(--rule);text-align:left;vertical-align:top;min-width:150px}
table.cmp th:first-child,table.cmp td:first-child{position:sticky;left:0;background:var(--panel);color:var(--muted);font-weight:400;min-width:120px;max-width:160px;z-index:1;box-shadow:1px 0 0 var(--rule)}
table.cmp thead th{font-family:var(--display);font-size:17px;font-weight:600;color:var(--ink);vertical-align:bottom}
table.cmp thead th small{display:block;font-family:var(--body);font-size:12.5px;font-weight:400;color:var(--muted)}
table.cmp thead th .linkbtn{padding:0 4px;font-size:12.5px}
table.cmp td b{font-variant-numeric:tabular-nums}
table.cmp td.best{background:color-mix(in srgb,var(--c-build) 12%,transparent)}
table.cmp tr.sec td,table.cmp tr.sec th{background:var(--band2);font-family:var(--display);font-size:15px;font-weight:600;color:var(--ink);padding-top:6px;padding-bottom:6px}
#cmpHits:empty{display:none} #cmpHits .item{padding:8px 12px}
.cmpbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
/* list */
.list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;background:var(--panel);border:1px solid var(--rule);
  border-radius:var(--r);padding:12px 14px;cursor:pointer;color:inherit;text-decoration:none}
.item:active{background:var(--band2)}
.item .nm{font-weight:600;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .tk{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .sub{grid-column:1/-1;font-size:13px;color:var(--muted);display:flex;gap:6px 10px;align-items:center;flex-wrap:wrap;margin-top:4px}
.item .sub .inv{max-width:min(100%,34ch);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .val{text-align:right;font-family:var(--display);font-size:21px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.1}
.item .val small{display:block;font-family:var(--body);font-size:12px;font-weight:400;color:var(--muted)}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;padding:2px 9px 2px 7px;border-radius:99px;white-space:nowrap;border:1px solid currentColor;color:var(--ink)}
.pill::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--pc);flex:none}
.pill{border-color:color-mix(in srgb,var(--pc) 55%,transparent);background:color-mix(in srgb,var(--pc) 10%,transparent)}
.k-build{--pc:var(--c-build)} .k-mid{--pc:var(--c-mid)} .k-low{--pc:var(--c-low)} .k-early{--pc:var(--c-early)} .k-high{--pc:var(--tmpl)}
.clegend .k-build,.clegend .k-mid,.clegend .k-low,.clegend .k-early{color:var(--pc)}
.badge{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;padding:2px 8px;border-radius:6px;background:var(--band);color:var(--muted);white-space:nowrap}
.badge.verified{background:color-mix(in srgb,var(--accent) 16%,transparent);color:var(--accent)}
.badge.ai{background:color-mix(in srgb,var(--c-mid) 18%,transparent);color:var(--c-mid)}
.empty{padding:34px 12px;text-align:center;color:var(--muted)}

/* detail */
.dhead{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.dhead h1{font-size:34px}
.dacts{display:flex;gap:8px;flex:none}
.star{width:44px;height:44px;border:1px solid var(--rule);border-radius:12px;background:var(--panel);color:var(--muted);cursor:pointer;display:grid;place-items:center;flex:none}
.star svg{width:24px;height:24px}
.star[aria-pressed="true"]{color:var(--c-mid);border-color:var(--c-mid)}
.star[aria-pressed="true"] svg path{fill:currentColor}
.badges{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat{background:var(--panel);border:1px solid var(--rule);border-radius:var(--r);padding:10px 12px;min-width:0}
.stat b{display:block;font-family:var(--display);font-size:26px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.05}
.stat small{display:block;font-size:12.5px;color:var(--muted);line-height:1.3;margin-top:2px}
.stat[data-m]{cursor:pointer} .stat[data-m] small{text-decoration:underline dotted;text-underline-offset:3px;text-decoration-color:color-mix(in srgb,var(--muted) 60%,transparent)}
.toast{position:fixed;left:50%;bottom:calc(var(--tabh) + env(safe-area-inset-bottom,0px) + 20px);transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:9px 16px;border-radius:99px;font-size:13.5px;z-index:40;box-shadow:0 6px 18px rgba(0,0,0,.2);white-space:nowrap}
.iconbtn.small svg{width:18px;height:18px}
.linkbtn.small{font-size:13.5px}
.chartcard{display:flex;flex-direction:column;gap:10px;padding:12px}
.charttools{display:flex;flex-direction:column;gap:8px}
.charttools > .seg{display:flex} .charttools > .seg button{flex:1}
.block{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.note{font-size:14px;padding:10px 12px;border-radius:10px;background:var(--band2);color:var(--muted)}
.srcs{font-size:13.5px;display:flex;flex-direction:column;gap:6px;word-break:break-word}
.status{font-size:16px}
.next{display:flex;gap:10px;align-items:flex-start;background:var(--panel);border:1px solid var(--rule);border-radius:var(--r);padding:10px 12px}
.next b{font-family:var(--display);font-size:17px;white-space:nowrap}
/* milestone timeline */
.timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.timeline li{display:grid;grid-template-columns:22px 1fr auto;gap:10px;align-items:start;position:relative;padding-bottom:12px}
.timeline li::before{content:"";position:absolute;left:10px;top:18px;bottom:-2px;width:2px;background:var(--rule)}
.timeline li:last-child::before{display:none}
.timeline .dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--rule);background:var(--bg);display:grid;place-items:center;font-size:12px;position:relative;z-index:1}
.timeline li.done .dot{background:var(--accent);border-color:var(--accent);color:var(--panel)}
.timeline li.done.sp .dot{background:var(--c-mid);border-color:var(--c-mid)}
.timeline .what{font-weight:600}
.timeline li:not(.done) .what{color:var(--muted);font-weight:400}
.timeline .when{font-variant-numeric:tabular-nums;color:var(--muted);font-size:14px}
details.more-info{background:var(--panel);border:1px solid var(--rule);border-radius:var(--r);padding:10px 12px}
details.more-info summary{cursor:pointer;font-weight:600}
details.more-info[open] summary{margin-bottom:8px}

/* bottom sheets */
.sheet-back{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:20}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:21;background:var(--panel);border-radius:18px 18px 0 0;
  padding:8px 16px calc(16px + env(safe-area-inset-bottom,0px));max-height:85vh;overflow:auto;display:flex;flex-direction:column;gap:12px;
  box-shadow:0 -8px 30px rgba(0,0,0,.18);max-width:640px;margin:0 auto}
@media (prefers-reduced-motion:no-preference){.sheet{animation:up .22s ease-out}@keyframes up{from{transform:translateY(30px);opacity:.4}}}
.grab{width:42px;height:5px;border-radius:99px;background:var(--rule);align-self:center;margin-bottom:4px}
.sheethead{display:flex;justify-content:space-between;align-items:center}
#fsDone{position:sticky;bottom:0;box-shadow:0 -10px 14px var(--panel)}
.fgroup{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.fgroup h3{font-size:17px}
.fsub{font-size:14px;color:var(--muted);margin-top:16px;text-transform:uppercase;letter-spacing:.06em}
.fgroup .chips{display:flex;flex-wrap:wrap;gap:6px}
#peek .ptop{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
#peek h2{margin:0;font-size:24px}
#peek .row2{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
dl.mdefs{margin:0;display:flex;flex-direction:column;gap:4px}
dl.mdefs dt{font-weight:700;margin-top:6px} dl.mdefs dd{margin:0;color:var(--muted);font-size:14.5px}

/* first-run welcome */
.onboard{position:fixed;inset:0;z-index:30;background:var(--bg);display:flex;flex-direction:column;justify-content:center;padding:28px 22px calc(28px + env(safe-area-inset-bottom,0px));gap:18px}
.onboard .art{width:100%;max-width:420px;align-self:center}
.onboard h1{font-size:38px}
.onboard p{font-size:17px;max-width:44ch}
.onboard .dots{display:flex;gap:6px}.onboard .dots i{width:8px;height:8px;border-radius:50%;background:var(--rule)}.onboard .dots i.on{background:var(--ink)}
.onboard .acts{display:flex;justify-content:space-between;align-items:center;gap:10px}

/* tabs */
nav.tabs{position:fixed;left:0;right:0;bottom:0;z-index:5;display:flex;background:var(--panel);border-top:1px solid var(--rule);
  padding-bottom:env(safe-area-inset-bottom,0px);height:calc(var(--tabh) + env(safe-area-inset-bottom,0px))}
nav.tabs a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;color:var(--muted);font-size:11.5px;position:relative}
nav.tabs a svg{width:23px;height:23px}
nav.tabs a[aria-current="page"]{color:var(--ink);font-weight:700}
nav.tabs a[aria-current="page"]::before{content:"";position:absolute;top:0;left:28%;right:28%;height:3px;border-radius:0 0 3px 3px;background:var(--accent)}
.tip{position:fixed;pointer-events:none;background:var(--ink);color:var(--bg);font-size:12.5px;padding:6px 8px;border-radius:6px;max-width:250px;z-index:9}
.prose{max-width:68ch;display:flex;flex-direction:column;gap:10px}
.prose ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px}
@media (min-width:760px){ h1{font-size:40px} .stat b{font-size:30px} .charttools{flex-direction:row;justify-content:space-between} .charttools > .seg{flex:0 0 auto} }

/* settings */
.set{display:flex;flex-direction:column;gap:10px;margin-bottom:22px}
.set h3{font-size:18px;margin-top:8px}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.presets{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
.preset{font:inherit;text-align:left;border:2px solid var(--rule);border-radius:10px;padding:8px;cursor:pointer;display:flex;flex-direction:column;gap:6px}
.preset[aria-pressed="true"]{border-color:var(--ink)}
.preset .strip{display:flex;gap:3px}.preset .strip i{flex:1;height:16px;border-radius:3px}
.preset b{font-size:13.5px}
.colors{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px 12px}
.colors label{display:flex;align-items:center;gap:8px;font-size:13.5px;background:var(--panel);border:1px solid var(--rule);border-radius:8px;padding:5px 8px}
.colors input[type=color]{width:34px;height:28px;border:0;padding:0;background:none;flex:none;cursor:pointer}
textarea{width:100%;font-family:var(--mono);font-size:12px;border:1px solid var(--rule);border-radius:8px;background:var(--panel);color:var(--ink);padding:8px}

/* learn */
.callout{border-left:3px solid var(--accent);background:var(--panel);padding:10px 12px;border-radius:0 8px 8px 0;font-size:14.5px;margin:8px 0}
.lesson{display:flex;flex-direction:column;gap:10px;font-size:15.5px;line-height:1.55}
.lesson ul{display:flex;flex-direction:column;gap:6px}
.lesson h3{font-size:20px;margin-top:6px}
.lessons{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.lessons .val{font-size:22px;color:var(--muted);align-self:center}
.progress{height:8px;border-radius:99px;background:var(--band);overflow:hidden}.progress i{display:block;height:100%;background:var(--accent)}
.lnav{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:14px}
.lnav .chip{text-decoration:none;white-space:normal}
.lpart{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.lpart h2{margin-top:4px}
.linkrow{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0}
.linkrow .chip,.steps .chip{text-decoration:none;white-space:normal;color:var(--accent);border-color:var(--accent);font-weight:600}
.steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:10px}
.steps li{padding-left:4px}
.steps .chip{margin-top:6px;display:flex;width:fit-content}
.stagecards{display:flex;flex-direction:column;gap:8px}
.stagecard{background:var(--panel);border:1px solid var(--rule);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:4px}
.funnel{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.frow2{display:grid;grid-template-columns:120px 1fr auto;gap:8px;align-items:center;font-size:13.5px}
.frow2 i{display:block;height:14px;border-radius:3px;background:var(--accent)}
.calc{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;background:var(--panel);border:1px solid var(--rule);border-radius:8px;padding:10px;margin-top:6px}
.calc label{display:flex;flex-direction:column;gap:3px;font-size:12.5px;color:var(--muted)}
.calc input{width:100%;min-width:0;font:inherit;font-size:16px;padding:6px 8px;border-radius:6px;border:1px solid var(--rule);background:var(--bg);color:var(--ink)}
.calc .out{grid-column:1/-1;font-size:14px;line-height:1.6}
dl.gloss{display:flex;flex-direction:column;gap:2px;margin:8px 0 0}
dl.gloss dt{font-weight:600;margin-top:8px} dl.gloss dd{margin:0;color:var(--muted);font-size:14px}
.quiz{display:flex;flex-direction:column;gap:14px;margin-top:6px}
.q{display:flex;flex-direction:column;gap:6px}
.opt{font:inherit;font-size:14px;text-align:left;padding:8px 10px;border-radius:8px;border:1px solid var(--rule);background:var(--panel);color:var(--ink);cursor:pointer}
.opt.right{border-color:var(--c-build);background:color-mix(in srgb,var(--c-build) 15%,var(--panel))}
.opt.wrong{border-color:var(--c-low);background:color-mix(in srgb,var(--c-low) 15%,var(--panel))}
.opt.dim{opacity:.55}
.why{font-size:13.5px;color:var(--muted)}

/* risk, value, owners */
.r-lo{color:var(--c-build)} .r-mid{color:var(--c-mid)} .r-hi{color:var(--c-low)} .r-na{color:var(--muted)}
.risk{display:inline-flex;align-items:center;font-size:12.5px;font-weight:700;padding:2px 8px;border-radius:6px;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--ink);border-left:3px solid var(--pc)}
.risk.r-lo{--pc:var(--c-build);background:color-mix(in srgb,var(--c-build) 14%,transparent)}
.risk.r-mid{--pc:var(--c-mid);background:color-mix(in srgb,var(--c-mid) 16%,transparent)}
.risk.r-hi{--pc:var(--c-low);background:color-mix(in srgb,var(--c-low) 14%,transparent)}
.riskhead{display:flex;gap:14px;align-items:center}
.riskhead p{font-size:14.5px}
.riskhead a{display:block;margin-top:2px}
.riskdial{flex:none;width:76px;height:76px;border-radius:50%;border:5px solid currentColor;display:grid;place-content:center;text-align:center;background:var(--panel)}
.riskdial b{font-family:var(--display);font-size:28px;line-height:1;color:var(--ink)}
.riskdial small{font-size:11px;color:var(--muted)}
.rlist{list-style:none;margin:0;padding:4px 12px;display:grid;background:var(--panel);border:1px solid var(--rule);border-radius:var(--r)}
.rlist li{padding:8px 0;border-bottom:1px solid var(--rule)}
.rlist li:last-child{border-bottom:0}
.rlist li.off{opacity:.5}
.rhead{display:flex;justify-content:space-between;gap:8px;font-weight:600}
.rhead b{font-variant-numeric:tabular-nums}
.rbar{height:6px;border-radius:3px;background:var(--band);margin:5px 0 4px;overflow:hidden}
.rbar i{display:block;height:100%;border-radius:3px;background:currentColor}
.rlist small{display:block;font-size:12.5px;color:var(--muted);line-height:1.35}
.stats.tiles{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.stats.tiles .stat b{font-size:22px}
.panel.pad{padding:12px 14px;display:flex;flex-direction:column;gap:8px;border-radius:var(--r)}
.panel.pad h3{font-size:18px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:3px 14px;margin:0;font-size:14.5px}
.kv dt{color:var(--muted)} .kv dd{margin:0;font-variant-numeric:tabular-nums;min-width:0;overflow-wrap:anywhere}
.owners{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.owners li{display:grid;grid-template-columns:1fr auto;gap:0 10px;background:var(--panel);border:1px solid var(--rule);border-radius:10px;padding:7px 11px}
.owners li span{font-weight:600;min-width:0;overflow-wrap:anywhere}
.owners li b{font-variant-numeric:tabular-nums}
.owners li small{grid-column:1/-1;color:var(--muted);font-size:12.5px}
.ownbar{display:flex;height:12px;border-radius:6px;overflow:hidden;background:var(--band)}
.ownbar .ins,.key.ins{background:var(--c-early)} .ownbar .inst,.key.inst{background:var(--accent)}
.key{display:inline-block;width:10px;height:10px;border-radius:3px;margin:0 5px 0 8px;vertical-align:-1px}
.key:first-child{margin-left:0}
.wrow{display:grid;grid-template-columns:1fr minmax(90px,140px) 38px;gap:10px;align-items:center;padding:6px 0;border-bottom:1px solid var(--rule)}
.wrow label b{display:block;font-weight:600} .wrow label small{display:block;font-size:12.5px;color:var(--muted);line-height:1.3}
.wrow input{width:100%;accent-color:var(--accent)} .wrow output{font-variant-numeric:tabular-nums;font-size:13px;text-align:right}
@media (min-width:900px){
  #dBody{columns:2;column-gap:24px}
  #dBody>*{break-inside:avoid;margin-bottom:16px}
}
@media (min-width:1012px){ header.top{padding-left:calc((100vw - var(--maxw)) / 2 + 4px);padding-right:calc((100vw - var(--maxw)) / 2 + 4px)} }
@media (min-width:1200px){ :root{--maxw:1160px} }

/* wide screens (laptop, desktop, tablet in landscape): tabs move into the header, lists take two columns,
   sheets become centred dialogs, and the page no longer reserves room for a bottom bar */
@media (min-width:900px){
  body{padding-bottom:28px}
  .toast{bottom:24px}
  .stat[data-m]:hover{border-color:color-mix(in srgb,var(--ink) 40%,var(--rule))}
  header.top{gap:14px;padding-top:calc(env(safe-area-inset-top,0px) + 6px);padding-bottom:6px}
  .brand{margin-right:auto}
  header.top nav.tabs{position:static;height:auto;display:flex;gap:2px;background:none;border:0;padding:0;flex:none}
  header.top nav.tabs a{flex:none;flex-direction:row;gap:7px;font-size:14px;padding:8px 12px;border-radius:9px;color:var(--muted)}
  header.top nav.tabs a svg{width:19px;height:19px}
  header.top nav.tabs a[aria-current="page"]{color:var(--ink);background:var(--band)}
  header.top nav.tabs a[aria-current="page"]::before{display:none}
  #v-list .list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .measure{max-width:560px}
  .sheet{bottom:auto;top:50%;left:50%;right:auto;width:min(640px,calc(100vw - 48px));transform:translate(-50%,-50%);border-radius:18px;max-height:82vh;padding-top:18px;animation:none}
  @media (prefers-reduced-motion:no-preference){.sheet{animation:fadein .18s ease-out}@keyframes fadein{from{opacity:0}}}
  .sheet .grab{display:none}
  .onboard{padding-left:max(22px,calc(50vw - 300px));padding-right:max(22px,calc(50vw - 300px))}
}
@media (min-width:760px){ .lessons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px} }
/* lesson side column (wide screens only) */
.lside{display:none}
@media (min-width:1000px){
  #learnBody:has(.lside){display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:40px;align-items:start}
  .lside{display:block;position:sticky;top:76px;max-height:calc(100vh - 96px);overflow:auto;font-size:13.5px;padding-left:16px;border-left:1px solid var(--rule)}
  .lside h4{font-family:var(--display);font-size:15px;font-weight:600;margin:14px 0 4px;color:var(--muted)}
  .lside ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
  .lside a{display:block;color:var(--muted);text-decoration:none;padding:4px 8px;border-radius:6px;line-height:1.3}
  .lside a:hover{color:var(--ink);background:var(--band2)}
  .lside a[aria-current="page"]{color:var(--ink);font-weight:600;background:var(--band)}
}

/* pointer devices: hover feedback (phones skip this block, so taps never leave a stuck highlight) */
@media (hover:hover){
  .item:hover{border-color:color-mix(in srgb,var(--ink) 40%,var(--rule));box-shadow:0 2px 10px rgba(0,0,0,.06)}
  .chip:not([aria-pressed="true"]):hover,.filterbtn:hover,.btn:not(.primary):hover,.iconbtn:hover,.star:hover,.opt:hover{background:var(--band2)}
  .seg button:not([aria-pressed="true"]):hover{background:var(--band2);color:var(--ink)}
  nav.tabs a:hover{color:var(--ink)}
  .preset:not([aria-pressed="true"]):hover{border-color:var(--muted)}
  .btn.primary:hover{opacity:.9}
  a.learnlink:hover,.linkbtn:hover{text-decoration:underline}
}

/* company chart: legend, range, scrub read-out */
.chartcard{position:relative}
#dchart{touch-action:pan-y;cursor:crosshair}
#map{cursor:crosshair} #map.scrub{touch-action:none}
.clegend{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center;font-size:12.5px;margin:6px 2px 2px}
.clegend span{display:inline-flex;align-items:center;gap:6px}
.lg{display:inline-block;width:18px;height:0;border-top:2.5px solid var(--c-mc,var(--accent));vertical-align:middle}
.lg.mc{border-top-color:var(--c-mc,var(--accent))} .lg.px{border-top:2px dashed var(--ink);opacity:.6}
#cRange{margin-top:6px;max-width:260px}
.ctip{position:absolute;top:96px;z-index:3;background:var(--panel);border:1px solid var(--rule);border-radius:10px;padding:7px 10px;
  font-size:12.5px;line-height:1.35;box-shadow:0 6px 18px rgba(0,0,0,.14);min-width:170px;max-width:240px;cursor:pointer}
.ctip div{margin-top:3px}.ctip small{display:block;color:var(--muted);font-size:11.5px;padding-left:24px}
.ctip .ms{color:var(--accent);font-weight:600}
.ctip .lg{margin-right:6px}
#msSheet{display:flex;flex-direction:column;gap:8px}
#msSheet h2{margin-top:0}
.msmark:focus-visible rect{stroke-width:2.4}
.controls .measure{flex-wrap:wrap}
.controls .measure > .seg[aria-label="Peak comparison metric"]{flex-basis:100%}
.table-scroll{overflow-x:auto;max-width:100%}
.table-scroll table{width:100%;border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums}
.table-scroll caption{text-align:left;color:var(--muted);padding:8px 0}
.table-scroll th,.table-scroll td{text-align:right;padding:6px;border-bottom:1px solid var(--rule);white-space:nowrap}
.table-scroll th:first-child,.table-scroll td:first-child{text-align:left}
.osig{background:var(--panel);border:1px solid var(--rule);border-radius:var(--r);padding:10px 12px;display:flex;flex-direction:column;gap:6px}
.osig h3{font-size:18px;display:flex;gap:8px;align-items:center}
.osig ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:4px;font-size:14.5px}


/* Homepage milestone map */
#v-map{gap:18px}
#v-map .maphead h1{font-size:clamp(34px,4vw,52px);letter-spacing:-.015em}
#v-map .maphead .eyebrow{font:500 11px var(--mono);letter-spacing:.14em;color:var(--accent)}
#v-map .maphead p:last-child{max-width:68ch;font-size:15px}
#v-map .maphead #mapFreshness{font-size:12px;max-width:none;margin-top:2px}
.map-controls .measure{max-width:720px}
.map-controls .map-recovery{flex-basis:100%;display:flex;gap:8px;flex-wrap:wrap}
.map-recovery>.seg{flex:1;min-width:190px}
.map-mode button{min-height:34px}
.map-controls .filterbtn{align-self:flex-start;min-height:40px}
.map-search-row{display:flex;flex-direction:column;gap:9px}
.map-peer-filters{display:flex;flex-wrap:wrap;gap:10px 18px}
.map-peer-filters label{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);min-width:0}
.map-peer-filters select{max-width:100%;font-size:13px;min-height:40px}
@media(min-width:1000px){.map-search-row{display:grid;grid-template-columns:minmax(240px,1fr) auto;align-items:center}.map-options{grid-column:1/-1}.map-peer-filters select{max-width:235px}}
.map-active-filters{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.map-active-filters .chip{font-size:12px;white-space:normal;text-align:left}
.map-active-filters .chip span{margin-left:5px}
.map-mobile-stage{display:none}
.map-meaning{padding:9px 6px 0;font-size:12px;max-width:76ch}
.map-evidence{font-size:12px;color:var(--muted);border-left:2px solid var(--rule);padding-left:10px}
.map-colour-key .lkey{font-size:12px;padding:2px 4px}
.map-coverage summary{font-size:12px;cursor:pointer;color:var(--accent);font-weight:600}
.map-coverage #mapNote{padding-top:8px;line-height:1.6}
.map-options{display:flex;flex-wrap:wrap;gap:8px 22px;color:var(--muted);font-size:12px}
.map-options label{display:flex;align-items:center;gap:7px;cursor:pointer}
.map-options input{accent-color:var(--accent);width:15px;height:15px;margin:0}
.map-stage-nav>.eyebrow{display:block;font:500 10px var(--mono);letter-spacing:.12em;margin-bottom:7px}
.map-stages{display:flex;gap:6px;overflow-x:auto;padding:2px 2px 7px;scrollbar-width:thin}
.map-stage{flex:1;min-width:100px;border:1px solid var(--rule);border-radius:9px;background:var(--panel);text-align:left;padding:9px 10px;cursor:pointer;display:flex;flex-direction:column;gap:7px}
.map-stage span{font-size:11px;white-space:nowrap;color:var(--muted)}
.map-stage b{font:600 24px/1 var(--display);font-variant-numeric:tabular-nums}
.map-stage[aria-pressed="true"]{border-color:var(--ink);background:var(--ink);color:var(--bg)}
.map-stage[aria-pressed="true"] span{color:var(--bg)}
.map-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.map-main{min-width:0;display:flex;flex-direction:column;gap:12px}
.map-plot-card{padding:14px 10px 10px;overflow:hidden}
.map-plot-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:0 6px 7px}
.map-plot-heading h2{margin:0;font-size:23px}
.map-plot-heading p{font-size:11px;margin-top:4px}
.map-sample{white-space:nowrap;background:var(--band);padding:4px 7px;border-radius:6px;font:11px var(--mono)}
.map-scroll{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-x:contain}
.map-scroll .chart{overflow:hidden;touch-action:pan-x pan-y}
.map-scroll-hint{padding:0 6px 7px;font-size:11px}
.map-plot-key{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:8px 6px 0;border-top:1px solid var(--rule);font-size:11px;color:var(--muted)}
.map-summary-key{display:inline-block;width:18px;height:12px;background:linear-gradient(var(--ink),var(--ink)) center/100% 3px no-repeat,color-mix(in srgb,var(--ink) 10%,transparent);border-radius:2px;vertical-align:middle;margin-right:5px}
.map-plot-key .chip{font-size:11px;padding:4px 7px}
.map-directory{padding:15px;display:flex;flex-direction:column;gap:12px}
.map-directory-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}
.map-directory-heading .eyebrow{font:9px var(--mono);letter-spacing:.1em;margin-bottom:4px}
.map-directory-heading h2{margin:0;font-size:25px}
.map-stage-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;border-block:1px solid var(--rule);padding:12px 0}
.map-stage-summary small{display:block;color:var(--muted);font-size:10px;margin-bottom:4px}
.map-stage-summary b{font:600 25px/1.1 var(--display);font-variant-numeric:tabular-nums}
.map-stage-summary b.small{font:500 12px/1.4 var(--body)}
.map-sort-label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:var(--muted)}
.map-sort-label select{max-width:65%;font-size:11px;padding:6px}
.map-companies{list-style:none;padding:0;margin:0;display:flex;flex-direction:column}
.map-companies li+li{border-top:1px solid var(--rule)}
.map-companies a{display:flex;flex-direction:column;gap:3px;text-decoration:none;color:var(--ink);padding:12px 2px}
.map-companies a:hover{background:var(--band2)}
.map-company-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.map-company-top>b{font:600 16px var(--mono)}
.map-company-top strong{font:600 20px var(--display);text-align:right;white-space:nowrap}
.map-company-top strong small{display:inline;font:10px var(--body);color:var(--muted);margin-left:3px}
.map-company-name{font-size:12px;overflow-wrap:anywhere}
.map-companies a>small{font-size:12px;color:var(--muted)}
.map-company-evidence{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:4px;font-size:11px;color:var(--muted)}
.map-company-evidence .risk{font-size:11px;padding:3px 5px}
.map-stage-summary>p{grid-column:1/-1}
.map-risk-note{font-size:11px;line-height:1.5}
.valuation-context{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 24px;padding:16px 18px}
.valuation-context h2{margin:0 0 6px;font-size:23px}
.valuation-context>div>p{font-size:13px;max-width:68ch}
.valuation-filters{display:flex;align-items:center;gap:12px}
.valuation-filters label,.performance-controls label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted);min-width:0}
.valuation-filters select{font-size:13px;max-width:180px;min-height:40px}
.valuation-rules{grid-column:1/-1;font-size:12px}
.valuation-rules summary{color:var(--accent);cursor:pointer}
.valuation-rules p{margin-top:8px}
.performance-controls{display:grid;grid-template-columns:220px minmax(0,1fr);gap:12px;padding:16px}
.performance-controls p{grid-column:1/-1}
.performance-controls select{width:100%;min-width:0;font-size:14px}
.performance-readout{display:block;margin:10px 6px 0;padding:10px;background:var(--band2);border-radius:6px;font-family:var(--mono);font-size:12px;line-height:1.6}
.map-unscored{font-size:12px}
.map-unscored summary{color:var(--accent);font-weight:600;cursor:pointer}
.map-unscored ul{list-style:none;margin:10px 0;padding:0}
.map-unscored li{padding:8px 0;border-top:1px solid var(--rule);display:flex;flex-direction:column;gap:2px}
.map-unscored li span{color:var(--muted)}
.map-unscored>div>p{margin-top:10px}
.valuation-assumptions{font-size:12px;margin:0 0 12px}
.valuation-assumptions summary{cursor:pointer;color:var(--accent)}
.valuation-assumptions dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px 12px;overflow-wrap:anywhere}
.valuation-assumptions dt{color:var(--muted)}
.valuation-assumptions dd{margin:0}
.valuation-assumptions p{font-size:11px;color:var(--muted)}
.map-companies li>.chip{margin-bottom:12px}
@media(max-width:700px){.valuation-context{grid-template-columns:1fr;padding:14px}.valuation-filters{display:grid;grid-template-columns:1fr 1fr}.valuation-filters select{max-width:100%;width:100%}.performance-controls{grid-template-columns:1fr}.map-mode{flex-wrap:wrap}.map-mode button{flex-basis:45%!important}.map-controls .measure{flex-basis:100%}}
.cycle-guide{border-top:1px solid var(--rule);padding-top:13px}
.cycle-guide summary{font-size:13px;cursor:pointer;color:var(--accent);font-weight:600}
.cycle-guide-body{display:grid;gap:14px;align-items:center;margin-top:12px}
.cycle-guide svg{width:100%;max-width:420px;background:var(--panel);border-radius:9px;padding:10px}
.cycle-guide svg text{font:11px var(--body);fill:var(--muted)}
@media(min-width:1000px){.map-workspace{grid-template-columns:minmax(0,1fr) 290px}.map-directory{max-height:690px;overflow:auto;scrollbar-width:thin}.cycle-guide-body{grid-template-columns:330px 1fr}}
@media(min-width:1200px){.map-stage{min-width:0}.map-stage span{font-size:10px}}
@media(max-width:480px){.map-plot-heading{flex-wrap:wrap}.map-sample{font-size:10px}.map-plot-key{align-items:flex-start}.map-stages{margin-right:-10px}.map-stage{min-width:96px}.map-controls .measure{flex-basis:100%}.map-recovery>.seg{min-width:100%;flex-basis:100%}}
@media(max-width:700px){
  .map-stage-nav{display:none}
  .map-mobile-stage{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;color:var(--muted)}
  .map-mobile-stage select{min-width:0;max-width:65%;min-height:44px}
  .map-peer-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .map-peer-filters label{align-items:stretch;flex-direction:column;gap:4px}
  .map-peer-filters select{width:100%;min-width:0}
}

@media(min-width:1200px){.map-scroll-hint{display:none}}

.map-mode button{min-width:0}
@media(min-width:701px){.map-controls .measure{max-width:900px}.map-mode button{font-size:12px;padding-left:10px;padding-right:10px}}
.valuation-filters label.check{flex-direction:row;align-items:center;gap:6px;font-size:13px;color:var(--text);min-height:40px;align-self:flex-end}

/* main page polish */
.maphead h1{font-size:clamp(28px,3.4vw,40px);line-height:1.1;max-width:30ch}
.maphead>p.muted{max-width:62ch}
.map-plot-card .map-colour-key{margin:8px 0 2px;gap:2px 10px}
.map-options{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px}
#mapColorLabel{display:inline-flex;align-items:center;gap:6px}
#mapColorLabel select{font-size:13px;min-height:32px;padding:2px 8px}
.map-coverage .map-evidence{margin-top:8px}
@media (min-width:900px){.history-stages{display:grid;grid-template-columns:1fr 1fr;gap:12px}.history-stages>.history-stage{margin:0}}
.map-stage b:only-child,.map-stage[data-empty]{opacity:.5}
.map-search-line{display:flex;gap:8px;align-items:center;flex:1;min-width:0}
.map-search-line .search{flex:1;min-width:0}
.map-opts{display:none}
.map-more-options{display:contents}
@media (max-width:700px){
  .map-opts{display:inline-flex;flex:none}
  .map-more-options{display:none}
  .map-search-row.open .map-more-options{display:flex;flex-direction:column;gap:10px;width:100%}
}
#mapStatsByLabel{display:inline-flex;align-items:center;gap:6px;margin-left:-10px}
#mapStatsByLabel select{font-size:13px;min-height:32px;padding:2px 8px}
.map-group-table{overflow-x:auto;margin:10px 0 4px}
.map-group-table table{border-collapse:collapse;font-size:12px;width:100%;min-width:560px}
.map-group-table caption{text-align:left;color:var(--muted);font-size:12px;padding-bottom:6px}
.map-group-table th,.map-group-table td{padding:5px 8px;border-bottom:1px solid var(--rule);text-align:right;white-space:nowrap}
.map-group-table th[scope=row],.map-group-table thead th:first-child{text-align:left}
.map-group-table th[scope=row] .sw{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:middle}
.map-group-table td small{color:var(--muted)}
.map-group-table thead th{font-weight:600;color:var(--muted)}

/* live TradingView chart on company pages */
.livecard{padding:16px 16px 10px;margin-bottom:14px;overflow:hidden}
.livehead{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}
.livehead h2{font-size:18px;margin:0 0 2px}
.livehead p{margin:0;max-width:60ch}
.livehead a{white-space:nowrap;color:var(--accent);text-decoration:none;font-weight:600}
.livechart{border-radius:10px;overflow:hidden;min-height:200px;background:var(--panel)}
.live-offline{padding:24px 4px}
@media (max-width:700px){.livehead{flex-direction:column;gap:4px}.livecard{padding:12px 10px 8px}}

/* list: equal-height cards in each row */
#v-list .list>li{display:flex}
#v-list .list>li>.item{flex:1;align-content:start}
.owners-more summary{font-size:13px;color:var(--accent);cursor:pointer;margin:4px 0 8px;list-style:none}
.owners-more summary::-webkit-details-marker{display:none}
.owners-more summary::before{content:"+ "}
.owners-more[open] summary::before{content:"− "}

/* company header on phones: actions on their own row, calmer numbers */
@media (max-width:700px){
  .dhead{gap:8px}
  .dacts{gap:6px}
  .dacts .star{width:38px;height:38px;border-radius:10px}
  .dacts .star svg{width:20px;height:20px}
  .dhead h1{font-size:28px;line-height:1.1}
  #dStats .stat b{font-size:21px}
  #dStats .stat small{font-size:11.5px}
  #dBadges{gap:6px}
}
#v-list .list>li.empty{grid-column:1/-1;text-align:center;padding:48px 16px;line-height:1.9}
#v-list .list>li.empty .chip{display:inline-flex;margin:8px 4px 0}

/* top bar: search and display currency */
.topacts{display:flex;align-items:center;gap:6px;margin-left:auto}
@media (min-width:900px){.topacts{margin-left:6px}}
.topacts .iconbtn{width:38px;height:38px}
.ccy select{font-size:13px;font-weight:600;min-height:36px;padding:2px 26px 2px 10px;border-radius:9px;border:1px solid var(--rule);background-color:var(--panel);color:var(--ink)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.qsearch{position:fixed;inset:0;z-index:40;background:color-mix(in srgb,var(--ink) 35%,transparent);display:flex;justify-content:center;align-items:flex-start;padding:max(10vh,60px) 16px 16px}
.qsearch[hidden]{display:none}
.qbox{width:min(640px,100%);background:var(--panel);border:1px solid var(--rule);border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.25);padding:10px}
.qbox input{width:100%;font-size:17px;padding:12px 14px;border-radius:10px;border:1px solid var(--rule);background:var(--bg);color:var(--ink)}
.qbox ul{list-style:none;margin:8px 0 0;padding:0;max-height:60vh;overflow:auto}
.qbox li a{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:9px 10px;border-radius:9px;text-decoration:none;color:var(--ink)}
.qbox li a:hover,.qbox li[aria-selected="true"] a{background:var(--band)}
.qbox li a span{display:flex;flex-direction:column;min-width:0}
.qbox li a small{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.qbox li a em{font-style:normal;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.qbox li.muted{padding:10px}
.qhint{margin:6px 4px 0}

/* model outlook */
.outlook h2 .tag{font-size:11px;font-weight:600;color:var(--muted);border:1px solid var(--rule);border-radius:99px;padding:2px 8px;vertical-align:middle;margin-left:6px}
.outlook-head{display:flex;gap:14px;align-items:center}
.outlook-head p{margin:4px 0 0}
.outlook-dial{flex:none;width:74px;height:74px;border-radius:50%;border:5px solid currentColor;display:flex;flex-direction:column;align-items:center;justify-content:center}
.outlook-dial b{font-size:24px;line-height:1;color:var(--ink)}
.outlook-dial small{font-size:10px;color:var(--muted)}
.outlook-bar{display:grid;grid-template-columns:repeat(10,1fr);gap:3px;margin:14px 0 4px}
.outlook-bar i{height:8px;border-radius:3px;background:var(--band)}
.outlook-bar i.on{background:var(--accent)}
.outlook-scale{display:flex;justify-content:space-between}
.outlook-why{list-style:none;padding:0;margin:6px 0 10px}
.outlook-why li{display:flex;gap:8px;align-items:baseline;padding:4px 0;border-bottom:1px solid var(--rule)}
.outlook-why li span{font-size:11px;width:14px}
.outlook-why li.up span{color:var(--accent)} .outlook-why li.down span{color:var(--c-low)}
.outlook-why small{color:var(--muted)}
#v-model .lead{font-size:17px;max-width:70ch}
#v-model h2{margin-top:26px}
.mtable{border-collapse:collapse;width:100%;max-width:560px;font-variant-numeric:tabular-nums}
.mtable th,.mtable td{padding:6px 10px;border-bottom:1px solid var(--rule);text-align:right}
.mtable th[scope=row],.mtable thead th:first-child{text-align:left}
.mtable td.good{color:var(--accent);font-weight:700}
.mimp{list-style:none;padding:0;max-width:560px}
.mimp li{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:10px;align-items:center;padding:4px 0;font-size:14px}
.mimp li i{display:block;height:8px;border-radius:4px;background:var(--accent);max-width:180px}
.learn-model{margin:14px 0 4px;border-color:var(--accent)}
.mtable td.bad{color:var(--c-low);font-weight:700}
#v-model .callout{margin:14px 0}

/* 1/3/5-year outlook strip on the company page */
.outlook-hz{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:10px 0 4px}
.outlook-h{border:1px solid var(--rule);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:2px;min-width:0}
.outlook-h b{font-size:1.25rem;line-height:1.1}
.outlook-h small{color:var(--muted);font-size:.72rem;line-height:1.25}
.outlook-h small:first-child{text-transform:uppercase;letter-spacing:.04em;font-weight:600}
@media (max-width:480px){.outlook-hz{grid-template-columns:1fr 1fr;gap:6px}.outlook-h{padding:6px 7px}.outlook-h b{font-size:1.05rem}}

.buyout{display:flex;align-items:baseline;gap:10px;margin:4px 0 6px}
.buyout b{font-size:1.5rem;line-height:1}
.buyout span{color:var(--muted);font-size:.85rem}

/* Outlook hub */
.mtabs{display:flex;width:100%;margin:6px 0 12px;overflow-x:auto;scrollbar-width:none}
.mtabs::-webkit-scrollbar{display:none}
.mtabs button{flex:1 0 auto;white-space:nowrap}
.mfam{display:flex;gap:6px;overflow-x:auto;margin:0 0 10px;padding-bottom:2px;scrollbar-width:none}
.mcols{display:grid;grid-template-columns:1fr;gap:4px}
@media (min-width:900px){.mcols{grid-template-columns:1fr 1fr;gap:24px}}
.mrow{display:flex;justify-content:space-between;align-items:center;gap:10px}
.mrow > div{min-width:0;display:flex;flex-direction:column}
.mrow > div b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mscore{display:flex;flex-direction:column;align-items:flex-end;text-align:right;flex-shrink:0;max-width:48%}
.mscore b{font-size:1.15rem;line-height:1.1}
.mscore small{color:var(--muted);font-size:.72rem;line-height:1.25}
.msize{display:flex;width:100%;margin:0 0 8px}.msize button{flex:1;padding:6px 4px;font-size:12.5px}

/* Test yourself */
.gstart{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.gsix{display:flex;gap:6px;align-items:center;margin-top:10px}
.gprog{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.gbar{flex:1;height:4px;background:var(--rule);border-radius:4px;overflow:hidden}.gbar i{display:block;height:100%;background:var(--accent)}
.gtitle{margin:6px 0 2px}.gwho{margin:0 0 10px}
.gfacts{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:520px){.gfacts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.gchart{width:100%;height:auto;margin-top:6px}
.glegend{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:-2px 0 6px}
.gl-co,.gl-peer{display:inline-block;width:18px;height:0;border-top:2px solid var(--accent)}.gl-peer{border-top:2px dashed var(--muted);margin-left:8px}
.gms{list-style:none;padding:0;margin:4px 0 8px}.gms li{display:flex;gap:10px;padding:4px 0;border-bottom:1px solid var(--rule);font-size:.92rem}
.gms li span{color:var(--muted);min-width:8.5em;font-size:.85rem}
.gpick{margin:10px 0}.gseg{display:flex;width:100%;margin-top:4px}.gseg button{flex:1;padding:8px 2px;font-size:12px;white-space:normal;line-height:1.15}
.gnav{display:flex;justify-content:space-between;gap:8px;margin:16px 0}
.gnav .btn[disabled]{opacity:.45;cursor:not-allowed}
.greveal{list-style:none;padding:0;margin:0}.greveal li{border:1px solid var(--rule);border-radius:12px;padding:10px 12px;margin:0 0 12px;background:var(--panel)}
.ghead{display:flex;flex-direction:column}
.gpromo{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 10px}
.gpromo div{display:flex;flex-direction:column}.gpromo small{font-size:.8rem}
.gtbl{width:100%}.gtbl td,.gtbl th{font-size:.85rem;padding:6px 4px}

/* portfolio builder */
.pfctl{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px 14px;margin:12px 0 6px}
.pfctl label{display:flex;flex-direction:column;gap:4px;font-size:13.5px;color:var(--muted)}
.pfctl select{font:inherit;color:var(--ink);background:var(--panel);border:1px solid var(--rule);border-radius:8px;padding:7px 8px}
.pfctl .pfn{grid-column:1/-1}
.pfctl .pfn b{color:var(--ink);font-size:16px}
.pfctl input[type=range]{width:100%;max-width:420px}
.pfbar{width:100%;max-width:160px;height:18px;display:block;margin-top:4px}
.pftbl td{vertical-align:top}
.pfview{margin-bottom:10px}
.pfgoal{margin:8px 0 4px;flex-wrap:wrap}
.pfhi th,.pfhi td{background:color-mix(in srgb,var(--c-build) 10%,transparent)}
.pfyears{padding-left:18px}.pfyears li{margin:3px 0}

/* Companies: All / Watchlist / Compare as one segmented row of links */
.cotabs{display:flex;margin:2px 0 14px;max-width:100%;overflow-x:auto;scrollbar-width:none}
.cotabs::-webkit-scrollbar{display:none}
.cotabs a{flex:1 0 auto;text-align:center;color:var(--muted);font-size:13.5px;padding:8px 14px;text-decoration:none;white-space:nowrap}
.cotabs a + a{border-left:1px solid var(--rule)}
.cotabs a[aria-current="page"]{background:var(--ink);color:var(--bg);font-weight:600}
@media (hover:hover){ .cotabs a:not([aria-current]):hover{background:var(--band2);color:var(--ink)} }
.map-foot{margin-top:10px;gap:8px;flex-wrap:wrap}
.setfoot p{margin:6px 0}
.livechart:has(.live-offline){min-height:0}
.geo .geomap{display:block;width:100%;height:220px;border:1px solid var(--rule);border-radius:10px;margin:8px 0;background:var(--band2)}

/* ---------- full pass, Nov 2026: layout fixes and phone polish ---------- */
/* empty states are plain centred text, not a flex row of words */
#v-list .list>li.empty{display:block}
#v-list .list>li.empty b{color:var(--ink);font-size:17px}
/* people: the name keeps its width and a long title wraps beside it (it used to squeeze the name to one letter a line) */
.owners.people li{grid-template-columns:minmax(0,max-content) minmax(0,1fr);gap:0 14px}
.owners.people li span{overflow-wrap:normal}
.owners.people li b{text-align:right;font-weight:600;line-height:1.3;padding-top:2px}
@media (max-width:560px){
  .owners.people li{grid-template-columns:1fr}
  .owners.people li b{text-align:left;padding:0 0 2px}
}
/* the long label under a list headline wraps instead of pushing the company name out */
.item .val small{max-width:22ch;margin-left:auto;line-height:1.25;overflow-wrap:anywhere}
.learn-model .tk{white-space:normal}
/* preview sheet tiles: long words shrink to fit */
#peek .row2 .stat b{font-size:22px;overflow-wrap:anywhere}
#peek .row2 .stat b.word{font-size:17px;line-height:1.15}
/* settings: one label and its menu per cell */
.fontrow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.fontrow label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
.fontrow select{width:100%;min-width:0}
/* tables in the Outlook pages fit a phone: the small print under a row label may wrap */
.mtable th small,.mtable td small{white-space:normal;font-weight:400}
#v-model .table-scroll th[scope=row]{white-space:normal}
#v-model .table-scroll table{font-size:13px}
/* a row of tabs that scrolls says so with a fading edge */
@media (max-width:700px){
  .mtabs,.mfam{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
  /* fadeEdges() (model.js) says where the row is: the fade moves to whichever side still has more to see */
  .mtabs[data-edge=none],.mfam[data-edge=none]{-webkit-mask-image:none;mask-image:none}
  .mtabs[data-edge=end],.mfam[data-edge=end]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 28px);mask-image:linear-gradient(90deg,transparent,#000 28px)}
  .mtabs[data-edge=mid],.mfam[data-edge=mid]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 28px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,transparent,#000 28px,#000 calc(100% - 28px),transparent)}
}
/* compare on a phone: a narrower label column so two companies show at once */
@media (max-width:700px){
  table.cmp{font-size:13px}
  table.cmp th,table.cmp td{padding:7px 9px;min-width:132px;max-width:150px;overflow-wrap:anywhere}
  table.cmp th:first-child,table.cmp td:first-child{min-width:92px;max-width:100px}
  table.cmp .pill,table.cmp .badge{white-space:normal;border-radius:10px;line-height:1.25;padding-top:3px;padding-bottom:3px}
  table.cmp thead th{font-size:16px}
}
/* the map on a phone: get to the plot sooner */
@media (max-width:700px){
  #v-map{gap:12px}
  #v-map .maphead{gap:4px}
  #v-map .maphead h1{font-size:27px}
  #v-map .maphead>p.muted:not(#mapFreshness){font-size:14px;line-height:1.4}
  .map-mode{flex-wrap:nowrap}
  .map-mode button{flex:1 1 auto!important;flex-basis:auto!important;padding:8px 4px;font-size:12.5px}
  .map-controls{gap:8px}
  .map-controls .filterbtn{min-height:38px}
  .map-plot-card{padding-top:12px}
  .map-plot-heading{padding-bottom:4px}
  .map-plot-heading h2{font-size:21px}
  .map-scroll-hint{padding-bottom:4px}
  .valuation-context,.performance-controls{padding:12px}
  .valuation-context h2{font-size:20px}
}
/* stat tiles read as buttons only where they are */
.stat[data-m]:focus-visible{outline-offset:1px}
/* phone toolbar under the map search: filters, display options and the stage menu on one row */
.map-phonebar{display:none}
@media (max-width:700px){
  .map-controls>.filterbtn{display:none}
  .map-phonebar{display:flex;gap:8px;align-items:center}
  .map-phonebar .filterbtn{min-height:42px;flex:none}
  .map-phonebar .map-opts{min-height:42px;border-radius:10px;font-size:14px}
  .map-phonebar .map-mobile-stage{flex:1;min-width:0;display:block}
  .map-phonebar .map-mobile-stage select{width:100%;max-width:none;min-height:42px}
}
/* measure names: full on wide screens, one word on a phone so all five fit a single row */
.map-mode .short{display:none}
@media (max-width:700px){.map-mode .full{display:none}.map-mode .short{display:inline}}
/* Outlook pages on a wide screen: readable line lengths, charts no bigger than they need to be */
#v-model #mPane>p,#v-model #mPane>.callout,#v-model #mPane>ul.small,#v-model #pfBody>p,#v-model #pfBody>ul.small,#v-model #gameBody>p,#v-model #gameBody>.callout{max-width:78ch}
#v-model svg.chart{max-width:720px}
@media (min-width:760px){
  #v-model .stats.tiles{grid-template-columns:repeat(3,minmax(0,1fr));max-width:900px}
  #v-model .gfacts{max-width:720px}
}
/* map: milestones reached lately */
.map-latest{padding:14px 14px 12px;display:flex;flex-direction:column;gap:10px}
.map-latest-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.map-latest-head .eyebrow{font:500 10px var(--mono);letter-spacing:.12em;color:var(--accent);margin-bottom:3px}
.map-latest-head h2{margin:0;font-size:22px}
.map-latest-head a{font-weight:600;text-decoration:none}
.map-latest-rows{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
@media (min-width:1000px){.map-latest-rows{grid-template-columns:repeat(4,minmax(0,1fr))}
  /* the company list keeps you company while the left column scrolls */
  .map-directory{position:sticky;top:64px;max-height:calc(100vh - 84px)}}
.map-latest-rows a{display:flex;flex-direction:column;gap:1px;height:100%;text-decoration:none;color:var(--ink);border:1px solid var(--rule);border-radius:10px;padding:9px 11px;background:var(--bg)}
.map-latest-rows .ml-what{font:600 11px var(--body);letter-spacing:.03em;text-transform:uppercase;color:var(--accent)}
.map-latest-rows b{font-size:15px;line-height:1.25;overflow-wrap:anywhere}
.map-latest-rows small{font-size:12px;color:var(--muted)}
.map-latest-rows .ml-when{margin-top:auto;padding-top:3px}
@media (hover:hover){.map-latest-rows a:hover{border-color:color-mix(in srgb,var(--ink) 40%,var(--rule))}}
@media (max-width:700px){.map-latest-rows{grid-template-columns:1fr 1fr}.map-latest-rows b{font-size:14px}}
/* portfolio goal picker on a phone: one full-width choice per line */
@media (max-width:700px){.pfgoal{display:flex;flex-direction:column;width:100%}.pfgoal button{text-align:left;white-space:normal;padding:9px 12px}.pfgoal button+button{border-top:1px solid var(--rule)}}
/* research notes sometimes carry a very long unbroken string (a formula, a web address, text saved without its spaces):
   let it wrap rather than push the page wider than the screen */
body{overflow-wrap:break-word}
#dBody p,#dBody small,#dBody dd,#dBody li,#dBody span{overflow-wrap:anywhere}
.next span,.status{min-width:0}
/* "Median and 1σ range" and its "for …" choice stay on one line together */
.map-stats-pair{display:inline-flex;align-items:center;gap:8px;flex-wrap:nowrap}
.map-stats-pair #mapStatsByLabel{margin-left:0}
.map-stats-pair:not(:has(> label:not([hidden]))){display:none}
