/* Bureau Agent console (T35 redesign). Light theme by default, dark via [data-theme="dark"]. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa; --surface: #ffffff; --surface-2: #f8f9fc; --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e5e7ef;
  --accent: #4f46e5; --accent-ink: #ffffff; --accent-soft: #eef0ff; --accent-2: #7c3aed;
  --ok: #15803d; --ok-soft: #e8f6ee; --warn: #b45309; --warn-soft: #fdf3e2; --crit: #dc2626; --crit-soft: #fdecec;
  --code: #f1f3f8; --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1017; --surface: #121923; --surface-2: #17202c; --ink: #e8edf4; --ink-2: #c3ccd8; --muted: #93a0b1; --line: #253041;
  --accent: #8b93ff; --accent-ink: #0b1017; --accent-soft: #1c2140; --accent-2: #b39cff;
  --ok: #4cc38a; --ok-soft: #12291c; --warn: #f0a940; --warn-soft: #33260f; --crit: #ff7b70; --crit-soft: #3a1714;
  --code: #1a2330; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* No CSS smooth scrolling: the tour measures elements right after scrolling them into view. */
html { scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--accent); }
code { font-family: var(--mono); }
.note { font-size: 13.5px; color: var(--muted); }

/* Buttons */
.btn { font: 600 14px var(--sans); border-radius: 10px; padding: 8px 14px; border: 1px solid var(--line); background: var(--surface);
       color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
       transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--crit); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.big { font-size: 16px; padding: 12px 20px; border-radius: 12px; }
.btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }
.btn:focus-visible, .issue:focus-visible, .evtab:focus-visible, summary:focus-visible, a:focus-visible,
.issue-filters :focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent);
          backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 16px; }
.logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; color: #fff;
        background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.topnav { display: flex; align-items: center; gap: 8px; }
.topnav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 10px; }
.topnav .btn { white-space: nowrap; }

main { max-width: 1240px; margin: 0 auto; padding: 0 20px 48px; }

/* Hero */
.hero { padding: 64px 0 40px; display: flex; flex-direction: column; gap: 18px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.03em; max-width: 20ch; line-height: 1.08; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 68ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-note { font-size: 13px; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow);
          display: flex; flex-direction: column; gap: 4px; }
.mv { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.mk { font-size: 14px; color: var(--ink-2); }
.how { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.how li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 4px; }
.how b { font-size: 16px; }
.how p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.how-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
         background: var(--accent-soft); color: var(--accent); }

