/* Sudarshan — NMF News. 8pt grid. Light + dark via [data-theme]. */
:root {
  --bg: #F4F4F4; --surface: #FFFFFF; --surface-2: #EDEDED; --line: #DADADA; --text: #0A0A0A; --muted: #5A5A5A;
  --accent: #C80015; --accent-ink: #FFFFFF; --accent-soft: #FDE3E6; --strip: #0A0A0A; --strip-text: #FFFFFF; --strip-line: rgba(255,255,255,.18);
  --yet: #3D3D3D; --yet-bg: #E8E8E8; --up: #FFFFFF; --up-bg: #0A0A0A; --over: #B00012; --over-bg: #FDE3E6; --rej: #5A5A5A; --rej-bg: #F0F0F0;
  --st-yet: #8A8A8A; --st-up: #0A0A0A; --st-over: #C80015; --st-rej: #CFCFCF;
  --pos: #0A0A0A; --shadow: 0 12px 40px rgba(10,20,30,.22);
  --fs-h1: clamp(24px, 1.25rem + 1.2vw, 36px); --fs-kpi: clamp(28px, 1.2rem + 1.6vw, 44px); --fs-stat: clamp(22px, 1rem + 1vw, 32px); --fs-body: clamp(14px, .86rem + .18vw, 16px);
  --r: 12px; --tap: 44px; --gap: 16px;
  --font: Inter, "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", "Nirmala UI", Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: #0A0A0A; --surface: #161616; --surface-2: #202020; --line: #2E2E2E; --text: #F5F5F5; --muted: #A3A3A3;
  --accent: #FF3B50; --accent-ink: #0A0A0A; --accent-soft: #3A0F16; --strip: #0A0A0A; --strip-text: #FFFFFF; --strip-line: rgba(255,59,80,.45);
  --yet: #D6D6D6; --yet-bg: #2A2A2A; --up: #0A0A0A; --up-bg: #F5F5F5; --over: #FF6B79; --over-bg: #3A0F16; --rej: #A3A3A3; --rej-bg: #202020;
  --st-yet: #8A8A8A; --st-up: #F5F5F5; --st-over: #FF3B50; --st-rej: #4A4A4A;
  --pos: #F5F5F5; --shadow: 0 12px 40px rgba(0,0,0,.6);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-body)/1.5 var(--font); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
html[lang="hi"] body { line-height: 1.7; }
body.lock { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, .kpi-v, .stat b, .dn, .post-m dd { font-variant-numeric: tabular-nums; white-space: nowrap; } .kpi-d { font-variant-numeric: tabular-nums; align-items: flex-start; } .kpi-d .ico { margin-top: 3px; }
.page-head h1, .post-title, .row-t, .panel h2 { overflow-wrap: anywhere; } .post-main, .page-head > div { min-width: 0; }
@media (min-width: 1500px) { .page { max-width: 1440px; } }
@media (max-width: 899px) { .top { flex-wrap: wrap; backdrop-filter: none; background: var(--bg); } .tools { flex-wrap: wrap; justify-content: flex-end; } }
@media (max-width: 899px) { .stats { gap: 12px; } .post-m { grid-template-columns: repeat(3, 1fr); row-gap: 8px; } }
.muted { color: var(--muted); }
table.sr-only { display: block; } .sr-only { position: absolute !important; left: 0; top: 0; max-width: 1px; max-height: 1px; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ico { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; } .ico svg { width: 100%; height: 100%; }

/* ---- shell ---- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.skip { position: absolute; left: 8px; top: -64px; background: var(--accent); color: var(--accent-ink); padding: 12px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.side { position: sticky; top: 0; height: 100vh; padding: 24px 16px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--accent); }
.brand b { display: block; font-size: 19px; letter-spacing: -.01em; color: var(--text); line-height: 1.5; }
.brand small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.mark { width: 36px; height: 36px; flex: none; } .mark svg { width: 100%; height: 100%; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 12px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--muted); position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.col { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 12px 32px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-brand { display: none; margin-right: auto; }
.tools { display: flex; align-items: center; gap: 8px; }
.who { display: flex; flex-direction: column; line-height: 1.5; padding-left: 8px; font-size: 13px; } .who small { color: var(--muted); font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: var(--surface); }
.seg-b { min-height: calc(var(--tap) - 8px); min-width: 44px; padding: 0 12px; border: 0; background: none; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg-b[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg-b:not([aria-pressed="true"]):hover { background: var(--surface-2); color: var(--text); }
.btn-ico { width: var(--tap); height: var(--tap); display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; }
.btn-ico:hover { background: var(--surface-2); } .btn-ico.txt { width: auto; padding: 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 13px; }
.btn.on-dark { background: #fff; color: #0A0A0A; border-color: #fff; } [data-theme="dark"] .btn.on-dark { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-link { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 700; min-height: var(--tap); padding: 0 8px; } .btn-link.x { text-decoration: none; }
.page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 32px 64px; }
main:focus { outline: none; } h1:focus { outline: none; }

/* ---- page head ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
h1 { font-size: var(--fs-h1); line-height: 1.2; font-weight: 800; letter-spacing: -.025em; }
html[lang="hi"] h1 { line-height: 1.5; letter-spacing: 0; }
.page-head p { margin-top: 4px; } .today { color: var(--muted); font-weight: 500; white-space: nowrap; font-size: 14px; }

/* ---- due strip: the one loud thing ---- */
.due { background: var(--strip); color: var(--strip-text); border-radius: var(--r); border: 1px solid var(--strip-line); margin-bottom: var(--gap); position: relative; overflow: hidden; }
.due-in { padding: 16px 24px; position: relative; z-index: 1; }
.due h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.due .count { background: #fff; color: #0A0A0A; border-radius: 999px; padding: 0 8px; font-size: 13px; line-height: 22px; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .due .count { background: var(--accent); color: var(--accent-ink); }
.due-none { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.due-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.due-list li { flex: 0 0 min(320px, 82%); scroll-snap-align: start; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--strip-line); border-radius: 10px; padding: 12px; background: rgba(255,255,255,.06); }
.due-t { min-width: 0; display: flex; flex-direction: column; } .due-t .tt { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .due-t small { opacity: .8; }
.due :focus-visible { outline-color: #fff; }
[data-theme="dark"] .due :focus-visible { outline-color: var(--accent); }

/* ---- kpis ---- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; min-height: 112px; transition: border-color .15s, transform .15s; }
a.kpi:hover { border-color: var(--accent); } a.kpi:active { transform: scale(.985); }
.kpi-l { color: var(--muted); font-weight: 600; font-size: 14px; }
.kpi-v { font-size: var(--fs-kpi); line-height: 1.15; font-weight: 800; letter-spacing: -.03em; }
.kpi-d { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text); font-weight: 500; } .kpi-d.flat { color: var(--muted); }
.kpi-d .ico { width: 14px; height: 14px; }

/* ---- cards / grid ---- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.span-1 { grid-column: span 1; } .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-9 { grid-column: span 9; } .span-10 { grid-column: span 10; } .span-11 { grid-column: span 11; } .span-12 { grid-column: span 12; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; min-width: 0; }
.whead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.whead h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.more { color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); } .more:hover { text-decoration: underline; }
.sub { margin-bottom: 8px; font-size: 13px; }
.whead .seg { margin-left: auto; }

/* ---- skeleton / empty / error ---- */
.skel { display: grid; gap: 12px; padding: 4px 0; } .skel i { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; }
.due .skel i { background: rgba(255,255,255,.14); }
@media (prefers-reduced-motion: no-preference) { .skel i { animation: sh 1.3s linear infinite; } @keyframes sh { to { background-position: -200% 0; } } }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
.empty.err { color: var(--over); border-style: solid; background: var(--over-bg); border-color: transparent; align-items: flex-start; } .empty.err small { display: block; opacity: .85; }
.empty .btn { color: var(--text); }

/* ---- pills & badges ---- */
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 12px 2px 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill .ico { width: 14px; height: 14px; }
.pill-yet { color: var(--yet); background: var(--yet-bg); } .pill-up { color: var(--up); background: var(--up-bg); } .pill-over { color: var(--over); background: var(--over-bg); } .pill-rej { color: var(--rej); background: var(--rej-bg); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; } .badge .ico { width: 13px; height: 13px; }
.badge.stale { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pf { display: inline-flex; flex: none; line-height: 0; } .pf svg { border-radius: 6px; }

/* ---- charts ---- */
.chart-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
svg.bars { width: 100%; min-width: 0; max-width: 100%; height: auto; display: block; }
@media (max-width: 380px) { .due-list li { flex-direction: column; align-items: stretch; } .due-list li .btn { width: 100%; } } svg.line .ax { font-size: 14px; }
svg .grid { stroke: var(--line); stroke-width: 1; } svg .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
svg .hit { fill: transparent; } svg .hit:hover, svg .hit:focus { fill: rgba(128,140,150,.16); outline: none; } svg .hit:focus-visible { stroke: var(--accent); stroke-width: 2; }
svg .pt { opacity: 0; } svg .pt:hover, svg .pt:focus { opacity: 1; outline: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 13px; color: var(--muted); } .legend li { display: flex; align-items: center; gap: 8px; }
.legend i, .dlegend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; } .donut { width: 168px; height: 168px; flex: none; }
.slice { transition: stroke-width .15s; outline: none; } .slice:hover, .slice:focus-visible { stroke-width: 27; } .slice.click { cursor: pointer; } .slice:focus-visible { filter: drop-shadow(0 0 3px var(--text)); }
.dn { font-size: 26px; font-weight: 800; fill: var(--text); } .dl { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.dlegend { width: 100%; display: grid; gap: 0; } .lg-btn { width: 100%; display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 8px; background: none; border: 0; border-radius: 8px; text-align: left; }
button.lg-btn:hover { background: var(--surface-2); } .lg-btn .lb { flex: 1; font-weight: 500; } .lg-btn small { width: 40px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.tip { position: fixed; z-index: 200; display: none; pointer-events: none; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow); max-width: 240px; }
.tip b { display: block; margin-bottom: 4px; } .tip div { display: flex; align-items: center; gap: 8px; } .tip i { width: 8px; height: 8px; border-radius: 2px; } .tip em { margin-left: auto; padding-left: 12px; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- performance ---- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px; background: none; border: 0; border-bottom: 3px solid transparent; font-weight: 600; color: var(--muted); white-space: nowrap; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); } .tabs button:hover { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; } .stat > span { color: var(--muted); font-size: 13px; font-weight: 600; } .stat b { font-size: var(--fs-stat); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.nodata { color: var(--muted); }
.cover { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.cover-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); margin: 12px 0 8px; overflow: hidden; } .meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.warn { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--yet); font-weight: 500; } .warn .ico { margin-top: 3px; }

/* ---- top posts ---- */
.posts { display: grid; }
.post { display: grid; grid-template-columns: 24px 88px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); } .post:first-child { border-top: 0; }
.rank { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.thumb { position: relative; width: 88px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--pc) 22%, var(--surface-2)); }
.thumb:not(:has(img)) .thumb-pf { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .thumb-pf { position: absolute; left: 4px; bottom: 4px; }
.post-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.post-title { padding: 0; min-height: 24px; background: none; border: 0; font-weight: 600; text-align: left; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .post-title:hover { color: var(--accent); text-decoration: underline; }
.post-m { display: grid; grid-auto-flow: column; gap: 24px; } .post-m dt { font-size: 12px; color: var(--muted); } .post-m dd { font-weight: 700; font-variant-numeric: tabular-nums; } .post-m dd.pos { color: var(--pos); }

/* ---- rows ---- */
.rows li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); } .rows li:first-child { border-top: 0; padding-top: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .row-t { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .row-t:hover { color: var(--accent); text-decoration: underline; }
.row-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- layers, toasts ---- */
.layer { position: fixed; inset: 0; z-index: 90; background: rgba(8,12,16,.5); display: flex; }
.layer.drawer { justify-content: flex-end; } .layer.modal { align-items: center; justify-content: center; padding: 16px; }
.panel { background: var(--surface); color: var(--text); display: flex; flex-direction: column; box-shadow: var(--shadow); max-height: 100%; }
.drawer .panel { width: min(520px, 100%); height: 100%; border-left: 1px solid var(--line); } .modal .panel { width: min(560px, 100%); border-radius: var(--r); border: 1px solid var(--line); }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); } .panel h2 { font-size: 18px; }
.panel-body { padding: 24px; overflow: auto; }
#toasts { position: fixed; z-index: 300; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 8px; background: var(--text); color: var(--bg); padding: 4px 8px 4px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 480px; } .toast span { padding: 8px 0; }
.toast .btn-link { color: inherit; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: up .2s ease-out; } .drawer .panel { animation: in .2s ease-out; } @keyframes up { from { opacity: 0; transform: translateY(8px); } } @keyframes in { from { transform: translateX(24px); opacity: 0; } } }

/* ---- tablet / mobile ---- */
@media (max-width: 1100px) { .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11 { grid-column: span 12; } .donut-wrap { flex-direction: row; justify-content: center; flex-wrap: wrap; } .dlegend { width: 280px; } }
@media (max-width: 899px) {
  .app { display: block; } .side { position: fixed; z-index: 40; inset: auto 0 0 0; top: auto; height: auto; flex-direction: row; padding: 0 0 env(safe-area-inset-bottom); border: 0; border-top: 1px solid var(--line); gap: 0; }
  .side .brand { display: none; } .nav { flex-direction: row; width: 100%; gap: 0; } .nav a { flex: 1; flex-direction: column; justify-content: center; gap: 2px; min-height: 60px; padding: 0 2px; font-size: 12px; border-radius: 0; text-align: center; }
  .nav a[aria-current="page"]::before { left: 20%; right: 20%; top: 0; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .top { padding: 8px 16px; gap: 8px; } .top-brand { display: block; } .top-brand small { display: none; } .who { display: none; }
  .top .submit-btn { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 45; box-shadow: var(--shadow); border-radius: 999px; padding: 0 20px; }
  .page { padding: 16px 16px 160px; } .page-head { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .kpi { padding: 16px; min-height: 104px; } .kpi-d { font-size: 12px; }
  .card { padding: 16px; } .due-in { padding: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post { grid-template-columns: 72px minmax(0, 1fr); gap: 8px 12px; } .rank { display: none; } .thumb { width: 72px; } .post-m, .post > .btn { grid-column: 1 / -1; } .post-m { gap: 16px; grid-auto-flow: row; grid-template-columns: repeat(5, auto); justify-content: space-between; } .post > .btn { justify-self: start; }
  .rows li { flex-wrap: wrap; } #toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
/* tap targets + readable rows on touch widths */
@media (max-width: 899px) {
  .seg-b, .btn.sm, .brand, .tabs button { min-height: var(--tap); } .seg-b { min-width: var(--tap); }
  button.fw-lk, a.fw-lk, button.post-title, .row-t, .row-main, .btn-link { min-height: var(--tap); display: inline-flex; align-items: center; }
  .row-main { display: flex; align-items: flex-start; justify-content: center; } .row-main small { white-space: normal; }
  .rows li { align-items: center; } .row-main { flex: 1 1 100%; } .rows .row-t { white-space: normal; }
  label:has(> input[type=checkbox]) { display: flex; align-items: center; gap: 12px; min-height: var(--tap); }
  td > a, li > a, td > button { display: inline-flex; align-items: center; min-height: var(--tap); }
  input.sw, .sw input { min-height: var(--tap); }
  .pager button, .pager a { min-height: var(--tap); }
}
@media (max-width: 380px) { .top-brand b { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .side, .top, #toasts { display: none; } .app { display: block; } }
@media (max-width: 899px) { .nav a { min-width: 0; } .nav a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
@media (max-width: 360px) { .nav a { font-size: 11px; } .tools { gap: 4px; } .seg-b { padding: 0 8px; } .btn-ico { min-width: 44px; min-height: 44px; } .btn-ico.txt { min-width: 44px; min-height: 44px; padding: 0 6px; } .page { padding-left: 12px; padding-right: 12px; } }
/* pages inject .kpis.k3/.k5 with plain 1fr (min-content blowout); fluid override */
.page .kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .page .kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .page .kpis.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .page .kpis.k3, .page .kpis.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-v { overflow-wrap: normal; }
@media (max-width: 899px) { .post-m { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; justify-content: stretch; } }
@media (max-width: 899px) { .top { backdrop-filter: none; background: var(--bg); } } /* backdrop-filter would make the fixed Submit button anchor to the header */

/* ---- admin command center ---- */
.admin-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
@media (max-width: 1200px) { .admin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* phones: KPI cards stay two per row and compact (was one per row: ~8 screens of scrolling) */
@media (max-width: 480px) {
  .admin-grid, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .kpi { padding: 12px 14px; min-height: 0; gap: 2px; } .kpi-l { font-size: 13px; } .kpi-v { font-size: 26px; } .kpi-d { font-size: 12px; }
}
/* quiet button for secondary actions */
.btn.ghost { background: transparent; border-color: transparent; color: var(--text); } .btn.ghost:hover { border-color: var(--line); }
/* collapsible "more insights" section */
.more-sec { margin-top: var(--gap); }
.more-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); padding: 12px 16px; list-style: none; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-weight: 600; color: var(--text); }
.more-sum::-webkit-details-marker { display: none; }
.more-sum:hover { border-color: var(--accent); } .more-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.more-sum .ico { transition: transform .2s; } .more-sec[open] > .more-sum .ico { transform: rotate(180deg); }
.more-sec[open] > .grid { margin-top: var(--gap); }
@media (prefers-reduced-motion: reduce) { .more-sum .ico { transition: none; } }
.kpi.alert-card { border-color: rgba(200,0,21,.3); background: color-mix(in srgb, var(--surface) 92%, var(--accent-soft)); }
.kpi.alert-card b { color: var(--accent); }
.state-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.state-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; transition: border-color .15s, transform .15s; }
.state-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.state-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.state-code { font-weight: 800; font-size: 13px; color: var(--accent); }
.state-name { font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-stat { font-size: 16px; font-weight: 800; }
.state-meta { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; }
.ct-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 12px; }
.ct-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface-2); border-radius: 8px; font-size: 13px; font-weight: 600; }
.ct-item b { font-variant-numeric: tabular-nums; }
.health-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.health-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; }
.dot-green { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 6px rgba(22,163,74,.6); }
.dot-amber { width: 8px; height: 8px; border-radius: 50%; background: #d97706; box-shadow: 0 0 6px rgba(217,119,6,.6); }
.dot-pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(1.15); } }
.review-actions { display: flex; align-items: center; gap: 6px; }
.btn-approve { background: #16a34a; color: #fff; border: 0; min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-approve:hover { filter: brightness(1.1); }
.btn-reject { background: var(--surface-2); color: var(--over); border: 1px solid var(--line); min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-reject:hover { background: var(--over-bg); border-color: var(--over); }
.nudge-btn { background: var(--accent-soft); color: var(--accent); border: 1px solid transparent; min-height: 34px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.nudge-btn:hover { border-color: var(--accent); }

/* ---- shared form/table/layout (from login.js useCss + submit.js ensureCss) ---- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span, .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.in { min-height: var(--tap); padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; width: 100%; }
.in:hover { border-color: var(--muted); }
textarea.in { padding: 10px 12px; min-height: 88px; }
.in[aria-invalid=true] { border-color: var(--over); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 16px; }
.toolbar .field { flex: 1 1 150px; }
.toolbar .grow { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; }
.note { font-size: 13px; color: var(--muted); }
.msg-err { color: var(--over); font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; background: var(--over-bg); padding: 10px 12px; border-radius: 10px; }
.banner { display: flex; gap: 12px; align-items: flex-start; background: var(--yet-bg); color: var(--yet); border-radius: var(--r); padding: 12px 16px; margin-bottom: var(--gap); font-weight: 600; }
.banner .ico { margin-top: 3px; }
.banner.bad { background: var(--over-bg); color: var(--over); }
.sw { display: flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; }
.sw input { width: 44px; height: 26px; appearance: none; border-radius: 13px; background: var(--line); position: relative; cursor: pointer; flex: none; border: 1px solid var(--muted); transition: background .15s; }
.sw input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.sw input:checked { background: var(--accent); border-color: var(--accent); }
.sw input:checked::after { transform: translateX(18px); background: var(--accent-ink); }
.sw input:disabled { opacity: .5; cursor: not-allowed; }
.stack { display: grid; gap: var(--gap); }
.row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.row.sp { justify-content: space-between; }
.tbl-w { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.r { text-align: right; }
.tbl th button { background: none; border: 0; font: inherit; font-weight: 700; color: inherit; min-height: var(--tap); padding: 0 4px; text-decoration: underline dotted; }
.tbl th[aria-sort] button { color: var(--text); }
@media (max-width: 640px) {
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
  .tbl td { border: 0; display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; text-align: right; }
  .tbl td::before { content: attr(data-label); color: var(--muted); font-weight: 600; font-size: 13px; text-align: left; }
  .tbl td.r { text-align: right; }
  .tbl td.first { font-weight: 700; text-align: left; }
  .tbl td.first::before { display: none; }
}
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0,5fr) minmax(0,6fr); }
.auth-art { background: var(--strip); color: var(--strip-text); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 36px dotted var(--strip-line); opacity: .6; }
.auth-art .mark { display: block; width: 56px; height: 56px; color: var(--strip-text); }
.auth-art h1 { font-size: 44px; line-height: 1.15; }
.auth-art p { max-width: 34ch; opacity: .88; margin-top: 12px; font-size: 17px; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px; max-width: 520px; width: 100%; margin: 0 auto; }
.auth-form h2 { font-size: 26px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.02em; }
.auth-top { display: flex; justify-content: flex-end; margin-bottom: 32px; }
.auth-form form { display: grid; gap: 16px; margin-top: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip small { color: var(--muted); font-weight: 500; }
@media (max-width: 899px) {
  .auth-art::after { display: none; }
  .auth { display: block; }
  .auth-art { padding: 24px; gap: 12px; }
  .auth-art h1 { font-size: 28px; }
  .auth-art p { font-size: 15px; margin-top: 4px; }
  .auth-form { padding: 24px 16px 48px; }
  .auth-top { margin-bottom: 16px; }
}
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 2px 10px 2px 8px; border-radius: 999px; }
.tag .ico { width: 14px; height: 14px; }
.tag.ok { background: var(--up-bg); color: var(--up); }
.tag.expiring { background: var(--yet-bg); color: var(--yet); }
.tag.expired { background: var(--over-bg); color: var(--over); }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.unread { font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---- submit.js shared (fw-*) ---- */
.tabs { scrollbar-width: none; }
.tabs.more { -webkit-mask-image: linear-gradient(90deg,#000 calc(100% - 36px),transparent); mask-image: linear-gradient(90deg,#000 calc(100% - 36px),transparent); }
.fw-chart { max-width: 100%; overflow: hidden; }
.fw-chart svg { max-width: 100%; height: auto; }
.fw-f { display: grid; gap: 6px; margin-bottom: 16px; }
.fw-f > label, .fw-f > .lbl { font-weight: 600; font-size: 14px; }
.fw-in { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
textarea.fw-in { min-height: 120px; resize: vertical; line-height: 1.5; }
.fw-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.fw-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.fw-bar .fw-in { width: auto; flex: 1 1 220px; max-width: 360px; }
.fw-sp { margin-left: auto; }
.fw-tbl-w { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fw-tbl { width: 100%; border-collapse: collapse; }
.fw-tbl th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.fw-tbl td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.fw-tbl tbody tr:first-child td { border-top: 0; }
.fw-tbl tbody tr { cursor: pointer; }
.fw-tbl tbody tr:hover { background: var(--surface-2); }
.fw-lk { background: none; border: 0; padding: 0; min-height: 24px; font-weight: 600; text-align: left; color: var(--text); }
.fw-lk:hover { color: var(--accent); text-decoration: underline; }
.fw-sub { display: block; font-size: 12px; color: var(--muted); }
.fw-pager { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 16px; color: var(--muted); font-size: 14px; }
.fw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.fw-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); }
.fw-list { display: grid; gap: 8px; margin: 8px 0 16px; }
.fw-item { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.fw-item > div { min-width: 0; flex: 1; }
.fw-item b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-item small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-flag { color: var(--yet); font-weight: 600; }
.fw-bad { color: var(--over); font-weight: 600; }
.fw-thumb { width: 96px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; display: block; }
.fw-thumb-icon { display: grid; place-items: center; background: color-mix(in srgb, var(--pc) 22%, var(--surface-2)); }
.fw-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.fw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.fw-cards.list { grid-template-columns: 1fr; }
.fw-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; min-width: 0; }
a.fw-card:hover { border-color: var(--accent); }
.fw-card h2 { font-size: 17px; line-height: 1.5; }
.fw-card .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fw-card dl { display: flex; gap: 24px; margin-top: auto; }
.fw-card dt { font-size: 12px; color: var(--muted); }
.fw-card dd { font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.fw-cards.list .fw-card { flex-direction: row; align-items: center; flex-wrap: wrap; }
.fw-cards.list .fw-card h2 { flex: 1 1 220px; }
.fw-cards.list dl { margin: 0; }
.fw-m { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0; }
.fw-m div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.fw-m dt { font-size: 12px; color: var(--muted); }
.fw-m dd { font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.fw-m small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.fw-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 16px 0; }
.fw-kv dt { color: var(--muted); }
.fw-kv dd { min-width: 0; overflow-wrap: anywhere; }
.fw-chk { display: grid; gap: 4px; max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.fw-chk label { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 500; }
.fw-chk input { width: 20px; height: 20px; }
.fw-steps { display: flex; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.fw-steps b { color: var(--text); }
.fw-brief { white-space: pre-wrap; line-height: 1.6; }
.fw-err { color: var(--over); font-weight: 600; margin: 8px 0; }
.fw-sum { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 12px 0; }
.fw-sum ul { margin-top: 8px; font-size: 13px; display: grid; gap: 4px; overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .fw-lk, .btn.sm, .tabs [role=tab], a.more, .fw-kv dd a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 700px) {
  .fw-tbl thead { display: none; }
  .fw-tbl tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
  .fw-tbl td { display: block; padding: 0; border: 0; }
  .fw-tbl td:first-child { grid-column: 1 / -1; }
}

/* ---- responsive grid collapse ---- */
@media (max-width: 899px) {
  .grid { grid-template-columns: 1fr; }
  .grid > [class*="span-"] { grid-column: 1 / -1 !important; }
}

/* ---- state filter pills ---- */
.state-strip {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 6px 2px 14px !important;
  margin: 6px 0 16px !important;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.state-pill {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  transition: all .15s ease !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}
.state-pill:hover {
  background: var(--surface-2) !important;
  border-color: var(--muted) !important;
}
.state-pill[aria-pressed="true"] {
  /* darkened so white text passes 4.5:1 in both themes (plain dark-theme accent was 3.5:1) */
  background: color-mix(in srgb, var(--accent) 78%, #000) !important;
  color: #fff !important;
  border-color: color-mix(in srgb, var(--accent) 78%, #000) !important;
  box-shadow: 0 2px 8px rgba(200, 0, 21, 0.25) !important;
}
.state-pill .pill-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  height: 20px !important;
  min-width: 20px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: var(--surface-2) !important;
  color: var(--muted) !important;
}
.state-pill[aria-pressed="true"] .pill-count {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #fff !important;
}

/* ---- admin: insights + people ---- */
.ins-bar { display: flex; flex-direction: column; gap: 12px; padding: 16px; } .ins-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; } .ins-sel > .field { flex: 1 1 160px; }
.ins-sum { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; } .ins-sum p { margin: 0; }
.ins-mapwrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; } .ins-map { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.ins-tile { aspect-ratio: 1; min-height: 32px; border: 1px solid var(--line); border-radius: 6px; font: 700 12px var(--font); cursor: pointer; padding: 0; } .ins-tile.sel, .ins-tile:focus-visible { outline: 3px solid var(--text); outline-offset: 1px; }
.ins-info { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; min-height: 48px; font-size: 14px; } .ins-scale { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); } .ins-scale i { flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2), var(--accent)); }
.ins-top { list-style: none; margin: 0; padding: 0; } .ins-top li { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.ins-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; } .ins-ct { width: 100%; text-align: left; display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; min-height: var(--tap); } .ins-ct small { grid-column: 2 / 4; color: var(--muted); }
.ins-hb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; } .ins-hb li { display: flex; align-items: center; gap: 12px; } .ins-hb .row-main { position: relative; } .ins-fill { display: block; height: 8px; border-radius: 4px; background: var(--accent); margin-top: 4px; }
.ins-heat td { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; } .ins-heat th.first { white-space: nowrap; }
.ins-chips { display: flex; flex-wrap: wrap; gap: 8px; } .chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 13px; } .ins-gap { margin-bottom: 16px; }
.pp-teams { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; } .pp-chk { display: flex; align-items: center; gap: 10px; min-height: var(--tap); } .pp-chk input { width: 22px; height: 22px; }
.pp-temp { display: block; padding: 16px; font-size: 20px; letter-spacing: .05em; background: var(--surface-2); border-radius: 10px; user-select: all; word-break: break-all; } .pp-filters .in { flex: 1 1 180px; }
@media (max-width: 899px) { .ins-mapwrap { grid-template-columns: 1fr; } }

/* ---- QA fixes: phone legibility ---- */
.state-pill .pill-count { font-size: 12px !important; }
@media (max-width: 768px) { .state-pill { height: var(--tap) !important; min-height: var(--tap) !important; max-height: none !important; } }
@media (max-width: 640px) { svg.bars { min-width: 640px; } svg.bars .ax, .dl { font-size: 12px; } } /* charts scroll sideways inside their card instead of shrinking the labels */
.ins-bar .seg { flex-wrap: wrap; max-width: 100%; }
.ins-bar .field { min-width: 0; } .ins-bar .in { max-width: 100%; }
@media (max-width: 768px) {
  .ins-mapwrap > div:first-child { overflow-x: auto; } .ins-map { min-width: 460px; } .ins-tile { min-height: var(--tap); }
  .btn-approve, .btn-reject, .nudge-btn { min-height: var(--tap); } .badge, small.muted, .state-meta { font-size: 12px; }
  .tbl td .btn.sm { min-width: var(--tap); }
}
.tbl th button { min-width: var(--tap); min-height: var(--tap); }
.pp-links { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; } .pp-links a { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.pp-warn { display: flex; align-items: center; gap: 6px; color: var(--over); }
.np-note { margin: 0 0 16px; font-size: 14px; } .np-note summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; } .np-note ul { margin: 0 0 4px; padding-left: 24px; } .np-note li { margin: 4px 0; }
/* reports: long campaign table shows 5 rows until "Show all" */
.tbl:not(.all) tr.extra { display: none; }
/* reports filters: two fields per row on phones instead of one tall column */
@media (max-width: 480px) {
  form.toolbar { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  form.toolbar > :last-child { grid-column: 1 / -1; }
}
/* phones: table rows become compact two-column cards (label/value pairs side by side) */
@media (max-width: 480px) {
  table.tbl tbody tr:not(.extra), table.tbl.all tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .tbl td { font-size: 13px; padding: 4px 0; }
  .tbl td.first { grid-column: 1 / -1; padding-bottom: 6px; }
}
/* insights: "More filters" disclosure inside the filter bar */
.ins-more > summary { list-style: none; cursor: pointer; width: fit-content; }
.ins-more > summary::-webkit-details-marker { display: none; }
.ins-more > summary .ico { transition: transform .2s; } .ins-more[open] > summary .ico { transform: rotate(180deg); }
.ins-more[open] > .ins-row { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .ins-more > summary .ico { transition: none; } }
