/* ==========================================================================
   Design system — "marked-up record".
   Cool paper, ink, cobalt for action, highlighter for exposed data, green only for "removed".
   Type: Archivo variable (self-hosted, width axis) — condensed for display, normal for text.
   --brand / --accent can be overridden from Admin → Settings → Branding.
   ========================================================================== */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations"), url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
:root {
  --brand: #2342d6;
  --accent: #f5df4d;
  --brand-ink: color-mix(in srgb, var(--brand) 78%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 9%, #fff);
  --brand-line: color-mix(in srgb, var(--brand) 28%, #fff);
  --ink: #15171c;
  --ink-2: #3b3f48;
  --muted: #646a75;
  --line: #d9dce2;
  --line-2: #c4c8d0;
  --bg: #f4f5f7;
  --paper: #fbfbfc;
  --surface: #ffffff;
  --cleared: #1e8757;
  --ok: #1e8757;     --ok-bg: #e4f3eb;
  --warn: #8a5a00;   --warn-bg: #fdf4d6;
  --bad: #b42318;    --bad-bg: #fdecea;
  --info: #2342d6;   --info-bg: #e9edfc;
  --test: #6b3fa0;   --test-bg: #f1eafa;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 0 rgba(21,23,28,.04), 0 8px 24px -12px rgba(21,23,28,.18);
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); font-stretch: 100%; font-kerning: normal; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; color: var(--ink); font-weight: 750; }
h1 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); font-stretch: 88%; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; font-stretch: 92%; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .container { padding: 0 16px; } }
.narrow { max-width: 760px; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.section { padding: 72px 0; }
.section.tight { padding: 40px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- public header/footer ---------- */
.site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; font-stretch: 85%; color: var(--ink); text-decoration: none; letter-spacing: 0; }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; background: var(--ink); display: grid; place-items: center; position: relative; overflow: hidden; }
.brand-mark::before { content: ""; position: absolute; left: 6px; right: 6px; top: 9px; height: 4px; background: #fff; border-radius: 1px; }
.brand-mark::after { content: ""; position: absolute; left: 6px; width: 10px; top: 16px; height: 4px; background: var(--accent); border-radius: 1px; }
.brand-mark svg { display: none; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: var(--radius); font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--ink); background: rgba(21,23,28,.05); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--brand); margin-left: 8px; border-radius: var(--radius); box-shadow: none; }
.nav a.btn-primary:hover { background: var(--brand-ink); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; color: var(--ink); }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; border-bottom: 1px solid var(--line); margin: 0; }
  .nav.open { display: flex; }
  .nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--brand); }
  .nav a.btn-primary { margin: 8px 0 0; text-align: center; }
}
.site-footer { background: var(--ink); color: #b9bec8; padding: 56px 0 28px; font-size: .93rem; }
.site-footer a { color: #e7e9ee; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h4 { color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 7px 0; }
.site-footer .brand { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #8d93a0; }

/* ---------- generic page heading (inner public pages) ---------- */
.eyebrow { display: block; font-size: .95rem; font-weight: 600; color: var(--brand); margin-bottom: 10px; }
.page-title { font-size: clamp(2rem, 4.4vw, 3.1rem); font-stretch: 75%; font-weight: 800; line-height: 1.02; letter-spacing: -0.005em; max-width: 20ch; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }

/* ---------- home: hero ---------- */
.hero { padding: 64px 0 72px; border-bottom: 1px solid var(--line); background:
  linear-gradient(var(--bg), var(--bg)) padding-box,
  repeating-linear-gradient(0deg, transparent 0 31px, rgba(21,23,28,.035) 31px 32px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-stretch: 68%; font-weight: 820; line-height: .98; letter-spacing: -0.01em; max-width: 13ch; margin-bottom: 22px; }
.hero .lead { font-size: 1.16rem; max-width: 46ch; margin-bottom: 28px; }
.hero-facts { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 10px; max-width: 46ch; }
.hero-facts li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-2); font-size: .97rem; }
.hero-facts li::before { content: ""; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23fff'%3E%3Cpath d='M8.1 13.4 4.7 10l-1.2 1.2 4.6 4.6 9-9-1.2-1.2z'/%3E%3C/svg%3E") center/12px no-repeat; }

/* The record: an example lookup-site listing being redacted */
.record { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.record-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: .82rem; color: var(--muted); }
.record-bar .dots { display: flex; gap: 5px; }
.record-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.record-bar .url { flex: 1; background: var(--bg); border-radius: 6px; padding: 4px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.record-bar .tag { font-weight: 600; color: var(--ink-2); background: var(--accent); padding: 2px 8px; border-radius: 4px; }
.record-head { display: flex; gap: 14px; align-items: center; padding: 20px 22px 6px; }
.record-photo { width: 52px; height: 52px; border-radius: 50%; background: repeating-linear-gradient(45deg, #e3e6eb 0 6px, #eceef2 6px 12px); flex: none; }
.record-title { font-weight: 750; font-size: 1.15rem; font-stretch: 90%; }
.record-sub { color: var(--muted); font-size: .88rem; }
.record dl { margin: 0; padding: 8px 22px 18px; display: grid; grid-template-columns: 96px 1fr; row-gap: 0; }
.record dt, .record dd { padding: 11px 0; border-bottom: 1px dashed var(--line); margin: 0; font-size: .95rem; }
.record dt { color: var(--muted); }
.record dd { position: relative; font-weight: 550; }
.record dl > :nth-last-child(-n+2) { border-bottom: 0; }
.field-v { position: relative; display: inline-block; padding: 0 3px; }
.field-v::before { content: ""; position: absolute; inset: 1px -1px; background: var(--accent); opacity: .85; border-radius: 2px; z-index: 0; }
.field-v span { position: relative; z-index: 1; }
.field-v::after { content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 0; background: var(--ink); border-radius: 2px; z-index: 2; }
.record-rail { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--surface); }
.record-rail div { padding: 12px 14px; font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--line); }
.record-rail div:last-child { border-right: 0; }
.record-rail b { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.record-rail .on { color: var(--ink); font-weight: 600; }
.record-rail .on b { border-color: var(--brand); background: var(--brand); }
.record-rail .done { color: var(--cleared); font-weight: 650; }
.record-rail .done b { border-color: var(--cleared); background: var(--cleared); }
.record-note { font-size: .82rem; color: var(--muted); margin-top: 10px; }

/* One orchestrated load sequence: fields are redacted in turn, then the rail advances. */
@media (prefers-reduced-motion: no-preference) {
  .record .field-v::after { animation: redact .55s cubic-bezier(.7,0,.2,1) forwards; }
  .record dd:nth-of-type(1) .field-v::after { animation-delay: .9s; }
  .record dd:nth-of-type(2) .field-v::after { animation-delay: 1.35s; }
  .record dd:nth-of-type(3) .field-v::after { animation-delay: 1.8s; }
  .record dd:nth-of-type(4) .field-v::after { animation-delay: 2.25s; }
  .record dd:nth-of-type(5) .field-v::after { animation-delay: 2.7s; }
  .record-rail .step-2 { animation: rail-on .3s 1.2s forwards; }
  .record-rail .step-3 { animation: rail-done .3s 3.4s forwards; }
  .record-rail .step-2, .record-rail .step-3 { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .record .field-v::after { width: calc(100% + 4px); }
}
@keyframes redact { to { width: calc(100% + 4px); } }
@keyframes rail-on { to { opacity: 1; } }
@keyframes rail-done { to { opacity: 1; } }

/* ---------- home: where details show up ---------- */
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: end; margin-bottom: 36px; }
@media (max-width: 900px) { .section-head { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-stretch: 72%; font-weight: 800; line-height: 1.02; margin: 0; }
.section-head p { color: var(--ink-2); margin: 0; max-width: 58ch; }
.ledger { border-top: 2px solid var(--ink); }
.ledger-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start; }
@media (max-width: 860px) { .ledger-row { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.ledger-row h3 { font-size: 1.25rem; font-stretch: 88%; margin: 0 0 4px; }
.ledger-row .what { color: var(--muted); font-size: .95rem; margin: 0; }
.ledger-row .exposes { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .85rem; padding: 3px 9px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 55%, #fff); color: var(--ink); font-weight: 550; }
.ledger-row .names { font-size: .92rem; color: var(--ink-2); }

/* ---------- home: steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 28px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; padding: 0 24px 0 0; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); font-weight: 800; font-size: .95rem; position: relative; z-index: 1; margin-bottom: 16px; }
.steps li::after { content: ""; position: absolute; top: 17px; left: 34px; right: 0; height: 2px; background: var(--line-2); }
.steps li:last-child::after { display: none; }
@media (max-width: 900px) { .steps li::after { display: none; } }
.steps h3 { font-size: 1.12rem; margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: .96rem; margin: 0; }

/* ---------- home: commitments ---------- */
.commit { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
@media (max-width: 760px) { .commit { grid-template-columns: 1fr; } }
.commit > div { padding: 30px 32px; }
.commit > div + div { border-left: 1px solid var(--line-2); background: var(--paper); }
@media (max-width: 760px) { .commit > div + div { border-left: 0; border-top: 1px solid var(--line-2); } }
.commit h3 { font-size: 1.15rem; margin-bottom: 14px; }
.commit ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.commit li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-2); }
.commit .do li::before { content: ""; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--cleared) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23fff'%3E%3Cpath d='M8.1 13.4 4.7 10l-1.2 1.2 4.6 4.6 9-9-1.2-1.2z'/%3E%3C/svg%3E") center/12px no-repeat; }
.commit .dont li::before { content: ""; width: 16px; height: 16px; margin-top: 3px; border-radius: 3px; background: var(--ink) linear-gradient(#fff, #fff) center/9px 2px no-repeat; }

/* ---------- closing band ---------- */
.band { background: var(--ink); color: #fff; padding: 64px 0; }
.band h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-stretch: 70%; font-weight: 800; line-height: 1.02; max-width: 18ch; }
.band p { color: #c3c8d2; max-width: 52ch; }
.band .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.band .btn-secondary:hover { border-color: #fff; color: #fff; }

/* ---------- legacy helpers still used by inner pages ---------- */
.check-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.check-list li { padding-left: 28px; position: relative; margin: 8px 0; color: var(--ink-2); }
.check-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2315171c'%3E%3Cpath d='M8.1 13.4 4.7 10l-1.2 1.2 4.6 4.6 9-9-1.2-1.2z'/%3E%3C/svg%3E") center/12px no-repeat; }
.hero-grid-legacy { display: grid; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.card.raised { box-shadow: var(--shadow); border-color: var(--line-2); }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-header h2, .card-header h3 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-header { padding: 18px 20px 0; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.feature-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: .96rem; padding: 10px 17px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; line-height: 1.2; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #f0c4bf; }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-sm { padding: 6px 11px; font-size: .86rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 22px; font-size: 1.04rem; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn .spinner { display: none; }
.btn.loading .spinner { display: inline-block; }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
form.inline { display: inline; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 5px; }
.input, select, textarea { width: 100%; font: inherit; font-size: .97rem; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { min-height: 110px; resize: vertical; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.checkbox input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--brand); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
@media (max-width: 560px) { .input-group { flex-direction: column; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 600; font-size: .92rem; padding: 0 6px; }

/* ---------- alerts / badges ---------- */
.alert { padding: 12px 14px; border-radius: var(--radius); border: 1px solid; margin-bottom: 14px; font-size: .95rem; }
.alert-success { background: var(--ok-bg); border-color: #b6dfc9; color: #11553a; }
.alert-error { background: var(--bad-bg); border-color: #f2c2bd; color: #7a1a12; }
.alert-warning { background: var(--warn-bg); border-color: #efd99c; color: #5c3d00; }
.alert-info { background: var(--info-bg); border-color: #c7d1f6; color: #1a2f99; }
.alert-test { background: var(--test-bg); border-color: #dccbf1; color: #4b2a75; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 4px; font-size: .8rem; font-weight: 600; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: #c4e6d2; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #efd99c; }
.badge-bad { background: var(--bad-bg); color: var(--bad); border-color: #f2c2bd; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: #c7d1f6; }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-line); }
.badge-test { background: var(--test-bg); color: var(--test); border-color: #dccbf1; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th { text-align: left; font-weight: 650; font-size: .85rem; color: var(--ink-2); padding: 11px 14px; border-bottom: 1px solid var(--line-2); background: var(--paper); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8f9fb; }
.table .actions { text-align: right; white-space: nowrap; }
@media (max-width: 720px) {
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .table.responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 5px 14px; }
  .table.responsive td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: .84rem; }
  .table .actions { text-align: left; }
}

/* ---------- app shell ---------- */
.app-shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--ink) 252px, transparent 252px); }
.plans-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.sidebar { background: var(--ink); color: #c4c8d1; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: #fff; padding: 4px 8px 20px; }
.sidebar .brand-mark { background: #fff; }
.sidebar .brand-mark::before { background: var(--ink); }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: #c4c8d1; text-decoration: none; padding: 9px 10px; border-radius: var(--radius); font-size: .94rem; margin: 1px 0; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.sidebar .nav-label { font-size: .8rem; font-weight: 600; color: #858b98; padding: 18px 10px 6px; }
.sidebar .count { margin-left: auto; background: var(--accent); color: var(--ink); font-size: .74rem; font-weight: 750; padding: 1px 7px; border-radius: 4px; }
.main { min-width: 0; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 10; }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.content { padding: 30px 28px 64px; max-width: 1200px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.85rem; font-stretch: 80%; font-weight: 800; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; color: var(--ink); }
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; background: none; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .menu-btn { display: inline-flex; }
  .content { padding: 20px 16px 48px; }
  .topbar { padding: 0 16px; }
}

/* ---------- stats / meters ---------- */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; }
.stat .label { font-size: .86rem; color: var(--muted); font-weight: 550; }
.stat .value { font-size: 2rem; font-weight: 800; font-stretch: 80%; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .85rem; color: var(--muted); }
.stat.attention { border-color: #e9cf6b; background: color-mix(in srgb, var(--accent) 16%, #fff); }
.meter { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 70px; }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s; }
.meter.low > span { background: #a7adb8; }
.meter.medium > span { background: #d2a11f; }
.meter.high > span { background: var(--brand); }
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); transition: width .5s; }

/* ---------- timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 1px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-2); }
.timeline li.status::before { border-color: var(--brand); }
.timeline li.internal::before { border-color: var(--warn); }
.timeline .when { font-size: .82rem; color: var(--muted); }
.timeline .what { font-weight: 650; font-size: .95rem; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; font-size: .94rem; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--brand); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 140px; flex: 1; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: .94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; } }
.evidence { list-style: none; padding: 0; margin: 0; }
.evidence li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .94rem; }
.evidence li:last-child { border: 0; }
.evidence .w { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.illustrative { position: relative; }
.price { font-size: 2.2rem; font-weight: 800; font-stretch: 78%; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price small { display: block; margin-top: 2px; font-size: .9rem; font-weight: 500; font-stretch: 100%; color: var(--muted); }
.plan { display: flex; flex-direction: column; }
.plan .btn { margin-top: auto; white-space: normal; text-align: center; }
.plan.featured { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow); }
details.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
details.faq summary { cursor: pointer; font-weight: 650; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.35rem; line-height: 1; color: var(--brand); flex: none; }
details.faq[open] summary::after { content: "\2013"; }
details.faq p { margin: 10px 0 0; color: var(--ink-2); max-width: 70ch; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose li { margin: 6px 0; }
.auth-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-stretch: 80%; font-weight: 800; }
.code-box { font-family: var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; word-break: break-all; }
.recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: var(--mono); }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 90; max-width: 360px; animation: up .25s ease-out; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.fade-in { animation: up .3s ease-out; }
.qr { background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: 10px; display: inline-block; }
.notice-bar { background: var(--test-bg); color: var(--test); text-align: center; font-size: .86rem; font-weight: 600; padding: 6px 12px; border-bottom: 1px solid #dccbf1; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mb-2 { margin-bottom: 1rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; } }
@media print {
  .sidebar, .topbar, .site-header, .site-footer, .no-print { display: none !important; }
  .app-shell { display: block; } body { background: #fff; } .card { border-color: #ccc; }
}
