/* Header versions (17 Nov) · see hd.js. Tokens only. */

/* Shared: buttons answer the press (scale, not a 1px nudge). Transform only, fast, ease-out. */
.b { transition: background-color var(--motion-duration-fast) var(--motion-easing-standard), border-color var(--motion-duration-fast) var(--motion-easing-standard), transform var(--motion-duration-press) var(--motion-easing-standard); }
.b:active:not(:disabled) { transform: scale(0.97); }

.hd__upd { align-self: center; margin-right: var(--space-2); font-size: var(--font-size-12); color: var(--color-text-tertiary); white-space: nowrap; }

/* ── 1 · One bar ── */
[data-hd="1"] { --tabs-h: 0px; }
[data-hd="1"] .top { gap: var(--space-5); }
[data-hd="1"] .top .tabs { flex: 1; align-self: stretch; align-items: stretch; gap: 0; }
[data-hd="1"] .top .tab { height: auto; }
[data-hd="1"] .top .tab[aria-current="page"]::after { bottom: 0; }
[data-hd="1"] .top__title { padding-right: var(--space-5); border-right: 1px solid var(--color-border-subtle); line-height: var(--top-h); }
[data-hd="1"] .top .period { height: 36px; }
.hd1 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--space-4); align-items: center; }
/* Title switch and actions share row 1; the status line spans the full width below, so it never wraps under the buttons */
.hd1__t { display: contents; }
.hd1 .vwt, .hd1 h1:not(.sr) { grid-row: 1; grid-column: 1; }
.hd1 > .acts { grid-row: 1; grid-column: 2; }
.hd1__s { grid-row: 2; grid-column: 1 / -1; }
@media (max-width: 760px) { .hd1 { grid-template-columns: minmax(0, 1fr); } .hd1 > .acts { grid-row: 3; grid-column: 1; margin: var(--space-4) 0 0; } }
.hd1__k { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
.hd1 h1 { font-size: var(--font-size-24); }
.hd1__s { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: var(--space-2) 0 0; font-size: var(--font-size-14); color: var(--color-text-secondary); }
.hd1__s > span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 var(--space-4) 3px 0; border-radius: 50%; background: var(--color-text-tertiary); }
.hd1__s b { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
[data-hd="1"] .ph + .fresh, [data-hd="2"] .fresh, [data-hd="3"] .fresh { display: none; }
[data-hd] .ph { margin-bottom: var(--space-6); }

/* ── 2 · Key facts ── */
.hd2 { align-items: center; margin-bottom: var(--space-4) !important; }
.hd2 h1 { font-size: var(--font-size-24); }
.hd2__prov { margin: 0 0 var(--space-4); font-size: var(--font-size-14); color: var(--color-text-secondary); }
.hd2__f { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 var(--space-8); border-top: 1px solid var(--color-border-subtle); border-bottom: 1px solid var(--color-border-subtle); }
.hd2__f > div { padding: var(--space-4) var(--space-5); border-left: 1px solid var(--color-border-subtle); min-width: 0; }
.hd2__f > div:first-child { border-left: 0; padding-left: 0; }
.hd2__f dt { font-size: var(--font-size-12); color: var(--color-text-secondary); }
.hd2__f dd { margin: var(--space-1) 0 2px; font-family: var(--font-family-display); font-size: var(--font-size-20); font-weight: var(--font-weight-semibold); line-height: 1.2; white-space: nowrap; }
.hd2__of { font-family: var(--font-family-body); font-size: var(--font-size-14); font-weight: var(--font-weight-regular); color: var(--color-text-secondary); }
.hd2__f small { display: block; font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.hd2__f .is-due dt { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
.hd2__f .is-due dt::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--color-status-warning-solid, var(--color-text-primary)); vertical-align: 1px; }

/* ── 3 · Timeline ── */
.tlbar { flex: none; padding: var(--space-3) var(--pad); border-bottom: 1px solid var(--color-border-subtle); }
.tl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-6); }
.tl button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.tl__all { display: grid; gap: 1px; padding: 6px 10px !important; margin-left: -10px; border-radius: var(--radius-sm); font-size: var(--font-size-12); color: var(--color-text-secondary) !important; }
.tl__all b { font-size: var(--font-size-14); color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
.tl__track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 3px; align-items: start; }
.tl__w button { display: grid; gap: 6px; width: 100%; padding: 6px 0 4px !important; border-radius: var(--radius-xs); }
.tl__bar { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--color-bg-surface); box-shadow: inset 0 0 0 1px var(--color-border-subtle); }
.tl__w.is-done .tl__bar { background: var(--color-text-primary); box-shadow: none; }
.tl__fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px 0 0 3px; background: var(--color-text-primary); }
.tl__today { position: absolute; top: -5px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: var(--color-text-accent); }
.tl__today span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 2px; font-size: var(--font-size-11); font-style: normal; font-weight: var(--font-weight-semibold); color: var(--color-text-accent); white-space: nowrap; }
.tl__l { font-size: var(--font-size-12); color: var(--color-text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl__l b { color: var(--color-text-secondary); font-weight: var(--font-weight-medium); }
.tl__w.is-now .tl__l b { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
.tl [aria-pressed="true"] { background: var(--color-bg-surface) !important; box-shadow: 0 0 0 4px var(--color-bg-surface); }
.tl__all[aria-pressed="true"] { box-shadow: none; }
.tl__cert { display: grid; gap: 6px; justify-items: center; padding: 6px 0 4px 6px; }
.tl__pin { width: 12px; height: 12px; margin-top: -3px; border-radius: 50%; border: 2px solid var(--color-text-accent); background: var(--color-bg-canvas); }
.tl__now { margin: 0; text-align: right; font-size: var(--font-size-12); line-height: 1.45; color: var(--color-text-secondary); white-space: nowrap; }
.tl__now b { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
@media (hover: hover) and (pointer: fine) {
  .tl__all:hover, .tl__w button:hover { background: var(--color-bg-surface); }
  .tl__w button:hover { box-shadow: 0 0 0 4px var(--color-bg-surface); }
}
.tl button:focus-visible { outline: 2px solid var(--color-text-accent); outline-offset: 3px; }
.hd3 { align-items: flex-end; }
.hd3 h1 { font-size: var(--font-size-24); }
.hd3__s { margin: var(--space-2) 0 0; font-size: var(--font-size-14); color: var(--color-text-secondary); }
@media (max-width: 1180px) { [data-hd="3"] .drawer { top: calc(var(--top-h) + var(--tabs-h) + 74px); } }

/* ── Responsive ── */
@media (max-width: 1100px) {
  [data-hd="1"] .top { flex-wrap: wrap; height: auto; row-gap: 0; padding-top: var(--space-2); }
  [data-hd="1"] .top .tabs { order: 9; flex-basis: 100%; height: var(--font-size-40); margin-left: calc(var(--space-3) * -1); }
  [data-hd="1"] .top__title { border-right: 0; padding-right: 0; line-height: 40px; margin-right: auto; }
  .tl { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .tl__all { display: none; }
  .tl__now { text-align: left; white-space: normal; }
  .tl__now br { display: none; } .tl__now span::before { content: " · "; }
}
@media (max-width: 760px) {
  .hd1, .hd3 { align-items: flex-start; }
  .hd__upd { display: none; }
  .hd2__f { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hd2__f > div { padding: var(--space-3) var(--space-3) var(--space-3) 0; border-left: 0; }
  .hd2__f > div:nth-child(even) { padding-left: var(--space-3); border-left: 1px solid var(--color-border-subtle); }
  .hd2__f > div:nth-child(n+3) { border-top: 1px solid var(--color-border-subtle); }
  .tl__l { font-size: var(--font-size-11); }
  .tl__l b { display: block; }
}

/* Fixes after the first browser pass */
[data-hd="1"] .top { gap: var(--space-4); }
[data-hd="1"] .top .tab { padding: 0 var(--space-2); }
[data-hd="1"] .top .tab[aria-current="page"]::after { left: var(--space-2); right: var(--space-2); }
[data-hd="1"] .top__title { padding-right: var(--space-4); }
.tlbar { padding-top: var(--space-5); }
@media (max-width: 1100px) { .hd1__s { flex-direction: column; gap: 2px; } .hd1__s > span + span::before { display: none; } }

/* ── Creators view switch (17 Nov): the title is the switch, both views at h1 size, the inactive one tertiary. No transitions: switching is frequent. ── */
.vwt { display: flex; flex-wrap: wrap; align-items: baseline; font-family: var(--font-family-display); font-size: var(--font-size-24); line-height: 1.2; font-weight: var(--font-weight-semibold); letter-spacing: -0.01em; }
.vwt a { color: var(--color-text-tertiary); text-decoration: none; border-radius: var(--radius-xs); }
.vwt a + a { margin-left: var(--space-4); padding-left: var(--space-4); border-left: 1px solid var(--color-border-default); }
.vwt a[aria-current="page"] { color: var(--color-text-primary); }
@media (hover: hover) and (pointer: fine) { .vwt a:not([aria-current]):hover { color: var(--color-text-secondary); } }
.vwt a:focus-visible { outline-offset: 3px; }

/* ── Table pagination (17 Nov). Flat, quiet; page 1 of the leaderboard is exactly the 50 seats. ── */
.pg { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--color-border-subtle); font-size: var(--font-size-14); color: var(--color-text-secondary); }
.pg__of { margin: 0; white-space: nowrap; }
.pg__of .n { color: var(--color-text-primary); }
.pg__nav { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
.pg__nums { display: flex; align-items: center; gap: 2px; }
.pg button:not(.msel) { height: 32px; min-width: 32px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-xs); background: none; font: inherit; color: var(--color-text-secondary); cursor: pointer; }
/* Current page: a brand-tint square. Specific enough to beat `.pg button:not(.msel)` (it lost before, so no highlight showed). */
.pg button.pg__n[aria-current="page"] { width: 32px; min-width: 32px; padding: 0; border-radius: var(--radius-xs); background: var(--color-bg-brand); color: var(--color-text-accent); font-weight: var(--font-weight-semibold); }
.pg button:not(.msel):disabled { color: var(--color-text-disabled); cursor: default; }
@media (hover: hover) and (pointer: fine) { .pg button:not(.msel):not(:disabled):not([aria-current]):hover { color: var(--color-text-primary); background: var(--color-bg-surface); } }
.pg button:not(.msel):focus-visible { outline-offset: 0; }
.pg__gap { min-width: 24px; text-align: center; color: var(--color-text-tertiary); }
.pg__sm { display: none; }
.pg__per { display: flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.pg__per .sel { height: 32px; }
@media (max-width: 760px) {
  .pg__of, .pg__per, .pg__nums { display: none; }
  .pg__nav { width: 100%; justify-content: space-between; margin: 0; }
  .pg__sm { display: inline; color: var(--color-text-primary); }
}

/* ── Dropdown (ui.js): every native select becomes a trigger + listbox popover. Popover matches the period picker (.pp). ── */
.msel__src { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.msel { display: inline-flex; align-items: center; text-align: left; cursor: pointer; color: var(--color-text-primary); font-size: var(--font-size-14); }
.msel:disabled { cursor: default; color: var(--color-text-tertiary); }
.msel__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel[aria-expanded="true"] { background-color: var(--color-bg-surface); }
.msel--field { width: 100%; min-height: 38px; padding: 8px 32px 8px 10px; border: 1px solid var(--color-border-control); border-radius: var(--radius-sm); background: var(--color-bg-canvas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; font-weight: var(--font-weight-regular); }
@media (hover: hover) and (pointer: fine) { .msel:not(:disabled):hover { border-color: var(--color-border-strong); } }
.mnu { position: fixed; z-index: 60; min-width: 160px; width: max-content; max-width: 340px; padding: var(--space-2); background: var(--color-bg-canvas); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); box-shadow: var(--elevation-overlay); font-family: var(--font-family-body); font-size: var(--font-size-14); line-height: 1.35; color: var(--color-text-primary);
  opacity: 0; transform: scale(0.97); transition: opacity 150ms var(--motion-easing-out), transform 150ms var(--motion-easing-out); }
.mnu.is-open { opacity: 1; transform: none; }
.mnu.is-instant { transition: none; }
.mnu__i { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--space-2); align-items: start; padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2); border-radius: var(--radius-sm); cursor: pointer; outline: none; }
.mnu__i:focus-visible { box-shadow: inset 0 0 0 2px var(--color-border-focus); }
.mnu__i:focus, .mnu__i[aria-selected="true"]:focus { background: var(--color-bg-surface); }
@media (hover: hover) and (pointer: fine) { .mnu__i:hover { background: var(--color-bg-surface); } }
.mnu__i[aria-disabled="true"] { color: var(--color-text-tertiary); cursor: default; }
.mnu__c { display: grid; place-items: center; height: 19px; }
.mnu__c svg { width: 16px; height: 16px; fill: none; stroke: var(--color-text-accent); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.mnu__x { display: grid; gap: 2px; min-width: 0; }
.mnu__t { font-weight: var(--font-weight-medium); }
.mnu__i[aria-selected="true"] .mnu__t { font-weight: var(--font-weight-semibold); }
.mnu__d { font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.mnu--compact { padding: var(--space-1); }
.mnu--compact .mnu__i { padding: 6px var(--space-3) 6px var(--space-2); font-feature-settings: var(--font-feature-tabular); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .toolbar .end .msel.sel { flex: none; max-width: 46%; } }
@media (prefers-reduced-motion: reduce) { .mnu, .tt { transition: none; } }

/* ── Column-header tooltips (ui.js) ── */
.tip { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin: -2px 0 0 4px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--color-text-tertiary); vertical-align: middle; cursor: help; }
.tip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (hover: hover) and (pointer: fine) { .tip:hover { color: var(--color-text-primary); } }
.tip--warn::after { content: ""; position: absolute; top: 0; right: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--color-status-warning-solid); box-shadow: 0 0 0 1.5px var(--color-bg-canvas); }
.tt { position: fixed; z-index: 70; width: max-content; max-width: 300px; padding: var(--space-3); background: var(--color-bg-canvas); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-sm); box-shadow: var(--elevation-overlay); font-size: var(--font-size-12); line-height: 1.45; color: var(--color-text-secondary); text-align: left; white-space: normal; font-weight: var(--font-weight-regular);
  opacity: 0; transform: scale(0.97); transition: opacity 150ms var(--motion-easing-out), transform 150ms var(--motion-easing-out); }
.tt.is-open { opacity: 1; transform: none; }
.tt.is-instant { transition: none; }
.tt b { display: block; margin-bottom: 2px; font-size: var(--font-size-13); color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
.tt p { margin: 0 0 var(--space-2); }
.tt p:last-child { margin-bottom: 0; }
.tt__k { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.tt__k span { display: inline-flex; align-items: center; gap: 6px; }
.tt__ns { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); color: var(--color-text-primary); }
.tt__f { color: var(--color-text-tertiary); }
.tt__st { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--space-3); align-items: center; margin: var(--space-2) 0 0; }
.tt__st dd { margin: 0; }

/* ── The key line, and the unset rules as one quiet notice in the head ── */
.lgh { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin: 0; font-size: var(--font-size-12); color: var(--color-text-secondary); }
.lgh__k { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); }
.lgh__k > span { display: inline-flex; align-items: center; gap: 6px; }
.lgh__k > span:first-child { color: var(--color-text-primary); font-weight: var(--font-weight-medium); }
.lgh__t { color: var(--color-text-tertiary); }
.lgh__i { display: inline-grid; place-items: center; width: 13px; height: 13px; border: 1.25px solid currentColor; border-radius: 50%; font-size: 9px; font-style: normal; font-weight: var(--font-weight-semibold); vertical-align: -2px; }
.nsn { display: inline-flex; align-items: center; gap: 6px; margin-right: var(--space-2); font-size: var(--font-size-12); color: var(--color-status-warning-fg); text-decoration: none; white-space: nowrap; }
.nsn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-status-warning-solid); }
.nsn u { text-underline-offset: 2px; }
.nsn span::after { content: " ·"; }

/* No line under the title on the Directory: the title switch sits closer to the toolbar; the unset-rules notice tucks under it */
.hd1--nosub { margin-bottom: var(--space-5) !important; }

/* ── Period picker in the page head (picked: head right, before Export CSV) ── */
.ppslot { display: inline-flex; }
.ppslot--end { margin-left: auto; align-self: center; }
@media (max-width: 760px) {
  #ws .ppslot .pt { width: auto; padding: 0 var(--space-2) 0 var(--space-3); }
  #ws .ppslot .pt__t, #ws .ppslot .pt__chev { display: inline-flex; }
}

/* ── Quick filters: one "Filter" menu (ui.js checkMenu) + one removable token ── */
.qf { display: inline-flex; align-items: center; gap: var(--space-2); }
.qf__b { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 var(--space-3); border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); background: var(--color-bg-canvas); cursor: pointer; font-weight: var(--font-weight-medium); color: var(--color-text-primary); }
.qf__b svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; color: var(--color-text-secondary); }
.qf__b.is-on svg { color: var(--color-text-accent); }
.qf__b[aria-expanded="true"] { background: var(--color-bg-surface); }
.qf__n { color: var(--color-text-accent); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.qf__tok { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 6px 0 var(--space-2); border: 0; border-radius: var(--radius-xs); background: var(--color-bg-brand); color: var(--color-text-accent); font-size: var(--font-size-13); font-weight: var(--font-weight-medium); cursor: pointer; }
.qf__tok svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (hover: hover) and (pointer: fine) { .qf__b:hover { border-color: var(--color-border-strong); } .qf__tok:hover { background: color-mix(in srgb, var(--color-text-accent) 14%, var(--color-bg-canvas)); } }
.mnu__clear { display: block; padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-sm); background: none; color: var(--color-text-accent); font-size: var(--font-size-13); font-weight: var(--font-weight-medium); cursor: pointer; }
.mnu__clear:focus { background: var(--color-bg-surface); outline: none; }
.mnu__clear:focus-visible { box-shadow: inset 0 0 0 2px var(--color-border-focus); }

