/* The look comes from design/screens (see design/README.md). Colours are variables so the dark
   theme is one block at the end. Nothing is loaded from another site: Inter is served from here. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --page: #f8f9fa;
  --surface: #fff;
  --soft: #f9fafb;
  --track: #f3f4f6;
  --line: #e5e7eb;
  --line-soft: #f3f4f6;
  --line-strong: #d1d5db;
  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #4b5563;
  --muted: #6b7280;
  --pink: #ec008b;
  --pink-text: #b80068;
  --pink-btn: #d0007a;
  --pink-btn-hover: #a80063;
  --pink-soft: #fdf2f8;
  --pink-line: #fbcfe8;
  --ok: #047857;
  --ok-bg: #ecfdf5;
  --ok-ink: #065f46;
  --warn: #92400e;
  --warn-bg: #fffbeb;
  --bad: #b91c1c;
  --bad-bg: #fef2f2;
  --bad-ink: #991b1b;
  --purple: #7c3aed;
  --purple-soft: #f5f3ff;
  --purple-line: #ddd6fe;
  --dark-btn: #111827;
  --on-dark: #fff;
  --backdrop: rgba(17, 24, 39, 0.5);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: "Inter", system-ui, sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--pink-btn); }
a:hover { color: var(--pink-btn-hover); }
h1, h2, h3, p { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 4px; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
[hidden] { display: none !important; }
/* A place for messages takes no room until it has one. */
[aria-live]:empty { display: none; }
.sr { position: absolute; left: -9999px; }

