:root {
  --fs-min: .72rem; /* text floor: 11.5px at a 16px root (CLAUDE.md) */
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --ink: #16202e;
  --ink-2: #4a5568;
  --ink-3: #5f6b7c;
  --line: #e2dbcf;
  --line-strong: #c9bfae;
  --field-border: #857a6b; /* 3:1 or more against every light surface (WCAG 1.4.11) */
  /* Focus: a dark ring with a light halo, so it shows on any section colour (WCAG 2.4.7, 1.4.11; technique C40). */
  --focus: #16202e; --focus-halo: #ffffff;
  --accent: #2f4ad0;
  --accent-ink: #ffffff;
  --accent-soft: #e6eaff;
  --accent-text: #2a41bd;
  --success: #17794a;
  --success-soft: #e0f3e8;
  --warning: #8f5a00;
  --warning-soft: #fdf0d1;
  --danger: #b3261e;
  --danger-soft: #fde7e4;
  --info-soft: #e6eaff;
  --shadow: 0 1px 2px rgba(22, 32, 46, .06), 0 6px 20px rgba(22, 32, 46, .05);
  --radius: 14px;
  --radius-sm: 9px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  /* Design export tokens (design/theme.css) not in the original set */
  --door-v: #FFDCEB; --door-b: #D4F5EC; --door-ink: #1B1446;
  --sticky: #FFE27A; --sticky-ink: #2b2100; --cert: #FBF3E2; --cert-ink: #1B1446; --cert-ink-2: #4a5568; --cert-ink-3: #5a6474; --cert-line: #d9ccb0;
  --band: #16202e; --band-ink: #faf7f2; --proof: #16202e; --proof-line: #2c3746;
  --teal: #2EC4A6; --teal-text: #0f6b59; --pink: #FF4FA3; --pink-text: #a3195c; --yellow: #FFC93C; --navy: #1B1446; --on-navy: #FBFAF7;
  --scrim: rgba(16, 21, 29, .4);
  --radius-lg: 16px; --radius-pill: 999px;
  --text-min: 11.5px;
  /* Motion (Interaction flows and motion: duration and easing tokens) */
  --motion-instant: 0ms; --motion-xshort: 100ms; --motion-short: 150ms; --motion-medium: 200ms;
  --motion-long: 250ms; --motion-xlong: 400ms; --motion-xxlong: 600ms;
  --ease-enter: cubic-bezier(0.2, 0, 0, 1); --ease-exit: cubic-bezier(0.4, 0, 1, 1); --ease-move: cubic-bezier(0.4, 0, 0.2, 1);
  --motion-distance: 1; /* multiplies every slide/scale offset; 0 under reduced motion */
  --shimmer: 1.2s;
  /* Layout */
  --grid-gutter: 24px; --panel-width: 480px; --modal-confirm: 480px; --modal-wide: 560px; --popover-max: 320px; --toast-width: 360px;
  --menu-width: 240px; --topbar-height: 60px;
  /* Dashboard shell */
  --control-pad-x: 14px; --select-icon-space: 44px; --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --sidebar-width: 256px; --sidebar-rail: 64px; --header-height: 56px; --demobar-h: 28px; --card-pad: 20px; --row-height: 40px; --indicator-width: 3px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10151d;
    --surface: #18202b;
    --surface-2: #202a37;
    --ink: #eef1f5;
    --ink-2: #c0c8d4;
    --ink-3: #9aa5b5;
    --line: #2c3746;
    --line-strong: #435064;
    --field-border: #738095;
    --focus: #f5f7fb; --focus-halo: #070a0f;
    --accent: #8697ff;
    --accent-ink: #0d1330;
    --accent-soft: #232c55;
    --accent-text: #a9b5ff;
    --success: #5fd49b;
    --success-soft: #153426;
    --warning: #f1bd5a;
    --warning-soft: #3a2c0e;
    --danger: #ff8f86;
    --danger-soft: #431a17;
    --info-soft: #232c55;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .25);
    --door-v: #3b1d33; --door-b: #12332f; --door-ink: #f6eef3;
    --sticky: #ecd36e; --cert: #efe4cc; --band: #070a0f; --band-ink: #eef1f5; --proof: #070a0f;
    --teal-text: #5fd4bd; --pink-text: #ff9ccb;
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c0c8d4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  --bg: #10151d;
  --surface: #18202b;
  --surface-2: #202a37;
  --ink: #eef1f5;
  --ink-2: #c0c8d4;
  --ink-3: #9aa5b5;
  --line: #2c3746;
  --line-strong: #435064;
  --field-border: #738095;
  --focus: #f5f7fb; --focus-halo: #070a0f;
  --accent: #8697ff;
  --accent-ink: #0d1330;
  --accent-soft: #232c55;
  --accent-text: #a9b5ff;
  --success: #5fd49b;
  --success-soft: #153426;
  --warning: #f1bd5a;
  --warning-soft: #3a2c0e;
  --danger: #ff8f86;
  --danger-soft: #431a17;
  --info-soft: #232c55;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .25);
  --door-v: #3b1d33; --door-b: #12332f; --door-ink: #f6eef3;
  --sticky: #ecd36e; --cert: #efe4cc; --band: #070a0f; --band-ink: #eef1f5; --proof: #070a0f;
  --teal-text: #5fd4bd; --pink-text: #ff9ccb;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c0c8d4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--sans);
  min-height: 100vh; display: flex; flex-direction: column;
  overflow-wrap: break-word;
}
main { flex: 1; padding: var(--s6) 0 var(--s8); outline: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; box-shadow: 0 0 0 7px var(--focus-halo); }
img, audio { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s4) 0; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 max(var(--s4), env(safe-area-inset-right)) 0 max(var(--s4), env(safe-area-inset-left)); }
.narrow { max-width: 720px; }
.slim { max-width: 460px; }
.stack { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.stack-sm { gap: var(--s2); }
.stack-lg { gap: var(--s6); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); min-width: 0; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.row.bottom { align-items: flex-end; }
.grow { flex: 1 1 0; min-width: 0; }
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.grid-2 { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.split { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.mono { font-family: var(--mono); font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.big-num { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.header-inner { display: flex; align-items: center; gap: var(--s3); min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; padding: 6px 4px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.brand-mark i { display: block; width: 2.5px; border-radius: 2px; background: var(--accent-ink); }
.nav { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 9px 11px; border-radius: 8px; font-weight: 500; white-space: nowrap; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.header-actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.icon-btn.nav-toggle { display: none; border-color: var(--line); border-radius: 10px; }
.nav-lang { display: none; }
@media (max-width: 760px) {
  .icon-btn.nav-toggle { display: inline-flex; }
  .nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 2px; overflow: visible; padding-bottom: 8px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
  .nav-lang { display: block; padding: 8px 12px; }
  .header-actions .lang-switch { display: none; }
}
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.badge-count { position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge-count { color: #2a0906; } }
:root[data-theme="dark"] .badge-count { color: #2a0906; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s2); z-index: 30; max-height: 70vh; overflow: auto; }
.menu-title { padding: 8px 10px; font-weight: 600; }
.menu a.menu-item, .menu button.menu-item { display: block; width: 100%; text-align: left; padding: 10px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.menu .menu-item:hover { background: var(--surface-2); }
.menu-item.unread { border-left: 3px solid var(--accent); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.account-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px 4px 6px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.account-btn .name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .account-btn .name { display: none; } .account-btn { padding: 4px 6px; } .header-inner { gap: var(--s2); } .brand { font-size: 1.1rem; gap: 7px; } }
.lang-switch { display: inline-flex; align-self: flex-start; width: fit-content; border: 1px solid var(--line); border-radius: 20px; padding: 2px; background: var(--surface); }
.lang-btn { min-width: 36px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 16px; background: transparent; color: var(--ink-2); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.lang-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.site-footer { border-top: 1px solid var(--line); padding: var(--s5) 0 calc(var(--s5) + env(safe-area-inset-bottom)); color: var(--ink-3); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: var(--s4); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; position: relative; transition: background .12s, border-color .12s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--accent-text); padding-left: 10px; padding-right: 10px; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 36px; padding: 5px 12px; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--ink-3); border-top-color: transparent; animation: spin .7s linear infinite; }
.btn-primary.is-loading::after { border-color: var(--accent-ink); border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--accent); animation: spin .7s linear infinite; vertical-align: -3px; }
.loading { padding: var(--s7) 0; color: var(--ink-3); text-align: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow); min-width: 0; }
.card.flat { box-shadow: none; }
.card.tint { background: var(--surface-2); box-shadow: none; }
.card > .stack { height: 100%; }
@media (max-width: 480px) { .card { padding: var(--s4); } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s5); }
.page-head .stack { gap: 6px; }
.crumb { font-size: .9rem; color: var(--ink-3); text-decoration: none; }
.crumb:hover { text-decoration: underline; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; border: 1px solid transparent; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.plain { font-weight: 500; }
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-warning { background: var(--warning-soft); color: var(--warning); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-info { background: var(--info-soft); color: var(--accent-text); }
.verified { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 6px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-weight: 600; font-size: .85rem; text-decoration: none; border: 1px solid transparent; }
a.verified:hover { border-color: var(--success); }
.verified svg { width: 17px; height: 17px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-weight: 600; font-size: .93rem; }
.hint { color: var(--ink-3); font-size: .86rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus) !important; box-shadow: 0 0 0 5px var(--focus-halo); }
input[aria-invalid=true], textarea[aria-invalid=true], select[aria-invalid=true] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .88rem; font-weight: 500; }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 500; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); min-height: 44px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s3); }
.choice { padding: var(--s4); }
.choice strong { display: block; }
.form-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .93rem; padding: 0; margin-bottom: 8px; }
.counter { font-size: .86rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 600; }
input[type=file] { font: inherit; max-width: 100%; }

.banner { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--info-soft); color: var(--ink); border-left: 4px solid var(--accent); }
.banner-success { background: var(--success-soft); border-color: var(--success); }
.banner-warning { background: var(--warning-soft); border-color: var(--warning); }
.banner-danger { background: var(--danger-soft); border-color: var(--danger); }
.banner strong { display: block; }

.toast-wrap { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; display: flex; gap: 10px; align-items: flex-start; animation: rise .18s ease-out; }
.toast-error { background: var(--danger); color: #fff; }
.toast-success { background: var(--success); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast-error, :root:not([data-theme="light"]) .toast-success { color: #0c1210; } }
:root[data-theme="dark"] .toast-error, :root[data-theme="dark"] .toast-success { color: #0c1210; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0 4px; opacity: .8; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

dialog.modal { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); background: var(--surface); color: var(--ink); width: min(480px, calc(100vw - 24px)); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgba(10, 14, 20, .55); }

.player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.play-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.play-btn:hover { filter: brightness(1.08); }
.play-btn .ico { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor; margin-left: 3px; }
.player.playing .play-btn .ico { width: 13px; height: 15px; border: 0; margin: 0; border-left: 4.5px solid currentColor; border-right: 4.5px solid currentColor; }
.player-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.player-label { font-weight: 600; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-track { height: 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; cursor: pointer; }
.player-fill { height: 100%; width: 0; background: var(--accent); }
.player-time { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }

.usage { display: flex; flex-direction: column; gap: 6px; }
.usage-track { height: 10px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.usage-fill { height: 100%; background: var(--accent); border-radius: 5px 0 0 5px; }
.usage.warn .usage-fill { background: var(--warning); }
.usage.full .usage-fill { background: var(--danger); }
.usage-text { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; color: var(--ink-2); font-variant-numeric: tabular-nums; flex-wrap: wrap; }

.empty { text-align: center; padding: var(--s7) var(--s4); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.empty p { color: var(--ink-3); max-width: 46ch; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 11px 14px; min-height: 44px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink-3); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; margin-bottom: -1px; }
.tab[aria-selected=true], .tab[aria-current=true] { color: var(--accent-text); border-bottom-color: var(--accent); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.kv dd .row { flex-wrap: wrap; min-width: 0; }
.kv code { overflow-wrap: anywhere; word-break: break-all; }
.code { font-family: var(--mono); font-size: .84rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0; }
.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.plain-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: step; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 9px 0; counter-increment: step; flex-wrap: wrap; }
.checklist li::before { content: counter(step); flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; color: var(--ink-3); }
.checklist li.done::before { content: "✓"; background: var(--success); border-color: var(--success); color: var(--surface); }
.checklist li.current::before { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.checklist li.done .step-name { color: var(--ink-3); }
.checklist .step-name { font-weight: 600; flex: 1; min-width: 140px; }

.section { padding: var(--s6) 0; }
.step-num { font-family: var(--serif); font-size: 1.6rem; color: var(--accent-text); font-weight: 700; }

.listing-card { display: flex; flex-direction: column; gap: var(--s3); }
.listing-card h3 a { color: var(--ink); text-decoration: none; }
.listing-card h3 a:hover { text-decoration: underline; }
.listing-card .desc { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-card .foot { margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); }
.price { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.filters { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); align-items: end; }
.filters .field-q { grid-column: 1 / -1; }
.stars { color: var(--warning); letter-spacing: 1px; white-space: nowrap; }
.offer-card { display: flex; flex-direction: column; gap: var(--s3); }
.offer-card .btn { margin-top: auto; }

.studio { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .studio { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.prompt-text { font-family: var(--serif); font-size: clamp(1.4rem, 3.6vw, 2.05rem); line-height: 1.35; padding: var(--s5); background: var(--surface-2); border-radius: var(--radius); border-left: 5px solid var(--accent); }
.meter { height: 14px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--success); transition: width .06s linear; }
.meter-fill.hot { background: var(--danger); }
.rec-btn { min-height: 64px; padding: 12px 30px; border-radius: 40px; font-size: 1.1rem; }
.rec-btn .dot { width: 16px; height: 16px; border-radius: 50%; background: #e5372b; flex: none; }
.rec-btn.recording { background: #b3261e; color: #fff; }
.rec-btn.recording .dot { border-radius: 3px; background: #fff; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.timer { font-family: var(--mono); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.prompt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.prompt-list button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; min-height: 44px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.prompt-list button:hover { background: var(--surface-2); }
.prompt-list button[aria-current=true] { border-color: var(--accent); background: var(--accent-soft); }
.prompt-list .p-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .93rem; }
.dot-state { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.dot-state.passed { background: var(--success); border-color: var(--success); color: var(--surface); }
.dot-state.rejected { background: var(--danger); border-color: var(--danger); color: var(--surface); }
kbd { font-family: var(--mono); font-size: .82em; padding: 2px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.secret-box { border: 1.5px solid var(--warning); background: var(--warning-soft); border-radius: var(--radius-sm); padding: var(--s4); }
.stat-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.stat { padding: var(--s4); }
/* Reduced motion (Flows doc rule 8): transitions become 150 ms opacity only; slides and scales vanish because every
   offset is multiplied by --motion-distance. [data-motion] is the /demo override of the OS setting. */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) { --motion-xshort: 150ms; --motion-medium: 150ms; --motion-long: 150ms; --motion-xlong: 150ms; --motion-xxlong: 150ms; --motion-distance: 0; --shimmer: 0s; }
}
:root[data-motion="reduce"] { --motion-xshort: 150ms; --motion-medium: 150ms; --motion-long: 150ms; --motion-xlong: 150ms; --motion-xxlong: 150ms; --motion-distance: 0; --shimmer: 0s; }

.link-btn { background: none; border: 0; padding: 0; color: var(--accent, #2f47c8); text-decoration: underline; cursor: pointer; font: inherit; justify-self: start; text-align: left; }
.qr { display: inline-block; justify-self: start; width: max-content; padding: 8px; background: #fff; border: 1px solid var(--line, #ddd); border-radius: 8px; line-height: 0; max-width: 100%; }
.qr svg { max-width: 100%; height: auto; }
.terms p { margin: 0; }
.hour-rate { display: block; }
.quote { margin: 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--line-strong); white-space: pre-line; }

/* DEMO_MODE strip under the header: sample accounts, no real money. */
.demo-bar { background: var(--accent-soft); color: var(--ink); font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.demo-bar a { font-weight: 600; }

/* Website: home, for voices, for buyers */
.site { display: grid; gap: var(--s7); }
.site-hero { display: grid; gap: var(--s6); align-items: center; padding-top: var(--s5); }
@media (min-width: 900px) { .site-hero { grid-template-columns: 1.1fr .9fr; padding-top: var(--s7); } }
.site-hero h1 { font-size: clamp(2.3rem, 6.4vw, 4rem); line-height: 1.05; letter-spacing: -.025em; margin: 0; }
.site-hero-art { width: 100%; height: auto; max-width: 480px; justify-self: center; }
.site-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.site-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: var(--s5); box-shadow: var(--shadow); display: grid; gap: var(--s2); align-content: start; }
.site-card h3 { font-size: 1.45rem; margin: var(--s2) 0 0; }
.site-card p { margin: 0; }
.site-art { width: 100%; max-width: 340px; height: auto; border-radius: 18px; }
.site-quip { font-family: var(--serif); font-style: italic; color: var(--accent-text); font-size: 1.05rem; }
.site-band { background: var(--ink); color: var(--bg); border-radius: 22px; padding: var(--s6) var(--s5); text-align: center; display: grid; gap: var(--s4); justify-items: center; }
.site-band p { margin: 0; font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 650; max-width: 46ch; line-height: 1.35; }
.site-band.soft { background: var(--accent-soft); color: var(--ink); }
.site-doors { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.site-door { display: grid; gap: var(--s2); padding: var(--s6) var(--s5); border-radius: 22px; color: #1B1446; text-decoration: none; transition: transform .15s ease; }
.site-door:hover, .site-door:focus-visible { transform: translateY(-3px); }
.site-door strong { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.15; }
.site-door .eyebrow { color: #1B1446; opacity: .75; }
.site-door span:last-child { font-weight: 700; }
.site-door.seller { background: #FFDCEB; }
.site-door.buyer { background: #D4F5EC; }
.site-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.site-step { display: flex; gap: var(--s4); align-items: flex-start; background: var(--surface-2); border-radius: 18px; padding: var(--s5); }
.site-step h3 { margin: 0 0 var(--s1); font-size: 1.3rem; }
.site-step p { margin: 0; }
.site-plans { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.site-plan { border: 2px solid var(--line-strong); border-radius: 22px; padding: var(--s5); display: grid; gap: var(--s2); align-content: start; }
.site-plan h3, .site-plan p { margin: 0; }
.site-price { font-size: 1.6rem; font-weight: 800; color: var(--accent-text); }

/* Website sections on a coloured door background: the faintest grey drops below 4.5:1 there, so use the next one. */
[style*="background:var(--door-"], [style*="background: var(--door-"] { --ink-3: var(--ink-2); }