/* ── Compact menus (17 Nov, picked): one 32px line per item, 13px labels; descriptions live in a tooltip. ── */
.mnu--dense { min-width: 200px; padding: var(--space-1); font-size: var(--font-size-13); }
.mnu--qf { width: 220px; }
.mnu--dense .mnu__i { display: flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-2); }
.mnu--dense .mnu__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--font-weight-regular); }
.mnu--dense .mnu__i[aria-selected="true"] .mnu__t, .mnu--dense .mnu__i[aria-checked="true"] .mnu__t { font-weight: var(--font-weight-medium); }
.mnu--dense .mnu__c { flex: none; width: 14px; height: auto; }
.mnu--dense .mnu__c svg { width: 14px; height: 14px; }
/* Field menu (18 Nov): modest radius, hairline, DS overlay shadow; tick column aligned to the field text. Phone: bottom sheet. */
.mnu--dense { border-radius: var(--radius-sm); border-color: var(--color-border-default); }
.mnu--sheet { left: var(--space-2) !important; right: var(--space-2); bottom: calc(var(--space-2) + env(safe-area-inset-bottom)); top: auto !important; width: auto; max-width: none; min-width: 0; padding: var(--space-1); transform: translateY(8px); }
.mnu--sheet .mnu__i { height: 44px; font-size: var(--font-size-16); }
.mnu__cnt { flex: none; margin-left: auto; font-size: var(--font-size-12); color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
.mnu__box { flex: none; display: grid; place-items: center; width: 14px; height: 14px; border: 1.5px solid var(--color-border-control); border-radius: var(--radius-xs); }
.mnu__i[aria-checked="true"] .mnu__box { background: var(--color-bg-brand-strong); border-color: var(--color-bg-brand-strong); }
.mnu__box svg { width: 10px; height: 10px; fill: none; stroke: var(--color-text-on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mnu__h { display: flex; align-items: center; gap: var(--space-1); height: 28px; padding: 0 var(--space-2); font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.mnu__h .mnu__clear { padding: 0 2px; height: 22px; border-radius: var(--radius-xs); font-size: var(--font-size-12); }


/* Export CSV (17 Nov): secondary, with a download icon; the in-page period trigger matches its 34px height. */
.b--csv svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; color: var(--color-text-secondary); }
@media (hover: hover) and (pointer: fine) { .b--csv:hover svg { color: var(--color-text-primary); } }
#ws .ppslot .pt { height: 34px; }

/* Head actions (17 Nov): [token][Filter] [period] [Export CSV] … one height, one gap. At phone width they take their own row;
   Export goes icon-only so Filter + period + Export fit, and Publish / Jump wrap to the next line on the leaderboard. */
.acts { align-items: center; }
.acts .qf .qf__b, .acts .ppslot .pt, .acts .b { height: 34px; }
@media (max-width: 760px) {
  .ph .acts .qf { flex: none; }
  .ph .acts .ppslot { flex: 1 1 auto; min-width: 0; } #ws .ph .acts .ppslot .pt { width: 100%; justify-content: flex-start; } .ph .acts .ppslot .pt__chev { margin-left: auto; }
  .ph .acts .b--csv { flex: none; width: 34px; padding: 0; font-size: 0; gap: 0; }
  .ph .acts .b--csv svg { width: 16px; height: 16px; }
  .ph .acts .qf__tok { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ph .acts .nsn { flex-basis: 100%; }
}


/* ── Controls (one control row). Rhythm: tabs → key line 16px, key line → column headers 12px. ── */
.pad > .toolbar { margin-bottom: var(--space-4); }
.pad > .toolbar:empty { display: none; }
.pad > .toolbar + .legend, .pad > .toolbar + .lgh, .pad > .lgh { margin: 0 0 var(--space-3); }
.toolbar .end .search { width: 200px; min-width: 0; }
.msel__t { display: inline-flex; align-items: center; gap: 6px; }
.msel__ic { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--color-text-secondary); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.acts .msel.sel { height: 34px; }
@media (max-width: 760px) {
  .toolbar .end .search { width: auto; flex: 1; }
}
/* The title switch never shrinks; when the head actions run long (ctl 3 on the leaderboard) they wrap right-aligned instead. */
.hd1 { grid-template-columns: max-content minmax(0, 1fr); }
.hd1 .vwt { white-space: nowrap; flex-wrap: nowrap; }
.hd1 > .acts { justify-self: end; flex-wrap: wrap; justify-content: flex-end; row-gap: var(--space-2); }
@media (max-width: 760px) { .hd1 { grid-template-columns: minmax(0, 1fr); } .hd1 > .acts { justify-self: stretch; justify-content: flex-start; } }
.hd1 { align-items: start; }
.hd1 .vwt { min-height: 34px; align-items: center; }
.hd1__n { margin: 2px 0 0; }
.hd1__n .nsn { margin-right: 0; }
.lnk__due { display: block; margin-top: var(--space-1); font-size: var(--font-size-12); color: var(--color-text-tertiary); }

/* ── The line: dot-matrix chart (17 Nov). On/off colours follow the DS LED component (--led-on text-accent, --led-off). ── */
.dmx { --cell: 9px; --gap: 3px; --dm-on: var(--color-lilac-600); --dm-crest: var(--color-lilac-500); --dm-today: var(--color-text-accent); --dm-off: var(--color-bg-surface);
  display: flex; justify-content: space-between; align-items: flex-end; gap: var(--gap); }
.dmx__d { position: relative; display: flex; gap: var(--gap); padding: 0; border-radius: var(--radius-xs); outline-offset: 3px; cursor: default; }
.dmx__d.is-w2 { margin-left: var(--space-2); }
.dmx__d.is-w2::before { content: ""; position: absolute; left: calc(var(--space-2) * -1 / 2 - var(--gap) / 2 - 0.5px); top: 0; bottom: 0; border-left: 1px dashed var(--color-border-strong); }
.dmx__col { display: grid; gap: var(--gap); }
.dmx__col i { display: block; width: var(--cell); height: var(--cell); border-radius: var(--radius-xs); background: var(--dm-off); }
.dmx__col i.on { background: var(--dm-on); }
.dmx__col i.crest { background: var(--dm-crest); }
.dmx__d.is-today .dmx__col i.on { background: var(--dm-today); }
.dmx__d.is-today .dmx__col i.crest { background: var(--dm-on); }
.dmx.is-active .dmx__d:not(.is-on) { opacity: .6; }
.dmx__tt { position: absolute; z-index: 5; display: grid; gap: 4px; min-width: 170px; padding: var(--space-3); background: var(--color-bg-canvas); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); box-shadow: var(--elevation-overlay); font-size: var(--font-size-12); color: var(--color-text-secondary); pointer-events: none; white-space: nowrap; }
.dmx__tt b { font-size: var(--font-size-13); color: var(--color-text-primary); font-weight: var(--font-weight-semibold); margin-bottom: 2px; }
.dmx__tt span { display: flex; align-items: center; gap: 6px; }
.dmx__tt em { margin-left: auto; padding-left: var(--space-3); font-style: normal; color: var(--color-text-primary); font-weight: var(--font-weight-medium); }
.dmx__tt small { margin-top: 2px; padding-top: 6px; border-top: 1px solid var(--color-border-subtle); font-size: var(--font-size-12); color: var(--color-text-accent); }
.sq { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.sq--v { background: var(--color-text-accent); } .sq--c { background: var(--color-lilac-300); }
.lnc-w { position: relative; }
@media (forced-colors: active) { .dmx__col i { background: Canvas; border: 1px solid GrayText; } .dmx__col i.on { background: CanvasText; } }

/* ── The three leaderboard lists, neater (17 Nov): strict columns, one-weight signed deltas, a lilac line like the table's. ── */
.cl li[data-id] { grid-template-columns: 24px 24px minmax(0, 1fr) 56px 64px; column-gap: var(--space-2); min-height: 36px; }
.cl__rk { color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
.cl__s { text-align: right; font-variant-numeric: tabular-nums; font-weight: var(--font-weight-semibold); }
.cl__d { text-align: right; font-variant-numeric: tabular-nums; font-weight: var(--font-weight-regular); color: var(--color-text-secondary); font-size: var(--font-size-12); }
.cl li[data-id]:hover { background: none; }
@media (hover: hover) and (pointer: fine) { .cl li[data-id]:hover { background: var(--color-bg-surface); } }
.cl__line { height: 0; margin: 6px 0 10px; border-top: 1px solid var(--color-text-accent); }
.cl__line span { top: -8px; padding-left: 6px; color: var(--color-text-accent); font-size: var(--font-size-11); font-weight: var(--font-weight-medium); font-variant-numeric: tabular-nums; }
/* movers: rank · avatar · name · move (fixed) · was (fixed) */
.cl__mv { justify-self: end; gap: 2px; font-size: var(--font-size-12); font-variant-numeric: tabular-nums; font-weight: var(--font-weight-medium); }
.cl__x { display: inline-block; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: var(--color-text-accent); vertical-align: 1px; }
/* needs a decision: two lines, the action links in one right column */
.cl[aria-label="Needs a decision"] li[data-id] { grid-template-columns: 24px 24px minmax(0, 1fr) 56px; min-height: 0; padding-top: 6px; padding-bottom: 6px; }
.cl__a { grid-column: 4; justify-self: end; text-align: right; font-size: var(--font-size-12); }
.cl__why { grid-column: 3 / 4; }
/* footer links: one size, one gap */
.cl__more { display: block; margin-top: var(--space-3); padding: 0; border: 0; background: none; font-size: var(--font-size-12); line-height: 1.4; text-align: left; }

/* Lists, neater (round 2): ▲/▼ glyphs, quiet actions, one-line reasons, 36px rows, names at the table's row size, footers on one baseline */
.cl .nm__b { font-size: var(--row); }
.cl li[data-id] { min-height: 36px; }
.cl__mv { display: inline-flex; justify-content: flex-end; align-items: center; gap: 3px; width: 100%; }
.cl__mv i { font-size: 8px; font-style: normal; line-height: 1; }
.cl__mv.up { color: var(--color-text-primary); } .cl__mv.dn { color: var(--color-text-secondary); }
.cl__sub { padding: var(--space-3) 0 var(--space-1); font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.cl__sub:first-child { padding-top: 0; }
.cl[aria-label="Needs a decision"] li[data-id] { min-height: 36px; }
.cl[aria-label="Needs a decision"] li .cl__rk, .cl[aria-label="Needs a decision"] li .face { grid-row: 1 / 3; align-self: center; margin-top: 0; }
.cl__why { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl__a { grid-row: 1; align-self: center; }
.cl__act { padding: 0; border: 0; background: none; font: inherit; font-size: var(--font-size-12); font-weight: var(--font-weight-medium); color: var(--color-text-accent); text-decoration: none; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .cl__act:hover { text-decoration: underline; text-underline-offset: 2px; } }
.cl { display: flex; flex-direction: column; }
.cl > ul { flex: 1; }
.cl__more { margin-top: var(--space-3); font-size: var(--font-size-12); line-height: 1.4; color: var(--color-text-tertiary); }
.cl__ml { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .cl__ml:hover { color: var(--color-text-primary); } }
/* Leaderboard head stays on one row down to a ~900px pane: "Updated" folds into the period tooltip, Publish shortens */
@container page (min-width: 860px) { .hd1 > .acts { flex-wrap: nowrap; } }
@container page (max-width: 1180px) { .hd__upd { display: none; } .pub__x { display: none; } }
@container page (max-width: 1000px) { #ws .hd1 .ppslot .pt__name { display: none; } }
/* The line card: stat values never wrap; when the card is narrow the Seats/Eligible row drops under the score; the deadline breaks only at the "·" */
.lnk__top { flex-wrap: wrap; row-gap: var(--space-3); }
.lnk__f dd, .lnk__f dt { white-space: nowrap; }
.lnk__due span { white-space: nowrap; }
/* Narrow panes (761–960px, e.g. the drawer open at 1440): search collapses to a 34px icon and opens inline to 200px on click,
   focus or ⌘F, so tabs, search and sort stay on one row. It stays open while it holds a query; Esc closes it when empty. */
@container page (min-width: 761px) and (max-width: 960px) {
  .pad > .toolbar { flex-wrap: nowrap; }
  .pad > .toolbar .seg { flex: none; }
  .pad > .toolbar .end { flex: 0 1 auto; min-width: 0; }
  .toolbar .end .search { flex: 0 1 200px; min-width: 120px; transition: width 150ms var(--motion-easing-out), flex-basis 150ms var(--motion-easing-out); }
  .toolbar .end .msel.sel { flex: none; }
  .toolbar .end .search:not(:focus-within):not(.has-q) { flex: none; width: 34px; min-width: 34px; padding: 0; gap: 0; justify-content: center; cursor: pointer; }
  .toolbar .end .search:not(:focus-within):not(.has-q) input { width: 0; padding: 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .toolbar .end .search { transition: none; } }
.toolbar .search input { text-overflow: ellipsis; }

/* ── Applications (17 Nov, equal split) ── */
.ap-title { display: flex; align-items: baseline; gap: var(--space-2); margin: 0; font-family: var(--font-family-display); font-size: var(--font-size-24); line-height: 1.2; font-weight: var(--font-weight-semibold); letter-spacing: -0.01em; }
.ap-title .n { font-family: var(--font-family-body); font-size: var(--font-size-16); font-weight: var(--font-weight-regular); color: var(--color-text-tertiary); }
.ap-ph { margin-bottom: 0 !important; }
.ap-sub { font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.ap svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ap-w { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: var(--font-size-12); font-weight: var(--font-weight-medium); white-space: nowrap; }
.ap-w::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ap-w--bad { color: var(--color-status-danger-fg); } .ap-w--warn { color: var(--color-status-warning-fg); }
/* identity head (drawer anatomy) */
.ap .dw-head { --nav-w: 120px; }
.ap .dw-who h2 { font-size: inherit; }
.ap-x { padding-bottom: var(--space-8); }
.ap-sec { padding: var(--space-5) var(--space-5) 0; }
.ap-sec h3 { display: flex; align-items: baseline; gap: var(--space-2); margin: 0 0 var(--space-2); font-size: var(--font-size-13); font-weight: var(--font-weight-semibold); }
.ap-sec h3 .c { font-weight: var(--font-weight-regular); color: var(--color-text-tertiary); font-size: var(--font-size-12); }
.ap-note { margin: var(--space-5) var(--space-5) 0; }
.ap-fn { margin: var(--space-2) 0 0; font-size: var(--font-size-12); line-height: 1.45; color: var(--color-text-tertiary); }
.ap-pl { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--color-bg-surface); color: var(--color-text-secondary); }
.ap-pl svg { width: 15px; height: 15px; }
.ap-df { position: sticky; bottom: 0; background: var(--color-bg-canvas); }
/* queue + detail (18 Nov: narrow list + wide detail, see "Split panes" below) */
.ap--1 { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ap-top { flex: none; padding: var(--space-5) var(--pad) var(--space-4); }
.ap-qd { flex: 1; }
.ap-qd .qlist { scrollbar-width: none; } .ap-qd .qlist::-webkit-scrollbar { display: none; }
.ap-qd .db { padding: 0; scrollbar-width: none; } .ap-qd .db::-webkit-scrollbar { display: none; }
.ap-i { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.ap-i:hover { background: none; }
@media (hover: hover) and (pointer: fine) { .ap-i:hover { background: var(--color-bg-surface); } }
.ap-i[aria-selected="true"] { background: var(--color-bg-brand); }
.ap-i__x { flex: 1; min-width: 0; }
.ap-i__1 { display: flex; align-items: center; gap: var(--space-2); font-size: var(--row); }
.ap-i__1 b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--font-weight-semibold); }
.ap-d { margin-left: auto; flex: none; font-size: var(--font-size-12); color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; }
.ap-i__2 { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-3); margin-top: 2px; font-size: var(--font-size-12); color: var(--color-text-tertiary); white-space: nowrap; }
.ap-i__2 > span { display: inline-flex; align-items: center; gap: 4px; }
.ap-i__2 svg { width: 12px; height: 12px; }
.ap-d { display: inline-flex; align-items: center; gap: 6px; }
.ap-srci { display: inline-flex; color: var(--color-text-tertiary); }
.ap-srci svg { width: 12px; height: 12px; }
.ap-dh { position: sticky; top: 0; }
.ap-dh .mobback { margin-right: var(--space-2); }
@media (max-width: 760px) {
  .ap-top { padding: var(--space-4) var(--pad) var(--space-3); }
  .ap-sec { padding-left: var(--space-4); padding-right: var(--space-4); } .ap-note { margin-left: var(--space-4); margin-right: var(--space-4); }
}
.ap-qd .detail { --dw-pad: var(--space-5); }
.ap-sub { margin-left: 4px; }
.hd1__n .ap-sub:first-child { margin-left: 0; }



/* ── Content preview: compact rows + in-page viewer (17 Nov) ── */
.vrows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-border-subtle); }
.vrows li { border-bottom: 1px solid var(--color-border-subtle); }
.vr { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 76px; padding: 6px var(--space-2) 6px 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: var(--radius-sm); }
@media (hover: hover) and (pointer: fine) { .vr:hover { background: var(--color-bg-surface); } }
.vr:focus-visible { outline-offset: -2px; }
.vr__th { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-surface); }
.vr__th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vr__g { position: absolute; left: 3px; bottom: 3px; }
.vr__g .ap-pl { width: 16px; height: 16px; border-radius: 4px; background: color-mix(in srgb, var(--color-bg-canvas) 90%, transparent); }
.vr__g .ap-pl svg { width: 10px; height: 10px; }
.vr__p { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--color-neutral-1000) 35%, transparent); color: var(--color-neutral-0); opacity: 0; transition: opacity var(--motion-duration-fast) var(--motion-easing-standard); }
.vr__p svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.vr:focus-visible .vr__p { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .vr:hover .vr__p { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vr__p { transition: none; } }
.vr__x { flex: 1; min-width: 0; display: grid; gap: 2px; }
.vr__t { font-size: var(--row); font-weight: var(--font-weight-medium); color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr__m { font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.vr__v { flex: none; font-size: var(--font-size-12); color: var(--color-text-secondary); }
.vr__tag { flex: none; }
.vr.is-off .vr__th { border: 1px dashed var(--color-border-default); background: var(--color-bg-canvas); color: var(--color-text-tertiary); }
.vr.is-off .vr__th > svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.vr.is-off .vr__t { color: var(--color-text-secondary); }
.ev-rows { margin: var(--space-3) 0; }
/* the viewer */
#dlg.pv .pv-b { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.pv-pl { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius-md); overflow: hidden; background: var(--color-bg-surface); }
.pv-pl img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: color-mix(in srgb, var(--color-neutral-1000) 50%, transparent); color: var(--color-neutral-0); }
.pv-play svg { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; stroke: none; }
.pv-g { position: absolute; top: var(--space-2); left: var(--space-2); }
.pv-g .ap-pl { background: color-mix(in srgb, var(--color-bg-canvas) 88%, transparent); }
.pv-off { display: grid; place-items: center; height: 100%; padding: var(--space-4); text-align: center; font-size: var(--font-size-12); color: var(--color-text-tertiary); border: 1px dashed var(--color-border-default); border-radius: inherit; }
.pv-nav { position: absolute; top: 50%; margin-top: -16px; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--color-bg-canvas) 90%, transparent); }
.pv-nav--l { left: 6px; } .pv-nav--r { right: 6px; }
.pv-nav:disabled { opacity: 0; pointer-events: none; }
.pv-d dl { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--space-2) var(--space-3); margin: 0; font-size: var(--font-size-13); }
.pv-d dt { color: var(--color-text-tertiary); }
.pv-d dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pv-note { font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.pv-url { font-size: var(--font-size-12); color: var(--color-text-secondary); }
.pv-cap { margin: var(--space-4) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--color-border-subtle); font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.pv-of { margin: 2px 0 0; font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.pv-k { margin-right: auto; font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.pv-k kbd { margin: 0 1px; }
#dlg.pv .dlg__f .b svg, #openPost svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.75; }
#openPost svg { fill: currentColor; stroke: none; }
@media (max-width: 560px) { #dlg.pv .pv-b { grid-template-columns: minmax(0, 1fr); } .pv-pl { max-width: 220px; margin: 0 auto; width: 100%; } .pv-k { display: none; } }


/* ── Content examples: stat cards (17 Nov, picked) ── */
.cx-m { font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.cxn { margin: 0; padding: 2px 0 2px var(--space-3); border-left: 2px solid var(--color-text-accent); font-size: var(--font-size-14); line-height: 1.5; color: var(--color-text-primary); }
.cxn-t { margin: var(--space-2) 0 0 var(--space-3); font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.is-off svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.cx4 { list-style: none; margin: 0; padding: var(--space-3); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); border-radius: var(--radius-lg); background: var(--color-bg-surface); }
.cx4-c { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--color-bg-canvas); }
.cx4-h { display: flex; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.cx4-th { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-surface); }
.cx4-th img { width: 100%; height: 100%; object-fit: cover; }
.cx4-tt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cx4-tt b { font-size: var(--font-size-13); font-weight: var(--font-weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx4-o { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -4px 0 0; padding: 0; border: 0; border-radius: 50%; background: var(--color-bg-surface); color: var(--color-text-primary); cursor: pointer; }
.cx4-o svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .cx4-o:hover { background: var(--color-border-subtle); } }
.cx4-o:focus-visible { outline-offset: 2px; }
.cx4-b { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-top: auto; }
.cx4-k { display: grid; gap: 2px; }
.cx4-n { display: inline-flex; align-items: flex-start; gap: 4px; font-family: var(--font-family-display); font-size: var(--font-size-32, 32px); line-height: 1; font-weight: var(--font-weight-semibold); letter-spacing: -0.01em; }
.cx4-l { font-size: var(--font-size-12); color: var(--color-text-tertiary); }
.cx4-bw { flex: none; display: grid; justify-items: end; gap: 4px; }
.cx4-dm { display: flex; gap: 3px; }
.cx4-cap { font-size: var(--font-size-11); color: var(--color-text-tertiary); }
.cx4-top { display: inline-flex; align-items: center; height: 18px; margin-left: 6px; padding: 0 6px; border-radius: var(--radius-xs); background: var(--color-bg-brand); color: var(--color-text-accent); font-size: var(--font-size-11); font-weight: var(--font-weight-medium); vertical-align: 1px; }
.cx4-dm > span { display: grid; gap: 3px; }
.cx4-dm i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-lilac-50); }
.cx4-dm i.on { background: var(--color-text-accent); }
.cx4-c.is-off { background: color-mix(in srgb, var(--color-bg-canvas) 50%, var(--color-bg-surface)); color: var(--color-text-secondary); }   /* borderless, a step quieter than the live cards */
.cx4-c.is-off .cx4-th { color: var(--color-text-tertiary); background: var(--color-bg-surface); }
.cx4-c.is-off .cx4-b { flex-direction: column; align-items: flex-start; gap: 4px; }
@media (max-width: 760px) { .cx4 { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 560px) { .cx4 { grid-template-columns: minmax(0, 1fr); } }


/* ── Applicant detail: the refined original table ── */
.ada-t { width: 100%; border-collapse: collapse; font-size: var(--font-size-13); }
.ada-t th { height: 32px; padding: 0 var(--space-3) 0 0; border-bottom: 1px solid var(--color-border-default); text-align: left; font-size: var(--font-size-12); font-weight: var(--font-weight-medium); color: var(--color-text-tertiary); }
.ada-t td { height: 40px; padding: 0 var(--space-3) 0 0; border-bottom: 1px solid var(--color-border-subtle); }
.ada-t td:first-child { color: var(--color-text-secondary); width: 36%; }
.ada-t th:last-child, .ada-t td:last-child { padding-right: 0; text-align: right; }


/* ── Split panes (18 Nov) · after "Lumen AI Threads Dashboard" by @Shih29261Sheikh on X.
   White page (same as every tab); the queue is a narrow white pane, the detail a wide white pane beside it.
   Hairlines, radius-sm, no shadows, no grey fill inside the panes. Each pane scrolls on its own. ── */
.ap--1 { background: var(--color-bg-canvas); }   /* 18 Nov: Mikky — no grey page; white like every other tab */
.qd { --qd-gap: 0; grid-template-columns: var(--queue-w) minmax(0, 1fr); gap: var(--qd-gap); padding: 0 var(--pad) var(--space-4); background: var(--color-bg-canvas); }
.qd > .queue, .qd > .detail { min-height: 0; overflow: hidden; background: var(--color-bg-canvas); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-sm); }
.qd > .queue { border-right: 1px solid var(--color-border-subtle); }
/* 18 Nov: Mikky — no gap; one joined frame, a single line between list and detail */
.qd > .queue { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.qd > .detail { border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
/* queue head: title + count, or the filter */
.qh { flex: none; display: flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--color-border-subtle); }
.qh h2 { margin: 0; font-size: var(--font-size-13); font-weight: var(--font-weight-semibold); }
.qh__m { margin-left: auto; font-size: var(--font-size-12); color: var(--color-text-tertiary); white-space: nowrap; }
.qh--seg { padding: var(--space-3); }
.qh--seg .seg { display: flex; width: 100%; }
.qh--seg .seg button { flex: 1 1 auto; min-width: 0; padding: 0 var(--space-1); font-size: var(--font-size-12); }
/* rows: hairline-separated, the selected one in brand with the accent bar */
.qd .qlist { flex: 1; min-height: 0; overflow: auto; }
.qd .qi { padding: var(--space-3) var(--space-4); }
.qd .qi:last-child { border-bottom: 0; }
.qd .qi .l1 { flex-wrap: wrap; row-gap: 0; }
.qd .horizon { padding: 10px var(--space-4); background: var(--color-bg-canvas); }
/* detail: header bar over a hairline, body scrolls, actions pinned at the bottom */
.qd .detail { --dw-pad: var(--space-5); }
.qd .dh { padding: var(--space-4) var(--space-5); }
.qd .db { padding-left: var(--space-5); padding-right: var(--space-5); }
.qd .df { padding: var(--space-3) var(--space-5); }
.ap-dh { border-bottom: 1px solid var(--color-border-subtle); }
.ap-qd .db { padding: 0; }
@media (min-width: 761px) { .qd .dw-meta { white-space: normal; } .qd .dw-meta .n { white-space: nowrap; } }
@media (min-width: 761px) and (max-width: 1280px) { .qd .df .hint + .b { margin-left: auto; } }
@media (max-width: 1280px) {
  .qd { --qd-gap: 0; }
  .qh--seg { padding: var(--space-2); }
  .qd .df { flex-wrap: wrap; row-gap: var(--space-2); } .qd .df .hint { flex-basis: 100%; }
}
/* phone: the existing list-then-detail view, edge to edge on white */
@media (max-width: 760px) {
  .ap--1, .qd { background: var(--color-bg-canvas); }
  .qd { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; border-top: 1px solid var(--color-border-subtle); }
  .qd > .queue, .qd > .detail { border: 0; border-radius: 0; }
  .qd .qi, .qd .qh { padding-left: var(--space-4); padding-right: var(--space-4); }
  .qd .dh, .qd .df, .qd .db:not(.ap-x) { padding-left: var(--space-4); padding-right: var(--space-4); }
}

/* 18 Nov: queue filter = quiet text trigger, not a field (Mikky: "too big, make it neater") */
.qh .msel.sel { min-height: 0; height: 26px; padding: 0 20px 0 8px; margin-right: -8px; border: 0; border-radius: var(--radius-sm); background-color: transparent; background-position: right 6px center; background-size: 10px; font-size: var(--font-size-12); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); }
@media (hover: hover) and (pointer: fine) { .qh .msel.sel:hover { color: var(--color-text-primary); background-color: var(--color-bg-surface); } }
.qh .msel.sel[aria-expanded="true"] { color: var(--color-text-primary); }

/* 18 Nov: applicant detail fits at a glance (Mikky: "all info at a glance without having to scroll").
   Tighter screening rows; content examples in one row of small white cards, no grey tray. */
.ap-x .ap-sec { padding-top: var(--space-4); }
.ap-x .ada-t th { height: 28px; }
.ap-x .ada-t td { height: 32px; }
.ap-x .ap-note { margin-top: var(--space-4); }
.ap-x { padding-bottom: var(--space-5); }

/* 18 Nov (v2, Emil pass): screening strip on one 3-line grid. Label 12 tertiary · value 14 medium tabular · result 12 dot + text.
   Same gaps in every column; columns sized by their content; even 12px inside the top and bottom hairlines so the
   dividers stop short of both; one result style for every state, the dot carries the meaning (red is the only loud one). */
.ap-x .ap-figs { flex-wrap: wrap; row-gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--color-border-subtle); border-bottom: 1px solid var(--color-border-subtle); }
.ap-x .ap-figs > div { flex: 1 1 auto; display: grid; grid-template-rows: auto auto auto; align-content: start; }
.ap-x .ap-figs dt { font-size: var(--font-size-12); line-height: 16px; }
.ap-x .ap-figs dd { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-x .ap-figs dd.n { margin-top: var(--space-1); font-size: var(--font-size-14); line-height: 20px; font-weight: var(--font-weight-medium); letter-spacing: -0.005em; }
.ap-x .ap-figs dd.ap-figs__r { margin-top: var(--space-1); font-size: var(--font-size-12); line-height: 16px; font-weight: var(--font-weight-regular); }
.ap-r { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-secondary); }
.ap-r::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--color-text-disabled); }
.ap-r--ok::before { background: var(--color-status-success-solid); }
.ap-r--warn::before { background: var(--color-status-warning-solid); }
.ap-r--bad { color: var(--color-status-danger-fg); font-weight: var(--font-weight-medium); }
.ap-r--bad::before { background: var(--color-status-danger-solid); }
.ap-x .ap-figs + .ap-fn { margin-top: var(--space-3); }
/* 3 + 2 under ~820px of detail, 2 + 2 + 1 on phone: a real column grid so row 2 sits under row 1's columns.
   The first item of each row loses its divider; rows get a wider gap than the lines inside a stat. */
@container (max-width: 820px) { .ap-x .ap-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-5); } .ap-x .ap-figs > div:nth-child(4) { padding-left: 0; border-left: 0; } }
@container (max-width: 480px) { .ap-x .ap-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ap-x .ap-figs > div:nth-child(4) { padding-left: var(--space-4); border-left: 1px solid var(--color-border-subtle); } .ap-x .ap-figs > div:nth-child(odd) { padding-left: 0; border-left: 0; } }
.qd > .detail { container-type: inline-size; }

