/* ==========================================================================
   Conversion Site Builder - SiteForge OTO3
   Warm premium neutrals, charcoal type, one restrained copper accent.
   Light theme only: nothing here reacts to the operating system's dark mode.
   System fonts only. No network dependencies.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --bg-tint: #efeae2;
  --surface: #fffefc;
  --surface-2: #faf8f4;
  --ink: #1d1b18;
  --text: #2c2925;
  --muted: #5d574f;
  --faint: #6b655c;
  --rule: #e4ded3;
  --rule-strong: #cfc6b7;
  --accent: #9a4a1f;
  --accent-strong: #7b3915;
  --accent-soft: #f6e9e0;
  --accent-ring: rgba(154, 74, 31, 0.28);
  --on-accent: #ffffff;
  --danger: #9b2f22;

  --st-attention: #9b2f22; --st-attention-bg: #fbeae6; --st-attention-dot: #c2412f;
  --st-definition: #4f4478; --st-definition-bg: #efedf7; --st-definition-dot: #6f62a8;
  --st-clarify: #74500d; --st-clarify-bg: #f8efd9; --st-clarify-dot: #b8862a;
  --st-clear: #2c6448; --st-clear-bg: #e6f1ea; --st-clear-dot: #3f8a62;

  --shadow-sm: 0 1px 2px rgba(29, 27, 24, 0.05);
  --shadow: 0 1px 2px rgba(29, 27, 24, 0.04), 0 10px 28px -16px rgba(29, 27, 24, 0.18);
  --shadow-lg: 0 2px 4px rgba(29, 27, 24, 0.04), 0 24px 48px -24px rgba(29, 27, 24, 0.28);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Cascadia Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: 28px;
  --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.25; }
h1, h2 { font-family: var(--serif); font-weight: 600; }
h3, h4 { font-family: var(--sans); font-weight: 650; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
button { font: inherit; color: inherit; }
svg.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; background: rgba(246, 243, 238, 0.92);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar__inner {
  max-width: 1440px; margin: 0 auto; min-height: var(--topbar-h); padding: 10px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand__mark {
  flex: none; width: 36px; height: 36px; border-radius: 9px; background: var(--ink);
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -2px 0 var(--accent);
}
.brand__mark svg { width: 20px; height: 20px; fill: none; stroke: #f6e9e0; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__family { font: 700 11px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.brand__name { font: 600 17px/1.25 var(--serif); white-space: nowrap; }
.topbar__status { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13.5px; color: var(--muted); }
.status__project { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.status__pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--bg-tint); color: var(--text); white-space: nowrap;
}
.status__pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status__pill--ready { background: var(--st-clear-bg); color: var(--st-clear); }
.status__pill--ready::before { background: var(--st-clear-dot); }
.status__pill--stale { background: var(--st-clarify-bg); color: var(--st-clarify); }
.status__pill--stale::before { background: var(--st-clarify-dot); }
.status__step { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Page ---------- */
.app-main { max-width: 1440px; margin: 0 auto; padding: 32px var(--gutter) 64px; min-height: calc(100vh - 160px); }
.app-main:focus { outline: none; }
.app-footer { max-width: 1440px; margin: 0 auto; padding: 22px var(--gutter) 36px; border-top: 1px solid var(--rule); color: var(--faint); font-size: 13px; }
.app-footer p { max-width: 90ch; }
.noscript { padding: 20px; }

.eyebrow { display: flex; align-items: center; gap: 6px; font: 700 12px/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.eyebrow--ok { color: var(--st-clear); }
.eyebrow .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.screen-head { margin-bottom: 26px; }
.screen-title { font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.4rem); letter-spacing: -0.01em; margin-bottom: 10px; }
.screen-lede { font-size: 1.05rem; color: var(--muted); max-width: 66ch; }
.screen-lede strong { color: var(--ink); }
.section-title { font-size: 1.45rem; margin: 36px 0 16px; }
.section-lede { color: var(--muted); margin: -8px 0 18px; max-width: 70ch; }
.stack { display: grid; gap: 18px; }
.empty-line { color: var(--muted); font-size: 15px; padding: 6px 0; }

/* ---------- Cards and panels ---------- */
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg);
  padding: 26px 28px; box-shadow: var(--shadow);
}
.card--quiet { background: var(--surface-2); box-shadow: none; }
.card__title { font-size: 1.2rem; margin-bottom: 8px; }
.card__desc { color: var(--muted); font-size: 15px; margin-bottom: 16px; max-width: 72ch; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px 18px 16px; }
.panel + .panel { margin-top: 14px; }
.panel__title { font: 700 12px/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.panel__note { font-size: 12.5px; color: var(--faint); margin-top: 12px; line-height: 1.5; }
.panel--tip { background: transparent; border-style: dashed; }
.tip-list { list-style: none; display: grid; gap: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.tip-list li { padding-left: 14px; position: relative; }
.tip-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--rule-strong); }

.brief { margin: 0; display: grid; gap: 0; }
.brief__row { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--rule); }
.brief__row:first-child { border-top: 0; padding-top: 0; }
.brief dt { font-size: 12px; color: var(--faint); font-weight: 600; }
.brief dd { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; min-width: 0; }
.brief__value { color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.brief__empty { color: var(--faint); font-style: italic; }
.brief__edit { font-size: 12.5px; font-weight: 600; text-decoration: none; flex: none; }
.brief__edit:hover { text-decoration: underline; }

.overview { list-style: none; display: grid; gap: 8px; }
.overview__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.overview__label { color: var(--ink); font-weight: 600; }

/* ---------- Status chips and basis tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; line-height: 1.3; white-space: nowrap;
}
.chip__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chip--sm { font-size: 11.5px; padding: 3px 9px 3px 7px; gap: 6px; }
.chip--attention { background: var(--st-attention-bg); color: var(--st-attention); }
.chip--attention .chip__dot { background: var(--st-attention-dot); }
.chip--definition { background: var(--st-definition-bg); color: var(--st-definition); }
.chip--definition .chip__dot { background: var(--st-definition-dot); }
.chip--clarify { background: var(--st-clarify-bg); color: var(--st-clarify); }
.chip--clarify .chip__dot { background: var(--st-clarify-dot); }
.chip--clear { background: var(--st-clear-bg); color: var(--st-clear); }
.chip--clear .chip__dot { background: var(--st-clear-dot); }
.basis { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--rule); color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.basis--supplied { border-color: var(--rule-strong); color: var(--ink); background: var(--surface); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer;
  font: 600 15px/1.2 var(--sans); text-decoration: none; text-align: center;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn--primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn--secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--bg-tint); color: var(--ink); }
.btn--ghost-danger:hover { color: var(--danger); background: var(--st-attention-bg); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #7e2419; color: #fff; }
.btn--large { min-height: 50px; padding: 14px 24px; font-size: 16px; }
.btn--sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Home ---------- */
.home { max-width: 1120px; margin: 0 auto; }
.hero { padding: 36px 0 30px; }
.hero__title { font-size: clamp(2.3rem, 1.5rem + 3vw, 3.6rem); letter-spacing: -0.02em; line-height: 1.08; margin-bottom: 16px; }
.hero__lede { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); color: var(--muted); max-width: 44ch; }
.hero__actions { margin-top: 28px; }
.hero__note { margin-top: 12px; font-size: 13.5px; color: var(--faint); }
.resume { display: grid; gap: 14px; margin-bottom: 8px; border-color: var(--rule-strong); }
.resume .eyebrow { margin-bottom: 0; }
.resume__title { font-size: 1.6rem; overflow-wrap: anywhere; }
.resume__meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.resume__meta dt { font-size: 12px; color: var(--faint); font-weight: 600; }
.resume__meta dd { margin: 0; color: var(--ink); font-weight: 600; }
.home-section { margin-top: 40px; }
.mechanism { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.mechanism__item {
  position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 18px 16px 18px; animation: rise 420ms var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms);
}
.mechanism__num { font: 600 12px var(--mono); color: var(--accent); }
.mechanism__name { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; margin: 6px 0 6px; }
.mechanism__text { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.home-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; margin-top: 32px; }
.contents-list { columns: 2; column-gap: 28px; padding-left: 1.4em; font-size: 14.5px; color: var(--text); }
.contents-list li { padding: 3px 0; break-inside: avoid; }
.contents-list li::marker { color: var(--faint); font-size: 12.5px; }
.scope-list { list-style: none; display: grid; gap: 10px; font-size: 14.5px; }
.scope-list li { padding-left: 26px; position: relative; line-height: 1.5; }
.scope-list li::before { position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.scope-list__yes::before { content: "\2713"; background: var(--st-clear-bg); color: var(--st-clear); }
.scope-list__no::before { content: "\2013"; background: var(--bg-tint); color: var(--muted); }

/* ---------- Workspace ---------- */
.ws { display: grid; grid-template-columns: 224px minmax(0, 1fr) 284px; gap: 36px; align-items: start; }
.ws-main { min-width: 0; }
.ws-aside { position: sticky; top: calc(var(--topbar-h) + 20px); min-width: 0; }
.ws-nav { position: sticky; top: calc(var(--topbar-h) + 20px); min-width: 0; }
.ws-nav__toggle { display: none; }
.ws-nav__progress { display: flex; gap: 3px; margin-bottom: 18px; }
.ws-nav__seg { flex: 1; height: 3px; border-radius: 2px; background: var(--rule); transition: background-color 300ms var(--ease); }
.ws-nav__seg.is-done { background: var(--accent); opacity: 0.55; }
.ws-nav__seg.is-current { background: var(--accent); opacity: 1; }
.ws-nav__group { font: 700 11px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 18px 0 6px 10px; }
.ws-nav__group:first-child { margin-top: 0; }
.steps { list-style: none; display: grid; gap: 2px; }
.step {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm);
  text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 550; position: relative;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
a.step:hover { background: var(--bg-tint); color: var(--ink); }
.step__num {
  width: 26px; height: 26px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 600 11.5px var(--mono); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--muted);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.step__num .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.step__text { min-width: 0; }
.step.is-done .step__num { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.step.is-current { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--rule); padding: 7px 9px; }
.step.is-current .step__num { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step.is-locked { color: #8a8378; cursor: not-allowed; }
.step.is-locked .step__num { border-style: dashed; color: #8a8378; }
.step__lock { width: 14px; height: 14px; margin-left: auto; color: #9c958a; }

.step-footer {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--rule);
}
.step-footer > :last-child:not(:first-child) { margin-left: auto; }
.toolbar { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; flex-wrap: wrap; }
.toolbar__label { font-size: 13.5px; color: var(--muted); margin-right: auto; font-weight: 600; }
.toolbar--wrap { justify-content: space-between; }
.toolbar__end { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.notice { padding: 12px 16px; border-radius: var(--r-sm); font-size: 14.5px; margin-bottom: 18px; border: 1px solid; }
.notice--notice { background: var(--st-clarify-bg); border-color: #ecd9ac; color: #5f420b; }
.notice--info { background: var(--surface-2); border-color: var(--rule); color: var(--text); }

/* ---------- Forms ---------- */
.form-card { padding: 24px 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.field { min-width: 0; margin: 0; }
.field--wide, .fieldset { grid-column: 1 / -1; }
.fieldset { border: 0; padding: 0; }
.field__label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 650; font-size: 15px; color: var(--ink); margin-bottom: 3px; padding: 0; }
.field__hint { font-size: 13.5px; color: var(--faint); margin-bottom: 8px; line-height: 1.45; }
.field__meta { display: flex; justify-content: space-between; gap: 10px; min-height: 0; }
.field__count { font-size: 12px; color: var(--faint); margin-left: auto; margin-top: 4px; }
.field__count:empty { display: none; }
.field__error { font-size: 13.5px; color: var(--danger); font-weight: 600; margin: 6px 0 0; }
.fieldset .field__error { margin: 0 0 10px; }
.tag { font: 600 11px/1.2 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); background: var(--bg-tint); padding: 3px 7px; border-radius: 4px; }
.tag--required { color: var(--accent-strong); background: var(--accent-soft); }
.input {
  width: 100%; font: inherit; font-size: 15.5px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm); padding: 11px 13px; line-height: 1.5;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.input:hover { border-color: #b9ae9c; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(155, 47, 34, 0.14); }
textarea.input { resize: vertical; min-height: 64px; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.choices--compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.choice { position: relative; min-width: 0; }
.choice__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choice__card {
  display: flex; gap: 12px; align-items: flex-start; height: 100%; padding: 13px 14px; cursor: pointer;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.choice__card:hover { border-color: var(--rule-strong); background: var(--surface-2); }
.choice__mark { width: 18px; height: 18px; flex: none; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--rule-strong); background: var(--surface); position: relative; transition: border-color 160ms var(--ease); }
.choice__mark::after { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform 180ms var(--ease); }
.choice__body { display: grid; gap: 2px; min-width: 0; }
.choice__label { font-weight: 650; color: var(--ink); font-size: 15px; }
.choice__summary { font-size: 13px; color: var(--muted); line-height: 1.45; }
.choice__input:checked + .choice__card { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.choice__input:checked + .choice__card .choice__mark { border-color: var(--accent); }
.choice__input:checked + .choice__card .choice__mark::after { transform: scale(1); }
.choice__input:focus-visible + .choice__card { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Diagnosis ---------- */
.diag-top { display: grid; gap: 12px; margin-bottom: 18px; }
.diag-summary { font-size: 15.5px; color: var(--text); background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--r-sm); padding: 12px 16px; }
.diag-summary strong { color: var(--ink); }
.legend { border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--surface-2); }
.legend summary { cursor: pointer; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; }
.legend summary::-webkit-details-marker { display: none; }
.legend summary::before { content: "+"; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--rule-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; color: var(--muted); }
.legend[open] summary::before { content: "\2212"; }
.legend__body { padding: 2px 14px 14px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.legend__list { list-style: none; display: grid; gap: 8px; }
.legend__list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.legend__list .chip { min-width: 150px; }
.cat-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cat-tile {
  width: 100%; height: 100%; text-align: left; display: grid; gap: 8px; align-content: start; justify-items: start;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer;
  border-top: 3px solid var(--rule-strong); transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 160ms var(--ease);
}
.cat-tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.cat-tile--attention { border-top-color: var(--st-attention-dot); }
.cat-tile--definition { border-top-color: var(--st-definition-dot); }
.cat-tile--clarify { border-top-color: var(--st-clarify-dot); }
.cat-tile--clear { border-top-color: var(--st-clear-dot); }
.cat-tile__label { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; color: var(--ink); }
.cat-tile__q { font-size: 13px; color: var(--muted); line-height: 1.45; }
.diag-sections { display: grid; gap: 30px; margin-top: 6px; }
.diag-cat__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.diag-cat__title { font-size: 1.4rem; }
.diag-cat__q { color: var(--muted); font-size: 14.5px; margin: 4px 0 12px; }
.findings { list-style: none; display: grid; gap: 10px; }
.finding {
  background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong);
  border-radius: var(--r-sm); padding: 14px 18px 14px 16px; display: grid; gap: 6px;
}
.finding--attention { border-left-color: var(--st-attention-dot); }
.finding--definition { border-left-color: var(--st-definition-dot); }
.finding--clarify { border-left-color: var(--st-clarify-dot); }
.finding--clear { border-left-color: var(--st-clear-dot); }
.finding__top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.finding__title { font-size: 15.5px; margin-top: 2px; overflow-wrap: anywhere; }
.finding__text { font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.finding__consider { font-size: 14.5px; color: var(--muted); overflow-wrap: anywhere; }
.finding__consider-label { font-weight: 650; color: var(--ink); }
.finding__edit { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; text-decoration: none; justify-self: start; padding: 2px 0; }
.finding__edit .icon { width: 15px; height: 15px; }
.finding__edit:hover { text-decoration: underline; }

/* ---------- Strategy ---------- */
.canvas { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.canvas__cell { background: var(--surface); padding: 22px 24px; min-width: 0; }
.canvas__label { font: 700 12px/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.line-list { list-style: none; display: grid; gap: 8px; }
.line-list li { position: relative; padding-left: 16px; font-size: 14.5px; overflow-wrap: anywhere; line-height: 1.55; }
.line-list li::before { content: ""; position: absolute; left: 0; top: 0.66em; width: 6px; height: 1.5px; background: var(--rule-strong); }
.build-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.build-row__note { font-size: 14px; color: var(--muted); max-width: 52ch; }
.strategy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.strat-block { padding: 20px 22px; }
.strat-block--key { border-color: var(--rule-strong); }
.strat-block__title { font-size: 15px; margin-bottom: 8px; }
.informed { font-size: 12.5px; color: var(--faint); margin-bottom: 10px; line-height: 1.5; }
.informed__label { font-weight: 650; color: var(--muted); }
.informed__item { color: var(--muted); }
.strategy-out > .card + .card { margin-top: 14px; }
.journey { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: j; }
.journey__stage { position: relative; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 12px 12px 12px; min-width: 0; }
.journey__stage::before { counter-increment: j; content: "0" counter(j); display: block; font: 600 11px var(--mono); color: var(--accent); margin-bottom: 2px; }
.journey__label { font-weight: 650; color: var(--ink); font-size: 14.5px; display: block; margin-bottom: 4px; }
.journey__text { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.5; }
.journey--compact { grid-template-columns: 1fr; }
.journey--compact .journey__stage { display: grid; grid-template-columns: 28px 110px 1fr; align-items: baseline; gap: 8px; }
.journey--compact .journey__stage::before { margin: 0; }
.journey--compact .journey__label { margin: 0; }
.priority-list { list-style: none; display: grid; gap: 10px; }
.priority { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--rule); }
.priority:first-child { border-top: 0; padding-top: 0; }
.priority .chip { justify-self: start; }
.priority__title { font-weight: 650; color: var(--ink); font-size: 14.5px; overflow-wrap: anywhere; }
.priority__text { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Structure ---------- */
.scope-note { background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 12px 16px; font-size: 14.5px; color: var(--text); display: grid; gap: 4px; }
.scope-note__pages { color: var(--muted); font-size: 14px; }
.arch-flow { margin-top: 14px; font-size: 13.5px; color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; }
.arch { list-style: none; display: grid; gap: 0; }
.arch__item { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow-sm); margin-bottom: 30px; transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.arch__item:last-child { margin-bottom: 0; }
.arch__item.is-open { border-color: var(--rule-strong); box-shadow: var(--shadow); }
.arch__h { font: inherit; margin: 0; }
.arch__head {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 14px 18px; border-radius: var(--r);
}
.arch__head:hover .arch__name { color: var(--accent-strong); }
.arch__num { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font: 600 13px var(--mono); background: var(--bg-tint); color: var(--ink); transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.is-open .arch__num { background: var(--ink); color: #fff; }
.arch__titles { display: grid; gap: 1px; min-width: 0; flex: 1; }
.arch__name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--ink); transition: color 160ms var(--ease); }
.arch__purpose { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.arch__chev { color: var(--muted); transition: transform 240ms var(--ease); }
.is-open .arch__chev { transform: rotate(180deg); }
.arch__panel, .check__detail {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 260ms var(--ease), visibility 0s linear 260ms;
}
.is-open > .arch__panel, .is-open > .check__detail { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 260ms var(--ease), visibility 0s; }
.arch__panel-inner, .check__detail-inner { overflow: hidden; min-height: 0; }
.arch__detail { margin: 0; padding: 4px 18px 18px 70px; display: grid; gap: 12px; }
.arch__detail dt { font: 700 11.5px/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.arch__detail dd { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.arch__link { position: absolute; left: 36px; bottom: -27px; width: 24px; height: 24px; color: var(--rule-strong); display: flex; align-items: center; justify-content: center; }
.arch__link .icon { width: 18px; height: 18px; }

/* ---------- Optimize ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all 160ms var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; position: relative; }
.switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 36px; height: 20px; border-radius: 999px; background: var(--rule-strong); position: relative; transition: background-color 180ms var(--ease); flex: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 180ms var(--ease); }
.switch__input:checked + .switch__track { background: var(--accent); }
.switch__input:checked + .switch__track::after { transform: translateX(16px); }
.switch__input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.check-progress { font-size: 13.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.check-groups { display: grid; gap: 26px; }
.check-group__title { font-size: 1.25rem; display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.check-group__count { font: 500 13px var(--sans); color: var(--faint); }
.checks { list-style: none; display: grid; gap: 8px; }
.check { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sm); transition: background-color 200ms var(--ease), border-color 200ms var(--ease); }
.check.is-reviewed { background: var(--surface-2); }
.check__row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 14px; }
.check__box { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__label { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; cursor: pointer; padding: 3px 0; }
.check__tick {
  width: 20px; height: 20px; flex: none; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--rule-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: transparent; transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.check__tick .icon { width: 14px; height: 14px; stroke-width: 2.6; transform: scale(0.6); transition: transform 200ms var(--ease); }
.check__box:checked + .check__label .check__tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.check__box:checked + .check__label .check__tick .icon { transform: scale(1); }
.check__box:focus-visible + .check__label .check__tick { outline: 2px solid var(--accent); outline-offset: 2px; }
.check__text { font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; transition: color 200ms var(--ease); }
.check.is-reviewed .check__text { color: var(--muted); }
.check__more {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 4px 8px; border-radius: var(--r-sm);
  border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.check__more:hover { background: var(--bg-tint); color: var(--ink); }
.check__more .icon { width: 15px; height: 15px; transition: transform 240ms var(--ease); }
.check.is-open .check__more .icon { transform: rotate(180deg); }
.check__detail-inner p { padding: 0 16px 14px 46px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Blueprint ---------- */
.build-card { border-color: var(--rule-strong); }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 8px 0 16px; }
.summary-grid div { background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 10px 12px; min-width: 0; }
.summary-grid dt { font-size: 12px; color: var(--faint); font-weight: 600; }
.summary-grid dd { margin: 0; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
.build-body__note { font-size: 14.5px; color: var(--muted); max-width: 70ch; }
.gen { display: grid; gap: 16px; padding: 6px 0 4px; animation: fade 240ms var(--ease) both; }
.gen__bar { height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.gen__bar-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width 360ms var(--ease); }
.gen__list { list-style: none; display: grid; gap: 10px; }
.gen__stage { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--faint); transition: color 200ms var(--ease); }
.gen__mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--rule-strong); display: flex; align-items: center; justify-content: center; color: transparent; transition: all 220ms var(--ease); flex: none; }
.gen__mark .icon { width: 13px; height: 13px; stroke-width: 2.8; }
.gen__stage.is-active { color: var(--ink); font-weight: 600; }
.gen__stage.is-active .gen__mark { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.gen__stage.is-done { color: var(--text); }
.gen__stage.is-done .gen__mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.gen__note { font-size: 13px; color: var(--faint); }
.screen-head--ready .screen-title { font-size: clamp(1.9rem, 1.3rem + 1.9vw, 2.7rem); }
.bp-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow);
}
.bp-actions__main, .bp-actions__side { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-actions .copy-status { flex-basis: 100%; }
.copy-status { font-size: 14px; color: var(--muted); min-height: 1.3em; }
.copy-status:empty { display: none; }
.copy-status.is-ok { color: var(--st-clear); font-weight: 600; }
.copy-status.is-error { color: var(--danger); font-weight: 600; }
.copy-btn__icon { position: relative; width: 18px; height: 18px; display: inline-flex; }
.copy-btn__icon .icon { position: absolute; inset: 0; transition: opacity 160ms var(--ease), transform 220ms var(--ease); }
.copy-btn__i-ok { opacity: 0; transform: scale(0.5); stroke-width: 2.4; }
.copy-btn.is-copied .copy-btn__i-copy { opacity: 0; transform: scale(0.5); }
.copy-btn.is-copied .copy-btn__i-ok { opacity: 1; transform: scale(1); }
.copy-btn.is-copied.btn--secondary { border-color: var(--st-clear); color: var(--st-clear); }
.next-card { margin-top: 16px; background: var(--surface-2); box-shadow: none; }
.next-steps { list-style: none; counter-reset: n; display: grid; gap: 10px; margin-top: 4px; }
.next-steps li { counter-increment: n; position: relative; padding-left: 40px; font-size: 15px; color: var(--muted); min-height: 28px; }
.next-steps li::before { content: counter(n); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 13px/28px var(--mono); text-align: center; }
.next-steps strong { color: var(--ink); }
.next-card__note { margin-top: 14px; font-size: 13.5px; color: var(--faint); }
.bp-sections { display: grid; gap: 14px; margin-top: 22px; }
.bp-section { padding: 22px 26px; }
.bp-section__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bp-section__num { font: 600 12px var(--mono); color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 4px 7px; }
.bp-section__title { font-size: 1.25rem; }
.bp-section--instruction { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.bp-sub { font: 700 12px/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 18px 0 10px; }
.bp-sub:first-child { margin-top: 0; }
.bp-scope { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.bp-scope:last-child { margin: 10px 0 0; }
.facts { margin: 0; display: grid; }
.facts__row { display: grid; grid-template-columns: 210px 1fr; gap: 14px; padding: 8px 0; border-top: 1px solid var(--rule); }
.facts__row:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; }
.facts dd.is-supplied::before { content: "\201c"; color: var(--faint); }
.facts dd.is-supplied::after { content: "\201d"; color: var(--faint); }
.facts__note { font-size: 13.5px; color: var(--faint); margin-top: 10px; }
.arch-mini { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.arch-mini li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--rule); border-radius: 999px; font-size: 14px; background: var(--surface-2); }
.arch-mini__num { font: 600 11px var(--mono); background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 6px; }
.sec-intel { list-style: none; display: grid; gap: 12px; }
.sec-intel__item { border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 14px 16px; background: var(--surface-2); }
.sec-intel__name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.sec-intel__num { font: 600 12px var(--mono); color: var(--accent); }
.sec-intel__dl { margin: 0; display: grid; gap: 6px; }
.sec-intel__dl div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
.sec-intel__dl dt { font-size: 13px; color: var(--faint); font-weight: 600; }
.sec-intel__dl dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.bp-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.instruction {
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font: 13.5px/1.65 var(--mono); color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--r-sm);
  padding: 16px 18px; margin: 0 0 14px; max-height: 520px; overflow: auto;
}
.panel--toc { padding-bottom: 10px; }
.toc { list-style: none; display: grid; gap: 1px; }
.toc__link { width: 100%; display: flex; gap: 10px; align-items: baseline; text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: var(--r-sm); font-size: 13.5px; color: var(--text); cursor: pointer; }
.toc__link:hover { background: var(--bg-tint); color: var(--ink); }
.toc__num { font: 600 11px var(--mono); color: var(--faint); min-width: 16px; }

/* ---------- Dialog ---------- */
.dialog {
  width: min(460px, calc(100vw - 32px)); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 26px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); animation: pop 220ms var(--ease) both;
}
.dialog::backdrop { background: rgba(29, 27, 24, 0.38); animation: fade 200ms var(--ease) both; }
.dialog__title { font-size: 1.35rem; margin-bottom: 8px; }
.dialog__text { color: var(--muted); font-size: 15px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.load-error { max-width: 640px; margin: 40px auto; display: grid; gap: 10px; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.enter { animation: rise 300ms var(--ease) both; }
.reveal { animation: rise 360ms var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .ws { grid-template-columns: 210px minmax(0, 1fr); gap: 30px; }
  .ws-aside { grid-column: 2; position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
  .panel + .panel { margin-top: 0; }
  .mechanism { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  :root { --gutter: 22px; }
  .app-main { padding-top: 22px; }
  .ws { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .ws-aside { grid-column: 1; }
  .ws-nav { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 20; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; }
  .ws-nav__toggle {
    display: flex; width: 100%; align-items: center; gap: 12px; padding: 8px 8px; background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; text-align: left;
  }
  .ws-nav__toggle-num { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font: 600 12px var(--mono); flex: none; }
  .ws-nav__toggle-label { display: grid; font-weight: 650; color: var(--ink); line-height: 1.25; min-width: 0; flex: 1; }
  .ws-nav__toggle-of { font-size: 12px; font-weight: 600; color: var(--faint); }
  .ws-nav__chev { color: var(--muted); transition: transform 220ms var(--ease); }
  .ws-nav.is-open .ws-nav__chev { transform: rotate(180deg); }
  .ws-nav__progress { margin: 4px 8px 6px; }
  .ws-nav__list { display: none; padding: 4px 4px 8px; max-height: calc(100vh - 180px); overflow-y: auto; }
  .ws-nav.is-open .ws-nav__list { display: block; animation: fade 200ms var(--ease) both; }
  .mechanism { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-split { grid-template-columns: 1fr; }
  .strategy-grid { grid-template-columns: 1fr; }
  .bp-checklist { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .status__project { display: none; }
  .canvas { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .facts__row, .sec-intel__dl div { grid-template-columns: 1fr; gap: 2px; }
  .priority { grid-template-columns: 1fr; gap: 6px; }
  .journey { grid-template-columns: 1fr 1fr; }
  .journey--compact { grid-template-columns: 1fr; }
  .journey--compact .journey__stage { grid-template-columns: 28px 1fr; }
  .journey--compact .journey__text { grid-column: 2; }
  .arch__detail { padding-left: 18px; }
  .contents-list { columns: 1; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; --topbar-h: 56px; }
  body { font-size: 15.5px; }
  .topbar__inner { padding-top: 8px; padding-bottom: 8px; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__name { font-size: 16px; }
  .topbar__status { width: 100%; justify-content: space-between; }
  .card, .form-card { padding: 18px; border-radius: var(--r); }
  .bp-section { padding: 18px; }
  .canvas__cell { padding: 18px; }
  .hero { padding: 16px 0 22px; }
  .mechanism { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .journey { grid-template-columns: 1fr; }
  .choices, .choices--compact { grid-template-columns: 1fr; }
  .step-footer { flex-direction: column-reverse; align-items: stretch; }
  .step-footer > .btn { width: 100%; }
  .step-footer > :last-child:not(:first-child) { margin-left: 0; }
  .actions .btn, .build-row .btn { width: 100%; }
  .bp-actions__main, .bp-actions__side { width: 100%; }
  .bp-actions__main .btn { flex: 1 1 100%; }
  .bp-actions__side .btn { flex: 1 1 calc(50% - 4px); }
  .toolbar--wrap { align-items: flex-start; }
  .toolbar__end { width: 100%; justify-content: space-between; }
  .arch__head { padding: 12px 12px; gap: 12px; }
  .arch__num { width: 34px; height: 34px; }
  .arch__link { left: 28px; }
  .check__detail-inner p { padding-left: 16px; }
  .dialog__actions .btn { flex: 1 1 100%; }
  .instruction { font-size: 12.5px; padding: 12px; max-height: 420px; }
}
@media (max-width: 400px) {
  .bp-actions__side .btn { flex: 1 1 100%; }
}
@media (max-width: 360px) {
  .brand__family { display: none; }
  .status__step { font-size: 12.5px; }
}

/* Reduced motion: remove all non-essential movement. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
  }
}
