/* ==========================================================================
   Simple view — plain scrollable portfolio (html[data-view="simple"])
   ========================================================================== */
#simple, .s-reader { display: none; }

html[data-view="simple"] {
  --s-bg: #ffffff; --s-card: #ffffff; --s-line: #ebebea; --s-soft: #f4f4f3; --s-fg: #151515; --s-muted: #6f6f6b; --s-pill: rgb(255 255 255 / 0.8); --s-lift: 0 1px 2px rgb(0 0 0 / 0.04), 0 6px 20px -8px rgb(0 0 0 / 0.12);
}
html[data-view="simple"][data-mode="dark"] {
  --s-bg: #0f0f10; --s-card: #1a1a1b; --s-line: #2a2a2c; --s-soft: #1c1c1e; --s-fg: #f2f2f0; --s-muted: #8e8e8a; --s-pill: rgb(30 30 32 / 0.72); --s-lift: none;
}
html[data-view="simple"] body { overflow: auto; background: var(--s-bg); color: var(--s-fg); user-select: text; -webkit-user-select: text; }
html[data-view="simple"] :is(.wallpaper, .menubar, .desktop, #windows, .dock-wrap, .dock-zone, .lock, .toast, .cc, .spotlight, .launchpad, .scrim, .menu) { display: none !important; }
html[data-view="simple"] #simple { display: block; }
html[data-view="simple"] .s-reader:not([hidden]) { display: flex; }
html[data-view="simple"][data-reading] body { overflow: hidden; }

/* Header: a centred pill of icon tabs (the selected one shows its label) and the theme button */
.s-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 20px; }
.s-top .s-tabs { grid-column: 2; }
.s-top .s-theme { grid-column: 3; justify-self: end; }
.s-pill, .s-theme { background: var(--s-soft); }
.s-tabs { display: flex; gap: 2px; padding: 5px; border-radius: var(--r-pill); }
.s-tabs button { display: inline-flex; align-items: center; height: 36px; padding: 0 9px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500; color: var(--s-muted); cursor: pointer; transition: background var(--d-2), color var(--d-2), padding var(--d-3) var(--ease-out); }
.s-tabs svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s-tabs button span { display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width var(--d-3) var(--ease-out), opacity var(--d-2), margin var(--d-3) var(--ease-out); }
.s-tabs button:hover { color: var(--s-fg); }
.s-theme:hover { background: color-mix(in oklab, var(--s-fg) 9%, var(--s-soft)); }
.s-tabs button[aria-selected="true"] { padding: 0 14px 0 11px; background: var(--accent); color: var(--on-accent); }
.s-tabs button[aria-selected="true"] span { max-width: 80px; margin-left: 7px; opacity: 1; }
.s-tabs button:focus-visible { outline: 2px solid var(--s-fg); outline-offset: 2px; }

/* Intro + filters */
.s-panel { max-width: 1384px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 767px) { .s-panel { padding: 0 20px; } }
/* Hero: an interactive meadow instead of an intro paragraph */
.s-hero { --s-top-h: 80px; display: flex; flex-direction: column; justify-content: center; height: calc(100vh - var(--s-top-h)); height: calc(100svh - var(--s-top-h)); padding: clamp(32px, 6vh, 64px) 0 clamp(56px, 9vh, 104px); margin: 0 0 clamp(40px, 6vh, 72px); box-sizing: border-box; }
/* Landing fills exactly one screen under the nav; the scene flexes to fit so the intro and dots always show. */
.s-hero__stage { position: relative; flex: 1 1 auto; min-height: 220px; max-height: 640px; }
/* A still of the first scene while its artwork loads (js/simple.js heroPoster). It takes the canvas's box and is cropped
   to the scene's own 1.9:1 (wide) or 0.8:1 (tall) frame, so contain lands it exactly where the live scene draws. */
