/* QuantumLab UI. Colour roles follow a validated categorical palette (light + dark steps). */
:root {
  color-scheme: light;
  --bg: #f4f3ef; --panel: #fcfcfb; --raise: #ffffff; --ink: #0b0b0b; --ink-2: #52514e; --muted: #898781;
  --line: #e1e0d9; --axis: #c3c2b7; --ring: rgba(11,11,11,0.10); --wash: rgba(11,11,11,0.04);
  --accent: #2a78d6; --accent-ink: #ffffff; --warn: #fdf3d8; --err: #b42318; --good: #006300;
  /* coverage groups = categorical slots 1-5, fixed order */
  --g-neutral: #2a78d6; --g-critical: #eb6834; --g-supportive: #1baf7a; --g-allegation: #eda100; --g-opinion: #e87ba4;
  /* sequential blue ramp (districts) */
  --s1: #cde2fb; --s2: #9ec5f4; --s3: #6da7ec; --s4: #3987e5; --s5: #256abf; --s6: #184f95; --s7: #0d366b;
  /* diverging tone */
  --neg: #e34948; --pos: #2a78d6; --mid: #d6d5ce; --s-ink-lo: #0b0b0b; --s-ink-hi: #ffffff;
  --shadow: 0 1px 2px rgba(11,11,11,.04), 0 8px 24px -12px rgba(11,11,11,.12);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0d0d0d; --panel: #1a1a19; --raise: #222220; --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
    --line: #2c2c2a; --axis: #383835; --ring: rgba(255,255,255,0.10); --wash: rgba(255,255,255,0.05);
    --accent: #3987e5; --warn: #3a3218; --err: #ff8a7a; --good: #0ca30c;
    --g-neutral: #3987e5; --g-critical: #d95926; --g-supportive: #199e70; --g-allegation: #c98500; --g-opinion: #d55181;
    --s1: #104281; --s2: #184f95; --s3: #1c5cab; --s4: #2a78d6; --s5: #5598e7; --s6: #86b6ef; --s7: #b7d3f6;
    --neg: #e66767; --pos: #3987e5; --mid: #383835; --s-ink-lo: #f0efec; --s-ink-hi: #0b0b0b;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --bg: #0d0d0d; --panel: #1a1a19; --raise: #222220; --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
  --line: #2c2c2a; --axis: #383835; --ring: rgba(255,255,255,0.10); --wash: rgba(255,255,255,0.05);
  --accent: #3987e5; --warn: #3a3218; --err: #ff8a7a; --good: #0ca30c;
  --g-neutral: #3987e5; --g-critical: #d95926; --g-supportive: #199e70; --g-allegation: #c98500; --g-opinion: #d55181;
  --s1: #104281; --s2: #184f95; --s3: #1c5cab; --s4: #2a78d6; --s5: #5598e7; --s6: #86b6ef; --s7: #b7d3f6;
  --neg: #e66767; --pos: #3987e5; --mid: #383835; --s-ink-lo: #f0efec; --s-ink-hi: #0b0b0b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; }

/* ---------- top bar ---------- */
.top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
       padding: 10px 20px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
       border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { font-weight: 650; font-size: 20px; display: flex; align-items: center; gap: 12px; letter-spacing: -.01em; }
.brand small { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; letter-spacing: 0; }
.logo { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; font-size: 21px; flex: none;
        background: linear-gradient(135deg, var(--g-neutral), #6250d6); color: #fff; font-weight: 700; }
nav { display: flex; flex-wrap: wrap; gap: 2px; background: var(--wash); padding: 3px; border-radius: 10px; }
nav button { background: transparent; color: var(--ink-2); border: 0; padding: 6px 12px; border-radius: 8px; font-weight: 500; }
nav button:hover { color: var(--ink); background: var(--wash); }
nav button.active { color: var(--ink); background: var(--panel); box-shadow: 0 0 0 1px var(--ring); }
#who { display: contents; color: var(--ink-2); font-size: 13px; }
/* tool buttons follow the menu; the signed-in name and Sign out wrap to their own line when space runs out */
#who .tools, #who .account { display: flex; align-items: center; gap: 8px; }
/* menu + account controls stay together on the right; when the window is narrow the controls wrap under the menu */
.top-right { flex: 1 1 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: flex-end; }
.top-right nav { flex-wrap: nowrap; }  /* the menu moves below the logo as one bar instead of breaking */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--wash); box-shadow: inset 0 0 0 1px var(--ring); font-size: 12px; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g-supportive); }

