/* Layout: slim left nav, a working area that scrolls, the Claude panel on the right.
   One blue (Upside Blue) for the one action that matters on a screen. Hairlines, not shadows. Ids and tool names in mono. */
:root {
  --bg: #F5F6FA; --surface: #FFFFFF; --sunken: #EEF0F6;
  --ink: #181819; --ink-2: #474A57; --ink-3: #5F6375;
  --line: #DFE2EC; --line-strong: #C5C9D8;
  --brand: #0047FF; --brand-hover: #003AD1; --on-brand: #FFFFFF; --brand-soft: #E9EEFF; --brand-text: #0040E6;
  --heading: #1C1468;
  --good: #1E4C42; --good-soft: #DDF8EE; --good-mark: #1E4C42; --on-good-mark: #FFFFFF;
  --warn: #6B4E00; --warn-soft: #FFF3C2; --warn-mark: #C99700;
  --bad: #A82424; --bad-soft: #FBE4E4; --bad-mark: #D93C3C;
  --lav-soft: #F3EFFD; --lav: #BFAAF2; --lav-ink: #3F2E86;
  --series: #0047FF; --plan-line: #7D8297;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0E18; --surface: #161828; --sunken: #1D2033;
    --ink: #F1F2F7; --ink-2: #BCC0D0; --ink-3: #9094A8;
    --line: #2A2E44; --line-strong: #3A3F5C;
    --brand: #0047FF; --brand-hover: #2B63FF; --on-brand: #FFFFFF; --brand-soft: #172250; --brand-text: #8FA9FF;
    --heading: #F1F2F7;
    --good: #67F3C9; --good-soft: #123A30; --good-mark: #3DC888; --on-good-mark: #0D0E18;
    --warn: #FFD84D; --warn-soft: #3A2F08; --warn-mark: #FFC800;
    --bad: #FF8F8F; --bad-soft: #401A1A; --bad-mark: #E35B5B;
    --lav-soft: #211C3A; --lav: #BFAAF2; --lav-ink: #D5C8F7;
    --series: #6B8CFF; --plan-line: #8A8FA3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D0E18; --surface: #161828; --sunken: #1D2033;
  --ink: #F1F2F7; --ink-2: #BCC0D0; --ink-3: #9094A8;
  --line: #2A2E44; --line-strong: #3A3F5C;
  --brand: #0047FF; --brand-hover: #2B63FF; --on-brand: #FFFFFF; --brand-soft: #172250; --brand-text: #8FA9FF;
  --heading: #F1F2F7;
  --good: #67F3C9; --good-soft: #123A30; --good-mark: #3DC888; --on-good-mark: #0D0E18;
  --warn: #FFD84D; --warn-soft: #3A2F08; --warn-mark: #FFC800;
  --bad: #FF8F8F; --bad-soft: #401A1A; --bad-mark: #E35B5B;
  --lav-soft: #211C3A; --lav: #BFAAF2; --lav-ink: #D5C8F7;
  --series: #6B8CFF; --plan-line: #8A8FA3;
  color-scheme: dark;
}

html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; border-radius: 3px; }
svg { display: block; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 188px minmax(0, 1fr) 360px; height: 100%; }
.app.panel-closed { grid-template-columns: 188px minmax(0, 1fr) 52px; }
.nav { background: var(--surface); border-right: 1px solid var(--line); padding-block: 18px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: 12px; display: flex; flex-direction: column; gap: 22px; overflow: auto; }
.brand { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.brand-name { font-weight: 700; color: var(--heading); letter-spacing: -0.01em; line-height: 1.25; }
.brand-sub { font-size: 12px; color: var(--ink-3); }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: var(--r); color: var(--ink-2); font-weight: 500; }
.nav-list a:hover { background: var(--sunken); text-decoration: none; }
.nav-list a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); }
.nav-count { font-size: 12px; font-variant-numeric: tabular-nums; background: var(--brand); color: var(--on-brand); border-radius: 999px; min-width: 20px; padding: 0 6px; text-align: center; line-height: 20px; }
.nav-foot { margin-top: auto; padding: 0 8px; font-size: 12px; color: var(--ink-3); display: flex; flex-direction: column; gap: 8px; }