/* Console */
.console { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.console-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.console-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.console-title h2 { font-size: 22px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.bulk-dialog { margin: auto; width: min(720px, calc(100% - 32px)); max-height: 85vh;
  padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow-y: auto; }
.bulk-dialog::backdrop { background: #0008; }
.bulk-dialog h2 { font-size: 22px; margin-bottom: 12px; }
.bulk-dialog .bulk-item { margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.bulk-dialog .bulk-draft { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 10px; }
.bulk-dialog .bulk-failures { padding-left: 20px; overflow-wrap: anywhere; }
.bulk-dialog .actions { position: sticky; bottom: -24px; background: var(--surface); padding: 14px 0; }
#eventbar { display: flex; flex-direction: column; gap: 12px; }
.evtabs { display: flex; gap: 8px; flex-wrap: wrap; }
.evtab { font: inherit; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
         border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.evtab b { font-size: 15px; }
.evtab span { font-size: 12.5px; color: var(--muted); }
.evtab[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { border-radius: 12px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: baseline; gap: 8px; }
.kpi .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi .k { font-size: 13px; color: var(--muted); }
.kpi.k-block .v { color: var(--crit); } .kpi.k-review .v { color: var(--accent); } .kpi.k-wait .v { color: var(--warn); } .kpi.k-done .v { color: var(--ok); }
.kpi.zero .v { color: var(--muted); }

/* Status line */
.run { padding: 9px 22px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); min-height: 38px;
       display: flex; align-items: center; gap: 10px; background: var(--surface-2); }
.run span:last-child { overflow-wrap: anywhere; }
.run .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.run.busy .dot { background: var(--warn); animation: pulse 1s ease-in-out infinite; }
.run.error { color: var(--crit); } .run.error .dot { background: var(--crit); }
.run.warn { color: var(--warn); } .run.warn .dot { background: var(--warn); }
@keyframes pulse { 50% { opacity: .35; } }

/* Issue list */
.main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 640px; }
.issue-panel { min-width: 0; border-right: 1px solid var(--line); }
.issues { display: flex; flex-direction: column; overflow-y: auto; max-height: 640px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.issue-filters { margin: 0; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); min-width: 0; display: grid; gap: 9px; }
.issue-filters label { font-size: 13px; font-weight: 600; }
.issue-filters input, .issue-filters select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; max-width: 100%; }
.issue-filters input { width: 100%; }
.filter-statuses { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip, .filter-clear { font: 600 12.5px var(--sans); padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.filter-chip:hover, .filter-clear:hover { background: var(--surface-2); }
.filter-chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.filter-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-kind select { flex: 1 1 120px; }
.filter-clear:disabled { opacity: .5; cursor: default; }
.filter-scope { font-size: 12px; }
.grouphead { padding: 12px 16px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
             display: flex; justify-content: space-between; background: var(--surface); position: sticky; top: 0; z-index: 1; }
details.done > summary { list-style: none; cursor: pointer; }
details.done > summary::-webkit-details-marker { display: none; }
details.done > summary .grouphead { position: static; }
.issue { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px;
         align-items: start; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.issue:hover { background: var(--surface-2); }
.issue[aria-current="true"] { background: var(--accent-soft); border-left-color: var(--accent); }
.ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--code); color: var(--ink-2); }
.ico svg { width: 18px; height: 18px; }
.issue.blocking .ico { background: var(--crit-soft); color: var(--crit); }
.issue .t { font-weight: 600; font-size: 14.5px; line-height: 1.35; display: block; overflow-wrap: anywhere; }
.issue .m { font-size: 13px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
            overflow: hidden; overflow-wrap: anywhere; }
.issue.res .t { color: var(--muted); }
.empty { padding: 12px 16px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; align-self: start; }
.p-proposed { background: var(--warn-soft); color: var(--warn); }
.p-human { background: var(--accent-soft); color: var(--accent); }
.p-res { background: var(--ok-soft); color: var(--ok); }
.p-wait, .p-new { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); }
.p-rej { background: var(--surface-2); color: var(--muted); }
.p-fail { background: var(--crit-soft); color: var(--crit); }
.p-run { background: var(--accent); color: var(--accent-ink); animation: pulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .p-run, .run.busy .dot { animation: none; } }

/* Issue detail */
.detail { padding: 22px 24px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dhead { display: flex; flex-direction: column; gap: 8px; }
.dhead h3 { font-size: 22px; overflow-wrap: anywhere; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.b-block { background: var(--crit-soft); color: var(--crit); } .b-non { background: var(--warn-soft); color: var(--warn); }
.b-kind { background: var(--code); color: var(--muted); text-transform: none; letter-spacing: 0; }
.conf { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.meter { flex: 1; max-width: 180px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }

.card { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.card.proposal-card { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 4px var(--accent-soft); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.card-title { font-size: 17px; font-weight: 700; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--code); color: var(--muted); }
.tag.edited { background: var(--warn-soft); color: var(--warn); }
.question { border-radius: 12px; padding: 12px 14px; background: var(--accent-soft); color: var(--ink); font-size: 14.5px;
            white-space: pre-wrap; overflow-wrap: anywhere; }
.question .qlabel { display: block; font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.why { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.proposal { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; white-space: pre-wrap;
            background: var(--surface-2); overflow-wrap: anywhere; }
.proposal[contenteditable="true"] { outline: 2px solid var(--accent); outline-offset: 2px; background: var(--surface); }
.draft-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }
.named { text-decoration: underline dotted var(--line); text-underline-offset: 3px; }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.groups div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; }

.cta-card { border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--accent-soft); }
.cta-card p { color: var(--ink-2); font-size: 14.5px; }

/* Collapsible sections */
details.sec { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
details.sec > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; align-items: center; gap: 10px;
                        font-weight: 700; font-size: 14.5px; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::before { content: "›"; display: inline-block; transition: transform .15s; color: var(--muted); font-size: 18px; line-height: 1; }
details.sec[open] > summary::before { transform: rotate(90deg); }
details.sec > summary .sub { font-weight: 500; color: var(--muted); font-size: 13px; }
details.sec > .sec-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.mail { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14.5px;
        white-space: pre-wrap; overflow-wrap: anywhere; }
.mail .from { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: block; }

/* Agent steps timeline */
.steps { list-style: none; margin: 0; padding: 0 0 0 6px; display: flex; flex-direction: column; border-left: 2px solid var(--line); }
.steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; padding: 6px 0 6px 10px; font-size: 14px; }
.steps .mark { color: var(--ok); font-weight: 800; }
.steps li.bad .mark, .steps li.bad b { color: var(--crit); }
.steps code { font-size: 12px; color: var(--accent); }
.steps .src { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.steps .res { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; margin-top: 2px; }
.steps li.reveal { opacity: 0; transform: translateY(4px); animation: reveal .35s ease forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .steps li.reveal { animation: none; opacity: 1; transform: none; } }

/* "Thinking" panel while the agent runs */
.thinking { display: flex; align-items: center; gap: 14px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent);
           animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.thinking b { display: block; font-size: 15px; }
.thinking span { font-size: 13.5px; color: var(--muted); }

/* Evidence */
.trace { display: grid; grid-template-columns: 96px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px;
         overflow: hidden; font-size: 14px; margin: 0; }
.trace dt { padding: 9px 12px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted);
            text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
.trace dd { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; min-width: 0; }
.trace dt:last-of-type, .trace dd:last-child { border-bottom: 0; }
.trace ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 2px; }
.src { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.checks { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; }
.checks .y { color: var(--ok); font-weight: 800; } .checks .n { color: var(--crit); font-weight: 800; } .checks .u { color: var(--warn); font-weight: 800; }
.checks .d { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* Trip view */
.cons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cons div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cons h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cons .hard h4 { color: var(--crit); } .cons .soft h4 { color: var(--accent); }
.cons ul { margin: 0; padding-left: 16px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.confirm { font-size: 12px; font-weight: 600; color: var(--warn); display: block; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; background: var(--surface-2); flex-wrap: wrap; align-self: flex-start; }
.seg button { font: 600 13.5px var(--sans); border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.optwrap { display: flex; flex-direction: column; gap: 14px; }
.optcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.optcard { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.optcard.first { border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.optcard .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.optcard .price { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.optcard .price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.optcard .line { font-size: 13.5px; color: var(--ink-2); }
.optcard .line.cost { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -4px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.facts dd { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.facts dd small { display: block; color: var(--muted); font-size: 12.5px; }
.shared-confirm { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn);
                  font-size: 13px; font-weight: 600; }
.verdict { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.v-pick { background: var(--ok-soft); color: var(--ok); } .v-alt { background: var(--accent-soft); color: var(--accent); }
.v-rej { background: var(--crit-soft); color: var(--crit); }
.rejwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.opts { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 13.5px; }
.opts th, .opts td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.opts th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.opts tr:last-child td { border-bottom: 0; }
.opts td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.opts td.bad, .optcard .bad { color: var(--crit); font-weight: 600; }
.whyred { display: block; font-size: 12.5px; color: var(--crit); }
.diag { border: 1px solid var(--crit); background: var(--crit-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.diag b { color: var(--crit); } .diag ul { margin: 0; padding-left: 18px; }
#clarify { display: flex; flex-direction: column; gap: 12px; }

/* Forms */
.compose { display: flex; flex-direction: column; gap: 12px; }
.compose label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.compose input, .compose select, .compose textarea { font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%; }
.compose textarea { resize: vertical; }
.compose input:focus-visible, .compose select:focus-visible, .compose textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.outbox { display: flex; flex-direction: column; gap: 10px; }

/* Problem and trust bands, footer (T36) */
.band { padding: 36px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.band h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; max-width: 34ch; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.card-s { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow);
          display: flex; flex-direction: column; gap: 6px; }
.card-s b { font-size: 16px; }
.card-s p { font-size: 14px; color: var(--ink-2); }
.card-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
           background: var(--accent-soft); color: var(--accent); }
#problem { padding-bottom: 40px; }
#trust { padding-top: 48px; }
.sitefoot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 8px; padding: 28px 0 24px; }
.sitefoot-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: flex-start;
               gap: 24px; flex-wrap: wrap; }
.sitefoot-in p { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 60ch; }
.footlinks { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; font-size: 14px; }
.footlinks a { text-decoration: none; }
.footlinks a:hover { text-decoration: underline; }
.foot { font-size: 13px; color: var(--muted); text-align: center; margin-top: 20px; padding: 0 16px; }

/* Product tour (T34), on top of web/vendor/driver.css */
.driver-popover.tour-popover { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  max-width: min(420px, calc(100vw - 32px)); font-family: var(--sans); box-shadow: 0 12px 36px rgba(15, 23, 42, .25); }
.tour-popover .driver-popover-title { font-size: 17px; font-weight: 800; font-family: var(--sans); }
.tour-popover .driver-popover-description { font-size: 14px; line-height: 1.55; color: var(--ink-2); font-family: var(--sans); }
.tour-popover .driver-popover-description p { margin: 0 0 8px; }
.tour-popover .driver-popover-progress-text { color: var(--muted); font-size: 12px; font-weight: 600; }
.tour-popover .driver-popover-next-btn { background: var(--accent); color: var(--accent-ink); border: 0; text-shadow: none;
  font: 600 13.5px var(--sans); border-radius: 9px; padding: 7px 14px; }
.tour-popover .driver-popover-close-btn { color: var(--muted); }
.tour-do { font-weight: 700; color: var(--accent); }
.tour-ch { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
           color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; margin-right: 6px; }
.tour-ch:empty { display: none; }
.tour-nums { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.tour-nums b { display: inline-block; min-width: 52px; font-size: 18px; color: var(--accent); font-variant-numeric: tabular-nums; }
.tour-wait { font-size: 12.5px; color: var(--muted); }
.tour-extra { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.tour-status { font-size: 12.5px; color: var(--warn); font-weight: 600; }
.tour-act { font: 600 13px var(--sans); background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 9px;
  padding: 6px 12px; cursor: pointer; margin-left: auto; }
.tour-act.ghost { background: none; color: var(--accent); border: 1px solid var(--line); }
.tour-skip { font: 600 12px var(--sans); background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 7px; padding: 3px 8px; cursor: pointer; }

/* Responsive */
@media (max-width: 980px) {
  .main { grid-template-columns: 1fr; }
  .issue-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .issues { max-height: 440px; }
  .metrics, .how, .cards { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  main { padding: 0 12px 40px; }
  .topbar-in { padding: 10px 12px; }
  .sitefoot-in { padding: 0 12px; }
  .topnav a { display: none; }
  .topnav { gap: 4px; }
  .topnav .btn { padding: 6px 9px; font-size: 13px; }
  .hero { padding: 36px 0 28px; }
  .lede { font-size: 16px; }
  .console-head, .run { padding-left: 14px; padding-right: 14px; }
  .detail { padding: 18px 14px; }
  .issue { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
  .issue .ico { width: 28px; height: 28px; }
  .issue .chip { grid-column: 2; justify-self: start; }
  .trace { grid-template-columns: 1fr; } .trace dt { border-bottom: 0; }
  .cons { grid-template-columns: 1fr; }
  .mv { font-size: 34px; }
}
.demo-status{margin:16px auto;padding:10px 16px;max-width:1200px;border:1px solid var(--line);border-radius:10px;background:var(--accent-soft);font-size:13px}.demo-status[hidden]{display:none}
