/* monetizar panel (ADR-031): system fonts only, no build step, light + dark via prefers-color-scheme. */

:root {
  color-scheme: light dark;

  /* colour tokens — light */
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #171b21;
  --muted: #545f6e;
  --border: #d5dbe3;
  --link: #0a6a5a;
  --primary: #0a6a5a;
  --primary-hover: #08574a;
  --on-primary: #ffffff;
  --danger: #b3261e;
  --danger-hover: #8f1e18;
  --on-danger: #ffffff;
  --focus: #1456c8;
  --shadow: 0 1px 2px rgb(16 24 40 / 8%);

  --ok-fg: #0b5a2b;
  --ok-bg: #ddf4e4;
  --warn-fg: #7a4a00;
  --warn-bg: #fdecc8;
  --bad-fg: #9a1b12;
  --bad-bg: #fde3e0;
  --info-fg: #1b4b8f;
  --info-bg: #dfeafa;
  --idle-fg: #3b4452;
  --idle-bg: #e6e9ee;

  /* spacing / shape / type */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --radius: 12px;
  --radius-sm: 8px;
  --touch: 44px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-big: 2rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #171b22;
    --surface-2: #202631;
    --text: #e8ebf0;
    --muted: #a1abb9;
    --border: #2d3441;
    --link: #62d6c0;
    --primary: #38c3a8;
    --primary-hover: #5fd6bf;
    --on-primary: #04201a;
    --danger: #ff8d84;
    --danger-hover: #ffaaa3;
    --on-danger: #2e0603;
    --focus: #8ab4ff;
    --shadow: none;

    --ok-fg: #86e3a6;
    --ok-bg: #12351f;
    --warn-fg: #f6c872;
    --warn-bg: #3a2a08;
    --bad-fg: #ffa59d;
    --bad-bg: #3c1512;
    --info-fg: #a2c6f7;
    --info-bg: #15283f;
    --idle-fg: #c3cad6;
    --idle-bg: #262c37;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--fs-base) / 1.5 var(--font);
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.25; margin: 0; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--s-3); }
code { font: 0.85em var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
pre { font: 0.85em / 1.45 var(--mono); background: var(--surface-2); padding: var(--s-3); border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-word; margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-3); top: -60px; background: var(--surface); color: var(--text); padding: var(--s-2) var(--s-4); border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: var(--s-2); }

/* ---- shell ---------------------------------------------------------------------- */

.wrap { max-width: 1080px; margin-inline: auto; padding-inline: var(--s-4); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; }
.brand { font-weight: 700; font-size: var(--fs-lg); letter-spacing: 0.01em; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--touch); }
.brand span { color: var(--primary); }
.bar-spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); }
.userbox .who { color: var(--muted); max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-toggle { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--touch); padding: 0 var(--s-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }

/* Mobile: the nav is a popover (native, no JS) hanging below the header. */
.nav { margin: 0; padding: var(--s-2) var(--s-4) var(--s-4); inset: 56px 0 auto 0; width: 100%; max-height: calc(100dvh - 56px); overflow: auto; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: 0 12px 24px rgb(0 0 0 / 18%); }
.nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.nav .sep { height: 1px; background: var(--border); margin: var(--s-2) 0; }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: var(--touch); padding: 0 var(--s-3); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 500; }
a.nav-link:hover { background: var(--surface-2); }
.nav-link[aria-current="page"] { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.nav-link[aria-disabled="true"] { color: var(--muted); cursor: not-allowed; }
.soon { font-size: 0.7rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--idle-bg); color: var(--idle-fg); }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .nav { display: block; position: static; inset: auto; width: auto; max-height: none; overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .nav ul { display: flex; gap: var(--s-1); align-items: center; }
  .nav .sep { width: 1px; height: 24px; margin: 0 var(--s-2); }
  .nav-link { padding: 0 var(--s-3); }
}

/* No Popover API (Safari < 17, Firefox < 125): hide the toggle and show the nav inline, wrapped. */
@supports not selector(:popover-open) {
  .nav-toggle { display: none; }
  .bar { flex-wrap: wrap; padding-block: var(--s-2); }
  .nav { position: static; width: 100%; max-height: none; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .nav ul { display: flex; flex-wrap: wrap; gap: var(--s-1); }
  .nav .sep { display: none; }
}

main { padding-block: var(--s-5) var(--s-6); min-height: 60vh; }
.site-footer { padding-block: var(--s-5); color: var(--muted); font-size: var(--fs-sm); border-top: 1px solid var(--border); }

.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-4); }
.footer-legal a, .legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---- public pages: login, privacy, terms ------------------------------------------- */

