/* Detail pass: the existing page remains the source of structure and content. */
:root {
  --polish-radius: 16px;
  --polish-ease: cubic-bezier(.23, 1, .32, 1);
  --polish-shadow: 0 10px 30px #20263a09;
}
html[data-theme=dark] {
  --paper: #141a23;
  --surface: #1b2430;
  --ink: #e9edf2;
  --muted: #aab4c2;
  --faint: #8d9aaa;
  --line: #303b4b;
  --accent: #8bb8e8;
  --accent-soft: #25364b;
  --note: #1b2430;
}

html { scrollbar-gutter: stable; }
body { transition: background-color 180ms ease, color 180ms ease; }
.site-header { border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.reading-progress { background: transparent; }
.header-inner { height: 82px; }
.wordmark { letter-spacing: -.065em; }
.site-nav { gap: 30px; }
.site-nav a { text-underline-offset: 6px; }

/* One dominant statement; the signal is a working instrument beside it. */
.intro {
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 74px);
  align-items: center;
  padding-block: 42px 68px;
}
.intro-copy { min-width: 0; }
.intro .intro-copy > .hero-eyebrow {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .09em;
}
.intro .intro-copy h1 {
  margin: 0;
  font-size: clamp(66px, 6.5vw, 94px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -.065em;
}
.intro .intro-copy h1 > span { display: block; color: var(--ink); }
.intro .intro-copy h1 > .hero-accent { color: var(--accent); }
.intro .intro-copy > .hero-description {
  max-width: 29em;
  margin-top: 27px;
  font-size: 16px;
  line-height: 1.95;
  color: var(--muted);
}
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px 24px; margin-top: 25px; }
.hero-actions .intro-link { margin: 0; font-size: 13px; gap: 8px; }
.intro .intro-copy > .hero-footnote { margin-top: 20px; font-size: 12px; color: var(--muted); letter-spacing: .02em; }

