:root {
  --bg: #faf8f7;
  --panel: #ffffff;
  --ink: #252329;
  --muted: #6d656b;
  --line: #e9e1e5;
  --soft: #f4eff2;
  --brand: #4b293f;
  --brand-ink: #ffffff;
  --brand-soft: #f3ebf0;
  --accent: #b66a50;
  --good: #1f7a4d;
  --good-soft: #e8f4ed;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --warn: #9a5b12;
  --warn-soft: #fbf1e3;
  --code: #f7f3f5;
  --shadow: 0 1px 2px rgba(75, 41, 63, .05), 0 8px 24px rgba(75, 41, 63, .05);
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2 { letter-spacing: -.02em; font-weight: 700; }
h1 em, h2 em { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; color: var(--brand); }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2.2rem; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; white-space: pre; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat { font-size: 1.7rem; font-weight: 650; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-weight: 600; background: var(--soft); color: var(--muted); }
.pill.pass, .pill.allowed, .pill.answered { background: var(--good-soft); color: var(--good); }
.pill.fail, .pill.error { background: var(--bad-soft); color: var(--bad); }
.pill.review, .pill.redacted, .pill.limited, .pill.unchecked { background: var(--warn-soft); color: var(--warn); }
.pill.blocked, .pill.helpline { background: var(--brand-soft); color: var(--brand); }
button, .button { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover { border-color: var(--muted); }
button.primary, .button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; box-shadow: 0 1px 2px rgba(75,41,63,.18); }
button.primary:hover, .button.primary:hover { background: #3c2033; }
button.danger { color: var(--bad); border-color: var(--bad); }
button.link { border: 0; background: none; color: var(--brand); padding: 0; }
button:disabled { opacity: .55; cursor: progress; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; width: 100%; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .help { font-weight: 400; color: var(--muted); font-size: .84rem; margin-top: 3px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 4px; }
.error-text { color: var(--bad); font-size: .9rem; min-height: 1.2em; }
.ok-text { color: var(--good); font-size: .9rem; }
.notice { border-radius: 10px; padding: 10px 14px; background: var(--brand-soft); border: 1px solid var(--line); }
.notice.warn { background: var(--warn-soft); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.reply { white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow: auto; font-size: .86rem; color: var(--muted); margin-top: 4px; }

/* layout */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand span { font-weight: 600; color: var(--brand); border-left: 1px solid var(--line); padding-left: 12px; font-size: .95rem; }
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 57px); }
.sidebar { border-right: 1px solid var(--line); padding: 18px 14px; background: var(--panel); }
.sidebar .app-link { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; margin-bottom: 2px; }
.sidebar .app-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.main { padding: 26px 32px 60px; max-width: 1100px; width: 100%; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 22px; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 10px 12px; color: var(--muted); white-space: nowrap; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.switch-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.toggle { position: relative; width: 42px; height: 24px; flex: none; margin-top: 2px; }
.toggle input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: .15s; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .15s; }
.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::after { transform: translateX(18px); }
.toggle input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 160px; max-height: 420px; overflow-y: auto; padding: 4px; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; }
.bubble.user { align-self: flex-end; background: var(--brand); color: var(--brand-ink); }
.bubble.assistant { align-self: flex-start; background: var(--soft); }
.bubble .meta { display: block; margin-top: 6px; }
.secret { display: flex; gap: 8px; align-items: center; background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; }
.secret code { word-break: break-all; flex: 1; }
.snippet-tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.snippet-tabs button { padding: 4px 10px; font-size: .86rem; }
.snippet-tabs button.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.bars { width: 100%; height: 140px; }
.bars rect.total { fill: var(--line); }
.bars rect.stopped { fill: var(--brand); }
.bars text { fill: var(--muted); font-size: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; }
.legend .total { background: var(--line); }
.legend .stopped { background: var(--brand); }

/* landing */
.landing { max-width: 1080px; margin: 0 auto; padding: 48px 24px 64px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.landing .lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.landing h1 { font-size: 3rem; line-height: 1.08; margin-bottom: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: .85rem; }
.trust-row span::before { content: "✓ "; color: var(--good); font-weight: 700; }
.steps { list-style: none; padding: 0; margin: 24px 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 16px 42px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; }
.auth-tabs button.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.footer { border-top: 1px solid var(--line); padding: 18px 24px; color: var(--muted); font-size: .85rem; display: flex; gap: 18px; flex-wrap: wrap; }
.doc { max-width: 760px; margin: 0 auto; padding: 36px 24px 64px; }
.doc h2 { margin-top: 1.6em; }

/* printable report */
.report { max-width: 860px; margin: 0 auto; padding: 32px 24px; }
.report h1 { font-size: 1.7rem; }
@media print {
  .no-print, .topbar, .footer { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}

@media (max-width: 860px) {
  .landing h1 { font-size: 2.2rem; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .main { padding: 20px 16px 48px; }
  .landing { grid-template-columns: 1fr; padding: 28px 16px; gap: 28px; }
  h1 { font-size: 1.8rem; }
  .topbar { padding: 10px 16px; }
}
.grow { flex: 1; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; }
.checks .check { font-size: .9rem; }
.stack-tight > * + * { margin-top: 4px; }
.stack-tight { margin: 6px 0; }
.pill.redirected { background: var(--warn-soft); color: var(--warn); }
progress { width: 100%; height: 8px; accent-color: var(--brand); }
.plans .cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 12px; }
.plans ul { padding-left: 18px; margin: 0; }
.main, .shell > * { min-width: 0; }
td { overflow-wrap: anywhere; }
.pill { white-space: nowrap; }
.doc.wide { max-width: 1040px; }

/* studio workspace */
.shell { grid-template-columns: 248px 1fr; }
.sidebar { display: flex; flex-direction: column; gap: 6px; padding: 18px 12px; position: sticky; top: 59px; height: calc(100vh - 59px); overflow-y: auto; }
.app-switcher { font-weight: 600; margin-bottom: 8px; }
.studio-nav { display: flex; flex-direction: column; gap: 10px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label { text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; font-weight: 700; color: var(--muted); padding: 6px 10px 3px; }
.nav-item { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 8px; color: var(--ink); font-size: .92rem; }
.nav-item:hover { background: var(--soft); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-account { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.main { max-width: 1180px; padding: 28px 36px 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 1.7rem; margin: 2px 0 4px; }
.page-head p { margin: 0; max-width: 680px; }
.crumb { font-size: .8rem; color: var(--muted); }
.lifecycle { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.lifecycle button { width: 100%; height: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.lifecycle small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; margin-top: 2px; }
.step-index { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); font-weight: 700; font-size: .8rem; }
.lifecycle li.done .step-index { background: var(--good); color: #fff; }
.lifecycle li.done button { border-color: #cfe5d8; }
.small-stat { font-size: 1.2rem; }
.standards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.standards-grid h3 { margin: 0; }
.standards-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 16px; }
.standards-strip a { font-size: .85rem; font-weight: 600; margin-left: 4px; }
@media (max-width: 1100px) { .lifecycle { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .sidebar { position: static; height: auto; }
  .lifecycle { grid-template-columns: 1fr 1fr; }
  .page-head { flex-direction: column; }
}
.domain-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 18px; }
.mobile-nav { display: none; }
@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { position: sticky; top: 59px; z-index: 4; height: auto; flex-direction: row; gap: 8px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
  .sidebar > .nav-label, .studio-nav, .nav-account { display: none; }
  .app-switcher, .mobile-nav { display: block; margin: 0; flex: 1; min-width: 0; font-size: .9rem; padding: 8px 10px; }
  .main { padding: 18px 16px 48px; }
  .page-head { margin-bottom: 14px; gap: 10px; }
  .page-head h1 { font-size: 1.4rem; }
  .page-head p { font-size: .88rem; }
  .page-head .row button { padding: 6px 12px; font-size: .85rem; }
  .card { padding: 16px; }
  .lifecycle { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lifecycle small { font-size: .72rem; }
  .lifecycle button { padding: 10px 12px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { font-size: 1.35rem; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .checks, .domain-groups { grid-template-columns: 1fr 1fr; }
  table { font-size: .85rem; }
  th, td { padding: 7px 5px; }
  .topbar { padding: 8px 14px; }
  .topbar .row { gap: 6px; }
  .topbar .row .muted { display: none; }
  .brand span { display: none; }
  /* Sign-up first on phones; the explanation follows. */
  .landing { display: flex; flex-direction: column-reverse; padding: 18px 16px 32px; gap: 20px; }
  .landing h1 { font-size: 1.9rem; }
  .steps li { padding-bottom: 10px; font-size: .92rem; }
  .bubble { max-width: 92%; }
}