.public-bar { padding-block: var(--s-4); }
.public-bar .brand { display: inline-flex; }
.legal { max-width: 720px; }
.legal h1 { font-size: 1.625rem; margin-bottom: var(--s-2); }
.legal h2 { font-size: 1.125rem; margin-top: var(--s-5); margin-bottom: var(--s-2); }
.legal ul { padding-left: 1.25rem; }
.legal section + section { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--border); }
.lang-switch { display: flex; gap: var(--s-3); margin-bottom: var(--s-4); font-weight: 600; }
/* company site (ADR-073) */
.public-links { display: flex; gap: var(--s-4); font-size: var(--fs-sm); }
.public-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; min-height: var(--touch); display: inline-flex; align-items: center; }
.legal.company { max-width: 920px; }
.company .card { padding: var(--s-3) var(--s-4); }
.company .card h3 { margin-bottom: var(--s-2); }
.company .card p { margin: 0; }
.company-lead { font-size: var(--fs-xl); margin: var(--s-2) 0 var(--s-4); }
.company-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-2) !important; }
.company-facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-1) var(--s-4); margin: 0 0 var(--s-3); }
.company-facts dt { color: var(--muted); }
.company-facts dd { margin: 0; overflow-wrap: anywhere; }
.login-box { max-width: 460px; margin: var(--s-6) auto 0; text-align: center; }
.login-box .btn { margin-block: var(--s-4); }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.page-head h1 { font-size: 1.625rem; }
.page-head p { margin: 0; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }

/* ---- flash ---------------------------------------------------------------------- */

.flash-slot { min-height: 0; }
.flash { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--radius); border: 1px solid; margin-bottom: var(--s-4); font-weight: 500; }
.flash::before { font-weight: 700; flex: none; }
.flash.ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-fg); }
.flash.ok::before { content: "✓"; }
.flash.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-fg); }
.flash.warn::before { content: "!"; }
.flash.error { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-fg); }
.flash.error::before { content: "✕"; }

/* ---- cards, grids ------------------------------------------------------------------ */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4); box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: var(--s-4); }
.card h2 { margin-bottom: var(--s-3); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-3); }
.card-head h2 { margin: 0; }

.grid { display: grid; gap: var(--s-3); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid.fit-sm { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---- stat tiles ------------------------------------------------------------------- */

.stat { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3) var(--s-4); color: inherit; text-decoration: none; box-shadow: var(--shadow); min-width: 0; }
a.stat:hover { border-color: var(--primary); }
.stat .label { display: block; color: var(--muted); font-size: var(--fs-sm); }
.stat .num { display: block; font-size: var(--fs-big); font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .sub { display: block; font-size: var(--fs-sm); color: var(--muted); }
.stat.hero { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.stat.hero.attention { background: var(--warn-bg); border-color: var(--warn-fg); }
.stat.hero.attention .label, .stat.hero.attention .sub { color: var(--warn-fg); }
.stat.hero.attention .num { color: var(--warn-fg); font-size: 2.75rem; }
.stat.bad .num { color: var(--bad-fg); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--idle-fg); }
.dot.ok { background: var(--ok-fg); }
.dot.bad { background: var(--bad-fg); }

/* ---- pills ----------------------------------------------------------------------- */

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--idle-bg); color: var(--idle-fg); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentcolor; opacity: 0.85; }
.pill.ok { background: var(--ok-bg); color: var(--ok-fg); }
.pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill.bad { background: var(--bad-bg); color: var(--bad-fg); }
.pill.info { background: var(--info-bg); color: var(--info-fg); }
.pill.kids { background: var(--info-bg); color: var(--info-fg); }
.pill.kids::before, .pill.heat::before { display: none; }
@keyframes pulse { 50% { opacity: 0.25; } }
.pill.live::before { animation: pulse 1.4s ease-in-out infinite; }

