/* Baco Properties / Security Public Storage (SPS) pricing console.
   Palette calibrated to securitypublicstorage.com: SPS red (#CF202E), warm parchment (#F2ECE1), crisp ink (#141413). */
@font-face { font-family: "Newsreader"; font-weight: 300 700; font-display: swap; src: url("assets/fonts/Newsreader-var.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400 700; font-display: swap; src: url("assets/fonts/Inter-var.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("assets/fonts/IBMPlexMono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("assets/fonts/IBMPlexMono-500.woff2") format("woff2"); }
:root {
  --canvas: #F7F3EC; --sand: #F2ECE1; --white: #fff; --ink: #141413; --ink-2: #3B3A36; --muted: #5F5C55; --faint: #716D65;
  --line: #E3DBCC; --line-2: #D0C6B5; --stone: #ECE5D8; --crimson: #CF202E; --crimson-dark: #A81824; --crimson-tint: #FBF0F1; --green: #2F6B45;
  --serif: "Newsreader", Georgia, serif; --sans: "Inter", "Helvetica Neue", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --side-w: 224px; --top-h: 64px; --flag-h: 30px; --ease: cubic-bezier(.22,.61,.36,1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; } ol, ul { padding: 0; list-style: none; }
a { color: inherit; } button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; }

.mock-flag { height: var(--flag-h); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; background: var(--ink); color: #EDEBE6; }
.mock-flag b { color: #fff; font-weight: 600; }
.sample-tag { display: inline-block; font: 600 9.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 3px 5px; border: 1px dashed #B08B2E; color: #8A6A1C; background: #FBF5E6; border-radius: 3px; vertical-align: middle; }
.mock-flag .sample-tag { margin: 0 2px; }

.shell { display: grid; grid-template-columns: var(--side-w) 1fr; height: calc(100% - var(--flag-h)); border-top: 3px solid var(--crimson); }
.side { background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px 14px; }
.lockup { padding: 4px 8px 16px; margin-bottom: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; text-decoration: none; }
.lk-logo { display: block; width: 100%; max-width: 184px; height: auto; }
.lk-mark { display: none; width: 34px; height: auto; }
.lk-sub { display: flex; align-items: center; gap: 5px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--muted); line-height: 1.2; }
.lk-baco { color: var(--ink-2); }
.lk-sep { color: var(--line-2); }
.lk-prod { color: var(--crimson); }
.topbar-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mob-mark { display: none; width: 24px; height: auto; flex: none; }
.rail-brand { display: none; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--crimson); margin-bottom: 4px; }
.rail-brand img { display: block; width: 15px; height: auto; flex: none; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.side-nav a svg { width: 18px; height: 18px; flex: none; color: var(--faint); }
.side-nav a:hover { background: var(--stone); }
.side-nav a[aria-current="page"] { background: var(--crimson-tint); color: var(--crimson); }
.side-nav a[aria-current="page"] svg { color: var(--crimson); }
.side-nav .count { margin-left: auto; font: 500 11px var(--mono); background: var(--stone); padding: 1px 6px; border-radius: 10px; color: var(--muted); }
.side-nav .soon { margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.side-nav .future { color: var(--faint); }
.side-foot { margin-top: auto; padding: 10px; font-size: 11.5px; color: var(--faint); border-top: 1px solid var(--line); }

.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: var(--top-h); flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--sand); }
.view-title { font: 500 24px/1 var(--serif); letter-spacing: -.01em; }
.kpis { display: flex; gap: 30px; }
.kpis div { display: grid; grid-template-columns: auto; }
.kpis dt { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpis dd { font: 500 18px/1.2 var(--mono); cursor: help; } .kpis dd small { font-size: 11px; color: var(--muted); }
.kpis .sub { font-size: 11px; color: var(--faint); }
main { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; }
.page { overflow: auto; padding: 28px 32px 48px; }

/* ---- map view ---- */
.map { position: absolute; inset: 0; background: #EEF0EE; }
.rail { position: absolute; top: 16px; left: 16px; bottom: 16px; width: 360px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(20,20,19,.08); display: flex; flex-direction: column; transition: transform .35s var(--ease), opacity .25s; }
body.site-open .rail { transform: translateX(-24px); opacity: 0; pointer-events: none; }
.rail-head { padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.rail-head h2 { font: 500 20px/1.15 var(--serif); }
.rail-sub { font-size: 12px; color: var(--muted); margin: 3px 0 10px; }
.rail-head input { width: 100%; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--canvas); }
.rail-list { overflow: auto; flex: 1; padding: 4px 0; }
.step { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; text-align: left; border: 0; background: none; padding: 9px 16px; cursor: pointer; border-bottom: 1px solid var(--stone); }
.step:hover { background: var(--canvas); }
.st-rank { font: 500 11px var(--mono); color: var(--faint); }
.st-main { display: flex; flex-direction: column; min-width: 0; }
.st-site { font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-act { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-up { font: 500 13px var(--mono); } .st-up small { color: var(--faint); font-size: 10px; }
.tier-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; border: 1px solid rgba(20,20,19,.25); }
.empty { padding: 18px; color: var(--muted); }

.regions { position: absolute; top: 16px; left: 392px; right: 16px; display: flex; gap: 6px; flex-wrap: wrap; transition: opacity .25s; }
body.site-open .regions { opacity: 0; pointer-events: none; }
.regions button { background: rgba(255,255,255,.94); border: 1px solid var(--line-2); border-radius: 16px; padding: 4px 11px; font-size: 12px; cursor: pointer; }
.regions button:hover { border-color: var(--ink-2); } .regions span { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.legend { position: absolute; left: 392px; bottom: 16px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 11.5px; width: 250px; display: flex; flex-wrap: wrap; gap: 3px 12px; transition: opacity .25s; }
body.site-open .legend { opacity: 0; pointer-events: none; }
.legend .lg-title { width: 100%; font-weight: 600; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.legend .lg-title small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(20,20,19,.3); }
.legend .lg-c.live { background: #3B3A36; } .legend .lg-c.carried { background: #8E8A82; } .legend .lg-c.nt { background: #fff; border-color: #3B3A36; }
.legend .lg-note { width: 100%; color: var(--faint); margin-top: 6px; font-size: 11px; line-height: 1.4; }

.site-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(820px, calc(100% - 48px)); background: var(--canvas); border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(20,20,19,.08); overflow: auto; animation: slidein .45s var(--ease); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border: 1px solid var(--line-2); background: var(--white); border-radius: 50%; font-size: 18px; cursor: pointer; z-index: 2; }
.site-head { padding: 18px 28px 18px; background: var(--white); border-bottom: 1px solid var(--line); }
.back { border: 0; background: none; color: var(--muted); padding: 0; margin-bottom: 10px; cursor: pointer; font-size: 12.5px; }
.site-head h2 { font: 500 30px/1.1 var(--serif); letter-spacing: -.012em; margin-top: 4px; }
.addr { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.addr a, .ev-src a, .grid th a, .quiet-note a { color: var(--ink-2); text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.site-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 16px; border-top: 1px solid var(--line); }
.site-kpis div { padding: 10px 14px 0 0; }
.site-kpis div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.site-kpis dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.site-kpis dd { font: 500 20px/1.3 var(--serif); } .site-kpis dd small { font-size: 12px; color: var(--muted); }
.site-kpis dd.below { color: var(--crimson); }
.site-kpis span { font-size: 11.5px; color: var(--faint); }
.site-sec { padding: 20px 28px 6px; }
.site-sec h3, .sub-h { font: 500 19px/1.2 var(--serif); margin-bottom: 10px; }
.sec-note { font-size: 12.5px; color: var(--muted); margin: -4px 0 10px; }

.act { display: grid; grid-template-columns: 30px minmax(0, 1fr) 132px; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.act.hold { background: var(--canvas); }
.act-rank { font: 500 13px var(--mono); color: var(--crimson); padding-top: 2px; }
.act.hold .act-rank { color: var(--faint); font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.act-what { font-size: 15px; } .act-what .mono { font-size: 14.5px; }
.act-why { color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.evidence { grid-column: 2 / 4; margin-top: 2px; border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.evidence li { display: grid; grid-template-columns: 8px minmax(0, 1fr) 44px 132px 92px 214px; align-items: center; gap: 8px; font-size: 12.5px; }
.ev-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .evidence b { font-weight: 500; }
.ev-d, .ev-p { white-space: nowrap; } .evidence .avail { margin: 0; }
.ev-src { text-align: right; font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.act-side > b { font-size: 18px; font-weight: 500; } .act-side small { font-size: 11px; color: var(--muted); }
.conf { width: 90px; height: 4px; background: var(--stone); border-radius: 2px; overflow: hidden; } .conf i { display: block; height: 100%; background: var(--ink-2); }
.btns { display: flex; gap: 6px; margin-top: auto; }
.btn { border: 1px solid var(--line-2); background: var(--white); padding: 6px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 500; }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); } .btn.sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { cursor: not-allowed; opacity: .9; }
.holds summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0 10px; }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin: 0 4px 1px; vertical-align: middle; }
.dot.live { background: var(--green); } .dot.carried { background: #fff; border: 1.5px solid #B08B2E; } .dot.bench { background: var(--line-2); }
.avail { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 5px; border-radius: 3px; margin-left: 4px; border: 1px dashed; white-space: nowrap; vertical-align: middle; }
.avail.sold { color: var(--crimson); border-color: #D9A5A0; background: var(--crimson-tint); }
.avail.low { color: #8A5A0E; border-color: #D9BE86; background: #FBF4E4; }
.avail.open { color: var(--muted); border-color: var(--line-2); background: var(--stone); }
.promo { display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 4px; margin-left: 2px; cursor: help; vertical-align: middle; }

.grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.grid { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.grid th, .grid td { padding: 8px 10px; border-bottom: 1px solid var(--stone); text-align: left; vertical-align: top; white-space: nowrap; }
.grid th { font-weight: 600; font-size: 11.5px; background: var(--canvas); border-bottom: 1px solid var(--line); }
.grid th small, .grid td small { display: block; font-weight: 400; color: var(--faint); font-size: 11px; }
.grid td.sps { background: #FDF8F7; } .grid td.sps b { font-weight: 500; }
.grid td.none { color: var(--line-2); } .grid td.excl .mono { text-decoration: line-through; color: var(--faint); }
.gap { font-weight: 600; font-size: 12px; } .gap.below { color: var(--crimson); } .gap.above { color: var(--ink-2); } .gap.na { color: var(--faint); font-weight: 400; }
.grid-legend { font-size: 11.5px; color: var(--muted); margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.quiet-note { font-size: 11.5px; color: var(--faint); margin-top: 4px; }

.maplibregl-popup-content { font: 12.5px/1.45 var(--sans); padding: 8px 11px; border-radius: 6px; box-shadow: 0 4px 16px rgba(20,20,19,.15); }
.comp-tip .maplibregl-popup-content { padding-right: 22px; }

/* ---- pages ---- */
.page-head { max-width: 860px; margin-bottom: 22px; }
.page-head h2 { font: 400 34px/1.1 var(--serif); letter-spacing: -.015em; margin-top: 6px; }
.lede { color: var(--ink-2); font-size: 15px; margin-top: 8px; max-width: 52em; }
.sub-h { margin-top: 26px; }
.table-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.list { border-collapse: collapse; width: 100%; font-size: 13px; }
.list th, .list td { padding: 9px 12px; border-bottom: 1px solid var(--stone); text-align: left; vertical-align: top; }
.list th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; background: var(--canvas); position: sticky; top: 0; }
.list td small { display: block; color: var(--faint); font-size: 11.5px; }
.list td a { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; } .list td a:hover { text-decoration: underline; }
.list .r { text-align: right; } .list .why { color: var(--ink-2); max-width: 440px; }
.list td.sample { color: #8A6A1C; background: #FDFAF1; font-style: italic; }
.bar { display: inline-block; width: 60px; height: 5px; background: var(--stone); margin-right: 6px; vertical-align: middle; border-radius: 3px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--crimson); }
.foot-note { font-size: 12px; color: var(--faint); margin-top: 10px; max-width: 70em; }
.facts { display: flex; gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 18px; }
.facts div { padding: 12px 20px; border-right: 1px solid var(--line); } .facts div:last-child { border: 0; }
.facts dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.facts dd { font: 500 22px/1.3 var(--mono); } .facts span { font-size: 11.5px; color: var(--faint); }
.st { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.st.ok { color: var(--green); background: #E8F1EA; } .st.bad { color: var(--crimson); background: var(--crimson-tint); } .st.warn { color: #8A5A0E; background: #FBF1DC; } .st.quiet { color: var(--muted); background: var(--stone); }

.pipeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; margin: 20px 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pipeline li { padding: 24px 16px; border-right: 1px solid var(--line); position: relative; display: flex; flex-direction: column; gap: 4px; }
.pipeline li:last-child { border: 0; background: var(--crimson-tint); }
.pipeline li:not(:last-child)::after { content: "\2192"; position: absolute; right: -9px; top: 28px; background: var(--white); color: var(--crimson); font-size: 14px; z-index: 1; }
.pipeline b { font: 500 28px/1 var(--serif); color: var(--ink); } .pipeline span { font-weight: 600; } .pipeline small { color: var(--muted); font-size: 12px; }
.future-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1100px; }
.fcard { background: var(--white); border: 1px dashed var(--line-2); border-radius: 10px; padding: 20px; }
.fcard h3 { font: 500 19px var(--serif); margin-bottom: 6px; } .fcard p { color: var(--ink-2); } .curve { width: 100%; margin: 12px 0 6px; }

body.site-open .maplibregl-ctrl-bottom-right { right: min(820px, calc(100% - 48px)); }
.evidence li .dot { margin: 0; }
.evidence .ev-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; }
.evidence .ev-h > span:last-child { text-align: right; }
.evidence .ev-h .sample-tag { font-size: 8.5px; padding: 2px 3px; }
.act-side .btns { margin-top: 6px; }

/* ---- shared additions: rail grip, legend toggle, banner ---- */
.mock-flag .short { display: none; }
.rail-grip { cursor: default; }
.grip-bar { display: none; }
.legend-toggle { display: none; }
.st-chip:empty { display: none; }
.st-chip .sl-chip { margin-top: 3px; }

/* ---- SiteLink push (demo) ---- */
.demo-tag { display: inline-block; font: 700 9.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 3px; background: #1F3A5F; color: #fff; margin-right: 6px; vertical-align: middle; }
.demo-tag.inv { background: #fff; color: var(--ink); margin: 0 0 0 6px; }
.sl-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 12px; white-space: nowrap; background: var(--stone); color: var(--ink-2); }
.sl-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sl-chip.approved { background: #FBF1DC; color: #8A5A0E; }
.sl-chip.queued { background: #EAF0F7; color: #1F3A5F; } .sl-chip.queued i { animation: pulse 1s infinite; }
.sl-chip.sent { background: #EAF0F7; color: #1F3A5F; }
.sl-chip.confirmed { background: #E8F1EA; color: var(--green); }
@keyframes pulse { 50% { opacity: .25; } }
.act-cell { white-space: nowrap; }
.act-cell-in, .btns { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.batch-bar { position: sticky; top: -28px; z-index: 3; margin: -28px -32px 22px; padding: 12px 32px; background: #F3F6FA; border-bottom: 1px solid #D5DEEA; display: flex; align-items: center; gap: 12px; }
.batch-bar .bb-text { flex: 1; color: var(--ink-2); }
.batch-bar .btn:disabled { opacity: .45; }
dialog.sl { padding: 0; border: 0; border-radius: 12px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 24px 60px rgba(20,20,19,.3); color: var(--ink); background: var(--white); }
dialog.sl::backdrop { background: rgba(20,20,19,.45); }
.sl-form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.sl-head { padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.sl-demo { font-size: 12px; color: #1F3A5F; font-weight: 600; display: flex; align-items: center; }
.sl-head h2 { font: 500 24px/1.2 var(--serif); margin-top: 8px; }
.sl-sub { color: var(--muted); margin-top: 2px; }
.sl-body { padding: 16px 24px; overflow: auto; }
.sl-change + .sl-change { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sl-ch-h { margin-bottom: 6px; }
.sl-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--stone); }
.sl-rows dt { color: var(--muted); }
.sl-rows dd { font-family: var(--mono); text-align: right; } .sl-rows dd small { font-family: var(--sans); color: var(--faint); margin-left: 8px; }
.sl-rows .from { color: var(--muted); } .sl-rows .chg .from { text-decoration: line-through; }
.sl-rows .arr { margin: 0 6px; color: var(--crimson); } .sl-rows .to { font-weight: 500; color: var(--ink); }
.sl-date { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 12px; }
.sl-date span { font-weight: 600; } .sl-date input { padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px; min-height: 44px; }
.sl-note { font-size: 12px; color: var(--faint); margin-top: 6px; }
.sl-prev { margin-top: 14px; } .sl-prev summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.sl-prev pre { background: #14181F; color: #D8E1EC; font: 11.5px/1.5 var(--mono); padding: 12px; border-radius: 6px; overflow: auto; max-height: 220px; margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; }
.sl-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--canvas); flex-wrap: wrap; }
.sl-foot .btn { min-height: 40px; }
.sl-ok .sl-body { text-align: center; padding: 28px 24px 18px; }
.sl-check { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: #E8F1EA; color: var(--green); font-size: 26px; display: grid; place-items: center; }
.sl-ok h2 { font: 500 26px/1.2 var(--serif); }
.sl-demo-line { font-weight: 600; color: #1F3A5F; margin-top: 4px; }
.sl-track { display: flex; justify-content: center; gap: 0; margin: 18px 0 4px; counter-reset: s; }
.sl-track li { font-size: 12px; color: var(--faint); padding: 0 12px; position: relative; }
.sl-track li::before { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); margin: 0 auto 6px; background: var(--white); transition: all .3s; }
.sl-track li.on { color: var(--ink); } .sl-track li.on::before { background: var(--green); border-color: var(--green); }
.sl-track li.now { font-weight: 600; }

/* ---- tablet (641-1024) ---- */
@media (max-width: 1024px) {
  :root { --side-w: 68px; }
  .side { padding: 14px 8px; align-items: center; }
  .lockup { padding: 2px 0 14px; margin-bottom: 10px; align-items: center; width: 100%; }
  .lk-logo, .lk-sub { display: none; }
  .lk-mark { display: block; }
  .side-nav a { flex-direction: column; gap: 3px; padding: 8px 4px; font-size: 10.5px; width: 56px; text-align: center; min-height: 52px; justify-content: center; position: relative; }
  .side-nav .count { position: absolute; top: 2px; right: 0; margin: 0; font-size: 9.5px; padding: 0 4px; }
  .side-nav .soon { display: none; }
  .side-foot { display: none; }
  .kpis > div:nth-child(4) { display: none; }
  .kpis { gap: 20px; }
  .rail { width: 320px; }
  .regions, .legend { left: 352px; }
  .site-panel { width: calc(100% - 32px); }
  body.site-open .maplibregl-ctrl-bottom-right { right: calc(100% - 32px); }
  .evidence li { grid-template-columns: 8px minmax(0, 1fr) auto; grid-template-areas: "dot name price" ". meta meta"; row-gap: 0; padding: 4px 0; }
  .evidence li > .dot { grid-area: dot; } .evidence li > .ev-name { grid-area: name; } .evidence li > .ev-p { grid-area: price; text-align: right; }
  .evidence li > .ev-d, .evidence li > span:nth-of-type(4), .evidence li > .ev-src { grid-column: 2 / 4; font-size: 11.5px; }
  .evidence li > .ev-d { grid-row: 2; justify-self: start; } .evidence li > span:nth-of-type(4) { grid-row: 2; justify-self: center; } .evidence li > .ev-src { grid-row: 2; justify-self: end; text-align: right; max-width: 70%; }
  .evidence .ev-h { display: none; }
  .pipeline { grid-template-columns: repeat(4, 1fr); } .pipeline li { border-bottom: 1px solid var(--line); }
  .future-grid { grid-template-columns: 1fr 1fr; }
  .facts { flex-wrap: wrap; } .facts div { flex: 1 1 30%; border-bottom: 1px solid var(--line); }
}

/* ---- phone (<= 640) ---- */
@media (max-width: 640px) {
  :root { --tab-h: 62px; --top-h: 52px; --flag-h: 26px; }
  body { font-size: 15px; }
  .mock-flag { font-size: 11px; white-space: nowrap; overflow: hidden; padding: 0 8px; }
  .mock-flag .long { display: none; } .mock-flag .short { display: inline; }
  .shell { grid-template-columns: 1fr; height: calc(100% - var(--flag-h)); }
  .side { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; top: auto; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom); flex-direction: row; border-right: 0; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(20,20,19,.06); }
  .lockup, .side-foot { display: none; }
  .side-nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  .side-nav a { width: auto; flex: 1; min-height: var(--tab-h); border-radius: 0; font-size: 10.5px; padding: 6px 2px; }
  .side-nav a[aria-current="page"] { background: none; box-shadow: inset 0 2px 0 var(--crimson); }
  .side-nav .count { right: 50%; transform: translateX(22px); top: 5px; }
  .main-col { height: 100%; padding-bottom: var(--tab-h); }
  .topbar { padding: 0 14px; height: var(--top-h); gap: 10px; }
  .mob-mark { display: block; }
  .rail-brand { display: inline-flex; }
  .view-title { font-size: 21px; flex: none; }
  .kpis { gap: 14px; } .kpis > div:nth-child(n+3) { display: none; }
  .kpis dt { font-size: 9px; letter-spacing: .08em; } .kpis dd { font-size: 15px; } .kpis .sub { display: none; }
  body[data-view="map"] .topbar { display: none; }
  .page { padding: 18px 14px 32px; }
  .page-head h2 { font-size: 27px; } .lede { font-size: 14.5px; }

  /* map: full-screen, chips scroll, legend behind a button */
  .regions { left: 0; right: 0; top: 10px; padding: 0 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .regions::-webkit-scrollbar { display: none; }
  .regions button { flex: none; min-height: 44px; padding: 6px 13px; box-shadow: 0 1px 4px rgba(20,20,19,.1); }
  .legend-toggle { display: block; position: absolute; right: 12px; top: 64px; min-height: 44px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line-2); background: rgba(255,255,255,.96); font-size: 13px; font-weight: 500; box-shadow: 0 1px 4px rgba(20,20,19,.1); }
  .legend { display: none; left: auto; right: 12px; top: 114px; bottom: auto; width: min(290px, calc(100% - 24px)); box-shadow: 0 6px 20px rgba(20,20,19,.15); }
  .legend.open { display: flex; }
  body.site-open .legend-toggle { display: none; }
  .maplibregl-ctrl-bottom-right { bottom: 140px; }
  .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group button { width: 44px; height: 44px; }

  /* bottom sheet */
  .rail { left: 0; right: 0; width: auto; top: 52px; bottom: 0; border-radius: 16px 16px 0 0; border: 0; box-shadow: 0 -6px 24px rgba(20,20,19,.16); transition: transform .32s var(--ease); z-index: 5; }
  .rail[data-snap="full"] { transform: translateY(0); }
  .rail[data-snap="half"] { transform: translateY(45%); }
  .rail[data-snap="peek"] { transform: translateY(calc(100% - 132px)); }
  .rail.dragging { transition: none; }
  body.site-open .rail { transform: translateY(100%); opacity: 1; }
  .rail-grip { cursor: grab; touch-action: none; padding: 2px 0 2px; margin: -8px -16px 0; padding: 8px 16px 0; }
  .grip-bar { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 10px; }
  .rail-head { padding: 8px 16px 10px; }
  .rail-head input { min-height: 44px; font-size: 16px; }
  .step { min-height: 60px; padding: 10px 16px; }

  /* site panel = full-screen sheet */
  .site-panel { position: fixed; inset: 0; width: 100%; z-index: 50; border: 0; animation: sheetup .4s var(--ease); padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheetup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .panel-close { position: fixed; top: 10px; right: 10px; width: 44px; height: 44px; font-size: 22px; box-shadow: 0 2px 8px rgba(20,20,19,.12); }
  .site-head { padding: 12px 16px 14px; }
  .back { min-height: 44px; font-size: 14px; margin-bottom: 0; }
  .site-head h2 { font-size: 27px; padding-right: 44px; }
  .eyebrow { flex-wrap: wrap; font-size: 10.5px; letter-spacing: .1em; }
  .site-kpis { grid-template-columns: 1fr 1fr; }
  .site-kpis div:nth-child(3) { grid-column: 1 / 3; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 8px; }
  .site-kpis dd { font-size: 18px; }
  .site-sec { padding: 18px 14px 6px; }

  /* action cards stack */
  .act { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
  .act-rank { font-size: 12px; }
  .act-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; border-top: 1px solid var(--stone); padding-top: 10px; gap: 6px 12px; }
  .act-side .conf { display: none; }
  .act-side .btns { width: 100%; margin: 4px 0 0; justify-content: stretch; }
  .act-side .btns .btn { flex: 1; } .act-side .btns .sl-chip { flex: 1; justify-content: center; min-height: 44px; border-radius: 8px; }
  .evidence { grid-column: 1; }
  .btn { min-height: 44px; padding: 10px 16px; font-size: 14px; }
  .btn.sm { min-height: 44px; padding: 8px 14px; font-size: 13.5px; }
  .evidence li { padding: 7px 0; border-bottom: 1px solid var(--stone); }
  .evidence li > .ev-src { max-width: none; justify-self: start; text-align: left; grid-row: 3; }
  .evidence li > .ev-src a { display: inline-block; padding: 6px 0; }
  .evidence li > span:nth-of-type(4) { justify-self: end; }

  /* competitor grid: the one table that scrolls sideways, with a sticky first column */
  .grid { font-size: 13px; }
  .grid th:first-child, .grid td:first-child { position: sticky; left: 0; z-index: 1; background: var(--white); box-shadow: 1px 0 0 var(--line); }
  .grid th:first-child { background: var(--canvas); }
  .grid-wrap { margin: 0 -14px; border-radius: 0; border-left: 0; border-right: 0; }
  .grid-legend { font-size: 12px; }

  .batch-bar { top: -18px; margin: -18px -14px 16px; padding: 10px 14px; flex-wrap: wrap; }
  .batch-bar .bb-text { flex: 1 1 60%; font-size: 13px; } .batch-bar .btn { width: 100%; }
  .facts div { flex: 1 1 45%; padding: 10px 14px; } .facts dd { font-size: 19px; }
  .pipeline { grid-template-columns: 1fr 1fr; } .pipeline li:not(:last-child)::after { display: none; } .pipeline li { padding: 16px 14px; } .pipeline b { font-size: 24px; }
  .future-grid { grid-template-columns: 1fr; }

  /* SiteLink dialog = bottom sheet */
  dialog.sl { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .sl-form { max-height: 92vh; }
  .sl-head, .sl-body { padding-left: 16px; padding-right: 16px; }
  .sl-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .sl-foot .btn { flex: 1 1 40%; min-height: 48px; }
  .sl-foot .btn.dark { flex-basis: 100%; order: -1; }
  .sl-rows div { flex-direction: column; gap: 2px; } .sl-rows dd { text-align: left; }
  .sl-track li { padding: 0 6px; font-size: 11px; }
}


/* ---- round 2: sticky site bar on phones, SiteLink text rows ---- */
.site-bar { display: none; }
.sl-rows .txt dd { font-family: var(--sans); }
@media (max-width: 640px) {
  .site-bar { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 4; height: 52px; padding: 4px 6px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
  .site-bar button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; border-radius: 50%; cursor: pointer; flex: none; }
  .site-bar .sb-close { border: 1px solid var(--line-2); font-size: 20px; }
  .eyebrow { display: block; } .eyebrow .tier-dot { vertical-align: 0; margin-right: 4px; }
  .maplibregl-ctrl-attrib.maplibregl-compact-show { padding-right: 24px; }
  .sb-name { flex: 1; font: 500 17px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
  .panel-close, .site-head .back { display: none; }
  .site-head { padding-top: 14px; }
  .site-head h2 { padding-right: 0; }
  .eyebrow .tier-dot { margin-right: 2px; }
  .side-nav .lbl { font-size: 0; } .side-nav .lbl::after { content: attr(data-short); font-size: 10.5px; }
  .sl-rows div { flex-direction: row; align-items: baseline; }
  .sl-rows dd { text-align: right; }
  .sl-rows .txt { flex-direction: column; gap: 2px; } .sl-rows .txt dd { text-align: left; }
}


/* ---- stacked tables at tablet and phone widths (no sideways scroll) ---- */
@media (max-width: 900px) {
  /* every other table becomes stacked rows */
  .table-card { background: none; border: 0; overflow: visible; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list thead { display: none; }
  table.list tr { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
  table.list td { padding: 4px 0; border: 0; text-align: left !important; max-width: none !important; }
  table.list td[data-label]::before { content: attr(data-label); display: block; font: 600 10px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 1px; }
  table.list td:nth-child(2), table.list td.why, table.list td:first-child { grid-column: 1 / 3; }
  table.list td:first-child[data-label="#"] { display: none; }
  table.list td.act-cell { grid-column: 1 / 3; padding-top: 8px; }
  table.list td.act-cell .act-cell-in { justify-content: stretch; }
  table.list td.act-cell::before { display: none !important; }
  table.list td.act-cell .btn, table.list td.act-cell .sl-chip { flex: 1; min-width: 40%; justify-content: center; min-height: 44px; border-radius: 8px; }
  table.list td.sample { background: none; }
  .list td a { min-height: 44px; font-size: 15px; }
  table.list tr { grid-template-columns: repeat(4, 1fr); }
  table.list td:nth-child(2), table.list td.why, table.list td:first-child, table.list td.act-cell { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  table.list tr { grid-template-columns: 1fr 1fr; }
}

/* ---- round 3: tablet fixes ---- */
.mock-flag { white-space: nowrap; overflow: hidden; }
@media (max-width: 1024px) {
  .mock-flag .long { display: none; } .mock-flag .short { display: inline; }
  body.site-open .maplibregl-ctrl-bottom-right { display: none; }
  .evidence li > .ev-src { grid-row: 3; justify-self: start; text-align: left; max-width: none; }
  .evidence li > span:nth-of-type(4) { justify-self: end; }
}

.sl-units { margin-top: 12px; font-size: 13px; color: var(--ink-2); background: var(--canvas); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.sl-rows .note dd, .sl-rows .note dd small { font-family: var(--sans); color: var(--muted); }
.sl-rows dt { white-space: nowrap; }
.sl-head h2:focus, .sl-check:focus { outline: none; }

/* ---- History & results (sample) ---- */
.hist-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.hist-link { border: 0; background: none; padding: 0; color: var(--ink-2); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; font-size: 12.5px; }
.hist-last { display: inline-flex; align-items: center; gap: 6px; }
.out-chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
.out-chip.good { background: #E8F1EA; color: var(--green); } .out-chip.early { background: var(--stone); color: var(--muted); } .out-chip.bad { background: var(--crimson-tint); color: var(--crimson); }
.unit-btn { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; }
.unit-btn b { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.hist-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hist-tabs button { border: 1px solid var(--line-2); background: var(--white); border-radius: 16px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.hist-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.hist-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--crimson); }
.hist-tabs button[aria-selected="true"] .hist-dot { background: #fff; }
.did { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.did.good { border-left-color: var(--green); } .did.bad { border-left-color: var(--crimson); } .did.early { border-left-color: #B9B4AA; }
.did-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.did-top .sample-tag { margin-left: auto; }
.did-head { font-weight: 600; }
.did p { font-size: 13.5px; color: var(--ink-2); }
.did-conf { color: var(--muted) !important; font-size: 12.5px !important; margin-top: 6px; font-style: italic; }
.did-src { color: var(--faint) !important; font-size: 11.5px !important; margin-top: 4px; }
.hist-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.hist-legend span { display: inline-flex; align-items: center; gap: 5px; }
.hist-legend .k { width: 16px; height: 0; border-top: 2px solid; display: inline-block; }
.k.price { border-color: var(--crimson); } .k.std { border-color: var(--ink-2); border-top-style: dashed; } .k.med { border-color: #8E8A82; border-top-style: dotted; border-top-width: 3px; } .k.occ { border-color: #1F3A5F; }
.k.win { height: 9px; border: 0; background: rgba(31,58,95,.10); }
.hist-chart { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 8px 6px 4px; overflow: hidden; }
.hist-svg { display: block; max-width: 100%; height: auto; font-family: var(--sans); }
.hist-svg .gl { stroke: var(--stone); stroke-width: 1; }
.hist-svg .ax { font-size: 10.5px; fill: var(--faint); } .hist-svg .ttl { fill: var(--muted); font-weight: 600; font-size: 10.5px; }
.hist-svg .lab { font-weight: 600; fill: var(--ink-2); } .hist-svg .lab.price { fill: var(--crimson); }
.hist-svg .ln { fill: none; stroke-width: 1.6; } .hist-svg .ln.price { stroke: var(--crimson); stroke-width: 2.2; } .hist-svg .ln.std { stroke: var(--ink-2); stroke-dasharray: 5 4; } .hist-svg .ln.med { stroke: #8E8A82; stroke-dasharray: 1.5 3; stroke-width: 2; stroke-linecap: round; } .hist-svg .ln.occ { stroke: #1F3A5F; }
.hist-svg .hbar.in { fill: var(--green); } .hist-svg .hbar.out { fill: #C9A27A; }
.hist-svg .win.pre { fill: rgba(31,58,95,.05); } .hist-svg .win.post { fill: rgba(31,58,95,.10); }
.hist-svg .mk { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 3; } .hist-svg .mkd { fill: var(--crimson); stroke: #fff; stroke-width: 1.5; } .hist-svg .mkt { fill: var(--ink); font-weight: 600; font-size: 11px; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.hist-foot { font-size: 12px; color: var(--faint); margin-top: 8px; }
.seg { display: inline-flex; background: var(--stone); border-radius: 8px; padding: 3px; margin-bottom: 14px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 6px; font-weight: 500; cursor: pointer; color: var(--muted); }
.seg button span { font-family: var(--mono); font-size: 11.5px; margin-left: 4px; }
.seg button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(20,20,19,.1); }
.out-sum { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .hist-link { min-height: 44px; font-size: 14px; }
  .hist-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 12px; padding: 0 14px; scrollbar-width: none; }
  .hist-tabs button { flex: none; min-height: 44px; padding: 6px 14px; }
  .hist-chart { margin: 0 -14px; border-radius: 0; border-left: 0; border-right: 0; padding: 6px 0 2px; }
  .unit-btn { min-height: 44px; }
  .seg { display: flex; } .seg button { flex: 1; min-height: 44px; }
  .did-top .sample-tag { margin-left: 0; }
}
@media (max-width: 640px) { .seg button { white-space: nowrap; font-size: 14px; padding: 6px 8px; } }

/* ---- live app (D16) additions ---- */
:root { --flag-h: 0px; }
@media (max-width: 640px) { :root { --flag-h: 0px; } }
.toasts { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13.5px; box-shadow: 0 6px 20px rgba(20,20,19,.25); max-width: min(520px, 92vw); }
.toast.error { background: var(--crimson); }
@media (max-width: 640px) { .toasts { bottom: calc(var(--tab-h) + 12px); } }
.nb { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.nb b { color: var(--ink-2); font-weight: 500; }
.nb-av { display: inline-block; margin-top: 3px; color: var(--ink-2); }
.nb-av.strong { color: var(--green); } .nb-av.weak { color: #8A5A0E; }
.legend .lg-c.tight { background: #fff; border: 2px solid var(--crimson); }
.list tr.sps-row td { background: #FDF8F7; }
.side-foot a { color: var(--muted); }
#methodology-root { max-width: 1280px; }
.view-methodology, #view-methodology { padding-top: 20px; }

.hist-svg { width: 100%; height: auto; }
@media (max-width: 900px) {
  table.list td, table.list td.nowrap, table.list td.small { white-space: normal; overflow-wrap: anywhere; }
  table.list td.small, table.list td.why { grid-column: 1 / -1; }
}

/* ---- competitors (feedback #4) ---- */
.legend .lg-b { width: 9px; height: 9px; border-radius: 50%; border: 0; }
.legend .lg-b.nt { background: #fff !important; border: 1.5px solid; }
.legend { max-height: calc(100% - 90px); overflow: auto; }
.comp-tip .maplibregl-popup-content { padding: 10px 12px; }
.cc { font: 12.5px/1.4 var(--sans); color: var(--ink); min-width: 250px; }
.cc-brand { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cc-brand i, .ct-brand i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.cc-name { font: 500 15px/1.25 var(--serif); margin: 2px 22px 4px 0; }
.cc-meta { color: var(--muted); font-size: 12px; } .cc-meta a { color: var(--ink-2); }
.cc-scroll { max-height: 220px; overflow: auto; margin: 8px 0 6px; border-top: 1px solid var(--line); }
.cc-t { border-collapse: collapse; width: 100%; font-size: 12px; }
.cc-t th, .cc-t td { padding: 4px 6px 4px 0; text-align: left; border-bottom: 1px solid var(--stone); white-space: nowrap; vertical-align: top; }
.cc-t thead th { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; position: sticky; top: 0; background: #fff; }
.cc-t tbody th { font-weight: 600; }
.cc-t .cc-promo { white-space: normal; max-width: 110px; color: var(--ink-2); font-size: 11.5px; }
.cc-t .avail { margin-left: 0; }
.cc-link a { color: var(--ink-2); font-weight: 600; }

.ct { font-size: 12.5px; }
.ct th, .ct td { white-space: nowrap; vertical-align: top; }
.ct thead th { background: var(--canvas); }
.ct th:first-child, .ct td:first-child { position: sticky; left: 0; z-index: 2; background: var(--white); box-shadow: 1px 0 0 var(--line); min-width: 150px; max-width: 190px; white-space: normal; }
.ct thead th:first-child { background: var(--canvas); z-index: 3; }
.ct tr.ct-ours th, .ct tr.ct-ours td { background: #FDF6F5; border-bottom: 2px solid #EBC3BE; }
.ct tr.ct-ours th:first-child { background: #FDF6F5; }
.ct tr.ct-ours th { font-weight: 700; color: var(--crimson); }
.ct td small, .ct th small { display: block; font-weight: 400; color: var(--faint); font-size: 11px; white-space: normal; max-width: 150px; }
.ct tbody th { font-weight: 500; text-align: left; }
.ct-brand { display: inline-flex; align-items: center; gap: 6px; }
.ct-brand a { color: var(--ink); font-weight: 600; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.ct td .ct-promo, .ct-promo { color: var(--ink-2) !important; }
.ct-diff { font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.ct-diff.up { color: var(--green) !important; } .ct-diff.down { color: var(--crimson) !important; } .ct-diff.same { color: var(--faint) !important; }
.ct td.none { color: var(--line-2); }
.ct .unit-btn small { display: block; }

.cf-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 6px; }
.cf { display: flex; flex-direction: column; gap: 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.cf select, .cf input { font: 14px var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--canvas); min-width: 150px; }
.cf-q input { min-width: 220px; }
.cf-chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); padding-bottom: 8px; }
.list th.sortable button { border: 0; background: none; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.list th.sortable[aria-sort="ascending"] button, .list th.sortable[aria-sort="descending"] button { color: var(--ink); }
.list th.r.sortable button { text-align: right; width: 100%; }
.comp-t td.pc b { font-weight: 500; }
.comp-t td small { display: block; }
.brand-t tr.on td { background: #FDF6F5; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.more { margin-top: 10px; text-align: center; }

@media (max-width: 900px) {
  .comp-t tr, .brand-t tr { grid-template-columns: repeat(3, 1fr); }
  .comp-t td:nth-child(-n+3), .brand-t td:first-child { grid-column: 1 / -1; }
  .comp-t td:last-child { grid-column: 1 / -1; }
  table.list td.r { text-align: left !important; }
}
@media (max-width: 640px) {
  .side-nav a.future { display: none; }
  .cf-bar { padding: 10px; } .cf { flex: 1 1 45%; } .cf select, .cf input { min-width: 0; width: 100%; min-height: 44px; font-size: 16px; } .cf-q { flex-basis: 100%; }
  .cf-chk { min-height: 44px; padding: 0; }
  .ct th:first-child, .ct td:first-child { min-width: 112px; max-width: 128px; }
  .ct td small, .ct th small { max-width: 120px; }
  .ct-wrap { margin: 0 -14px; border-radius: 0; border-left: 0; border-right: 0; }
  .comp-t tr, .brand-t tr { grid-template-columns: 1fr 1fr; }
  .linkish, .list th.sortable button { min-height: 44px; }
  .comp-t td:last-child .btn { width: 100%; }
  .cc { min-width: 0; }
}

.cc-t td small { display: block; color: var(--faint); font-size: 11px; white-space: normal; max-width: 170px; }
.cc-t td small.cc-promo { color: var(--ink-2); }
@media (max-width: 640px) { .comp-tip .maplibregl-popup-content { max-height: 46vh; overflow: auto; } .cc-scroll { max-height: none; } }
@media (max-width: 640px) { .cc-t td small { max-width: 120px; } .cc-t th, .cc-t td { padding-right: 4px; } .cc-t .avail { font-size: 10px; padding: 1px 3px; } }

/* ---- Why are we above market? (feedback #6B) ---- */
.am-btn { margin-left: auto; margin-right: 22px; border: 1px solid #EBC3BE; background: #FDF6F5; color: var(--crimson); border-radius: 18px; padding: 6px 14px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.am-btn .mono { font-weight: 500; font-size: 12px; margin-left: 4px; color: var(--ink-2); }
.am-btn:hover { border-color: var(--crimson); }
.am-rail { display: block; width: 100%; text-align: left; margin: 0 0 10px; border: 1px solid #EBC3BE; background: #FDF6F5; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.am-rail b { display: block; color: var(--crimson); font-size: 13px; }
.am-dialog { width: 100%; }
dialog.sl:has(.am-dialog) { width: min(860px, calc(100vw - 32px)); }
.am-lead { font-size: 15px; line-height: 1.55; color: var(--ink); margin-bottom: 14px; max-width: 62em; }
.am-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; }
.am-stat { padding: 10px 14px; border-right: 1px solid var(--line); } .am-stat:last-child { border-right: 0; }
.am-stat dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.am-stat dd { font: 500 24px/1.25 var(--serif); cursor: help; } .am-stat dd small { font-size: 12px; color: var(--muted); }
.am-stat dd.above { color: var(--crimson); } .am-stat dd.below { color: var(--green); }
.am-stat span { font-size: 11.5px; color: var(--faint); }
.am-stats.sm .am-stat dd { font-size: 20px; }
.am-h { font-weight: 600; margin: 14px 0 6px; font-size: 13.5px; }
.am-bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: var(--stone); }
.am-bar i { display: block; height: 100%; border-right: 1px solid #fff; }
.am-note { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.am-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.am-legend span { display: inline-flex; align-items: center; gap: 5px; } .am-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.am-occ { font-size: 13px; color: var(--ink-2); background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 14px; }
.am-verdicts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.am-verdicts li { font-size: 12.5px; padding: 4px 10px; border-radius: 12px; background: var(--stone); }
.am-verdicts .v-test_lower, .am-verdict.v-test_lower { background: #FBF1DC; color: #8A5A0E; }
.am-verdicts .v-hold_full, .am-verdict.v-hold_full { background: #E8F1EA; color: var(--green); }
.am-verdicts .v-hold_unknown, .am-verdict.v-hold_unknown { background: #EAF0F7; color: #1F3A5F; }
.am-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.am-site { display: grid; grid-template-columns: 56px 1fr; gap: 2px 8px; padding: 8px 10px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: inherit; }
.am-site:hover { border-color: var(--ink-2); }
.am-site .gap { grid-row: 1 / 3; align-self: center; font-family: var(--mono); }
.am-site small { color: var(--muted); font-size: 12px; }
.gap.at { color: var(--ink-2); }
.am-verdict { padding: 10px 12px; border-radius: 8px; background: var(--stone); margin-bottom: 10px; font-size: 14px; }
.am-site-t small { display: inline; color: var(--faint); }
.av-tight { color: var(--green); font-weight: 600; } .av-sitting { color: #8A5A0E; font-weight: 600; } .av-unknown { color: var(--faint); }
.am-box { background: var(--white); border: 1px solid #EBC3BE; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.am-box > summary { cursor: pointer; font-size: 15px; min-height: 28px; list-style-position: outside; }
.am-box > summary b { color: var(--crimson); }
.am-box[open] > summary { margin-bottom: 10px; }
@media (max-width: 1024px) { .am-btn { margin-right: 10px; font-size: 12px; padding: 5px 10px; } .am-btn .mono { display: none; } .kpis > div:nth-child(3) { display: none; } }
@media (max-width: 900px) { .am-stats { grid-template-columns: 1fr 1fr; } .am-stat:nth-child(2) { border-right: 0; } .am-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 640px) {
  .am-btn { display: none; }
  .am-rail { min-height: 44px; font-size: 13.5px; }
  .am-lead { font-size: 14.5px; }
  .am-stat dd { font-size: 21px; }
  .am-sites { grid-template-columns: 1fr; }
  .am-site { min-height: 44px; }
  .am-box { padding: 10px 12px; margin-left: -4px; margin-right: -4px; }
  .am-box > summary { min-height: 44px; }
  .am-units tr { grid-template-columns: repeat(3, 1fr) !important; }
  .am-units td:first-child { grid-column: 1 / -1; }
}


/* ---- Feedback #5: amenities & reputation ---- */
.am-unit { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.am-unit select { font: inherit; color: var(--ink); padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--white); min-height: 32px; }
.am-cov { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.am-cov b { color: var(--ink); }
.am-sample { font-size: 12.5px; margin: 0 0 8px; padding: 8px 10px; border: 1px dashed #B08B2E; background: #FBF5E6; border-radius: 6px; color: #5E4810; }
.am-t th[scope=row] { font-weight: 500; background: var(--white); }
.am-t th[scope=row] small { display: block; font-weight: 400; color: var(--faint); font-size: 11px; }
.am-t thead th { min-width: 108px; }
.am-t thead th:first-child { min-width: 132px; }
.am-t td { text-align: center; }
.am-t td.sps, .am-t th.sps { background: #FDF8F7; }
.am-t td.am-y { color: #2F6B45; font-weight: 600; }
.am-t td.am-n { color: var(--faint); }
.am-t td.am-u { color: var(--line-2); }
.am-t td.am-v { font-size: 12px; }
.am-t tr.am-cat th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--canvas); padding-top: 10px; }
.am-t tr.am-rrow td, .am-t tr.am-prow td { text-align: left; white-space: normal; min-width: 108px; }
.am-t small.up { color: #A61C1C; } .am-t small.down { color: #2F6B45; }
.rt { display: inline-flex; align-items: baseline; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.rt-stars { color: #B7791F; letter-spacing: -1px; font-size: 12px; }
.rt-src { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.rt-src::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); margin-right: 4px; vertical-align: 1px; }
.rt-none { font-size: 11.5px; color: var(--faint); }
.amen-box { margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--white); padding: 12px 14px; }
.amen-box > summary { cursor: pointer; min-height: 32px; font-size: 14px; }
.amen-box[open] > summary { margin-bottom: 10px; }


.am-t thead th { white-space: normal; max-width: 150px; vertical-align: top; }
.am-t thead th .ct-brand { display: inline; }
.rt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.rt-l1 { white-space: nowrap; } .rt-n { color: var(--muted); font-size: 11.5px; }
[data-amen-sample] { text-decoration: underline; text-underline-offset: 2px; color: var(--ink); cursor: pointer; }
@media (max-width: 640px) { .am-t th[scope=row] { min-width: 0; max-width: 128px; white-space: normal; } .am-t thead th:first-child { min-width: 0; max-width: 128px; } .am-t thead th, .am-t tr.am-rrow td, .am-t tr.am-prow td { min-width: 104px; } }

.am-t thead th .ct-brand i { margin-right: 5px; }

.am-allin { margin: 14px 0; font-size: 13.5px; line-height: 1.5; }
.am-allin p { margin: 0 0 6px; }
.am-warn { font-size: 12.5px; padding: 8px 10px; border-left: 3px solid #B7791F; background: #FBF5E6; border-radius: 0 6px 6px 0; color: #5E4810; }

/* ---- Empirical calibration, confidence badges, noise floor & Phase 2 ECRI ---- */
.conf-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; line-height: 1.1; padding: 3px 8px; border-radius: 10px; white-space: nowrap; border: 1px solid transparent; cursor: help; }
.conf-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.conf-badge.high { color: var(--green); background: #E8F1EA; border-color: #C7DEC9; }
.conf-badge.medium { color: #8A5A0E; background: #FBF1DC; border-color: #E7D2A3; }
.conf-badge.low { color: var(--muted); background: var(--stone); border-color: var(--line-2); }
.conf-badge.sm { font-size: 10.5px; padding: 2px 6px; gap: 4px; }
.conf-badge.sm i { width: 5px; height: 5px; }
.conf-col small { margin-top: 3px; }

.noise-pill { display: inline-block; font: 600 10.5px/1.15 var(--sans); padding: 2px 7px; border-radius: 10px; border: 1px dashed #B08B2E; color: #7A5C12; background: #FBF5E6; white-space: nowrap; vertical-align: middle; margin-left: 4px; cursor: help; }
.noise-pill.sm { font-size: 10px; padding: 1.5px 6px; margin-left: 0; }
.st-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 3px; }
.list tr.is-noise td { background: #FCFAF6; }
.list tr.is-noise td:first-child { color: var(--faint); }

.cal-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.cal-strip div { padding: 13px 16px; border-right: 1px solid var(--line); min-width: 0; }
.cal-strip div:last-child { border-right: 0; }
.cal-strip dd { font: 500 17px/1.25 var(--mono); margin: 2px 0 3px; color: var(--ink); }
.cal-strip span { display: block; font-size: 11.5px; line-height: 1.4; color: var(--muted); }

.act-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.act-bar .seg { margin-bottom: 0; }
.noise-toggle { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2); padding: 7px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.noise-toggle:hover { border-color: var(--ink-2); }
.noise-toggle .nt-box { width: 13px; height: 13px; border-radius: 3px; border: 1.5px solid var(--line-2); background: var(--canvas); display: inline-grid; place-items: center; flex: none; }
.noise-toggle[aria-pressed="true"] { background: var(--crimson-tint); border-color: #D9A5A0; color: var(--crimson); font-weight: 600; }
.noise-toggle[aria-pressed="true"] .nt-box { background: var(--crimson); border-color: var(--crimson); }
.noise-toggle[aria-pressed="true"] .nt-box::after { content: "\2713"; color: #fff; font-size: 10px; line-height: 1; font-weight: 700; }

/* ---- Phase 2 ECRI & experiments view ---- */
.ecri-banner { display: flex; align-items: flex-start; gap: 10px; background: #FBF5E6; border: 1px dashed #B08B2E; border-radius: 8px; padding: 11px 14px; margin-bottom: 16px; color: #5E4810; font-size: 13px; line-height: 1.45; }
.ecri-banner .sample-tag { flex: none; margin-top: 2px; }
.ecri-banner p { margin: 0; }

.ecri-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 18px; transition: opacity .2s; }
.ecri-controls.is-loading { opacity: .65; }
.ecri-fac-f { flex: 1 1 220px; max-width: 300px; }
.ecri-fac-f select { width: 100%; }
.ecri-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ecri-glbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.ecri-glbl small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--faint); }
.ecri-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ecri-seg-btn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 1px solid var(--line-2); background: var(--canvas); border-radius: 7px; padding: 6px 11px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.ecri-seg-btn b { font-size: 13px; line-height: 1.2; color: var(--ink); }
.ecri-seg-btn small { font-size: 11px; line-height: 1.25; color: var(--muted); }
.ecri-seg-btn.sm { padding: 8px 13px; align-items: center; justify-content: center; }
.ecri-seg-btn:hover { border-color: var(--ink-2); }
.ecri-seg-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ecri-seg-btn[aria-pressed="true"] b { color: #fff; }
.ecri-seg-btn[aria-pressed="true"] small { color: #D7D4CE; }

.ecri-kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ecri-kpis div { padding: 12px 14px; border-right: 1px solid var(--line); min-width: 0; }
.ecri-kpis div:last-child { border-right: 0; }
.ecri-kpis dd { font-size: 19px; line-height: 1.25; }
.ecri-kpis dd small { font-size: 11px; color: var(--muted); font-weight: 400; }
.ecri-kpis .ecri-kpi-net { background: #FDF6F5; }
.ecri-kpis .ecri-kpi-net dt { color: var(--crimson); }
.ecri-kpis .ecri-kpi-net dd { color: var(--crimson); }

.ecri-sec { margin-top: 22px; }
.ecri-sec .sub-h { margin-top: 0; margin-bottom: 10px; }
.ecri-pos { color: var(--green); }
.ecri-neg { color: var(--crimson); }
.ecri-over { color: var(--crimson); font-weight: 600; }
.ecri-reason { max-width: 240px; white-space: normal; line-height: 1.35; margin-top: 2px; }

.arm-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.arm-pill.arm-std { background: #E8F1EA; color: var(--green); }
.arm-pill.arm-test { background: var(--crimson-tint); color: var(--crimson); }
.arm-pill.arm-ctrl { background: #EAF0F7; color: #1F3A5F; }
.arm-pill.arm-hold { background: #FBF1DC; color: #8A5A0E; }

.ecri-refs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ecri-ref-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ecri-ref-card h4 { margin: 0; font: 500 17px/1.25 var(--serif); color: var(--ink); }
.ecri-ref-list { margin: 2px 0 4px; border-top: 1px solid var(--stone); }
.ecri-ref-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--stone); font-size: 12.5px; }
.ecri-ref-list dt { color: var(--ink-2); }
.ecri-ref-list dd { font-weight: 600; color: var(--ink); white-space: nowrap; }
.ecri-err { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---- Methodology: empirical calibration callout ---- */
.mth-cal { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.mth-cal-head { margin-bottom: 14px; }
.mth-cal-title { margin: 4px 0 0; font: 500 22px/1.2 var(--serif); color: var(--ink); }
.mth-cal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mth-cal-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.mth-cal-k { margin: 0 0 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mth-cal-v { margin: 0 0 6px; font: 500 16px/1.25 var(--mono); color: var(--crimson); }
.mth-cal-p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }

@media (max-width: 1180px) {
  .ecri-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ecri-kpis div { border-bottom: 1px solid var(--line); }
  .ecri-kpis div:nth-child(4) { border-right: 0; }
}
@media (max-width: 1024px) {
  .cal-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-strip div { border-bottom: 1px solid var(--line); }
  .cal-strip div:nth-child(2n) { border-right: 0; }
  .cal-strip div:nth-last-child(-n+2) { border-bottom: 0; }
  .mth-cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ecri-refs { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  table.list.ecri-pace-t td:nth-child(2), table.list.ecri-lease-t td:nth-child(2) { grid-column: auto; }
  table.list.ecri-pace-t td:last-child, table.list.ecri-lease-t td:last-child { grid-column: 1 / -1; }
  .ecri-reason { max-width: none; }
}
@media (max-width: 640px) {
  .cal-strip { grid-template-columns: 1fr; }
  .cal-strip div { border-right: 0; border-bottom: 1px solid var(--line); padding: 11px 14px; }
  .cal-strip div:last-child { border-bottom: 0; }
  .act-bar { flex-direction: column; align-items: stretch; }
  .noise-toggle { justify-content: center; min-height: 44px; font-size: 13.5px; }
  .ecri-banner { flex-direction: column; gap: 6px; }
  .ecri-controls { padding: 12px; }
  .ecri-fac-f { flex: 1 1 100%; max-width: none; }
  .ecri-fac-f select { min-height: 44px; font-size: 16px; }
  .ecri-group { width: 100%; }
  .ecri-seg { display: grid; grid-template-columns: 1fr; width: 100%; }
  .ecri-group:last-child .ecri-seg { grid-template-columns: repeat(3, 1fr); }
  .ecri-seg-btn { min-height: 44px; width: 100%; }
  .ecri-kpis { grid-template-columns: 1fr 1fr; }
  .ecri-kpis div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .ecri-kpis div:nth-child(2n) { border-right: 0; }
  .ecri-kpis .ecri-kpi-net { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .mth-cal-grid { grid-template-columns: 1fr; }
}


