:root {
  --paper: #fff9ef;
  --paper-2: #f7f1e6;
  --card: #fffefb;
  --card-strong: #ffffff;
  --ink: #153032;
  --ink-soft: #294547;
  --muted: #657574;
  --line: #e6d8c2;
  --line-strong: #cdbfa8;
  --accent: #24594c;
  --accent-hover: #1d493f;
  --accent-soft: #e6eddf;
  --accent-pale: #f0f3e8;
  --amber: #a86418;
  --amber-soft: #f7e6c8;
  --danger: #8a3b32;
  --danger-soft: #f6e3de;
  --info: #365d73;
  --info-soft: #e2edf2;
  --shadow: 0 18px 55px rgba(49, 67, 51, .11);
  --shadow-small: 0 8px 28px rgba(49, 67, 51, .09);
  --r-small: 10px;
  --r-card: 18px;
  --r-panel: 24px;
  --r-pill: 999px;
  --serif: Georgia, "Songti SC", STSong, serif;
  --sans: "Avenir Next", "Trebuchet MS", "PingFang SC", "Microsoft YaHei", Verdana, sans-serif;
  --content: 1160px;
}

[data-theme="dark"] {
  --paper: #111a18;
  --paper-2: #17231f;
  --card: #1b2824;
  --card-strong: #21312c;
  --ink: #edf4e8;
  --ink-soft: #d2dfd5;
  --muted: #a8b9af;
  --line: #354942;
  --line-strong: #4b6258;
  --accent: #9fc7aa;
  --accent-hover: #b5d7bc;
  --accent-soft: #28483a;
  --accent-pale: #22362e;
  --amber: #e5b36f;
  --amber-soft: #4a3722;
  --danger: #efaaa2;
  --danger-soft: #4a2e2a;
  --info: #a7cddd;
  --info-soft: #253b46;
  --shadow: 0 18px 55px rgba(0, 0, 0, .28);
  --shadow-small: 0 8px 28px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 1px 1px, rgba(36, 89, 76, .08) 1px, transparent 1.2px) 0 0 / 24px 24px, var(--paper);
  font-family: var(--sans);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: linear-gradient(180deg, rgba(255,255,255,.12), transparent 32%, rgba(28,69,58,.025)); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.025em; line-height: 1.08; }
