/* Striker console and HQ: "Lab social" (docs/CONTROL-PANELS.md, Visual style).
   A precise instrument holding social content: sharp 4px frames on hairlines, Geist for words and Geist Mono for
   anything measured; conversations are the only round things (Instagram-style DM bubbles), plus avatars.
   The signal gradient appears in exactly three places: the live story ring, the active top-nav tab, and the
   top edge of a live card. Status colours always come with a mono label, never alone. Works on a phone. */
:root {
  accent-color: var(--ink);
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f2f2f2;
  --ink: #0a0a0a;
  --ink-2: #525252;
  --ink-3: #6b6b6b;
  --line: #e6e6e6;          /* hairline */
  --line-2: #efefef;
  --line-strong: #d4d4d4;   /* control borders */

  --signal: linear-gradient(90deg, #6d28d9, #db2777);
  /* Status: the dot uses the bright colour, the label text the darker one (4.5:1 on white). */
  --live: #16a34a;   --live-text: #15803d;   --live-soft: #f0fdf4;
  --attn: #d97706;   --attn-text: #b45309;   --attn-soft: #fffbeb;
  --danger: #dc2626; --danger-text: #b91c1c; --danger-soft: #fef2f2;

  --bubble-them: #efefef;
  --bubble-me: #0a0a0a;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-wordmark: "Stack Sans Headline", var(--font-sans);
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 4px;
  --radius-bubble: 18px;
  --ring-focus: 0 0 0 3px rgba(10, 10, 10, 0.12);
  --dur: 120ms;
  --inset: 16px;
  --gap: 12px;

  /* The names the templates and older rules use, mapped onto the palette above. */
  --card: var(--surface); --text: var(--ink); --muted: var(--ink-2);
  --accent: var(--ink); --accent-text: #fff;
  --ok: var(--live-text); --ok-bg: var(--live-soft);
  --warn: var(--attn-text); --warn-bg: var(--attn-soft);
  --err: var(--danger-text); --err-bg: var(--danger-soft);
  --in: var(--bubble-them); --out: var(--bubble-me);
  --green: var(--ink); --green-ink: var(--ink); --green-soft: var(--surface-3); --green-line: var(--line-strong);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 13px;
  line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-color: var(--ink); }
:where(a, button, [tabindex], summary, input[type="radio"], input[type="checkbox"]):focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--radius-sm); }
:focus:not(:focus-visible) { outline: none; }
h1, h2, h3 { font-weight: 600; }
h1 { font-size: 20px; line-height: 28px; letter-spacing: -0.015em; margin: 0 0 var(--gap); }
h2 { font-size: 14px; margin: 20px 0 8px; letter-spacing: -0.005em; }
h3 { font-size: 13px; margin: 16px 0 6px; }
b, strong { font-weight: 600; }
p { margin: 6px 0 12px; }
code, kbd { font-family: var(--font-mono); font-size: 12px; }
.muted, .hint { color: var(--ink-2); }
.hint { display: block; font-size: 12px; font-weight: 400; }
.small { font-size: 12px; }

/* ── Measured things: mono numbers, mono caps labels, status dots ─────────── */
.mono, .num, td.num, .count { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.label-caps { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.state.live { color: var(--live-text); } .state.live::before { background: var(--live); }
.state.ok { color: var(--ink); } .state.ok::before { background: var(--ink); }
.state.warn { color: var(--attn-text); } .state.warn::before { background: var(--attn); }
.state.err { color: var(--danger-text); } .state.err::before { background: var(--danger); }
.state.off::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }

/* ── Top bar: the Hosho mark and wordmark, then the product ───────────────── */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.topbar-inner { max-width: 1080px; margin: 0 auto; min-height: 50px; padding: 6px var(--inset); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.brand-mark { width: 20px; height: 20px; flex: none; }
.wordmark { font-family: var(--font-wordmark); font-weight: 600; font-size: 18px; letter-spacing: -0.025em; color: var(--ink); white-space: nowrap; }
.product { font-family: var(--font-wordmark); font-weight: 600; font-size: 18px; letter-spacing: -0.025em; color: var(--ink-3); white-space: nowrap; }
.brand-name { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; padding-left: 12px; border-left: 1px solid var(--line); }
.account { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--ink-2); }
.account a { text-decoration: none; color: var(--ink-2); }
.account a:hover, .account button.link:hover { color: var(--ink); }
.nav { max-width: 1080px; margin: 0 auto; padding: 0 var(--inset); display: flex; gap: 22px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.nav a { position: relative; padding: 10px 0 12px; color: var(--ink-3); text-decoration: none; font-weight: 500; font-size: 13px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
/* Signal place 2 of 3: the active top-nav tab. */
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--signal); }

/* ── Page and cards: white frames on a hairline, sharp corners, no shadow ───── */
.page { max-width: 1080px; margin: 0 auto; padding: 20px var(--inset) 48px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--inset); margin-bottom: var(--gap); }
.card.narrow { max-width: 400px; margin: 48px auto; padding: 24px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
/* Signal place 3 of 3: the top edge of a live card. */
.card.live { border-top-color: transparent; }
.card.live::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--signal);
  border-radius: var(--radius) var(--radius) 0 0; }
.grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid.two { grid-template-columns: 1.4fr 1fr; } }