/* 18 Nov: no grey tray behind the content cards (Mikky: "remove that grey"); cards hold their edge with a hairline */
.cx4 { padding: 0; border-radius: 0; background: none; }
.cx4-c { border: 1px solid var(--color-border-subtle); }
.cx4-c.is-off { background: var(--color-bg-canvas); }

/* 18 Nov: Mikky — search outline "not neat": same hairline as the sort select next to it; focus = one shade darker, no halo */
.search { border-color: var(--color-border-default); }
.search:focus-within { border-color: var(--color-neutral-400, var(--color-border-strong)); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .search:hover:not(:focus-within) { border-color: var(--color-border-strong, var(--color-neutral-300)); } }

/* 26 Nov: long menus. Every select menu caps at min(360px, viewport − 32px) and scrolls inside (ui.js place() sets the side's
   max-height). Over 8 options: a filter field on top and the "All …" option pinned under it. Options may lead with a face
   (data-face) or a 16px pixel icon (data-icon), end on a muted count (data-count) and carry a tone (data-tone). */
.mnu { max-height: min(360px, calc(100vh - 32px)); overflow-y: auto; overscroll-behavior: contain; }
.mnu--lst { display: flex; flex-direction: column; overflow: hidden; }
.mnu--lst .mnu__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.mnu--long { width: 264px; }
.mnu--long .mnu__list { scroll-padding-top: 34px; }
.mnu__q { flex: none; height: 32px; min-width: 0; margin: 0 0 var(--space-1); padding: 0 var(--space-2); }
.mnu__q svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mnu__q input { font-size: var(--font-size-13); }
.mnu__q input::-webkit-search-cancel-button { display: none; }
.mnu__i--pin { position: sticky; top: 0; z-index: 1; background: var(--color-bg-canvas); box-shadow: 0 1px 0 var(--color-border-subtle); }
.mnu__i--pin:focus { background: var(--color-bg-surface); }
.mnu__none { margin: 0; padding: var(--space-3) var(--space-2); font-size: var(--font-size-13); color: var(--color-text-tertiary); }
.mnu__i[hidden] { display: none; }
.mnu__ic { flex: none; width: 16px; height: 16px; image-rendering: pixelated; }
.mnu .mnu__face { --fs: 20px; flex: none; }
.mnu .mnu__face .face__av { display: none; }
.mnu__face--img { display: inline-block; width: 20px; height: 20px; border-radius: 50%; overflow: hidden; }
.mnu__face--img img { width: 100%; height: 100%; object-fit: cover; }
.mnu .mnu__cnt { font-feature-settings: var(--font-feature-tabular); font-variant-numeric: tabular-nums; }
.mnu__i--accent .mnu__t { color: var(--color-text-accent); }
.mnu__i--danger .mnu__t { color: var(--color-status-danger-fg); }
.mnu__i--warning .mnu__t { color: var(--color-status-warning-fg); }
.mnu__i--success .mnu__t { color: var(--color-status-success-fg); }
.mnu--sheet { max-height: min(70vh, calc(100vh - 32px)); width: auto; }
.mnu--sheet .mnu__q { height: 44px; }
.mnu--sheet .mnu__q input { font-size: var(--font-size-16); }
.mnu--sheet.mnu--long .mnu__list { scroll-padding-top: 46px; }
