:root {
  color-scheme: dark;
  --bg: #090d0b;
  --panel: #121814;
  --panel-2: #19211c;
  --line: #334037;
  --text: #f6f8f1;
  --muted: #aab5ad;
  --lime: #d7ff4f;
  --cyan: #72ead7;
  --orange: #ff9a65;
  --red: #ff7165;
  --ink: #11150f;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 4%, #1a2b22 0, transparent 31rem),
    radial-gradient(circle at 8% 35%, #14231e 0, transparent 24rem),
    var(--bg);
  color: var(--text);
}
body:has(dialog[open]) { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed; z-index: 100; top: -5rem; left: 1rem;
  padding: .75rem 1rem; border-radius: .65rem; background: var(--lime); color: var(--ink);
}
.skip-link:focus { top: 1rem; }

.notes-header {
  position: sticky; z-index: 30; top: 0; min-height: 74px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid #ffffff18; background: #090d0be8; backdrop-filter: blur(18px);
}
.notes-brand { display: inline-flex; align-items: center; gap: .8rem; }
.brand-mark {
  width: 2.5rem; aspect-ratio: 1; display: grid; place-items: center;
  border-radius: .72rem; background: var(--lime); color: var(--ink); font-weight: 950;
}
.notes-brand strong, .notes-brand small { display: block; }
.notes-brand strong { font-size: .95rem; }
.notes-brand small { margin-top: .12rem; color: var(--muted); font-size: .55rem; letter-spacing: .18em; }
.notes-header nav { display: flex; gap: .35rem; }
.notes-header nav a {
  padding: .55rem .72rem; border: 1px solid transparent; border-radius: 99rem;
  color: var(--muted); font-size: .72rem;
}
.notes-header nav a:hover, .notes-header nav a:focus-visible { border-color: var(--line); color: var(--text); outline: none; }

main { width: min(1480px, calc(100% - 2.4rem)); margin: 0 auto; }
.eyebrow { margin: 0 0 .9rem; color: var(--lime); font-size: .66rem; font-weight: 900; letter-spacing: .2em; }

.notes-hero {
  min-height: 650px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(28rem, .8fr);
  gap: clamp(2rem, 7vw, 7rem); align-items: center; padding: clamp(4rem, 8vw, 8rem) 0 4rem;
}
.hero-copy h1 { max-width: 15ch; margin: 0; font-size: clamp(3rem, 6vw, 6.2rem); line-height: .94; letter-spacing: -.065em; }
.hero-copy h1 span { display: block; color: var(--lime); }
.hero-lead { max-width: 48rem; margin: 1.6rem 0 0; color: var(--muted); font-size: clamp(.95rem, 1.5vw, 1.12rem); line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 2rem; }
.hero-actions a { padding: .82rem 1.05rem; border: 1px solid var(--line); border-radius: 99rem; font-size: .78rem; font-weight: 850; }
.hero-actions .primary-action { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.hero-actions a:hover, .hero-actions a:focus-visible { border-color: var(--cyan); outline: none; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin: 2.2rem 0 0; }
.hero-stats div { min-width: 6rem; }
.hero-stats dt { color: var(--text); font-size: 1.55rem; font-weight: 950; }
.hero-stats dd { margin: .25rem 0 0; color: var(--muted); font-size: .7rem; }

.hero-board {
  position: relative; overflow: hidden; padding: clamp(1.4rem, 4vw, 2.8rem);
  border: 1px solid #536458; border-radius: 1.4rem;
  background: linear-gradient(145deg, #17211b, #0d120f 72%); box-shadow: 0 30px 80px #0007;
}
.hero-board::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2;
  background-image: linear-gradient(#fff1 1px, transparent 1px), linear-gradient(90deg, #fff1 1px, transparent 1px);
  background-size: 32px 32px;
}
.board-label { position: relative; color: var(--cyan); font-size: .65rem; font-weight: 900; letter-spacing: .16em; }
.hero-board ol { position: relative; display: grid; gap: .75rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.hero-board li { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; background: #0a0f0cdd; }
.hero-board li b { display: grid; place-items: center; width: 2.4rem; aspect-ratio: 1; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: .72rem; }
.hero-board li span { font-size: .9rem; font-weight: 850; }
.hero-board p { position: relative; margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.7; }

.safety-banner {
  display: grid; grid-template-columns: 13rem 1fr; gap: 1.5rem; margin-bottom: 6rem; padding: 1.25rem 1.4rem;
  border: 1px solid #ff9a6555; border-left: 4px solid var(--orange); border-radius: .9rem; background: #ff9a650a;
}
.safety-banner strong { color: var(--orange); font-size: .8rem; }
.safety-banner p { margin: 0; color: #d9dfd9; font-size: .77rem; line-height: 1.75; }

.chapter-directory { scroll-margin-top: 95px; padding-bottom: 6rem; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(18rem, .42fr); gap: 2rem; align-items: end; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4.5vw, 4rem); letter-spacing: -.055em; }
.chapter-search { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .65rem; padding: .72rem .9rem; border: 1px solid var(--line); border-radius: .8rem; background: #0c110e; }
.chapter-search span { color: var(--cyan); font-size: .68rem; font-weight: 850; }
.chapter-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .78rem; }
.chapter-search input::placeholder { color: #758077; }
.chapter-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-top: 2rem; }
.chapter-cards a { min-height: 8.5rem; display: flex; align-items: flex-start; gap: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: .9rem; background: linear-gradient(145deg, #151d18, #0c110e); transition: transform .2s ease, border-color .2s ease; }
.chapter-cards a:hover, .chapter-cards a:focus-visible { transform: translateY(-3px); border-color: var(--lime); outline: none; }
.chapter-cards b { color: var(--lime); font-size: .72rem; }
.chapter-cards span { font-size: .88rem; font-weight: 900; }
.chapter-cards small { display: block; margin-top: .45rem; color: var(--muted); font-size: .65rem; font-weight: 500; line-height: 1.55; }
.chapter-cards a[hidden] { display: none; }

.notes-layout { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 3rem); align-items: start; }
.chapter-rail { position: sticky; top: 94px; display: grid; gap: .25rem; padding: .9rem; border: 1px solid var(--line); border-radius: 1rem; background: #0c110eed; backdrop-filter: blur(14px); }
.chapter-rail > p { margin: .2rem .45rem .7rem; color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .12em; }
.chapter-rail a { display: flex; align-items: center; gap: .55rem; padding: .62rem .7rem; border: 1px solid transparent; border-radius: .65rem; color: var(--muted); font-size: .7rem; }
.chapter-rail a span { color: #6f7a72; font-size: .58rem; font-weight: 900; }
.chapter-rail a.active { border-color: #d7ff4f55; background: #d7ff4f10; color: var(--text); }
.chapter-rail a.active span { color: var(--lime); }
.rail-progress { overflow: hidden; height: .28rem; margin-top: .7rem; border-radius: 99rem; background: #263029; }
.rail-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lime), var(--cyan)); transition: width .25s ease; }

.chapter-stack { display: grid; gap: 2rem; }
#posture { order: 1; } #mirrors { order: 2; } #wide-bay { order: 3; } #narrow-bay { order: 4; } #parallel-parking { order: 5; } #parallel-exit { order: 6; } #overtake { order: 7; } #road-awareness { order: 8; }
.note-chapter { scroll-margin-top: 94px; padding: clamp(1.2rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: 1.2rem; background: linear-gradient(150deg, #131a16, #0d120f); }
.note-chapter[hidden] { display: none; }
.chapter-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.chapter-title > div { display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; }
.chapter-title span { grid-row: 1 / 3; align-self: center; color: var(--lime); font-size: 1.75rem; font-weight: 950; }
.chapter-title p { margin: .15rem 0 .35rem; color: var(--cyan); font-size: .58rem; font-weight: 900; letter-spacing: .16em; }
.chapter-title h2 { grid-column: 2; margin: 0; font-size: clamp(1.35rem, 2.6vw, 2.25rem); letter-spacing: -.035em; }
.chapter-title button { flex: 0 0 auto; padding: .58rem .75rem; border: 1px solid var(--line); border-radius: 99rem; background: transparent; color: var(--muted); font-size: .65rem; }
.chapter-title button.is-complete { border-color: var(--lime); background: var(--lime); color: var(--ink); font-weight: 900; }
.chapter-grid { display: grid; grid-template-columns: minmax(19rem, .72fr) minmax(0, 1.28fr); gap: 1rem; align-items: start; }
.note-panel { padding: 1.1rem; border: 1px solid var(--line); border-radius: .85rem; background: #0b100d; }
.note-panel h3 { margin: 0 0 1rem; color: var(--lime); font-size: .72rem; letter-spacing: .08em; }
.numbered-notes { display: grid; gap: .72rem; margin: 0; padding: 0; list-style: none; counter-reset: notes; }
.numbered-notes li { position: relative; display: grid; gap: .28rem; padding: .8rem .8rem .8rem 2.85rem; border-radius: .7rem; background: #ffffff06; counter-increment: notes; }
.numbered-notes li::before { content: counter(notes, decimal-leading-zero); position: absolute; top: .76rem; left: .72rem; color: var(--lime); font-size: .65rem; font-weight: 950; }
.numbered-notes b { font-size: .76rem; }
.numbered-notes span { color: var(--muted); font-size: .7rem; line-height: 1.7; }
.numbered-notes.compact { gap: .52rem; }
.numbered-notes.compact li { padding-top: .68rem; padding-bottom: .68rem; }
.raw-phrase { margin: 0 0 .85rem; padding: .75rem; border-left: 3px solid var(--cyan); background: #72ead70a; color: #d5e9e4; font-size: .7rem; }
.coach-note { margin-top: 1rem; padding: .9rem; border: 1px solid #72ead733; border-left: 3px solid var(--cyan); border-radius: .7rem; background: #72ead709; }
.coach-note.warning { border-color: #ff9a6544; border-left-color: var(--orange); background: #ff9a6508; }
.coach-note strong { display: block; margin-bottom: .35rem; color: var(--cyan); font-size: .68rem; }
.coach-note.warning strong { color: var(--orange); }
.coach-note p { margin: 0; color: #d9e0da; font-size: .69rem; line-height: 1.7; }

.image-gallery { display: grid; gap: .75rem; }
.image-gallery.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.image-gallery.three-up { width: min(62%, 34rem); grid-template-columns: minmax(0, 1fr); justify-self: start; }
.image-gallery figure { overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: .85rem; background: #080c0a; }
.image-button { width: 100%; padding: 0; border: 0; background: #050806; }
.image-button img { width: 100%; height: auto; object-fit: contain; transition: transform .25s ease, filter .25s ease; }
.image-button:hover img, .image-button:focus-visible img { transform: scale(1.025); filter: brightness(1.08); }
.image-button:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }
.image-gallery figcaption { min-height: 3.2rem; padding: .7rem .8rem; color: var(--muted); font-size: .65rem; line-height: 1.5; }
.image-gallery figcaption b { margin-right: .35rem; color: var(--lime); }
.wide-bay-detail { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.wide-bay-detail > header { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(15rem, .9fr); gap: 1.2rem; align-items: end; }
.wide-bay-detail > header .eyebrow { grid-column: 1 / -1; margin-bottom: -.7rem; }
.wide-bay-detail > header h3 { margin: 0; max-width: 37rem; font-size: clamp(1.3rem, 2.7vw, 2rem); line-height: 1.16; }
.wide-bay-detail > header > p:last-child { margin: 0; color: var(--muted); font-size: .72rem; }
.wide-direction-guide { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1.1rem; }
.wide-direction-guide article { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: .65rem; align-items: center; padding: .9rem; border: 1px solid var(--line); border-radius: .8rem; background: #090d0b; }
.wide-direction-guide span { grid-column: 1 / -1; color: var(--cyan); font-size: .62rem; font-weight: 950; }
.wide-direction-guide b { font-size: .72rem; }
.wide-direction-guide i { color: var(--lime); font-style: normal; font-weight: 950; }
.wide-direction-guide small { grid-column: 1 / -1; color: var(--muted); font-size: .62rem; }
.mirror-term { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; margin: .75rem 0 1rem; padding: .85rem 1rem; border-left: 3px solid var(--lime); border-radius: .55rem; background: #d7ff5109; }
.mirror-term b { color: var(--lime); font-size: .75rem; }
.mirror-term p { margin: 0; color: #cbd4ce; font-size: .68rem; }
.wide-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.wide-case { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: #0a0f0c; }
.wide-case.case-one { border-top: 3px solid var(--orange); }
.wide-case.case-two { border-top: 3px solid var(--cyan); }
.case-heading { display: flex; align-items: center; gap: .7rem; padding: .85rem; }
.case-heading > span { flex: 0 0 auto; padding: .25rem .48rem; border-radius: 999px; background: var(--lime); color: #10130f; font-size: .58rem; font-weight: 950; }
.case-heading b, .case-heading small { display: block; }
.case-heading b { font-size: .85rem; }
.case-heading small { color: var(--muted); font-size: .61rem; }
.wide-case figure { border-right: 0; border-left: 0; border-radius: 0; }
.wide-case .image-button img { aspect-ratio: 2800 / 1264; }
.case-body { padding: 1rem; }
.case-body h4 { margin-bottom: .3rem; color: var(--cyan); font-size: .78rem; }
.case-body > p { color: var(--muted); font-size: .67rem; }
.case-body ol { display: grid; gap: .45rem; margin: .8rem 0; padding: 0; list-style: none; }
.case-body li { display: grid; grid-template-columns: 1.55rem 1fr; gap: .55rem; padding: .65rem; border: 1px solid #ffffff0d; border-radius: .58rem; background: #ffffff04; }
.case-body li > i { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: #26332c; color: var(--lime); font-style: normal; font-size: .56rem; font-weight: 950; }
.case-body li b, .case-body li span { display: block; }
.case-body li b { font-size: .7rem; }
.case-body li span { color: var(--muted); font-size: .63rem; }
.case-body .case-stop { margin: 0; padding: .7rem; border: 1px solid #ff9a6540; border-radius: .6rem; background: #ff9a6508; color: #e6c0aa; }
.case-body .case-stop b { color: var(--orange); }
.wide-scan-rhythm { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: .55rem; align-items: stretch; margin-top: .9rem; padding: .8rem; border-radius: .8rem; background: #070a08; }
.wide-scan-rhythm > div { padding: .65rem; border: 1px solid var(--line); border-radius: .6rem; }
.wide-scan-rhythm > i { align-self: center; color: var(--lime); font-style: normal; }
.wide-scan-rhythm span, .wide-scan-rhythm b { display: block; }
.wide-scan-rhythm span { color: var(--cyan); font-size: .55rem; font-weight: 950; }
.wide-scan-rhythm b { margin-top: .2rem; font-size: .7rem; }
.wide-scan-rhythm p { margin: .18rem 0 0; color: var(--muted); font-size: .59rem; }
.narrow-bay-detail { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.narrow-bay-detail > header { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(16rem, .85fr); gap: 1.2rem; align-items: end; }
.narrow-bay-detail > header .eyebrow { grid-column: 1 / -1; margin-bottom: -.7rem; }
.narrow-bay-detail > header h3 { margin: 0; max-width: 42rem; font-size: clamp(1.3rem, 2.7vw, 2rem); line-height: 1.16; }
.narrow-bay-detail > header > p:last-child { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.7; }
.narrow-entry-reference { display: grid; grid-template-columns: minmax(17rem, .78fr) minmax(0, 1.22fr); gap: 1rem; margin-top: 1.1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #090e0b; }
.detail-kicker { display: block; margin-bottom: .35rem; color: var(--cyan); font-size: .59rem; font-weight: 950; letter-spacing: .08em; }
.narrow-reference-copy h4, .narrow-exit-heading h4 { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.detail-steps { display: grid; gap: .55rem; margin: .85rem 0; padding: 0; list-style: none; }
.detail-steps li { display: grid; grid-template-columns: 1.65rem 1fr; gap: .6rem; align-items: start; }
.detail-steps i { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: 50%; background: var(--lime); color: #0a0d0a; font-style: normal; font-size: .62rem; font-weight: 950; }
.detail-steps b, .detail-steps span { display: block; }
.detail-steps b { font-size: .7rem; }
.detail-steps span { margin-top: .15rem; color: var(--muted); font-size: .63rem; line-height: 1.55; }
.reference-limit { margin: 0; padding: .72rem; border-left: 3px solid var(--orange); border-radius: .5rem; background: #ff9a6509; color: #d9d1ca; font-size: .63rem; line-height: 1.6; }
.reference-limit b { color: var(--orange); }
.narrow-reference-image .image-button img, .narrow-exit-grid .image-button img { aspect-ratio: 2800 / 1264; }
.narrow-angle-reference { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(16rem, .8fr); gap: 1rem; align-items: center; margin-top: .8rem; padding: 1rem; border: 1px solid #d7ff5133; border-radius: 1rem; background: #d7ff5106; }
.narrow-angle-reference .image-button img { aspect-ratio: 2800 / 1264; }
.narrow-angle-reference h4 { margin: 0; font-size: 1rem; line-height: 1.35; }
.narrow-angle-reference p { margin: .5rem 0; color: var(--muted); font-size: .66rem; line-height: 1.65; }
.narrow-angle-reference ul { display: grid; gap: .42rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.narrow-angle-reference li { padding: .55rem .65rem; border-left: 2px solid var(--lime); background: #070a08; color: var(--muted); font-size: .63rem; line-height: 1.55; }
.narrow-angle-reference li b { color: var(--lime); }
.adjustment-gate { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .8rem; }
.adjustment-gate article { padding: .9rem; border: 1px solid var(--line); border-radius: .8rem; background: #080c0a; }
.adjustment-gate .gate-stop { border-top: 3px solid #ff6b64; }
.adjustment-gate .gate-go { border-top: 3px solid var(--lime); }
.adjustment-gate span { display: block; margin-bottom: .35rem; font-size: .58rem; font-weight: 950; }
.gate-stop span { color: #ff817b; }
.gate-go span { color: var(--lime); }
.adjustment-gate h4 { margin: 0; font-size: .78rem; }
.adjustment-gate p { margin: .35rem 0 0; color: var(--muted); font-size: .64rem; line-height: 1.6; }
.narrow-exit-detail { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #090e0b; }
.narrow-exit-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, .78fr); gap: 1rem; align-items: end; }
.narrow-exit-heading > p { margin: 0; color: var(--muted); font-size: .65rem; line-height: 1.65; }
.narrow-exit-heading > p b { color: var(--lime); }
.narrow-exit-flow { display: flex; overflow-x: auto; gap: .42rem; align-items: center; margin: .9rem 0; padding: .7rem; border-radius: .75rem; background: #050806; scrollbar-width: thin; }
.narrow-exit-flow span { flex: 0 0 auto; padding: .48rem .58rem; border: 1px solid #ffffff17; border-radius: .55rem; color: #dbe5de; font-size: .6rem; font-weight: 800; }
.narrow-exit-flow i { flex: 0 0 auto; color: var(--lime); font-style: normal; }
.narrow-exit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.narrow-exit-grid figcaption { min-height: 5.1rem; }
.narrow-exit-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.narrow-exit-checks li { padding: .8rem; border: 1px solid #ffffff12; border-radius: .7rem; background: #ffffff04; }
.narrow-exit-checks span, .narrow-exit-checks b { display: block; }
.narrow-exit-checks span { color: var(--cyan); font-size: .56rem; font-weight: 950; }
.narrow-exit-checks b { margin-top: .2rem; font-size: .7rem; }
.narrow-exit-checks p { margin: .35rem 0 0; color: var(--muted); font-size: .61rem; line-height: 1.6; }
.parallel-scenarios { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.parallel-scenarios > header { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(16rem, .88fr); gap: 1.2rem; align-items: end; }
.parallel-scenarios > header .eyebrow { grid-column: 1 / -1; margin-bottom: -.7rem; }
.parallel-scenarios > header h3 { margin: 0; max-width: 42rem; font-size: clamp(1.3rem, 2.7vw, 2rem); line-height: 1.16; }
.parallel-scenarios > header > p:last-child { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.7; }
.parallel-scenario-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; margin: 1rem 0; }
.parallel-scenario-nav a { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: center; padding: .65rem; border: 1px solid var(--line); border-radius: .65rem; background: #080c0a; color: var(--text); }
.parallel-scenario-nav b { color: var(--lime); font-size: .6rem; }
.parallel-scenario-nav span { font-size: .64rem; font-weight: 850; }
.parallel-scenario { scroll-margin-top: 135px; margin-top: .85rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #090e0b; }
.parallel-scenario-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: center; margin-bottom: .8rem; }
.parallel-scenario-heading > span { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: .8rem; background: var(--lime); color: #0b0e0b; font-size: .62rem; font-weight: 950; }
.parallel-scenario-heading p, .parallel-scenario-heading h4 { margin: 0; }
.parallel-scenario-heading p { color: var(--cyan); font-size: .54rem; font-weight: 950; letter-spacing: .1em; }
.parallel-scenario-heading h4 { margin-top: .18rem; font-size: 1rem; line-height: 1.3; }
.parallel-scenario-heading small { color: var(--muted); font-size: .6rem; }
.parallel-case-summary > p { margin: .7rem 0 0; color: var(--muted); font-size: .66rem; line-height: 1.65; }
.parallel-mini-flow { display: flex; overflow-x: auto; gap: .4rem; align-items: center; padding: .7rem; border-radius: .7rem; background: #050806; scrollbar-width: thin; }
.parallel-mini-flow span { flex: 0 0 auto; padding: .45rem .55rem; border: 1px solid #ffffff17; border-radius: .5rem; font-size: .59rem; font-weight: 800; }
.parallel-mini-flow i { flex: 0 0 auto; color: var(--lime); font-style: normal; }
.parallel-step-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: .8rem 0; padding: 0; list-style: none; }
.parallel-step-list li { display: grid; grid-template-columns: 1.65rem 1fr; gap: .6rem; padding: .72rem; border: 1px solid #ffffff12; border-radius: .65rem; background: #ffffff04; }
.parallel-step-list i { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #26332c; color: var(--lime); font-style: normal; font-size: .58rem; font-weight: 950; }
.parallel-step-list b, .parallel-step-list span { display: block; }
.parallel-step-list b { font-size: .7rem; }
.parallel-step-list span { margin-top: .2rem; color: var(--muted); font-size: .62rem; line-height: 1.6; }
.parallel-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.parallel-story-grid .image-button img, .parallel-two-grid .image-button img { aspect-ratio: 2800 / 1264; }
.parallel-two-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.parallel-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: .75rem; }
.parallel-choice div { padding: .75rem; border-left: 3px solid var(--cyan); border-radius: .6rem; background: #72ead709; }
.parallel-choice b { color: var(--cyan); font-size: .68rem; }
.parallel-choice p { margin: .25rem 0 0; color: var(--muted); font-size: .62rem; line-height: 1.6; }
.parallel-narrow-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; gap: .45rem; align-items: stretch; margin: .85rem 0; }
.parallel-narrow-flow article { padding: .7rem; border: 1px solid var(--line); border-radius: .65rem; background: #050806; }
.parallel-narrow-flow > i { align-self: center; color: var(--lime); font-style: normal; }
.parallel-narrow-flow span, .parallel-narrow-flow b { display: block; }
.parallel-narrow-flow span { color: var(--cyan); font-size: .54rem; font-weight: 950; }
.parallel-narrow-flow b { margin-top: .18rem; font-size: .67rem; }
.parallel-narrow-flow p { margin: .25rem 0 0; color: var(--muted); font-size: .58rem; line-height: 1.55; }
.parallel-direction-note { display: grid; grid-template-columns: auto 1fr; gap: .55rem; margin-bottom: .8rem; padding: .7rem; border-left: 3px solid var(--lime); border-radius: .55rem; background: #d7ff5108; font-size: .64rem; }
.parallel-direction-note b { color: var(--lime); }
.parallel-direction-note span { color: var(--muted); }
.parallel-case5-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.parallel-case5-grid .image-button img { aspect-ratio: 525 / 285; }
.parallel-case5-grid figcaption { min-height: 4.6rem; }
.parallel-case5-finish { margin-top: .85rem; padding: .9rem; border: 1px solid #72ead73b; border-radius: .85rem; background: #72ead706; }
.parallel-case5-finish > header { display: grid; grid-template-columns: auto 1fr; gap: .4rem .7rem; align-items: center; }
.parallel-case5-finish > header span { grid-row: 1 / 3; padding: .45rem .55rem; border-radius: .55rem; background: var(--cyan); color: #07100e; font-size: .58rem; font-weight: 950; }
.parallel-case5-finish h5 { margin: 0; font-size: .86rem; }
.parallel-case5-finish > header p { margin: 0; color: var(--muted); font-size: .61rem; }
.parallel-finish-layout { display: grid; grid-template-columns: minmax(17rem, .8fr) minmax(0, 1.2fr); gap: .8rem; margin-top: .8rem; }
.parallel-finish-layout ol { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.parallel-finish-layout li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .55rem; padding: .65rem; border: 1px solid #ffffff12; border-radius: .62rem; background: #050806; }
.parallel-finish-layout li i { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--lime); color: #0a0d0a; font-style: normal; font-size: .58rem; font-weight: 950; }
.parallel-finish-layout li b, .parallel-finish-layout li span { display: block; }
.parallel-finish-layout li b { font-size: .68rem; }
.parallel-finish-layout li span { margin-top: .18rem; color: var(--muted); font-size: .61rem; line-height: 1.58; }
.parallel-finish-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.parallel-finish-images .image-button img { aspect-ratio: 2800 / 1264; }
.parallel-final-steer { display: grid; grid-template-columns: auto 1fr auto auto 1fr auto; gap: .55rem; align-items: center; margin-top: .75rem; padding: .7rem; border-radius: .65rem; background: #050806; }
.parallel-final-steer span { color: var(--cyan); font-size: .58rem; font-weight: 950; }
.parallel-final-steer b { font-size: .67rem; }
.parallel-final-steer i { color: var(--lime); font-style: normal; }
.parallel-final-steer em { color: var(--lime); font-size: .6rem; font-style: normal; font-weight: 850; }
.source-row { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid #ffffff12; color: var(--muted); font-size: .64rem; }
.source-row a { color: var(--cyan); }
.source-row a:hover, .source-row a:focus-visible { color: var(--lime); outline: none; }

.mirror-ratios { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.mirror-ratios div { display: grid; gap: .32rem; padding: .85rem; border: 1px solid var(--line); border-radius: .7rem; background: #ffffff05; }
.mirror-ratios b { color: var(--muted); font-size: .64rem; }
.mirror-ratios strong { color: var(--lime); font-size: .86rem; }
.mirror-ratios span { color: var(--muted); font-size: .62rem; line-height: 1.5; }

.source-note { display: grid; grid-template-columns: minmax(13rem, .45fr) 1fr; gap: 3rem; margin: 6rem 0; padding: clamp(1.4rem, 4vw, 2.6rem); border: 1px solid var(--line); border-radius: 1.2rem; background: #121814; }
.source-note h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.05em; }
.source-note p { margin: 0 0 .85rem; color: var(--muted); font-size: .75rem; line-height: 1.8; }
.source-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.source-links a { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 99rem; color: var(--cyan); font-size: .65rem; }

.notes-footer { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 4rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }

.image-dialog { width: min(1180px, calc(100% - 1rem)); max-height: 94vh; padding: 0; border: 1px solid #56665b; border-radius: 1rem; background: #070a08; color: var(--text); box-shadow: 0 30px 100px #000e; }
.image-dialog::backdrop { background: #000d; backdrop-filter: blur(8px); }
.image-dialog figure { display: grid; place-items: center; gap: .8rem; margin: 0; padding: 1rem 4rem 1.2rem; }
.image-dialog img { max-width: 100%; max-height: calc(94vh - 5rem); object-fit: contain; }
.image-dialog figcaption { color: var(--muted); font-size: .72rem; }
.dialog-close, .dialog-nav { position: fixed; z-index: 2; border: 1px solid #ffffff33; background: #080c0ae8; color: var(--text); }
.dialog-close { top: .75rem; right: .75rem; width: 2.5rem; aspect-ratio: 1; border-radius: 50%; font-size: 1.25rem; }
.dialog-nav { top: 50%; width: 2.8rem; aspect-ratio: 1; border-radius: 50%; transform: translateY(-50%); }
.dialog-nav.previous { left: .65rem; }
.dialog-nav.next { right: .65rem; }

@media (max-width: 1180px) {
  .chapter-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  main { width: min(100% - 1.2rem, 760px); }
  .notes-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 4rem; }
  .hero-copy h1 { max-width: 17ch; }
  .section-heading, .source-note { grid-template-columns: 1fr; }
  .chapter-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes-layout { display: block; }
  .chapter-rail { position: sticky; z-index: 20; top: 74px; display: flex; overflow-x: auto; margin-bottom: 1rem; padding: .55rem; border-radius: .75rem; scrollbar-width: thin; }
  .chapter-rail > p, .chapter-rail .rail-progress { display: none; }
  .chapter-rail a { flex: 0 0 auto; white-space: nowrap; }
  .source-note { gap: 1rem; }
  .chapter-grid { grid-template-columns: 1fr; }
  .image-gallery.two-up { grid-template-columns: 1fr; }
  .image-gallery.three-up { width: 100%; }
  .wide-bay-detail > header, .wide-direction-guide, .wide-case-grid, .narrow-bay-detail > header, .narrow-entry-reference, .narrow-angle-reference, .adjustment-gate, .narrow-exit-heading, .parallel-scenarios > header { grid-template-columns: 1fr; }
  .wide-bay-detail > header .eyebrow { grid-column: 1; margin-bottom: 0; }
  .narrow-bay-detail > header .eyebrow { grid-column: 1; margin-bottom: 0; }
  .narrow-exit-grid { grid-template-columns: 1fr; }
  .narrow-exit-checks { grid-template-columns: 1fr; }
  .parallel-scenarios > header .eyebrow { grid-column: 1; margin-bottom: 0; }
  .parallel-scenario-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parallel-narrow-flow { grid-template-columns: 1fr 1fr; }
  .parallel-narrow-flow > i { display: none; }
  .parallel-finish-layout { grid-template-columns: 1fr; }
  .wide-scan-rhythm { grid-template-columns: 1fr 1fr; }
  .wide-scan-rhythm > i { display: none; }
}

@media (max-width: 600px) {
  .notes-header { min-height: 64px; }
  .notes-brand strong { font-size: .82rem; }
  .notes-header nav a:nth-child(2) { display: none; }
  .notes-header nav a { padding: .45rem .5rem; font-size: .64rem; }
  .notes-hero { padding-top: 3rem; }
  .hero-copy h1 { font-size: clamp(2.55rem, 13vw, 4.2rem); }
  .hero-stats { gap: 1.15rem; }
  .hero-board { padding: 1rem; }
  .safety-banner { grid-template-columns: 1fr; gap: .55rem; margin-bottom: 4rem; }
  .chapter-directory { padding-bottom: 4rem; }
  .chapter-cards { grid-template-columns: 1fr; }
  .chapter-cards a { min-height: auto; }
  .chapter-rail { top: 64px; }
  .note-chapter { padding: 1rem; }
  .chapter-title { display: grid; }
  .chapter-title button { justify-self: start; }
  .chapter-title > div { column-gap: .55rem; }
  .chapter-title span { font-size: 1.25rem; }
  .mirror-term { grid-template-columns: 1fr; gap: .35rem; }
  .wide-direction-guide article { grid-template-columns: 1fr; }
  .wide-direction-guide i { transform: rotate(90deg); justify-self: start; }
  .wide-scan-rhythm { grid-template-columns: 1fr; }
  .narrow-entry-reference, .narrow-exit-detail { padding: .75rem; }
  .parallel-step-list, .parallel-story-grid, .parallel-two-grid, .parallel-choice, .parallel-case5-grid, .parallel-narrow-flow { grid-template-columns: 1fr; }
  .parallel-scenario { padding: .75rem; }
  .parallel-scenario-heading { grid-template-columns: auto 1fr; }
  .parallel-scenario-heading small { grid-column: 1 / -1; }
  .parallel-scenario-nav { grid-template-columns: 1fr; }
  .parallel-direction-note { grid-template-columns: 1fr; }
  .parallel-finish-images, .parallel-final-steer { grid-template-columns: 1fr; }
  .parallel-case5-finish > header { grid-template-columns: 1fr; }
  .parallel-case5-finish > header span { grid-row: auto; justify-self: start; }
  .mirror-ratios { grid-template-columns: 1fr; }
  .source-row { flex-direction: column; }
  .image-dialog figure { padding: 3.6rem .5rem 1rem; }
  .dialog-nav { top: auto; bottom: .8rem; transform: none; }
  .notes-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
