/* Presentation-only refinement. The published v0.8 text and archived styles stay intact. */
:root {
  --bg: #0b101b;
  --panel: #111a28;
  --text: #f3f5f7;
  --muted: #b6c2d3;
  --gold: #e4c369;
  --line: #344154;
  --field-border: #66778e;
  --soft-accent: #e4c3690d;
  --button-text: #171c26;
  --button-hover: #f1d68a;
  --header-bg: #0b101b;
  --placeholder: #aab7c9;
  --success: #bde8c5;
  --error: #ffc5b8;
  --display: 'Inter', sans-serif;
  --page-gutter: 3rem;
  --section-space: 7.5rem;
  color-scheme: dark;
}
:root[data-laps-theme='light'] {
  --bg: #fcfbf8;
  --panel: #f2f0ea;
  --text: #1d2938;
  --muted: #526070;
  --gold: #80601b;
  --line: #d1d4d5;
  --field-border: #7b858e;
  --soft-accent: #80601b0a;
  --button-text: #ffffff;
  --button-hover: #65490e;
  --header-bg: #fcfbf8;
  --placeholder: #626d78;
  --success: #27643a;
  --error: #a22e24;
  color-scheme: light;
}
html { scroll-padding-top: 7rem; scrollbar-color: var(--field-border) var(--bg); }
body { font-size: 1.125rem; line-height: 1.75; }
::selection { background: var(--gold); color: var(--button-text); }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 4.6vw, 4rem); line-height: 1.1; letter-spacing: -.04em; font-weight: 600; }
h2 { font-size: clamp(2.125rem, 3.8vw, 3.25rem); line-height: 1.16; letter-spacing: -.035em; }
h3 { font-size: 1.625rem; line-height: 1.3; letter-spacing: -.025em; }
p { margin-bottom: 1.5rem; }
.container { width: 100%; max-width: 1280px; padding-inline: var(--page-gutter); }
.section { padding-block: var(--section-space); }
.section-tint { border-color: var(--line); }
.section-heading { max-width: 780px; margin-bottom: 3.5rem; }
.section-heading > p:last-child { max-width: 640px; font-size: 1.25rem; line-height: 1.65; }
.section-label { font-size: .8125rem; line-height: 1.6; letter-spacing: .12em; margin-bottom: 1.25rem; }
.centered { max-width: 780px; }
.actions { gap: 1rem; }
.button { font-size: 1rem; min-height: 54px; padding: 15px 24px; border-radius: 6px; color: var(--button-text); }
.button:hover { background: var(--button-hover); color: var(--button-text); transform: none; }
.button.outline { color: var(--gold); }
.button.outline:hover { background: var(--soft-accent); color: var(--gold); }
.button.small { font-size: .9375rem; padding: 10px 16px; }
.site-header { background: var(--header-bg); border-color: var(--line); backdrop-filter: none; }
.nav-wrap { min-height: 88px; gap: 1.5rem; }
.site-header nav { margin-left: auto; gap: 1.5rem; font-size: .9375rem; }
.site-header nav > a { display: inline-flex; align-items: center; min-height: 44px; }
.theme-toggle { order: 3; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text); font-size: .875rem; line-height: 1.4; }
.theme-toggle:hover { border-color: var(--gold); background: var(--soft-accent); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-moon { display: none; }
[data-laps-theme='light'] .theme-sun { display: none; }
[data-laps-theme='light'] .theme-moon { display: block; }
.hero { padding-top: 6rem; grid-template-columns: minmax(0,1.25fr) minmax(0,.85fr); gap: 0 3rem; }
.hero-content { padding-bottom: 0; }
.hero h1 { white-space: normal; font-size: clamp(2.75rem, 4.6vw, 4rem); font-weight: 600; margin-bottom: 2rem; }
.beta { font-size: .8125rem; margin-bottom: 2rem; }
.wordmark { font-size: 1.25rem; margin-bottom: 1.5rem; }
.wordmark span { font-size: .75rem; letter-spacing: .12em; }
.hero .expansion, .expansion { font-size: 1.625rem; line-height: 1.45; margin-bottom: 1.25rem; }
.hero-description { font-size: 1.25rem; line-height: 1.7; max-width: 32rem; margin-bottom: 2rem; }
.hero-art { min-width: 0; width: 100%; max-width: 520px; margin: 0; padding: 16px 0; }
.hero-art img { mix-blend-mode: screen; }
.hero-art figcaption { font-size: .875rem; padding-right: 0; margin-top: 1rem; text-align: center; }
[data-laps-theme='light'] .hero-art { background: #0b101b; padding: 32px 16px; border-radius: 12px; }
[data-laps-theme='light'] .hero-art figcaption { color: #b6c2d3; }
.hero-strips { margin-top: 5rem; padding-block: 2.5rem 0; gap: 0; }
.hero-strips > a { padding-inline: 1.75rem; gap: 1rem; }
.hero-strips strong { font-size: 1.0625rem; font-weight: 600; }
.hero-strips small { font-size: .9375rem; line-height: 1.6; margin-top: .5rem; }
.letter { border-color: var(--gold); width: 44px; height: 44px; }
.lap-workspace { border-color: var(--line); border-radius: 10px; padding: 3rem; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 3rem; }
.lap-diagram { max-width: 440px; }
.orbit-line, .knowledge-ring { stroke: var(--gold); opacity: .6; }
.knowledge-ring { fill: var(--panel); opacity: 1; }
.brain { font-size: 1.125rem; }
.brain small { font-size: .75rem; white-space: normal; max-width: 120px; margin: .5rem auto 0; }
.lap-node { font-size: .9375rem; width: 96px; }
.lap-node b { border-color: var(--field-border); width: 48px; height: 48px; }
.lap-node.active b { color: var(--button-text); box-shadow: none; }
.lap-detail { min-height: 430px; padding: 0 0 0 3rem; }
.lap-detail h3 { font-size: 2rem; margin-bottom: 1rem; }
.lap-detail p { font-size: 1.0625rem; line-height: 1.75; margin-bottom: 1.25rem; }
.lap-detail .lead { font-size: 1.25rem; line-height: 1.6; }
.lap-detail .section-label { font-size: .8125rem; }
.example > span { font-size: .8125rem; }
.example p { font-size: 1rem; font-style: normal; }
.lap-detail .step-output { font-size: .9375rem; }
.explore-controls { margin-top: 2rem; font-size: .875rem; gap: 2rem; }
.text-button, .motion-control button { font-size: .9375rem; }
.footnote, .paper-about .footnote { font-size: .9375rem; line-height: 1.7; max-width: 80ch; }
.segmented button { font-size: 1rem; padding: 12px 24px; }
.segmented button.active { color: var(--button-text); }
.cadence-display { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); border-radius: 10px; }
.cadence-chart { padding: 2.5rem; }
.timeline-label { font-size: .8125rem; line-height: 1.55; }
.timeline-row { font-size: .9375rem; grid-template-columns: 100px minmax(0,1fr) 28px; padding-block: 1.5rem; }
.ticks > span { background: var(--line); }
.cadence-reading { padding: 2.5rem; }
.cadence-reading h3 { font-size: 1.75rem; }
.cadence-reading > p:last-child { font-size: 1.0625rem; line-height: 1.75; }
.overlay-options { gap: 1.5rem; }
.overlay-option { padding: 2rem; min-height: 345px; border-radius: 8px; }
.overlay-option.active { background: var(--soft-accent); }
.overlay-title { font-size: 1.75rem; }
.big-letter { font-size: 3rem; margin-bottom: 1.5rem; }
.overlay-option > span:not(.big-letter):not(.overlay-title) { font-size: 1.0625rem; }
.overlay-option small { font-size: .75rem; line-height: 1.6; }
.overlay-result { border-left-width: 1px; margin-top: 2.5rem; padding-left: 1.75rem; }
.overlay-result h3 { font-size: 1.375rem; }
.overlay-result ul { font-size: 1.0625rem; }
.values-list { column-gap: 4rem; margin-bottom: 2rem; }
.values-list li { padding-block: 2rem; }
.values-list h3 { font-size: 1.5rem; }
.values-list p { font-size: 1.0625rem; line-height: 1.75; }
.values-list li > span { font-size: .9375rem; }
.text-link { font-size: 1rem; }
.lifecycle-list summary { min-height: 96px; grid-template-columns: 42px 210px minmax(0,1fr) 24px; padding-block: 1.5rem; }
.lifecycle-list summary h3 { font-size: 1.375rem; }
.lifecycle-list summary p { font-size: 1.0625rem; }
.stage-body { font-size: 1.0625rem; line-height: 1.8; max-width: 850px; padding: .25rem 2rem 2rem 70px; }
.route-grid { gap: 2rem; }
.route-grid article { padding: 2.5rem; display: flex; flex-direction: column; align-items: flex-start; }
.route-grid h3 { font-size: 1.75rem; margin-block: 1.25rem; }
.route-grid p, .route-grid li { font-size: 1.0625rem; line-height: 1.75; }
.route-grid .section-label { font-size: .75rem; }
.route-grid .button { margin-top: auto; }
.paper-grid { grid-template-columns: minmax(0,.75fr) minmax(0,1fr); gap: 6rem; }
.paper-cover { border: 1px solid var(--line); border-left: 6px solid var(--line); box-shadow: 12px 20px 40px #00000016; transform: rotate(-2deg); margin: 0 auto; }
.paper-cover > p { font-size: .75rem; }
.paper-cover > small { font-size: .75rem; }
.paper-cover > span { font-size: .9375rem; }
.paper-cover > h3 { font-size: 1.5rem; }
.paper-about p, .sources-preview > p { font-size: 1.0625rem; line-height: 1.8; }
.sources-preview { margin-top: 6rem; padding-top: 3rem; }
.source-links { gap: .75rem 2rem; }
.source-links a { font-size: .9375rem; border-color: var(--line); }
.form-layout { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 5rem; }
.contact-form { gap: 1.5rem; }
.contact-form label { font-size: .9375rem; font-weight: 500; }
.contact-form input, .contact-form textarea, .contact-form select { border-color: var(--field-border); min-height: 52px; font-size: 1rem; padding: 13px 14px; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--placeholder); font-size: .9375rem; }
.contact-form .checkbox { font-weight: 400; }
.checkbox input { width: 20px; height: 20px; min-height: 20px; flex-shrink: 0; padding: 0; }
.contact-form small { font-size: .875rem; }
.form-notice { font-size: .875rem; line-height: 1.7; }
.form-status { font-size: .9375rem; }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }
.closing { padding-block: 4rem; }
.closing > div { max-width: 720px; margin-bottom: 3rem; }
.closing p, .closing details p { font-size: 1.0625rem; line-height: 1.8; }
.closing summary { font-size: 1.0625rem; }
.closing details a { font-size: 1rem; }
.site-footer { padding-block: 2.5rem; }
.site-footer nav { font-size: .9375rem; }
.site-footer > p { font-size: .8125rem; color: var(--muted); }
.reader-header { padding-block: 5rem 3rem; margin-bottom: 2rem; }
.reader-header h1 { max-width: 900px; font-size: clamp(2.5rem,4.6vw,4rem); }
.reader-header .actions { margin-top: 2rem; }
.reader-layout { grid-template-columns: 240px minmax(0,1fr); gap: 4rem; padding-block: 2.5rem 6rem; }
.reader-toc { top: 112px; max-height: calc(100dvh - 144px); font-size: .9375rem; line-height: 1.55; padding-right: 1.25rem; scrollbar-width: thin; }
.reader-toc a { padding-block: .625rem; border-bottom: 1px solid var(--line); }
.reader-toc summary { padding-bottom: .75rem; }
.reader-search { font-size: .8125rem; line-height: 1.6; margin-top: 1.25rem; }
.paper-body { max-width: 44rem; font-size: 1.1875rem; line-height: 1.85; }
.paper-body h2, .paper-body h3 { scroll-margin-top: 1.5rem; }
.paper-body p, .paper-body li { color: var(--muted); }
.paper-body h2 { font-size: 2.125rem; line-height: 1.25; margin-block: 4.5rem 1.75rem; text-wrap: pretty; }
.paper-body h3 { font-size: 1.5rem; line-height: 1.4; margin-block: 3rem 1.25rem; text-wrap: pretty; }
.paper-body table { font-size: 1rem; line-height: 1.7; }
.paper-body th, .paper-body td { padding: 1.25rem; }
.paper-body th { color: var(--text); }
.paper-body img { border: 1px solid var(--line); }
.table-scroll { margin-block: 2rem; scrollbar-width: thin; }
.version-note { padding: 1.25rem 1.5rem; background: var(--soft-accent); border-left-width: 1px; font-size: .9375rem; line-height: 1.7; }
.version-note a { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1100px) {
  :root { --page-gutter: 2rem; --section-space: 6rem; }
  .nav-wrap { gap: 1rem; }
  .site-header nav { gap: 1rem; font-size: .875rem; }
  .author { font-size: .9375rem; }
  .theme-toggle { padding-inline: 10px; }
  .hero { gap: 0 2rem; padding-top: 4.5rem; }
  .hero h1 { font-size: clamp(2.75rem,4.6vw,3.5rem); }
  .hero .expansion { font-size: 1.375rem; }
  .hero-description { font-size: 1.125rem; }
  .lap-workspace { padding: 2rem; gap: 2rem; }
  .lap-detail { padding-left: 2rem; }
  .cadence-chart, .cadence-reading { padding: 2rem; }
  .overlay-option { padding: 1.5rem; }
  .form-layout, .paper-grid { gap: 3rem; }
  .reader-layout { grid-template-columns: 200px minmax(0,1fr); gap: 2rem; }
}
@media (max-width: 900px) {
  .site-header nav { display: none; position: absolute; top: 88px; left: 0; right: 0; margin: 0; padding: 1rem var(--page-gutter); flex-direction: column; align-items: stretch; gap: .25rem; background: var(--panel); border-bottom: 1px solid var(--line); }
  .site-header nav.open { display: flex; }
  .site-header nav a { padding: .75rem; }
  .menu-button { display: block; order: 4; margin: 0; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; min-height: 44px; font-size: .875rem; }
  .theme-toggle { margin-left: auto; }
  .hero { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); }
  .hero h1 { font-size: 2.75rem; }
  .hero-strips > a { padding-inline: 1.25rem; flex-direction: column; }
  .lap-workspace { grid-template-columns: 1fr; gap: 2.5rem; padding: 2rem; }
  .lap-diagram { max-width: 400px; }
  .lap-detail { border-left: 0; border-top: 1px solid var(--line); padding: 2rem 0 0; min-height: 0; }
  .lap-node { width: 72px; }
  .brain { font-size: 1rem; }
  .brain small { max-width: 86px; font-size: .6875rem; }
  .cadence-display { grid-template-columns: 1fr; }
  .cadence-reading { border-top: 1px solid var(--line); }
  .values-list { gap: 0 2rem; }
  .route-grid article { padding: 2rem; }
  .form-layout { gap: 2.5rem; }
  .lifecycle-list summary { grid-template-columns: 32px 170px minmax(0,1fr) 20px; gap: 16px; }
}
@media (max-width: 760px) {
  :root { --page-gutter: 1.5rem; --section-space: 4.5rem; }
  html { scroll-padding-top: 6rem; }
  .nav-wrap { min-height: 76px; gap: .625rem; }
  .site-header nav { top: 76px; }
  .author { font-size: .8125rem; gap: 8px; }
  .theme-toggle { min-width: 44px; padding-inline: 11px; }
  .theme-toggle [data-theme-label] { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 3.5rem; }
  .hero h1 { font-size: clamp(2.5rem,8.3vw,3.5rem); line-height: 1.12; margin-bottom: 1.5rem; }
  .hero-description { font-size: 1.125rem; max-width: 34rem; }
  .hero .expansion { font-size: 1.375rem; }
  .wordmark span { font-size: .6875rem; margin-left: 8px; }
  .beta { font-size: .75rem; gap: 6px; margin-bottom: 1.5rem; }
  .beta a { margin-left: auto; }
  .hero .actions { gap: .75rem; }
  .button { font-size: .9375rem; padding: 14px 18px; }
  .hero-art { max-width: 460px; margin: 2.5rem 0 0; padding: 0; }
  .hero-art img { max-height: 300px; }
  .hero-art figcaption { font-size: .8125rem; margin-top: .75rem; }
  [data-laps-theme='light'] .hero-art { padding: 16px; }
  .hero-strips { margin-top: 3rem; padding: 0; }
  .hero-strips > a, .hero-strips > a:first-child { flex-direction: row; padding: 1.5rem 0; gap: 1rem; }
  .hero-strips small { font-size: .9375rem; }
  .section-heading { margin-bottom: 2.5rem; }
  .section-heading > p:last-child { font-size: 1.125rem; }
  .section-label { font-size: .75rem; }
  h2 { font-size: clamp(2rem,6.8vw,2.75rem); }
  .lap-workspace { grid-template-columns: 1fr; padding: 1.25rem 1.25rem 1.75rem; gap: 1.75rem; }
  .lap-diagram { max-width: 380px; }
  .lap-node { width: 78px; font-size: .8125rem; gap: 6px; }
  .lap-node b { width: 44px; height: 44px; }
  .brain { font-size: 1rem; }
  .brain small { max-width: 90px; font-size: .6875rem; }
  .lap-detail { border-left: 0; padding: 1.75rem 0 0; min-height: 0; }
  .lap-detail p { font-size: 1rem; }
  .lap-detail .lead { font-size: 1.125rem; }
  .lap-detail .step-output { font-size: .9375rem; }
  .explore-controls { gap: .5rem; font-size: .8125rem; }
  .text-button { font-size: .875rem; }
  .footnote { font-size: .875rem; }
  .segmented button { font-size: .9375rem; padding-inline: 12px; }
  .cadence-chart, .cadence-reading { padding: 1.5rem; }
  .timeline-label { font-size: .75rem; gap: 1rem; }
  .timeline-row { grid-template-columns: 75px minmax(0,1fr) 24px; gap: 10px; font-size: .8125rem; }
  .ticks { gap: 3px; }
  .cadence-reading > p:last-child { font-size: 1rem; }
  .overlay-option { padding: 1.5rem; grid-template-columns: 42px minmax(0,1fr); gap: .625rem 1.25rem; min-height: 0; }
  .big-letter { font-size: 2.5rem; margin: 0; }
  .overlay-title { font-size: 1.5rem; }
  .overlay-option > span:not(.big-letter):not(.overlay-title) { font-size: 1rem; }
  .overlay-option small { font-size: .6875rem; }
  .values-list h3 { font-size: 1.375rem; }
  .values-list p, .overlay-result ul { font-size: 1rem; }
  .lifecycle-list summary { grid-template-columns: 28px minmax(0,1fr) 20px; gap: 8px 12px; padding-block: 1.5rem; }
  .lifecycle-list summary h3 { font-size: 1.25rem; }
  .lifecycle-list summary p { font-size: .9375rem; line-height: 1.6; }
  .stage-body { padding: 0 0 1.5rem 40px; font-size: 1rem; }
  .route-grid article { padding: 1.75rem 1.5rem; }
  .route-grid p, .route-grid li { font-size: 1rem; }
  .paper-grid { grid-template-columns: 1fr; gap: 3rem; }
  .paper-about p { font-size: 1rem; }
  .sources-preview { margin-top: 4rem; }
  .source-links a { font-size: .875rem; }
  .form-layout { grid-template-columns: 1fr; gap: 1rem; }
  .contact-form label { font-size: .9375rem; }
  .contact-form input, .contact-form textarea, .contact-form select { font-size: 1rem; }
  .form-row { gap: 1rem; }
  .closing { padding-block: 3rem; }
  .closing h3 { font-size: 1.625rem; }
  .closing p, .closing details p { font-size: 1rem; }
  .site-footer nav { gap: .5rem 1.25rem; }
  .site-footer > p { font-size: .75rem; }
  .reader-header { padding-block: 3.5rem 2rem; margin-bottom: 1.5rem; }
  .reader-header h1 { font-size: 2.5rem; }
  .reader-layout { display: block; padding-block: 1rem 4rem; }
  .reader-toc { position: static; max-height: none; padding: 1rem 0; margin-bottom: 2rem; font-size: .9375rem; }
  .reader-toc a { padding-block: .75rem; }
  .reader-progress { top: 76px; }
  .paper-body { font-size: 1.125rem; line-height: 1.85; }
  .paper-body h2 { font-size: 1.875rem; margin-top: 3.5rem; }
  .paper-body h3 { font-size: 1.375rem; margin-top: 2.5rem; }
  .paper-body table { font-size: .9375rem; }
  .paper-body th, .paper-body td { padding: 1rem; }
  .version-note { padding: 1rem 1.25rem; font-size: .875rem; }
}
@media (max-width: 480px) {
  .hero .actions .button, .reader-header .actions .button { width: 100%; }
  .explore-controls { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; }
  .explore-controls > span { grid-column: 1 / -1; order: -1; text-align: center; }
  .explore-controls .text-button { white-space: nowrap; padding-inline: 0; }
  .explore-controls .text-button:first-child { justify-self: start; }
  .explore-controls .text-button:last-child { justify-self: end; }
}
@media (max-width: 380px) {
  :root { --page-gutter: 1.25rem; }
  .author span { max-width: 110px; white-space: normal; line-height: 1.35; }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.375rem; }
  .lap-workspace { padding-inline: 1rem; }
  .brain { font-size: .875rem; }
  .brain small { font-size: .625rem; max-width: 74px; }
  .timeline-row { grid-template-columns: 65px minmax(0,1fr) 22px; }
  .timeline-label { flex-direction: column; gap: .25rem; }
  .timeline-label span:last-child { max-width: none; text-align: left; }
}
@media print {
  :root, :root[data-laps-theme='light'], :root[data-laps-theme='dark'] { --bg: #fff; --panel: #f4f4f4; --text: #111; --muted: #333; --gold: #655014; --line: #bbb; }
  .theme-toggle { display: none; }
  .reader-layout { display: block; padding: 0; }
  .container { padding: 0; }
  .paper-body { max-width: none; font-size: 10pt; }
  .paper-body h2 { font-size: 18pt; }
  .paper-body h3 { font-size: 14pt; }
  .paper-body table { font-size: 8pt; min-width: 0; }
  .table-scroll { overflow: visible; }
  .reader-header h1 { font-size: 30pt; }
}