.flash, .banner { border-radius: var(--radius); padding: 8px 12px; margin-bottom: var(--gap); font-size: 12px; border: 1px solid var(--line); background: var(--surface); }
.flash-ok { color: var(--live-text); border-color: #bbf7d0; background: var(--live-soft); }
.flash-error, .error { background: var(--danger-soft); color: var(--danger-text); border: 1px solid #fecaca; }
.error { padding: 8px 12px; border-radius: var(--radius); font-size: 12px; }
.banner-warn { background: var(--attn-soft); color: var(--attn-text); border-color: #fde68a; }

/* ── Forms: 30px controls, hairline borders, ink focus ─────────────────────── */
form.stack { display: flex; flex-direction: column; gap: var(--gap); }
form.inline { display: inline; margin: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 12px; color: var(--ink-2); }
/* A checkbox or radio line flows as text (so a link or a small number box inside it stays in the sentence). */
label.check { display: block; position: relative; padding-left: 22px; font-weight: 400; font-size: 13px; color: var(--ink); }
label.check > input[type="checkbox"]:first-child, label.check > input[type="radio"]:first-child { position: absolute; left: 0; top: 2px; margin: 0; }
label.check input:not([type="checkbox"]):not([type="radio"]), label.check select { display: inline-block; width: 90px; margin: 0 4px; vertical-align: middle; }
/* Fields that aren't in a .stack form still get room between them. */
form:not(.stack) > label:not(.check), .card > label:not(.check) { margin-bottom: 10px; }
form:not(.stack) > label.check { margin-bottom: 6px; }
input, select, textarea { font: inherit; font-size: 13px; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); width: 100%; box-shadow: none; transition: border-color var(--dur), box-shadow var(--dur); }
input:hover, select:hover, textarea:hover { border-color: #a3a3a3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring-focus); }
select { appearance: none; padding-right: 28px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230a0a0a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; }
textarea { height: auto; min-height: 5.5rem; padding: 8px 10px; resize: vertical; line-height: 1.45; }
input[type="checkbox"], input[type="radio"] { width: auto; height: auto; border: 0; box-shadow: none; padding: 0; }
input[type="file"] { height: auto; padding: 6px 10px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px var(--inset); margin: 0; }
legend { font-weight: 600; font-size: 12px; padding: 0 4px; color: var(--ink); }
button, a.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 500;
  height: 30px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  box-shadow: none; cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color var(--dur), background var(--dur); }
button:hover, a.button:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
button.primary, a.button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
button.primary:hover, a.button.primary:hover { background: #262626; border-color: #262626; color: #fff; }
button.danger { color: var(--danger-text); border-color: #fca5a5; }
button.danger:hover { background: var(--danger-soft); color: var(--danger-text); border-color: var(--danger); }
button.link { height: auto; padding: 0; border: 0; box-shadow: none; background: none; color: var(--ink); font-weight: 400;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
button.link:hover { color: var(--ink); background: none; text-decoration-color: var(--ink); }
.account button.link { text-decoration: none; color: var(--ink-2); font-size: 12px; }
button[disabled] { background: var(--surface-3); color: var(--ink-3); border-color: var(--line); cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }

/* ── Lists, tags, checklist, tables ───────────────────────────────────────── */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: var(--gap); padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row:first-child { border-top: 0; }
/* Tags are mono labels on a hairline. A state tag (ok / warn / err / off) carries a dot, so colour is never alone. */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 6px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.05em;
  text-transform: uppercase; margin-right: 4px; vertical-align: middle; white-space: nowrap; }
.tag.warn::before, .tag.err::before, .tag.off::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
/* Green with a dot means one thing, live (.state.live). A good-but-not-live status is a plain ink label. */
.tag.ok { color: var(--ink); }
.tag.warn { color: var(--attn-text); } .tag.warn::before { background: var(--attn); }
.tag.err { color: var(--danger-text); } .tag.err::before { background: var(--danger); }
.tag.off::before { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.tag.solid { background: var(--ink); border-color: var(--ink); color: #fff; }
/* Suggested shopper questions (Try it) are buttons, not labels: plain words on a sharp chip. */
button.tag { height: 28px; padding: 0 10px; font-family: var(--font-sans); font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--ink);
  border-color: var(--line-strong); }
button.tag:hover { border-color: var(--ink); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.tick { flex: 0 0 20px; height: 20px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); display: inline-flex; align-items: center;
  justify-content: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); background: var(--surface); }
.done .tick { background: var(--ink); border-color: var(--ink); color: #fff; }

table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 7px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.list th:first-child, table.list td:first-child { padding-left: 0; }
table.list th:last-child, table.list td:last-child { padding-right: 0; }
table.list th { color: var(--ink-3); font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; border-top: 0; }
table.list td.num { font-size: 12.5px; }
table.list tr.link-row { cursor: pointer; }
table.list tr.link-row:hover td { background: var(--surface-2); }
table.list td a { text-decoration: none; }
@media (max-width: 640px) {
  table.list thead { display: none; }
  table.list tr { display: block; border-top: 1px solid var(--line); padding: 8px 0; }
  table.list td { display: block; border: 0; padding: 2px 0; }
}

/* ── Conversations: Instagram-style DM bubbles, the only round shapes ─────── */
.thread, #thread-messages { display: flex; flex-direction: column; gap: 6px; }
.thread { max-height: 65vh; overflow-y: auto; padding: 4px 2px; }
.msg, .bubble { max-width: 78%; padding: 8px 12px; border-radius: var(--radius-bubble); font-size: 13.5px; line-height: 1.4;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.in, .bubble.them { background: var(--bubble-them); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out, .bubble.me { background: var(--bubble-me); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg .meta, .bubble .meta { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.02em; color: var(--ink-3); margin-bottom: 2px; white-space: normal; }
.msg.out .meta, .bubble.me .meta { color: rgba(255, 255, 255, 0.62); }
.msg.out a, .bubble.me a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.5); }
.msg .status { display: block; font-size: 12px; color: var(--danger-text); margin-top: 4px; white-space: normal; }
.msg.out .status { color: #fca5a5; }
.bubble-row { display: flex; margin: 4px 0; }
.bubble-row.me { justify-content: flex-end; }
.bubble.sm { font-size: 12.5px; padding: 7px 11px; max-width: 100%; }
/* A message not sent (yet): a draft, a suggestion or a blocked reply is an outlined, dashed bubble. */
.draft { display: inline-block; max-width: 100%; background: var(--surface); color: var(--ink); border: 1px dashed var(--ink-3);
  border-radius: var(--radius-bubble); border-bottom-right-radius: 4px; padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
div.draft, p.draft { display: block; }
.draft.blocked { border-color: var(--danger); background: var(--danger-soft); }
/* A stored fact (a knowledge answer) isn't a message: a plain framed note. */
.fact { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.changed { display: none; }
.changed.show { display: block; }
details summary { cursor: pointer; color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.head-row { justify-content: space-between; margin-top: 0; }
.m0 { margin: 0; }
.mt0 { margin-top: 0; }
.mt1 { margin-top: 16px; }

/* ── The assistant's avatar and its story ring ───────────────────────────── */
/* Signal place 1 of 3: the ring is the signal gradient only while the brand is live and replying. */
.ring { --size: 28px; display: inline-flex; flex: none; width: var(--size); height: var(--size); border-radius: 50%; padding: 2px; background: #d4d4d4; vertical-align: middle; }
.ring-face { flex: 1; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--ink); color: #fff;
  border: 2px solid var(--surface); font-family: var(--font-mono); font-size: calc(var(--size) * 0.36); font-weight: 500; line-height: 1; }
.ring.lg { --size: 48px; padding: 2.5px; }
.ring.lg .ring-face { border-width: 2.5px; }
.ring-live { background: var(--signal); }
.ring-paused { background: #a3a3a3; }
.ring-paused .ring-face { background: #737373; }
.ring-draft { background: transparent; padding: 0; border: 2px dashed #a3a3a3; }
.ring-draft .ring-face { border-width: 2px; }
.assistant-id { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.assistant-id .who-name { font-weight: 600; font-size: 14px; }
.assistant-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.assistant-row .assistant-id { margin: 0; }
.assistant-preview { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.assistant-preview .bubble, .assistant-preview .bubbles { max-width: 100%; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row > label { flex: 1 1 240px; margin: 0; align-self: flex-start; }   /* fields line up at the top even when one has a hint under it */
@media (max-width: 720px) { .assistant-row { grid-template-columns: 1fr; gap: 14px; } }

/* ── Settings: section tabs and the hub's status cards ────────────────────── */
.tabs { display: flex; gap: 0 20px; margin: 0 0 var(--gap); border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.tabs a { padding: 8px 0 9px; color: var(--ink-3); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.setup-cards { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 720px) { .setup-cards { grid-template-columns: 1fr 1fr; } }
.setup-card { display: block; color: inherit; text-decoration: none; margin-bottom: 0; transition: border-color var(--dur); }
.setup-card:hover { color: inherit; border-color: var(--ink); }

/* ── Settings → Connections and Bot mode ──────────────────────────────────── */
button.small-button, a.button.small-button { height: 26px; padding: 0 10px; font-size: 12px; }
.ig-card { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.ig-card:first-of-type { border-top: 0; }
.ig-head { display: flex; gap: var(--gap); align-items: center; flex-wrap: wrap; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: 0 0 40px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0; font-size: 12px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }
.problems { margin: 8px 0; padding-left: 18px; color: var(--attn-text); }
.picker { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .picker { grid-template-columns: 1fr 1fr; } }
.code { font: 500 20px/1.2 var(--font-mono); letter-spacing: .05em; }
.mode-sub { margin: 4px 0 8px 24px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── HQ → Usage: Insights-style tiles, numeric columns, daily column charts ─ */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--gap); margin: 0 0 var(--gap); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px var(--inset) 14px; display: flex; flex-direction: column; gap: 6px; }
.stat .value { font-family: var(--font-mono); font-size: 26px; font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; }
.stat .label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.stat .delta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
table.list th.num, table.list td.num { text-align: right; }
table.list td.num { white-space: nowrap; }
.table-scroll { overflow-x: auto; margin: 0 -2px; padding: 0 2px; }
.period-picker { align-items: flex-end; margin-top: 0; }
.period-picker > label { margin-bottom: 0; }
.page-head .actions:has(.period-picker) { align-items: flex-end; }
table.list tr.total td { font-weight: 600; border-top: 1px solid var(--ink); }
.usage-chart { width: 100%; height: auto; display: block; overflow: visible; }
.usage-chart .bar { fill: var(--ink); }
.usage-chart .col:hover .bar { fill: var(--ink-2); }
.usage-chart .hit { fill: transparent; }
.usage-chart .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.usage-chart .axis-label { fill: var(--ink-3); font-size: 10.5px; font-family: var(--font-mono); }
.env-note { margin: 0 0 var(--gap); }

/* ── Console navigation: seven sections, then the section's pages as tabs ─── */
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 89px; z-index: 1; }
.subnav-inner { max-width: 1080px; margin: 0 auto; padding: 0 var(--inset); display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.subnav-inner::-webkit-scrollbar, .nav::-webkit-scrollbar { display: none; }
.subnav a { margin: 7px 0; padding: 4px 10px; border-radius: var(--radius); color: var(--ink-2); font-weight: 500; font-size: 12.5px; text-decoration: none; border: 1px solid transparent; }
.subnav a:hover { color: var(--ink); background: var(--surface-3); }
.subnav a[aria-current="page"] { color: var(--ink); background: var(--surface); border-color: var(--ink); }
.status-tag { height: 22px; }
.grid.halves { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid.halves { grid-template-columns: 1fr 1fr; } }

/* ── Page heads: a title, one plain line saying what the page is for, actions ─ */
.page-head { margin: 4px 0 16px; }
.page-head h1 { margin: 0 0 4px; font-size: 22px; line-height: 30px; }
.page-head > p { margin: 0; max-width: 72ch; }
.page-head .actions { margin-top: 12px; }

/* ── Home: "Set up your assistant" tiles and next steps ───────────────────── */
.setup-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 12px; }
.setup-tile { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color var(--dur); }
@media (min-width: 720px) { .setup-tile { min-height: 168px; } }
.setup-tile:hover { color: inherit; border-color: var(--ink); }
.tile-top { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tile-top .tag { margin-right: 0; }
.meter { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.meter i { height: 2px; background: var(--line-strong); }
.level-basics .meter i:first-child, .level-detailed .meter i { background: var(--ink); }
.tile-link { margin-top: auto; color: var(--ink); font-weight: 500; }
.setup-summary > summary { list-style: none; display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.setup-summary > summary::-webkit-details-marker { display: none; }
.steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.steps li a { text-decoration: none; }

/* ── Knowledge: answers grouped by topic ──────────────────────────────────── */
.kb-group h2 { display: flex; align-items: baseline; gap: 8px; }
.kb-group h2 .count { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.kb-row { align-items: flex-start; }
.kb-main { flex: 1 1 320px; min-width: 0; }
.kb-main details { margin-top: 4px; }
.kb-edit form { margin-top: 8px; padding: 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
@media (min-width: 860px) { .sticky-side { position: sticky; top: 136px; align-self: start; } }

/* ── Voice: one card per option, each showing its reply as a DM bubble ────── */
.voice-ask { margin: 10px 0 4px; }
.voice-options { display: grid; gap: 8px; grid-template-columns: 1fr; margin-top: 10px; }
@media (min-width: 720px) { .voice-options { grid-template-columns: 1fr 1fr; } }
.voice-option { display: grid; grid-template-columns: 18px 1fr; gap: 8px 8px; align-items: start; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; color: var(--ink); font-weight: 400; font-size: 13px; transition: border-color var(--dur); }
.voice-option:hover { border-color: #a3a3a3; }
.voice-option input { margin: 2px 0 0; grid-row: span 2; }
.voice-option .voice-name { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.voice-option .voice-sample { grid-column: 2; display: flex; justify-content: flex-end; }
.voice-option .voice-sample.muted { justify-content: flex-start; font-size: 12.5px; color: var(--ink-2); }
.voice-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface-2); }
.custom-tone { display: none; grid-column: 1 / -1; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.voice-options:has(input[value="custom"]:checked) .custom-tone { display: flex; }

/* ── Goal & details (WP G2): goal cards; parts of the page follow the picked goal (no JS: :has) ─────── */
.goal-options { display: grid; gap: 8px; grid-template-columns: 1fr; margin-top: 10px; }
@media (min-width: 720px) { .goal-options { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .goal-options { grid-template-columns: 1fr 1fr 1fr; } }
.goal-option { display: grid; grid-template-columns: 18px 1fr; gap: 4px 8px; align-items: start; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; color: var(--ink); font-weight: 400; font-size: 13px; transition: border-color var(--dur); }
.goal-option:hover { border-color: #a3a3a3; }
.goal-option input { margin: 2px 0 0; grid-row: span 2; }
.goal-option .goal-name { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.goal-option .goal-desc { grid-column: 2; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.goal-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface-2); }
.after-goal { display: flex; flex-direction: column; gap: 6px; }
.details-table td { vertical-align: top; }
.add-detail { margin-top: 12px; border: 1px solid var(--line, #e6e6e6); border-radius: 4px; }
.add-detail > summary { cursor: pointer; padding: 10px 12px; font-weight: 500; list-style: none; }
.add-detail > summary::before { content: "+ "; font-family: var(--font-mono, monospace); }
.add-detail[open] > summary::before { content: "− "; }
.add-detail-body { padding: 0 12px 12px; display: grid; gap: 12px; }
.add-detail-builtins { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.add-detail-own { display: grid; gap: 8px; }
.details-table th:nth-child(1), .details-table th:nth-child(3) { width: 72px; }
.details-table th:nth-child(2) { width: 36%; }
.details-table tr:has(input[type="checkbox"][name$="_on"]:not(:checked)) td:not(:first-child) { opacity: 0.5; }
.goal-form .banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.details-table td input[type="text"], .details-table td input:not([type]) { width: 100%; }
.details-table td > input + input { margin-top: 6px; }
.details-table .detail-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.details-table .detail-tags:empty { display: none; }
.goal-preview { display: flex; flex-direction: column; gap: 2px; max-width: 520px; }
.goal-preview > .for-goal { display: none; flex-direction: column; gap: 4px; }
.cta-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border: 1px solid var(--ink); border-radius: var(--radius);
  font-size: 12.5px; font-weight: 600; background: var(--surface); }
/* Only the picked goal's fields, badges and preview show. Without :has support everything shows (still usable). */
@supports selector(:has(a)) {
  .goal-form .for-goal:not(.goal-preview > .for-goal, .for-inline) { display: none; }
  .goal-form .need { display: none; }
  .goal-form:has(input[name="goal_type"][value="link_booking"]:checked) .for-link_booking:not(.goal-preview > .for-goal, .for-inline) { display: block; }
  .goal-form:has(input[name="goal_type"][value="link_booking"]:checked) .goal-preview > .for-link_booking { display: flex; }
  .goal-form:has(input[name="goal_type"][value="link_booking"]:checked) .need-link_booking { display: inline-flex; }
  .goal-form:has(input[name="goal_type"][value="link_purchase"]:checked) .for-link_purchase:not(.goal-preview > .for-goal, .for-inline) { display: block; }
  .goal-form:has(input[name="goal_type"][value="link_purchase"]:checked) .goal-preview > .for-link_purchase { display: flex; }
  .goal-form:has(input[name="goal_type"][value="link_purchase"]:checked) .need-link_purchase { display: inline-flex; }
  .goal-form:has(input[name="goal_type"][value="quote_request"]:checked) .for-quote_request:not(.goal-preview > .for-goal, .for-inline) { display: block; }
  .goal-form:has(input[name="goal_type"][value="quote_request"]:checked) .goal-preview > .for-quote_request { display: flex; }
  .goal-form:has(input[name="goal_type"][value="quote_request"]:checked) .need-quote_request { display: inline-flex; }
  .goal-form:has(input[name="goal_type"][value="callback"]:checked) .for-callback:not(.goal-preview > .for-goal, .for-inline) { display: block; }
  .goal-form:has(input[name="goal_type"][value="callback"]:checked) .goal-preview > .for-callback { display: flex; }
  .goal-form:has(input[name="goal_type"][value="callback"]:checked) .need-callback { display: inline-flex; }
  .goal-form:has(input[name="goal_type"][value="reservation"]:checked) .for-reservation:not(.goal-preview > .for-goal, .for-inline) { display: block; }
  .goal-form:has(input[name="goal_type"][value="reservation"]:checked) .goal-preview > .for-reservation { display: flex; }
  .goal-form:has(input[name="goal_type"][value="reservation"]:checked) .need-reservation { display: inline-flex; }
  .goal-form:has(input[name="goal_type"][value="visit_store"]:checked) .for-visit_store:not(.goal-preview > .for-goal, .for-inline) { display: block; }
  .goal-form:has(input[name="goal_type"][value="visit_store"]:checked) .goal-preview > .for-visit_store { display: flex; }
  .goal-form:has(input[name="goal_type"][value="visit_store"]:checked) .need-visit_store { display: inline-flex; }
  .goal-form:has(input[name="goal_type"][value="enquiry_only"]:checked) .for-enquiry_only:not(.goal-preview > .for-goal, .for-inline) { display: block; }
  .goal-form:has(input[name="goal_type"][value="enquiry_only"]:checked) .goal-preview > .for-enquiry_only { display: flex; }
  .goal-form:has(input[name="goal_type"][value="enquiry_only"]:checked) .need-enquiry_only { display: inline-flex; }
}
@supports selector(:has(a)) { .goal-form .for-goal.for-inline { display: none; } }
@supports selector(:has(a)) {
  .goal-form:has(input[name="goal_type"][value="link_purchase"]:checked) .for-inline.for-link_purchase,
  .goal-form:has(input[name="goal_type"][value="reservation"]:checked) .for-inline.for-reservation { display: inline; }
}
@supports not selector(:has(a)) { .goal-preview > .for-goal { display: flex; } }

/* ── Settings: the danger zone ────────────────────────────────────────────── */
.danger-zone { border-color: #fca5a5; margin-top: 20px; }
.danger-zone h2 { color: var(--danger-text); }

/* ── Narrow screens: the brand name gets its own line, nothing overflows ──── */
@media (max-width: 640px) {
  .topbar-inner { gap: 8px 12px; }
  .brand-name { order: 3; width: 100%; padding-left: 0; border-left: 0; font-size: 12px; }
  .account { gap: 10px; }
  .account .who { display: none; }
  .subnav { top: 0; position: static; }
  .page-head h1 { font-size: 20px; line-height: 28px; }
  .msg, .bubble { max-width: 88%; }
}

/* Live data: a source's test answer */
pre.raw { max-height: 24rem; overflow: auto; white-space: pre-wrap; word-break: break-word; padding: .75rem;
          border-radius: 8px; background: var(--surface-3); font: 12px/1.5 var(--font-mono); }

/* Voice: style card and examples (WP V2, V4) */
.choice-list { display: grid; gap: 8px; }
.preserve-lines { white-space: pre-line; }
.example-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.example-row { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.example-row:first-child { border-top: 0; padding-top: 4px; }
.example-fields { display: grid; gap: 8px; grid-template-columns: 1fr; align-items: start; }
.example-fields label { margin: 0; }
.example-order input { width: 64px; font-family: var(--font-mono); }
.example-preview { display: grid; gap: 4px; align-content: start; padding: 8px 12px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius); }
.example-preview.empty { align-content: center; min-height: 56px; }
@media (min-width: 900px) {
  .example-row { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .example-fields { grid-template-columns: 72px 1fr 1fr; }
  .example-fields .example-tag { grid-column: 2; }
  .example-fields .example-remove { grid-column: 3; align-self: center; }
}
/* Knowledge → Announcements (dated notices) */
.notice-row { align-items: flex-start; gap: 16px; }
.notice-main { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.notice-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notice-dates { font-size: 12px; color: var(--ink); min-width: 92px; }
.notice-actions { flex: 0 0 auto; }
.notice-preview { display: grid; gap: 4px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius); }
.notice-expired > summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.notice-expired[open] > summary { margin-bottom: 8px; }
.notice-expired .notice-row { opacity: 0.72; }
.notice-when { display: grid; gap: 10px; }
.grid.two.tight { grid-template-columns: 1fr 1fr; gap: 10px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { position: relative; }
.preset input { position: absolute; opacity: 0; pointer-events: none; }
.preset span { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--line);
               border-radius: var(--radius-sm); font-size: 12.5px; cursor: pointer; background: var(--surface); }
.preset input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.preset input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; margin: 8px 0 4px; }

/* ── Knowledge sources (K6a): reference codes, coverage, the document view ─── */
.ref { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-3);
       border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1px 5px; white-space: nowrap; vertical-align: 1px; }
.ref-lg { font-size: 12px; padding: 2px 6px; vertical-align: 3px; }
.mb0 { margin-bottom: 0; }
.stat.attn .value { color: var(--attn-text); }
.meter { display: inline-block; width: 64px; height: 4px; background: var(--line); vertical-align: middle; border-radius: 2px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--ink); }
table.kb-sources td a { color: var(--ink); }
.version-switch { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kb-source { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
@media (min-width: 980px) { .kb-source { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); } .kb-side { position: sticky; top: 16px; } }
.kb-doc { padding-top: 8px; }
.kb-page { margin: 18px 0 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.kb-page:first-child { margin-top: 4px; border-top: 0; }
.kb-section { margin: 12px 0 14px; }
.kb-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 6px; }
.kb-section-head strong { font-size: 13.5px; }
.kb-passage { position: relative; padding: 6px 10px 6px 12px; margin: 0 0 4px; border-left: 2px solid var(--line);
              white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; }
.kb-passage.state-item { border-left-color: var(--ink); background: var(--surface-2); }
.kb-passage.state-draft { border-left: 2px dashed var(--attn); }
.kb-passage.state-passage { border-left-color: var(--line); color: var(--ink-2); }
.kb-passage.state-internal { border-left-color: var(--line); color: var(--ink-3);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); }
.kb-flags { display: flex; gap: 6px; margin-top: 6px; }
.kb-plain { white-space: pre-wrap; font-size: 13px; line-height: 1.55; color: var(--ink-2); max-height: 70vh; overflow: auto; }
.kb-side-head { margin: 4px 0 8px; }
.kb-item { padding: 12px 14px; margin-bottom: 8px; }
.kb-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.kb-item-tags { display: inline-flex; gap: 4px; flex: none; }
.kb-where { color: var(--ink-3); margin-top: 6px; }
.kb-legend { display: grid; gap: 4px; margin-top: 14px; color: var(--ink-2); }
.kb-legend .sw { display: inline-block; width: 10px; height: 12px; margin-right: 8px; vertical-align: -2px; border-left: 2px solid var(--line); }
.kb-legend .sw-item { border-left-color: var(--ink); background: var(--surface-2); }
.kb-legend .sw-draft { border-left: 2px dashed var(--attn); }
.kb-legend .sw-internal { background: repeating-linear-gradient(135deg, var(--line) 0 2px, var(--surface) 2px 4px); }
.nowrap { white-space: nowrap; }
table.kb-sources td:first-child { min-width: 260px; }
.kb-parent { margin: 22px 0 2px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.kb-leftout { margin-top: 8px; } .kb-leftout ul { margin: 6px 0 0; padding-left: 16px; } .kb-leftout summary { cursor: pointer; }
.code-link { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.code-link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.kb-item:target { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
@media (max-width: 979px) { .kb-side { order: -1; } }

/* Inbox → Requests (G5): status tiles that filter the list, and label/value pairs on a request. */
a.stat-link { text-decoration: none; color: inherit; }
a.stat-link:hover { border-color: var(--ink-3); }
a.stat-link.current { border-color: var(--ink); }
dl.pairs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
dl.pairs dt { padding-top: 2px; }
dl.pairs dd { margin: 0; }
.mb1 { margin-bottom: 10px; }
table.leads .tag { margin-right: 2px; }

/* ── Policy cards and review by section (K6b) ─────────────────────────────── */
.pol-head h1 { margin-bottom: 6px; }
.pol-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pol-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
@media (min-width: 980px) { .pol-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); } .pol-side { position: sticky; top: 16px; } }
.pol-summary { font-size: 14px; line-height: 1.55; margin-top: 6px; }
.pol-applies { margin-top: 6px; }
.pol-mode p { margin-top: 6px; }
.pol-modes { display: grid; gap: 6px; margin-top: 8px; }
.pol-mode-opt { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.pol-mode-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pol-mode-opt > span { display: grid; gap: 2px; font-weight: 400; }
.pol-mode-opt input { margin-top: 3px; flex: none; }
.pol-rules-head { margin: 18px 0 8px; }
.pol-clause { padding: 14px 16px; margin-bottom: 8px; }
.pol-clause.flagged { border-color: #fde68a; box-shadow: inset 3px 0 0 var(--attn); }
.pol-clause:target { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pol-clause-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.pol-num { font-size: 12px; font-weight: 600; color: var(--ink); }
.pol-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.pol-rule { font-size: 13.5px; line-height: 1.5; }
.pol-arrow { color: var(--ink-3); padding: 0 2px; }
.pol-conds { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.pol-exc-line { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pol-quote { margin: 10px 0 8px; padding: 8px 12px; border-left: 2px solid var(--ink); background: var(--surface-2); font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.pol-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pol-terms { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 11px; color: var(--ink-2); }
.pol-from { color: var(--ink-3); }
.pol-errors { margin: 0 0 8px; padding: 8px 12px 8px 26px; background: var(--attn-soft); color: var(--attn-text); border-radius: var(--radius); font-size: 12.5px; }
.pol-fields { display: grid; gap: 10px; }
.pol-fields label { display: grid; gap: 4px; font-size: 12.5px; }
.pol-fields select { max-width: 100%; }
.pol-inline, .pol-exc { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pol-exc { display: grid; gap: 4px; }
.pol-inline legend, .pol-exc legend { font-size: 12px; color: var(--ink-3); padding: 0 4px; }
.pol-save { margin-top: 12px; align-items: center; }
.pol-ok { color: var(--ink-3); }
.pol-fold > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; padding: 2px 0 8px; list-style: none; }
.pol-fold > summary::-webkit-details-marker { display: none; }
.pol-fold-rule { font-weight: 600; font-size: 13.5px; }
.pol-fold[open] > summary .small { display: none; }
.pol-example { padding: 6px 0 8px; border-bottom: 1px dashed var(--line); }
.pol-example:last-child { border-bottom: 0; }
.pol-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rv-progress { display: grid; gap: 8px; }
.rv-progress-line { display: flex; align-items: baseline; gap: 10px; }
.rv-big { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.rv-meter { width: 100%; height: 4px; }
.rv-group-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.rv-group-head h2 { display: flex; align-items: baseline; gap: 8px; font-size: 15px; }
.rv-group-head h2 .count { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.rv-table { width: 100%; border-collapse: collapse; }
.rv-table td { border-top: 1px solid var(--line); padding: 8px 6px; vertical-align: top; font-size: 13px; }
.rv-sec { width: 34%; }
.rv-sec a { color: var(--ink); }
.rv-check { display: inline-block; width: 16px; color: var(--ink); font-weight: 600; }
.rv-section.done .rv-sec a { color: var(--ink-2); }
.rv-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 2px 0; }
.rv-item .rv-title { flex: 1 1 200px; min-width: 0; color: var(--ink); }
.rv-tags { display: inline-flex; gap: 6px; align-items: center; }
.rv-plain { margin: 6px 0 0; padding-left: 18px; font-size: 13px; columns: 2; }
.rv-fold summary { cursor: pointer; color: var(--ink-2); }
@media (max-width: 720px) { .rv-sec { width: auto; display: block; } .rv-table td { display: block; } .rv-plain { columns: 1; } }
/* ── "Why this reply?" under Striker's replies (K7): the text it saw, item codes, versions, checks ──────────── */
.why-wrap { display: flex; flex-direction: column; max-width: 78%; margin: -2px 0 6px; }
.why-wrap.out { align-self: flex-end; align-items: flex-end; }
.why-wrap.in { align-self: flex-start; }
.why > summary { list-style: none; cursor: pointer; color: var(--ink-3); text-align: right; }
.why > summary::-webkit-details-marker { display: none; }
.why > summary::after { content: " ›"; }
.why[open] > summary::after { content: " ⌄"; }
.why[open] { width: 100%; }
.why-body { margin-top: 6px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 8px; text-align: left; }
.why-label { margin-top: 4px; }
.why-ev { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.why-ev-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.why-quote { margin: 0; padding: 6px 10px; border-left: 2px solid var(--ink); background: var(--surface-2); font-size: 13px;
  line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.why-where a { color: var(--ink); }
.why-changed { color: var(--attn-text); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.why-seen, .why-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.why-check-fail { color: var(--danger-text); }
.why-check-note { color: var(--ink-3); }
.why-more > summary { color: var(--ink-2); }
/* The source view, opened from "Why this reply?" at a passage: that passage stands out. */
.kb-passage:target { outline: 2px solid var(--ink); outline-offset: 2px; background: var(--surface-2); }
/* Knowledge → Conflicts (K8): two sides, the differing values marked. */
.conflict-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.conflict-sides { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 8px; }
.conflict-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.conflict-side .fact { width: 100%; box-sizing: border-box; margin: 0; }
.conflict-side-head { display: flex; flex-direction: column; gap: 2px; }
.conflict-text mark { background: var(--attn-soft); color: var(--ink); font-weight: 600; padding: 0 1px; border-bottom: 2px solid var(--attn); }
.conflict-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.conflict-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); align-items: center; }
.stat a.stat-link { color: inherit; text-decoration: none; display: contents; }
@media (max-width: 719px) { .conflict-sides { grid-template-columns: 1fr; } }

/* Selling: sales steps, push-backs, offers, follow-up and chat starters */
.step-list { margin: 0 0 8px; padding-left: 22px; display: grid; gap: 6px; }
.step-list input { width: 100%; }
.suggest { margin: 0 0 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.suggest .suggested { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 4px; color: var(--ink-3); }
.suggest .actions { margin-top: 10px; }
.card .add-row { margin-top: 0; }
.offers-table td, .offers-table th { padding-right: 8px; }
.offers-table td.when-cell { min-width: 210px; }
.offers-table td.when-cell select, .offers-table td.when-cell input { width: 100%; }
.offers-table td.when-cell input { margin-top: 6px; }
.offers-table td.when-cell [hidden], .offers-table input[hidden] { display: none; }
.offers-table .unit { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.offers-table .unit input { width: 64px; }
.offers-table td:nth-child(5) input { width: 72px; }
table.list td input, table.list td select { width: 100%; }
.offers-table .unit input { width: 64px; }
.ig-preview { margin-top: 6px; max-width: 320px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.ig-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.ig-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--line-strong); display: inline-block; }
.ig-body { padding: 14px 12px 10px; }
.ig-hello { margin: 0 0 10px; text-align: center; font-size: 11.5px; color: var(--ink-3); }
.ig-starters { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ig-starter { display: inline-block; max-width: 92%; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 12.5px; color: var(--ink); background: var(--surface); }
.ig-input { margin: 4px 12px 12px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 12.5px; color: var(--ink-3); }
/* ── K10: what changed between versions, source-change reasons, old vs new wording ── */
.kb-reason { color: var(--attn-text); margin-top: 4px; }
.kb-replace { display: inline-block; }
.kb-replace > summary { list-style: none; cursor: pointer; }
.kb-replace > summary::-webkit-details-marker { display: none; }
.kb-replace[open] > form { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); max-width: 460px; }
.kb-changes { margin-bottom: 16px; }
.kb-changes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.kb-change-list { list-style: none; margin: 0; padding: 0; }
.kb-change { padding: 10px 0; border-top: 1px solid var(--line); }
.kb-change:first-child { border-top: 0; }
.kb-change-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.kb-change-label { min-width: 70px; }
.kb-change-changed .kb-change-label { color: var(--attn-text); }
.kb-change-removed .kb-change-label, .kb-change-removed strong { color: var(--ink-3); }
.kb-diff { line-height: 1.6; color: var(--ink-2); }
.kb-diff del { color: var(--danger-text); text-decoration: line-through; background: var(--danger-soft); padding: 0 2px; }
.kb-diff ins { color: var(--ink); text-decoration: none; background: var(--attn-soft); padding: 0 2px; font-weight: 600; }
.kb-change-items { margin-top: 4px; }
.pol-change { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0 4px; }
.pol-change-col .pol-quote { margin: 4px 0 0; }
.pol-old { border-left-color: var(--ink-3); color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line); }
.pol-new { border-left-color: var(--attn); }
.pol-use-new { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; }
@media (max-width: 640px) { .pol-change { grid-template-columns: 1fr; } }
.kb-replace > summary.button { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; }
.kb-replace > summary.button:hover { border-color: var(--ink); }

/* K13: how often knowledge was used in real replies (subtle, mono; "Never used" only with enough traffic) */
.kb-section-meta { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.kb-used { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.02em; }
.kb-used-inline { margin-left: 8px; }
.kb-use-note { margin: 0 0 10px; }
.kb-sort { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin: 0 0 var(--gap); }
/* Review products (K14/K15): a menu's batch, and a photo's transcription with its unclear parts marked. */
.menu-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.menu-tiles .tile { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.menu-tiles .tile-num { font-size: 28px; line-height: 1.1; margin-bottom: 4px; }
@media (max-width: 720px) { .menu-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
pre.transcript { font-size: 12.5px; line-height: 1.55; }
mark.unclear, span.unclear { background: var(--attn-soft); color: inherit; box-shadow: inset 0 -2px 0 var(--attn); padding: 0 2px; }
.unclear-note { color: var(--attn-text); }
table.menu-review tr.row-unclear td:first-child { box-shadow: inset 3px 0 0 var(--attn); padding-left: 12px; }

/* Building stage (docs/PLAN-test-api.md §6): HQ's hand-off card and the console's Hosho-only banner. */
.spread { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.building-card { border-top: 2px solid var(--attn); }
.building-banner .building-inner { max-width: 1080px; margin: 0 auto; padding: 0 var(--inset); }
.building-banner { background: var(--attn-soft, #fffbeb); border-top: 1px solid var(--line); padding: 5px 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--attn-text); }
.keybox { display: flex; gap: 8px; align-items: center; }
.keybox input { font-family: var(--font-mono); }

/* HQ test runs and customer simulators (docs/PLAN-redline-multiturn.md v2). Test bots wear the dashed grey ring. */
.row-head { display: flex; justify-content: space-between; align-items: center; gap: var(--gap); margin-bottom: 8px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { flex: 1 1 260px; width: auto; }
.sim-head .sim-title { display: flex; gap: 14px; align-items: center; }
.sim-head h1 .tag { vertical-align: middle; }
.sim-style { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; }
.sim-style fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.sim-style legend { margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--gap); align-items: start; }
.grid2 > .card { margin: 0 0 var(--gap); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.label-summary { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.label-summary .label-caps { margin-right: 6px; }
.stat .unit { font-size: 14px; color: var(--ink-3); }
.run-items { display: flex; flex-direction: column; }
.run-item { border-top: 1px solid var(--line); padding: 10px 0; }
.run-item:first-child { border-top: 0; }
.run-item > summary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; list-style: none; }
.run-item > summary::-webkit-details-marker { display: none; }
.run-item > summary .state { margin-left: auto; }
.transcript { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 8px; max-width: 760px; }
.obs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; align-items: center; margin: 2px 0 8px; }
.obs .tag { margin: 0; }
.env-event { text-align: center; margin: 6px 0; }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr; } }
.flash-warn { background: var(--attn-soft, #fffbeb); color: var(--attn-text); border: 1px solid #fde68a; }
.sim-save { margin: 0 0 var(--gap); }

/* ── HQ → bot → Testing (docs/PLAN-testing-panel.md) ─────────────────────── */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.checklist .row { justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.checklist .check-main { display: inline-flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.sim-card { border-top: 1px solid var(--line); padding: 12px 0; }
.sim-card:first-of-type { border-top: 0; }
.sim-card .preview { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; background: var(--surface-2); }
.testing-card .state { margin-left: 6px; }

/* ── Handover: what Striker does per situation (radios, and the picked reply as a DM bubble) ──────────────
   The example and the no-help-link warning follow the checked radio with :has() (no script, CSP); without :has()
   the server's "shown" (the saved choice) stays. */
.situations { display: grid; gap: 12px; }
.situation-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.situation-options label.check { margin-bottom: 8px; }
.situation-example { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.situation-example .label-caps { margin-bottom: 4px; }
.sit-ex, .sit-warn, .sit-help { display: none; }
.sit-ex.shown, .sit-warn.shown, .sit-help.shown { display: block; }
.situation:has(input:checked) .sit-ex, .situation:has(input:checked) .sit-warn,
.situation:has(input:checked) .sit-help { display: none; }
.situation:has(input[value="answer"]:checked) .sit-ex-answer,
.situation:has(input[value="answer_then_help_link"]:checked) .sit-ex-answer_then_help_link,
.situation:has(input[value="answer_then_handover"]:checked) .sit-ex-answer_then_handover,
.situation:has(input[value="help_link"]:checked) .sit-ex-help_link,
.situation:has(input[value="handover"]:checked) .sit-ex-handover,
.situation:has(input[value="website_only"]:checked) .sit-ex-website_only,
.situation:has(input[value="answer_policy"]:checked) .sit-ex-answer_policy,
.situation:has(input[value="help_link"]:checked) .sit-warn,
.situation:has(input[value="answer_then_help_link"]:checked) .sit-warn,
.situation:has(input[value="help_link"]:checked) .sit-help,
.situation:has(input[value="answer_then_help_link"]:checked) .sit-help { display: block; }
.sit-warn { margin: 4px 0 0; }
.sit-help { margin: 8px 0 0; }
.sit-help input { width: 100%; margin: 2px 0; }
table.rails td.rail-action { text-align: right; white-space: nowrap; }
table.rails td.rail-action .small { white-space: normal; display: inline-block; max-width: 240px; text-align: right; }
@media (max-width: 720px) {
  .situation-grid { grid-template-columns: 1fr; }
  table.rails td.rail-action { text-align: left; }
}

/* Signed-out pages: sign in and create an account. One card, Google first, email and password behind a link. */
.auth { max-width: 420px; margin: 56px auto 40px; padding: 0 16px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 32px 28px; }
.auth-card .label-caps { margin: 0 0 14px; }
.auth-card h1 { font-family: var(--font-wordmark); font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 8px; }
.auth-lede { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin: 0 0 24px; }
.google-button { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 16px;
  background: #fff; border: 1px solid #747775; border-radius: var(--radius); color: #1f1f1f; font-size: 14px; font-weight: 500;
  text-decoration: none; transition: background var(--dur), box-shadow var(--dur); }
.google-button:hover { background: #f8f9fa; color: #1f1f1f; box-shadow: 0 1px 2px rgba(60, 64, 67, .2); }
.google-button svg { width: 18px; height: 18px; flex: none; }
.auth-alt { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.auth-alt > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); list-style: none; text-align: center; }
.auth-alt > summary::-webkit-details-marker { display: none; }
.auth-alt > summary:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-alt[open] > summary { margin-bottom: 14px; color: var(--ink); }
.auth-form input { height: 40px; }
.auth-submit { width: 100%; height: 40px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--ink-3); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-foot { margin: 22px 0 0; font-size: 13px; color: var(--ink-2); text-align: center; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 18px 0 0; font-size: 12px; }
.auth-links a { color: var(--ink-3); text-decoration: none; }
.auth-links a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 480px) { .auth { margin-top: 24px; } .auth-card { padding: 24px 20px; } }

/* Page-level links that aren't part of a step: Version history sits by the page title, not by Save. */
.page-history { margin-left: 10px; font-size: 12px; font-weight: 400; color: var(--ink-3); text-decoration: none; vertical-align: middle; }
.page-history:hover { color: var(--ink); text-decoration: underline; }
.add-row { margin-top: 4px; }

/* Try it: the shopper's message appears at once, the assistant "types", new bubbles slide in. */
.thread.empty { display: none; }
.thread .msg.just-in { animation: msg-in 220ms ease-out both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.typing { padding-bottom: 10px; animation: msg-in 220ms ease-out 150ms both; }
.msg.typing .dots { display: inline-flex; gap: 4px; padding-top: 4px; }
.msg.typing .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); animation: typing-dot 1s infinite ease-in-out; }
.msg.typing .dots i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .thread .msg.just-in, .msg.typing, .msg.typing .dots i { animation: none; } }

/* Inbox lists: a fixed-height box that scrolls, so Needs you and Recent conversations both stay on screen. */
.list-box { max-height: 360px; overflow-y: auto; border-top: 1px solid var(--line); }
.list-box table.list thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }

/* Knowledge → Sources: only what needs doing, as links. */
.attention-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.attention-row a.tag { text-decoration: none; }

/* A tab that holds several pages (Settings → Connections): a second, quieter row of pills at the top of the page. */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.subtabs a { font-size: 12.5px; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2); text-decoration: none; }
.subtabs a:hover { color: var(--ink); border-color: var(--line-strong); }
.subtabs a[aria-current="page"] { color: var(--ink); border-color: var(--ink); font-weight: 500; }

/* The assistant's own picture inside its ring. */
.ring-face.has-icon { padding: 0; overflow: hidden; background: var(--surface); }
.ring-face.has-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.picture-row { display: flex; gap: 16px; align-items: center; }

/* Handover: each situation says what it covers; a number that defines it sits inside it. */
.sit-covers { margin: 2px 0 10px; max-width: 72ch; }
.sit-threshold { margin: 0 0 10px; align-items: end; }
.inline-number { width: 72px; display: inline-block; margin: 0 4px; }

/* Test → On Instagram: numbered steps and the code to send. */
.tester-steps { margin: 0 0 14px; padding-left: 20px; display: block; }
.tester-steps li { margin: 0 0 8px; padding: 0; border: 0; line-height: 1.5; }
.tester-code { margin: 8px 0; }
.url-input { max-width: 420px; }
/* Handover → Who gets hand-overs: the day grid shows only for "Different hours" (without :has, it always shows). */
@supports selector(:has(a)) {
  .team-hours .team-days { display: none; }
  .team-hours:has(input[name="team_hours"][value="custom"]:checked) .team-days { display: block; }
}
.team-hours > label.check { margin-bottom: 6px; }
.team-days { margin: 4px 0 0 22px; }
.handover-line .hint { display: block; }
/* Multi-save pages (Name & intro, Handover, Rules, Offers): each card saves itself, Save at its bottom right. */
.card-save { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-save .saves { font-size: 12px; color: var(--ink-2); }
form.card > fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
/* In-page section links at the top of a long page (Handover). */
.section-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--gap); }
.section-pills a { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 10px; font-size: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.section-pills a:hover, .section-pills a:focus-visible { border-color: var(--ink); }
.group-head { margin: 24px 0 8px; }
.form-row > .card-save { flex: 1 1 100%; }
.details-summary > summary { cursor: pointer; font-size: 13px; list-style-position: inside; }
.details-summary > summary .link-like { color: var(--ink-2); text-decoration: underline; }
.details-summary[open] > summary .link-like { display: none; }
.details-summary[open] > summary { margin-bottom: 8px; }
details.advanced { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
details.advanced > summary { cursor: pointer; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
form.card > fieldset.stack { display: flex; flex-direction: column; gap: var(--gap); }
.day-row { margin-top: 0; }
.day-row > label.check { width: 120px; }
.day-row > input[type="time"] { width: auto; min-width: 120px; }
/* Fields side by side line up on their labels and boxes whatever hints they have: hints sit under the box. */
form .grid, form .picker, .form-grid { align-items: start; }
.role-form { display: flex; gap: 6px; align-items: center; } .role-form select { width: auto; }
.card > form > fieldset.stack { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }

/* The hourly live check (docs/PLAN-live-check.md): latest result and a 24-hour strip, one dot per hour. */
.live-check { margin-top: 12px; display: grid; gap: 4px; }
.live-check-state { font-weight: 500; }
.live-check-state.ok { color: var(--ok); }
.live-check-state.bad { color: var(--danger-text); }
.live-strip { display: flex; gap: 3px; flex-wrap: wrap; }
.live-dot { width: 8px; height: 14px; border-radius: 2px; background: var(--line); }
.live-dot.pass { background: var(--ok); }
.live-dot.fail { background: var(--danger); }
.live-dot.off, .live-dot.pending { background: var(--line-strong); }

/* Goal: the goals grouped by how the sale finishes (link / request / just answer). */
.goal-groups { display: grid; gap: 14px; margin-top: 10px; }
.goal-group { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.goal-group legend { font-weight: 600; padding: 0; margin-bottom: 2px; }
.goal-group .goal-options { margin-top: 6px; }

/* Results (docs/PLAN-sales-loop.md W7): period switch, the daily trend and the weekday × hour heatmap. Levels are
   classes because the console's CSP allows no inline styles. */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg a { padding: 6px 12px; font-size: 13px; text-decoration: none; color: var(--ink-2); }
.seg a + a { border-left: 1px solid var(--line-strong); }
.seg a[aria-current] { background: var(--ink); color: var(--surface); }
.right, table.list .right { text-align: right; }
.trend { display: flex; align-items: flex-end; gap: 2px; height: 80px; }
.trend-bar { flex: 1; min-width: 3px; background: var(--ink); border-radius: 1px 1px 0 0; height: 2px; opacity: .85; }
.trend-bar.lvl0 { background: var(--line); }
.trend-bar.lvl1 { height: 10%; } .trend-bar.lvl2 { height: 20%; } .trend-bar.lvl3 { height: 30%; }
.trend-bar.lvl4 { height: 40%; } .trend-bar.lvl5 { height: 50%; } .trend-bar.lvl6 { height: 60%; }
.trend-bar.lvl7 { height: 70%; } .trend-bar.lvl8 { height: 80%; } .trend-bar.lvl9 { height: 90%; }
.trend-bar.lvl10 { height: 100%; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(6px, 1fr)); gap: 2px; font-size: 10.5px; color: var(--ink-3); }
.heat-d { align-self: center; }
.heat-c { height: 14px; border-radius: 2px; background: var(--surface-3); }
.heat-c.h1 { background: #d4d4d4; } .heat-c.h2 { background: #a3a3a3; } .heat-c.h3 { background: #525252; }
.heat-c.h4 { background: var(--ink); }

/* Settings → Website chat (W8): the snippet to paste. */
pre.snippet { padding: 10px 12px; background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius);
  white-space: pre-wrap; word-break: break-all; font-size: 12.5px; }
