/* Reading first: natural wrapping, one type scale, and explicit spacing. */
:root {
  --ink: #203036;
  --muted: #526168;
  --paper: #fff;
  --soft: #f3f5f5;
  --line: #d7dfe1;
  --accent: #214f60;
  --focus: #147293;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; font: 1.0625rem/1.65 var(--sans); color: var(--ink); background: var(--paper); }
h1, h2, h3, h4, p { margin: 0 0 1rem; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: normal; line-height: 1.2; text-wrap: pretty; }
h1 { font-size: clamp(2.2rem, 4.3vw, 3.6rem); max-width: 19ch; }
h2 { font-size: clamp(1.65rem, 2.8vw, 2.25rem); max-width: 30ch; }
h3 { font-size: 1.125rem; line-height: 1.4; font-weight: 600; }
p, li, dd { text-wrap: pretty; overflow-wrap: break-word; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .22em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
button { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; top: -100px; left: 12px; padding: 12px 16px; z-index: 10; background: var(--ink); color: white; }
.skip:focus { top: 12px; }
.site-header { display: flex; justify-content: space-between; gap: 24px; align-items: center; min-height: 92px; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-size: 1.0625rem; font-weight: 650; line-height: 1.4; text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-header nav a { display: inline-block; color: var(--muted); font-size: 0.9375rem; padding: 10px 0; text-decoration: none; }
.site-header nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }
.eyebrow, .small-label { display: block; font-size: 0.875rem; line-height: 1.5; font-weight: 600; color: var(--muted); letter-spacing: normal; text-transform: none; }
.eyebrow { margin-bottom: 16px; }
.small-label { margin-bottom: 12px; }
.hero { display: grid; grid-template-columns: 1.5fr .85fr; gap: 72px; padding: 64px 0 54px; align-items: center; }
.hero-lede, .lede { font-size: 1.1875rem; line-height: 1.6; color: var(--muted); max-width: 62ch; }
.hero .button { margin-top: 10px; }
.current-status { border-left: 2px solid var(--line); padding-left: 28px; }
.current-status h2 { font-family: var(--sans); font-size: 1.125rem; font-weight: 600; }
.current-status p { font-size: 1rem; color: var(--muted); }
.current-status a { font-size: 0.9375rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 14px; min-height: 46px; padding: 11px 18px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: white; text-decoration: none; font-size: 1rem; font-weight: 550; line-height: 1.4; }
.button:hover { background: #173d4b; }
.button.secondary { background: white; color: var(--accent); }
.text-button { background: none; border: none; padding: 10px 0; color: var(--accent); font-size: 0.875rem; text-decoration: underline; text-underline-offset: .22em; }
.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.section { padding: 46px 0; border-top: 1px solid var(--line); }
.section-heading { max-width: 72ch; margin-bottom: 28px; }
.section-heading p:not(.eyebrow) { color: var(--muted); }
.heading-split { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
.heading-split p { max-width: 64ch; }
.compare-layout { display: grid; grid-template-columns: .85fr 1.3fr; gap: 54px; }
.scenario-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.scenario-buttons button { border: 1px solid #9fadb2; background: white; border-radius: 4px; padding: 10px 13px; min-height: 44px; font-size: 0.9375rem; }
.scenario-buttons button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: white; }
.scenario { background: var(--soft); border-radius: 4px; padding: 24px 28px; }
.scenario dl { margin: 0; }
.scenario dt { font-weight: 600; font-size: 0.9375rem; margin-top: 18px; }
.scenario dd { margin: 4px 0 0; font-size: 1rem; color: var(--muted); }
.field-help, .source-note, .model-caption, .edge-meta { font-size: 0.875rem; line-height: 1.6; color: var(--muted); }
.field-help { margin: 10px 0 16px; }
.wide-detail { border-top: 1px solid var(--line); margin-top: 28px; }
summary { padding: 16px 0; font-size: 1rem; line-height: 1.5; font-weight: 550; }
summary::marker { color: var(--muted); }
details[open] > summary { margin-bottom: 10px; }
details > p:last-child, details > div:last-child { margin-bottom: 24px; }
.next-step { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; }
.next-step p { color: var(--muted); }
.short-steps { margin: 0; padding-left: 24px; }
.short-steps li { padding: 0 0 18px 8px; }
.short-steps strong { display: block; }
.pathways { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.pathways h2 { font-family: var(--sans); font-size: 1.25rem; font-weight: 600; }
.pathways p { color: var(--muted); max-width: 48ch; }
.closing-note { padding: 12px 0 36px; color: var(--muted); }
.article-hero { padding: 48px 0 34px; max-width: 84ch; }
.article-hero h1 { max-width: 22ch; }
.local-nav { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 24px; font-size: 0.9375rem; }
.local-nav a { padding: 4px 0; }
.status { display: inline-block; background: var(--soft); border: 1px solid var(--line); border-radius: 3px; padding: 4px 9px; font-size: 0.875rem; line-height: 1.5; font-weight: 550; }
.model-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 24px 0; font-size: 0.9375rem; }
.model-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.model-graphic { min-width: 0; }
.network { position: relative; aspect-ratio: 600/450; margin: 20px 0; }
.network-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.network-lines path { stroke: transparent; fill: none; }
.network-lines path.active { stroke: #7d949e; stroke-width: 1.4; }
.node { overflow-wrap: anywhere; position: absolute; transform: translate(-50%, -50%); width: 28%; min-height: 62px; border: 1px solid #99a9b0; border-radius: 4px; background: white; padding: 9px 5px; font-size: 0.875rem; line-height: 1.4; }
.node[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: white; font-weight: 600; }
.model-inspector { background: var(--soft); padding: 24px; border-radius: 4px; min-width: 0; }
.model-inspector h3 { font-size: 1.3125rem; }
.model-inspector > p { color: var(--muted); }
.model-edge { border-top: 1px solid var(--line); }
.model-edge summary { font-size: 0.9375rem; padding: 13px 0; }
.model-edge p { font-size: 0.9375rem; margin-bottom: 12px; }
.model-edge .edge-meta { font-size: 0.875rem; }
.edge-list { max-width: 76ch; }
.edge-list .model-edge { padding-inline: 4px; }
.audit-columns { display: grid; grid-template-columns: repeat(3,1fr); gap: 36px; margin-top: 30px; }
.audit-columns p { font-size: 1rem; color: var(--muted); }
.audit-columns .small-label { font-weight: 400; }
.lifecycle-note { background: var(--soft); padding: 18px 22px; }
.metric-list, .roles-list, .definitions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 34px; }
.metric-list, .roles-list { padding-left: 22px; }
.metric-list li, .roles-list li { font-size: 1rem; }
.loop-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 28px 0; }
.loop { min-width: 0; overflow-wrap: anywhere; border-top: 2px solid #93a6af; padding-top: 20px; }
.loop h3 { font-size: 1.125rem; }
.loop ol { list-style: none; margin: 0; padding: 0; }
.loop li { margin: 0; padding: 9px 0; font-size: 1rem; }
.loop li + li::before { content: '↓'; padding-right: 12px; color: var(--muted); }
.calculator { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; padding: 28px; background: var(--soft); border-radius: 4px; }
.calculator h3 { font-size: 1.3125rem; }
.calculator label { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 22px; font-size: 1rem; font-weight: 550; }
.calculator output { font-variant-numeric: tabular-nums; }
input[type=range] { display: block; width: 100%; margin: 8px 0; height: 38px; accent-color: var(--accent); }
.calc-result { border-left: 1px solid var(--line); padding-left: 32px; align-self: center; }
.calc-result .result-number { font-size: 3.5rem; font-variant-numeric: tabular-nums; line-height: 1.2; margin-bottom: 12px; }
.calc-result p { font-size: 1rem; }
.calc-result .field-help { font-size: 0.875rem; }
.formula { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); padding-top: 14px; }
.research-loop { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 0 20px; font-weight: 600; }
.research-loop span + span::before { content: '→'; padding-right: 12px; font-weight: 400; color: var(--muted); }
.record-list { margin-top: 24px; }
.record { display: grid; grid-template-columns: 125px 1fr; gap: 12px 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.record .record-id { font-size: 0.875rem; padding-top: 3px; }
.record h3 { font-size: 1.1875rem; }
.record p { font-size: 1rem; color: var(--muted); }
.record a { font-size: 0.9375rem; }
.record .status { grid-column: 2; justify-self: start; }
.research-empty { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 24px; }
.research-empty p { font-size: 1rem; color: var(--muted); }
.research-empty a { font-size: 0.9375rem; }
.contribute-section { border-top: 0; }
.contribute-section .section-heading h1 { max-width: 19ch; }
.contribute-layout { display: grid; grid-template-columns: 1.5fr .75fr; gap: 64px; }
.contribute-layout aside { max-width: 42ch; }
.contribute-layout aside h2 { font-family: var(--sans); font-size: 1.125rem; font-weight: 600; }
.contribute-layout aside > p { color: var(--muted); }
.contribute-layout aside details { margin: 24px 0; border-top: 1px solid var(--line); }
.draft-area { min-width: 0; }
.form-title { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.form-title h2 { font-family: var(--sans); font-weight: 600; font-size: 1.3125rem; }
.form-pair { display: block; }
form label { display: block; font-size: 1rem; font-weight: 550; margin: 22px 0 8px; }
form input:not([type=checkbox]), form textarea, form select { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #8a9ca4; border-radius: 4px; background: white; color: var(--ink); font-size: 1rem; line-height: 1.5; }
form input::placeholder, form textarea::placeholder { color: #5e6d74; font-size: 0.9375rem; }
form textarea { resize: vertical; }
.check-label { display: flex; align-items: start; gap: 12px; font-weight: 400; margin: 24px 0; }
.check-label input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; accent-color: var(--accent); }
#draft-preview { margin-top: 30px; padding: 24px; background: var(--soft); border-radius: 4px; }
.draft-summary { margin: 20px 0; }
.draft-summary dt { font-size: 0.9375rem; font-weight: 600; margin-top: 16px; }
.draft-summary dd { margin: 3px 0 0; font-size: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.document-layout { display: grid; grid-template-columns: 225px 1fr; gap: 50px; padding-bottom: 48px; }
.document-nav { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; padding: 2px 6px 12px 0; }
.document-nav a { display: block; padding: 7px 0; font-size: 0.875rem; line-height: 1.5; text-decoration: none; }
.document-nav a:hover { text-decoration: underline; }
.document-content { min-width: 0; max-width: 72ch; }
.review-verdict { padding: 20px 24px; background: var(--soft); margin: 24px 0 0; }
.review-verdict p { margin: 0; }
.review-step, .doc-section { padding: 28px 0; border-top: 1px solid var(--line); }
.review-step h2 { font-size: 1.6875rem; }
.review-step p, .doc-section p, .doc-section li { max-width: 72ch; }
.doc-section h3 { margin-top: 24px; }
.doc-section pre { max-width: 100%; overflow: auto; padding: 16px; background: var(--soft); font-size: 0.875rem; }
code { overflow-wrap: anywhere; }
.source-entry { border-top: 1px solid var(--line); padding: 20px 0; }
.source-entry h3 { margin-top: 0; }
.site-footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: 0.875rem; color: var(--muted); }
.site-footer p { margin-bottom: 12px; }
.site-footer nav { display: flex; gap: 12px 24px; flex-wrap: wrap; }
@media (max-width: 920px) {
  .site-header { align-items: start; flex-direction: column; gap: 8px; padding-block: 20px; }
  .site-header nav { gap: 24px; }
  .hero { gap: 32px; grid-template-columns: 1.4fr 1fr; }
  .compare-layout, .next-step { gap: 32px; }
  .heading-split { gap: 30px; }
  .model-layout, .contribute-layout { grid-template-columns: 1fr; gap: 28px; }
  .model-graphic { max-width: 600px; }
  .model-inspector { max-width: 76ch; }
  .network { margin-bottom: 12px; }
  .contribute-layout aside { max-width: none; grid-row: 2; border-top: 1px solid var(--line); padding-top: 24px; }
  .contribute-layout .draft-area { grid-row: 1; }
  .contribute-layout aside details { margin: 12px 0; }
  .contribute-layout .draft-area { max-width: 680px; }
  .document-layout { grid-template-columns: 190px 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .hero { display: block; padding: 36px 0; }
  .hero h1 { max-width: 22ch; }
  .hero-lede { font-size: 1.125rem; }
  .current-status { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; margin-top: 28px; }
  .current-status p { max-width: 64ch; }
  .section { padding: 32px 0; }
  .heading-split, .compare-layout, .next-step, .pathways { grid-template-columns: 1fr; gap: 24px; }
  .scenario { padding: 20px; }
  .scenario-buttons { margin-bottom: 12px; }
  .network { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 10px; aspect-ratio: auto; }
  .network-lines { display: none; }
  .node { overflow-wrap: anywhere; position: static; transform: none; width: auto; min-height: 46px; padding: 12px; font-size: 0.9375rem; }
  .model-caption { max-width: 68ch; }
  .model-toolbar { gap: 12px 18px; }
  .model-inspector { padding: 20px; }
  .model-inspector .model-edge { margin-top: 0; }
  .audit-columns { grid-template-columns: 1fr; gap: 20px; }
  .audit-columns article { max-width: 68ch; }
  .audit-columns .small-label { margin-bottom: 7px; }
  .metric-list, .roles-list, .definitions { grid-template-columns: 1fr; gap: 8px; }
  .calculator { grid-template-columns: 1fr; gap: 24px; padding: 22px; }
  .calc-result { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .loop-pair { gap: 24px; }
  .loop li { font-size: 0.9375rem; }
  .loop h3 { font-size: 1.0625rem; }
  .record { grid-template-columns: 1fr; gap: 10px; }
  .record .status { grid-column: 1; }
  .research-empty { grid-template-columns: 1fr; gap: 24px; }
  .article-hero { padding: 36px 0 28px; }
  .document-layout { display: block; }
  .document-nav { position: static; max-height: none; margin-bottom: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
  .document-nav .small-label { grid-column: 1/-1; }
  .document-nav a { font-size: 0.9375rem; }
  .doc-section, .review-step { padding-block: 24px; }
  .review-step h2 { font-size: 1.5625rem; }
}
@media (max-width: 400px) {
  .wrap { width: calc(100% - 32px); }
  h1 { font-size: 2.1rem; }
  .site-header nav { gap: 8px 20px; }
  .site-header nav a { font-size: 0.875rem; }
  .loop-pair { gap: 16px; }
  .loop h3 { font-size: 1rem; }
  .loop li { font-size: 0.875rem; }
  .loop li + li::before { padding-right: 6px; }
  .document-nav { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media print {
  .wrap { width: 100%; }
  .site-header nav, .document-nav, .scenario-buttons, form, .actions, input[type=range] { display: none; }
  .hero, .section, .article-hero { padding-block: 20px; }
  .hero, .document-layout, .model-layout, .contribute-layout { display: block; }
  .network { display: none; }
  .model-inspector { background: white; }
  .current-status { border: 0; padding: 15px 0; }
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  .review-step, .record { break-inside: avoid; }
}

/* Sharing stays behind one disclosure and remains usable without JavaScript. */
.share-panel { margin-top: 24px; max-width: 640px; }
.share-panel summary { cursor: pointer; padding-block: 12px; }
.share-content { padding: 12px 0; }
.share-content input { width: 100%; min-width: 0; font-size: 1rem; }
.share-content label { display: block; margin-bottom: 8px; }
.share-content .actions { margin-top: 16px; }
.share-content p { font-size: 0.9375rem; }
.social-preview { display: block; width: 100%; height: auto; margin-top: 20px; border: 1px solid var(--line, #ddd); }
@media print { .share-panel { display: none; } }

.license-copy { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: transparent; padding: 0; border: 0; }

/* State 0002 uses the existing reading scale and native disclosures. */
.allocation-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 28px; margin-bottom: 24px; }
.allocation-fields .field { margin: 0; }
.allocation-fields select { width: 100%; min-width: 0; min-height: 48px; }
.allocation-result { padding: 24px; margin-top: 24px; border-left: 3px solid var(--accent); background: var(--soft); }
.state-lineage { padding-left: 24px; }
.state-lineage li { padding: 8px 0 18px 8px; }
.state-lineage p { margin: 6px 0; }
.state-digest { display: inline-block; overflow-wrap: anywhere; font-size: 0.875rem; max-width: 100%; }
.review-pass p:last-child { margin-bottom: 20px; }
.extension-note h2 { font-size: 1.75rem; }
@media (max-width: 720px) { .allocation-fields { grid-template-columns: 1fr; } }