/* ---- buttons / forms ------------------------------------------------------------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--touch); padding: 0 var(--s-4); border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--on-danger); }
.btn.big { min-height: 52px; font-size: var(--fs-lg); }
.btn.block { width: 100%; }
.btn[disabled], .btn.htmx-request { opacity: 0.6; cursor: progress; }
form.inline { display: inline; }

/* spinner shown while an htmx request is in flight (hx-indicator / .htmx-request) */
.spin { display: none; width: 1em; height: 1em; border: 2px solid currentcolor; border-right-color: transparent; border-radius: 50%; animation: rot 0.8s linear infinite; }
.htmx-request .spin, .htmx-request.spin { display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

.field { margin-bottom: var(--s-4); }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: var(--s-1); }
.field .req { color: var(--danger); }
.field .help { display: block; color: var(--muted); font-size: var(--fs-sm); margin-top: var(--s-1); }
input[type="text"], input[type="number"], select, textarea { width: 100%; min-height: var(--touch); padding: var(--s-2) var(--s-3); border: 1px solid var(--muted); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
textarea { min-height: 88px; resize: vertical; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3) var(--s-4) var(--s-1); margin: 0 0 var(--s-4); min-width: 0; }
legend { font-weight: 700; padding: 0 var(--s-2); }
.fields-row { display: grid; gap: 0 var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.check { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.check input { width: 24px; height: 24px; flex: none; margin: 2px 0 0; accent-color: var(--primary); }
.check label { margin: 0; font-weight: 600; }
.check ul { margin: var(--s-2) 0 0; padding-left: 1.2em; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }

/* narration voice picker: one radio per voice, with an audition player when a sample exists (ADR-048) */
.voice-list { display: grid; gap: var(--s-2); border: 0; padding: 0; margin: 0; min-width: 0; }
.voice-list legend { padding: 0; margin-bottom: var(--s-1); }
.voice-opt .voice-body { flex: 1; min-width: 0; display: grid; gap: var(--s-1); }
.voice-opt .voice-name { font-weight: 600; }
.voice-opt audio { width: 100%; min-height: var(--touch); }

/* rejection category picker: radios side by side, wrapping on a phone (ADR-069) */
.cat-list { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); border: 0; padding: 0; margin: 0 0 var(--s-3); min-width: 0; }
.cat-list legend { padding: 0; margin-bottom: var(--s-1); width: 100%; }
.cat-list .check { margin: 0; }

/* ---- chips ----------------------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-3); padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); padding: 0 var(--s-3); border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.chip:hover { background: var(--surface-2); }
.chip[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip .n { font-weight: 400; opacity: 0.85; font-variant-numeric: tabular-nums; }
.filter-label { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; margin: 0 0 var(--s-1); }

/* ---- empty states ---------------------------------------------------------------- */

.empty { text-align: center; padding: var(--s-6) var(--s-4); border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.empty h3 { margin-bottom: var(--s-2); }
.empty p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.empty .btn { margin-top: var(--s-2); }

/* ---- new agent card (copy-paste commands) ---------------------------------------------- */

.new-agent { margin-bottom: var(--s-4); }
.new-agent > summary { cursor: pointer; min-height: var(--touch); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); }
.new-agent[open] > summary { margin-bottom: var(--s-3); }
.new-agent pre { overflow-x: auto; white-space: pre; word-break: normal; margin-bottom: var(--s-2); }
.new-agent .btn { min-height: 36px; }

/* ---- responsive table → cards -------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table.rt { width: 100%; border-collapse: collapse; }
table.rt th { text-align: left; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; padding: var(--s-2) var(--s-3); border-bottom: 2px solid var(--border); }
table.rt td { padding: var(--s-3); border-bottom: 1px solid var(--border); vertical-align: top; }
@media (max-width: 719px) {
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.rt tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-2) var(--s-3); margin-bottom: var(--s-3); box-shadow: var(--shadow); }
  table.rt td { border: 0; padding: var(--s-1) 0; }
  table.rt td[data-label]::before { content: attr(data-label); display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
  table.rt td.title-cell { font-size: var(--fs-lg); }
}

/* ---- expandable rows (jobs, agents) ---------------------------------------------------- */

.rows { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.rows-head { display: none; }
.row { border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row:target { outline: 3px solid var(--focus); outline-offset: -3px; }
.row > summary { list-style: none; cursor: pointer; padding: var(--s-3) var(--s-4); min-height: var(--touch); display: grid; gap: var(--s-1) var(--s-3); grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.row > summary::-webkit-details-marker { display: none; }
.row > summary:hover { background: var(--surface-2); }
.row[open] > summary { background: var(--surface-2); }
.row .r-main { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.row .r-state { justify-self: end; }
.row .r-meta { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: 0 var(--s-3); }
.row .r-err { grid-column: 1 / -1; color: var(--bad-fg); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.row .more { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--link); font-weight: 600; }
.row .more::after { content: " ▾"; }
.row[open] .more::after { content: " ▴"; }
.row[open] .r-err { display: none; }
.row[open] .more .when-closed, .row:not([open]) .more .when-open { display: none; }
.row-body { padding: var(--s-3) var(--s-4) var(--s-4); display: grid; gap: var(--s-3); }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s-1) var(--s-4); margin: 0; font-size: var(--fs-sm); }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.err-box { border-left: 4px solid var(--bad-fg); background: var(--bad-bg); color: var(--bad-fg); padding: var(--s-3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.err-box pre { background: transparent; padding: 0; color: inherit; }

@media (min-width: 720px) {
  .rows-head, .row > summary { grid-template-columns: var(--cols); }
  .rows-head { display: grid; gap: var(--s-3); padding: var(--s-2) var(--s-4); background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
  .row > summary { align-items: start; }
  .row .r-state { justify-self: start; }
  .row .r-meta { grid-column: auto; display: contents; }
  .row .r-meta > * { color: var(--muted); }
  .row .r-err, .row .more { grid-column: 1 / -1; }
  .rows.jobs { --cols: minmax(0, 1.4fr) 130px minmax(0, 1fr) minmax(0, 1.2fr) 100px; }
  .rows.agents { --cols: minmax(0, 1.4fr) 110px 90px minmax(0, 1fr) minmax(0, 1.4fr); }
}

/* ---- topic cards ----------------------------------------------------------------------- */

.topic { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4); box-shadow: var(--shadow); display: grid; gap: var(--s-3); grid-template-columns: auto minmax(0, 1fr); }
.topic + .topic { margin-top: var(--s-3); }
.topic.decided-approved { border-color: var(--ok-fg); }
.topic.decided-rejected { opacity: 0.75; }
.score { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: var(--radius); background: var(--idle-bg); color: var(--idle-fg); font-size: 1.75rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.score small { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-top: 2px; }
.score.hi { background: var(--ok-bg); color: var(--ok-fg); }
.score.mid { background: var(--warn-bg); color: var(--warn-fg); }
.topic-title { font-weight: 700; font-size: var(--fs-lg); line-height: 1.3; overflow-wrap: anywhere; }
.topic-title a { color: var(--text); }
.angle { background: var(--info-bg); color: var(--info-fg); border-radius: var(--radius-sm); padding: var(--s-2) var(--s-3); font-weight: 600; }
.angle small { display: block; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.7rem; opacity: 0.9; }
.topic-body { grid-column: 1 / -1; display: grid; gap: var(--s-2); }
.topic-meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); color: var(--muted); font-size: var(--fs-sm); align-items: center; }
.topic-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.topic-actions form { margin: 0; }
.topic-notice { grid-column: 1 / -1; font-weight: 600; padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm); }
.topic-notice.ok { background: var(--ok-bg); color: var(--ok-fg); }
.topic-notice.error { background: var(--bad-bg); color: var(--bad-fg); }
.topic.htmx-swapping { opacity: 0.5; transition: opacity 0.15s; }
@media (min-width: 720px) {
  .topic { grid-template-columns: auto minmax(0, 1fr) 220px; align-items: start; }
  .topic-body { grid-column: 2; }
  .topic-actions { grid-column: 3; grid-row: 1 / span 2; grid-template-columns: 1fr; align-content: start; }
  .topic-notice { grid-column: 2 / -1; }
}

/* ---- identity proposals -------------------------------------------------------------------- */

.proposals { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.proposal { display: flex; flex-direction: column; gap: var(--s-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4); box-shadow: var(--shadow); }
.proposal .pname { font-size: var(--fs-xl); font-weight: 800; line-height: 1.2; }
.proposal .tag { margin: 0; font-style: italic; }
.palette { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.palette .sw { padding: 18px 0 6px; text-align: center; font: 600 0.65rem var(--mono); }
.palette .sw span { background: rgb(255 255 255 / 85%); color: #111; border-radius: 3px; padding: 0 3px; }
.proposal .spec { display: grid; gap: var(--s-2); font-size: var(--fs-sm); }
.proposal .spec dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.proposal .spec dd { margin: 0; }
.proposal .actions { margin-top: auto; }
.tags { color: var(--muted); font-size: var(--fs-sm); }

.wait { display: grid; gap: var(--s-3); }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.progress.indeterminate > i { width: 35%; animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { from { margin-left: -35%; } to { margin-left: 100%; } }

.row-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.row-actions form { margin: 0; }

.palette-inline { display: inline-flex; vertical-align: middle; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.palette-inline i { width: 22px; height: 22px; display: block; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list .li-top { display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
/* operational checklist of the home (M7-b): icon, text, one action */
.list .pend-item { display: flex; align-items: center; gap: var(--s-3); }
.pend-item .pend-icon { color: var(--muted); display: inline-flex; flex: none; }
.pend-item .pend-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pend-item .btn { flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---- small additions ---------------------------------------------------------------------- */

.when-loading { display: none; }
.htmx-request .when-loading { display: inline; }
.htmx-request .when-idle { display: none; }
.topic-head { min-width: 0; display: grid; gap: var(--s-2); justify-items: start; align-content: start; }
.topic-actions form:only-child { grid-column: 1 / -1; }
.topics { margin-top: var(--s-4); }

/* ---- scripts (M3-D) ------------------------------------------------------------------------- */

.score.dur { font-size: 1.5rem; }
.score.dur.hi { background: var(--ok-bg); color: var(--ok-fg); }
.script-card .angle { font-weight: 500; }
.segments { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.segment { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: var(--s-3); display: grid; gap: var(--s-2); }
.segment { scroll-margin-top: 72px; }
.segment:target { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-3); }
.seg-text { margin: 0; font-size: var(--fs-lg); line-height: 1.45; overflow-wrap: anywhere; }
.seg-audio { display: grid; gap: var(--s-1); }
.seg-audio audio { width: 100%; min-height: var(--touch); }
.seg-meta { font-size: var(--fs-sm); }
ol.plain { margin: 0; padding-left: 1.2em; }
[data-play-all] .when-playing { display: none; }
[data-play-all][aria-pressed="true"] .when-playing { display: inline; }
[data-play-all][aria-pressed="true"] .when-stopped { display: none; }
#script-view .topic-notice { margin-bottom: 0; }
.topic-actions > a:only-child { grid-column: 1 / -1; }

/* ---- script media candidates (M3-E) ---------------------------------------------------------- */

.seg-media { display: grid; gap: var(--s-2); }
.seg-media-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-3); }
.media-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s-3); }
.media-item { display: grid; gap: 2px; align-content: start; min-width: 0; overflow-wrap: anywhere; }
.media-item a { display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.media-item img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; max-height: 200px; }
.media-ph { display: grid; place-items: center; text-align: center; aspect-ratio: 9 / 16; max-height: 200px; font-size: var(--fs-sm); color: var(--muted); padding: var(--s-2); }
.media-attr { font-style: italic; }
.seg-actions { margin-top: 0; align-items: start; }
.seg-edit { flex: 1 1 100%; }
.seg-edit > summary { cursor: pointer; min-height: var(--touch); display: flex; align-items: center; color: var(--muted); }
.seg-edit form { margin-top: var(--s-2); }
.media-item form { margin: var(--s-1) 0 0; }
.media-item .pill { white-space: normal; border-radius: var(--radius-sm); } /* narrow column */
.seg-rerender { margin-top: var(--s-2); }

/* ---- videos (M4-A2) -------------------------------------------------------------------------- */

.video-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--s-4); }
.video-card { display: grid; gap: var(--s-2); align-content: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-3); box-shadow: var(--shadow); min-width: 0; }
.video-cover { display: block; position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); aspect-ratio: 9 / 16; border: 1px solid var(--border); }
.video-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-cover .media-ph { height: 100%; max-height: none; }
.video-dur { position: absolute; right: var(--s-2); bottom: var(--s-2); background: rgb(0 0 0 / 72%); color: #fff; padding: 2px var(--s-2); border-radius: 4px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.video-card-title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.video-layout { display: grid; gap: var(--s-4); }
@media (min-width: 760px) { .video-layout { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; } }
.video-player video { display: block; width: 100%; max-height: 75vh; aspect-ratio: 9 / 16; background: #000; border-radius: var(--radius-sm); }
.video-side { display: grid; gap: var(--s-4); align-content: start; min-width: 0; }
.video-side > .card + .card { margin-top: 0; }
pre.credits { max-height: 16em; overflow: auto; }
.video-warn { color: var(--warn-fg); }

/* ---- review and publish (M5-A) -------------------------------------------------------------- */

input[type="url"], input[type="datetime-local"] { width: 100%; min-height: var(--touch); padding: var(--s-2) var(--s-3); border: 1px solid var(--muted); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
kbd { display: inline-block; min-width: 1.5em; padding: 0 5px; border: 1px solid currentcolor; border-radius: 4px; font: inherit; font-size: var(--fs-sm); text-align: center; opacity: 0.85; }
.counter { font-weight: 400; font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--bad-fg); font-weight: 700; }
.review-notes { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: grid; gap: var(--s-1); }
.reject-form { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.publish-head { display: flex; gap: var(--s-4); align-items: flex-start; margin-bottom: var(--s-3); }
.publish-cover { flex: none; width: 88px; }
.publish-cover img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.publish-title { min-width: 0; flex: 1; }
.publish-title h3 { margin: 0 0 var(--s-1); overflow-wrap: anywhere; }
.platform-block { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s-3) var(--s-4); margin-top: var(--s-3); }
.platform-block > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); min-height: var(--touch); }
.platform-block[open] > summary { margin-bottom: var(--s-3); }
.copy-row { display: flex; gap: var(--s-2); align-items: flex-start; }
.copy-row input, .copy-row textarea { flex: 1; min-width: 0; }
.copy-row .btn { flex: none; }
.publish-form { margin-top: var(--s-3); }
.inline-skip { margin-top: var(--s-2); }
.auto-box { background: var(--info-bg); color: var(--info-fg); border-radius: var(--radius, 8px); padding: var(--s-2) var(--s-3); margin-bottom: var(--s-3); }
.auto-box p { margin: var(--s-1) 0; }
.auto-box form { display: inline; }
.finish-form { margin-top: var(--s-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }

/* ---- "A publicar" as a queue (UX-2, ADR-077) ---------------------------------------------- */

.queue { list-style: none; margin: 0 0 var(--s-4); padding: 0; }
.queue-row { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3); }
.queue-cover { flex: none; width: 44px; }
.queue-cover img { display: block; width: 44px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.queue-main { min-width: 0; flex: 1; }
.queue-title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.queue-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); margin: var(--s-1) 0; }
.queue-pills { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); list-style: none; margin: var(--s-1) 0 0; padding: 0; }
.queue-pills .pill::before { display: none; }
.queue-pills .q-blocked, .queue-pills .q-skipped { opacity: 0.6; }
.queue-pills .q-hand { outline: 2px solid currentcolor; outline-offset: 1px; }
.ch-tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; }
.ch-tag::before, .ch-dot { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ch, var(--primary)); flex: none; }
.queue-wait > summary { cursor: pointer; min-height: var(--touch); display: flex; align-items: center; font-weight: 600; color: var(--link); }
.queue-wait[open] > summary { margin-bottom: var(--s-3); }
.queue-block { margin-bottom: var(--s-3); }
.queue-block form { display: inline; margin-left: var(--s-2); }
.platform-card { overflow-wrap: anywhere; }
.platform-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.hand-steps { margin: 0 0 var(--s-3); padding-left: var(--s-5); display: grid; gap: var(--s-3); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; min-height: 0; }

