/* Layout: one column of cards on a quiet ground; figures in a mono face so columns line up. */
:root {
  --bg: #f3f5f4; --panel: #ffffff; --fg: #17201c; --muted: #5b6862; --line: #dbe2de;
  --ie: #1f7a5c; --gb: #3d5fa8; --accent: #1f7a5c; --track: #e6ece9;
  --ok: #1f7a5c; --warn: #b26a00; --bad: #b3261e;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111614; --panel: #18201d; --fg: #e4ebe7; --muted: #95a39c; --line: #2a3530;
    --ie: #4cb88f; --gb: #7f9de0; --accent: #4cb88f; --track: #24302b; --ok: #4cb88f; --warn: #e3a440; --bad: #ef7d74; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); display: grid; gap: 20px; }
[hidden] { display: none !important; }
main { display: grid; gap: 20px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.mark { width: 14px; height: 14px; border-radius: 3px; background: linear-gradient(90deg, var(--ie) 50%, var(--gb) 50%); }
.who { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; }
button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; color: var(--accent); padding: 0; text-decoration: underline; }
h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 500; margin: 0; text-wrap: balance; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.muted { color: var(--muted); }
.lede { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.lede b { color: var(--fg); font-weight: 600; font-family: var(--mono); font-size: 14px; }
.status { margin-top: 12px; display: inline-flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-size: 14px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.tile, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; min-width: 0; }
.tile h2 { font-size: 13px; font-weight: 500; color: var(--muted); }
.tile p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.big { display: block; font-family: var(--mono); font-weight: 500; font-size: 30px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.split { position: relative; display: flex; height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.split .ie { background: var(--ie); } .split .gb { background: var(--gb); }
.split .target { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fg); opacity: .6; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.note { margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.funnel { display: grid; gap: 8px; }
.frow { display: grid; grid-template-columns: minmax(0, 12rem) 1fr 4.5rem; gap: 10px; align-items: center; font-size: 13px; }
.ftrack { height: 18px; background: var(--track); border-radius: 3px; overflow: hidden; }
.fbar { height: 100%; background: var(--accent); border-radius: 3px; min-width: 2px; }
.fbar.zero { min-width: 0; }
.frow .n, td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend .ie { background: var(--ie); } .legend .gb { background: var(--gb); }
.chart { position: relative; min-height: 222px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { font: 11px var(--mono); fill: var(--muted); }
.chart .grid-line { stroke: var(--line); }
.chart .ie { fill: var(--ie); } .chart .gb { fill: var(--gb); }
.chart .hit:hover { fill: var(--fg); fill-opacity: .06; }
.tip { position: absolute; top: 0; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 16px rgb(0 0 0 / .12); padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.tip .when { color: var(--muted); }
.bars { display: grid; gap: 6px; }
.brow { display: grid; grid-template-columns: minmax(0, 10rem) 1fr 3.5rem; gap: 10px; align-items: center; font-size: 13px; }
.brow .btrack { height: 14px; }
.brow .bbar { height: 100%; background: var(--ie); border-radius: 2px; }
.brow .bbar.unknown { background: var(--muted); opacity: .45; }
.brow .n { text-align: right; font-family: var(--mono); }
.tablebox { overflow: auto; max-height: 30rem; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); white-space: nowrap; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td a { color: var(--accent); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: currentColor; } .pill.bad { color: var(--bad); border-color: currentColor; } .pill.warn { color: var(--warn); border-color: currentColor; }
.empty { color: var(--muted); margin: 0; }
.foot { font-size: 12px; margin: 0; }
.login { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 28px; max-width: 440px; display: grid; gap: 10px; }
.login form { display: grid; gap: 8px; margin-top: 6px; }
.login label { font-size: 13px; color: var(--muted); }
.login input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.login button { padding: 10px 14px; border-radius: 6px; border: 0; background: var(--accent); color: #fff; font-weight: 500; }
.login button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .wide { display: none; } .frow { grid-template-columns: minmax(0, 8rem) 1fr 3.5rem; } }
/* Lead desk (LWT-006) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.btn { font: inherit; font-size: 13px; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.filters { display: grid; gap: 12px; }
.frow-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.frow-filters .grow { grid-column: span 2; }
label > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
input, select, textarea { font: inherit; font-size: 14px; width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.filter-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.filter-actions .muted { margin-right: auto; font-size: 13px; }
.tablebox.tall { max-height: 70vh; }
.clist tbody tr { cursor: pointer; }
.clist tbody tr:hover td { background: var(--track); }
.clist tbody tr.active td { background: var(--track); }
.sort { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.sort[aria-sort="descending"]::after { content: " ↓"; } .sort[aria-sort="ascending"]::after { content: " ↑"; }
.flag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; margin-right: 4px; border: 1px solid currentColor; }
.flag.pin { color: var(--accent); } .flag.hold { color: var(--warn); }
.tagchip { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--track); color: var(--muted); margin: 2px 4px 0 0; }
.sub { display: block; font-size: 12px; color: var(--muted); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; }
.guide summary { cursor: pointer; font-weight: 600; }
.guide dl { display: grid; grid-template-columns: minmax(0, 14rem) 1fr; gap: 6px 16px; margin: 14px 0 0; font-size: 13px; }
.guide dt { font-weight: 500; } .guide dd { margin: 0; color: var(--muted); }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--panel); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgb(0 0 0 / .08); display: flex; flex-direction: column; z-index: 20; padding-top: env(safe-area-inset-top, 0px); }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 16px; }
.panel-body { overflow: auto; padding: 16px 20px 32px; display: grid; gap: 18px; }
.panel h3 { font-size: 13px; margin: 0; color: var(--muted); font-weight: 500; }
.score-box { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 8px; }
.score-box .big { margin: 0; }
.parts { grid-column: 1 / -1; margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; }
.parts li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.parts li b { font-family: var(--mono); font-weight: 500; }
.marks { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.mark-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.check { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.check input { width: auto; }
.facts { display: grid; grid-template-columns: minmax(0, 9rem) 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; word-break: break-word; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.wgrid.places { max-height: 22rem; overflow: auto; padding-right: 4px; }
h2.gap { margin-top: 18px; }
.savebar { display: flex; gap: 14px; align-items: center; }
.err { color: var(--bad); }
@media (max-width: 640px) { .frow-filters .grow { grid-column: span 1; } .guide dl, .facts { grid-template-columns: 1fr; } }