.work { min-width: 0; overflow: auto; display: flex; flex-direction: column; }
/* The page header. The selector names the element, so the forecast bar's label, which also carries the word "top", is left alone. */
header.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding-block: 12px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
header.top h1 { font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; color: var(--heading); flex: 1 1 240px; min-width: 0; text-wrap: balance; }
.top-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mockmark { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); border-radius: 3px; padding: 3px 7px; white-space: nowrap; }
.mockmark.realmark { color: var(--brand-text); background: var(--brand-soft); }
.who { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.who select { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 5px 8px; font-weight: 600; color: var(--ink); }
.main { padding-block: 24px 48px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.main:focus { outline: none; }

/* ---------- type and blocks ---------- */
.block { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.block > h2, .card > h2 { font-size: 16px; line-height: 1.3; color: var(--heading); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h3 { font-size: 14px; line-height: 1.35; }
.count { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 7px; line-height: 20px; font-weight: 500; }
.lede { color: var(--ink-2); max-width: 68ch; }
.small { font-size: 12.5px; color: var(--ink-3); }
.empty { color: var(--ink-3); padding: 14px 0; }
.label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.is-mine { border: 1.5px solid var(--brand); }
.kv dd.key { font-weight: 600; }
.card.sunk { background: var(--sunken); border-color: transparent; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.more { font-weight: 500; }
.src { font-size: 12px; color: var(--ink-3); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: var(--r); padding: 7px 12px; font-weight: 600; font-size: 13.5px; line-height: 1.3; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--sunken); text-decoration: none; }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-danger { border-color: var(--bad-mark); color: var(--bad); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--brand-text); padding-inline: 6px; }
.btn-mock { border-style: dashed; color: var(--warn); border-color: var(--warn-mark); background: transparent; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.why { font-size: 12.5px; color: var(--ink-3); max-width: 60ch; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
input[type="text"], input[type="number"], input[type="search"], select, textarea { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 7px 9px; min-width: 0; max-width: 100%; }
textarea { resize: vertical; min-height: 64px; width: 100%; line-height: 1.45; }
textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 150px; white-space: pre; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.tab[aria-pressed="true"], .tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.check { display: flex; align-items: flex-start; gap: 8px; }
.check input { margin-top: 3px; }

/* ---------- status ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px 2px 7px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.chip svg { width: 12px; height: 12px; }
.chip-good { background: var(--good-soft); color: var(--good); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-info { background: var(--brand-soft); color: var(--brand-text); }
.chip-quiet { background: var(--sunken); color: var(--ink-2); }
.chip-claude { background: var(--lav-soft); color: var(--lav-ink); }
.tag { font-size: 11.5px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 3px; padding: 1px 6px; white-space: nowrap; }
.banner { border-radius: 8px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.banner strong { display: block; font-size: 15px; }
.banner-good { background: var(--good-soft); color: var(--good); }
.banner-bad { background: var(--bad-soft); color: var(--bad); }
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.banner-info { background: var(--brand-soft); color: var(--ink); }
.banner p { color: inherit; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; font-size: 12px; color: var(--ink-3); }
tr.is-picked td { background: var(--brand-soft); }
.nowrap { white-space: nowrap; }
.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }

/* ---------- queue ---------- */
.queue { display: flex; flex-direction: column; gap: 8px; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; align-items: center; gap: 14px; }
.q.is-urgent { border-color: var(--bad-mark); }
.q.is-first { border: 1.5px solid var(--brand); }
.q-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.q-sub { font-size: 12.5px; color: var(--ink-3); }
.q-key { font-size: 13px; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- the five steps. Steps 2 and 3 carry the approval that follows them as a second line, which opens that approval ---------- */
.tracker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.step { border-right: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; border-bottom: 3px solid transparent; }
.step:last-child { border-right: 0; }
.step.is-open { border-bottom-color: var(--brand); background: var(--brand-soft); }
.step-in { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; padding: 10px 10px 8px; color: var(--ink-2); }
.step-in:hover, a.step-lock:hover { background: var(--sunken); text-decoration: none; }
.step.is-open .step-in:hover, .step.is-open a.step-lock:hover { background: transparent; }
.step-top { display: flex; align-items: center; gap: 6px; }
.step-mark { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; border: 1.5px solid var(--line-strong); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.step-mark svg { width: 11px; height: 11px; }
.step-label { font-weight: 600; font-size: 12.5px; color: var(--ink); min-width: 0; }
.step-note { font-size: 11.5px; line-height: 1.3; color: var(--ink-3); overflow-wrap: anywhere; }
.step-lock { display: flex; align-items: flex-start; gap: 4px; padding: 0 10px 8px; font-size: 11.5px; line-height: 1.3; font-weight: 600; min-width: 0; }
.step-lock svg { width: 11px; height: 11px; flex: none; margin-top: 2px; }
.step-lock span { min-width: 0; overflow-wrap: anywhere; }
.step-lock.ok { color: var(--good); }
.step-lock.wait { color: var(--warn); }
.step-lock.off { color: var(--ink-3); font-weight: 500; }
.step-lock.bad { color: var(--bad); }
.is-done .step-mark { background: var(--good-mark); border-color: var(--good-mark); color: var(--on-good-mark); }
.is-now .step-mark { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.is-waiting .step-mark { background: var(--warn-soft); border-color: var(--warn-mark); color: var(--warn); }
.is-problem .step-mark { background: var(--bad-soft); border-color: var(--bad-mark); color: var(--bad); }
.is-problem .step-note { color: var(--bad); }
.mini { display: flex; gap: 3px; align-items: center; }
.mini i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: block; }
.mini i.is-done { background: var(--good-mark); border-color: var(--good-mark); }
.mini i.is-now { background: var(--brand); border-color: var(--brand); }
.mini i.is-waiting { background: var(--warn-mark); border-color: var(--warn-mark); }
.mini i.is-problem { background: var(--bad-mark); border-color: var(--bad-mark); }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; }
.glance div { min-width: 0; }
.glance dt { font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.glance dd { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- sizes ---------- */
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.size { padding: 12px 14px; min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.size b { display: block; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; }
.size span { font-size: 12.5px; color: var(--ink-2); }
.size.is-result { background: var(--brand-soft); }
.size.is-result b { color: var(--brand-text); }
.size em { font-style: normal; display: block; font-size: 12px; color: var(--ink-3); }

/* ---------- preflight checks: eight, in the two groups the service puts them in ---------- */
.layer { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.layer > h3 { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.checkrow .tag { margin-left: 4px; }
.checks { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.checkrow { border-bottom: 1px solid var(--line); }
.checkrow:last-child { border-bottom: 0; }
.checkrow > button { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: transparent; border: 0; padding: 11px 14px; cursor: pointer; }
.checkrow > button:hover { background: var(--sunken); }
.checkrow .says { font-size: 12.5px; color: var(--ink-3); display: block; }
.checkrow .chip { justify-self: start; }
.checkrow .check-kind { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.evidence { padding: 4px 14px 16px 122px; display: flex; flex-direction: column; gap: 10px; }
.evidence .fix { color: var(--bad); font-weight: 500; }

/* ---------- forecast range ---------- */
.range { position: relative; height: 54px; margin-top: 4px; }
.range-track { position: absolute; left: 0; right: 0; top: 20px; height: 10px; border-radius: 5px; background: var(--sunken); }
.range-fill { position: absolute; top: 20px; height: 10px; border-radius: 5px; background: var(--brand); opacity: 0.35; }
.range-likely { position: absolute; top: 15px; width: 4px; height: 20px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 0 2px var(--surface); }
.range-budget { position: absolute; top: 10px; width: 2px; height: 30px; background: var(--ink); }
.range-lab { position: absolute; font-size: 12px; white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.range-lab.top { top: -4px; }
.range-lab.bot { top: 40px; }

/* ---------- runs ---------- */
.progress { height: 10px; border-radius: 5px; background: var(--sunken); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.progress.is-paused i { background: var(--bad-mark); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); min-width: 0; }
.tile b { display: block; font-size: 20px; font-weight: 600; line-height: 1.25; }
.tile span { font-size: 12.5px; font-weight: 600; }
.tile b.is-bad { color: var(--bad); }
.tile b.is-good { color: var(--good); }
.tile em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); }
.tile.is-key { border: 1.5px solid var(--bad-mark); }
/* How the failed people of a grant were worked down: first pass, the service's retries, a person's decision, the send. */
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.pipe div { padding: 11px 13px; min-width: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.pipe div:last-child { border-right: 0; }
.pipe b { font-size: 13px; }
.pipe span { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pipe .is-here { background: var(--brand-soft); }
.pipe .is-here b { color: var(--brand-text); }
.pipe .is-here.is-bad { background: var(--bad-soft); }
.pipe .is-here.is-bad b { color: var(--bad); }
.pipe .is-locked { background: var(--sunken); }
.pipe .is-locked b, .pipe .is-locked span { color: var(--ink-3); }
.confirm { border: 1.5px solid var(--brand); border-radius: 8px; padding: 14px; background: var(--brand-soft); display: flex; flex-direction: column; gap: 10px; }
.confirm.is-danger { border-color: var(--bad-mark); background: var(--bad-soft); }
.chart { position: relative; max-width: 720px; }
.chart svg { width: 100%; height: auto; }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .lab { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--font); }
.chart .halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .plan { stroke: var(--plan-line); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; }
.chart .actual { stroke: var(--series); stroke-width: 2.5; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart .end { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.chart .hair { stroke: var(--ink-3); stroke-width: 1; }
.chart .pausemark { stroke: var(--bad-mark); stroke-width: 2; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--series); }
.legend i.p { background: var(--plan-line); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); border-radius: var(--r); padding: 7px 9px; font-size: 12px; line-height: 1.4; white-space: nowrap; transform: translate(-50%, -100%); z-index: 2; }
.tip b { font-variant-numeric: tabular-nums; }
details > summary { cursor: pointer; color: var(--brand-text); font-weight: 500; font-size: 13px; }
details[open] > summary { margin-bottom: 10px; }
pre { margin: 0; background: var(--sunken); border-radius: var(--r); padding: 12px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
.calls { border-top: 1px solid var(--line); padding-top: 14px; }
.calls li { font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding: 2px 0; }

/* ---------- builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cond { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.condlist { display: flex; flex-direction: column; gap: 6px; }
.plainlist li { padding: 4px 0 4px 16px; position: relative; }
.plainlist li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }

/* ---------- Claude panel ---------- */
.panel { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 14px 12px 10px 16px; padding-right: max(12px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); }
.panel-title { font-weight: 700; color: var(--heading); font-size: 15px; }
.panel-sub { font-size: 12px; color: var(--ink-3); }
.icon-btn { border: 0; background: transparent; cursor: pointer; border-radius: var(--r); padding: 6px; color: var(--ink-2); line-height: 0; }
.icon-btn:hover { background: var(--sunken); }
.icon-btn svg { width: 16px; height: 16px; }
.panel-note { font-size: 12px; color: var(--lav-ink); background: var(--lav-soft); padding: 8px 16px; padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.chat { flex: 1 1 auto; overflow: auto; padding: 14px 16px; padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.msg { max-width: 100%; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.msg-you { align-self: flex-end; background: var(--sunken); border-radius: 12px 12px 3px 12px; padding: 8px 11px; max-width: 92%; }
.msg-you .by { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.msg-claude ul { margin: 6px 0 0; display: flex; flex-direction: column; gap: 2px; }
.msg-claude li { padding-left: 14px; position: relative; font-variant-numeric: tabular-nums; }
.msg-claude li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--lav); }
.msg-claude .nextline { margin-top: 6px; color: var(--ink-2); }
.tool { border: 1px solid var(--line); border-radius: var(--r); padding: 7px 9px; font-size: 12px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); }
.tool-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tool-head code { font-weight: 500; color: var(--ink); font-size: 12.5px; }
.tool-kind { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 3px; padding: 0 5px; line-height: 16px; }
.k-read { background: var(--sunken); color: var(--ink-2); }
.k-write { background: var(--brand-soft); color: var(--brand-text); }
.k-money { background: var(--warn-soft); color: var(--warn); }
.k-safe { background: var(--good-soft); color: var(--good); }
.tool-line { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.tool-audit { font-size: 11.5px; color: var(--good); }
.tool.is-refused { border-color: var(--bad-mark); }
.tool.is-refused .tool-audit { color: var(--bad); }
.yes { border: 1.5px solid var(--warn-mark); background: var(--warn-soft); color: var(--ink); border-radius: 8px; padding: 11px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.yes h3 { color: var(--warn); }
.yes .small { color: var(--ink-2); }
.panel-foot { border-top: 1px solid var(--line); padding: 10px 16px 12px; padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 8px; }
.suggest { display: flex; flex-direction: column; gap: 6px; }
.suggest button { text-align: left; border: 1px solid var(--lav); background: var(--lav-soft); color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.4; cursor: pointer; }
.suggest button:hover { border-color: var(--lav-ink); }
.fake-input { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 7px 9px; font-size: 12.5px; color: var(--ink-3); }
.panel.is-closed { align-items: center; padding-top: 14px; }
.panel-tab { writing-mode: vertical-rl; border: 1px solid var(--lav); background: var(--lav-soft); color: var(--lav-ink); border-radius: var(--r); padding: 12px 6px; font-weight: 700; cursor: pointer; letter-spacing: 0.02em; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 20; width: min(560px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--surface); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; font-weight: 500; }
.toast.is-bad { background: var(--bad-mark); color: #FFFFFF; }

/* ---------- narrower screens ---------- */
@media (max-width: 1100px) {
  .app, .app.panel-closed { grid-template-columns: 168px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: 46vh; }
  .panel.is-closed { max-height: none; padding: 8px 16px; align-items: flex-start; }
  .panel-tab { writing-mode: horizontal-tb; padding: 6px 12px; }
  .builder, .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  html, body { height: auto; }
  .app, .app.panel-closed { display: block; height: auto; }
  .nav { flex-direction: row; align-items: center; gap: 12px; padding-block: 10px; padding-right: max(16px, env(safe-area-inset-right, 0px)); border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .nav-list { flex-direction: row; }
  .nav-foot, .brand-sub { display: none; }
  .work { overflow: visible; }
  header.top { position: static; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .tracker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { box-shadow: 0 1px 0 var(--line); }
  .step:nth-child(2n) { border-right: 0; }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe div { box-shadow: 0 1px 0 var(--line); }
  .pipe div:nth-child(2n) { border-right: 0; }
  .panel { max-height: none; }
  .chat { max-height: 50vh; }
  .evidence { padding-left: 14px; }
  .checkrow > button { grid-template-columns: 88px minmax(0, 1fr); }
  .checkrow .check-kind { display: none; }
  .cond { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .q { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .progress i { transition: width 0.3s ease; }
}

/* ---------- start cards, promos, creating a bonus ---------- */
.starts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.start { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 14px; color: var(--ink); cursor: pointer; min-width: 0; }
.start:hover { border-color: var(--brand-text); text-decoration: none; }
.start b { font-size: 15px; color: var(--ink); }
.start span { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.start[disabled] { opacity: 0.5; cursor: not-allowed; }
.glance .sub, .kv .sub { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.plainlist .sub { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input[type="date"] { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 6px 9px; min-width: 0; max-width: 100%; }
input[type="checkbox"] { accent-color: var(--brand); width: 15px; height: 15px; }
.bulk { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid var(--brand); border-radius: 8px; padding: 12px 14px; }
.bulk > b { align-self: center; }
.bulk .wide { flex: 1 1 100%; max-width: none; }
.form-grid p.wide { margin: -4px 0 4px; }
th.w-main { width: 40%; }
td.mono { overflow-wrap: anywhere; }
.wrap-head th { white-space: normal; }
.bar { display: flex; align-items: center; gap: 8px; }
.bar .track { flex: 1 1 60px; min-width: 60px; height: 10px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.bar .track i { display: block; height: 100%; border-radius: 3px; background: var(--series); min-width: 2px; }
.bar > span:not(.track) { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
td .bar { margin-top: 4px; min-width: 150px; }
.mechs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mech { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 8px; padding: 12px; cursor: pointer; min-width: 0; color: var(--ink); }
.mech:hover { border-color: var(--brand-text); }
.mech.is-on { border-color: var(--brand); background: var(--brand-soft); }
.mech b { font-size: 14px; }
.mech span { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.mech em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.later li { padding: 9px 0; border-top: 1px solid var(--line); }
.later .sub { display: block; font-size: 12.5px; color: var(--ink-2); }
.later .sub.src { color: var(--ink-3); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select { width: 100%; }
.unit { display: flex; align-items: stretch; }
.unit i { font-style: normal; display: grid; place-items: center; min-width: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r) 0 0 var(--r); background: var(--sunken); color: var(--ink-2); font-weight: 600; font-size: 13px; }
.unit input { border-radius: 0 var(--r) var(--r) 0; flex: 1 1 auto; }
.field .hint { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.big { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; color: var(--heading); }
.todo li { padding: 4px 0 4px 20px; position: relative; font-size: 13px; }
.todo li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--warn-mark); }
.sticky { position: sticky; top: 76px; }
.steps3 { counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps3 > li { counter-increment: s; padding-left: 30px; position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.steps3 > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
@media (max-width: 1100px) { .starts, .mechs { grid-template-columns: minmax(0, 1fr); } .sticky { position: static; } }
@media (max-width: 760px) { .form-grid, .form-grid.two, .form-grid.three, .form-grid.dests { grid-template-columns: minmax(0, 1fr); } .steps3 > li { padding-left: 26px; } }

/* ---------- the five-step deployment, the Approvals tab and the Reporting tab ---------- */
.form-grid.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.dests { gap: 14px 24px; }
/* On a phone these grids are one column. The rule sits here, after the grids, so it wins over them. */
@media (max-width: 760px) { .form-grid.two, .form-grid.three, .form-grid.dests { grid-template-columns: minmax(0, 1fr); } }
/* A chip with a long sentence in it wraps inside its card on a phone. A chip of one line looks as it did. */
@media (max-width: 560px) { .chip { white-space: normal; border-radius: 12px; text-align: left; max-width: 100%; } }
/* A first column that stays on one line on a wide screen may wrap on a phone, so the second column stays in view. */
@media (max-width: 760px) { td.nowrap.can-wrap { white-space: normal; } }
/* A list of labels and values stacks on a phone: the label on its own line, the value under it at full width. */
@media (max-width: 560px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 1px; } .kv dd { margin-bottom: 9px; } .kv dd:last-child { margin-bottom: 0; } }
input[type="datetime-local"] { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 6px 9px; min-width: 0; max-width: 100%; }
.tick.dest b { color: var(--ink); font-size: 13.5px; }
.tick.sub { margin-left: 23px; padding-left: 10px; border-left: 2px solid var(--line); }
.row > h2 { font-size: 16px; line-height: 1.3; color: var(--heading); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.banner p + p { margin-top: 8px; }
.banner .btn { color: var(--ink); }
.banner .btn-primary { color: var(--on-brand); }
.glance a, .glance a:hover { text-decoration: none; }
.copyline { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.line { display: block; flex: 1 1 240px; min-width: 0; background: var(--sunken); border-radius: var(--r); padding: 7px 10px; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; user-select: all; }
.filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.filters .field { flex: 0 1 auto; }
.filters .field.find { flex: 1 1 240px; }
.filters input[type="search"] { width: 100%; }
a.seg-btn { display: inline-block; text-decoration: none; }
a.seg-btn:hover { text-decoration: none; background: var(--sunken); }
.seg-btn.is-on, a.seg-btn.is-on:hover { background: var(--brand-soft); color: var(--brand-text); }
/* A table with many columns: tighter cells, and second lines that wrap, so it fits beside the Claude panel. */
table.dense th, table.dense td { padding: 8px 9px; }
table.dense th { white-space: normal; }
th.w-bonus { width: 27%; min-width: 190px; }
td.num .sub { white-space: normal; }
td.group { border-right: 1px solid var(--line); }
/* On a phone the table scrolls inside its box, so its first column keeps a width that can be read. Wider screens let it shrink, so the table fits. */
@media (max-width: 760px) { td.group { min-width: 180px; } }
/* A status chip in a table cell may wrap onto two lines, so the table fits its box. */
td.chipwrap .chip { white-space: normal; border-radius: 12px; text-align: left; }

/* ---------- the third pass: what the QA asked for ---------- */
/* Home: a start card that is off says why, and the reason stays readable. */
.start[disabled] { opacity: 1; background: var(--sunken); border-style: dashed; }
.start[disabled] b, .start[disabled] > span { color: var(--ink-3); }
.start[disabled] > .start-why { color: var(--ink-2); font-weight: 500; }
/* What is not the person's to do yet: quiet, under the queue, not counted. */
.q.is-later { background: transparent; border-style: dashed; padding: 9px 14px; }
.q.is-later .q-title { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.q.is-later > a { font-size: 13px; white-space: nowrap; }
/* A destination card in two headed parts. */
.part { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.part > h3 { font-size: 13.5px; line-height: 1.3; color: var(--heading); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* A check that has not run: the same row as a check that has, without the button. */
.checkrow > .checkline { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; }
.checkrow .chip { white-space: nowrap; }
/* A confirm box takes the focus when it opens. The ring shows for the keyboard only. */
.confirm:focus { outline: none; }
.confirm:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* A field the service asked for and did not get. */
.field.is-missing select, .field.is-missing input, .field.is-missing textarea { border-color: var(--bad-mark); box-shadow: 0 0 0 2px var(--bad-soft); }
.field.is-missing > span:first-child { color: var(--bad); }
/* Contrast: a refusal toast on the brand's alert red in both themes, and placeholder text in the third ink. */
.toast.is-bad { background: #D93C3C; color: #FFFFFF; }
::placeholder { color: var(--ink-3); opacity: 1; }
/* The mock clock and "Reset mock data" beside "Claude" in the bottom bar. On a phone the left menu's foot is not shown, so they live here. */
.panel-mock { display: none; }
@media (max-width: 760px) {
  .checkrow > .checkline { grid-template-columns: 88px minmax(0, 1fr); }
  /* The menu strip: one line per item, a fade at the right edge to show there is more, and room at the end so the fade never covers the last item. */
  .nav-list a { white-space: nowrap; }
  /* Room after the last item, so the strip can always stop where an item starts. */
  .nav-list { padding-right: 128px; }
  .brand { flex: 0 0 auto; }
  .nav::after { content: ""; position: sticky; right: 0; flex: 0 0 28px; align-self: stretch; margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); background: linear-gradient(to right, transparent, var(--surface) 85%); pointer-events: none; }
  .panel.is-closed { flex-direction: row; align-items: center; gap: 10px; flex-wrap: nowrap; }
  .panel-mock { display: flex; align-items: center; gap: 10px; font-size: 12px; line-height: 1.3; color: var(--ink-3); min-width: 0; }
  .panel.is-closed .panel-mock { margin-left: auto; }
  .panel-mock .mock-clock { min-width: 0; text-align: right; }
  .panel-mock .btn { padding: 4px 9px; font-size: 12px; white-space: nowrap; flex: 0 0 auto; }
}
tr.sum td { background: var(--sunken); font-weight: 600; }
td.wrapany { overflow-wrap: anywhere; }
/* On a phone the table scrolls inside its box, so a name column keeps a width that can be read. */
@media (max-width: 760px) { td.wrapany { min-width: 170px; } }
td > div + div { margin-top: 6px; }
.kv dd > div + div { margin-top: 6px; }

/* The two names of a bonus, and the extra promo fields on Create a bonus. */
.fname { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink-3); background: var(--sunken); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.names { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 4px; font-size: 12px; font-weight: 400; }
.names > span { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.names .mono { overflow-wrap: anywhere; color: var(--ink); }
.field > span .fname { margin-left: 4px; }
.field.inline { margin-top: 6px; max-width: 240px; }
.fixed { font-size: 13px; color: var(--ink-2); margin: 0; padding: 7px 0; }
.fixed b { color: var(--ink); margin-right: 6px; }
.tick { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; min-width: 0; }
.tick input { margin-top: 3px; flex: 0 0 auto; width: auto; }
.tick b { font-weight: 600; color: var(--ink-2); font-size: 12.5px; }
.tick .hint { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.many { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px 10px; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.many legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
details.card > summary { cursor: pointer; font-weight: 600; color: var(--heading); }
details.card[open] > summary { margin-bottom: 10px; }
.card details > .form-grid, .card details > p { margin-top: 10px; }

/* The and/or builder: a group is a box, a group inside a group is a box inside a box. */
.grp { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.grp .grp { background: var(--sunken); margin: 2px 0; }
.grp .grp .grp { background: var(--surface); }
.grp-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.grp-size { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.grp-acts { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grp-body { display: flex; flex-direction: column; min-width: 0; }
.grp-foot { gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.seg-btn { border: 0; background: var(--surface); padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line-strong); }
.seg-btn[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-text); }
.cond2 { display: grid; grid-template-columns: 44px 18px minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 1fr) 32px; gap: 6px; align-items: center; padding: 4px; border-radius: 6px; min-width: 0; }
.cond2 select, .cond2 input { width: 100%; min-width: 0; }
.cond2 .cond-more, .cond2 .cond-hint { grid-column: 3 / -1; }
.cond-more { display: inline-flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; }
.joiner { font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .04em; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink-2); padding: 3px 0; width: 44px; text-align: center; cursor: pointer; }
.joiner.is-any { color: var(--lav-ink); background: var(--lav-soft); border-color: var(--lav); }
.joiner.ro { cursor: default; display: inline-block; }
.joiner-gap { display: inline-block; width: 44px; flex: 0 0 44px; }
.handle { cursor: grab; color: var(--ink-3); font-size: 15px; line-height: 1; user-select: none; text-align: center; }
.mini { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--brand-text); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.mini[disabled] { color: var(--ink-3); text-decoration: none; cursor: default; opacity: .6; }
.drop { height: 4px; border-radius: 3px; }
body.is-dragging .drop { height: 12px; margin: 2px 0; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
body.is-dragging .drop.is-over { background: var(--brand); }
.cond2.is-over { outline: 2px dashed var(--brand); outline-offset: 1px; }
.grp-head.is-over { outline: 2px dashed var(--brand); outline-offset: 4px; border-radius: 6px; }
.reads { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; margin: 0; }
.cond-ro { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; font-size: 13px; min-width: 0; }
.cond-ro > .grp { flex: 1 1 auto; }
@media (max-width: 760px) {
  .cond2 { grid-template-columns: 44px 18px minmax(0, 1fr) 32px; }
  .cond2 > select, .cond2 > input, .cond2 > .val { grid-column: 3; }
  .cond2 > .icon-btn { grid-column: 4; grid-row: 1; }
  .cond2 .cond-more, .cond2 .cond-hint { grid-column: 1 / -1; }
  .grp { padding: 8px; }
}
@media (max-width: 560px) {
  /* On a phone the AND or OR, the handle and the remove button share one line. The three boxes sit under it at full width. */
  .cond2 > select, .cond2 > input, .cond2 > .val { grid-column: 1 / -1; }
  .cond2 > span.val:empty { display: none; }
  .grp { padding: 6px; }
}