.s-hero__poster { position: absolute; display: block; object-fit: contain; pointer-events: none; transition: opacity 0.4s ease; }
.s-hero__poster.is-done { opacity: 0; }
.s-hero__picker { display: flex; justify-content: center; align-items: center; gap: 6px; width: fit-content; margin: 6px auto 0; color: var(--s-fg); }
.s-hero__scrub { display: flex; }
.s-hero__picker .sound-toggle { margin-left: 2px; }
.s-hero__name { margin-left: 8px; font-size: 12px; color: var(--s-muted); white-space: nowrap; }
.s-hero__title { max-width: 60ch; margin: clamp(32px, 5.5vh, 56px) auto 0; text-align: center; font-size: clamp(17px, 0.9rem + 0.35vw, 21px); font-weight: 400; line-height: 1.4; letter-spacing: -0.01em; text-wrap: balance; }
.s-hero__title span { font-weight: 300; color: var(--s-muted); }
@media (min-width: 641px) { .s-hero__title { max-width: none; white-space: nowrap; } } /* one line on wider screens */
.s-hero__links { display: flex; justify-content: center; gap: 20px; margin: 16px 0 0; font-size: 15px; }
.s-hero__links a { color: var(--s-muted); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--s-muted) 45%, transparent); text-underline-offset: 4px; transition: color var(--d-2), text-decoration-color var(--d-2); }
.s-hero__links a:hover { color: var(--s-fg); text-decoration-color: currentColor; }
/* Home and Work each fill exactly one screen; the footer only shows under the Profile */
.s-hero { margin-bottom: 0; }

/* Work: chapter chips on the left that follow the slider; the slider sits in the middle of the screen */
.s-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
.s-work:not([hidden]) { display: flex; flex-direction: column; height: calc(100vh - 80px); height: calc(100svh - 80px); padding-top: 8px; box-sizing: border-box; overflow: visible clip; }
.s-chapters { display: flex; width: fit-content; max-width: 100%; box-sizing: border-box; margin: 14px auto -6px; padding-inline: 16px; gap: 24px; overflow-x: auto; scrollbar-width: none; }
.s-chapters button { display: inline-flex; align-items: center; height: 36px; padding: 0; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; color: color-mix(in oklab, var(--s-muted) 75%, var(--s-bg)); cursor: pointer; white-space: nowrap; transition: color var(--d-3) var(--ease-out); }
.s-chapters button:hover { color: var(--s-muted); }
.s-chapters button[aria-pressed="true"] { color: var(--s-fg); }
.s-chapters button:focus-visible { outline: 2px solid var(--s-fg); outline-offset: 4px; border-radius: 4px; }
/* Slides are sized to the screen so the slide and its controls fit together, centred, with room around them */
.s-slider { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 0 clamp(48px, 11vh, 120px); }
.s-slider .ccar { --cc-w: min(760px, 52vw, (100svh - 360px) * 16 / 9); }
.s-slider .ccar__ctrl .sound-toggle { width: 40px; height: 40px; }
@media (max-width: 767px) { .s-slider .ccar { --cc-w: 84vw; } .s-chapters { gap: 18px; } .s-chapters button { font-size: 15px; } .s-work:not([hidden]) { height: calc(100svh - 72px); } }
/* The slider runs edge to edge so neighbours peek past the page margins. */
.s-slider { --fg: var(--s-fg); margin-inline: calc(50% - 50vw); }
#simple > main { overflow-x: clip; }

/* Profile */
/* Profile: one calm column, small labels above each section, hairlines between */
.about--sheet { display: block; max-width: none; padding: 0; }
.sheet { display: grid; gap: 16px; padding: 36px 0; border-top: 0.5px solid var(--s-line); }
.sheet--intro { border-top: 0; padding-top: 0; gap: 20px; }
.about--sheet .sheet__label { margin: 0; font-size: 12px; line-height: 1.6; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--s-muted); }
.sheet__photo { display: block; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06); }
.sheet__lede p { margin: 0 0 14px; font-size: 17px; line-height: 1.65; color: var(--s-fg); text-wrap: pretty; }
.sheet__lede p:last-child { margin-bottom: 0; }
.sheet__more { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: 15px; font-weight: 500; }
.sheet__more svg { width: 14px; height: 14px; transition: transform var(--d-2) var(--ease-out); }
.sheet__more:hover svg { transform: translateX(3px); }
.sheet__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sheet__list li { display: grid; grid-template-columns: 96px minmax(0, auto) 1fr; align-items: baseline; gap: 4px 16px; font-size: 15px; }
.sheet__list b { font-weight: 600; }
.sheet__when, .sheet__role { color: var(--s-muted); font-variant-numeric: tabular-nums; }
.sheet__role { text-align: right; }
.about--sheet .story > .eyebrow, .about--sheet .beat__cta { display: none; }
.about--sheet .story { gap: 28px; }
.about--sheet .beat__text { font-size: 15px; line-height: 1.6; color: var(--s-muted); }
.sheet__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; font-size: 15px; }
.sheet__link { text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--s-muted) 50%, transparent); text-underline-offset: 4px; transition: text-decoration-color var(--d-2); }
.sheet__link:hover { text-decoration-color: currentColor; }
@media (max-width: 640px) {
  .sheet__list li { grid-template-columns: 72px minmax(0, 1fr); }
  .sheet__role { grid-column: 2; text-align: left; }
}


/* Reader (full case study) */
.s-reader { position: fixed; inset: 0; z-index: 40; flex-direction: column; background: var(--s-bg); animation: s-reader-in var(--d-4) var(--ease-out); }
@keyframes s-reader-in { from { opacity: 0; transform: translateY(16px); } }
/* Back to the work slider: a floating pill where the view switch sits (the switch hides while reading) */
.s-back { position: fixed; z-index: 2; top: 16px; left: 20px; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 18px 0 14px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500; color: var(--s-fg); background: color-mix(in oklab, var(--s-bg) 82%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 8px 24px -8px rgb(0 0 0 / 0.25); cursor: pointer; transition: transform var(--d-2) var(--ease-spring), background var(--d-2); }
.s-back:hover { transform: translateX(-2px); background: var(--s-bg); }
.s-back:active { transform: scale(0.96); }
.s-back svg { width: 16px; height: 16px; }
.s-back:focus-visible { outline: 2px solid var(--s-fg); outline-offset: 2px; }
.s-reader__body { flex: 1; overflow: auto; }
.s-reader .lightbox { position: fixed; top: 0 !important; border-radius: 0; }

@media (max-width: 640px) {
  .s-top { padding: 12px; }
  .s-hero { --s-top-h: 72px; padding-top: 20px; padding-bottom: 84px; }
  .s-back { top: 12px; left: 12px; height: 42px; }
}

/* Light / dark: one round button, sun ⇄ moon */
.s-theme { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--s-fg); transition: transform var(--d-2) var(--ease-spring); }
.s-theme:hover { transform: scale(1.06); }
.s-theme:active { transform: scale(0.94); }
.s-theme span { position: absolute; display: grid; place-items: center; transition: transform var(--d-4) var(--ease-spring), opacity var(--d-2); }
.s-theme svg { width: 18px; height: 18px; }
.s-theme__moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-mode="dark"] .s-theme__sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-mode="dark"] .s-theme__moon { opacity: 1; transform: none; }

/* ---------- Profile: a Lego shelf; each brick opens a side panel ---------- */
.s-me:not([hidden]) { --me-w: min(1120px, 100%, (100svh - 150px) * 1.667); display: flex; flex-direction: column; justify-content: center; height: calc(100svh - 80px); padding-bottom: 12px; box-sizing: border-box; }
.s-me__inner { display: flex; flex-direction: column; gap: clamp(16px, 3vh, 28px); width: var(--me-w); margin-inline: auto; transition: transform var(--d-4) var(--ease-out); }
.s-me__foot { margin-block: 0; text-align: center; font-size: 13px; color: var(--s-muted); }
@media (max-width: 640px) { .s-me:not([hidden]) { --me-w: min(100%, (100svh - 140px) * 0.571); height: calc(100svh - 72px); } }

.lg { --lg-ink: var(--s-fg); --lg-paper: var(--s-bg); --lg-top: color-mix(in oklab, var(--s-fg) 3%, var(--s-bg)); --lg-side: color-mix(in oklab, var(--s-fg) 9%, var(--s-bg)); display: block; width: 100%; height: auto; overflow: visible; }
.lg :is(path, ellipse, rect):not(.o-canvas *, .lg-hit, .lg-beam) { stroke: var(--lg-ink); stroke-width: 1.1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* The goose painting keeps its own colours and brush strokes; only its gilt frame is line art */
.lg .o-gilt { fill: #c39a55; }
.lg .o-gilt2 { fill: #dcb873; stroke: none; }
.o-art { transform-box: fill-box; transform-origin: 50% 0; transition: rotate 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); }
.lg-item.lg-obj--painting:is(:hover, :focus-visible, .is-open) .lg-lift { transform: none; }
.lg-item.lg-obj--painting:is(:hover, :focus-visible, .is-open) .o-art { rotate: -3deg; }
.lg .f-front { fill: var(--lg-paper); }
.lg .f-side { fill: var(--lg-side); }
.lg .f-top { fill: var(--lg-top); }
.lg .w-back, .lg .lg-frame { fill: var(--lg-paper); }
.lg :is(.w-side, .w-top) { fill: var(--lg-side); }
.lg .w-floor { fill: var(--lg-top); }
.lg .lg-line { fill: none; }
.lg .o-band { fill: none; stroke-opacity: 0.55; }
.lg .o-string { fill: none; stroke-width: 1; }
.lg .o-table { fill: var(--lg-paper); }
.lg .o-keys :is(circle, rect) { fill: var(--lg-ink); stroke: none; }
.lg-item.lg-obj--typewriter:is(:hover, :focus-visible, .is-open) .lg-lift { transform: none; }
.lg-item.lg-obj--typewriter:is(:hover, :focus-visible, .is-open) .o-letter { transform: translateY(-16px); }
.lg-lamp { cursor: pointer; outline: none; transform-box: view-box; }
.lg .lamp-shade { fill: var(--lg-ink); }
.lg .lamp-bead { fill: var(--lg-ink); }
.lg-pull { cursor: grab; transform-box: view-box; transition: transform 0.6s cubic-bezier(0.3, 1.9, 0.5, 1); }
.lg-pull.is-dragging { cursor: grabbing; transition: none; }
.lg-pull.is-pulled { transform: translateY(calc(var(--reach) * 0.6)); transition-duration: 0.1s; }
.lg-lamp:is(:hover, :focus-visible) .lg-pull:not(.is-pulled, .is-dragging) { transform: translateY(3px); }
.lg-lamp.is-swaying { animation: lamp-sway 1.9s cubic-bezier(0.3, 0, 0.3, 1); }
@keyframes lamp-sway { 12% { rotate: 3.5deg; } 30% { rotate: -2.6deg; } 50% { rotate: 1.6deg; } 70% { rotate: -0.8deg; } 100% { rotate: 0deg; } }
.lg-beam { pointer-events: none; opacity: 0; transition: opacity 0.4s var(--ease-out); }
.lg.is-lit .lg-beam { opacity: 1; }
.lg.is-flicker :is(.lg-beam, .lg-glow, .lg-bulb) { animation: lamp-flicker 0.7s steps(1); }
@keyframes lamp-flicker { 0% { opacity: 0.15; } 14% { opacity: 1; } 28% { opacity: 0.25; } 42% { opacity: 1; } 57% { opacity: 0.5; } 71% { opacity: 1; } }
.lg .lg-bulb { fill: var(--lg-side); transition: fill var(--d-3); }
.lg.is-lit .lg-bulb { fill: #ffd27a; }
.lg-glow { pointer-events: none; opacity: 0; transition: opacity 0.6s var(--ease-out); }
.lg.is-lit .lg-glow { opacity: 1; }
.lg .o-board { fill: #3a3a3a; }
.lg .o-felt { fill: #232323; stroke: none; }
.lg .o-groove { fill: none; stroke: #fff; stroke-opacity: 0.07; }
.lg .o-letters { fill: #f4f2ec; text-anchor: middle; dominant-baseline: central; font-size: 14px; font-weight: 600; letter-spacing: 0.14em; }
.lg .o-arrow { fill: none; stroke: var(--lg-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lg .f-text { fill: var(--lg-ink); text-anchor: middle; dominant-baseline: central; font-weight: 500; letter-spacing: -0.01em; transition: fill var(--d-3); }
.lg .f-head.f-side { fill: #ffcc33; }
.lg .f-head.f-top { fill: #ffdd70; }
.lg .f-ink { fill: #1b1b1b; stroke: none; }
.lg .f-smile { fill: none; stroke: #1b1b1b; stroke-width: 1.8; stroke-linecap: round; }
.lg .pl-a { fill: #6aab6c; }
.lg .pl-b { fill: #4c8d56; }
.lg .pl-stem { fill: none; stroke: #3f7a47; stroke-width: 1.6; }
.lg .pl-soil { fill: var(--lg-side); }
.lg .o-paper { fill: var(--lg-paper); }
.lg .o-clip { fill: var(--lg-side); }
.lg .o-lines { fill: none; stroke: var(--lg-ink); stroke-opacity: 0.35; stroke-linecap: round; }
.lg :is(.o-title, .o-hand) { fill: var(--lg-ink); text-anchor: middle; dominant-baseline: central; font-weight: 600; }
.lg .o-title { font-size: 13px; }
.lg .o-hand { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.lg-deco .pl-sway, .o-letter { transform-box: fill-box; transform-origin: 50% 100%; }
.lg-deco:hover .pl-sway { animation: lg-sway 1.4s var(--ease-out); }
@keyframes lg-sway { 25% { rotate: -4deg; } 55% { rotate: 3deg; } 80% { rotate: -1deg; } }
.o-letter { transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.lg-item:is(:hover, :focus-visible, .is-open) .o-letter { transform: translateY(-14px); }

.lg-item { cursor: pointer; outline: none; }
.lg .lg-hit { fill: transparent; stroke: none; }
.lg.has-hits .lg-lift { pointer-events: none; }
.lg-lift { transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.lg-item :is(.f-front, .f-top, .f-side) { transition: fill var(--d-3); }
.lg-item:is(:hover, :focus-visible, .is-open) .lg-lift { transform: translateY(-10px); }
.lg-item:is(:hover, :focus-visible, .is-open) .f-front:not(.f-head) { fill: var(--c); }
.lg-item:is(:hover, :focus-visible, .is-open) .f-top:not(.f-head) { fill: color-mix(in oklab, var(--c) 70%, #fff); }
.lg-item:is(:hover, :focus-visible, .is-open) .f-side:not(.f-head) { fill: color-mix(in oklab, var(--c) 80%, #000); }
.lg-item:is(:hover, :focus-visible, .is-open) .f-text { fill: var(--c-ink); }
.lg-head { transform-box: fill-box; transform-origin: 50% 100%; }
.lg-item:hover .lg-head { animation: lg-nod 0.7s var(--ease-out); }
@keyframes lg-nod { 30% { rotate: -7deg; } 65% { rotate: 4deg; } }
@media (prefers-reduced-motion: reduce) { .lg-lift, .o-letter { transition: none; } .lg-item:hover .lg-head, .lg-deco:hover .pl-sway { animation: none; } }

.s-drawer { position: fixed; z-index: 40; top: 16px; right: 16px; bottom: 16px; width: min(480px, calc(100vw - 32px)); display: flex; flex-direction: column; border-radius: 24px; background: var(--s-bg); box-shadow: 0 0 0 0.5px var(--s-line), 0 24px 64px -16px rgb(0 0 0 / 0.28); opacity: 0; transform: translateX(28px); transition: opacity var(--d-3) var(--ease-out), transform var(--d-4) var(--ease-out); }
.s-drawer.is-open { opacity: 1; transform: none; }
.s-drawer[hidden] { display: none; }
.s-drawer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 10px 28px; }
.s-drawer__bar h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; outline: none; }
.s-drawer__x { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--s-soft); color: var(--s-fg); cursor: pointer; transition: transform var(--d-2) var(--ease-spring); }
.s-drawer__x:hover { transform: scale(1.06); }
.s-drawer__x svg { width: 12px; height: 12px; }
.s-drawer__body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 8px 28px 28px; }
.s-drawer [hidden] { display: none !important; }
.s-drawer .about--sheet .sheet__label { display: none; }
.s-drawer .sheet { padding: 0; border: 0; }
.s-drawer .sheet__list { gap: 22px; }
.s-drawer .sheet__list li { grid-template-columns: 104px minmax(0, 1fr); }
.sheet__desc { grid-column: 2; margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--s-muted); text-wrap: pretty; }
.s-drawer .sheet__role { grid-column: 2; text-align: left; }
.sheet__note { margin: 0; font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.art-goose { margin: 0 0 24px; }
.art-goose img { display: block; width: min(100%, 320px); height: auto; margin: 0 auto; box-sizing: border-box; padding: 4px; background: #dcb873; border: 10px solid #c39a55; border-radius: 4px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 16px 36px -12px rgb(0 0 0 / 0.4); }
.art-goose figcaption { margin-top: 14px; text-align: center; font-size: 13px; color: var(--s-muted); }
.sheet--art { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sheet__text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--s-fg); text-wrap: pretty; }
@media (max-width: 640px) {
  .s-drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 80svh; transform: translateY(32px); }
  .s-drawer__bar { padding-left: 20px; }
  .s-drawer__body { padding: 4px 20px 24px; }
}

/* ---------- Case pages in the Simple reader: the site's own system. White page, soft grey
   surfaces with no shadows, pill tags and buttons, Inter and Instrument Serif, black accent.
   (Piper OS windows keep the Windows-flavoured case styling in apps.css.) ---------- */
html[data-view="simple"] .s-reader :is(.sc, .art) {
  --sc-bg: var(--s-bg); --sc-surface: var(--s-soft); --sc-soft: var(--s-soft); --sc-line: var(--s-line);
  --sc-fg: var(--s-fg); --sc-fg-2: color-mix(in oklab, var(--s-fg) 70%, var(--s-bg)); --sc-fg-3: var(--s-muted);
  --sc-accent: var(--s-fg); --sc-ui: var(--font-sans); --sc-serif: var(--p-serif);
  color-scheme: light;
}
html[data-view="simple"][data-mode="dark"] .s-reader :is(.sc, .art) { color-scheme: dark; }
.s-reader .sc-hero { margin: 12px 12px 0; border-radius: 28px; min-height: clamp(520px, calc(100svh - 24px), 880px); }
.s-reader .sc-sec h2 { font-weight: 400; letter-spacing: -0.005em; }
.s-reader :is(.sc-highlights b, .sc-herocard b, .sc-numbered__n, .sc-brand b) { font-family: var(--font-sans); }
/* Buttons and links match the rest of the site */
.s-reader .sc .btn { height: auto; min-height: 40px; padding: 8px 16px; border: 0; box-shadow: none; background: var(--s-soft); color: var(--s-fg); font-weight: 500; }
.s-reader .sc .btn:hover { background: color-mix(in oklab, var(--s-fg) 9%, var(--s-soft)); }
.s-reader .sc-intro .btn { background: color-mix(in oklab, var(--s-bg) 70%, transparent); }
.s-reader .case-foot { border-top: 0.5px solid var(--s-line); }
.s-reader .case-foot__pill small { color: var(--s-muted); }
/* Instrument Serif is a display face: headings only, at its own weight, with room after italics */
.s-reader .art-head h1 { font-weight: 400; }
.s-reader :is(.sc-sec h2, .art-head h1) em { margin-right: 0.08em; }
.s-reader .art-body { font: 400 18px/1.65 var(--font-sans); }
.s-reader .art-body h2 { font-weight: 600; }
.s-reader .art-pull p { font-style: normal; }
@media (max-width: 600px) { .s-reader .art-body { font-size: 17px; } }
/* Stages and carousel controls */
.s-reader .sc-stage:not(.sc-stage--plain, .sc-stage--bare) { border-radius: 20px; }
.s-reader .sc-carousel__btn { border: 0; background: var(--s-soft); color: var(--s-fg); -webkit-backdrop-filter: none; backdrop-filter: none; transition: background var(--d-2); }
.s-reader .sc-carousel__btn:not(:disabled):hover { background: color-mix(in oklab, var(--s-fg) 9%, var(--s-soft)); }
/* The article has no hero under the floating All work button, so it starts below it */
.s-reader .art-col { padding-top: 88px; }
@media (max-width: 640px) { .s-reader .art-col { padding-top: 72px; } }

/* ---------- Case cards, editorial: no boxes. Each item hangs from a thin rule with a small
   mono number; lists of things are plain text split by slashes. Flows are drawn as
   diagrams: steps on a line, and one source branching to its targets. On hover a
   rule, node or number takes a Lego colour (red, yellow, blue, green, orange along a row). */
.s-reader .sc .sc-card { --hue: #e8493d; position: relative; padding: 14px 0 0; border: 0; border-top: 1.5px solid var(--s-fg); border-radius: 0; background: none; box-shadow: none; transition: border-color 0.25s, box-shadow 0.25s; }
.s-reader .sc :is(.sc-card, .sc-chips li):nth-child(5n + 2) { --hue: #f2b400; }
.s-reader .sc :is(.sc-card, .sc-chips li):nth-child(5n + 3) { --hue: #3a76df; }
.s-reader .sc :is(.sc-card, .sc-chips li):nth-child(5n + 4) { --hue: #2f9e58; }
.s-reader .sc :is(.sc-card, .sc-chips li):nth-child(5n + 5) { --hue: #ff7a1a; }
.s-reader .sc .sc-card:hover { border-top-color: var(--hue); box-shadow: inset 0 1.5px 0 var(--hue); }
.s-reader .sc :is(.sc-cards, .sc-highlights) { column-gap: 32px; row-gap: 40px; }
.s-reader .sc :is(.sc-card__icon, .sc-step__icon, .sc-chips__icon) { display: none; }
.s-reader .sc .sc-card h3 { margin: 8px 0 4px; font: 600 17px/1.3 var(--font-sans); }
.s-reader .sc .sc-card p { font-size: 15px; line-height: 1.5; }
/* Numbers: a counter on plain card grids, the existing numerals on numbered lists */
.s-reader .sc .sc-cards:not(.sc-numbered) { counter-reset: sc; }
.s-reader .sc .sc-cards:not(.sc-numbered) > .sc-card::before { counter-increment: sc; content: counter(sc, decimal-leading-zero); }
.s-reader .sc :is(.sc-cards:not(.sc-numbered) > .sc-card::before, .sc-numbered__n, .sc-step__n) { display: block; margin: 0; font: 500 11px/16px var(--font-mono); letter-spacing: 0.04em; color: var(--s-muted); transition: color 0.25s; }
.s-reader .sc .sc-card:hover:is(*, .sc-step) :is(.sc-numbered__n, .sc-step__n), .s-reader .sc .sc-cards:not(.sc-numbered) > .sc-card:hover::before { color: var(--hue); }
/* Highlights: the figure is the headline */
.s-reader .sc .sc-highlights b { display: block; margin-top: 4px; font-size: 44px; font-weight: 500; letter-spacing: -0.03em; transition: color 0.25s; }
.s-reader .sc .sc-highlights .sc-card:hover b { color: var(--hue); }
/* Plain lists instead of pills: what shipped, tags, outputs and the small labels above flows */
.s-reader .sc :is(.sc-chips, .sc-tags) { gap: 6px 0; }
.s-reader .sc :is(.sc-chips li, .sc-tags li) { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transition: color 0.2s; }
.s-reader .sc .sc-chips li { font: 400 17px/1.5 var(--font-sans); color: var(--s-fg); }
.s-reader .sc .sc-tags li { font: 400 14px/1.5 var(--font-sans); color: var(--s-muted); }
.s-reader .sc :is(.sc-chips li, .sc-tags li, .sc-outputs li):not(:last-child)::after { content: "/"; margin: 0 12px; color: color-mix(in oklab, var(--s-fg) 25%, var(--s-bg)); }
.s-reader .sc .sc-chips li:hover { color: var(--hue); }
.s-reader .sc .sc-outputs { margin-top: 24px; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.s-reader .sc .sc-outputs ul { gap: 0; }
.s-reader .sc .sc-outputs li { padding: 0; border-radius: 0; background: none; font: 500 13px/18px var(--font-sans); }
.s-reader .sc .sc-tag { padding: 0; border-radius: 0; background: none; box-shadow: none; font: 500 13px/18px var(--font-sans); color: var(--s-muted); }
/* Steps as a diagram: numbered nodes on one line */
.s-reader .sc .sc-flow { column-gap: 24px; }
.s-reader .sc .sc-step { padding: 30px 0 0; border-top: 0; }
.s-reader .sc .sc-step:hover { box-shadow: none; }
.s-reader .sc .sc-step::before { content: ""; position: absolute; top: 0; left: 0; width: 13px; height: 13px; box-sizing: border-box; border: 1.5px solid var(--s-fg); border-radius: 50%; background: var(--s-bg); transition: background 0.25s, border-color 0.25s, scale 0.4s cubic-bezier(0.3, 1.8, 0.5, 1); }
.s-reader .sc .sc-step:not(:last-child)::after { content: ""; position: absolute; top: 6px; left: 19px; right: -18px; height: 1.5px; background: color-mix(in oklab, var(--s-fg) 30%, var(--s-bg)); }
.s-reader .sc .sc-step:hover::before { border-color: var(--hue); background: var(--hue); scale: 1.25; }
/* One source branching to many, drawn as a diagram: an outlined pill, a stem, a bar, and a line
   down to each outlined target node. Hover tints the node in its colour. */
.s-reader .sc .sc-fan { --wire: color-mix(in oklab, var(--s-fg) 28%, var(--s-bg)); gap: 0; }
.s-reader .sc .sc-fan .sc-card { border: 1px solid color-mix(in oklab, var(--s-fg) 22%, var(--s-bg)); border-radius: 14px; background: var(--s-bg); transition: border-color 0.25s, background 0.25s, color 0.25s; }
.s-reader .sc .sc-fan .sc-card:hover { box-shadow: none; }
.s-reader .sc .sc-fan__src { display: flex; justify-self: center; align-items: center; gap: 10px; margin-bottom: 26px; padding: 10px 20px 10px 16px; border-radius: var(--r-pill) !important; }
.s-reader .sc .sc-fan__src::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 27px; background: var(--wire); }
.s-reader .sc .sc-fan__src .sc-card__icon { display: block; width: 20px; height: 20px; }
.s-reader .sc .sc-fan__src h3 { margin: 0; font-size: 16px; }
.s-reader .sc .sc-fan .sc-cards { --g: 24px; position: relative; column-gap: var(--g); row-gap: 12px; padding-top: 24px; }
.s-reader .sc .sc-fan .sc-cards::before { content: ""; position: absolute; top: 0; left: calc((100% - 3 * var(--g)) / 8); right: calc((100% - 3 * var(--g)) / 8); height: 1.5px; background: var(--wire); }
.s-reader .sc .sc-fan .sc-cards > .sc-card { padding: 18px 16px; text-align: center; }
.s-reader .sc .sc-fan .sc-cards > .sc-card::before { content: none; }
.s-reader .sc .sc-fan .sc-cards > .sc-card::after { content: ""; position: absolute; left: 50%; top: -25px; width: 1.5px; height: 24px; background: var(--wire); }
.s-reader .sc .sc-fan .sc-cards > .sc-card h3 { margin: 0 0 2px; font-size: 16px; }
.s-reader .sc .sc-fan .sc-card:hover { border-color: var(--hue); background: color-mix(in oklab, var(--hue) 12%, var(--s-bg)); }
.s-reader .sc .sc-fan__src:hover { border-color: color-mix(in oklab, var(--s-fg) 22%, var(--s-bg)); background: var(--s-bg); }
/* A/B results sit on rules too */
.s-reader .sc .sc-ab { column-gap: 32px; }
.s-reader .sc .sc-ab__pill { border-radius: var(--r-pill); }
@media (max-width: 900px) {
  .s-reader .sc .sc-step { display: block; padding: 0 0 0 30px; }
  .s-reader .sc .sc-step:not(:last-child)::after { top: 19px; left: 6px; right: auto; bottom: -18px; width: 1.5px; height: auto; }
  .s-reader .sc .sc-flow { row-gap: 24px; }
}
@media (max-width: 600px) {
  .s-reader .sc .sc-fan .sc-cards { padding-top: 0; }
  .s-reader .sc .sc-fan .sc-cards::before, .s-reader .sc .sc-fan .sc-cards > .sc-card::after, .s-reader .sc .sc-fan__src::after { display: none; }
  .s-reader .sc .sc-fan__src { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .s-reader .sc .sc-step:hover::before { scale: none; } }