/* ---- metrics (M5-B) ------------------------------------------------------------------ */

input[type="date"] { width: 100%; min-height: var(--touch); padding: var(--s-2) var(--s-3); border: 1px solid var(--muted); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.rt th.num-cell { text-align: right; }
table.rt tr.group-total td { background: var(--surface-2); font-weight: 600; }
.metric-form { margin-top: var(--s-2); }
.metric-form > summary { cursor: pointer; min-height: var(--touch); display: flex; align-items: center; color: var(--primary); font-weight: 600; font-size: var(--fs-sm); }
.metric-fields { display: grid; gap: 0 var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); align-items: end; margin-top: var(--s-2); }
.metric-submit { display: flex; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin: 0; padding: 0; list-style: none; }
.bars li { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.bars .bar-fill { display: block; background: var(--primary); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars li.zero .bar-fill { background: var(--border); }
.bar-axis { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--muted); margin-top: var(--s-1); }
.digest-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: inherit; font-size: var(--fs-sm); }

/* ---- icon buttons (UX-1, ADR-072) --------------------------------------------------------- */

.icon { flex: none; vertical-align: middle; }
.btn .icon { pointer-events: none; }
.help-more { margin-top: var(--s-2); color: var(--muted); font-size: var(--fs-sm); }
.help-more > summary { cursor: pointer; min-height: var(--touch); display: flex; align-items: center; color: var(--link); font-weight: 600; }
.help-more > p, .help-more > div { margin: 0 0 var(--s-2); }
@media (max-width: 640px) {
  .icon-btn { padding: 0 var(--s-3); min-width: var(--touch); }
  .icon-btn .btn-label { display: none; }
}