.signal-panel {
  --signal-blue: #a2c5f0;
  --signal-copper: #e3b780;
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'toolbar toolbar' 'heading heading' 'graph graph' 'axis axis' 'control control' 'meta actions' 'note note' 'feedback feedback';
  padding: 22px 24px 20px;
  border: 1px solid #364051;
  border-radius: 22px;
  color: #e9edf2;
  background: radial-gradient(ellipse at 75% 0%, #293b524d, transparent 68%), #19212d;
  box-shadow: 0 18px 44px #15203813, inset 0 1px 0 #ffffff05;
  isolation: isolate;
}
html[data-theme=dark] .signal-panel { background-color: #1b2430; border-color: #354154; box-shadow: 0 18px 44px #070d171f, inset 0 1px 0 #ffffff05; }
.signal-toolbar { grid-area: toolbar; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.signal-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .13em; color: #a7b8ce; }
.signal-kicker .status-dot { width: 5px; height: 5px; background: var(--signal-copper); box-shadow: 0 0 9px #e3b78025; }
.signal-panel .signal-pause { width: 34px; height: 34px; min-height: 34px; color: #aabbd0; border-color: #3b475b; }
.signal-pause svg { width: 15px; height: 15px; }
.signal-panel h2 { grid-area: heading; margin: 14px 0 12px; max-width: 22em; font-size: 19px; letter-spacing: -.025em; line-height: 1.5; font-weight: 500; }
.signal-graph { grid-area: graph; min-width: 0; margin: 0 -5px; }
.signal-graph svg { width: 100%; height: auto; aspect-ratio: 420 / 170; overflow: hidden; }
.signal-graph pattern path, .signal-graph pattern line { stroke: #9aacc11a; stroke-width: .7; }
.signal-graph .wave-grid { fill: url(#signal-grid); stroke: #9aacc11a; stroke-width: .7; }
.wave-path { fill: none; stroke: var(--signal-blue); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.wave-glow { fill: none; stroke: #8dbcf1; stroke-width: 9; opacity: .075; animation: signal-breathe 4.8s ease-in-out infinite; }
.scan-marker { color: var(--signal-copper); transform: translateX(16px); animation: signal-scan 6s linear infinite; }
.scan-marker line { stroke: currentColor; stroke-width: .8; opacity: .45; }
.scan-marker circle { fill: currentColor; stroke: none; }
.signal-axis { position: relative; height: 15px; color: #8d9eb4; font-size: 10px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.signal-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.signal-axis span:nth-child(1) { left: 3.8095%; }
.signal-axis span:nth-child(2) { left: 34.6032%; }
.signal-axis span:nth-child(3) { left: 65.3968%; }
.signal-axis span:nth-child(4) { left: 96.1905%; }
.signal-control { grid-area: control; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; margin-top: 18px; font-size: 12px; }
.signal-control label { color: #c6d0df; }
.signal-control label span { margin-left: 8px; color: #a1b0c3; font-size: 11px; }
.signal-control output span { margin-left: 2px; font-size: 12px; }
.signal-control output { color: var(--signal-blue); font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 600; }
.signal-control input[type=range] { grid-column: 1 / -1; appearance: none; -webkit-appearance: none; width: 100%; height: 28px; margin: 0; padding: 0; background: transparent; cursor: pointer; accent-color: var(--signal-blue); border-radius: 8px; }
.signal-control input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, var(--signal-blue) 0%, var(--signal-blue) var(--duty, 35%), #445168 var(--duty, 35%), #445168 100%); }
.signal-control input[type=range]::-moz-range-track { height: 3px; border-radius: 3px; background: #445168; }
.signal-control input[type=range]::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--signal-blue); }
.signal-control input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 17px; height: 17px; margin-top: -7px; border: 3px solid #a2c5f0; border-radius: 50%; background: #e4efff; box-shadow: 0 0 0 4px #a2c5f00d; transition: box-shadow 140ms ease, transform 140ms var(--polish-ease); }
.signal-control input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid #a2c5f0; border-radius: 50%; background: #e4efff; box-shadow: 0 0 0 4px #a2c5f00d; }
.signal-control input[type=range]:active::-webkit-slider-thumb { transform: scale(1.08); box-shadow: 0 0 0 6px #a2c5f012; }
.signal-control input[type=range]:focus-visible { outline: 2px solid var(--signal-blue); outline-offset: 3px; }
.signal-meta { grid-area: meta; min-width: 0; align-self: center; display: flex; flex-direction: column; gap: 3px; margin-top: 10px; color: #a1b0c3; font-size: 11px; line-height: 1.6; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.signal-actions { grid-area: actions; display: flex; align-self: center; align-items: center; gap: 7px; margin-top: 10px; }
.signal-actions button { min-height: 36px; padding: 5px 10px; border: 1px solid #425168; border-radius: 7px; background: #ffffff05; color: #d7e1f0; font-size: 12px; line-height: 1.5; transition: background-color 140ms ease, border-color 140ms ease, transform 140ms var(--polish-ease); }
.signal-note { grid-area: note; margin-top: 14px; padding-top: 11px; border-top: 1px solid #ffffff0d; font-size: 11px; line-height: 1.75; color: #98a8bd; }
#signal-feedback { grid-area: feedback; display: block; min-height: 20px; margin-top: 5px; font-size: 11px; color: var(--signal-copper); line-height: 1.6; }
.signal-copy-fallback { grid-column: 1 / -1; width: 100%; min-height: 90px; margin-top: 8px; padding: 10px; border: 1px solid #6a819f; border-radius: 8px; background: #141a23; color: #e9edf2; font: inherit; font-size: 12px; line-height: 1.7; resize: vertical; }
.signal-copy-fallback:focus-visible { outline: 2px solid var(--signal-blue); outline-offset: 3px; }
.signal-copy[data-state=success] { border-color: #a2c5f0; }
.signal-copy[data-state=error] { border-color: #e3b780; }
.signal-panel.is-paused .scan-marker, .signal-panel.is-paused .wave-glow { animation-play-state: paused; }
.signal-panel.is-static .scan-marker, .signal-panel.is-static .wave-glow { animation: none; }
.signal-panel.is-static .scan-marker { transform: translateX(152px); opacity: .4; }
@keyframes signal-scan { from { transform: translateX(16px); } to { transform: translateX(404px); } }
@keyframes signal-breathe { 0%, 100% { opacity: .05; } 50% { opacity: .115; } }

/* Shared controls: feedback belongs to the thing that can actually be used. */
.button { min-height: 48px; gap: 19px; border-radius: 10px; padding: 12px 19px; transition: transform 140ms var(--polish-ease), background-color 140ms ease, box-shadow 180ms ease, border-color 140ms ease; }
.primary { box-shadow: 0 3px 8px #3455dc14; }
html[data-theme=dark] .primary { background: #8bb8e8; color: #112235; box-shadow: 0 3px 8px #00000015; }
html[data-theme=dark] .primary:hover { background: #a4c9ef; }
.button:active { transform: translateY(1px); box-shadow: none; }
.icon-button { transition: background-color 140ms ease, border-color 140ms ease, transform 140ms var(--polish-ease); }
.icon-button:active { transform: scale(.94); background: var(--note); }
.text-button { gap: 16px; border-radius: 6px; transition: color 140ms ease, transform 140ms var(--polish-ease); }
.text-button:active, .intro-link:active, .subtle-link:active { transform: translateY(1px); }
.view-switch { border-radius: 10px; box-shadow: 0 1px 4px #25354d08; }
.view-switch button { border-radius: 7px; transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms var(--polish-ease); }
.view-switch button[aria-pressed=true] { box-shadow: 0 1px 5px #25354d12; }
.view-switch button:active { transform: scale(.97); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.signal-panel button:focus-visible { outline-color: var(--signal-blue); }
.signal-panel .signal-pause:active, .signal-actions button:active { background: #ffffff0f; transform: scale(.97); }
button:disabled, button[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.button:disabled, .icon-button:disabled { transform: none; }

.section-heading { margin-bottom: 27px; }
.section-heading h2 { line-height: 1.5; }
.project-heading { padding-top: 12px; }
.project-heading h3 { line-height: 1.35; letter-spacing: -.045em; margin-bottom: 20px; }
.project-summary { line-height: 1.9; }
.project-specs { margin-block: 23px 25px; row-gap: 10px; }
.project-specs dt { line-height: 1.7; }
.project-specs dd { min-width: 0; line-height: 1.7; overflow-wrap: anywhere; }
.project-stage, .epaper-stage { border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: var(--polish-shadow); transition: transform 200ms var(--polish-ease), box-shadow 200ms ease, border-color 200ms ease; }
.project-stage:focus-within { border-color: var(--accent); }
.robot-stage figcaption, .epaper-stage figcaption { border-top: 1px solid #26354c0a; font-size: 13px; letter-spacing: .015em; }
.secondary-project { padding-top: 44px; padding-bottom: 54px; }
.epaper-description h3 { line-height: 1.45; letter-spacing: -.045em; }
.practice-section { padding-block: 78px; }
.tool-row { gap: 22px; }
.tool-row svg { width: 30px; height: 30px; }
.tool-row h3 { line-height: 1.6; }
.learning-note { border-radius: var(--polish-radius); box-shadow: inset 0 1px 0 #ffffff08; }
.method-list summary { border-radius: 7px; transition: color 140ms ease, background-color 140ms ease; }
.detail-body { max-width: 39em; }
.about-copy p { max-width: 35em; }
.site-footer { padding-block: 26px; }

.project-dialog { border-radius: 20px; box-shadow: 0 24px 90px #0b132944; opacity: 0; transform: translateY(8px); transition: opacity 180ms ease, transform 220ms var(--polish-ease), display 220ms allow-discrete, overlay 220ms allow-discrete; }
.project-dialog[open] { opacity: 1; transform: translateY(0); }
.project-dialog::backdrop { background: #11182775; }
.dialog-inner { padding: 26px 38px 36px; }
.project-dialog h2 { max-width: 20em; line-height: 1.45; text-wrap: balance; }
.project-dialog #dialog-summary { max-width: 39em; }
.dialog-specs { gap: 12px 16px; border-radius: 11px; }
.dialog-specs dd { min-width: 0; overflow-wrap: anywhere; }
.dialog-section { margin-top: 28px; }
.roadmap { gap: 20px; }
@starting-style { .project-dialog[open] { opacity: 0; transform: translateY(8px); } }

/* JS only arms these after the observer is available; content is visible by default. */
.reveal-ready { opacity: 0; transform: translateY(8px); transition: opacity 260ms ease, transform 300ms var(--polish-ease); }
.reveal-ready.is-revealed { opacity: 1; transform: translateY(0); }

.image-fallback { display: flex; flex: 1; flex-direction: column; gap: 8px; align-items: center; justify-content: center; min-height: 200px; padding: 35px; color: #536177; text-align: center; font-size: 14px; line-height: 1.8; background: linear-gradient(135deg, #e4e9f1, #f3f5f8); }
.image-fallback svg { width: 64px; height: 64px; margin-bottom: 8px; }
.image-fallback span { font-size: 12px; }
.image-fallback[hidden], .image-fallback.hidden { display: none; }
.image-error img { display: none; }
.epaper-stage.image-error .image-fallback { height: 100%; }
.site-feedback { position: fixed; z-index: 20; bottom: 26px; left: 50%; padding: 10px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 32px #00000018; color: var(--ink); font-size: 13px; pointer-events: none; opacity: 0; transform: translate(-50%, 6px); transition: opacity 160ms ease, transform 180ms var(--polish-ease); }
.site-feedback.is-visible { opacity: 1; transform: translate(-50%, 0); }
html[data-input-mode=keyboard] .project-dialog { transition: none; }

@media (hover: hover) and (pointer: fine) {
  .primary:hover { transform: translateY(-1px); box-shadow: 0 5px 12px #3455dc24; }
  .primary:active { transform: translateY(1px); box-shadow: none; }
  .icon-button:hover { border-color: var(--line); }
  .signal-panel .signal-pause:hover, .signal-actions button:hover { border-color: #6a819f; background: #ffffff0b; }
  .signal-control input[type=range]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 5px #a2c5f016; }
  .project-stage:hover, .epaper-stage:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); box-shadow: 0 13px 32px #20263a0e; }
  .view-switch button:not([aria-pressed=true]):hover { background: #ffffff55; }
  .method-list summary:hover { color: var(--accent); }
}

@media (max-width: 1080px) and (min-width: 761px) {
  .intro { gap: 32px; padding-block: 32px 56px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .intro .intro-copy h1 { font-size: clamp(59px, 7vw, 76px); }
  .intro .intro-copy > .hero-description { font-size: 15px; }
  .hero-actions { gap: 8px 14px; }
  .signal-panel { padding: 19px 18px; border-radius: 18px; }
  .signal-panel h2 { font-size: 17px; margin-top: 11px; }
  .signal-kicker { font-size: 9px; letter-spacing: .08em; }
  .signal-actions { gap: 5px; }
  .signal-actions button { padding-inline: 8px; }
  .signal-panel { grid-template-areas: 'toolbar toolbar' 'heading heading' 'graph graph' 'axis axis' 'control control' 'meta meta' 'actions actions' 'note note' 'feedback feedback'; }
}

@media (max-width: 760px) {
  .header-inner { height: 74px; }
  .site-nav { display: flex; visibility: hidden; pointer-events: none; opacity: 0; transform: translateY(-6px); transition: opacity 150ms ease, transform 180ms var(--polish-ease), visibility 0s 180ms; }
  .site-nav.is-open { visibility: visible; pointer-events: auto; opacity: 1; transform: translateY(0); transition-delay: 0s; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 31px; padding-block: 31px 46px; }
  .intro .intro-copy > .hero-eyebrow { margin-bottom: 18px; font-size: 12px; }
  .intro .intro-copy h1 { font-size: clamp(62px, 13.5vw, 82px); line-height: 1.12; letter-spacing: -.06em; }
  .intro .intro-copy > .hero-description { max-width: 31em; margin-top: 22px; font-size: 15px; line-height: 1.9; }
  .hero-actions { margin-top: 22px; gap: 11px 19px; }
  .intro .intro-copy > .hero-footnote { margin-top: 16px; font-size: 11px; }
  .signal-panel { max-width: 540px; width: 100%; justify-self: center; border-radius: 18px; padding: 18px; }
  .signal-panel h2 { font-size: 18px; margin-top: 12px; }
  .signal-kicker { font-size: 9px; }
  .signal-control { margin-top: 15px; }
  .signal-control input[type=range] { height: 36px; }
  .signal-panel .signal-pause { width: 44px; height: 44px; }
  .signal-actions button { min-height: 44px; padding-inline: 11px; font-size: 12px; }
  .signal-meta { font-size: 10px; }
  .signal-note { font-size: 11px; }
  .robot-stage .image-fallback { aspect-ratio: 3 / 2; }
  .signal-panel { grid-template-areas: 'toolbar toolbar' 'heading heading' 'graph graph' 'axis axis' 'control control' 'meta meta' 'actions actions' 'note note' 'feedback feedback'; }
  .section-heading { margin-bottom: 20px; }
  .project-heading { padding-top: 0; }
  .project-heading h3 { margin-bottom: 0; font-size: clamp(24px, 6vw, 30px); }
  .project-stage, .epaper-stage { border-radius: 14px; }
  .project-specs { margin-block: 21px 23px; gap: 10px; }
  .secondary-project { padding-block: 32px 39px; margin-top: 32px; }
  .practice-section { padding-block: 43px; }
  .tool-row { gap: 18px; }
  .dialog-inner { padding: 20px 23px 28px; }
  .project-dialog { border-radius: 16px; }
  .dialog-specs { grid-template-columns: 83px minmax(0, 1fr); gap: 10px 12px; }
  .site-footer { padding-block: 21px; }
}

@media (max-width: 360px) {
  .signal-panel { padding: 15px; }
  .signal-panel h2 { font-size: 16px; }
  .signal-actions { gap: 5px; }
  .signal-actions button { padding-inline: 8px; font-size: 11px; }
  .signal-meta { font-size: 9px; }
  .intro .intro-copy h1 { font-size: 61px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready, .reveal-ready.is-revealed { opacity: 1; transform: none; }
  .scan-marker { transform: translateX(152px); opacity: .4; }
  .project-stage:hover, .epaper-stage:hover, .button:hover, .button:active, .icon-button:active, .view-switch button:active { transform: none; }
}