h1 { font-size: clamp(2.25rem, 5vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 3rem); }
h3 { line-height: 1.25; }
p { color: var(--muted); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
[hidden] { display: none !important; }
/* Long unbreakable tokens — a sha256 digest, a source URL, a phone number with an
   extension — must be able to break. The rule that was supposed to do this sat on
   `code`, which is `display: inline`, and `overflow-wrap` on an inline box does
   nothing: line breaking belongs to the BLOCK container. So the rule was present,
   loaded, and inert, while ten of ten pages overflowed a 360px viewport by 68–188px
   (measured: 10/10 pages, worst `rehearsal/pumch.html` at 184px).
   Wrapping therefore goes on the containers, and the inline element keeps it for
   the case where it is ever made inline-block. */
body, p, li, td, th, dd, dt, code, strong, a, span, .panel, .notice, .context-panel, .footer-note, .question-list, .evidence-line { overflow-wrap: anywhere; }
/* `.filter-row` keeps `white-space: nowrap` on purpose: it is a horizontally
   scrollable chip row, and forcing it to wrap would change a deliberate layout
   decision this measurement cannot justify. A first pass at the wrapping fix blanked
   every `nowrap` on the site; that was reverted the moment the row it would have
   broken was read. Only text that must wrap to be readable is released. */
.draft-banner-points li, .footer-note, .question-list li, .evidence-line { white-space: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -100px; left: 18px; z-index: 100; min-height: 48px; display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 0 0 var(--r-small) var(--r-small); background: var(--card-strong); color: var(--ink); box-shadow: var(--shadow-small); }
.skip:focus { top: 0; }
.prototype-bar { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 20px; background: var(--ink); color: var(--paper); text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .045em; }
.prototype-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: #e8bf79; }

/* Draft surface. Deliberately the loudest thing on the page and readable in both
   themes: a reader who is standing at a hospital counter with one hand free must be
   able to see "unsigned draft" before they read a phone number. The contrast is
   checked against the same tokens the rest of the site uses, so a dark-mode
   regression shows up in the screenshot gate rather than on a reader's phone. */
.draft-banner { background: #7a1f16; color: #fff4f2; border-bottom: 3px solid #e8bf79; }
.draft-banner .wrap { padding-block: 18px 20px; }
.draft-banner-title { margin: 0 0 10px; font-size: 15px; font-weight: 800; letter-spacing: .01em; line-height: 1.35; }
.draft-banner-points { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.draft-banner-points li { font-size: 13.5px; line-height: 1.5; }
.draft-banner-points a { color: #ffe0a3; text-decoration: underline; }
[data-theme="dark"] .draft-banner { background: #5c1710; color: #ffe9e5; }
[data-theme="dark"] .draft-banner-points a { color: #ffcf87; }
.wrap { width: min(var(--content), calc(100% - 44px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(16px); }
.nav-shell { min-height: 82px; display: flex; align-items: center; gap: 24px; }
.brand { min-height: 48px; display: inline-flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 800; white-space: nowrap; }
.brand-mark { width: 34px; height: 38px; display: grid; place-items: center; border-radius: 12px 12px 12px 3px; background: var(--accent); color: var(--card-strong); font: 25px/1 var(--serif); }
[data-theme="dark"] .brand-mark { color: #11231c; }
.desktop-nav { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.desktop-nav a, .mobile-nav a { min-height: 48px; display: inline-flex; align-items: center; padding: 9px 12px; border-radius: var(--r-small); color: var(--ink-soft); font-size: 14px; font-weight: 650; }
.desktop-nav a:hover, .mobile-nav a:hover { background: var(--accent-pale); }
.desktop-nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-button { min-width: 48px; min-height: 48px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-small); background: var(--card); color: var(--ink); font-weight: 800; }
.menu-button { display: none; }
.mobile-nav { display: none; padding: 0 0 14px; border-top: 1px solid var(--line); }
.mobile-nav a { width: 100%; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 18px; border: 1px solid var(--accent); border-radius: var(--r-small); background: var(--accent); color: #fff; font-weight: 800; text-align: center; }
[data-theme="dark"] .button { color: #102019; }
.button:hover { background: var(--accent-hover); transform: translateY(-1px); }
.button.secondary { background: transparent; color: var(--accent); }
.button.secondary:hover { background: var(--accent-soft); }
.button.quiet { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.button.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.button.small { min-height: 44px; padding: 8px 13px; font-size: 13px; }
.button[disabled] { cursor: not-allowed; opacity: .48; transform: none; }
.text-link { min-height: 44px; display: inline-flex; align-items: center; border-bottom: 1px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 800; }
.eyebrow { margin-bottom: 10px; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.tag, .status { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.status.pending, .status.needs-review { background: var(--amber-soft); color: var(--amber); }
.status.draft, .status.staged { background: var(--info-soft); color: var(--info); }
.status.unavailable, .status.machine-draft { background: var(--danger-soft); color: var(--danger); }
.status.reviewed, .status.ready { background: var(--accent-soft); color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page { padding: 48px 0 72px; }
.page-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 390px); gap: 34px; align-items: end; margin-bottom: 32px; }
.page-header h1 { max-width: 780px; margin-bottom: 15px; }
.page-header .lede { max-width: 760px; font-size: 18px; }
.context-panel, .panel, .task-card, .guide-card, .phrase-card, .form-card, .source-card { border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-small); }
.context-panel, .panel, .form-card { border-radius: var(--r-panel); padding: 24px; }
.context-panel { background: var(--accent); color: #fff; border-color: transparent; }
[data-theme="dark"] .context-panel { color: #102019; }
.context-panel p, .context-panel h2, .context-panel h3 { color: inherit; opacity: .9; }
.context-panel .eyebrow { color: #dce9df; opacity: .85; }
[data-theme="dark"] .context-panel .eyebrow { color: #19362a; }
.card, .task-card, .guide-card, .phrase-card, .source-card { border-radius: var(--r-card); }
.task-card, .guide-card { display: flex; flex-direction: column; padding: 22px; }
.task-card { min-height: 235px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.task-card:hover, .guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.task-card h3, .guide-card h3 { margin: 12px 0 8px; font-size: 21px; }
.task-card p, .guide-card p { flex: 1; }
.task-number { color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.section { padding: 54px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 450px); gap: 28px; align-items: end; margin-bottom: 24px; }
.section-head h2 { margin-bottom: 0; }
.section-head p { margin-bottom: 0; }
.next-step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; min-height: 130px; padding: 24px; border-radius: var(--r-panel); background: var(--accent); color: #fff; }
[data-theme="dark"] .next-step { color: #102019; }
.next-step-number { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; font-family: var(--serif); font-size: 24px; }
.next-step h2, .next-step p { color: inherit; }
.next-step h2 { margin: 0 0 5px; font-family: var(--sans); font-size: 24px; font-weight: 800; letter-spacing: 0; }
.next-step p { margin: 0; opacity: .86; }
.next-step .button { background: #f1f4d7; border-color: #f1f4d7; color: var(--ink); }
.next-step .button:hover { background: #fff; }
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--line); }
.principle { min-height: 116px; padding: 20px; background: var(--card); }
.principle strong { display: block; margin-bottom: 5px; }
.principle span { color: var(--muted); font-size: 13px; }
.status-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--ink-soft); font-size: 13px; }
.status-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.status-chip.pending::before { background: var(--amber); }
.status-chip.danger::before { background: var(--danger); }
.notice { padding: 16px 18px; border-left: 4px solid var(--accent); border-radius: 0 var(--r-small) var(--r-small) 0; background: var(--accent-pale); }
.notice.warning { border-color: var(--amber); background: var(--amber-soft); }
.notice.danger { border-color: var(--danger); background: var(--danger-soft); }
.notice p:last-child, .panel p:last-child, .source-card p:last-child { margin-bottom: 0; }
.filters { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 14px; align-items: end; margin-bottom: 22px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.field { display: grid; gap: 7px; }
.field label, .field legend { color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--r-small); background: var(--card-strong); color: var(--ink); }
.field textarea { min-height: 132px; resize: vertical; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; color: var(--ink-soft); font-size: 13px; font-weight: 750; }
.filter-button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.results-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.guide-card footer, .task-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; color: var(--muted); font-size: 13px; }
.breadcrumb a { min-height: 40px; display: inline-flex; align-items: center; color: var(--accent); font-weight: 750; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.guide-main { min-width: 0; }
.guide-sidebar { position: sticky; top: 108px; display: grid; gap: 14px; }
.source-card { padding: 20px; }
.source-card h3 { margin-bottom: 8px; }
.source-meta { display: grid; gap: 7px; margin: 16px 0; }
.source-meta div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.source-meta span { color: var(--muted); font-size: 13px; }
.evidence-item { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.evidence-item + .evidence-item { margin-top: 12px; }
.evidence-item h3 { margin-bottom: 7px; }
.evidence-item blockquote { margin: 12px 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-pale); color: var(--ink-soft); }
.evidence-item blockquote p { margin: 0; }
.step-list { display: grid; gap: 14px; margin: 24px 0; padding: 0; list-style: none; counter-reset: step; }
.step-list li { position: relative; min-height: 104px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 19px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); counter-increment: step; }
.step-list li::before { content: counter(step); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 900; }
[data-theme="dark"] .step-list li::before { color: #102019; }
.step-list h3 { margin-bottom: 5px; }
.step-list p { margin-bottom: 0; }
.step-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
details { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
details + details { margin-top: 10px; }
summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 17px; cursor: pointer; font-weight: 800; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 22px; }
details[open] summary::after { content: "−"; }
details .details-body { padding: 0 17px 17px; }
details .details-body p:last-child { margin-bottom: 0; }
.question-list { margin: 14px 0 0; padding-left: 20px; color: var(--muted); }
.question-list li + li { margin-top: 8px; }
.phrase-card { padding: 24px; }
.phrase-zh { margin: 20px 0 12px; color: var(--ink); font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 750; line-height: 1.5; }
.phrase-en { color: var(--muted); font-size: 16px; }
.phrase-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.phrase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.copy-status, .save-status { min-height: 24px; margin: 12px 0 0; color: var(--accent); font-size: 13px; font-weight: 750; }
.progress-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 22px; align-items: center; }
.progress-ring { --progress: 0%; width: 108px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) var(--progress), var(--line) 0); position: relative; }
.progress-ring::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--card); }
.progress-ring strong { position: relative; z-index: 1; font-size: 24px; }
.progress-card h2 { margin-bottom: 6px; font-family: var(--sans); font-size: 26px; font-weight: 800; letter-spacing: 0; }
.checklist { display: grid; gap: 9px; margin-top: 18px; }
.check-row { min-height: 56px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-small); background: var(--card); }
.check-row input { width: 24px; height: 24px; accent-color: var(--accent); }
.check-row.done { background: var(--accent-pale); }
.check-row.done label { text-decoration: line-through; color: var(--muted); }
.empty-state { padding: 38px 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-panel); background: color-mix(in srgb, var(--card) 72%, transparent); text-align: center; }
.empty-state h2, .empty-state h3 { font-family: var(--sans); font-weight: 850; letter-spacing: 0; }
.empty-state p { max-width: 650px; margin-inline: auto; }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.method-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.method-card h3 { margin-bottom: 7px; }
.method-card p:last-child { margin-bottom: 0; }
.feedback-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 24px; align-items: start; }
.form-card { display: grid; gap: 16px; }
.form-card h2 { margin-bottom: 0; font-family: var(--sans); font-size: 27px; font-weight: 850; letter-spacing: 0; }
.form-error { min-height: 24px; color: var(--danger); font-weight: 750; }
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, .7fr)); gap: 30px; padding: 46px 0; }
.footer-grid h2 { margin-bottom: 10px; font-family: var(--sans); font-size: 20px; font-weight: 850; letter-spacing: 0; }
.footer-links { display: grid; gap: 6px; }
.footer-links a { min-height: 40px; display: inline-flex; align-items: center; color: var(--muted); font-size: 14px; }
.footer-note { padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 80; max-width: min(420px, calc(100% - 40px)); padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-small); background: var(--ink); color: var(--paper); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
dialog { width: min(720px, calc(100% - 32px)); max-height: min(88vh, 880px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(11, 24, 21, .65); backdrop-filter: blur(5px); }
.dialog-body { padding: 26px; }
.dialog-body h2 { margin-bottom: 18px; }
.dialog-zh { margin: 24px 0 12px; font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 800; line-height: 1.5; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.noscript { margin: 20px auto; width: min(var(--content), calc(100% - 44px)); padding: 16px; border: 1px solid var(--danger); background: var(--danger-soft); }

@media (max-width: 1040px) {
  .desktop-nav { display: none; }
  .menu-button { display: inline-grid; }
  .mobile-nav[data-open="true"] { display: grid; }
  .page-header, .section-head, .feedback-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 148px; }
  .prototype-bar { align-items: flex-start; font-size: 11px; }
  .draft-banner-title { font-size: 14px; }
  .draft-banner-points li { font-size: 12.5px; }
  .wrap { width: min(100% - 32px, var(--content)); }
  .nav-shell { min-height: 68px; }
  .brand { font-size: 17px; }
  .nav-actions .button { display: none; }
  .page { padding-top: 34px; }
  .page-header .lede { font-size: 16px; }
  .grid-2, .grid-3, .grid-4, .phrase-grid, .method-grid, .guide-sidebar { grid-template-columns: 1fr; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 42px 0; }
  .next-step { grid-template-columns: 48px minmax(0, 1fr); padding: 20px; }
  .next-step-number { width: 46px; height: 46px; }
  .next-step .button { grid-column: 1 / -1; width: 100%; }
  .filters { grid-template-columns: 1fr; }
  .filter-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .filter-button { white-space: nowrap; }
  .progress-card { grid-template-columns: 1fr; }
  .progress-ring { margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .step-list li { grid-template-columns: 38px minmax(0, 1fr); padding: 16px; }
  .step-list li::before { width: 36px; height: 36px; }
  .check-row { grid-template-columns: 26px minmax(0, 1fr); }
  .check-row .status { grid-column: 2; justify-self: start; }
}

@media (max-width: 500px) {
  h1 { font-size: 2.35rem; }
  h2 { font-size: 1.9rem; }
  .prototype-bar { text-align: left; }
  .context-panel, .panel, .form-card { padding: 20px; }
  .task-card { min-height: 0; }
  .principles { grid-template-columns: 1fr; }
  .actions .button { width: 100%; }
  .source-meta div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .results-line { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* Language switcher.
   A switcher that lists only what the site can actually serve, labelled in each
   language's own name so a reader who cannot read the interface's language can
   still find theirs. `lang` on the link is what makes a screen reader switch
   voice rather than reading a foreign word in the page's language. */
.lang-switch { display: flex; gap: 4px; align-items: center; }
.lang-link {
  font-size: 0.8125rem;
  line-height: 1.2;
  padding: 6px 9px;
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}
.lang-link:hover { border-color: currentColor; }
.lang-link.is-current { font-weight: 700; border-color: currentColor; }
/* A language nobody can read yet must not be offered as if it were available, so
   the untranslated set is simply not rendered. If one is ever rendered without a
   translation, this is the state that says so rather than passing it off. */
.lang-link[aria-disabled="true"] { opacity: 0.55; text-decoration: line-through; }
@media (max-width: 720px) { .lang-switch { display: none; } }