/* ---- decide mode: one card at a time (UX-1, ADR-072) ------------------------------------------ */

.decide { max-width: 520px; margin-inline: auto; padding-bottom: 112px; }
.decide-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); }
.decide-head h1 { font-size: var(--fs-xl); margin: 0; }
.decide-count { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.mode-switch { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.mode-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--touch); min-height: var(--touch); color: var(--text); background: var(--surface); text-decoration: none; }
.mode-switch a[aria-current="true"] { background: var(--primary); color: var(--on-primary); }
.decide .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--s-1); margin-bottom: var(--s-2); scrollbar-width: none; }
.decide .chip { flex: none; white-space: nowrap; }

.decide-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform 0.2s ease; will-change: transform; }
.decide-card.dragging { transition: none; cursor: grabbing; }
.decide-card .decide-detail { user-select: text; -webkit-user-select: text; }
.channel-strip { height: 6px; background: var(--ch, var(--primary)); }
.channel-tag { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3) 0; min-width: 0; }
.channel-dot { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ch, var(--primary)); color: #fff; font-weight: 700; font-size: var(--fs-sm); text-shadow: 0 1px 1px rgb(0 0 0 / 35%); }
.channel-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.decide-body { padding: var(--s-3); display: grid; gap: var(--s-3); }
.decide-title { margin: 0; font-size: var(--fs-lg); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.decide-title-row { display: flex; align-items: flex-start; gap: var(--s-2); }
.decide-title-row .decide-title { flex: 1; min-width: 0; }
.decide-title-row a { flex: none; display: grid; place-items: center; min-width: var(--touch); min-height: var(--touch); margin: -10px -6px 0 0; color: var(--link); }
.decide-pills { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.decide-pills .score { width: auto; height: auto; flex-direction: row; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 700; }
.decide-pills .score small { margin: 0; font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; font-weight: 600; }
.decide-pills .pill::before { display: none; }
.decide-pills button.pill { border: 0; font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; min-height: 28px; }
.decide-player { background: #000; }
.decide-player video, .decide-player .media-ph { display: block; width: 100%; max-height: 46dvh; aspect-ratio: 9 / 16; margin-inline: auto; object-fit: contain; background: #000; }
.decide-player .media-ph { color: #ccc; }
.decide-detail { border-top: 1px solid var(--border); padding: 0 var(--s-3) var(--s-3); }
.decide-detail > summary { cursor: pointer; min-height: var(--touch); display: flex; align-items: center; gap: var(--s-2); color: var(--link); font-weight: 600; }
.decide-detail .field { margin-bottom: var(--s-3); }
.decide-detail h3 { font-size: var(--fs-base); margin: var(--s-3) 0 var(--s-2); }
.decide-stamp { position: absolute; top: 40px; z-index: 2; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 4px solid currentcolor; background: rgb(255 255 255 / 85%); opacity: 0; pointer-events: none; }
.decide-stamp .icon { width: 40px; height: 40px; stroke-width: 3; }
.decide-stamp.ok { left: 16px; color: var(--ok-fg); transform: rotate(-12deg); }
.decide-stamp.bad { right: 16px; color: var(--bad-fg); transform: rotate(12deg); }
@media (prefers-color-scheme: dark) { .decide-stamp { background: rgb(0 0 0 / 70%); } }
.decide-bar { position: fixed; inset: auto 0 0 0; z-index: 20; display: flex; justify-content: center; gap: var(--s-4); padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); }
.decide-bar .btn { min-width: 72px; min-height: 56px; }
.decide-bar .btn.round { flex: 1; max-width: 168px; }
.decide-bar .btn .icon { width: 28px; height: 28px; }
.decide-bar .btn.approve { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.decide-bar .btn.reject { border-color: var(--danger); color: var(--danger); background: transparent; }
.decide-bar .btn.more { flex: none; }
.decide-bar .btn-label { display: none; }
@media (min-width: 641px) { .decide-bar .btn-label { display: inline; } }
.decide-hint { color: var(--muted); font-size: var(--fs-sm); text-align: center; margin: var(--s-3) 0 0; }
.decide-toast { position: fixed; inset: auto var(--s-4) 96px; z-index: 30; max-width: 488px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4); border-radius: var(--radius); background: var(--text); color: var(--bg); box-shadow: 0 4px 16px rgb(0 0 0 / 30%); animation: toast-out 0.2s ease 5.8s forwards; }
.decide-toast form { margin: 0; }
.decide-toast .btn { background: transparent; color: inherit; border-color: currentcolor; }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }

.sheet { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; background: var(--surface); color: var(--text); border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -8px 32px rgb(0 0 0 / 35%); }
.sheet::backdrop { background: rgb(0 0 0 / 50%); }
.sheet-inner { max-width: 520px; margin-inline: auto; padding: var(--s-4) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom)); display: grid; gap: var(--s-3); }
.sheet h2 { margin: 0; font-size: var(--fs-lg); }
.sheet-cats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin: 0; padding: 0; border: 0; }
.sheet-cats .cat { position: relative; }
.sheet-cats input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sheet-cats label { display: flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 56px; padding: 0 var(--s-3); border: 2px solid var(--border); border-radius: 999px; background: var(--surface-2); font-weight: 700; text-align: center; }
.sheet-cats input:checked + label { border-color: var(--danger); background: var(--bad-bg); color: var(--bad-fg); }
.sheet-cats input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.sheet-cats kbd { opacity: 0.6; }
.sheet-actions { display: flex; gap: var(--s-3); }
.sheet-actions .btn { flex: 1; min-height: 52px; }
.sheet-actions .btn.danger:not([disabled]) { background: var(--danger); color: var(--on-danger); }