/* Header and tabs */
.hdr { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 80px; padding: 8px 0; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { width: 36px; height: 36px; border-radius: 8px; background: var(--pink); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.brand-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.brand-sub b { font-weight: 500; color: var(--ink); }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.latest { text-align: right; font-size: 12px; color: var(--muted); }
.latest b { display: block; font-weight: 600; color: var(--ink); }
.tabs { display: flex; gap: 24px; overflow-x: auto; }
.tabs a { padding: 10px 0; font-size: 13px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { border-bottom-color: var(--pink); color: var(--pink-text); font-weight: 600; }
.strip { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 0; }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.strip .wrap.start { justify-content: flex-start; }
.field-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.models { display: flex; align-items: center; gap: 6px; overflow-x: auto; max-width: 100%; }
.models .eyebrow { white-space: nowrap; margin-right: 4px; }
.page { max-width: 1280px; margin: 0 auto; padding: 24px 32px; display: flex; flex-direction: column; gap: 24px; }

/* Building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.card.sm { padding: 16px; }
.card.lg { padding: 32px; }
.card.flush { padding: 0; overflow-x: auto; }
.col { display: flex; flex-direction: column; gap: 12px; }
.col.g16 { gap: 16px; }
.col.g8 { gap: 8px; }
.col.between { justify-content: space-between; }
.rowx { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rowx.base { align-items: baseline; }
.rowx.wrapx { flex-wrap: wrap; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btns.base { align-items: baseline; }
.grid { display: grid; gap: 24px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid.main { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.main > .wide { grid-column: span 2; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.grid.facts { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); text-align: center; font-size: 11px; color: var(--muted); }
.fact { background: var(--soft); border-radius: 6px; padding: 6px; border: 1px solid transparent; }
.fact b { display: block; font-size: 12px; color: var(--ink); }
.fact.pink { border-color: var(--pink-line); }
.fact.pink b { color: var(--pink-text); }
.eyebrow { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.proto { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--pink-text); }
.kpi { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.kpi.none { font-size: 18px; letter-spacing: 0; line-height: 2; }
.score { font-size: 56px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.score.none { font-size: 28px; letter-spacing: -0.01em; }
.h-page { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; }
.h-step { font-size: 20px; font-weight: 600; margin-top: 8px; }
.h-form { font-size: 18px; font-weight: 600; }
.h-card { font-size: 14px; font-weight: 600; }
.small { font-size: 12px; color: var(--muted); }
.note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.body2 { font-size: 13px; }
.muted { color: var(--muted); }
.ink3 { color: var(--ink-3); }
.strong { font-weight: 600; color: var(--ink); }
.narrow { max-width: 640px; }
.mt4 { margin-top: 4px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.card-head { border-bottom: 1px solid var(--line-soft); padding-bottom: 16px; }
.divide { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar.tall { height: 8px; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--ink); }
.bar i.pink { background: var(--pink); }
.bar i.purple { background: var(--purple); }
.list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.list.body2 { font-size: 13px; }

.tb { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.tb th { background: var(--track); color: var(--ink-2); padding: 10px 12px; font-weight: 600; }
.tb td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tb.big { font-size: 13px; min-width: 820px; }
.tb.big th { padding: 10px 14px; font-size: 12px; }
.tb.big td { padding: 12px 14px; }
.tb .sub { font-weight: 400; font-size: 12px; color: var(--muted); }
.tb .name { font-weight: 500; }
.tb-box { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.tb-min { min-width: 520px; }
/* Seven columns, or cells of code that must not break mid-word: the table scrolls inside its card sooner. */
.tb-wide { min-width: 820px; }
.tb-wide .mono, .tb-wide .path { white-space: nowrap; }
/* The schema dialog (FR-D14): rule cards and the cells of the grounding trace. */
.rule { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--soft); }
.rule-title { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); margin-bottom: 4px; font-size: 13px; }
.rule-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rule-dot.ok { background: var(--ok); }
.rule-dot.pink { background: var(--pink); }
.tb td.cell-ok { background: var(--ok-bg); }
.tb td.cell-warn { background: var(--warn-bg); color: var(--warn); }
.tb td.cell-pink { background: var(--pink-soft); }
.pick select { font: inherit; font-size: 12px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: min(420px, 60vw); }

.btn { display: inline-block; font: inherit; font-size: 12px; font-weight: 500; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--soft); color: var(--ink); }
.btn.pink { background: var(--pink-btn); border-color: var(--pink-btn); color: #fff; }
.btn.pink:hover { background: var(--pink-btn-hover); color: #fff; }
.btn.big { font-size: 13px; padding: 9px 16px; }
.btn.icon { padding: 7px 9px; line-height: 0; }
.btn.block { display: block; padding: 8px 12px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.lnk { font: inherit; font-size: 12px; font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; color: var(--pink-text); text-decoration: underline; }
.chipb { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.b-pink { background: var(--pink-soft); color: var(--pink-text); border-color: var(--pink-line); }
.b-gray { background: var(--track); color: var(--ink-2); border-color: var(--line); }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.eng { font: inherit; font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 999px; border: 0; background: var(--track); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.eng.on { background: var(--dark-btn); color: var(--on-dark); }
.seg { display: inline-flex; border: 1px solid var(--line); background: var(--soft); border-radius: 8px; padding: 2px; font-size: 12px; }
.seg button { font: inherit; font-weight: 500; padding: 4px 10px; border-radius: 6px; border: 0; background: none; color: var(--ink-3); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.seg button:disabled { cursor: not-allowed; }
select, input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="email"], input[type="search"] { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 10px; max-width: 100%; }
input.big { padding: 9px 12px; }
input:disabled { background: var(--soft); color: var(--muted); }
.form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form.tight { gap: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.field.f2 { flex: 2 1 280px; }
.field.fix { flex: 0 0 auto; }
.field > input, .field > select { width: 100%; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.row:last-child { border-bottom: 0; }
.row.start { justify-content: flex-start; align-items: baseline; }
.row .small { display: block; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.step { flex: 1 1 200px; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.step.wide { flex-basis: 240px; gap: 12px; padding: 16px; align-items: flex-start; }
.step.cur { border-color: var(--pink); background: var(--pink-soft); }
.step b { font-weight: 600; display: block; }
.dot { width: 24px; height: 24px; border-radius: 50%; background: var(--dark-btn); color: var(--on-dark); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.step.cur .dot { background: var(--pink-btn); color: #fff; }
.step.todo .dot { background: var(--track); color: var(--muted); }
.cdn { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.cdn.on { font-weight: 500; }
.cdn.off { color: var(--muted); }
.codebox { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 12px; color: var(--ink-2); }
.empty { text-align: center; padding: 24px 8px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 12px; }
.empty b { display: block; font-weight: 600; color: var(--ink); }
.empty p { font-size: 13px; max-width: 520px; margin: 4px auto 0; }
.empty .btn { margin-top: 12px; }
.alert { border: 1px solid var(--bad); background: var(--bad-bg); color: var(--bad-ink); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.alert.info { border-color: var(--line); background: var(--soft); color: var(--ink-2); }
.foot { background: var(--soft); margin: 0 -20px -20px; padding: 16px 20px; border-top: 1px solid var(--line-soft); border-radius: 0 0 12px 12px; font-size: 12px; }

.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 720px; }
.cmp th { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; vertical-align: top; background: var(--soft); overflow-wrap: anywhere; }
.cmp th.first { width: 26%; }
.cmp th .sub { font-weight: 400; font-size: 12px; color: var(--muted); }
.cmp td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.cmp td.k { color: var(--ink-2); font-weight: 500; }
.cmp td .sub { display: block; font-weight: 400; font-size: 12px; }
.cmp .num { font-size: 20px; }
.good { background: var(--ok-bg); color: var(--ok-ink); font-weight: 600; }
.gap { background: var(--bad-bg); color: var(--bad-ink); font-weight: 600; }
.unk { color: var(--muted); font-weight: 600; }

.chart { display: block; width: 100%; max-width: 820px; height: auto; }
.chart text { font-family: "Inter", sans-serif; font-size: 11px; fill: var(--muted); }
.chart .gridline { stroke: var(--line-soft); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.chart .install { stroke: var(--pink); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .install-label { font-weight: 600; fill: var(--pink-text); }
.chart .hint { font-size: 12px; }

dialog { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--ink); overflow: hidden; }
dialog.small-dialog { width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: var(--backdrop); }
dialog[open] { display: flex; flex-direction: column; }
.dlg-head, .dlg-foot { background: var(--soft); padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dlg-head { border-bottom: 1px solid var(--line); }
.dlg-foot { border-top: 1px solid var(--line); justify-content: flex-end; }
.dlg-body { padding: 20px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
/* A table box scrolls sideways, which lets a flex column squeeze it to nothing: keep every part its own height. */
.dlg-body > * { flex: none; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.plan.on { border-color: var(--pink); background: var(--pink-soft); }
.plan ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }

@media (max-width: 800px) {
  .grid.main > .wide { grid-column: auto; }
  .grid.main, .grid.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .wrap, .page { padding-left: 16px; padding-right: 16px; }
  .card.lg { padding: 20px; }
  .latest { text-align: left; }
  /* The chart scales down with the screen, so its labels are drawn larger to stay readable. */
  .chart text { font-size: 20px; }
  .chart .hint { font-size: 22px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b0f17;
    --surface: #131926;
    --soft: #182030;
    --track: #232c3d;
    --line: #2a3447;
    --line-soft: #202a3b;
    --line-strong: #3a465c;
    --ink: #f3f4f6;
    --ink-2: #d1d5db;
    --ink-3: #b6bdc9;
    --muted: #9ca3af;
    --pink-text: #ff7ac3;
    --pink-btn: #d0007a;
    --pink-btn-hover: #e6198f;
    --pink-soft: #33122a;
    --pink-line: #6b1f52;
    --ok: #6ee7b7;
    --ok-bg: #0c2f24;
    --ok-ink: #a7f3d0;
    --warn: #fcd34d;
    --warn-bg: #33270a;
    --bad: #fca5a5;
    --bad-bg: #3a1414;
    --bad-ink: #fecaca;
    --purple: #a78bfa;
    --purple-soft: #1f1a33;
    --purple-line: #4c3d7a;
    --dark-btn: #f3f4f6;
    --on-dark: #111827;
    --backdrop: rgba(0, 0, 0, 0.65);
  }
  a { color: var(--pink-text); }
  a:hover { color: #ffa3d6; }
}

/* Dashboard and bot report (WP-05) */
.grid.kpis.four { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.b-purple { background: #f5f3ff; color: #6d28d9; }
.btn.dark { background: var(--dark-btn); border-color: var(--dark-btn); color: var(--on-dark); }
.btn.dark:hover { background: var(--dark-btn); color: var(--on-dark); opacity: 0.9; }
.bar i.green { background: #10b981; }
.card-head.tight { padding-bottom: 12px; }
.tilefoot { margin-top: 8px; font-size: 11px; color: var(--muted); }
.tilefoot .lnk { font-size: 11px; }
.botline { font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.small.inline, .row .small.inline { display: inline; font-weight: 400; }
.fact.green { border-color: #a7f3d0; }
.fact.green b { color: var(--ok); }
.panel { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.grid.pcts { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.pct { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; text-align: center; }
.pct span { display: block; font-size: 11px; color: var(--muted); }
.pct b { font-size: 16px; }
.pct.on { background: var(--pink-soft); border-color: var(--pink-line); }
.pct.on span, .pct.on b { color: var(--pink-text); }
.mono, .path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.path { color: var(--pink-text); }
.tb tr.sum td { background: var(--soft); font-weight: 600; }
.eyebrow.strong { color: var(--ink); font-weight: 700; }
.days { display: flex; flex-direction: column; gap: 6px; }
.day { display: grid; grid-template-columns: 110px 1fr 64px; gap: 8px; align-items: center; font-size: 12px; }
.day span:last-child { text-align: right; }
.grid.figures { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.figure { background: var(--soft); border-radius: 8px; padding: 12px; }
.figure b { display: block; font-size: 20px; }
.figure span { font-size: 12px; color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .b-purple { background: #2a1f4d; color: #c4b5fd; }
  .fact.green { border-color: #14532d; }
}
.swatch { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* AI answer tracking (WP-08): the raw answer as the provider gave it */
.answer-text { margin: 0; padding: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
.answer-text.raw { max-height: 280px; }
.sources { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.prompt-search { flex: 1 1 260px; max-width: 420px; }
.tb .prompt-cell { min-width: 220px; }
.tb .cited-cell { min-width: 160px; max-width: 260px; }
.prompt-cell .lnk { text-align: left; }
dialog.wide-dialog { width: min(1040px, calc(100vw - 32px)); }
.cited, .cited a { color: var(--pink-text); overflow-wrap: anywhere; }
.tb .rank-cell { min-width: 96px; }

/* Prompts page and approve step (WP-08b, design/screens/Prompts.html, Dialog-Approve.html) */
.card-pad { padding: 16px 20px; }
.card.flush > .card-pad.card-head { padding-bottom: 16px; }
.intro { max-width: 760px; margin: 0; }
.grow { flex: 1 1 auto; }
.col.g2 { gap: 2px; }
.col.g4 { gap: 4px; }
.col.g12 { gap: 12px; }
.col.end { align-items: flex-end; }
.tb tr.row-draft td { background: var(--pink-soft); }
.tb tr.row-bad td { background: var(--bad-bg); }
.tb-editor { min-width: 900px; }
.tb-editor th:nth-child(1) { width: 110px; }
.tb-editor th:nth-child(2) { width: 130px; }
.tb-editor th:nth-child(3) { width: 160px; }
.tb-editor th:nth-child(6) { width: 70px; }
.tb-editor select, .tb-editor input { width: 100%; font-size: 12px; }
.tb-editor .preview-cell { color: var(--ink-2); }
.tb-editor .text-cell { width: 34%; min-width: 280px; }
.tb-editor .lnk, .tb-sets .lnk, .tb-sets .name { white-space: nowrap; }
.prompt-text { width: 100%; min-height: 52px; resize: vertical; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; }
.prompt-text.bad { border-color: var(--bad); }
.problem { margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--bad); }
.problem.wide { flex-basis: 100%; margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-grid fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.add { color: var(--ok); }
.del { color: var(--bad); text-decoration: line-through; }
.callout { border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.callout.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); }
.three-up .figure { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
dialog .dlg-foot .grow { text-align: left; }
.fact.purple { background: var(--purple-soft); border-color: var(--purple-line); }
.fact.purple b { color: var(--purple); }
.chart .setmark { stroke: var(--purple); stroke-width: 1.25; stroke-dasharray: 2 4; }
.chart .setmark-label { fill: var(--purple); font-weight: 600; }
@media (max-width: 700px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Skills (WP-10b, design/screens/Skills.html, Skill-Edit.html) */
.skill-layout { display: grid; grid-template-columns: minmax(0, 1fr) 396px; gap: 24px; align-items: start; }
.skill-side { position: sticky; top: 140px; }
.q-head { display: flex; gap: 12px; align-items: flex-start; }
.qnum { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--dark-btn); color: var(--on-dark); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.q-title { font-size: 15px; }
.question input[type="text"], .question textarea, .example textarea, .example input[type="text"] { width: 100%; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; }
.question textarea, .example textarea { resize: vertical; min-height: 72px; }
.question textarea.mono, .example textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.question input:disabled, .question textarea:disabled { background: var(--soft); color: var(--ink-2); }
.q-bad { border-color: var(--bad); }
.question.q-bad { box-shadow: inset 3px 0 0 var(--bad); }
.pill-checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.pill-check { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.example { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.example.q-bad { border-color: var(--bad); }
.ex-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ex-grid .field, .example > .field { flex: none; }
pre.preview { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 520px; overflow: auto; }
.pre { white-space: pre-wrap; }
.tb td.types-cell { overflow-wrap: normal; word-break: normal; min-width: 96px; }
.lnk.start { align-self: flex-start; }
.chipb.b-purple { border-color: transparent; }
@media (max-width: 960px) {
  .skill-layout { grid-template-columns: minmax(0, 1fr); }
  .skill-side { position: static; }
}
@media (max-width: 700px) {
  .ex-grid { grid-template-columns: minmax(0, 1fr); }
}

/* WP-09a: the sign-in card, and who is signed in at the right of the header. */
.sign-in { max-width: 420px; margin: 24px auto 0; }
/* .field grows along a row of fields; in this column that growth would become 220px of height each. */
.sign-in .field { flex: none; }
.account:empty { display: none; }

/* Suggestions (WP-10d, design/screens/Suggestions.html) */
.grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
pre.markup { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 420px; overflow: auto; }
pre.markup .line { display: block; padding: 0 6px; margin: 0 -6px; }
pre.markup .line.added { background: var(--ok-bg); color: var(--ok); }
pre.wording { margin: 0; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.note-card { border-color: #fcd34d; }
.proto.warn-text { color: var(--warn); }
.path-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.cost-box { flex: 0 1 280px; min-width: 220px; }
.inline-field { flex-direction: row; align-items: center; gap: 8px; }
@media (max-width: 800px) {
  .grid.two-up { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-color-scheme: dark) {
  .note-card { border-color: #6b5214; }
}

/* WP-11c: the Users screen. A disabled account's row is quieter; the tab carries the waiting count. */
.tb tr.muted-row td { color: var(--muted); }
.tabs a .tab-count { margin-left: 6px; }
.refuse-reason { width: 100%; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; margin-top: 4px; }

/* WP-10f: the trace dialog (Dialog-Trace.html) */
.trace .tb td { vertical-align: top; }
.trace details summary { cursor: pointer; overflow-wrap: anywhere; }
.trace details pre { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }
