/* devdelight.com · v5 · "one night, one case, one method"
   Display + body: SF through the system stack (never embedded). Code, labels, the >_ caret: Berkeley Mono by local() → JetBrains Mono.
   Night from the cold open to dawn. Phosphor green is the only saturated colour. */

@font-face { font-family: "Berkeley Mono"; src: local("TX-02"), local("Berkeley Mono"), local("BerkeleyMono-Regular"); font-display: swap; }

:root {
  --black: #050605; --night: #0b0d0c; --ink: #f5f5f7; --muted: rgba(245,245,247,.62); --dim: rgba(245,245,247,.6);
  --green: #37f08a; --hair: rgba(255,255,255,.1);
  --bg-light: #f5f5f7; --surface-light: #ffffff; --ink-light: #1d1d1f; --muted-light: #6e6e73; --accent-light: #0a7a3d; --hair-light: rgba(0,0,0,.1);
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "Berkeley Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-ui: cubic-bezier(.4, 0, .6, 1); --ease-in: cubic-bezier(.16, 1, .3, 1);
  --pill: 980px; --gutter: 24px; --maxw: 1200px; --pad: 128px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--black); }
body { margin: 0; background: var(--black); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 25px; letter-spacing: -0.022em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, ul, ol { margin: 0; padding: 0; }
button, input { font: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.mono { font-family: var(--mono); letter-spacing: 0; }
.display { font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; }
.h1 { font-size: clamp(52px, 8vw, 112px); }
.h2 { font-size: clamp(40px, 6vw, 80px); letter-spacing: -0.028em; line-height: 1.04; }
.lead { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.38; letter-spacing: -0.012em; color: var(--muted); max-width: 36ch; }
.lead-big { font-size: clamp(26px, 3vw, 40px); line-height: 1.22; color: var(--ink); max-width: 24ch; letter-spacing: -0.022em; font-weight: 500; }
.eyebrow { font-size: 13px; line-height: 20px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.dim { color: var(--dim); }
.chev::after { content: "\00a0›"; }
.link { color: var(--green); font-size: 17px; display: inline-flex; align-items: center; min-height: 44px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-height: 44px; padding: 10px 22px; border-radius: var(--pill); background: var(--green); color: #050605; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; border: 0; cursor: pointer; transition: transform 120ms var(--ease-ui), filter 160ms var(--ease-ui); }
.pill:hover { filter: brightness(1.06); }
.pill:active { transform: scale(.97); }
.pill-lg { min-height: 52px; padding: 14px 30px; font-size: 19px; }
.pill-caret { animation: blink 1.06s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }

/* nav: hides on scroll down, returns on scroll up */
.gn { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 44px; background: rgba(0,0,0,.8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); transition: transform 360ms var(--ease-ui); }
.gn.is-hidden { transform: translateY(-100%); }
.gn .wrap { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.gn-brand { font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; height: 44px; }
.gn-links { display: flex; gap: 4px; }
.gn-links a { display: inline-flex; align-items: center; height: 44px; padding: 0 12px; font-size: 13px; opacity: .85; }

/* the caret: one persistent guide in the margin */
.caret { position: fixed; z-index: 40; left: max(14px, calc((100vw - var(--maxw)) / 2 - 56px)); top: 0; font-size: 15px; color: var(--green); pointer-events: none; will-change: transform, opacity; text-shadow: 0 0 12px rgba(55,240,138,.6); }
.caret span { animation: blink 1.06s steps(1) infinite; }

.scene { position: relative; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.grain { position: absolute; inset: 0; background: url("img/grain.png") repeat; background-size: 160px 160px; opacity: .05; mix-blend-mode: screen; pointer-events: none; z-index: 2; }

/* 1 · hero: headline, then the MacBook. apple.com/macbook-pro: black, one product, crisp type. Not pinned. */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: clamp(28px, 5vh, 60px); padding-top: calc(44px + max(32px, 7vh)); padding-bottom: 4vh; background: #000; overflow: hidden; }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; will-change: transform, opacity; }
.hero-h1 { font-size: clamp(48px, 7.2vw, 100px); letter-spacing: -0.03em; line-height: 1.02; }
.hero-sub { font-size: clamp(19px, 2vw, 28px); line-height: 1.3; letter-spacing: -0.02em; color: rgba(245,245,247,.86); }
.hero-brand { color: var(--green); margin-bottom: 6px; }
.hero-sub { max-width: 30ch; }
.ctas { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.hero-mbp { width: min(82vw, 1040px, 124svh, calc((100svh - 360px) * 1.5)); margin-bottom: -1px; will-change: transform; }
.hero-lid { transform: rotateX(-64deg); transition: transform 1100ms cubic-bezier(.22, 1, .36, 1); }   /* starts nearly open so the photo paints at size straight away (LCP), then settles flat */
.hero.is-open .hero-lid { transform: rotateX(0deg); }
.hero-lid .mbp-still { object-fit: cover; }
#fall-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 600ms var(--ease-ui); }
.is-gl #fall-canvas { opacity: 1; }
.micro { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: enter 900ms var(--ease-in) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; } .hero-copy > :nth-child(3) { animation-delay: 160ms; } .hero-copy > :nth-child(4) { animation-delay: 240ms; }
  @keyframes enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .hero-lid { transition: none; transform: rotateX(0deg); } }
:root[data-theme="nagai"] .hero { background: transparent; color: #1b2a4a; }
:root[data-theme="nagai"] .hero-sub, :root[data-theme="nagai"] .hero .link { color: #1b2a4a; } :root[data-theme="nagai"] .hero-brand { color: #ff7a59; }

/* 2–3 · the fall */
.fall { height: 140vh; background: var(--black); }
.fall .stage { background: transparent; }
#fall-canvas { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%); }   /* the rain dissolves into the sections above and below */
.fall-still { position: absolute; inset: 0; margin: 0; padding: 60px 24px; white-space: pre; font-size: 15px; line-height: 21px; color: rgba(55,240,138,.22); overflow: hidden; }
.is-gl .fall-still { display: none; }
.beat { position: absolute; z-index: 3; left: 50%; top: 50%; width: min(100% - 2 * var(--gutter), 1000px); transform: translate(-50%, -50%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; opacity: 0; will-change: opacity, transform; pointer-events: none; }
.beat .lead { margin-inline: auto; }
.beat .h2 { text-shadow: 0 0 40px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.9); }
.tag { position: absolute; z-index: 3; left: 62%; top: 30%; padding: 8px 12px; border: 1px solid rgba(245,245,247,.5); color: rgba(245,245,247,.82); font-size: 13px; letter-spacing: .16em; opacity: 0; transform: rotate(-4deg); clip-path: polygon(0 0, 100% 0, 100% 58%, 72% 64%, 100% 70%, 100% 100%, 0 100%, 0 42%, 30% 37%, 0 30%); will-change: opacity, transform; }

/* 4 · TEACH panels: a horizontal track on desktop */
.method { background: var(--black); }
.method .stage { display: flex; align-items: center; }
.track { display: flex; gap: 14px; padding-inline: 8vw; will-change: transform; }
.panel { position: relative; flex: 0 0 auto; width: 74vw; max-width: 1100px; height: 76svh; overflow: hidden; background: #000; outline: 3px solid #000; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px rgba(0,0,0,.7); }
.panel-bg { position: absolute; inset: -6% -10%; background: var(--img) center / cover no-repeat; filter: blur(28px) brightness(.22); will-change: transform; }   /* ambient only: the photo itself is the print */
.panel-print { position: absolute; z-index: 1; left: 3.5%; top: 6%; bottom: 6%; width: 46%; display: flex; align-items: center; justify-content: center; will-change: transform; }
.panel-print img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; border: 3px solid #000; outline: 1px solid rgba(245,245,247,.16); box-shadow: 0 30px 60px rgba(0,0,0,.65); }   /* whole photo, framed, never cropped */
.letter { position: absolute; z-index: 0; left: 46%; bottom: -8%; opacity: .55; font-size: min(70svh, 38vw); line-height: .8; font-weight: 800; letter-spacing: -0.06em; color: transparent; background: var(--img) center / cover no-repeat; -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 1.5px rgba(245,245,247,.3); filter: brightness(1.75) contrast(1.15) drop-shadow(0 0 40px rgba(0,0,0,.7)); will-change: transform; }
.panel-copy { position: absolute; z-index: 2; right: 5%; top: 12%; width: min(44%, 460px); display: flex; flex-direction: column; gap: 14px; }
.panel-copy h3 { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -0.028em; }
.panel-copy .eyebrow { color: var(--green); }
.box { position: absolute; z-index: 2; right: 5%; bottom: 9%; max-width: min(44%, 360px); padding: 12px 14px; background: #f1ead9; color: #121212; font-size: 14px; line-height: 20px; box-shadow: 4px 4px 0 #000; }
.box::after { content: "_"; animation: blink 1.06s steps(1) infinite; margin-left: 2px; }

/* 5 · one full solve: an embedded video, not pinned, nothing scrubs */
.tape { padding-block: var(--pad); background: radial-gradient(60% 60% at 70% 50%, rgba(55,240,138,.07) 0%, rgba(55,240,138,0) 70%), var(--black); }
.tape-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 56px; align-items: center; }
.tape .h2 { font-size: clamp(36px, 4.4vw, 64px); }
.tape-copy { display: flex; flex-direction: column; gap: 22px; }
.monitor { margin: 0; }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 90px rgba(0,0,0,.7), 0 0 120px rgba(55,240,138,.08); }
.screen img, .screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.screen img { object-fit: cover; object-position: 10% 50%; }
.screen iframe { border: 0; }
.play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; background: linear-gradient(0deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,.05) 55%); }
.play-dot { display: grid; place-items: center; width: 84px; height: 84px; padding-left: 4px; border-radius: 50%; background: rgba(255,255,255,.94); box-shadow: 0 10px 40px rgba(0,0,0,.45); transition: transform 200ms var(--ease-out-strong); }
@media (hover: hover) and (pointer: fine) { .play:hover .play-dot { transform: scale(1.06); } }
.play:active .play-dot { transform: scale(.96); }
.play:focus-visible { outline: 3px solid var(--green); outline-offset: -6px; border-radius: 20px; }
.monitor figcaption { margin-top: 14px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

/* 6 · credits */
.credits { height: 140vh; background: var(--black); }
.credits .stage { display: grid; place-items: center; }
.credits-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-inline: var(--gutter); }
.credit-name { font-size: clamp(52px, min(10vw, 15svh), 150px); letter-spacing: -0.04em; line-height: .95; color: transparent; background: linear-gradient(100deg, rgba(245,245,247,.28) 0%, rgba(245,245,247,.28) calc(var(--sweep, 45%) - 14%), #fff var(--sweep, 45%), rgba(245,245,247,.28) calc(var(--sweep, 45%) + 14%), rgba(245,245,247,.28) 100%); -webkit-background-clip: text; background-clip: text; }
.shipped { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 30px; opacity: 0; will-change: opacity, transform; }
.marks { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 38px; max-width: 900px; }
.marks li { font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.03em; color: rgba(245,245,247,.6); }
.langs { margin-top: 26px; font-size: 13px; letter-spacing: .16em; color: var(--dim); }

/* 7 · the kit */
.kit { padding-block: var(--pad); background: var(--black); }
.kit .h2 { margin-top: 16px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 64px; }
.card-tag { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 0 0 24px; background: #0e100f; border: 1px solid rgba(255,255,255,.07); border-radius: 22px; overflow: hidden; transform: translate3d(0, 40px, 0) rotate(var(--r, 0deg)); opacity: 0; transition: transform 900ms var(--ease-in), opacity 700ms var(--ease-ui); }
.card-tag:nth-child(1) { --r: -1.2deg; } .card-tag:nth-child(2) { --r: .8deg; transition-delay: 120ms; } .card-tag:nth-child(3) { --r: -.6deg; transition-delay: 240ms; }
.card-tag.in { transform: rotate(var(--r)); opacity: 1; }
.card-tag picture { display: block; }
.card-tag img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; background: #050605; border-bottom: 1px solid rgba(255,255,255,.06); filter: saturate(.75); }   /* letterboxed: thumbnails and covers shown whole */
.card-tag .tagno, .card-tag h3, .card-tag p { padding-inline: 24px; }
.tagno { font-size: 12px; letter-spacing: .14em; color: var(--green); margin-top: 8px; }
.card-tag h3 { font-size: 24px; letter-spacing: -0.024em; line-height: 1.15; }
.card-tag p { color: var(--muted); font-size: 16px; line-height: 23px; }
.lever { margin-top: 6px; font-size: 11px !important; letter-spacing: .16em; text-transform: uppercase; color: var(--dim) !important; }
.total { margin-top: 72px; font-size: clamp(34px, 4.6vw, 64px); letter-spacing: -0.03em; }

/* 8 · risk */
.risk { padding-block: 200px; background: var(--black); text-align: center; }
.risk .wrap { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.risk .lead { max-width: 40ch; }

/* 2 · the list: the email form with the polaroid, right after the hero. Not pinned, nothing scrubs. */
.dawn { position: relative; padding-block: 64px var(--pad); background: radial-gradient(55% 60% at 30% 50%, rgba(55,240,138,.06) 0%, rgba(55,240,138,0) 70%), var(--black); }
.dawn .stage { position: relative; height: auto; display: grid; place-items: center; overflow: visible; }
.dawn-copy { position: relative; z-index: 3; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-inline: var(--gutter); }
.dawn-copy .h1 { text-shadow: none; }
.nl { display: flex; gap: 8px; width: min(100%, 460px); margin-top: 18px; }
.nl input[type="email"] { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: rgba(255,255,255,.12); color: var(--ink); font-size: 15px; }
.nl input::placeholder { color: rgba(245,245,247,.55); }
.btn-quiet { height: 44px; padding: 0 20px; border-radius: var(--pill); border: 0; background: var(--green); color: #050605; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: transform 120ms var(--ease-ui), filter 160ms var(--ease-ui); }
.btn-quiet:hover { filter: brightness(1.06); }
.btn-quiet:active { transform: scale(.97); }

/* footer */
.foot { background: var(--black); border-top: 1px solid var(--hair); padding: 40px 0 48px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 6px 28px; align-items: center; font-size: 13px; color: var(--dim); }
.foot-row a { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); }
.foot-row a:hover { color: var(--ink); }
.foot-strip { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--dim); }

/* legal pages reuse these */
.light { background: var(--bg-light); color: var(--ink-light); }
.white { background: var(--surface-light); color: var(--ink-light); }
.white .eyebrow, .light .eyebrow { color: var(--muted-light); }

/* phone */
@media (max-width: 900px) {
  :root { --gutter: 16px; --pad: 96px; }
  .caret { display: none; }   /* no room in a 16 px gutter: the caret would sit beside the copy */
  .hero { padding-top: calc(44px + 6vh); gap: 28px; }
  .hero-mbp { width: 96vw; }
  .ctas { gap: 4px 20px; }
  .fall { height: 150vh; }
  .tag { left: 50%; top: 22%; }
  .method .stage { position: relative; height: auto; display: block; padding-block: 24px; }
  .track { flex-direction: column; padding-inline: var(--gutter); gap: 16px; transform: none !important; }
  .panel { width: 100%; height: 88svh; }
  .panel-print { left: 5%; right: 5%; width: auto; top: 4%; bottom: auto; height: 44%; }
  .letter { font-size: 52vh; left: auto; right: -4%; bottom: -4%; }
  .panel-copy { left: 6%; right: 6%; width: auto; top: 52%; }
  .box { left: 6%; right: auto; max-width: 82%; bottom: 6%; }
  .tape-grid { grid-template-columns: 1fr; gap: 32px; }
  .play-dot { width: 68px; height: 68px; }
  .cards { grid-template-columns: 1fr; }
  .risk { padding-block: 140px; }
  .nl { flex-direction: column; }
}

/* reduced motion: stills, no pinning, everything readable */
@media (prefers-reduced-motion: reduce) {
  .gn, .pill, .card-tag, #rain, #fall-canvas, .play-dot { transition: none; }
  .pill-caret, .caret span, .box::after { animation: none; }
  .hero, .fall, .credits { height: auto; }
  .stage { position: relative; height: auto; min-height: 100svh; }
  .hero-copy { position: relative; left: auto; top: auto; transform: none; margin: 0 auto; padding-block: 18svh 16svh; }
  .fall .stage { display: flex; flex-direction: column; justify-content: center; gap: 72px; padding-block: 120px; }
  .beat, .tag { position: relative; left: auto; top: auto; bottom: auto; transform: none; opacity: 1; margin: 0 auto; }
  .method .stage { position: relative; height: auto; display: block; padding-block: 48px; }
  .track { flex-direction: column; align-items: center; transform: none !important; }
  .panel { width: min(100% - 32px, 1100px); }
  .shipped { opacity: 1; }
  .credits .stage { padding-block: 120px; }
  .card-tag { transform: none; opacity: 1; }
  .caret { display: none; }
}

/* ── The desk: three tilted screens (from v4). Clips are shown whole: 1280×666 frames in a 1280/666 box. ── */
.screens { padding-block: 160px 180px; background: var(--black); overflow: hidden; }
.screens .wrap { text-align: center; }
.monitors { position: relative; margin-top: 88px; display: grid; grid-template-columns: 1fr 1.18fr 1fr; gap: 8px; align-items: center; perspective: 1500px; perspective-origin: 50% 40%; }
.tscreen { position: relative; margin: 0; transform-style: preserve-3d; }
.tscreen video { display: block; width: 100%; aspect-ratio: 1280 / 666; object-fit: contain; border-radius: 14px; border: 2px solid #2a2d2b; background: #0b0d0c; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.tscreen::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -18%; height: 30%; background: radial-gradient(50% 50% at 50% 50%, rgba(55,240,138,.16) 0%, rgba(55,240,138,0) 70%); pointer-events: none; }
.tscreen:nth-child(1) { transform: rotateY(24deg) translateZ(-60px); }
.tscreen:nth-child(3) { transform: rotateY(-24deg) translateZ(-60px); }
.tscreen.center { transform: translateZ(30px); z-index: 1; }
.tscreen figcaption { margin-top: 14px; text-align: center; color: rgba(245,245,247,.5); }
@media (max-width: 900px) {
  .screens { padding-block: 96px 112px; }
  .monitors { grid-template-columns: 1fr; margin-top: 56px; perspective: none; gap: 40px; }
  .tscreen:nth-child(1), .tscreen:nth-child(3), .tscreen.center { transform: none; }
}

/* ── hero alternatives (?hero=desk | ?hero=code), see HERO-OPTIONS.md ── */
[data-hero="desk"] .plate { background: #050605; }   /* code: the photo plate stays underneath as the no-WebGL and reduced-motion still */
[data-hero="desk"] #rain { display: none; }
.hero-desk { position: absolute; inset: auto 0 0 0; top: 70svh; display: flex; justify-content: center; transform-origin: 50% 20%; will-change: transform, opacity; }
.hero-monitors { margin: 0; width: min(100% - 2 * var(--gutter), 1180px); }
.hero-monitors figcaption { display: none; }
[data-hero="code"] .hero-copy::before { content: ""; position: absolute; z-index: -1; inset: -12% -8%; background: radial-gradient(50% 50% at 50% 50%, rgba(5,6,5,.9) 0%, rgba(5,6,5,.6) 55%, rgba(5,6,5,0) 100%); }
@media (max-width: 900px) {
  .hero-desk { top: 66svh; }
  .hero-monitors { grid-template-columns: 1fr; width: calc(100% - 2 * var(--gutter)); }
  .hero-monitors .tscreen:not(.center) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hero-desk { position: relative; top: auto; padding-bottom: 12svh; } }

/* ── chapter counter: TEACH 01/05, then the proof chapters 01/03 (mono, right margin) ── */
.chap { position: fixed; z-index: 40; right: 28px; top: 50%; transform: translate3d(0, -50%, 0); font-size: 12px; letter-spacing: .14em; color: var(--dim); opacity: 0; transition: opacity 400ms var(--ease-ui); pointer-events: none; writing-mode: vertical-rl; }
.chap.on { opacity: 1; }
.chap-now { color: var(--green); }
@media (max-width: 900px) { .chap { writing-mode: horizontal-tb; top: auto; bottom: 16px; right: 16px; transform: none; padding: 6px 10px; border-radius: 999px; background: rgba(5,6,5,.72); } }


/* ── late scenes on pure-CSS scroll timelines (off the main thread); the JS engine drives them where unsupported ── */
@property --sweep { syntax: '<percentage>'; inherits: true; initial-value: 45%; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .credits { view-timeline: --credits block; }
    .credit-name { animation: dd-sweep linear both; animation-timeline: --credits; animation-range: contain 0% contain 100%; }
    .shipped { animation: dd-rise linear both; animation-timeline: --credits; animation-range: contain 45% contain 65%; }
    .card-tag { transition: none; animation: dd-card linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
    .card-tag:nth-child(2) { animation-range: entry 16% cover 36%; }
    .card-tag:nth-child(3) { animation-range: entry 22% cover 42%; }
    #monitors { view-timeline: --mon block; }
    #monitors .tscreen { animation: linear both; animation-timeline: --mon; animation-range: cover 0% cover 100%; }
    #monitors .tscreen:nth-child(1) { animation-name: dd-tl; }
    #monitors .tscreen:nth-child(2) { animation-name: dd-tc; }
    #monitors .tscreen:nth-child(3) { animation-name: dd-tr; }
    @media (max-width: 900px) { #monitors .tscreen:nth-child(1), #monitors .tscreen:nth-child(3) { animation-name: dd-ts; } #monitors .tscreen:nth-child(2) { animation-name: dd-tsc; } }
  }
}
@keyframes dd-sweep { from { --sweep: -20%; } to { --sweep: 120%; } }
@keyframes dd-rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes dd-rise24 { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }
@keyframes dd-card { from { opacity: 0; transform: translate3d(0, 40px, 0) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes dd-tl { from { transform: rotateY(29deg) translate3d(0, 15px, -60px); } to { transform: rotateY(19deg) translate3d(0, -15px, -60px); } }
@keyframes dd-tc { from { transform: translate3d(0, 32px, 30px); } to { transform: translate3d(0, -32px, 30px); } }
@keyframes dd-tr { from { transform: rotateY(-29deg) translate3d(0, 15px, -60px); } to { transform: rotateY(-19deg) translate3d(0, -15px, -60px); } }
@keyframes dd-ts { from { transform: translate3d(0, 12px, 0); } to { transform: translate3d(0, -12px, 0); } }
@keyframes dd-tsc { from { transform: translate3d(0, 20px, 0); } to { transform: translate3d(0, -20px, 0); } }
@media (prefers-reduced-motion: reduce) { .chap { display: none; } }

/* hero: his name big, the role + tagline as a quieter second line */
.hero-h1 .hero-h1-sub { display: block; margin-top: .35em; font-size: .3em; line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; color: rgba(245,245,247,.86); }
.nl-hero { margin-top: 2px; }

/* his code in his editor colours (nvim thematrix: luisiacc/the-matrix.nvim), highlighted at build time with Shiki */
.panel-code { position: absolute; z-index: 2; right: 5%; bottom: 8%; width: min(44%, 540px); margin: 0; border-radius: 10px; overflow: hidden; background: #101010; border: 1px solid rgba(0,255,0,.18); box-shadow: 0 30px 60px rgba(0,0,0,.6), 0 0 40px rgba(0,255,0,.06); }
.panel-code figcaption { padding: 8px 14px; font-size: 11px; letter-spacing: .04em; color: #6e8c6e; background: #050505; border-bottom: 1px solid rgba(0,255,0,.12); }
.panel-code pre { margin: 0; padding: 12px 14px 14px; overflow-x: auto; font-family: var(--mono); font-size: 12px; line-height: 19px; counter-reset: ln 53; }
.panel-code .line::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 2.2em; margin-right: 1em; text-align: right; color: #545854; }
@media (max-width: 900px) { .panel-code { left: 6%; right: 6%; width: auto; bottom: 5%; } .panel-code pre { font-size: 11px; line-height: 17px; } }
/* never cut his code: long lines wrap under the code column, numbers stay in the gutter */
.panel-code { width: min(46%, 600px); }
.panel-code pre { overflow-x: visible; white-space: pre-wrap; }
.panel-code .line { display: block; padding-left: 3.2em; text-indent: -3.2em; overflow-wrap: anywhere; }
.panel-code .line::before { text-indent: 0; }
.panel-code figcaption { line-height: 16px; overflow-wrap: anywhere; }
@media (max-width: 900px) { .panel-code { width: auto; } .panel-code figcaption { font-size: 10px; } }
@media (max-width: 900px) { .panel-print { height: 36%; } .panel-copy { top: 42%; } }   /* room for the code window under the headline */
.alumni { margin-top: 6px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* qualifications: names row, five results, one quiet line */
.marks { max-width: 1100px; }
.wins { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; max-width: 720px; text-align: left; }
.wins li { position: relative; padding-left: 26px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.4; color: rgba(245,245,247,.86); }
.wins li::before { content: ">_"; position: absolute; left: 0; top: .1em; font-family: var(--mono); font-size: .72em; color: var(--green); }
.quals { margin-top: 18px; font-size: 12px; line-height: 20px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); max-width: 760px; }
@media (max-width: 900px) { .credits { height: auto; } .credits .stage { position: relative; height: auto; padding-block: 96px; } .shipped { opacity: 1 !important; transform: none !important; animation: none !important; } }

/* the contact scene: a Max Payne panel (him at the laptop, in the rain) beside the form */
.dawn-grid { position: relative; z-index: 3; width: min(100% - 2 * var(--gutter), 1180px); display: grid; grid-template-columns: 5fr 6fr; gap: 64px; align-items: center; }
.dawn-grid .dawn-copy { padding-inline: 0; }
.noir-panel { position: relative; margin: 0; aspect-ratio: 4 / 5; max-height: 76svh; justify-self: end; width: 100%; max-width: 520px; background: #050605; overflow: hidden;
  border: 6px solid #000; outline: 1px solid rgba(245,245,247,.16); box-shadow: 0 40px 90px rgba(0,0,0,.75); transform: rotate(-1.2deg); }
.noir-panel img, .noir-panel canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.noir-panel canvas { opacity: 0; transition: opacity 700ms var(--ease-ui); }
.noir-panel.is-gl canvas { opacity: 1; }
.noir-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: .35;
  background: radial-gradient(circle, rgba(0,0,0,.55) 0.9px, transparent 1.3px) 0 0 / 4px 4px; }   /* halftone, comic print */
@media (max-width: 900px) {
  .dawn-grid { grid-template-columns: 1fr; gap: 40px; }
  .noir-panel { justify-self: center; max-width: 340px; }
}
@media (max-width: 900px) { .dawn { padding-block: 96px; } .dawn-copy { align-items: center; text-align: center; } }

.dawn-grid .h1 { font-size: clamp(44px, 5vw, 76px); }
.nl-status { min-height: 20px; margin-top: -6px; font-size: 12px; letter-spacing: .06em; color: var(--green); }
.nl-status.err { color: #ffb4a8; }
.nl.is-done input, .nl.is-done button { opacity: .5; pointer-events: none; }

/* ── the evidence board: his map in a Max Payne pinboard ── */
.credits { height: auto; }
.credits .stage { position: relative; height: auto; padding-block: 140px 120px; }
.shipped { opacity: 1 !important; transform: none !important; animation: none !important; width: 100%; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.board { position: relative; width: min(100vw - 2 * var(--gutter), 1180px); height: min(72svh, 720px); margin: 26px auto 8px; background: #0b0c0b;
  border: 10px solid #15110d; outline: 1px solid rgba(245,245,247,.12); box-shadow: inset 0 0 0 1px #000, 0 50px 100px rgba(0,0,0,.7); }
.board-map { position: absolute; inset: 7% 21%; background: #0d100f url("img/board-map.webp") center / cover no-repeat; filter: saturate(.55) contrast(1.08); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 18px 40px rgba(0,0,0,.6); }
.board-map::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 70% at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%); }
.board-map .maplibregl-ctrl-attrib { font-size: 9px; }
.board-strings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.board-strings path { fill: none; stroke: #c1121f; stroke-width: 1.6; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.board-pins { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.pin { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff6b6b 0%, #c1121f 45%, #6d0710 100%);
  box-shadow: 0 3px 4px rgba(0,0,0,.7); transition: opacity 300ms; }
.board-notes { position: absolute; inset: 0; z-index: 5; pointer-events: none; display: grid; grid-template-columns: 19% 1fr 19%; grid-template-rows: repeat(4, 1fr); padding: 5% 1.5%; }
.note { margin: 0; align-self: center; padding: 10px 12px 9px; background: #f1ead9; color: #121212; box-shadow: 3px 4px 0 rgba(0,0,0,.65); font-size: 12px; line-height: 1.3; position: relative; }
.note b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.note span { display: block; color: #3b3b3b; font-size: 11px; }
.note::before { content: ""; position: absolute; left: 50%; top: -7px; width: 38px; height: 12px; margin-left: -19px; background: rgba(245,245,247,.35); transform: rotate(-3deg); }
.note-l { grid-column: 1; } .note-r { grid-column: 3; }
.note:nth-child(1) { grid-row: 1; transform: rotate(-2deg); } .note:nth-child(2) { grid-row: 2; transform: rotate(1.5deg); } .note:nth-child(3) { grid-row: 3; transform: rotate(-1deg); } .note:nth-child(4) { grid-row: 4; transform: rotate(2deg); }
.note:nth-child(5) { grid-row: 1; transform: rotate(2deg); } .note:nth-child(6) { grid-row: 2; transform: rotate(-1.5deg); } .note:nth-child(7) { grid-row: 3; transform: rotate(1deg); } .note:nth-child(8) { grid-row: 4; transform: rotate(-2deg); }
@media (max-width: 900px) {
  .board { height: 640px; border-width: 6px; }
  .board-map { inset: 19% 4%; }
  .board-notes { grid-template-columns: repeat(4, 1fr); grid-template-rows: auto 1fr auto; gap: 6px; padding: 8px; }
  .note { padding: 7px 7px 6px; font-size: 10px; align-self: start; }
  .note b { font-size: 11px; } .note span { font-size: 9px; }
  .note-l { grid-row: 1 !important; grid-column: auto; } .note-r { grid-row: 3 !important; grid-column: auto; align-self: end; }
}
.board-gl { position: absolute !important; inset: 0; width: 100%; height: 100%; }   /* MapLibre sets position: relative on its container */
.board-map .maplibregl-ctrl-attrib, .board-map .maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(5,6,5,.7) !important; color: rgba(245,245,247,.5); }
.board-map .maplibregl-ctrl-attrib a { color: rgba(245,245,247,.6); }
.board-map .maplibregl-ctrl-attrib-button { filter: invert(1); opacity: .6; }

/* ── contact: light, apple.com style. A laptop opens, his globe is on the screen, then a form ── */
.contact { background: #f5f5f7; color: #1d1d1f; }
.contact .eyebrow { color: #6e6e73; }
.contact-pin { height: 150vh; }
.contact-stage { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; overflow: hidden; padding-top: 44px; }
.contact-head { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.contact .h2 { color: #1d1d1f; }
.mbp { width: min(86vw, 960px, 112svh); perspective: 2400px; perspective-origin: 50% 0%; }
.mbp-lid { position: relative; aspect-ratio: 16 / 10.2; background: #0c0c0e; border-radius: 18px 18px 6px 6px; padding: 2.1% 2.1% 3%;
  transform-origin: 50% 100%; transform: rotateX(-50deg); box-shadow: 0 0 0 1px #2b2b2e, 0 40px 80px rgba(0,0,0,.18); will-change: transform; }
.mbp-lid::before { content: ""; position: absolute; left: 50%; top: 0.8%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: #1d1d20; box-shadow: inset 0 0 0 1px #333; }
.mbp-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 6px; background: #0b0f14; }
.mbp-still, #globe { position: absolute !important; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#globe { opacity: 0; transition: opacity 600ms var(--ease-ui); }
.mbp.is-gl #globe { opacity: 1; }
.mbp-base { position: relative; width: 116%; margin-left: -8%; height: clamp(10px, 1.6vw, 18px); border-radius: 2px 2px 18px 18px;
  background: linear-gradient(180deg, #e3e4e6 0%, #c9cacd 55%, #9fa0a4 100%); box-shadow: 0 30px 50px rgba(0,0,0,.18); }
.mbp-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 15%; height: 42%; margin-left: -7.5%; border-radius: 0 0 8px 8px; background: #b3b4b7; }
.chips { list-style: none; margin: 0; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 1000px; }
.chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 44px; padding: 8px 16px; border-radius: 14px; border: 1px solid #d2d2d7; background: #fff; color: #1d1d1f; cursor: pointer;
  font: inherit; text-align: left; transition: transform 200ms var(--ease-ui), border-color 200ms, box-shadow 200ms; }
.chip b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.chip span { font-size: 12px; color: #6e6e73; }
.chip:hover { border-color: #86868b; }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { border-color: #0a7a3d; box-shadow: 0 0 0 3px rgba(10,122,61,.15); }
.chip:focus-visible { outline: 2px solid #0a7a3d; outline-offset: 2px; }
.gpin { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff7b7b 0%, #e0242f 50%, #8a0a14 100%); box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 3px 6px rgba(0,0,0,.5); }
.gpin.is-on { animation: gpin 1.4s ease-out infinite; }
@keyframes gpin { 0% { box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(224,36,47,.6); } 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 18px rgba(224,36,47,0); } }
.contact-form-wrap { max-width: 760px; padding-block: 40px 160px; text-align: center; }
.contact-title { font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.03em; line-height: 1.05; color: #1d1d1f; }
.contact-sub { margin: 14px auto 0; max-width: 46ch; font-size: 19px; line-height: 1.45; color: #6e6e73; }
.contact-form { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; }
.contact-form .f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #6e6e73; }
.contact-form .f-wide { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea { font: inherit; font-size: 17px; color: #1d1d1f; background: #fff; border: 1px solid #86868b; border-radius: 12px; padding: 13px 16px; min-height: 48px; resize: vertical; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid #0a7a3d; outline-offset: 1px; border-color: #0a7a3d; }
.contact-form .pill { grid-column: 1 / -1; justify-self: center; margin-top: 6px; }
.contact-status { grid-column: 1 / -1; text-align: center; min-height: 20px; font-size: 13px; color: #0a7a3d; }
.contact-status.err { color: #b3261e; }
.hp { position: absolute; left: -5000px; }
@media (max-width: 900px) {
  .contact-pin { height: auto; }
  .contact-stage { position: relative; height: auto; padding-block: 96px 24px; }
  .mbp { width: calc(100vw - 2 * var(--gutter)); }
  .mbp-lid { transition: transform 1200ms cubic-bezier(.2,.8,.2,1); }
  .mbp.is-open .mbp-lid { transform: none; }
  .contact-form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .contact-pin { height: auto; } .contact-stage { position: relative; height: auto; padding-block: 96px 24px; } .mbp-lid { transform: none !important; } }

/* hero type: the name in silver, the role and the brand each on their own line */
.hero-h1 > span:first-child { background: linear-gradient(180deg, #ffffff 0%, #e8eaed 55%, #b9bec5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.hero-h1 .hero-h1-sub { display: block; margin-top: .3em; font-size: .28em; line-height: 1.22; font-weight: 500; }
.hero-h1-sub .role { display: block; color: rgba(245,245,247,.92); letter-spacing: -0.02em; }
.hero-h1-sub .brand { display: block; margin-top: .35em; font-size: .62em; font-weight: 400; letter-spacing: .02em; color: rgba(245,245,247,.62); }
.hero-h1-sub .brand b { font-weight: 600; background: linear-gradient(90deg, #37f08a, #9ff7c6); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 900px) { .hero-h1 .hero-h1-sub { font-size: .42em; } }

/* the noir laptop scene as a polaroid */
.noir-panel.polaroid { background: #f3f0e8; border: 0; outline: 0; padding: 0; border-radius: 3px; transform: rotate(2.5deg);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 30px 70px rgba(0,0,0,.55), 0 6px 14px rgba(0,0,0,.35); aspect-ratio: 4 / 5.4; }
.noir-panel.polaroid img, .noir-panel.polaroid canvas { inset: 4% 4% 21% 4%; width: 92%; height: 75%; }
.noir-panel.polaroid::after { inset: 4% 4% 16% 4%; }
.polaroid-cap { position: absolute; left: 0; right: 0; bottom: 5%; text-align: center; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: #3a3a3a; }

/* apple.com rhythm: the middle of the page goes light (kit, try one), then the contact laptop, then night again */
.kit, .risk { background: #f5f5f7; color: #1d1d1f; }
.kit .eyebrow, .risk .eyebrow { color: #6e6e73; }
.kit .h2, .risk .h1, .kit .total { color: #1d1d1f; }
.kit .dim, .risk .dim, .kit .total .dim { color: #86868b; }
.risk .lead { color: #424245; }
.card-tag { background: #fff; border: 0; box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 18px 40px rgba(0,0,0,.08); }
.card-tag h3 { color: #1d1d1f; }
.card-tag p { color: #424245; }
.card-tag .tagno { color: #0a7a3d; }
.card-tag img { background: #e8e8ed; border-bottom: 0; filter: none; }

/* ── house easing (custom curves, transitions not keyframes, press feedback) ── */
:root { --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1); --ease-io-strong: cubic-bezier(0.77, 0, 0.175, 1); }

/* nav: contact from anywhere */
.gn-right { display: flex; align-items: center; gap: 22px; }
.gn-yt { color: var(--green); opacity: 1; }
.gn-link { color: inherit; opacity: .8; font-size: 12px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; transition: opacity 160ms ease; }
@media (hover: hover) and (pointer: fine) { .gn-link:hover { opacity: 1; } }

/* ── TEACH: light feature scene (apple.com style), his photos in natural colour ── */
.teach { background: #f5f5f7; color: #1d1d1f; }
.teach-pin { height: 300vh; }
.teach-stage { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; }
.teach-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; }
.teach-media { position: relative; aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden; background: #e8e8ed; box-shadow: 0 2px 6px rgba(0,0,0,.05), 0 30px 70px rgba(0,0,0,.14); }
.teach-photo { position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.03); filter: blur(4px); transition: opacity 520ms var(--ease-out-strong), transform 700ms var(--ease-out-strong), filter 520ms var(--ease-out-strong); }
.teach-photo.is-on { opacity: 1; transform: none; filter: none; }
.teach-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teach-photo .panel-code { right: 4%; bottom: 5%; width: min(62%, 460px); }
.teach-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.step { padding: 14px 0 14px 20px; border-left: 2px solid #d2d2d7; transition: border-color 300ms ease; }
.step.is-on { border-left-color: #1d1d1f; }
.step-photo { display: none; }
.step-btn { display: flex; align-items: baseline; gap: 14px; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; min-height: 44px; transition: transform 160ms ease-out; }
.step-btn:active { transform: scale(0.97); }
.step-btn:focus-visible { outline: 2px solid #0a7a3d; outline-offset: 4px; border-radius: 6px; }
.step-l { font-size: 44px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: #d2d2d7; transition: color 300ms ease; }
.step-n { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; color: #86868b; transition: color 300ms ease; }
.step-h { margin: 6px 0 0 0; max-width: 34ch; font-size: 17px; line-height: 1.45; color: #86868b; opacity: .55; transition: opacity 300ms ease, color 300ms ease; }
.step.is-on .step-l { color: #0a7a3d; } .step.is-on .step-n { color: #1d1d1f; } .step.is-on .step-h { color: #424245; opacity: 1; }
@media (max-width: 900px) {
  .teach-pin { height: auto; } .teach-stage { position: relative; height: auto; padding-block: 96px; }
  .teach-grid { grid-template-columns: 1fr; gap: 0; } .teach-media { display: none; }
  .teach-steps { gap: 44px; } .step { border: 0; padding: 0; }
  .step-photo { display: block; width: 100%; height: auto; border-radius: 20px; margin-bottom: 18px; box-shadow: 0 20px 40px rgba(0,0,0,.12); }
  .step-l { color: #0a7a3d; } .step-n { color: #1d1d1f; } .step-h { color: #424245; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .teach-pin { height: auto; } .teach-stage { position: relative; height: auto; padding-block: 120px; } .teach-photo { transition: opacity 200ms ease; transform: none; filter: none; } }

/* ── where I've shipped code: laptop left, the companies and what he did on the right ── */
.contact-stage { flex-direction: row; flex-wrap: wrap; align-content: center; gap: 22px 56px; padding-inline: var(--gutter); }
.contact-head { flex: 1 0 100%; }
.mbp { width: min(56vw, 760px, 100svh); }
.co-wrap { width: min(34vw, 440px); }
.co-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.co, .co-x { width: 100%; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 11px 12px; border: 0; border-bottom: 1px solid #e3e3e8; background: none; color: #1d1d1f; font: inherit; text-align: left; border-radius: 10px; }
.co { cursor: pointer; transition: background-color 160ms ease, transform 160ms ease-out; }
.co:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) { .co:hover { background: #fff; } }
.co[aria-pressed="true"] { background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.co:focus-visible { outline: 2px solid #0a7a3d; outline-offset: 1px; }
.co-n { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.co-c { font-size: 12px; color: #6e6e73; align-self: center; }
.co-d { grid-column: 1 / -1; font-size: 13.5px; line-height: 1.4; color: #424245; margin-top: 2px; }
.co-x { border-bottom: 0; }
.co-note { margin: 14px 12px 0; font-size: 13.5px; line-height: 1.45; color: #424245; padding-top: 12px; border-top: 1px solid #d2d2d7; }
.co-list li { opacity: 0; transform: translate3d(0, 8px, 0); transition: opacity 400ms var(--ease-out-strong), transform 400ms var(--ease-out-strong); }
.co-list.in li { opacity: 1; transform: none; }
.co-list.in li:nth-child(2) { transition-delay: 40ms; } .co-list.in li:nth-child(3) { transition-delay: 80ms; } .co-list.in li:nth-child(4) { transition-delay: 120ms; } .co-list.in li:nth-child(5) { transition-delay: 160ms; }
.co-list.in li:nth-child(6) { transition-delay: 200ms; } .co-list.in li:nth-child(7) { transition-delay: 240ms; } .co-list.in li:nth-child(8) { transition-delay: 280ms; } .co-list.in li:nth-child(9) { transition-delay: 320ms; }
@media (max-width: 900px) { .contact-stage { flex-direction: column; } .mbp { width: calc(100vw - 2 * var(--gutter)); } .co-wrap { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .co-list li { opacity: 1; transform: none; transition: none; } }

/* the contact form gets its own clear moment */
.contact-form-wrap { margin-top: 40px; padding: 56px clamp(20px, 5vw, 64px) 64px; background: #fff; border-radius: 28px; box-shadow: 0 2px 6px rgba(0,0,0,.04), 0 30px 70px rgba(0,0,0,.08); margin-bottom: 96px; }

/* polaroid caption: his name over the site */
.polaroid-cap { display: flex; flex-direction: column; gap: 2px; bottom: 4%; }
.polaroid-cap b { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: #1d1d1f; }

.noir-panel.polaroid { cursor: default; }

/* ── three themes (house rule): dark → light → nagai. The film scenes stay dark in every state. ── */
.theme-tg { min-height: 44px; min-width: 44px; padding: 0 4px; border: 0; background: transparent; color: inherit; opacity: .7; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: transform 120ms var(--ease-out-strong); }
.theme-tg:active { transform: scale(0.97); }
.theme-tg:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.sky { display: none; }

/* light: the remaining dark reading sections turn light */
:root[data-theme="light"] .tape, :root[data-theme="light"] .tape .stage, :root[data-theme="light"] .credits { background: #f5f5f7; color: #1d1d1f; }
:root[data-theme="light"] .tape .h2, :root[data-theme="light"] .tape .lead { color: #1d1d1f; }
:root[data-theme="light"] .tape .eyebrow, :root[data-theme="light"] .credits .eyebrow, :root[data-theme="light"] .quals { color: #6e6e73; }
:root[data-theme="light"] .credit-name { background-image: linear-gradient(100deg, rgba(29,29,31,.3) 0%, rgba(29,29,31,.3) calc(var(--sweep, 45%) - 14%), #1d1d1f var(--sweep, 45%), rgba(29,29,31,.3) calc(var(--sweep, 45%) + 14%), rgba(29,29,31,.3) 100%); }
:root[data-theme="light"] .marks li { color: #424245; }
:root[data-theme="light"] .foot { background: #f5f5f7; color: #1d1d1f; }

/* nagai: Hiroshi Nagai city-pop. Sky gradient, navy ink, coral accent, white cards with a navy border and a hard offset shadow. No terminal green on the sky. */
:root[data-theme="nagai"] body { background: linear-gradient(180deg, #4fb0e6 0%, #9ad6f3 32%, #f6bfd3 62%, #fbe3cf 82%, #e9f3f4 100%) fixed; }
:root[data-theme="nagai"] .teach, :root[data-theme="nagai"] .kit, :root[data-theme="nagai"] .risk, :root[data-theme="nagai"] .contact,
:root[data-theme="nagai"] .tape, :root[data-theme="nagai"] .tape .stage, :root[data-theme="nagai"] .credits, :root[data-theme="nagai"] .foot { background: transparent; color: #1b2a4a; }
:root[data-theme="nagai"] .sky { display: block; line-height: 0; }
:root[data-theme="nagai"] :is(.teach, .kit, .risk, .contact, .tape, .credits) :is(.h1, .h2, .contact-title, .tape .lead, .step-n, .co-n, h3) { color: #1b2a4a; }
:root[data-theme="nagai"] :is(.teach, .kit, .risk, .contact, .tape, .credits) :is(.eyebrow, .step-h, .co-c, .co-d, .co-note, .contact-sub, .lead, .quals, .card-tag p, .total .dim) { color: #4f6a8a; }
:root[data-theme="nagai"] :is(.teach-media, .card-tag, .contact-form-wrap, .mbp-lid) { border: 2px solid #1b2a4a; box-shadow: 8px 8px 0 #1b2a4a; }
:root[data-theme="nagai"] :is(.card-tag, .contact-form-wrap) { background: #fbfbf7; }
:root[data-theme="nagai"] .step { border-left-color: rgba(27,42,74,.25); }
:root[data-theme="nagai"] .step.is-on { border-left-color: #1b2a4a; }
:root[data-theme="nagai"] .step.is-on .step-l, :root[data-theme="nagai"] .card-tag .tagno { color: #ff7a59; }
:root[data-theme="nagai"] .co[aria-pressed="true"] { background: #fbfbf7; box-shadow: 4px 4px 0 #1b2a4a; }
:root[data-theme="nagai"] .co, :root[data-theme="nagai"] .co-x { border-bottom-color: rgba(27,42,74,.15); }
:root[data-theme="nagai"] .pill, :root[data-theme="nagai"] .btn-quiet { background: #ff7a59; color: #1b2a4a; }
:root[data-theme="nagai"] .contact-form input, :root[data-theme="nagai"] .contact-form textarea { border: 2px solid #1b2a4a; }
:root[data-theme="nagai"] .credit-name { background-image: linear-gradient(100deg, rgba(27,42,74,.3) 0%, rgba(27,42,74,.3) calc(var(--sweep, 45%) - 14%), #1b2a4a var(--sweep, 45%), rgba(27,42,74,.3) calc(var(--sweep, 45%) + 14%), rgba(27,42,74,.3) 100%); }
:root[data-theme="nagai"] .marks li { color: #1b2a4a; }
:root[data-theme="nagai"] .gn { background: rgba(251,251,247,.86); color: #1b2a4a; border-bottom: 2px solid #1b2a4a; }
:root[data-theme="nagai"] .contact-status, :root[data-theme="nagai"] .nl-status { color: #1b2a4a; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; animation-timing-function: cubic-bezier(.23,1,.32,1); }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
/* nagai: no terminal green on the sky (house rule) */
:root[data-theme="nagai"] .tape .link, :root[data-theme="nagai"] .contact .link { color: #1b2a4a; }
:root[data-theme="nagai"] .chap { background: rgba(251,251,247,.86); color: #4f6a8a; } :root[data-theme="nagai"] .chap-now { color: #ff7a59; }
:root[data-theme="nagai"] .caret { color: #ff7a59; }

/* hero: one promise, one action */
.hero-copy .nl-hero { margin-top: 10px; width: min(100%, 520px); }
.nl-hero .pill, .nl-magnet .pill { min-height: 48px; white-space: nowrap; }
.hero-yt { font-size: 15px; opacity: .85; }
.hero-reveal { position: absolute; z-index: 3; left: max(var(--gutter), 6vw); bottom: 12svh; max-width: 30ch; opacity: 0; pointer-events: none; text-shadow: 0 2px 24px rgba(0,0,0,.55); }
.hr-role { font-size: clamp(28px, 3vw, 44px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; color: #fff; }
.hr-brand { margin-top: 8px; font-size: clamp(15px, 1.3vw, 19px); color: rgba(245,245,247,.82); }
.hr-brand b { font-weight: 600; color: #9ff7c6; }
.hr-ships { margin-top: 10px; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.45; color: rgba(245,245,247,.9); }
@media (max-width: 900px) { .hero-reveal { left: var(--gutter); right: var(--gutter); bottom: 9svh; } }
@media (prefers-reduced-motion: reduce) { .hero-reveal { position: relative; opacity: 1; left: auto; bottom: auto; margin: 0 auto; padding: 0 var(--gutter) 10svh; text-align: center; } }

/* the cheat sheet, right after TEACH */
.magnet { background: #f5f5f7; color: #1d1d1f; padding-block: 0 var(--pad); }
.magnet-card { display: grid; grid-template-columns: 7fr 4fr; gap: 56px; align-items: center; background: #fff; border-radius: 28px; padding: 56px clamp(24px, 5vw, 64px); box-shadow: 0 2px 6px rgba(0,0,0,.04), 0 30px 70px rgba(0,0,0,.08); }
.magnet .h2 { color: #1d1d1f; font-size: clamp(34px, 4vw, 56px); }
.magnet .lead { color: #424245; margin-top: 14px; max-width: 40ch; }
.nl-magnet { margin-top: 26px; width: min(100%, 520px); }
.nl-magnet input[type="email"] { background: #fff; color: #1d1d1f; border: 1px solid #86868b; }
.nl-magnet input::placeholder { color: #86868b; }
.magnet .nl-status { color: #0a7a3d; margin-top: 8px; }
.magnet-pdf { width: 100%; height: auto; border-radius: 8px; transform: rotate(2.5deg); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 24px 50px rgba(0,0,0,.16); }
.nl-dl { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .magnet-card { grid-template-columns: 1fr; gap: 32px; padding: 36px 22px; } .magnet-pdf { max-width: 280px; justify-self: center; } }
:root[data-theme="nagai"] .magnet { background: transparent; }
:root[data-theme="nagai"] .magnet-card { background: #fbfbf7; border: 2px solid #1b2a4a; box-shadow: 8px 8px 0 #1b2a4a; }
:root[data-theme="nagai"] .magnet .h2 { color: #1b2a4a; } :root[data-theme="nagai"] .magnet .lead { color: #4f6a8a; } :root[data-theme="nagai"] .magnet .nl-status { color: #1b2a4a; }
@media (max-width: 600px) { .gn-right .gn-link:not(.gn-yt) { display: none; } .gn-brand { white-space: nowrap; } .gn-right { gap: 10px; } }   /* phones: brand, YouTube, theme, pause */

/* hero: who he is */
.hero-who { display: flex; flex-direction: column; gap: 6px; }
.hero-who .role { font-size: clamp(24px, 2.6vw, 36px); font-weight: 600; letter-spacing: -0.025em; color: rgba(245,245,247,.95); }
.hero-who .brand { font-size: clamp(15px, 1.3vw, 19px); color: rgba(245,245,247,.72); }
.hero-who .brand b { font-weight: 600; background: linear-gradient(90deg, #37f08a, #9ff7c6); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* latest on YouTube: light, apple.com style */
.latest { background: #f5f5f7; color: #1d1d1f; padding-block: var(--pad) 112px; }
.latest .h2 { color: #1d1d1f; }
.latest-videos { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.latest-shorts { margin-top: 18px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.latest-sub { margin-top: 56px; font-size: 24px; letter-spacing: -0.02em; }
.yt { display: flex; flex-direction: column; gap: 10px; color: inherit; }
.yt-thumb { position: relative; overflow: hidden; border-radius: 16px; background: #e8e8ed; box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 16px 34px rgba(0,0,0,.1); }
.yt-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out-strong); }
@media (hover: hover) and (pointer: fine) { .yt:hover .yt-thumb img { transform: scale(1.03); } .yt-t:hover { text-decoration: underline; text-underline-offset: 3px; } }
.latest-videos .yt-thumb { aspect-ratio: 16 / 9; }
.latest-shorts .yt-thumb { aspect-ratio: 9 / 16; }
.yt-t { display: block; color: inherit; text-decoration: none; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.yt-d { font-size: 12px; color: #6e6e73; }
.latest-shorts .yt-t { font-size: 13px; font-weight: 500; }
.latest-all { display: inline-block; margin-top: 40px; color: #0a7a3d; }
.yt-play:focus-visible { outline: 3px solid #0a7a3d; outline-offset: -5px; border-radius: 16px; }
.yt-t:focus-visible { outline: 2px solid #0a7a3d; outline-offset: 3px; border-radius: 4px; }
@media (max-width: 900px) { .latest-videos { grid-template-columns: 1fr; } .latest-shorts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
:root[data-theme="nagai"] .latest { background: transparent; }
:root[data-theme="nagai"] .latest .h2, :root[data-theme="nagai"] .latest-sub, :root[data-theme="nagai"] .yt-t { color: #1b2a4a; }
:root[data-theme="nagai"] .yt-thumb { border: 2px solid #1b2a4a; box-shadow: 6px 6px 0 #1b2a4a; }
:root[data-theme="nagai"] .latest-all { color: #1b2a4a; }
.yt-badge { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(5,6,5,.78); color: #fff; font-size: 11px; letter-spacing: .06em; }
:root[data-theme="nagai"] .yt-badge { background: #1b2a4a; color: #fff; }

/* review fixes */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: #fff; color: #1d1d1f; font-size: 14px; text-decoration: none; }
.skip:focus { top: 12px; }
.chap { writing-mode: horizontal-tb; top: auto; bottom: 22px; right: 22px; transform: none; padding: 6px 12px; border-radius: 999px; background: rgba(5,6,5,.92); }
.hero .ctas { margin-top: 8px; }

/* a11y: dimmed TEACH steps still meet contrast (large letters 3:1, text 4.5:1) */
.step-l { color: #86868b; } .step-n { color: #6e6e73; } .step-h { color: #6e6e73; opacity: 1; }
.fall-still { color: rgba(55,240,138,.22); }
@media (max-width: 900px) { .chap { display: none !important; } }   /* phones: the counter covered content; every section has its own heading */

/* the map credit: required by the OSM and OpenMapTiles licences, so it stays, folded to a small (i) in the corner of the screen */
#globe .maplibregl-ctrl-attrib { background: transparent; margin: 0 8px 8px 0; }
#globe .maplibregl-ctrl-attrib.maplibregl-compact { min-height: 24px; border-radius: 12px; background: rgba(5,6,5,.45); }
#globe .maplibregl-ctrl-attrib.maplibregl-compact-show { background: rgba(5,6,5,.82); }
#globe .maplibregl-ctrl-attrib-button { width: 24px; height: 24px; opacity: .55; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E"); }
#globe .maplibregl-ctrl-attrib-button:hover { opacity: .9; }
#globe .maplibregl-ctrl-attrib-button:focus-visible { opacity: 1; outline: 2px solid #37f08a; outline-offset: 1px; }
#globe .maplibregl-ctrl-attrib-inner, #globe .maplibregl-ctrl-attrib a { font-size: 10px; color: rgba(245,245,247,.7); }

/* light theme: the green link is the dark accent on a light section (4.5:1) */
:root[data-theme="light"] :is(.tape, .credits, .teach, .magnet, .kit, .contact, .latest) .link { color: #0a7a3d; }

/* Nagai: the list sits on the sky, the polaroid on the sky */
:root[data-theme="nagai"] .dawn { background: transparent; color: #1b2a4a; }
:root[data-theme="nagai"] .dawn .h1, :root[data-theme="nagai"] .dawn .micro { color: #1b2a4a; }
:root[data-theme="nagai"] .dawn .nl input[type="email"] { background: #fbfbf7; border: 2px solid #1b2a4a; color: #1b2a4a; }
:root[data-theme="nagai"] .dawn .nl input::placeholder { color: #4f6a8a; }

/* dark theme is dark everywhere: no white sections (the light and Nagai themes keep their own palettes) */
:root:not([data-theme="light"]):not([data-theme="nagai"]) .teach, :root:not([data-theme="light"]):not([data-theme="nagai"])  .contact, :root:not([data-theme="light"]):not([data-theme="nagai"])  .latest { background: var(--black); color: #f5f5f7; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .magnet, :root:not([data-theme="light"]):not([data-theme="nagai"])  .kit, :root:not([data-theme="light"]):not([data-theme="nagai"])  .risk { background: #0a0c0b; color: #f5f5f7; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .contact .eyebrow, :root:not([data-theme="light"]):not([data-theme="nagai"])  .kit .eyebrow, :root:not([data-theme="light"]):not([data-theme="nagai"])  .risk .eyebrow, :root:not([data-theme="light"]):not([data-theme="nagai"])  .latest .eyebrow { color: var(--dim); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .contact .h2, :root:not([data-theme="light"]):not([data-theme="nagai"])  .kit .h2, :root:not([data-theme="light"]):not([data-theme="nagai"])  .risk .h1, :root:not([data-theme="light"]):not([data-theme="nagai"])  .kit .total, :root:not([data-theme="light"]):not([data-theme="nagai"])  .latest .h2, :root:not([data-theme="light"]):not([data-theme="nagai"])  .latest-sub, :root:not([data-theme="light"]):not([data-theme="nagai"])  .magnet .h2, :root:not([data-theme="light"]):not([data-theme="nagai"])  .contact-title { color: #f5f5f7; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .kit .dim, :root:not([data-theme="light"]):not([data-theme="nagai"])  .risk .dim, :root:not([data-theme="light"]):not([data-theme="nagai"])  .kit .total .dim { color: #8e8e93; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .risk .lead, :root:not([data-theme="light"]):not([data-theme="nagai"])  .magnet .lead { color: rgba(245,245,247,.74); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .card-tag { background: #121413; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 60px rgba(0,0,0,.45); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .card-tag h3 { color: #f5f5f7; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .card-tag p { color: rgba(245,245,247,.74); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .card-tag .tagno { color: var(--green); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .card-tag img { background: #0b0c0b; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .teach-media { background: #121413; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 70px rgba(0,0,0,.6); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step { border-left-color: rgba(255,255,255,.16); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step.is-on { border-left-color: #f5f5f7; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step-l { color: #6e6e73; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step-n { color: #8e8e93; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step-h { color: #8e8e93; opacity: 1; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step.is-on .step-l { color: var(--green); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step.is-on .step-n { color: #f5f5f7; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step.is-on .step-h { color: #d1d1d6; opacity: 1; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step-btn:focus-visible { outline-color: var(--green); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .co, :root:not([data-theme="light"]):not([data-theme="nagai"])  .co-x { color: #f5f5f7; border-bottom-color: rgba(255,255,255,.1); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .co:hover, :root:not([data-theme="light"]):not([data-theme="nagai"])  .co[aria-pressed="true"] { background: rgba(255,255,255,.07); box-shadow: none; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .co:focus-visible { outline-color: var(--green); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .co-c { color: #8e8e93; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .co-d, :root:not([data-theme="light"]):not([data-theme="nagai"])  .co-note { color: rgba(245,245,247,.74); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .co-note { border-top-color: rgba(255,255,255,.12); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .contact-sub, :root:not([data-theme="light"]):not([data-theme="nagai"])  .contact-form .f { color: #a1a1a6; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .contact-form-wrap { background: #121413; border: 1px solid rgba(255,255,255,.08); box-shadow: none; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .contact-form input, :root:not([data-theme="light"]):not([data-theme="nagai"])  .contact-form textarea { color: #f5f5f7; background: #0b0c0b; border-color: #6e6e73; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .contact-form input:focus-visible, :root:not([data-theme="light"]):not([data-theme="nagai"])  .contact-form textarea:focus-visible { outline-color: var(--green); border-color: var(--green); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .contact-status { color: var(--green); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .contact-status.err { color: #ff8a80; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .magnet-card { background: #121413; border: 1px solid rgba(255,255,255,.08); box-shadow: none; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .nl-magnet input[type="email"] { background: rgba(255,255,255,.1); color: #f5f5f7; border: 0; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .nl-magnet input::placeholder { color: rgba(245,245,247,.55); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .magnet .nl-status { color: var(--green); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .yt-thumb { background: #121413; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 20px 44px rgba(0,0,0,.5); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .yt-d { color: #8e8e93; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .latest-all { color: var(--green); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .yt-play:focus-visible, :root:not([data-theme="light"]):not([data-theme="nagai"]) .yt-t:focus-visible { outline-color: var(--green); }
@media (max-width: 900px) {
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step-l { color: var(--green); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step-n { color: #f5f5f7; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step-h { color: #c7c7cc; opacity: 1; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .step-photo { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 20px 40px rgba(0,0,0,.5); }
}

/* ── the stack: an Apple-style spec grid ── */
.specs { padding-block: var(--pad); }
.spec-grid { margin: 56px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 72px; }
.spec { border-top: 1px solid rgba(255,255,255,.14); padding: 22px 0 34px; display: grid; gap: 12px; align-content: start; }
.spec-wide { grid-column: 1 / -1; }
.spec dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.spec dd { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 26px; font-size: clamp(18px, 1.55vw, 22px); line-height: 1.6; letter-spacing: -0.014em; color: rgba(245,245,247,.88); }
.spec dd span { white-space: nowrap; }
@media (max-width: 900px) { .specs { padding-block: 72px; } .spec-grid { grid-template-columns: 1fr; margin-top: 36px; } .spec { padding-bottom: 26px; } }
:root[data-theme="light"] .specs { background: #f5f5f7; color: #1d1d1f; }
:root[data-theme="light"] .specs .h2 { color: #1d1d1f; } :root[data-theme="light"] .specs .eyebrow, :root[data-theme="light"] .spec dt { color: #6e6e73; }
:root[data-theme="light"] .spec { border-top-color: rgba(0,0,0,.14); } :root[data-theme="light"] .spec dd { color: #1d1d1f; }
:root[data-theme="nagai"] .specs { background: transparent; color: #1b2a4a; }
:root[data-theme="nagai"] .specs .h2, :root[data-theme="nagai"] .spec dd { color: #1b2a4a; }
:root[data-theme="nagai"] .specs .eyebrow, :root[data-theme="nagai"] .spec dt { color: #4f6a8a; }
:root[data-theme="nagai"] .spec { border-top-color: rgba(27,42,74,.3); } :root[data-theme="nagai"] 
/* ── flow: one continuous page ── */
/* reveals: blocks rise and fade in as they enter. Nothing is hidden without JS or under reduced motion. */
.rv { transition: opacity 800ms var(--ease-out-strong) var(--d, 0ms), translate 800ms var(--ease-out-strong) var(--d, 0ms); }
.rv-on .rv:not(.in) { opacity: 0; translate: 0 28px; }
.rv:nth-child(2) { --d: 70ms; } .rv:nth-child(3) { --d: 140ms; } .rv:nth-child(4) { --d: 210ms; } .rv:nth-child(5) { --d: 280ms; }
.spec-grid .spec:nth-child(2n) { --d: 90ms; }
@media (prefers-reduced-motion: reduce) { .rv { transition: none; } .rv-on .rv:not(.in) { opacity: 1; translate: none; } }
/* the dark theme is one black page (no seams between sections); each scene keeps its own soft glow */
:root:not([data-theme="light"]):not([data-theme="nagai"]) .magnet, :root:not([data-theme="light"]):not([data-theme="nagai"]) .kit, :root:not([data-theme="light"]):not([data-theme="nagai"]) .risk { background: var(--black); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .kit { background: radial-gradient(50% 50% at 50% 30%, rgba(55,240,138,.05) 0%, rgba(55,240,138,0) 70%), var(--black); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .specs { background: radial-gradient(50% 45% at 20% 20%, rgba(55,240,138,.05) 0%, rgba(55,240,138,0) 70%), var(--black); }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .latest { background: radial-gradient(55% 40% at 70% 10%, rgba(55,240,138,.04) 0%, rgba(55,240,138,0) 70%), var(--black); }
/* light and Nagai: the code scene fades out of the dark and into the next section instead of cutting */
:root[data-theme="light"] .fall { background: linear-gradient(to bottom, var(--black) calc(100% - 340px), #f5f5f7 100%); }
:root[data-theme="nagai"] .fall { background: linear-gradient(to bottom, rgba(5,6,5,0) 0, var(--black) 340px, var(--black) calc(100% - 340px), rgba(5,6,5,0) 100%); }

/* the contact form's bottom margin stays inside the section (it used to collapse out and show the black page behind a light section) */
.contact { display: flow-root; }

/* ── v7.5: home link, hero → email handoff, polaroid, stack portrait, contact photo, email validation ── */
.gn-long { }
@media (max-width: 600px) { .gn-long { display: none; } .gn-right .gn-link:not(.gn-yt):not(.gn-home) { display: none; } .gn-right .gn-link.gn-home { display: inline-flex; } .gn-right { gap: 10px; } .gn-brand { font-size: 13px; } }
.gn-links a[href="/"] { opacity: .85; }

/* the hero stays put while the email section slides up over it: the laptop settles back, nothing jumps and there is no gap */
.intro { position: relative; }
.hero { position: sticky; top: 0; z-index: 1; height: 100svh; min-height: 0; }
.hero::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--cover, 0); pointer-events: none; z-index: 6; }
.dawn { z-index: 2; min-height: 100svh; display: grid; align-items: center; border-radius: 40px 40px 0 0; background: radial-gradient(55% 60% at 30% 50%, rgba(55,240,138,.06) 0%, rgba(55,240,138,0) 70%), var(--black); box-shadow: 0 -1px 0 rgba(255,255,255,.07), 0 -40px 80px rgba(0,0,0,.6); }
.dawn .stage { width: 100%; }
@media (prefers-reduced-motion: reduce) { .hero { position: relative; height: auto; min-height: 100svh; } .hero::after { display: none; } .dawn { box-shadow: none; } }
@media (max-width: 900px) { .dawn { border-radius: 28px 28px 0 0; min-height: 0; } }
:root[data-theme="nagai"] .dawn { background: linear-gradient(180deg, #4fb0e6 0%, #9ad6f3 32%, #f6bfd3 62%, #fbe3cf 82%, #e9f3f4 100%) fixed; box-shadow: 0 -2px 0 #1b2a4a, 0 -30px 60px rgba(27,42,74,.25); }

/* polaroid: the real photo; press it for the rain */
.noir-panel.polaroid::after { display: none; }
.noir-panel.polaroid .noir-still, .noir-panel.polaroid canvas { inset: 4% 4% 21% 4%; width: 92%; height: 75%; object-fit: cover; object-position: 50% 30%; }
.noir-panel.polaroid canvas { opacity: 1; pointer-events: none; transition: none; z-index: 2; }
.polaroid-hit { position: absolute; inset: 0; z-index: 4; border: 0; background: none; cursor: pointer; border-radius: 3px; padding: 0; -webkit-tap-highlight-color: transparent; }
.polaroid-hit:focus-visible { outline: 3px solid var(--green); outline-offset: -6px; }
.polaroid-hit:active { background: rgba(0,0,0,.04); }
.polaroid-hint { margin-top: 3px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #6b6b6e; transition: opacity 200ms ease; }
.noir-panel.is-raining .polaroid-hint { opacity: 0; }

/* the stack: his cutout stands on the top line of the grid */
.specs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.specs-portrait { position: relative; z-index: 1; height: clamp(230px, 27vw, 340px); width: auto; margin: 0 clamp(0px, 3vw, 40px) -57px 0; filter: drop-shadow(0 24px 30px rgba(0,0,0,.35)); }
@media (max-width: 700px) { .specs-portrait { height: 180px; margin: 0 0 -37px; } }

/* contact: the tower shot beside the form */
.contact-form-wrap.contact-split { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: stretch; text-align: left; padding: clamp(18px, 2.6vw, 30px); }
.contact-photo { margin: 0; border-radius: 22px; overflow: hidden; min-height: 360px; position: relative; }
.contact-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.contact-body { align-self: center; padding: clamp(6px, 1vw, 14px) clamp(0px, 1.5vw, 22px) clamp(6px, 1vw, 14px) 0; }
.contact-split .contact-sub { margin-inline: 0; }
@media (max-width: 900px) { .contact-form-wrap.contact-split { grid-template-columns: 1fr; } .contact-photo { min-height: 0; aspect-ratio: 4 / 3; } .contact-photo img { object-position: 50% 76%; } .contact-body { padding: 4px 4px 10px; } }

/* email validation */
.nl-status.err { color: #ffb4a8; }
.nl input[aria-invalid="true"], .contact-form input[aria-invalid="true"] { box-shadow: 0 0 0 2px #ff8a80; }
.nl-fix { background: none; border: 0; padding: 0 2px; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 4px; }
.nl-fix:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.nl button[disabled] { opacity: .7; cursor: default; }
:root[data-theme="light"] .magnet .nl-status.err, :root[data-theme="light"] .nl-status.err { color: #b3261e; }
:root[data-theme="light"] .dawn .nl-status.err { color: #ffb4a8; }
:root[data-theme="nagai"] .nl-status.err, :root[data-theme="nagai"] .contact-status.err { color: #8c1d18; }
:root[data-theme="nagai"] .nl input[aria-invalid="true"] { box-shadow: 0 0 0 2px #b3261e; }
:root[data-theme="light"] .nl input[aria-invalid="true"], :root[data-theme="light"] .contact-form input[aria-invalid="true"] { box-shadow: 0 0 0 2px #b3261e; }
:root[data-theme="light"] .dawn .nl input[aria-invalid="true"] { box-shadow: 0 0 0 2px #ff8a80; }

/* polaroid on phones: a narrower card, so the caption gets a taller cream border and smaller type */
@media (max-width: 900px) {
  .noir-panel.polaroid { aspect-ratio: 4 / 5.7; }
  .noir-panel.polaroid .noir-still, .noir-panel.polaroid canvas { inset: 4% 4% 23% 4%; height: 73%; }
  .polaroid-cap { bottom: 3.5%; } .polaroid-cap b { font-size: 15px; } .polaroid-cap { font-size: 11.5px; } .polaroid-hint { font-size: 9.5px; }
}

/* latest videos play in place: the thumbnail is the play button, the title links to YouTube */
.yt-play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; background: linear-gradient(0deg, rgba(0,0,0,.34) 0%, rgba(0,0,0,0) 55%); }
.yt-dot { display: grid; place-items: center; width: 54px; height: 54px; padding-left: 3px; border-radius: 50%; background: rgba(255,255,255,.94); box-shadow: 0 8px 26px rgba(0,0,0,.4); transition: transform 200ms var(--ease-out-strong); }
.latest-shorts .yt-dot { width: 44px; height: 44px; }
@media (hover: hover) and (pointer: fine) { .yt-play:hover .yt-dot { transform: scale(1.08); } }
.yt-play:active .yt-dot { transform: scale(.95); }
.yt-thumb iframe { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; }
.yt-badge { z-index: 3; pointer-events: none; }
.yt-thumb.is-playing .yt-badge { display: none; }
:root[data-theme="nagai"] .yt-t:focus-visible, :root[data-theme="nagai"] .yt-play:focus-visible { outline-color: #1b2a4a; }
@media (prefers-reduced-motion: reduce) { .yt-dot { transition: none; } }

/* ===== v7.5b · Light and Nagai reach every section: nav, hero, email, TEACH scene. Nothing stays black. ===== */
:root[data-theme="light"] html, :root[data-theme="light"] body { background: #f5f5f7; color: #1d1d1f; }
:root[data-theme="light"] .intro, :root[data-theme="light"] .hero, :root[data-theme="light"] .dawn, :root[data-theme="light"] .fall, :root[data-theme="light"] .method { background: #f5f5f7; color: #1d1d1f; }
:root[data-theme="light"] .dawn { background: radial-gradient(55% 60% at 30% 50%, rgba(10,122,61,.07) 0%, rgba(10,122,61,0) 70%), #f5f5f7; }
:root[data-theme="light"] .gn { background: rgba(245,245,247,.82); color: #1d1d1f; border-bottom: 1px solid rgba(0,0,0,.08); }
:root[data-theme="light"] .gn-yt { color: #0a7a3d; }
:root[data-theme="light"] .hero::after { background: #f5f5f7; }
:root[data-theme="light"] .hero-h1 > span:first-child { background: linear-gradient(180deg, #1d1d1f 0%, #3a3a3d 60%, #56565a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .hero-sub, :root[data-theme="light"] .hero-h1-sub .role { color: #1d1d1f; }
:root[data-theme="light"] .hero-h1-sub .brand { color: #6e6e73; }
:root[data-theme="light"] .hero-h1-sub .brand b { background: linear-gradient(90deg, #0a7a3d, #11a057); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .hero-brand, :root[data-theme="light"] .hero .link, :root[data-theme="light"] :is(.dawn, .fall) .link { color: #0a7a3d; }
:root[data-theme="light"] :is(.dawn, .fall) :is(.h1, .h2) { color: #1d1d1f; text-shadow: none; }
:root[data-theme="light"] :is(.dawn, .fall) :is(.lead, .micro, .eyebrow) { color: #6e6e73; }
:root[data-theme="light"] .pill { background: #0a7a3d; color: #fff; }
:root[data-theme="light"] .dawn .nl input[type="email"] { background: #fff; color: #1d1d1f; border: 1px solid rgba(0,0,0,.18); }
:root[data-theme="light"] .dawn .nl input::placeholder { color: #6e6e73; }
:root[data-theme="light"] .dawn .nl-status, :root[data-theme="light"] .dawn .nl-status a { color: #0a7a3d; }
:root[data-theme="light"] .dawn .nl-status.err { color: #b3261e; }
:root[data-theme="light"] .noir-panel.polaroid { box-shadow: 0 18px 44px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06); }
:root[data-theme="light"] .chap { background: rgba(245,245,247,.9); color: #6e6e73; } :root[data-theme="light"] .chap-now { color: #0a7a3d; }
:root[data-theme="light"] .caret { color: #0a7a3d; text-shadow: none; }
:root[data-theme="light"] .beat .h2 { text-shadow: none; }
:root[data-theme="light"] .fall-still { color: rgba(10,122,61,.3); }
:root[data-theme="nagai"] .intro, :root[data-theme="nagai"] .fall, :root[data-theme="nagai"] .method { background: transparent; color: #1b2a4a; }
:root[data-theme="nagai"] .hero::after { background: #9ad6f3; }
:root[data-theme="nagai"] .hero-h1 > span:first-child { background: none; color: #1b2a4a; -webkit-text-fill-color: #1b2a4a; }
:root[data-theme="nagai"] .hero-h1-sub .role { color: #1b2a4a; } :root[data-theme="nagai"] .hero-h1-sub .brand { color: #4f6a8a; }
:root[data-theme="nagai"] .hero-h1-sub .brand b { background: none; color: #ff7a59; -webkit-text-fill-color: #ff7a59; }
:root[data-theme="nagai"] :is(.fall) :is(.h1, .h2) { color: #1b2a4a; text-shadow: none; }
:root[data-theme="nagai"] .fall :is(.eyebrow, .lead, .micro) { color: #1b2a4a; }
:root[data-theme="nagai"] .fall-still { color: rgba(27,42,74,.3); }
:root[data-theme="nagai"] .pill { background: #ff7a59; color: #1b2a4a; }
:root[data-theme="nagai"] .noir-panel.polaroid { border: 2px solid #1b2a4a; box-shadow: 8px 8px 0 #1b2a4a; }
:root[data-theme="nagai"] .dawn .nl-status.err { color: #b3261e; }
/* the pause control says what it does */
:root[data-theme="light"] .btn-quiet { background: #0a7a3d; color: #fff; }
/* v7.5b: Alex chose "dim it": a soft scrim behind the heading so no code line crosses the words at full brightness */
.beat { --scrim: rgba(5,6,5,.9); }
.beat::before { content: ""; position: absolute; z-index: -1; inset: -55% -22%; pointer-events: none; background: radial-gradient(closest-side, var(--scrim) 0%, var(--scrim) 52%, transparent 100%); }
:root[data-theme="light"] .beat { --scrim: rgba(245,245,247,.93); }
:root[data-theme="nagai"] .beat { --scrim: rgba(251,251,247,.62); }
:root[data-theme="light"] .fall-still, :root[data-theme="nagai"] .fall-still { color: rgba(10,122,61,.22); }
:root[data-theme="nagai"] .fall-still { color: rgba(27,42,74,.22); }

/* v7.5b · Nagai's richness for Dark and Light: one art band per theme (original flat SVG), bordered cards with the house hard offset shadow (no blur). */
.skyline, .skyline-echo { display: block; line-height: 0; overflow: hidden; }
.skyline { height: 150px; } .skyline-echo { height: 56px; }
.skyline svg, .skyline-echo svg { display: none; width: 100%; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) :is(.skyline, .skyline-echo) .sk-night { display: block; }
:root[data-theme="light"] :is(.skyline, .skyline-echo) .sk-morn { display: block; }
:root[data-theme="nagai"] :is(.skyline, .skyline-echo) { display: none; }
:root[data-theme="light"] .skyline-echo { background: #f5f5f7; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .skyline-echo { background: #050605; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) :is(.card-tag, .contact-form-wrap, .magnet-card, .teach-media, .yt-thumb, .noir-panel.polaroid) { border: 1px solid rgba(55,240,138,.38); box-shadow: 6px 6px 0 #0b3b22; }
:root[data-theme="light"] :is(.card-tag, .contact-form-wrap, .magnet-card, .teach-media, .yt-thumb, .noir-panel.polaroid) { background-clip: padding-box; border: 1px solid #1d1d1f; box-shadow: 6px 6px 0 #163d28; }
:root[data-theme="light"] :is(.card-tag, .contact-form-wrap, .magnet-card) { background: #fff; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .gn { border-bottom: 1px solid rgba(55,240,138,.28); }
:root[data-theme="light"] .gn { border-bottom: 1px solid #1d1d1f; }
/* v7.5c: .gn-link's .8 opacity came later in the cascade and dimmed the YouTube link below 4.5:1 (axe, Light and some Dark scroll positions) */
.gn .gn-link.gn-yt { opacity: 1; }
:root[data-theme="light"] .gn .gn-link.gn-yt { color: #08662f; }

/* v7.5c */
:root[data-theme="light"] .foot-row, :root[data-theme="light"] .foot-row a, :root[data-theme="light"] .foot-row span { color: #424245; }
:root[data-theme="nagai"] .foot-row, :root[data-theme="nagai"] .foot-row a, :root[data-theme="nagai"] .foot-row span { color: #1b2a4a; }
:root[data-theme="light"] .foot-row a, :root[data-theme="nagai"] .foot-row a { text-decoration: underline; text-underline-offset: 3px; }
/* thumbnails that fail to load: no broken-image glyph, a themed placeholder instead */
.yt-thumb { background: linear-gradient(135deg, #18241d, #0b0d0c); }
:root[data-theme="light"] .yt-thumb { background: linear-gradient(135deg, #e9eceb, #d6dad8); }
:root[data-theme="nagai"] .yt-thumb { background: linear-gradient(135deg, #9ad6f3, #f6bfd3); }
.yt-thumb.no-img::before { content: ">_"; position: absolute; inset: 0; display: grid; place-items: center; font: 500 28px var(--mono); color: rgba(55,240,138,.7); }
:root[data-theme="light"] .yt-thumb.no-img::before { color: rgba(10,122,61,.7); } :root[data-theme="nagai"] .yt-thumb.no-img::before { color: #1b2a4a; }
.yt-thumb img.broken { display: none; }
:root:not([data-theme="light"]):not([data-theme="nagai"]) .chap { background: #050605; color: #a8b0aa; }

/* v7.6.1: the copy sits at the bottom when there is room (margin auto) and starts below the nav when there is not (short windows): never under the nav */
.hero-copy { margin-top: auto; }
.hero-mbp { margin-bottom: auto; }   /* tall windows: the extra room is shared above and below instead of piling up above the headline */
/* v7.6.1: video titles in the house mono stack (Berkeley Mono by local() only, then JetBrains Mono); no dates; at most 3 lines */
.latest .yt-t, .latest-shorts .yt-t { font-family: var(--mono); font-weight: 500; font-size: 15.5px; line-height: 1.4; letter-spacing: 0; margin-top: 12px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.yt-d { display: none; }
@media (max-width: 600px) { .latest .yt-t { font-size: 14px; } }
:root[data-theme="light"] .magnet .micro { color: #6e6e73; } :root[data-theme="nagai"] .magnet .micro { color: #1b2a4a; }
.magnet .micro { margin-top: 10px; max-width: 52ch; }
/* v7.7: on desktop the form sits LEFT and the photo RIGHT, so he looks toward the form (he faces left in the original photo). Phones: photo above the form. */
@media (min-width: 901px) { .contact-form-wrap.contact-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .contact-split .contact-photo { order: 2; } .contact-split .contact-body { order: 1; } }

/* hero eyebrow: the nav already says devdelight, so phones drop the prefix and the line stays on one row */
@media (max-width: 560px) { .hb-pre { display: none; } }

/* v7.8 decoration parity: emoji chapter markers, a second band on home, and a bordered card on the legal pages */
.band-2, .band { line-height: 0; }
.band .sky, .band-2 .sky { display: none; }
:root[data-theme="nagai"] .band .sky, :root[data-theme="nagai"] .band-2 .sky { display: block; }
.legal .wrap { background: var(--panel-l, transparent); }
.legal .wrap > * { position: relative; }
.legal main .wrap, main.legal > .wrap { border: 1px solid rgba(55,240,138,.38); border-radius: 14px; box-shadow: 6px 6px 0 #0b3b22; padding: clamp(20px, 4vw, 44px); background: #0e110f; }
:root[data-theme="light"] main.legal > .wrap { border-color: #1d1d1f; box-shadow: 6px 6px 0 #163d28; background: #fff; }
:root[data-theme="nagai"] main.legal > .wrap { border: 2px solid #1b2a4a; box-shadow: 8px 8px 0 #1b2a4a; background: #fbfbf7; }
main.legal { margin-block: 36px; }
.legal .block a, .legal .block p, .legal .block li { overflow-wrap: anywhere; }
/* the cheat-sheet preview follows the theme (three real renders of page 1) */
.magnet-pdf.th-light, .magnet-pdf.th-nagai { display: none; }
:root[data-theme="light"] .magnet-pdf.th-dark, :root[data-theme="nagai"] .magnet-pdf.th-dark { display: none; }
:root[data-theme="light"] .magnet-pdf.th-light, :root[data-theme="nagai"] .magnet-pdf.th-nagai { display: block; }

/* v7.8: the site's own line icons (tools/icons.json) in place of colour emoji: one stroke weight, the theme's accent colour */
.em { display: inline-flex; align-items: center; margin-right: .4em; font-size: .74em; vertical-align: -.06em; line-height: 1; color: var(--green, var(--accent-ink)); }
.em .ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.eyebrow .em, .legal .block h2 .em, .sub .em, .contact-title .em { font-size: 1.15em; margin-right: .5em; vertical-align: -.2em; }
.sub .em, .contact-title .em { font-size: .9em; }
:root[data-theme="light"] .em { color: #0a7a3d; } :root[data-theme="nagai"] .em { color: #ff7a59; }
/* narrow screens: the art bands show their subjects (moon / sun / landmarks) in the centre window instead of empty sky */
.sun-n, .sky-n { display: none; }
@media (max-width: 700px) { .sun-w, .sky-w { display: none; } .sun-n, .sky-n { display: inline; } }

/* phone: the tech lists become a two-column grid so every item starts on the same left edge (was a ragged flex wrap).
   Long items (.w) take a full row; "Shipped" stays one column. */
@media (max-width: 700px) {
  .spec dd { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; font-size: 18px; line-height: 1.4; }
  .spec dd span { white-space: normal; }
  .spec dd span.w, .spec-wide dd { grid-column: 1 / -1; }
  .spec-wide dd { grid-template-columns: 1fr; }
}
