/* A3 (16/10/2026): the approved A2 prototype in the real dashboard. Tokens
   live once, at the top of admin.css. This sheet draws the shared frame
   (dark rail, pill tabs, floating Paper/Graphite switch) and the Overview;
   the other pages keep their registers until their own A3 pass. Native
   templates, forms and AG Grid retain their contracts. */

body { background: var(--paper-deep); font-size: 15px; }
a,button,input,select,textarea,summary { scroll-margin-top: 84px; }
:where(a,button,input,select,textarea,summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input::placeholder,textarea::placeholder { color: var(--muted); opacity: 1; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Rail ---------- */
.admin-sidebar { position: fixed; inset: 12px auto 12px 12px; width: 244px; z-index: 30; display: flex; flex-direction: column; padding: 22px 14px 14px; background: var(--rail); color: var(--rail-text); border: 0; border-radius: var(--r-card); }
.admin-sidebar .wordmark { display: block; padding: 0 10px 14px; text-decoration: none; color: var(--rail-text); }
.admin-sidebar .wordmark img { display: block; width: 132px; height: auto; }
.admin-sidebar .workspace-name { display: block; margin: 8px 0 0; font: 500 12px/1.3 var(--sans); color: var(--rail-muted); }
nav.sections { display: block; flex: 1; overflow-y: auto; scrollbar-width: none; padding: 0; background: none; border: 0; }
.nav-block { padding: 5px 0; border-top: 1px solid #f2ede414; }
.nav-block:first-child { border-top: 0; }
.nav-block > p { margin: 8px 10px 4px; font: 500 12px/1 var(--sans); color: var(--rail-muted); }
nav.sections a { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 1px 0; padding: 6px 10px; border: 0; border-radius: 12px; text-decoration: none; font: 500 14px/1.3 var(--sans); color: #f2ede4d9; white-space: normal; background: none; box-shadow: none; }
nav.sections a .icon { color: var(--rail-muted); }
nav.sections a:hover { background: #f2ede40f; color: #f2ede4; }
nav.sections a.current { background: #f2ede4; color: #14110c; font-weight: 600; box-shadow: none; }
nav.sections a.current .icon { color: #14110c; }
nav.sections a:focus-visible { outline-color: var(--lime); }
.sidebar-identity { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 12px 10px 4px; border-top: 1px solid #f2ede414; }
.sidebar-identity strong { display: block; font-size: 12px; font-weight: 500; color: var(--rail-text); overflow-wrap: anywhere; }
.sidebar-identity small { display: block; font-size: 12px; color: var(--rail-muted); }
.identity-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: var(--lime); color: #14110c; font: 600 14px/1 var(--sans); }

/* ---------- Frame ---------- */
.admin-workspace { margin-left: 268px; padding: 0 22px 0 12px; min-width: 0; }
.masthead { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px; height: auto; padding: 20px 0 14px; background: var(--paper-deep); border: 0; backdrop-filter: none; }
.masthead .spacer { flex: 1; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--card); border-radius: 999px; box-shadow: var(--shadow); }
.tabs a { padding: 7px 15px; border-radius: 999px; text-decoration: none; font: 500 14px/1.3 var(--sans); color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--solid); color: var(--solid-text); }
.masthead-search { display: flex; align-items: center; gap: 8px; max-width: 260px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--muted); }
.masthead-search input { width: 170px; min-width: 0; border: 0; background: none; outline: none; padding: 0; font: 14px var(--sans); color: var(--ink); }
.masthead-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.round { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); color: var(--ink); cursor: pointer; }
#nav-toggle { display: none; }
.pillbutton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 15px; border: 0; border-radius: 999px; background: var(--chip); color: var(--ink); font: 500 13.5px/1.3 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.pillbutton:hover { background: var(--line); }
.masthead .pillbutton { background: var(--card); box-shadow: var(--shadow); }
.masthead .signout button { font: 500 13.5px/1.3 var(--sans); }
.primary-action { background: var(--solid); color: var(--solid-text); }
main { padding: 6px 0 100px; }
.measure, .admin-workspace .measure { max-width: none; min-width: 0; margin-inline: 0; }
footer { padding: 0 0 90px; font-size: 12px; color: var(--muted); }
.sample-banner { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 12px; border: 0; border-radius: 999px; background: var(--chip); color: var(--muted); font: 12.5px/1.4 var(--sans); }
.sample-banner .workspace-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
body.access-gate { background: var(--paper-deep); }

/* Floating theme switch: Paper by default, Graphite on request. */
.theme-switch { position: fixed; left: 50%; bottom: 18px; z-index: 20; transform: translateX(-50%); margin-left: 134px; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--solid); box-shadow: 0 12px 30px -14px rgba(20,17,12,.5); }
body.access-gate .theme-switch { margin-left: 0; }
.theme-switch button { height: 32px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--solid-text); font: 500 13.5px/1 var(--sans); cursor: pointer; }
.theme-switch button[aria-pressed="false"] { opacity: .78; }
.theme-switch button[aria-pressed="true"] { background: var(--solid-text); color: var(--solid); opacity: 1; }
.theme-switch button:focus-visible { outline-color: var(--lime); }

/* ---------- Page heads (every page) ---------- */
.page-head,.question-head { margin: 0 0 22px; gap: 20px; }
.page-head h1,.question-head h1 { font: 600 clamp(28px,3vw,38px)/1.08 var(--sans); letter-spacing: -.045em; max-width: none; }
.page-head .titles>p:last-child,.question-head .answer-line { font: 14px/1.6 var(--sans); color: var(--muted); margin-top: 8px; max-width: 85ch; }
.page-head .eyebrow,.question-head .q-eyebrow { font: 500 12px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); margin-bottom: 8px; }
.freshness { font-size: 12px; color: var(--muted); }
h2 { font-size: 18px; letter-spacing: -.02em; } h3 { font-size: 15px; }
.note,.caption,.source-state { font: 13px/1.6 var(--sans); }
.section { margin-top: 26px; padding-top: 22px; }
.hero { gap: 28px; padding: 20px 0; } .hero .figure,.hero-figure { font-size: 42px; } .hero .caption { max-width: 65ch; }
.summary-context { gap: 0; } .summary-context>div { padding: 13px 0; } .summary-context dt { font-size: 12px; } .summary-context dd { font-size: 13px; overflow-wrap: anywhere; }
.table-scroll { max-width: 100%; } table { font-size: 14px; } th { font: 500 12.5px var(--sans); color: var(--muted); } td { font-size: 14px; }
.data-toolbar { gap: 10px; } .data-toolbar input { font: 13px var(--sans); } .data-toolbar .muted { font-size: 12px; }
.admin-dialog { background: var(--paper); color: var(--ink); border: 0; border-left: 1px solid var(--line); box-shadow: -15px 0 60px #0003; inset: 0 0 0 auto; margin: 0; width: min(100%,clamp(480px,34vw,800px)); height: 100dvh; max-height: 100dvh; max-width: 100%; overflow: auto; overscroll-behavior: contain; }
.admin-dialog h2 { font-size: 24px; } .admin-dialog label { font-size: 12px; } .admin-dialog input,.admin-dialog select { font-size: 14px; }
.state { border-radius: var(--r-tile); box-shadow: none; } .state h3 { font-size: 18px; } .state p { font-size: 13px; }
.source-state.stale { background: var(--tile); border-left: 3px solid var(--warn); padding: 12px 15px; }
.chart .axis,.chart .label { font-family: var(--mono); font-size: 11px; } .chart .bar.quiet { fill: var(--decor); } .chart .line { stroke-width: 2; } .chart-legend { font: 12px var(--sans); flex-wrap: wrap; } .chart-legend span.quiet::before { background: var(--decor); }

/* ---------- Overview ---------- */
body[data-section="overview"] .page-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 22px; }
body[data-section="overview"] .page-head .eyebrow { margin: 0 0 8px; font: 500 13px/1 var(--sans); color: var(--muted); }
body[data-section="overview"] .page-head h1 { margin: 0; font: 600 clamp(30px,3.4vw,44px)/1.02 var(--sans); letter-spacing: -.045em; }
body[data-section="overview"] .page-head .titles > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
body[data-section="overview"] .page-head .when { margin-left: auto; text-align: right; color: var(--muted); font-size: 14px; }
body[data-section="overview"] .page-head .when strong { display: block; color: var(--ink); font-weight: 500; }
.num,.tile-figure,.ring-value { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.answer-tiles { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin-bottom: 12px; }
.answer-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 16px 14px; border-radius: var(--r-tile); background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.answer-tile:hover { box-shadow: var(--shadow), inset 0 0 0 1px var(--line); color: var(--ink); }
.tile-question { overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.tile-figure { margin-top: 6px; font: 600 clamp(22px,2vw,28px)/1.1 var(--mono); letter-spacing: -.04em; overflow-wrap: anywhere; }
.tile-figure.long { font-size: clamp(17px,1.45vw,23px); }
.tile-figure.bad { color: var(--bad); } .tile-figure.warn { color: var(--warn); }
.tile-unit { overflow: hidden; color: var(--muted); font-size: 12.5px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.tile-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin-top: auto; padding-top: 10px; min-width: 0; max-width: 100%; }
.tile-state { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.tile-age { overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.tile-source { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font: 600 11.5px/18px var(--mono); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.flat { background: var(--chip); color: var(--muted); }

.ov-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); align-items: stretch; gap: 12px; margin-bottom: 12px; }
/* Each column reaches the bottom of its row: the last card grows, so no gap opens beside a taller neighbour. */
.ov-grid > .stack { display: flex; flex-direction: column; gap: 12px; }
.ov-grid > .stack > :last-child { flex: 1 1 auto; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini .card-head { margin-bottom: 10px; }
.mini-figure { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.mini-figure .num { color: var(--ink); font: 600 26px/1.1 var(--mono); letter-spacing: -.04em; margin-right: 4px; }
.mini-rows { margin: 0; }
.mini-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.mini-rows > div:last-child { border-bottom: 0; }
.mini-rows dt { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.mini-rows dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.mini-rows dd .good,.mini-rows dd.good { color: var(--good); } .mini-rows dd .bad,.mini-rows dd.bad { color: var(--bad); } .mini-rows dd.warn { color: var(--warn); }
.split-bar { display: flex; height: 10px; margin: 0 0 8px; overflow: hidden; border-radius: 999px; background: var(--chip); }
.split-bar .with { background: var(--blue); } .split-bar .abst { background: var(--decor); }
.mini-rows i { width: 9px; height: 9px; border-radius: 3px; } .mini-rows i.k-with { background: var(--blue); } .mini-rows i.k-abst { background: var(--decor); }
.ov-grid > * { min-width: 0; }
.span-4 { grid-column: span 4; } .span-8 { grid-column: span 8; }
.stack { display: grid; gap: 12px; align-content: start; }
.ov-card { min-width: 0; padding: 20px 22px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); }
.ov-card h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .sub { color: var(--muted); font-size: 13px; }
.card-head .grow { flex: 1; }
.ov-card .source { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.alert { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: 168px; padding: 20px 22px; border-radius: var(--r-card); color: #14110c; text-decoration: none; }
.alert:hover { color: #14110c; }
.alert.orange { background: var(--orange); } .alert.pink { background: var(--pink); }
.alert .blob { position: absolute; right: -40px; bottom: -56px; z-index: -1; width: 230px; height: 230px; opacity: .9; }
.alert .kicker { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; }
.alert .kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #14110c; }
.alert strong { display: block; max-width: 20ch; margin-top: 10px; font: 600 clamp(22px,2vw,27px)/1.12 var(--sans); letter-spacing: -.035em; }
.alert p { max-width: 36ch; margin: 8px 0 0; font-size: 14px; color: #14110c; }
.alert .go { margin-top: auto; padding-top: 14px; }
.alert .go span { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; background: #14110c; color: #fbf8f2; font-weight: 500; font-size: 13.5px; }
.all-clear { min-height: 168px; padding: 20px 22px; border: 1.5px dashed var(--line); border-radius: var(--r-card); color: var(--muted); }
.all-clear strong { display: block; color: var(--ink); font-size: 17px; font-weight: 600; }
.all-clear p { margin: 6px 0 0; font-size: 14px; }

.dig-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.dig-chart .grid { stroke: var(--line); }
.dig-chart .axis { fill: var(--muted); font: 500 10.5px var(--mono); }
.dig-chart .found { fill: url(#dig-dash); stroke: var(--decor); stroke-dasharray: 3 3; }
.dig-chart .heard { fill: var(--solid); opacity: .14; }
.dig-chart .dig.on .heard { fill: var(--blue); opacity: 1; }
.dig-chart .dig.on .axis { fill: var(--ink); font-weight: 600; }
.dig-chart .dig-label { display: none; }
.dig-chart .dig.on .dig-label { display: inline; }
.dig-chart .dig-label rect { fill: var(--solid); }
.dig-chart .dig-label text { fill: var(--solid-text); font: 600 11px var(--mono); }
.dig-chart #dig-dash line { stroke: var(--decor); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend i.k-heard { background: var(--blue); }
.legend i.k-found { background: repeating-linear-gradient(135deg,var(--decor) 0 2px,transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--decor); }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.day-chips button,.pills button { height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--chip); color: var(--muted); font: 500 12px/1 var(--mono); cursor: pointer; }
.pills button { font-family: var(--sans); font-size: 13px; height: 32px; padding: 0 13px; }
.day-chips button[aria-pressed="true"],.pills button[aria-pressed="true"] { background: var(--solid); color: var(--solid-text); }
.as-table summary { margin-top: 10px; color: var(--muted); font-size: 13px; cursor: pointer; }
.as-table .table-scroll { margin-top: 8px; }

.case-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.case-tools .search { display: flex; flex: 1 1 200px; align-items: center; gap: 8px; max-width: 320px; min-width: 0; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.case-tools .search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.case-tools .search input { width: 100%; min-width: 0; border: 0; background: none; outline: none; padding: 0; font: 14px var(--sans); color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-card .table-scroll { overflow-x: auto; }
:is(.ov-table,.chart-table) { width: 100%; border-collapse: collapse; font-size: 14px; }
:is(.ov-table,.chart-table) th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
:is(.ov-table,.chart-table) td { font: 14px/1.45 var(--sans); padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
:is(.ov-table,.chart-table) tbody tr:last-child td { border-bottom: 0; }
:is(.ov-table,.chart-table) .n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
:is(.ov-table,.chart-table) .main { display: block; font-weight: 500; color: var(--ink); text-decoration: none; }
:is(.ov-table,.chart-table) a.main:hover { text-decoration: underline; }
:is(.ov-table,.chart-table) .sub { display: block; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
:is(.ov-table,.chart-table) .area { display: inline-flex; padding: 2px 9px; border-radius: 999px; background: var(--chip); font-size: 12.5px; white-space: nowrap; }
:is(.ov-table,.chart-table) .when small { display: block; color: var(--muted); font-size: 12px; }
:is(.ov-table,.chart-table) .when { white-space: nowrap; }
.case-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.case-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--decor); }
.case-state.new::before { background: var(--orange); } .case-state.recurring::before,.case-state.active::before { background: var(--pink); } .case-state.quiet::before { background: var(--good); }
.empty-row td { padding: 26px; text-align: center; color: var(--muted); }
.case-period { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.case-period select { height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--chip); color: var(--ink); font: 13px var(--sans); }

.rings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin: 0; }
.ring { margin: 0; text-align: center; }
.ring svg { display: block; width: 100%; max-width: 150px; height: auto; margin: 0 auto; }
.ring .ring-value { fill: var(--ink); font: 600 26px/1 var(--mono); letter-spacing: -.04em; }
.ring .ring-label { fill: var(--muted); font: 500 11px/1 var(--sans); }
.ring .track { stroke: var(--chip); }
.ring .seg-on { stroke: var(--blue); } .ring .seg-off { stroke: var(--chip); }
.ring figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; }
.ring .ring-state { display: grid; place-items: center; min-height: 120px; border: 1.5px dashed var(--line); border-radius: var(--r-tile); }
.table-scroll > :is(.ov-table,.chart-table) { min-width: 0; }
.table-scroll > [data-case-table] { min-width: 560px; }
.sources-table td { padding-top: 8px; padding-bottom: 8px; }
.sources-table td:last-child { text-align: right; white-space: nowrap; }
.sources-table .age { color: var(--muted); font-size: 12px; margin-left: 6px; }
.sources-table a { color: var(--ink); }

.details-toggle { margin-top: 12px; }

/* ---------- Cases and Search (A3 block 2) ---------- */
.case-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.case-toolbar .case-tools { flex: 1 1 260px; max-width: 380px; margin: 0; }
.case-toolbar .case-tools .search { max-width: none; flex: 1 1 auto; background: var(--card); box-shadow: var(--shadow); }
.case-toolbar .case-tools .search.wide { min-width: min(100%, 360px); }
.pills .pill { border: 0; text-transform: none; letter-spacing: 0; display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 999px; background: var(--chip); color: var(--muted); font: 500 13px/1 var(--sans); text-decoration: none; white-space: nowrap; }
.pills .pill:hover { color: var(--ink); }
.pills .pill[aria-current="true"] { background: var(--solid); color: var(--solid-text); }
.area-pills { margin: 0 0 14px; }
.filter-reset { font-size: 13px; color: var(--muted); }
.case-toolbar .case-filters { border: 0; padding: 0; margin: 0; background: none; }
.page-head { border-bottom: 0; padding-bottom: 0; }
.mini-rows dd.text { font-family: var(--sans); }
.state-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--decor); }
.state-dot.new { background: var(--orange); } .state-dot.recurring, .state-dot.active { background: var(--pink); } .state-dot.quiet { background: var(--good); }
.cases-card { display: flex; flex-direction: column; padding-bottom: 14px; }
.cases-card .case-workspace { flex: 1; height: calc(100dvh - 330px); min-height: 420px; margin: 0 -8px; border-radius: var(--r-tile); }
.case-row-bottom { gap: 8px; } .case-row-bottom > span:last-child { margin-left: auto; }
.case-row .area { display: inline-flex; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--ink); font-size: 11.5px; }
.case-row .case-state { font-size: 11.5px; }
.case-unselected .icon { width: 30px; height: 30px; }
.area-table { width: 100%; border-collapse: collapse; margin: 0; }
.table-scroll > .area-table { min-width: 0; }
.area-table th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; font: 500 12.5px var(--sans); color: var(--muted); }
.area-table th:nth-child(2), .area-table td:nth-child(2) { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.area-table td { padding: 8px 4px; font: 13.5px/1.3 var(--sans); border: 0; }
.area-table td.bar-cell { width: 45%; }
.area-bar { display: block; height: 18px; border-radius: 999px; background: var(--solid); opacity: .18; }
.area-bar.top { background: var(--orange); opacity: 1; }
.mono-cell { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
body[data-section="search"] .page-head .eyebrow, body[data-section="cases"] .page-head .eyebrow { display: none; }

/* ---------- Cases (unchanged registers, new tokens) ---------- */
body[data-section="cases"] main{padding-top:6px;padding-bottom:16px}body[data-section="cases"] .page-head{margin-bottom:15px}body[data-section="cases"] .page-head .eyebrow{display:none}
.case-filters{margin:0 0 12px;gap:9px}.case-filters>div{min-width:115px}.case-filters .case-search{min-width:180px}.case-filters input,.case-filters select{font:12px var(--sans);min-height:35px;padding:8px;border-radius:8px}.case-filters label{font-size:11px}.case-filters .pillbutton{min-height:35px}.filter-reset{font-size:12px}
.case-distribution{border-top:1px solid var(--line);padding:0;margin:0}.case-distribution summary{cursor:pointer;padding:11px 0;font-size:12px;font-weight:500}.case-distribution summary span{font-size:11px;color:var(--muted);margin-left:14px;font-weight:400}.distribution-bars{display:grid;grid-template-columns:1fr 1fr;gap:8px 30px;max-width:900px;padding:12px 0}.distribution-bars>div{display:grid;grid-template-columns:110px 1fr 30px;gap:10px;align-items:center;font-size:12px}.distribution-bars meter{width:100%;height:12px;accent-color:var(--accent)}.distribution-bars meter::-webkit-meter-optimum-value{background:var(--accent)}
.case-workspace{display:grid;grid-template-columns:minmax(270px,.85fr) minmax(350px,1.4fr);border:1px solid var(--line);border-radius:var(--r-tile);overflow:hidden;background:var(--card);height:calc(100dvh - 298px);min-height:340px}
.case-list{background:var(--paper);border-right:1px solid var(--line);overflow:auto;overscroll-behavior:contain}.case-list-head{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;padding:10px 20px;background:var(--paper);border-bottom:1px solid var(--line);font-size:11px;color:var(--muted)}
.case-row{display:block;padding:14px 20px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}.case-row:hover{background:var(--tile);color:var(--ink)}.case-row.selected{background:var(--accent-soft);box-shadow:inset 3px 0 var(--accent)}.case-row-top,.case-row-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted)}.case-row-top>span{color:var(--bad);font-size:10px;text-transform:uppercase}.case-row strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:14px;font-weight:500;line-height:1.5;margin:8px 0}.case-row time{white-space:nowrap}.case-row-bottom{font-size:11px}
.case-detail-pane{min-width:0;overflow:auto;overscroll-behavior:contain}.inspector-tools{position:sticky;top:0;z-index:3;background:var(--card);padding:8px 23px;display:flex;gap:12px;align-items:center;border-bottom:1px solid var(--line)}.inspector-tools>span{font-size:10px;letter-spacing:.08em;color:var(--muted)}.inspector-tools>.pillbutton{margin-left:auto;min-height:28px;font-size:11px}.case-back{font-size:12px}.case-inspector{padding:22px 24px}.inspector-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted)}.inspector-meta .mono{font-size:10px;overflow-wrap:anywhere}.case-inspector h2{font-size:24px;margin:14px 0 8px}.inspector-route{font-size:11px;overflow-wrap:anywhere;color:var(--muted)}.inspector-sample{font-size:13px;overflow-wrap:anywhere;border-left:2px solid var(--line);padding:10px 12px;background:var(--tile);margin:14px 0}
.inspector-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin:20px 0}.inspector-tabs button{font:13px var(--sans);border:0;border-bottom:2px solid transparent;border-radius:0;background:none;color:var(--muted);padding:0 0 10px}.inspector-tabs button[aria-pressed="true"]{color:var(--ink);border-color:var(--accent)}
.case-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:24px}.case-metrics>div{display:flex;flex-direction:column;gap:8px}.case-metrics span{font-size:11px;color:var(--muted)}.case-metrics strong{font-size:25px;font-weight:500}.case-metrics time{font-size:12px}.case-inspector h3{font-size:12px;font-weight:600;margin:20px 0 14px}.case-context{margin:0}.case-context>div{display:grid;grid-template-columns:115px minmax(0,1fr);gap:15px;margin:0 0 14px}.case-context dt{font-size:12px;color:var(--muted)}.case-context dd{margin:0;font-size:13px;overflow-wrap:anywhere}.case-context dd.mono{font-size:11px}.evidence-boundary{padding:12px;border-left:2px solid var(--line);background:var(--tile)}.case-unselected{display:grid;align-content:center;justify-items:center;text-align:center;height:100%;padding:32px;gap:12px}.case-unselected>span{font-size:32px;color:var(--muted)}.case-unselected h2{font-size:20px;margin:0}.case-unselected p{font-size:13px;color:var(--muted);max-width:330px;margin:0}.case-list .register-empty{padding:25px 20px}.register-scope{margin-top:12px}.register-scope>summary{font-size:11px}.case-loading{opacity:.55;pointer-events:none}
.case-inspector h2{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.command-result{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 10px;border-radius:8px;color:var(--ink);text-decoration:none;font-size:14px}.command-result:hover{background:var(--accent-soft)}.command-result small{font-size:11px;color:var(--muted)}#workspace-command-q{width:100%;margin:10px 0 15px}#workspace-command-results{max-height:50dvh;overflow:auto}.workspace-error{border-left:3px solid var(--bad);padding:12px;background:var(--tile);font-size:13px}
body[data-section="spend"] .hero{display:block;padding-top:12px;margin-bottom:20px}body[data-section="spend"] .hero>.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:20px!important}body[data-section="spend"] .hero-caption{max-width:85ch;font-size:12px}body[data-section="spend"] .hero .meter{max-width:700px}

/* Cases, denser and with contrast (Giuseppe on the preview, 16/10): white list,
   no inner box, one-line sample, count and time at a glance; the inspector in
   three areas, observed values strong and «Not observed» quiet. */
.cases-card .case-workspace { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--card); margin: 0 -22px; }
.cases-card .case-list { background: var(--card); }
.cases-card .case-list-head { background: var(--card); padding: 8px 18px; }
.cases-card .case-row { display: grid; gap: 3px; padding: 10px 18px; border-bottom: 1px solid var(--line); color: var(--ink); }
.cases-card .case-row:hover { background: var(--tile); }
.cases-card .case-row.selected { background: var(--accent-soft); box-shadow: inset 4px 0 var(--accent); }
.row-head, .row-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-class { overflow: hidden; color: var(--bad); font: 600 11.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; text-overflow: ellipsis; }
.row-count { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.row-count strong { color: var(--ink); font: 600 15px/1 var(--mono); margin: 0; display: inline; }
.cases-card .case-row .row-sample { display: block; margin: 0; overflow: hidden; font-size: 14px; font-weight: 600; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; }
.row-meta { color: var(--muted); font-size: 12px; }
.row-meta time { margin-left: auto; font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.cases-card .inspector-tools { background: var(--card); }
.inspector-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.inspector-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.inspector-tags .tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--chip); color: var(--ink); font: 500 12px/1 var(--sans); }
.inspector-tags .tag.bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; text-transform: uppercase; font-family: var(--mono); font-size: 11.5px; }
.inspector-tags .tag.mono { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cases-card .case-inspector { padding: 16px 20px; }
.cases-card .case-inspector h2 { margin: 12px 0 6px; font-size: 19px; line-height: 1.3; -webkit-line-clamp: 2; }
.cases-card .inspector-tabs { margin: 14px 0 14px; }
.cases-card .case-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border: 0; padding: 0; margin: 0 0 16px; }
.cases-card .case-metrics > div { gap: 4px; padding: 10px 12px; border-radius: 14px; background: var(--tile); }
.cases-card .case-metrics strong { font: 600 22px/1 var(--mono); }
.cases-card .case-metrics time { font: 500 13px/1.2 var(--mono); color: var(--ink); }
.cases-card .case-inspector h3 { margin: 0 0 8px; color: var(--muted); font: 600 11.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; }
.cases-card .case-context { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 12px; }
.cases-card .case-context .ctx { display: block; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.cases-card .case-context .ctx dt { font-size: 11.5px; color: var(--muted); }
.cases-card .case-context .ctx dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.cases-card .case-context .ctx dd.mono { font-family: var(--mono); font-size: 12px; }
.cases-card .case-context .ctx.absent { border-style: dashed; }
.cases-card .case-context .ctx.absent dd { font-weight: 400; color: var(--muted); }
.cases-card .evidence-boundary { font-size: 12.5px; }

/* Shared pieces (A3 block 3): spans, the origin card, the old registers inside a card. */
.span-6 { grid-column: span 6; } .span-12 { grid-column: span 12; }
.ov-card.origin { margin: 4px 0 12px; padding: 14px 22px; }
.ov-card.origin > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.origin-body .note { margin: 10px 0 0; font-size: 13px; color: var(--muted); max-width: 110ch; }
.ov-card .table-scroll > table { margin-top: 0; }
.ov-card .freshness { margin: 0 0 10px; }
.gate-verdict { margin: 0 0 10px; }
.source-summary { margin: -10px 0 16px; color: var(--muted); font-size: 13px; }
.source-summary .area { display: inline-flex; padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--ink); font: 500 11.5px var(--mono); }

/* Registers (AG Grid) inside cards: same pills and white header as the rest. */
.ov-card .data-toolbar input[type="search"], .ov-card .data-toolbar input { height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font: 14px var(--sans); color: var(--ink); }
.ov-card .data-toolbar .pillbutton { background: var(--chip); box-shadow: none; }

/* The record panel (Open ↗) as an island, like every card (Giuseppe on the
   preview, 17/10): floating panel, fields in a white card, absent values quiet,
   actions in their own card, links as pills. */
.admin-dialog { inset: 12px 12px 12px auto; width: min(560px, calc(100vw - 24px)); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); padding: 18px 20px 22px; border: 0; border-radius: var(--r-card); background: var(--paper-deep); box-shadow: 0 30px 80px -20px rgba(20,17,12,.45); }
.admin-dialog::backdrop { background: rgba(20,17,12,.42); }
.admin-dialog .dialog-head { margin-bottom: 14px; }
.admin-dialog .dialog-head .eyebrow { font: 500 12.5px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); }
.admin-dialog .dialog-head .pillbutton { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); }
.admin-dialog h2 { margin: 0 0 14px; font: 600 22px/1.25 var(--sans); letter-spacing: -.03em; }
.detail-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.detail-links a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--solid); color: var(--solid-text); font: 500 13px/1 var(--sans); text-decoration: none; }
.detail-section-title { margin: 14px 4px 6px; color: var(--muted); font: 600 11.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; }
.admin-dialog .detail-fields { margin: 0; padding: 2px 16px; border-radius: var(--r-tile); background: var(--card); box-shadow: var(--shadow); }
.admin-dialog .detail-fields > div { grid-template-columns: minmax(96px, .75fr) minmax(0, 1.25fr); gap: 14px; padding: 10px 0; font-size: 14px; }
.admin-dialog .detail-fields > div:last-child { border-bottom: 0; }
.admin-dialog .detail-fields dt { color: var(--muted); font-size: 13px; }
.admin-dialog .detail-fields dd { color: var(--ink); font-weight: 600; }
.admin-dialog .detail-fields dd .sub { font-weight: 400; color: var(--muted); }
.admin-dialog .detail-fields > div.absent dd { color: var(--muted); font-weight: 400; }
.admin-dialog .detail-actions { margin-top: 12px; padding: 14px 16px; border: 0; border-radius: var(--r-tile); background: var(--card); box-shadow: var(--shadow); }
.admin-dialog .detail-actions h3 { margin: 0 0 10px; color: var(--muted); font: 600 11.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; }