@media (prefers-reduced-motion: reduce) {
  .decide-card { transition-duration: 0.05s; }
}

.decide-bar form { flex: 1; max-width: 168px; margin: 0; display: flex; }
.decide-bar form .btn { flex: 1; }
.decide-player { position: relative; }
.decide-player .play-toggle { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(0 0 0 / 55%); color: #fff; cursor: pointer; transition: opacity 0.15s; }
.decide-player .play-toggle .icon { width: 36px; height: 36px; fill: currentcolor; }
.decide-player.playing .play-toggle { opacity: 0; }
.decide-player.playing .play-toggle:focus-visible { opacity: 1; }
.decide-toast.error { background: var(--bad-fg); color: var(--bad-bg); }
.decide-empty { margin-top: var(--s-4); }
.decide-pills .pill .icon { width: 14px; height: 14px; }
html:has(.decide) { overflow-x: hidden; }
.decide { overflow-x: clip; overflow-y: visible; }

/* ---- channel page tabs (UX-3, ADR-078) ------------------------------------------------------- */
/* without JavaScript every panel stays visible, stacked; channel.js adds .tabs-ready to <html> */

.tabs { margin: var(--s-3) 0; }
.tabs .chips { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 0; padding-bottom: var(--s-1); scrollbar-width: none; }
.tabs .chips li { flex: none; }
.tabs [role="tab"] { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--s-3); border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.tabs [role="tab"]:hover { background: var(--surface-2); }
.tabs [role="tab"][aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
html.tabs-ready .tab-panel:not(.is-active) { display: none; }
.tab-panel > .card + .card, .tab-panel + .tab-panel { margin-top: var(--s-4); }
html.tabs-ready .tab-panel + .tab-panel { margin-top: 0; }
.tab-panel { scroll-margin-top: var(--s-3); }
.sit li.warn .small { color: var(--warn-fg); }
.sit li .li-top a { min-height: var(--touch); display: inline-flex; align-items: center; }