main { max-width: 1320px; margin: 0 auto; padding: 20px; }
.card { background: var(--panel); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; min-width: 0;
        box-shadow: 0 0 0 1px var(--ring), var(--shadow); }
.narrow { max-width: 380px; margin: 40px auto; }
h1 { font-size: 22px; margin-top: 0; letter-spacing: -.015em; } h2 { font-size: 14.5px; margin: 0 0 10px; font-weight: 600; } h3 { font-size: 13.5px; margin: 14px 0 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid .card { margin-bottom: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
label.inline { flex-direction: row; align-items: center; gap: 6px; }
input, select, button { font: inherit; }
input:not([type=checkbox]), select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--raise); color: var(--ink); width: 100%; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { padding: 7px 14px; border-radius: 9px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; font-weight: 500; }
button.secondary, button.ghost { background: transparent; color: var(--accent); }
button.small { padding: 2px 9px; font-size: 12px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.filters .cov, .filters .actions, .filters label.inline { grid-column: 1 / -1; }
.cov { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 10px; }
.picked { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.picked:empty { display: none; }
.picked .linkish { padding: 0 0 0 4px; }
.cov div { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li, .result { padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.result a, .list a { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.result a:hover, .list a:hover { text-decoration: underline; }
.meta { font-size: 12px; color: var(--muted); }
/* coverage tags use the group colours; white label except on yellow */
.tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 99px; color: #fff; background: var(--g-neutral); margin-right: 4px; }
.tag.critical { background: var(--g-critical); } .tag.supportive { background: var(--g-supportive); }
.tag.allegation, .tag.fact_check { background: var(--g-allegation); color: #0b0b0b; }
.tag.opinion, .tag.investigative, .tag.satire { background: var(--g-opinion); }
.chip { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line); margin-right: 4px; color: var(--ink-2); }
.day { margin: 18px 0 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bar { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 3px 0; }
.bar span:first-child { width: 150px; flex-shrink: 0; }
.bar i { height: 10px; background: var(--accent); border-radius: 4px; display: block; }
.note { background: var(--warn); padding: 8px 12px; border-radius: 9px; font-size: 13px; }
.note:empty { display: none; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--err); font-size: 13px; min-height: 1em; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { white-space: nowrap; color: var(--ink-2); font-weight: 600; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.scroll { overflow-x: auto; }
pre { white-space: pre-wrap; background: var(--bg); padding: 10px; border-radius: 9px; max-height: 320px; overflow: auto; font-size: 12px; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 10px; z-index: 60; box-shadow: var(--shadow); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }  /* heading kept for screen readers only */

/* ---------- dashboard ---------- */
.dash-head { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; margin: 4px 0 16px; }
.dash-title { font-size: 26px; font-weight: 650; margin: 0; letter-spacing: -.02em; }
.dash-sub { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; background: var(--wash); border-radius: 10px; padding: 3px; box-shadow: inset 0 0 0 1px var(--ring); }
.seg button { border: 0; background: transparent; color: var(--ink-2); padding: 5px 11px; border-radius: 8px; font-size: 13px; }
.seg button:hover { color: var(--ink); }
.seg-sm { padding: 2px; } .seg-sm button { padding: 4px 9px; font-size: 12.5px; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--ring), 0 1px 2px rgba(0,0,0,.06); }
.search { width: 210px !important; border-radius: 10px !important; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 10px; background: var(--wash); border: 0; color: var(--ink-2); font-size: 16px; box-shadow: inset 0 0 0 1px var(--ring); }
.icon-btn:hover { color: var(--ink); }
.icon-btn.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; background: var(--warn); padding: 9px 14px; border-radius: 11px; margin-bottom: 14px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; border-radius: 99px; background: var(--panel); box-shadow: 0 0 0 1px var(--ring); font-size: 12.5px; color: var(--ink); border: 0; }
.fchip b { font-weight: 600; } .fchip .k { color: var(--muted); }
.fchip .x { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--wash); color: var(--ink-2); font-size: 12px; }
.fchip:hover .x { background: var(--ink); color: var(--panel); }
.linkish { background: none; border: 0; color: var(--accent); padding: 4px 6px; font-size: 12.5px; }
.empty { text-align: center; padding: 40px 18px; } .empty .actions { justify-content: center; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--panel); border-radius: var(--radius); padding: 14px 16px 10px; box-shadow: 0 0 0 1px var(--ring), var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .label { font-size: 12.5px; color: var(--ink-2); }
.kpi .value { font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.kpi .value small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.kpi .delta { font-size: 12px; color: var(--ink-2); min-height: 18px; }
.kpi .delta .up { color: var(--good); } .kpi .delta .down { color: var(--err); }
.kpi svg { display: block; width: 100%; height: 34px; margin-top: 4px; overflow: visible; }

.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dash-grid .card { margin: 0; }
.span-8 { grid-column: span 8; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-3 { grid-column: span 3; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.small-t { font-size: 12px; }
.count { font-size: 12px; color: var(--muted); }
.hint { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.sub-h { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin: 18px 0 8px; }

.legend { display: flex; flex-wrap: wrap; gap: 4px; }
.lg { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink-2); padding: 3px 8px; border-radius: 99px; font-size: 12px; font-weight: 500; }
.lg:hover { background: var(--wash); color: var(--ink); }
.lg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.lg.off { opacity: .4; } .lg.on { background: var(--wash); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ring); }
.chart { position: relative; height: 270px; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart text, .kpi text { font: 11px system-ui, sans-serif; fill: var(--muted); }
.hit { fill: transparent; cursor: pointer; }
.hit:hover { fill: var(--wash); }

.feed-card { display: flex; flex-direction: column; contain: size; min-height: 300px; }
.feed { list-style: none; margin: 0 -18px -18px; padding: 0; overflow-y: auto; flex: 1; }
.feed li { padding: 10px 18px; border-top: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.feed li:hover, .feed li:focus-visible { background: var(--wash); outline: none; }
.feed .t { font-size: 13.5px; font-weight: 550; line-height: 1.35; margin: 3px 0 2px; overflow-wrap: anywhere; }
.feed .m { font-size: 11.5px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.feed .g { font-size: 11px; color: var(--ink-2); font-weight: 500; }
.feed-empty { padding: 24px 18px; color: var(--muted); font-size: 13px; }

.trow { display: grid; grid-template-columns: minmax(90px, 1.2fr) 36px minmax(70px, 1.4fr) 56px; gap: 10px; align-items: center; padding: 7px 8px; margin: 0 -8px; border-radius: 9px; cursor: pointer; border: 0; background: none; width: calc(100% + 16px); text-align: left; color: var(--ink); }
.trow:hover { background: var(--wash); }
.trow.sel { background: var(--wash); box-shadow: inset 0 0 0 1px var(--ring); }
.trow .n { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .c { font-size: 12.5px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.mixbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: transparent; }
.mixbar span { display: block; height: 100%; }
.tone { position: relative; height: 8px; border-radius: 4px; background: var(--wash); }
.tone::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--axis); }
.tone i { position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--panel); }
.thead { display: grid; grid-template-columns: minmax(90px, 1.2fr) 36px minmax(70px, 1.4fr) 56px; gap: 10px; font-size: 11px; color: var(--muted); padding: 0 0 4px; }
.thead span:nth-child(2) { text-align: right; }

.dgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.dt { aspect-ratio: 1.15; border-radius: 7px; border: 0; padding: 4px 3px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; font-size: 10px; line-height: 1.1; color: var(--ink); background: var(--wash); cursor: pointer; text-align: left; overflow: hidden; transition: transform .1s; }
.dt:hover { transform: translateY(-1px); box-shadow: 0 0 0 1.5px var(--ink); }
.dt b { font-size: 12px; font-weight: 650; }
.dt.lo { color: var(--s-ink-lo); } .dt.hi { color: var(--s-ink-hi); }
.dt.sel { box-shadow: 0 0 0 2px var(--ink); }
.dt.dim { opacity: .35; }
.ramp { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.ramp .r { display: flex; flex: 1; height: 6px; border-radius: 3px; overflow: hidden; }
.ramp .r span { flex: 1; }

.mix100 { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 4px 0 10px; }
.mix100 span { display: block; height: 100%; }
.mrow { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 8px; align-items: center; width: 100%; padding: 5px 8px; margin: 0 -8px; width: calc(100% + 16px); border: 0; background: none; color: var(--ink); text-align: left; border-radius: 8px; font-size: 13px; cursor: pointer; }
.mrow:hover { background: var(--wash); } .mrow.sel { background: var(--wash); box-shadow: inset 0 0 0 1px var(--ring); }
.mrow i { width: 10px; height: 10px; border-radius: 3px; }
.mrow .c { color: var(--ink-2); font-variant-numeric: tabular-nums; } .mrow .p { color: var(--muted); font-size: 12px; width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; width: calc(100% + 16px); margin: 0 -8px; padding: 5px 8px; border: 0; background: none; color: var(--ink); text-align: left; border-radius: 8px; cursor: pointer; font-size: 12.5px; }
.srow:hover { background: var(--wash); } .srow.sel { background: var(--wash); box-shadow: inset 0 0 0 1px var(--ring); }
.srow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .c { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.srow .b { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--g-neutral); }

.tip { position: fixed; z-index: 70; pointer-events: none; background: var(--raise); color: var(--ink); border-radius: 10px; padding: 9px 11px; font-size: 12px; min-width: 150px; max-width: 280px; box-shadow: 0 0 0 1px var(--ring), 0 12px 32px -8px rgba(0,0,0,.25); }
.tip .h { font-weight: 600; margin-bottom: 5px; }
.tip .r { display: flex; align-items: center; gap: 7px; justify-content: space-between; line-height: 1.6; }
.tip .r span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tip .r b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.tip .f { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); color: var(--muted); }

.drawer-back { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 40; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--panel); z-index: 50; box-shadow: -12px 0 40px -12px rgba(0,0,0,.3); padding: 22px; overflow-y: auto; animation: slide .2s ease-out; }
.drawer h2 { font-size: 18px; line-height: 1.3; margin: 10px 0; letter-spacing: -.01em; }
.drawer .close { position: absolute; top: 14px; right: 14px; }
.drawer dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 13px; margin: 14px 0; }
.drawer dt { color: var(--muted); } .drawer dd { margin: 0; }
.drawer .sum { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.drawer .open { display: inline-block; margin-top: 8px; padding: 8px 14px; border-radius: 9px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 500; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.skeleton { background: linear-gradient(90deg, var(--wash), transparent, var(--wash)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

.demo-pill { display: inline-flex; align-items: center; gap: 2px; margin-left: 10px; padding: 1px 4px 1px 10px; border-radius: 99px; background: var(--warn); color: var(--ink); font-size: 12px; }
.demo-pill .linkish { padding: 1px 6px; font-size: 12px; }

/* ---------- fit-to-screen dashboard (laptop and larger) ----------
   The dashboard fills the window exactly: full width, no page scroll. Lists scroll inside
   their own cards, and charts size to whatever space their card gets. */
@media (min-width: 1101px) and (min-height: 620px) {
  body.on-dash { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  body.on-dash .top { position: static; flex: none; padding: 8px 20px; }
  body.on-dash main { max-width: none; width: 100%; flex: 1; min-height: 0; padding: 12px 20px 10px; }
  body.on-dash #view-dashboard { height: 100%; display: flex; flex-direction: column; min-height: 0; }
  body.on-dash .dash-head { margin: 0 0 10px; align-items: center; flex-wrap: nowrap; }
  body.on-dash .dash-head > div:first-child { min-width: 0; flex: 1; }
  body.on-dash .dash-sub { display: flex; align-items: center; white-space: nowrap; min-width: 0; }
  body.on-dash #dashSub { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  body.on-dash .demo-pill { flex: none; }
  body.on-dash .dash-grid > .card:nth-child(3) { grid-column: span 4; }
  body.on-dash .dash-grid > .card:nth-child(4) { grid-column: span 5; }
  body.on-dash .controls { flex: none; flex-wrap: nowrap; }
  body.on-dash .search { width: 170px !important; }
  body.on-dash .dash-title { font-size: 21px; }
  body.on-dash .chips { margin-bottom: 8px; }
  body.on-dash #dashBody { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  body.on-dash .kpis { gap: 12px; margin-bottom: 12px; flex: none; }
  body.on-dash .kpi { padding: 10px 14px 8px; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
  body.on-dash .kpi .label { flex-basis: 100%; }
  body.on-dash .kpi .value { font-size: 24px; }
  body.on-dash .kpi .delta { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.on-dash .kpi svg { flex-basis: 100%; height: 22px; margin-top: 2px; }
  body.on-dash .dash-grid { flex: 1; min-height: 0; gap: 12px; grid-template-rows: minmax(0, 1.08fr) minmax(0, 1fr); }
  body.on-dash .dash-grid .card { padding: 12px 14px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  body.on-dash .card-head { margin-bottom: 6px; flex: none; }
  body.on-dash .chart-card .chart { flex: 1; min-height: 0; height: auto; }
  body.on-dash .hint { flex: none; margin-top: 2px; }
  body.on-dash .feed-card { contain: none; height: auto; }
  body.on-dash .feed { margin: 0 -14px -12px; }
  body.on-dash .feed li { padding: 8px 14px; }
  body.on-dash #topics, body.on-dash #mixWrap { flex: 1; min-height: 0; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
  body.on-dash .trow { padding: 5px 8px; }
  body.on-dash .dgrid { flex: 1; min-height: 0; grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 3px; }
  body.on-dash .dt { aspect-ratio: auto; min-height: 0; padding: 0 6px; font-size: 10.5px; flex-direction: row; align-items: center; justify-content: space-between; gap: 4px; border-radius: 5px; }
  body.on-dash .dt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  body.on-dash .dt b { font-size: 11px; flex: none; }
  body.on-dash .ramp { margin-top: 6px; flex: none; }
  body.on-dash .sub-h { margin: 10px 0 4px; }
  body.on-dash #dashNote { flex: none; margin: 6px 0 0; font-size: 11px; }
  body.on-dash .empty { margin: auto; }
}
/* Short laptop screens: tighten further. */
@media (min-width: 1101px) and (min-height: 620px) and (max-height: 820px) {
  body.on-dash .kpi svg { display: none; }
  body.on-dash .kpi { padding: 8px 14px; }
  body.on-dash .dash-head { margin-bottom: 8px; }
  body.on-dash .hint { display: none; }
  body.on-dash .dash-grid { grid-template-rows: minmax(0, 1fr) minmax(0, 1.1fr); }
  body.on-dash .ramp { display: none; }
  body.on-dash .thead { display: none; }
  body.on-dash .dash-title { font-size: 19px; }
}

@media (max-width: 1100px) {
  .span-8, .span-4 { grid-column: span 12; } .span-5 { grid-column: span 7; } .span-3 { grid-column: span 5; }
  .feed-card { contain: none; height: 440px; }
  .dgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .dt { aspect-ratio: 2.2; }
}
@media (max-width: 760px) {
  main { padding: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-5, .span-3 { grid-column: span 12; }
  .search { width: auto !important; flex: 1; min-width: 0; } .controls { width: 100%; }
  .brand small { display: none; } .chart { height: 220px; }
  .top-right { min-width: 0; flex-basis: 100%; justify-content: flex-start; } .top-right nav { flex-wrap: wrap; }
  .bar span:first-child { width: 100px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- v0.4: assistant, narratives, social, collections, alerts ---------- */
/* two-row header: tagline under the name, logo sized to the header's height */
@media (max-width: 1500px) { nav button { padding: 6px 9px; } .brand { font-size: 22px; } .logo { width: 50px; height: 50px; border-radius: 13px; font-size: 26px; }
  .brand-text small { display: block; line-height: 1.25; margin: 2px 0 0; font-size: 13.5px; } }
@media (max-width: 760px) { .brand { font-size: 18px; } .logo { width: 32px; height: 32px; border-radius: 9px; font-size: 17px; } .brand-text small { display: none; } }
.bell { position: relative; font-size: 14px; }
.bell b { position: absolute; top: -4px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
          background: var(--g-critical); color: #fff; font-size: 10.5px; line-height: 17px; font-weight: 650; }
.live { font-size: 11.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g-supportive); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } }
.card-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.card-h h2 { margin: 0; }
.row-end { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.drawer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.drawer-actions .open { margin-top: 0; }
.gtag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); }
.gtag .dot, .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.muted.small, p.small { font-size: 12px; }

/* assistant */
.assist { max-width: 980px; margin: 0 auto; }
.ask textarea { width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); resize: vertical; }
.qa .q { font-weight: 650; font-size: 16px; margin-bottom: 2px; }
.qa .prov { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.answer p { margin: 0 0 8px; }
.ref { border: 0; background: var(--wash); box-shadow: inset 0 0 0 1px var(--ring); color: var(--accent); font-size: 11px; font-weight: 650;
       min-width: 19px; height: 18px; padding: 0 5px; border-radius: 6px; margin: 0 2px; vertical-align: 1px; cursor: pointer; }
.srcs { padding-left: 22px; } .srcs li { padding: 6px 8px; border-radius: 8px; transition: background .3s; }
.srcs li.flash { background: color-mix(in srgb, var(--accent) 18%, transparent); }
blockquote { margin: 6px 0 0; padding: 4px 10px; border-left: 3px solid var(--line); color: var(--ink-2); font-size: 13px; }

/* narratives */
.nar-chart { width: 100%; min-height: 220px; } .nar-chart.short { min-height: 180px; }
.nar-chart svg, #socChart svg { display: block; width: 100%; height: auto; }
.nar-chart text, #socChart text { fill: var(--muted); font-size: 11px; }
.moment { padding: 8px 0; border-top: 1px solid var(--line); } .moment .when { font-weight: 600; font-size: 13px; }
.moment ul { margin: 4px 0 0; padding-left: 18px; } .moment li { margin: 2px 0; }
.cmp-row { display: grid; grid-template-columns: minmax(140px, 1.3fr) 60px minmax(160px, 2fr) 90px minmax(160px, 1.6fr); gap: 12px; align-items: center; padding: 9px 0 4px; border-top: 1px solid var(--line); }
.cmp-row.head { border-top: 0; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 0; }
.cmp-row .name { font-weight: 600; }
.mix { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; } .mix span { display: block; height: 100%; }
.tone { position: relative; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--neg), var(--mid) 50%, var(--pos)); }
.tone i { position: absolute; top: -4px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel); }
details.heads { margin: 0 0 6px; font-size: 13px; } details.heads summary { cursor: pointer; color: var(--accent); font-size: 12.5px; }
details.heads ul { margin: 4px 0; padding-left: 18px; }
@media (max-width: 760px) { .cmp-row { grid-template-columns: 1fr 50px; } .cmp-row .mix, .cmp-row .tone { grid-column: 1 / -1; } .cmp-row.head { display: none; } }

/* social */
.soc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.soc-grid .card { margin: 0; }
@media (max-width: 900px) { .soc-grid { grid-template-columns: 1fr; } }
.note-card { background: var(--warn); }
.stance-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 9px; margin-right: 4px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--ring); }
.stance-tag.favourable { color: var(--g-supportive); } .stance-tag.critical { color: var(--g-critical); }
.stance-tag.neutral { color: var(--g-neutral); }
.st-target + .st-target { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.st-split { margin: 4px 0 8px; } .st-ex { font-size: 13px; margin: 3px 0; }
.ev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; margin: 6px 0 4px; }
@media (max-width: 760px) { .ev-grid { grid-template-columns: 1fr; } }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 70px; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.hbar .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar .b i { display: block; height: 8px; border-radius: 0 4px 4px 0; background: var(--s4); }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; }
.posts { list-style: none; padding: 0; margin: 0; } .posts li { padding: 7px 0; border-top: 1px solid var(--line); }
.posts li:first-child { border-top: 0; }
.plat { font-size: 10.5px; font-weight: 650; padding: 1px 6px; border-radius: 5px; background: var(--wash); box-shadow: inset 0 0 0 1px var(--ring); color: var(--ink-2); }

/* collections */
.coll { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 16px; align-items: start; }
.coll .card { margin: 0; }
@media (max-width: 860px) { .coll { grid-template-columns: 1fr; } }
#collForm { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 10px; }
#collForm input[name="name"] { flex: 1 1 100%; }
.coll-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; border: 0; background: transparent;
             color: var(--ink); padding: 8px 10px; border-radius: 9px; font-size: 13.5px; }
.coll-item:hover { background: var(--wash); } .coll-item.on { background: var(--wash); box-shadow: inset 0 0 0 1px var(--ring); }
.coll-item .n { font-weight: 600; } .coll-item .muted { font-size: 12px; }
.entry { padding: 10px 0; border-top: 1px solid var(--line); }
.entry textarea { width: 100%; margin: 6px 0; font: inherit; font-size: 13px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); }

/* alerts */
.emerg { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.emerg span { color: var(--ink-2); }
.alert { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; } .alert.read { opacity: .6; }
.alert ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.alert .kind { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--g-critical); }

/* dialog */
.dlg { border: 0; border-radius: var(--radius); padding: 18px; width: min(440px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--ring); }
.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg h3 { margin-top: 0; } .dlg label { display: block; margin: 8px 0; }
.dlg select, .dlg input, .dlg textarea { width: 100%; font: inherit; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); }
.controls select { width: auto; }
.row > .actions { align-self: end; margin-bottom: 10px; }
.grid { margin-bottom: 16px; }

/* v0.5 live news */
.live-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.live-head h2 { margin-bottom: 2px; }
.live-head .actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
label.switch, .switch { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.switch input { width: auto; margin: 0; accent-color: var(--accent, #4f7cff); }
.small { font-size: 12px; }
.golive:disabled { opacity: .7; cursor: progress; }
.live-head label.switch { margin-bottom: 0; }
.feat-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 0 24px; }
.feat-list li { display: grid; grid-template-columns: 10px 1fr auto; grid-template-areas: "dot name state" ". detail detail"; gap: 2px 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--ring); }
.feat-dot { grid-area: dot; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3, #888); }
.feat-list li.on .feat-dot, .feat-list li.ok .feat-dot { background: var(--good); }
.feat-list li.warn .feat-dot { background: var(--g-allegation); }
.feat-list li.fail .feat-dot { background: var(--err); }
.feat-list li.ok .feat-state { color: var(--good); }
.feat-list li.warn .feat-state { color: var(--g-allegation); }
.feat-list li.fail .feat-state { color: var(--err); font-weight: 600; }
.feat-name { grid-area: name; font-size: 13.5px; }
.feat-state { grid-area: state; font-size: 12px; font-weight: 600; }
.feat-list li.on .feat-state { color: var(--good); }
.feat-list li.off .feat-state { color: var(--ink-2); }
.feat-detail { grid-area: detail; font-size: 12px; }
@media (max-width: 520px) { .feat-list { grid-template-columns: 1fr; } }
.ai-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 12px; }
.ai-pick label { margin: 0; }
.ai-pick select { width: auto; }
.row .grow { grid-column: span 2; } @media (max-width: 640px) { .row .grow { grid-column: auto; } }
/* v0.6 search everywhere */
.gsearch { position: absolute; top: calc(100% + 6px); right: 16px; z-index: 40; display: flex; gap: 6px; width: min(460px, calc(100vw - 32px));
  background: var(--raise); padding: 8px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 0 0 1px var(--ring); }
.gsearch input { flex: 1; margin: 0; }
header.top { position: relative; }
.plat-tabs { display: inline-flex; margin: 0 0 10px; flex-wrap: wrap; }
.plat-tabs[hidden] { display: none; }
.plat { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; margin-right: 6px; background: var(--wash); box-shadow: inset 0 0 0 1px var(--ring); }
/* v0.6 page PDF export */
.page-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.page-tools .page-title { font-size: 22px; margin: 0; letter-spacing: -0.01em; }
.pdf-btn { white-space: nowrap; }
/* v0.6 dates */
.date-range { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date-range label { margin: 0; font-size: 12.5px; }
.date-range input { width: auto; margin: 0; }
.quick-dates { display: flex; flex-direction: column; gap: 4px; justify-content: flex-end; margin-bottom: 10px; }
/* fit the four buttons inside one filter column; wrap instead of sliding under the next box */
.quick-dates .seg { align-self: stretch; display: flex; flex-wrap: wrap; }
.quick-dates .seg button { flex: 1; padding-inline: 4px; }
.web-box { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: -4px 0 12px; font-size: 13px; color: var(--ink-2); }
.quick-dates .seg button { white-space: nowrap; }

/* v0.7 district page */
.dist .back { font-size: 13px; padding: 0; margin-bottom: 4px; }
.dist-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.dist-actions button { white-space: nowrap; }
.dist .dash-grid .card { min-width: 0; }
.dist .feed-card { height: 380px; contain: size; }
.dist .feed a.t { display: block; color: var(--ink); text-decoration: none; }
.dist .feed a.t:hover { text-decoration: underline; }
.hbar.pick { cursor: pointer; border-radius: 8px; padding: 4px 8px; margin: 0 -8px; }
.hbar.pick:hover, .hbar.pick:focus-visible { background: var(--wash); outline: none; }
.hbar.pick.sel { background: var(--wash); box-shadow: inset 0 0 0 1px var(--ring); }
.hbar .v { white-space: nowrap; }
.dist .hbar { grid-template-columns: minmax(80px, 36%) 1fr auto; }
@media (max-width: 1100px) { .dist .dash-grid .span-4, .dist .dash-grid .span-8 { grid-column: span 12; } .dist .feed-card { height: 440px; } }

/* Search everything (find.js) */
.find-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.find-form label { margin-bottom: 0; }
.find-form .grow { flex: 1 1 280px; }
.find-form .seg { align-self: flex-end; }
.src-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.src-chip { font-size: 12px; padding: 2px 9px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); white-space: nowrap; }
.src-chip.wait { color: var(--muted); }
.src-chip.ok { box-shadow: inset 0 0 0 1px var(--good); color: var(--ink); }
.src-chip.err { box-shadow: inset 0 0 0 1px var(--err); }
.src-chip.off { opacity: .55; }
.find-sum { font-weight: 600; margin: 0 0 12px; }
.find-sum:empty { display: none; }
.find-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 16px; align-items: start; }
.find-side { min-width: 0; }
@media (max-width: 900px) { .find-grid { grid-template-columns: minmax(0, 1fr); } }
#glossForm textarea { width: 100%; font: 13px ui-monospace, Menlo, monospace; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); resize: vertical; }
#findNews { max-height: 78vh; overflow-y: auto; }
#findVideos { max-height: 52vh; overflow-y: auto; }
#findSocial { max-height: 26vh; overflow-y: auto; }
/* macOS hides scrollbars until you scroll; keep these visible so it is clear the lists scroll */
#findNews, #findVideos, #findSocial { scrollbar-width: thin; scrollbar-color: var(--muted) transparent; padding-right: 6px; }
#view-find .more { display: block; margin: 12px auto 4px; }
@media (max-width: 900px) { #findNews, #findVideos, #findSocial { max-height: 70vh; } }
#findNewsTabs:empty { display: none; }
#view-find .result > .muted { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* clickable hashtags (Social page, Search results) */
.tag-link { border: 0; background: none; padding: 0 2px; color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer; }
.tag-link:hover { text-decoration: underline; }
.tag-row { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 3px; }

/* Import briefing (openImport): one-page view of an imported document */
#importDetail { padding: 22px; }
.ib-head { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.ib-badge { flex: none; width: 46px; height: 56px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1d3557, #14213d); color: #c4a052; font-weight: 700; font-size: 12px; letter-spacing: .04em; }
.ib-title { min-width: 0; }
.ib-title h2 { margin: 0 0 2px; font: 600 21px/1.3 "Noto Serif", Georgia, serif; overflow-wrap: anywhere; }
.ib-title .muted { margin: 0 0 6px; }
.chip.ib-gold { box-shadow: inset 0 0 0 1px var(--ib-gold); color: var(--ib-gold); }
.ib-details summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.ib-details p { overflow-wrap: anywhere; font-size: 11.5px; }
.ib-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ib-fig { background: var(--raise); border-radius: 10px; padding: 10px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.ib-fig b { display: block; font: 600 22px "Noto Serif", Georgia, serif; color: var(--ink); }
.ib-fig span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ib-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ib-card { background: var(--raise); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.ib-card h3 { margin: 0 0 8px; font: 600 15px "Noto Serif", Georgia, serif; color: var(--ib-gold); }
.ib-card h4 { margin: 10px 0 4px; font-size: 13px; }
.ib-card p { margin: 0 0 8px; overflow-wrap: anywhere; }
.ib-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ib-tag { font-size: 11.5px; padding: 2px 9px; border-radius: 6px; background: var(--wash); color: var(--ink-2); }
.ib-rel { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ib-rel:last-child { border-bottom: 0; }
.ib-rel a { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.ib-rel a:hover { text-decoration: underline; }
.ib-rel .muted { font-size: 11.5px; }
.ib-match { flex: none; height: fit-content; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--wash); color: var(--ink-2); white-space: nowrap; }
.ib-match.close { background: rgba(27, 175, 122, .16); color: #1baf7a; }
.ib-claim { margin: 0 0 8px; padding: 6px 0 6px 12px; border-left: 3px solid #eb6834; font-style: italic; overflow-wrap: anywhere; }
.ib-claim small { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ib-list { margin: 0; padding-left: 18px; }
.ib-text { border-top: 1px dashed var(--line); padding-top: 10px; }
.ib-text summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.ib-text pre { max-height: 50vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 900px) { .ib-grid { grid-template-columns: minmax(0, 1fr); } .ib-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* gold text for the import briefing, chosen per theme to keep at least 4.5:1 contrast */
:root { --ib-gold: #8a6a1f; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --ib-gold: #d4ad55; } }
:root[data-theme="dark"] { --ib-gold: #d4ad55; }
/* Dashboard: pick one day */
.date-pick { width: auto !important; padding: 6px 8px; border-radius: 10px; font-size: 13px; color-scheme: light dark; }
body.on-dash .date-pick { flex: none; }
/* Dashboard: pick one day */
.date-pick { width: auto !important; padding: 6px 8px; border-radius: 10px; font-size: 13px; color-scheme: light dark; }
body.on-dash .date-pick { flex: none; }

/* number boxes inside tables (office limits) */
table input.num { width: 5.5em; display: inline-block; }