/* Controls (A3 block 4): iOS-style switches in cards, one Save, same form. */
.answer-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lane { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lane:last-child { border-bottom: 0; }
.lane-head { display: flex; align-items: center; gap: 10px; }
.lane-label { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; color: var(--ink); }
.lane-state { font: 600 12px/1 var(--mono); color: var(--muted); }
.lane[data-on="true"] .lane-state { color: var(--good); }
.lane-help { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.lane-message { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.lane-message input { height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font: 14px var(--sans); color: var(--ink); }
.lane-message input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lane-fields { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.lane-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.lane-pair .lane { border-bottom: 0; }
input.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 50px; height: 30px; margin: 0; border-radius: 999px; background: var(--chip); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .2s ease; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(20,17,12,.3); transition: left .2s ease; }
input.switch:checked { background: var(--lime); box-shadow: none; }
input.switch:checked::after { left: 23px; background: #14110c; }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.controls-save { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; padding: 10px 12px 10px 20px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow), 0 10px 30px -18px rgba(20,17,12,.4); color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { input.switch, input.switch::after { transition: none; } }

/* ---------- Narrower screens ---------- */
@media (max-width: 1280px) {
  .answer-tiles { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .span-4,.span-5,.span-6,.span-7,.span-8 { grid-column: span 12; }
  .pair, .lane-pair, .lane-fields { grid-template-columns: 1fr; }
  .answer-tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .case-workspace{grid-template-columns:minmax(240px,.8fr) minmax(320px,1.3fr)}.case-filters{flex-wrap:wrap}
  .masthead-search input { width: 120px; }
}
@media (max-width: 900px) {
  .admin-sidebar { inset: 0 auto 0 0; width: 260px; border-radius: 0 var(--r-card) var(--r-card) 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: none; }
  .admin-sidebar.is-open { transform: none; box-shadow: 20px 0 60px #0007; }
  .admin-workspace { margin-left: 0; padding: 0 16px; }
  #nav-toggle { display: grid; }
  .masthead { padding: 10px 0 12px; }
  .masthead-search { flex: 1; max-width: none; } .masthead-search input { width: 100%; }
  .refresh-form,#workspace-jump { display: none !important; }
  .theme-switch { margin-left: 0; }
  body[data-section="overview"] .page-head .when { margin-left: 0; text-align: left; }
  body[data-section="spend"] .hero>.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .case-workspace{display:block;height:auto;min-height:0}.case-detail-pane{display:none}.case-workspace.has-selection .case-list{display:none}.case-workspace.has-selection .case-detail-pane{display:block}.case-workspace.has-selection .inspector-tools{top:64px}.case-detail-pane,.case-list{overflow:visible}.case-list{border-right:0}.case-inspector{padding:18px 16px}.case-context>div{grid-template-columns:95px minmax(0,1fr);gap:10px}.case-metrics{gap:8px}.case-metrics time{font-size:11px}.case-list-head>span:last-child{display:none}.inspector-tools{padding-inline:16px}.inspector-tools>span{display:none}.case-filters .case-search{min-width:100%;order:-1}.case-filters>div{min-width:0;flex:1}.case-filters select{max-width:100%;width:100%;font-size:11px;padding:8px 5px}.distribution-bars{grid-template-columns:1fr}.case-distribution summary span{display:block;margin:4px 0 0 14px}.case-workspace.has-selection{margin-top:10px}
  body.case-selected .case-filters,body.case-selected [data-case-screen]>.page-head,body.case-selected .case-distribution{display:none}body.case-selected main{padding-top:12px}.inspector-tools .case-back{min-height:34px;display:inline-flex;align-items:center}
}
@media (max-width: 640px) {
  .tabs { display: none; }
  .answer-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .answer-tile { padding: 14px 14px 12px; }
  .ov-card { padding: 18px 16px; }
  .alert strong { font-size: 22px; }
  .masthead .signout button { padding: 0 10px; }
  .masthead .signout { margin-left: auto; }
  .masthead-search { order: 5; flex: 1 0 100%; max-width: none; }
  body[data-section="overview"] .page-head .when { width: 100%; }
  .page-head { flex-direction: column; align-items: stretch; }
  .cases-card .case-context { grid-template-columns: 1fr; }
  .cases-card .case-workspace { margin: 0 -16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } .admin-sidebar,.case-loading { transition: none; } }
.digest-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.digest-json { margin: 10px 0 0; padding: 12px; overflow: auto; border-radius: 14px; background: var(--tile); font: 12px/1.5 var(--mono); }
.lane .lane-label { font: 600 15px/1.3 var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
.spend-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.spend-chart .grid { stroke: var(--line); }
.spend-chart .axis { fill: var(--muted); font: 500 10.5px var(--mono); }
.spend-chart .used { stroke: var(--ink); }
.spend-chart .fore { stroke: var(--decor); }
.spend-chart .fore-label { fill: var(--muted); font: 600 11px var(--mono); }
.spend-chart .today { fill: var(--pink); stroke: var(--card); }
.spend-chart .tag { fill: var(--solid); }
.spend-chart .tag-text { fill: var(--solid-text); font: 600 11px var(--mono); }
.legend i.k-used { background: var(--ink); }
.legend i.k-fore { height: 0; width: 14px; border-radius: 0; border-top: 2px dashed var(--decor); }
/* People and Insights (A3 block 5). */
.ov-card.socket { padding: 34px 28px; border: 1.5px dashed var(--line); background: var(--card); }
.ov-card.socket h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.03em; }
.ov-card.socket p { margin: 0; color: var(--muted); max-width: 70ch; }
.ov-card.socket .ghost { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.ov-card.socket .ghost div { height: 90px; border-radius: var(--r-tile); background: repeating-linear-gradient(135deg, var(--chip) 0 6px, transparent 6px 14px); }
.ov-card .filterbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.ov-card .filterchip { height: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--chip); color: var(--muted); font: 500 13px/1 var(--sans); text-transform: none; letter-spacing: 0; cursor: pointer; }
.ov-card .filterchip.active, .ov-card .filterchip[aria-pressed="true"] { background: var(--solid); color: var(--solid-text); }
.ov-card .steps > div { border-radius: 14px; }
.ov-card form.stack input, .ov-card form.stack select, .users-search input { height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font: 14px var(--sans); color: var(--ink); }
.ov-card form.stack label { font-size: 12px; color: var(--muted); }
.ov-card form.stack button.primary { height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--solid); color: var(--solid-text); font: 500 14px var(--sans); cursor: pointer; }
.ov-card.invite-once { margin-bottom: 12px; box-shadow: var(--shadow), inset 0 0 0 2px var(--good); }
@media (max-width: 640px) { .ov-card.socket .ghost { grid-template-columns: 1fr; } }
/* A form panel that the page turned into a button leaves its neighbour alone in the row: let it fill the row. */
.ov-grid > .ov-card:only-child, .ov-grid:has(> [data-form-panel][hidden]) > .ov-card:not([data-form-panel]) { grid-column: span 12; }
.page-head button.primary { height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--solid); color: var(--solid-text); font: 500 14px var(--sans); cursor: pointer; }
.ov-card .state { background: var(--paper); border-radius: var(--r-tile); }
/* A3 block 5, accounts (17/10): one line per account, one page per account. */
.span-5 { grid-column: span 5; } .span-7 { grid-column: span 7; }
.badge.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--chip); color: var(--ink); font: 600 12px/1 var(--sans); }
.avatar.big { width: 56px; height: 56px; font-size: 22px; background: var(--lime); color: #14110c; }
.account-line { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; white-space: nowrap; }
.account-line strong { font-weight: 600; }
.account-line .account-email { overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 13px; }
.account-line:hover strong { text-decoration: underline; }
.card-head .users-search { display: flex; align-items: center; gap: 8px; }
.card-head .users-search input { width: min(320px, 50vw); }
.back-link { margin: 0 0 6px; font-size: 13px; } .back-link a { color: var(--muted); text-decoration: none; } .back-link a:hover { color: var(--ink); }
.page-head.account-head { display: flex; align-items: center; gap: 18px; }
.page-head.account-head .titles { flex: 1 1 auto; min-width: 0; }
.page-head.account-head .titles p:last-child { overflow-wrap: anywhere; }
.ov-card.premium { position: relative; overflow: hidden; }
.ov-card.premium::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--decor); }
.ov-card.premium.is-on::before { background: linear-gradient(90deg, var(--lime), var(--good)); }
.premium-state { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.premium-state .badge { font-size: 13px; padding: 4px 12px; }
.premium-state p { margin: 0; font-size: 15px; }
.premium-sources { list-style: none; margin: 0 0 14px; padding: 0; }
.premium-sources li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.premium-sources li span { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.premium-gives { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--chip); color: var(--ink); font: 500 12.5px/1 var(--sans); }
button.chip { cursor: pointer; color: var(--muted); }
button.chip[aria-pressed="true"] { background: var(--solid); color: var(--solid-text); }
.grant-form, .revoke-form { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-tile); background: var(--tile); }
.revoke-form { margin-top: 12px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.grant-form h3 { margin: 0; font-size: 15px; font-weight: 600; }
.grant-form .note, .revoke-form .note { margin: -8px 0 0; font-size: 12.5px; color: var(--muted); }
.revoke-form .note { margin: 0; }
.grant-fields { display: grid; grid-template-columns: auto 1fr 1fr; gap: 14px; align-items: end; }
.grant-form label, .revoke-form label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.grant-days { display: flex; flex-wrap: wrap; gap: 6px; }
.grant-form input, .revoke-form input { height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font: 14px var(--sans); color: var(--ink); min-width: 0; }
.grant-confirm code { font: 12px var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.link-button { border: 0; padding: 0; background: none; color: var(--accent-ink); font: 500 12px var(--sans); cursor: pointer; }
.grant-form button[type="submit"] { justify-self: start; height: 40px; padding: 0 22px; border: 0; border-radius: 999px; font: 600 14px var(--sans); cursor: pointer; }
.revoke-form .danger-link, .access-actions .danger-link { justify-self: start; }
.usage-meter { display: flex; height: 12px; margin: 4px 0 0; overflow: hidden; border-radius: 999px; background: var(--chip); }
.usage-meter .used { background: var(--ink); } .usage-meter .reserved { background: var(--orange); }
.legend i.k-reserved { background: var(--orange); } .legend i.k-left { background: var(--chip); box-shadow: inset 0 0 0 1px var(--decor); }
.ov-card #usage .mini-rows, #usage .mini-rows { margin-top: 12px; }
.mini-rows dd.mono { font-size: 11.5px; overflow-wrap: anywhere; }
.access-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 4px; }
.access-actions .typed-confirm { display: flex; align-items: center; gap: 8px; }
.access-actions .typed-confirm input { height: 34px; width: 110px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font: 13px var(--mono); color: var(--ink); }
@media (max-width: 900px) { .grant-fields { grid-template-columns: 1fr; } .premium-sources li { grid-template-columns: 1fr; gap: 2px; } }
.account-line { max-width: 100%; overflow: hidden; }
.account-line strong { flex: none; }
.cell-content:has(> .account-line) { overflow: hidden; }
.grant-fields { grid-template-columns: 1fr 1fr; }
.grant-fields > label:first-child { grid-column: 1 / -1; }
@media (max-width: 900px) { .grant-fields { grid-template-columns: 1fr; } }
