/* ───────── Tokens (DESIGN.md §2, §3, §5, §7) ───────── */
:root {
  --greyscale-white: 255 255 255;  --greyscale-100: 244 244 244;  --greyscale-200: 216 217 217;
  --greyscale-default: 177 179 179; --greyscale-700: 133 135 135; --greyscale-800: 111 112 112;
  --greyscale-900: 89 90 90;       --greyscale-1000: 60 60 60;
  --greyscale-dm-light: 24 24 24;  --greyscale-black: 4 4 4;
  --accent-yellow: 255 199 0;      --accent-red: 200 16 46;      --ok: 52 199 89;

  /* Spacing scale (DESIGN.md §4.1): 4 · 8 · 12 · 16 · 24 · 32 · 40 · 48 · 64 · 96 · 112 · 144 */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --space-7: 40px; --space-8: 48px; --space-9: 64px; --space-10: 96px; --space-11: 112px; --space-12: 144px;
  /* Roles */
  --gutter: var(--space-6);        /* side padding inside every panel */
  --section-y: var(--space-12);    /* vertical padding of every section */
  --head-gap: var(--space-9);      /* heading block → content */
  --grid-gap: var(--space-2);      /* gap between cards and tiles */

  --bg-page:        rgb(var(--greyscale-white));
  --surface-card:   rgb(var(--greyscale-900) / .05);
  --frost-nav:      rgb(var(--greyscale-100) / .85);
  --text-primary:   rgb(var(--greyscale-black));
  --text-secondary: rgb(var(--greyscale-900));
  --dot-on:         rgb(var(--greyscale-black));
  --btn-bg:         rgb(var(--greyscale-black));
  --btn-fg:         rgb(var(--greyscale-white));
  --focus:          rgb(var(--accent-yellow));

  --font-ntype: "Instrument Sans", "NType82-Regular", sans-serif; /* NType82 substitute */
  --font-ndot:  "Doto", "Ndot-Regular", monospace;
  --font-body:  "Geist", sans-serif;
  --font-mono:  "Geist Mono", monospace;

  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  --ease-expressive: cubic-bezier(.74, 0, .19, .99);
  --ease-out: cubic-bezier(.23, 1, .32, 1);       /* entrances and hover lifts */
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);    /* sheets and morphing panels */
  --radius: 4px;
  --radius-lg: 8px;
}
:root[data-theme="dark"] {
  --bg-page:        rgb(var(--greyscale-black));
  --surface-card:   rgb(var(--greyscale-white) / .05);
  --frost-nav:      rgb(var(--greyscale-900) / .6);
  --text-primary:   rgb(var(--greyscale-white));
  --text-secondary: rgb(var(--greyscale-default));
  --dot-on:         rgb(var(--greyscale-white));
  --btn-bg:         rgb(var(--greyscale-white));
  --btn-fg:         rgb(var(--greyscale-black));
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-ntype);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease-standard), color .4s var(--ease-standard);
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

/* ───────── Header: split segmented nav + card dropdowns (DESIGN.md §6, §9.1) ───────── */
:root {
  --seg-hover:   rgb(var(--greyscale-900) / .06);
  --seg-active:  rgb(var(--greyscale-900) / .12);
  --pcard:       rgb(var(--greyscale-100) / .94);
  --pcard-active: rgb(var(--greyscale-200) / .92);
  --thumb-bg:    rgb(var(--greyscale-white));
}
:root[data-theme="dark"] {
  --seg-hover:   rgb(var(--greyscale-white) / .07);
  --seg-active:  rgb(var(--greyscale-white) / .14);
  --pcard:       rgb(var(--greyscale-dm-light) / .94);
  --pcard-active: rgb(var(--greyscale-1000) / .92);
  --thumb-bg:    rgb(var(--greyscale-black));
}
.header {
  position: fixed; inset: 0 0 auto; z-index: 20; padding: 8px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  pointer-events: none;
}
.header > * { pointer-events: auto; }
.navgroup { position: relative; }
.seg {
  display: flex; align-items: center; gap: 2px; height: 48px; padding: 4px;
  border-radius: var(--radius-lg); background: var(--frost-nav);
  -webkit-backdrop-filter: blur(45px); backdrop-filter: blur(45px);
}
.seg__item {
  height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: var(--radius); background: none; cursor: pointer; text-decoration: none;
  color: var(--text-secondary); white-space: nowrap;
  font: 400 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
  transition: background-color .2s var(--ease-standard), color .2s var(--ease-standard), transform .16s var(--ease-out);
}
.seg__item:hover { color: var(--text-primary); background: var(--seg-hover); }
.seg__item[aria-current="true"], .seg__item[aria-expanded="true"] { color: var(--text-primary); background: var(--seg-active); }
.seg__item:focus-visible { outline-offset: -2px; }
.seg__brand { color: var(--text-primary); padding: 0 12px; }
.seg__brand .logo { display: block; height: 22px; width: auto; aspect-ratio: 480 / 350; overflow: visible; }
html.is-loading .seg__brand .logo { opacity: 0; }
.seg__brand:hover { background: none; opacity: .7; }
.seg__caret { width: 8px; height: 8px; transition: transform .2s var(--ease-standard); }
[aria-expanded="true"] > .seg__caret { transform: rotate(180deg); }
.seg__time { cursor: default; font-variant-numeric: tabular-nums; }
.seg__time:hover { background: none; color: var(--text-secondary); }
.icon-btn {
  border: 0; background: none; color: var(--text-primary); cursor: pointer;
  display: grid; place-items: center; transition: background-color .2s var(--ease-standard), transform .16s var(--ease-out);
}
.seg .icon-btn { width: 40px; height: 40px; padding: 12px; border-radius: var(--radius); }
.seg .icon-btn:hover { opacity: 1; background: var(--seg-hover); }
.only-mobile { display: none !important; }

/* Dropdown panels: stacks of frosted cards */
.panel {
  position: absolute; top: 56px; width: 360px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  visibility: hidden; pointer-events: none;
}
.panel--right { right: 0; width: 392px; }
.panel > * {
  opacity: 0; transform: translateY(-6px);
  transition: opacity .2s var(--ease-out), transform .25s var(--ease-out);
}
.panel.open { visibility: visible; pointer-events: auto; }
.panel.open > * { opacity: 1; transform: none; }
.panel.open > :nth-child(2) { transition-delay: 40ms; }
.panel.open > :nth-child(3) { transition-delay: 80ms; }
.panel.open > :nth-child(4) { transition-delay: 120ms; }
.panel.open > :nth-child(5) { transition-delay: 160ms; }

.pcard {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 16px;
  padding: 12px 12px 14px 16px; border-radius: var(--radius-lg); text-decoration: none; color: inherit;
  background: var(--pcard); -webkit-backdrop-filter: blur(45px); backdrop-filter: blur(45px);
  transition: background-color .2s var(--ease-standard), opacity .2s var(--ease-standard), transform .25s var(--ease-out);
}
.pcard--plain { grid-template-columns: 1fr; }
.pcard.is-active, a.pcard:hover { background: var(--pcard-active); }
.pcard__main { display: flex; flex-direction: column; min-width: 0; }
.pcard__label {
  margin: 2px 0 12px; color: var(--text-secondary);
  font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
}
.pcard__list { list-style: none; margin: 0; padding: 0; }
.pcard__list a {
  display: block; padding: 3px 0; text-decoration: none; color: var(--text-secondary);
  font: 400 20px/1.3 var(--font-ntype); transition: color .2s var(--ease-standard);
}
.pcard.is-active .pcard__list a { color: var(--text-primary); }
.pcard__list a:hover, .pcard__list a.is-hot { color: var(--text-primary); }
.pcard__list a.is-hot::after { content: " ›"; font-family: var(--font-mono); }
.pcard__title { margin: 0; font: 400 20px/1.15 var(--font-ntype); }
.pcard__value {
  margin-top: auto; padding-top: 24px; font: 400 12px/1.25 var(--font-mono);
  text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pcard__thumb {
  width: 104px; height: 120px; border-radius: var(--radius); overflow: hidden;
  background: var(--thumb-bg); display: grid; place-items: center;
}
.pcard__thumb .card__art { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: top center; }
.pcard__thumb .glyph { width: 56px; height: 56px; }
.pcard__thumb:has(.glyph) { background: none; }
.panel .btn { height: 40px; }
.btn.btn--ghost { background: var(--pcard); color: var(--text-primary); -webkit-backdrop-filter: blur(45px); backdrop-filter: blur(45px); }
.btn.btn--ghost:hover { opacity: 1; background: var(--pcard-active); }

@media (max-width: 1023px) {
  .seg__time { display: none; }
}
@media (max-width: 767px) {
  .only-desktop { display: none !important; }
  .only-mobile { display: inline-flex !important; }
  .pcard.only-mobile { display: grid !important; }
  .panel, .panel--right { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; }
  .pcard__list a { font-size: 22px; }
  .pcard--more { display: none; }
  body::after {
    content: ""; position: fixed; inset: 0; z-index: 15; pointer-events: none; opacity: 0;
    background: color-mix(in srgb, var(--bg-page) 70%, transparent);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    transition: opacity .2s var(--ease-standard);
  }
  body.nav-open::after { opacity: 1; pointer-events: auto; }
  .pcard__thumb { width: 88px; height: 104px; }
}


/* Section tokens: Work panel and footer follow the theme (white in light, black in dark) */
:root {
  --sec-bg:         rgb(var(--greyscale-white));
  --sec-fg:         rgb(var(--greyscale-black));
  --sec-muted:      rgb(var(--greyscale-900));
  --sec-faint:      rgb(var(--greyscale-700));
  --sec-line:       rgb(var(--greyscale-black) / .12);
  --sec-guide:      rgb(var(--greyscale-black) / .4);
  --sec-card:       rgb(var(--greyscale-white));
  --sec-card-hover: rgb(var(--greyscale-black) / .03);
  --sec-ring:       rgb(var(--greyscale-black) / .12);
  --sec-dot:        rgb(var(--greyscale-black) / .16);
  --sec-dot-alt:    rgb(var(--greyscale-black));
  --sec-tip:        rgb(var(--greyscale-100) / .94);
}
:root[data-theme="dark"] {
  --sec-bg:         rgb(var(--greyscale-black));
  --sec-fg:         rgb(var(--greyscale-white));
  --sec-muted:      rgb(var(--greyscale-default));
  --sec-faint:      rgb(var(--greyscale-800));
  --sec-line:       rgb(var(--greyscale-white) / .12);
  --sec-guide:      rgb(var(--greyscale-white) / .45);
  --sec-card:       rgb(var(--greyscale-dm-light));
  --sec-card-hover: rgb(var(--greyscale-1000) / .6);
  --sec-ring:       transparent;
  --sec-dot:        rgb(var(--greyscale-white) / .2);
  --sec-dot-alt:    rgb(var(--greyscale-white));
  --sec-tip:        rgb(var(--greyscale-dm-light) / .9);
}

/* ───────── Hero section ───────── */
.hero {
  position: relative;
  min-height: 100svh;
  padding: var(--space-11) var(--gutter) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 680px);
  grid-template-rows: 1fr auto;
  justify-content: center;
}

.intro, .status { position: relative; z-index: 1; }
.intro { align-self: center; text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  margin: 0 0 12px; font: 800 20px/1 var(--font-ndot); text-transform: uppercase; letter-spacing: .02em;
}
.welcome {
  margin: 0 0 40px; font: 400 12px/1.25 var(--font-mono); text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-secondary);
}
.intro__about {
  margin: -16px 0 32px; max-width: 56ch; font: 400 14px/1.5 var(--font-ntype); color: var(--text-secondary);
}
.headline {
  margin: 0 0 40px; font-family: var(--font-ntype); font-weight: 400;
  font-size: 48px; line-height: 1; letter-spacing: -.01em; text-wrap: balance;
}
.headline a {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: opacity .2s var(--ease-standard);
}
.headline a:hover { opacity: .7; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 12px 16px;
  border-radius: var(--radius); background: var(--btn-bg); color: var(--btn-fg); text-decoration: none;
  font: 400 12px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  transition: opacity .2s var(--ease-standard), transform .16s var(--ease-out);
}
.btn:hover { opacity: .85; }
.btn svg { width: 16px; height: 16px; }
/* Press feedback: a small scale that responds the instant the pointer goes down */
.seg__item:active, .icon-btn:active, .btn:active, .chip:active, .work__tab:active { transform: scale(.97); }
.seg__time:active { transform: none; }
a.pcard:active { transform: scale(.985); }

/* ───────── Pixel icons (DESIGN.md §8.1) ───────── */
.glyph { width: 88px; height: 88px; display: block; overflow: visible; }
.glyph rect { fill: var(--dot-on); transition: opacity .3s var(--ease-standard); }
.glyph.booting rect.on { opacity: 0; }
@keyframes flicker { 0% { opacity: .15; } 100% { opacity: 1; } }

/* ───────── Live status line ───────── */
.status {
  grid-column: 1 / -1; justify-self: center; text-align: center; padding-top: 32px;
  font: 400 12px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-secondary);
}
.status p { margin: 0; }
.live {
  display: inline-block; width: 6px; height: 6px; margin-right: 8px; vertical-align: 1px;
  border-radius: 9999px; background: rgb(var(--accent-red));
  animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}
@keyframes pulse { 50% { opacity: .3; } }
.status time { color: var(--text-primary); font-variant-numeric: tabular-nums; }


/* ───────── Work section (DESIGN.md §9.5, §9.10 inverse panel) ───────── */
html { scroll-behavior: smooth; }
.work {
  --panel: var(--sec-bg);
  --card: var(--sec-card);
  --card-hover: var(--sec-card-hover);
  margin: 0 var(--space-2) var(--space-2); padding: var(--section-y) var(--gutter);
  background: var(--panel); color: var(--sec-fg);
  border-radius: var(--radius-lg); scroll-margin-top: 0;
}
:root[data-theme="dark"] .work { --panel: rgb(var(--greyscale-dm-light)); --card: rgb(var(--greyscale-black)); }
.work__inner { max-width: 1152px; margin: 0 auto; }
.work__head { display: grid; grid-template-columns: 1fr 3fr; gap: var(--gutter); margin-bottom: var(--head-gap); }
#work .work__headline { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
#work .work__headline .work__title { width: 100%; text-align: right; }
#work .work__headline .dotfield { margin-left: auto; }
.work__label { display: flex; flex-direction: column; gap: var(--space-3); }
.work__eyebrow { margin: 0; font: 800 20px/1 var(--font-ndot); text-transform: uppercase; letter-spacing: .02em; }
.work__title { margin: 0 0 var(--space-5); font: 400 48px/1 var(--font-ntype); letter-spacing: -.01em; }
.work__sub { margin: 0; max-width: 24ch; color: var(--sec-muted); font: 400 14px/1.45 var(--font-body); }
.dotfield { display: block; width: min(100%, 420px); height: auto; }
.dotfield circle { fill: var(--sec-dot); transition: fill .6s var(--ease-standard); }
.dotfield circle.lit { fill: rgb(var(--accent-red)); }
.dotfield circle.lit.alt { fill: var(--sec-dot-alt); }

.cards { list-style: none; margin: 0; padding: 0; }
.case { display: grid; grid-template-columns: 1fr 3fr; gap: var(--gutter); padding: var(--space-6) 0 var(--space-9); border-top: 1px solid var(--sec-line); }
.case__label { position: sticky; top: var(--space-10); align-self: start; display: flex; flex-direction: column; gap: var(--space-1); font: 400 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.card__index { color: var(--sec-muted); }
.case__client { color: var(--sec-fg); }
.case__year { color: var(--sec-muted); }
.case__link { display: block; text-decoration: none; color: inherit; }
.case__tile {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; padding: var(--space-6); overflow: hidden; border-radius: var(--radius-lg);
  background: radial-gradient(70% 90% at 18% 12%, var(--t1), transparent 70%), radial-gradient(80% 80% at 88% 92%, var(--t2), transparent 72%), var(--t3);
}
.case__img { display: block; max-width: 100%; max-height: 100%; width: auto; height: 100%; object-fit: contain; border-radius: 6px; transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .case__link:hover .case__img { transform: scale(1.03); } }
.case__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-5); }
.card__title { margin: 0; font: 400 clamp(26px, 3.2vw, 40px)/1.08 var(--font-ntype); letter-spacing: -.01em; }
.card__desc { margin: 0; max-width: 52ch; font: 400 15px/1.45 var(--font-body); color: var(--sec-muted); }
.case__cta { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-3); font: 400 12px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; text-decoration: underline; text-underline-offset: 3px; }
.case__cta svg { width: 16px; height: 16px; transition: transform .2s var(--ease-standard); }
@media (hover: hover) and (pointer: fine) { .case__link:hover .case__cta svg { transform: translateX(3px); } }

@media (max-width: 1279px) { .work__title { font-size: 40px; } }
@media (max-width: 1023px) {
  .work__head, .case { grid-template-columns: 1fr; gap: var(--space-4); }
  .work__head { gap: var(--space-5); }
  .work__sub { max-width: 44ch; }
  .case__label { position: static; flex-direction: row; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
}
@media (max-width: 767px) {
  .work { margin: 0 0 var(--space-2); border-radius: 0; }
  .work__title { font-size: 32px; }
  .case { padding-bottom: var(--space-8); }
  .case__tile { padding: var(--space-4); }
}

/* ───────── Responsive (DESIGN.md §4.4) ───────── */
@media (max-width: 1023px) { :root { --section-y: var(--space-11); --head-gap: var(--space-8); } }
@media (max-width: 767px)  { :root { --section-y: var(--space-10); --head-gap: var(--space-7); --gutter: var(--space-4); } }
@media (max-width: 1279px) {
  .headline { font-size: 40px; }
}
@media (max-width: 1023px) {
}
@media (max-width: 767px) {
  .headline { font-size: 32px; }
  .welcome { margin-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  /* Fewer, gentler: no keyframes, no movement, but opacity and colour still ease so state changes stay readable */
  *, *::before, *::after {
    animation: none !important;
    transition-property: opacity, color, background-color, border-color, text-decoration-color, fill, stroke !important;
    transition-duration: .2s !important; transition-delay: 0s !important;
  }
  .glyph.booting rect.on { opacity: 1; }
}

/* ───────── About page ───────── */
.glyph rect.eye { animation: blink 6s var(--ease-standard) infinite; animation-delay: var(--blink, 2s); }
@keyframes blink { 0%, 92%, 100% { opacity: 1; } 95% { opacity: 0; } }

.about-intro {
  max-width: 1152px; margin: 0 auto; padding: calc(var(--section-y) + var(--space-5)) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: var(--space-9); align-items: center; text-align: left;
}
.about-intro__text { min-width: 0; }
.about-intro .eyebrow, .about-intro .welcome { text-align: left; }
.about-intro__lede { margin-left: 0 !important; }
.about-intro .facts { margin-left: 0; margin-right: 0; }

/* Portrait: pixel art in a stamped frame */
.portrait { margin: 0; justify-self: end; width: 100%; max-width: 380px; }
.portrait__frame { position: relative; isolation: isolate; border-radius: var(--radius-lg); transition: transform .4s var(--ease-out); }
.portrait__frame::before { /* mis-registered yellow ink, like the hero artifacts */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--radius-lg); background: #F5E26B;
  transform: translate(10px, -10px); transition: transform .4s var(--ease-out);
}
:root[data-theme="dark"] .portrait__frame::before { background: rgb(var(--greyscale-white) / .14); }
.portrait__frame img {
  display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--radius-lg); image-rendering: pixelated; image-rendering: crisp-edges;
  animation: portrait-in 1.1s steps(14) both .2s;
}
@media (hover: hover) and (pointer: fine) { .portrait:hover .portrait__frame { transform: translate(-3px, 3px); } }
@media (hover: hover) and (pointer: fine) { .portrait:hover .portrait__frame::before { transform: translate(16px, -16px); } }
.portrait__cap {
  display: flex; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-5);
  font: 400 12px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary);
}
.portrait__cap span:first-child { color: var(--text-primary); }
@keyframes portrait-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.about-intro__title { margin: 0 0 28px; font: 400 48px/1 var(--font-ntype); letter-spacing: -.01em; text-wrap: balance; }
.about-intro__lede { margin: 0 auto 16px; max-width: 56ch; font: 400 18px/1.5 var(--font-body); color: var(--text-secondary); }
.facts {
  list-style: none; margin: 48px auto 0; padding: 0; max-width: 672px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.facts li {
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: 16px; border-radius: var(--radius-lg); background: transparent; box-shadow: inset 0 0 0 1px var(--sec-ring); text-align: left;
}
.facts__label { font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.facts__value { font: 400 20px/1.2 var(--font-ntype); font-variant-numeric: tabular-nums; }

.modes { padding: var(--section-y) var(--gutter); }
.modes__head { position: relative; max-width: 640px; margin: 0 auto var(--head-gap); text-align: center; }
.modes__title { margin: 0 0 24px; font: 400 48px/1.05 var(--font-ntype); letter-spacing: -.01em; text-wrap: balance; }
.modes__lede { margin: 0 auto; max-width: 54ch; font: 400 16px/1.5 var(--font-body); color: var(--text-secondary); }
.note {
  position: absolute; top: -56px; right: -40px; display: flex; align-items: flex-start; gap: 6px;
  font: 400 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary);
  transform: rotate(-4deg);
}
.note svg { width: 36px; height: 44px; margin-top: 4px; color: var(--text-primary); }

.modes__grid {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1152px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-9) var(--grid-gap);
}
.mode {
  width: calc((100% - 24px) / 4); display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 16px 16px 24px; border-radius: var(--radius-lg); transition: background-color .2s var(--ease-standard);
}
.mode:hover .mode__title { opacity: .7; }
.mode .glyph { width: 128px; height: 128px; margin-bottom: 24px; }
@media (hover: hover) and (pointer: fine) { .mode:hover .glyph rect.on { animation: flicker .5s var(--ease-standard) both; animation-delay: var(--d); } }
.mode__index { margin-bottom: 8px; font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.mode__title { margin: 0 0 12px; font: 400 24px/1.1 var(--font-ntype); }
.mode__desc { margin: 0; max-width: 26ch; font: 400 15px/1.5 var(--font-body); color: var(--text-secondary); }
.modes__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--grid-gap); margin-top: var(--head-gap); }
.modes__cta .btn--ghost { background: transparent; color: var(--text-primary); box-shadow: inset 0 0 0 1px rgb(var(--greyscale-black) / .2); }
:root[data-theme="dark"] .modes__cta .btn--ghost { box-shadow: inset 0 0 0 1px rgb(var(--greyscale-white) / .25); }
.modes__cta .btn--ghost:hover { opacity: .7; }

.site-foot {
  padding: 32px 16px 40px; text-align: center; color: var(--text-secondary);
  font: 400 12px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
}
.site-foot time { color: var(--text-primary); }

@media (max-width: 1023px) {
  .mode { width: calc((100% - 16px) / 3); }
  .about-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: var(--space-6); }
  .about-intro__title, .modes__title { font-size: 40px; }
  .note { right: 0; }
}
@media (max-width: 767px) {
  .about-intro { grid-template-columns: 1fr; gap: var(--space-7); }
  .portrait { order: -1; justify-self: start; max-width: 220px; }
  .about-intro__title, .modes__title { font-size: 32px; }
  .about-intro__lede { font-size: 16px; }
  .facts { grid-template-columns: 1fr; }
  .facts li { flex-direction: row; align-items: baseline; }
  .note { position: static; justify-content: center; transform: none; margin-bottom: 20px; }
  .note svg { display: none; }
  .modes__grid { gap: var(--space-6) var(--grid-gap); }
  .mode { width: calc((100% - 8px) / 2); padding: 12px 4px 16px; }
  .mode .glyph { width: 88px; height: 88px; margin-bottom: 16px; }
  .mode__title { font-size: 20px; }
  .mode__desc { font-size: 14px; }
}

/* ───────── Footer: activity chart + wordmark ───────── */
:root {
  --heat-1: #F8F07C;  /* bottom layer */
  --heat-2: #F1AD57;
  --heat-3: #E26B3A;
  --heat-4: #C92E1D;  /* top layer */
  --font-serif: "Newsreader", "Times New Roman", serif;
}
.sitefoot {
  container-type: inline-size;
  margin: 0 var(--space-2) var(--space-2); padding: max(var(--section-y), 120px) var(--gutter) var(--space-5);
  background: var(--sec-bg); color: var(--sec-fg); border-radius: var(--radius-lg);
}
.sf__chart {
  position: relative; height: clamp(170px, 26cqw, 300px); outline: none; cursor: crosshair;
  touch-action: pan-y;
}
.sf__grid { position: absolute; inset: 0; pointer-events: none; }
.sf__grid i { position: absolute; background: var(--sec-line); }
.sf__grid i.h { left: 0; right: 0; height: 1px; }
.sf__grid i.v { top: 0; bottom: 0; width: 1px; }
.sf__bars {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(96, minmax(0, 1fr));
  column-gap: 2px; align-items: end;
}
.sf__bar {
  display: flex; flex-direction: column-reverse; gap: 1px; height: calc(var(--h) * 100%);
  transform-origin: bottom; transform: scaleY(0);
  transition: transform .7s var(--ease-expressive) calc(var(--i) * 9ms), opacity .2s var(--ease-standard), filter .2s var(--ease-standard);
}
.sitefoot.in .sf__bar { transform: scaleY(1); }
.sitefoot.in .sf__bar.is-lift { transform: scaleY(1.05); transition-delay: 0s; }
.sf__bar b { display: block; flex: var(--v) 1 0; min-height: 1px; }
.sf__bar b:nth-child(1) { background: var(--heat-1); }
.sf__bar b:nth-child(2) { background: var(--heat-2); }
.sf__bar b:nth-child(3) { background: var(--heat-3); }
.sf__bar b:nth-child(4) { background: var(--heat-4); }
.sf__chart.is-hover .sf__bar { opacity: .42; }
.sf__chart.is-hover .sf__bar.is-near { opacity: .8; }
.sf__chart.is-hover .sf__bar.is-active { opacity: 1; filter: brightness(1.12); }
.sf__guide { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--sec-guide); opacity: 0; pointer-events: none; transition: opacity .15s; }
.sf__chart.is-hover .sf__guide { opacity: 1; }

.sf__tip {
  position: absolute; top: 0; z-index: 2; min-width: 168px; padding: 10px 12px 12px; pointer-events: none;
  border-radius: var(--radius-lg); background: var(--sec-tip);
  -webkit-backdrop-filter: blur(45px); backdrop-filter: blur(45px);
  opacity: 0; transform: translateY(-4px); transition: opacity .15s var(--ease-standard), transform .2s var(--ease-standard);
  font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
}
.sf__chart.is-hover .sf__tip { opacity: 1; transform: none; }
.sf__tip-time { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; color: var(--sec-muted); }
.sf__tip-time strong { color: var(--sec-fg); font-weight: 400; }
.sf__tip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sf__tip li { display: flex; align-items: center; gap: 8px; }
.sf__tip li i { width: 8px; height: 8px; flex: none; }
.sf__tip li span { margin-left: auto; font-variant-numeric: tabular-nums; }

.sf__axis {
  display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); margin-top: 16px;
  font: 400 clamp(10px, 1.45cqw, 16px)/1 var(--font-mono); color: var(--sec-faint); user-select: none;
}
.sf__axis span { transition: color .15s var(--ease-standard); }
.sf__axis span.is-now { color: var(--sec-fg); }
.sf__axis span.is-hot { color: var(--sec-fg); }

.sf__mark {
  display: block; width: max-content; margin: 56px 0 0 -.04em; color: var(--sec-fg); text-decoration: none; white-space: nowrap;
  font: 400 21cqw/1 var(--font-serif); letter-spacing: -.035em; font-optical-sizing: auto;
}
.sf__mark span { display: inline-block; transition: transform .4s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .sf__mark:hover span { transform: translateY(-.03em); } }
@media (hover: hover) and (pointer: fine) { .sf__mark:hover span:nth-child(odd) { transform: translateY(.03em); } }
.sf__legal {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px;
  font: 400 12px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-faint);
}
.sf__legal a { color: inherit; text-decoration: none; }
.sf__legal a:hover { color: var(--sec-fg); }
.sf__legal time { color: var(--sec-muted); }

@media (max-width: 767px) {
  .sitefoot { margin: 0; border-radius: 0; }
  .sf__bars { column-gap: 1px; }
  .sf__axis span:nth-child(even) { visibility: hidden; }
  .sf__tip { min-width: 148px; }
  .sf__mark { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .sf__bar { transform: scaleY(1) !important; }
}

/* Footer game: Claude mascot runner */
.sf__game { position: absolute; left: 0; bottom: 0; width: 100%; z-index: 1; pointer-events: none; image-rendering: pixelated; }
.sf__chart.is-playing { cursor: pointer; touch-action: none; }
.sf__chart.is-playing .sf__bars { opacity: 0; }
.sf__chart.is-playing .sf__guide, .sf__chart.is-playing .sf__tip { display: none; }
.sf__hint {
  position: absolute; right: 0; top: -30px; z-index: 2; pointer-events: none; white-space: pre;
  font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted);
  font-variant-numeric: tabular-nums;
}
.sf__msg {
  position: absolute; left: 50%; top: 36%; z-index: 3; transform: translate(-50%, -40%); pointer-events: none;
  display: none; flex-direction: column; align-items: center; gap: 6px; padding: 14px 18px; text-align: center;
  border-radius: var(--radius-lg); background: var(--sec-tip);
  -webkit-backdrop-filter: blur(45px); backdrop-filter: blur(45px);
  font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted);
}
.sf__msg.on { display: flex; }
.sf__msg strong { font: 400 24px/1 var(--font-ntype); text-transform: none; letter-spacing: 0; color: var(--sec-fg); }
@media (max-width: 767px) { .sf__hint { top: -26px; } }

/* Loader: the brand ring spins, then settles and flies into the nav logo */
.loader { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; color: var(--text-primary); transition: color .7s var(--ease-standard); }
.loader__bg { position: absolute; inset: 0; background: var(--bg-page); transition: opacity .6s var(--ease-standard) .1s; }
.loader svg { position: relative; width: min(34vw, 240px); height: auto; aspect-ratio: 480 / 350; overflow: visible; transition: transform .75s var(--ease-expressive); }
html.is-loading { overflow: hidden; }

/* ───────── Capabilities: tile grid ───────── */
.caps { margin: 0 var(--space-2) var(--space-2); padding: var(--section-y) var(--gutter); background: var(--sec-bg); color: var(--sec-fg); border-radius: var(--radius-lg); }
:root[data-theme="dark"] .caps { background: rgb(var(--greyscale-dm-light)); }
.caps__inner { max-width: 1152px; margin: 0 auto; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
.tile {
  --ink: #1d1d1b; --ink-soft: rgba(29, 29, 27, .72);
  position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 1; border-radius: var(--radius-lg);
  padding: 20px; color: var(--ink); display: flex; flex-direction: column;
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
}
.tiles.in .tile { opacity: 1; transform: none; }
.tiles.in .tile:nth-child(2) { transition-delay: 70ms; } .tiles.in .tile:nth-child(3) { transition-delay: 140ms; }
.tiles.in .tile:nth-child(4) { transition-delay: 210ms; } .tiles.in .tile:nth-child(5) { transition-delay: 280ms; } .tiles.in .tile:nth-child(6) { transition-delay: 350ms; }
.tile::after { /* film grain */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .22; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tile__tag { position: relative; z-index: 2; align-self: flex-start; font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.tile__title { position: relative; z-index: 2; margin: 14px 0 0; font: 400 clamp(26px, 2.5cqw, 32px)/1.08 var(--font-serif); letter-spacing: -.01em; }
.tile__title--bottom { margin: auto 0 0; }
.tile__body { position: relative; z-index: 2; margin: auto 0 0; font: 400 14px/1.45 var(--font-body); color: var(--ink-soft); }
.tile__body--center { margin: 0; text-align: center; }
.art, .ring-art { position: absolute; z-index: 1; pointer-events: none; }

/* 1 · mountain */
.tile--sys { background: linear-gradient(180deg, #E9EEF8 0%, #F3F4F2 100%); }
.art--mtn { left: -2%; right: -2%; bottom: -2%; width: 104%; height: 58%; transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .tile--sys:hover .art--mtn { transform: translate(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -6px)) scale(1.06); } }

/* 2 · orb + toggle */
.tile--mode { --a: #A5D2C3; --b: #5F9C8E; background: #EEF1EC; align-items: center; }
.tile--mode[data-mode="strategy"] { --a: #F0C6A8; --b: #D98F78; }
.orb { position: absolute; z-index: 1; left: 50%; top: 50%; width: 56%; aspect-ratio: 1; transform: translate(-50%, -54%); border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, var(--a), var(--b) 78%); filter: blur(7px); transition: background .6s var(--ease-standard); }
.orb i { position: absolute; border-radius: 50%; background: rgba(255,255,255,.9); filter: blur(3px); animation: spot 9s ease-in-out infinite; }
.orb i:nth-child(1) { left: 14%; top: 18%; width: 22%; height: 12%; }
.orb i:nth-child(2) { left: 52%; top: 12%; width: 16%; height: 18%; animation-delay: -2s; }
.orb i:nth-child(3) { left: 68%; top: 44%; width: 18%; height: 11%; animation-delay: -4s; }
.orb i:nth-child(4) { left: 24%; top: 56%; width: 14%; height: 16%; animation-delay: -6s; }
.orb i:nth-child(5) { left: 46%; top: 66%; width: 20%; height: 10%; animation-delay: -1s; }
.orb i:nth-child(6) { left: 36%; top: 36%; width: 10%; height: 10%; animation-delay: -5s; }
@media (hover: hover) and (pointer: fine) { .tile--mode:hover .orb i { animation-duration: 3.5s; } }
@keyframes spot { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6%, -8%) scale(1.25); } }
.tile--mode .tile__body { position: absolute; z-index: 2; left: 20px; right: 20px; top: 44%; transition: opacity .25s var(--ease-standard); text-shadow: 0 0 12px rgba(238,241,236,.9); color: var(--ink); }
.tile--mode .tile__body.swap { opacity: 0; }
.seg-toggle { position: absolute; z-index: 2; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 2px; padding: 3px; border-radius: var(--radius); background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.seg-toggle button { border: 0; background: none; cursor: pointer; padding: 6px 10px; border-radius: 3px; color: rgba(29,29,27,.5); font: 400 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; transition: background-color .2s, color .2s; }
.seg-toggle button[aria-pressed="true"] { background: #fff; color: #1d1d1b; }

/* 3 · interaction */
.tile--ixd { --ink: #fff; --ink-soft: rgba(255,255,255,.85); background: linear-gradient(180deg, #4B4A93 0%, #8E6AA6 38%, #E9C5D2 66%, #F3EEEE 84%); }
.tile--ixd .tile__body { color: #2b2b29; }
.tile--ixd .tile__tag { color: rgba(255,255,255,.8); }
.ring-art { left: 50%; top: 46%; width: 38%; transform: translate(-50%, -50%); color: #fff; overflow: visible; filter: drop-shadow(0 0 10px rgba(255,255,255,.35)); }
.cloud { position: absolute; z-index: 1; left: -10%; right: -10%; bottom: 14%; height: 34%; background: radial-gradient(60% 80% at 50% 90%, #fff 0%, rgba(255,255,255,.92) 45%, rgba(255,255,255,0) 100%); filter: blur(10px); }

/* 4 · prototyping: a clickable flow */
.tile--proto { --dur: 6s; background: linear-gradient(180deg, #F3F2EE 0%, #F3F2EE 52%, #D9E5F8 100%); }
@media (hover: hover) and (pointer: fine) { .tile--proto:hover { --dur: 3.4s; } }
.flow { position: absolute; z-index: 1; left: 6%; right: 6%; top: 44px; width: 88%; height: calc(100% - 190px); overflow: visible; }
.flow__path { fill: none; stroke: rgba(29, 29, 27, .55); stroke-width: 3; stroke-linecap: square; stroke-dasharray: 0 8; animation: flow-march 1.2s linear infinite; }
@keyframes flow-march { to { stroke-dashoffset: -8; } }
.flow__scr { transform-box: fill-box; transform-origin: 50% 50%; animation: scr-on var(--dur) ease-in-out infinite; }
.flow__scr.s2 { animation-name: scr-on-2; } .flow__scr.s3 { animation-name: scr-on-3; }
@keyframes scr-on   { 0%, 14% { transform: scale(1.07); filter: brightness(1.08); } 24%, 92% { transform: scale(1); } 100% { transform: scale(1.07); } }
@keyframes scr-on-2 { 0%, 22% { transform: scale(1); } 30%, 42% { transform: scale(1.07); filter: brightness(1.08); } 52%, 100% { transform: scale(1); } }
@keyframes scr-on-3 { 0%, 52% { transform: scale(1); } 60%, 76% { transform: scale(1.07); filter: brightness(1.08); } 86%, 100% { transform: scale(1); } }
.flow__cur { animation: cur-move var(--dur) ease-in-out infinite; }
@keyframes cur-move {
  0%, 12% { transform: translate(52px, 120px); }
  30%, 42% { transform: translate(162px, 152px); }
  60%, 76% { transform: translate(270px, 116px); }
  92%, 100% { transform: translate(52px, 120px); }
}
.tile--proto .tile__body { margin-top: auto; }

/* 5 · design systems */
.tile--dsys { background: linear-gradient(180deg, #6FA6EA 0%, #B9C7F0 34%, #E2D6F1 62%, #F1ECF5 100%); }
.tile--dsys .tile__tag { color: rgba(255,255,255,.9); }
.sky { position: absolute; inset: 0; z-index: 1; }
.sky i { position: absolute; border-radius: 50%; background: rgba(255,255,255,.9); filter: blur(14px); animation: drift 14s ease-in-out infinite; }
.sky i:nth-child(1) { left: -6%; top: 18%; width: 52%; height: 22%; }
.sky i:nth-child(2) { right: -8%; top: 8%; width: 56%; height: 24%; animation-delay: -5s; }
.sky i:nth-child(3) { left: 20%; top: 36%; width: 60%; height: 18%; animation-delay: -9s; opacity: .8; }
.sky b { position: absolute; top: 38%; width: 12%; height: 7%; border-radius: 40%; background: #1b1b24; filter: blur(2px); transition: transform .5s var(--ease-out); }
.sky b::after { content: ""; position: absolute; left: -20%; top: 140%; width: 140%; height: 220%; background: radial-gradient(closest-side, rgba(110,80,160,.55), rgba(110,80,160,0)); filter: blur(6px); }
.sky b:nth-of-type(1) { left: 22%; } .sky b:nth-of-type(2) { left: 66%; }
@media (hover: hover) and (pointer: fine) { .tile--dsys:hover .sky b:nth-of-type(1) { transform: translate(8px, -6px); } .tile--dsys:hover .sky b:nth-of-type(2) { transform: translate(-8px, -4px); } }
@keyframes drift { 50% { transform: translateX(6%); } }
.tile--dsys .tile__title { color: #2b2840; }

/* 6 · open to work */
.tile--open { background: linear-gradient(180deg, #F6C7D6 0%, #F3E5E6 34%, #F1F0EA 60%); }
.tile--open .tile__title { font-size: clamp(22px, 2cqw, 27px); max-width: 15em; }
.px--flower { position: absolute; z-index: 1; left: 20px; bottom: 20px; width: 34%; }
.tile--open .btn { position: absolute; z-index: 2; right: 20px; bottom: 20px; }
@media (hover: hover) and (pointer: fine) { .tile--open:hover .px--flower { animation: sway 1.6s ease-in-out infinite; transform-origin: 50% 100%; } }
@keyframes sway { 50% { transform: rotate(3deg); } }

@media (max-width: 1023px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile__title { font-size: 26px; } }
@media (max-width: 767px) {
  .caps { margin: 0 0 var(--space-2); border-radius: 0; }
  .tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .portrait__frame img { animation: none; } .tile { opacity: 1; transform: none; } .orb i, .sky i, .px, .flow__path, .flow__scr, .flow__cur { animation: none !important; } .flow__cur { transform: translate(52px, 120px); } }

/* ───────── Hero artifacts: California pixel motifs (DESIGN.md §8.4) ───────── */
.hero__art { position: absolute; inset: 0; z-index: 0; overflow: clip; pointer-events: none; --k: 1; }
.artifact {
  position: absolute; left: var(--x); top: var(--y); display: none; pointer-events: auto; cursor: default;
  width: calc(var(--cols, 10) * var(--u) * var(--k)); aspect-ratio: var(--cols, 10) / var(--rows, 10);
  translate: calc(var(--px, 0) * var(--d, 8) * 1px) calc(var(--py, 0) * var(--d, 8) * 1px);
  transition: translate .5s var(--ease-standard);
  animation: art-bob 4s steps(1) infinite; animation-delay: var(--bd, 0s);
}
.artifact svg { display: block; width: 100%; height: 100%; overflow: visible; }
.artifact .mis { fill: #F5E26B; }
:root[data-theme="dark"] .artifact .mis { display: none; }
:root[data-theme="dark"] .artifact svg { filter: brightness(1.28) saturate(1.05); }
.artifact::after {
  content: attr(data-name); position: absolute; left: 50%; top: 100%; margin-top: var(--space-2); transform: translateX(-50%);
  white-space: nowrap; opacity: 0; transition: opacity .2s var(--ease-standard);
  font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary);
}
@media (hover: hover) and (pointer: fine) { .artifact:hover::after { opacity: 1; } }
@media (hover: hover) and (pointer: fine) { .artifact:hover { animation: art-hop .45s steps(4) 1; } }
@keyframes art-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes art-hop { 0%, 100% { transform: translateY(0); } 40%, 60% { transform: translateY(-12px); } }
.artifact:nth-child(2n) { --bd: -1.3s; } .artifact:nth-child(3n) { --bd: -2.1s; } .artifact:nth-child(5n) { --bd: -.6s; }

@media (min-width: 1024px) { .artifact { display: block; } .artifact--xl { display: none; } }
@media (min-width: 1400px) { .artifact--xl { display: block; } }
@media (min-width: 1024px) and (max-width: 1279px) { .artifact--l2 { display: none; } }
@media (max-width: 1279px) { .hero__art { --k: .83; } }
@media (max-width: 1023px) {
  .hero__art { --k: .667; }
  .artifact { display: none; left: var(--mx); top: var(--my); }
  .artifact--m { display: block; }
}
@media (max-width: 767px) { .hero__art { --k: .5; } }
@media (prefers-reduced-motion: reduce) { .artifact { animation: none !important; transition: none; translate: none; } }

/* ───────── Template pages (Playground, Writing, Case study) ───────── */
.sheet { margin: 0 var(--space-2) var(--space-2); padding: var(--section-y) var(--gutter); background: var(--sec-bg); color: var(--sec-fg); border-radius: var(--radius-lg); }
:root[data-theme="dark"] .sheet { background: rgb(var(--greyscale-dm-light)); }
.sheet--first { padding-top: calc(var(--section-y) + var(--space-5)); }
@media (max-width: 767px) { .sheet { margin: 0 0 var(--space-2); border-radius: 0; } }
.work__head--flush { margin-bottom: 0; }
.work__title--md { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: var(--space-5); }
.work__title--lg { font-size: clamp(34px, 5vw, 64px); line-height: 1.02; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grain::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .22; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  border: 0; cursor: pointer; padding: 8px 12px; border-radius: var(--radius); background: transparent; color: var(--sec-muted);
  box-shadow: inset 0 0 0 1px var(--sec-line); font: 400 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
  transition: background-color .2s var(--ease-standard), color .2s var(--ease-standard), transform .16s var(--ease-out);
}
.chip:hover { color: var(--sec-fg); }
.chip[aria-pressed="true"] { background: var(--sec-fg); color: var(--sec-bg); box-shadow: none; }

/* Playground */
.lab-wrap { container-type: inline-size; }
.lab { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); grid-auto-rows: calc((100cqw - 2 * var(--grid-gap)) / 3); }
.lab__tile {
  --ink: #1d1d1b; --ink-soft: rgba(29, 29, 27, .7);
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-lg); padding: var(--space-5); color: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(70% 90% at 18% 12%, var(--t1), transparent 70%), radial-gradient(80% 80% at 88% 92%, var(--t2), transparent 72%), var(--t3);
  opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
}
.lab.in .lab__tile { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 60ms); }
.lab__tile[hidden] { display: none; }
.lab__cover { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.lab__cover:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.lab__tile:has(.lab__cover) { cursor: pointer; }
.lab__tile--wide { grid-column: span 2; }
.lab.is-filtered .lab__tile--wide { grid-column: auto; }
.lab__tile--dark { --ink: #fff; --ink-soft: rgba(255,255,255,.8); }
.lab__top { position: relative; z-index: 2; display: flex; justify-content: space-between; font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.lab__title { position: relative; z-index: 2; margin: 0; font: 400 clamp(22px, 2.2cqw, 28px)/1.1 var(--font-ntype); }
.lab__art { position: absolute; z-index: 1; left: 50%; top: 46%; width: calc(var(--cols) * var(--u)); aspect-ratio: var(--cols) / var(--rows); margin-left: calc(var(--cols) * var(--u) / -2); margin-top: calc(var(--rows) * var(--u) / -2); translate: calc(var(--mx, 0) * -12px) calc(var(--my, 0) * -9px); transition: translate .4s var(--ease-standard); }
.lab__art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lab__art .mis { fill: #F5E26B; }
:root[data-theme="dark"] .lab__art .mis { display: none; }
@media (hover: hover) and (pointer: fine) { .lab__tile:hover .lab__art svg { animation: art-hop .45s steps(4) 1; } }
.lab__ring { position: absolute; z-index: 1; left: 50%; top: 46%; width: 46%; transform: translate(-50%, -50%); color: #fff; overflow: visible; filter: drop-shadow(0 0 10px rgba(255,255,255,.3)); }
.lab__ring--sm { width: 22%; color: #1d1d1b; filter: none; opacity: .75; }
.lab__type { position: absolute; z-index: 1; left: 50%; top: 46%; transform: translate(-50%, -50%); font: 800 clamp(72px, 15cqw, 150px)/1 var(--font-ndot); color: #fff; letter-spacing: .02em; text-shadow: 0 0 24px rgba(255,255,255,.35); transition: letter-spacing .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .lab__tile:hover .lab__type { letter-spacing: .12em; } }
.lab__tile--soon { background: linear-gradient(180deg, #F3F2EE, #E7ECF3); }
@media (max-width: 1023px) { .lab { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: calc((100cqw - var(--grid-gap)) / 2); } }
@media (max-width: 767px) { .lab { grid-template-columns: 1fr; grid-auto-rows: calc(100cqw * .85); } .lab__tile--wide { grid-column: auto; } .lab__title { font-size: 24px; } }

/* Writing */
.posts { list-style: none; margin: 0; padding: 0; }
.post { display: grid; grid-template-columns: 1fr 3fr; gap: var(--gutter); padding: var(--space-6) 0 var(--space-9); border-top: 1px solid var(--sec-line); }
.post[hidden] { display: none; }
.post__label { position: sticky; top: var(--space-10); align-self: start; display: flex; flex-direction: column; gap: var(--space-1); font: 400 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.post__read { color: var(--sec-muted); }
.post__link { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); text-decoration: none; color: inherit; }
.post__tile { position: relative; align-self: stretch; aspect-ratio: 21 / 9; margin-bottom: var(--space-3); display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-lg);
  background: radial-gradient(70% 90% at 18% 12%, var(--t1), transparent 70%), radial-gradient(80% 80% at 88% 92%, var(--t2), transparent 72%), var(--t3); }
.post__tile-art { display: block; width: calc(var(--cols, 11) * var(--u, 12px)); aspect-ratio: var(--cols, 11) / var(--rows, 17); transition: transform .5s var(--ease-out); }
.post__tile-art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.post__tile-art .mis { fill: #F5E26B; }
:root[data-theme="dark"] .post__tile-art .mis { display: none; }
@media (hover: hover) and (pointer: fine) { .post__link:hover .post__tile-art { transform: translateY(-6px); } }
.post__tag { font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.post__title { margin: 0; font: 400 clamp(26px, 3vw, 40px)/1.08 var(--font-ntype); letter-spacing: -.01em; transition: opacity .2s var(--ease-standard); max-width: 22ch; }
.post--feature .post__title { font-size: clamp(30px, 4vw, 52px); }
.post__link:hover .post__title { opacity: .7; }
.post__excerpt { margin: 0; max-width: 52ch; font: 400 15px/1.5 var(--font-body); color: var(--sec-muted); }
.post__link .case__cta { margin-top: var(--space-2); }
@media (hover: hover) and (pointer: fine) { .post__link:hover .case__cta svg { transform: translateX(3px); } }
.post__tile { aspect-ratio: 16 / 9; }
.post--feature .post__tile { aspect-ratio: 21 / 9; }
.post__tile--light { background: #f3f3f3; }
.post__cover { width: auto; height: 100%; max-width: 100%; object-fit: contain; display: block; }

/* Essay */
#essay-title { line-height: 1.08; max-width: 18ch; }
.essay { display: grid; grid-template-columns: 1fr 3fr; gap: var(--gutter); }
.essay__meta { position: sticky; top: var(--space-10); align-self: start; display: flex; flex-direction: column; gap: var(--space-2); font: 400 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.essay__meta a { color: var(--sec-muted); text-decoration: none; }
.essay__meta a:hover { color: var(--sec-fg); }
.essay__body { min-width: 0; max-width: 68ch; display: flex; flex-direction: column; gap: var(--space-4); }
.essay__mark { margin: 0 0 var(--space-2); width: min(100%, 240px); }
.essay__mark img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.essay__body h2, .essay__body h3 { margin: var(--space-5) 0 0; font-weight: 400; letter-spacing: -.01em; font-family: var(--font-ntype); color: var(--sec-fg); }
.essay__body h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.12; }
.essay__body h3 { font-size: 22px; line-height: 1.25; }
.essay__body p, .essay__body li { margin: 0; font: 400 17px/1.65 var(--font-body); color: var(--sec-muted); }
.essay__body strong { color: var(--sec-fg); font-weight: 500; }
.essay__body sup { margin-left: 2px; font: 500 11px/1 var(--font-mono); vertical-align: super; }
.essay__body sup a { color: var(--sec-fg); text-decoration: underline; text-underline-offset: 2px; }
.essay__body ul { margin: 0; padding: 0 0 0 1.15em; display: flex; flex-direction: column; gap: var(--space-2); }
.essay__body pre { margin: 0; padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); background: rgb(var(--greyscale-black)); color: rgb(var(--greyscale-white)); font: 400 13px/1.55 var(--font-mono); overflow-x: auto; white-space: pre-wrap; }
.essay__body figure { margin: var(--space-2) 0; }
.essay__body img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.essay__body figcaption, .essay__source { font: 400 12px/1.4 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--sec-muted); }
.essay__body figcaption { margin-top: var(--space-2); }
.essay__body hr { width: 100%; border: 0; border-top: 1px solid var(--sec-line); margin: var(--space-3) 0; }
.essay__audio { display: flex; flex-direction: column; gap: var(--space-2); }
.essay__audio audio { width: min(100%, 440px); }
.essay__evidence { margin: var(--space-2) 0; padding: var(--space-5); border-radius: var(--radius-lg); background: var(--sec-card-hover); display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: var(--space-2) var(--space-5); align-items: end; }
.essay__evidence > span { grid-column: 1 / -1; font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.essay__evidence > strong { font: 400 clamp(48px, 8vw, 80px)/.9 var(--font-ntype); letter-spacing: -.03em; color: var(--sec-fg); }
.essay__evidence > p { align-self: end; max-width: 32ch; font-size: 14px; line-height: 1.5; }
.essay__sources { margin-top: var(--space-7); padding-top: var(--space-6); border-top: 1px solid var(--sec-line); display: flex; flex-direction: column; gap: var(--space-4); }
.essay__sources h2 { margin-top: 0; }
.essay__sources ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: var(--space-3); }
.essay__sources li { font-size: 14px; line-height: 1.55; }
.essay__sources a { color: var(--sec-fg); text-decoration: underline; text-underline-offset: 3px; }
.essay__foot { margin-top: var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); }
.essay__source { margin: 0; }
.subscribe { display: flex; flex-wrap: wrap; gap: var(--space-2); max-width: 520px; }
.input {
  flex: 1 1 240px; height: 48px; padding: 8px 16px; border: 0; border-radius: var(--radius); background: transparent; color: var(--sec-fg);
  box-shadow: inset 0 0 0 1px var(--sec-line); font: 400 12px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
}
.input::placeholder { color: var(--sec-faint); }
.input:focus { outline: 2px solid var(--focus); outline-offset: 0; }
.subscribe .btn { height: 48px; }
.subscribe__msg { flex-basis: 100%; margin: var(--space-1) 0 0; min-height: 1.4em; font: 400 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }

/* Case study */
.cs { --t1: #A4A6A3; --t2: #E7E8E5; --t3: #D6D7D4; }
.cs__lede { margin: 0; max-width: 56ch; font: 400 18px/1.5 var(--font-body); color: var(--sec-muted); }
.cs__hero { margin-bottom: 0; }
.cs__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin: var(--space-6) 0 var(--head-gap); padding: var(--space-5) 0; border-top: 1px solid var(--sec-line); border-bottom: 1px solid var(--sec-line); }
.cs__meta div { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.cs__meta dt { font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.cs__meta dd { margin: 0; font: 400 15px/1.4 var(--font-body); }
.cs__row { display: grid; grid-template-columns: 1fr 3fr; gap: var(--gutter); padding: var(--space-6) 0 var(--space-9); border-top: 1px solid var(--sec-line); }
.cs__label { position: sticky; top: var(--space-10); align-self: start; display: flex; align-items: baseline; gap: var(--space-3); font: 400 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.cs__label span { color: var(--sec-muted); }
.cs__label h2 { margin: 0; font: inherit; }
.cs__content { min-width: 0; display: flex; flex-direction: column; gap: var(--space-5); }
.cs__content p { margin: 0; max-width: 62ch; font: 400 16px/1.6 var(--font-body); color: var(--sec-muted); }
.cs__content h3 { margin: 0; font: 400 20px/1.2 var(--font-ntype); }
.cs__lead { font: 400 clamp(20px, 2.2vw, 28px)/1.35 var(--font-ntype) !important; color: var(--sec-fg) !important; max-width: 40ch !important; letter-spacing: -.005em; }
.cs__lead em { color: var(--sec-muted); font-style: normal; font-size: .6em; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.cs__content .cs__statement { margin: 0; max-width: 22ch; font: 400 clamp(28px, 3.6vw, 48px)/1.08 var(--font-ntype); letter-spacing: -.01em; color: var(--sec-fg); }
.cs__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
.cs__stats > div, .cs__cards li { padding: var(--space-5); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--sec-ring); display: flex; flex-direction: column; gap: var(--space-2); }
.cs__stats strong { font: 400 clamp(32px, 4vw, 48px)/1 var(--font-ntype); letter-spacing: -.01em; }
.cs__stats span { font: 400 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.cs__stats--big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs__stats--big strong { font-size: clamp(48px, 7vw, 88px); }
.cs__cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
.cs__n { font: 400 clamp(32px, 4vw, 48px)/1 var(--font-ntype); }
.cs__cards p { font-size: 14px !important; }
.cs__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
.cs__steps li { display: flex; flex-direction: column; gap: var(--space-2); }
.cs__steps li .ph { margin-bottom: var(--space-2); }
.ph { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius-lg);
  background: radial-gradient(70% 90% at 18% 12%, var(--t1), transparent 70%), radial-gradient(80% 80% at 88% 92%, var(--t2), transparent 72%), var(--t3); }
.ph span { font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: rgba(29, 29, 27, .6); }
.cs__feature { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-7); }
.cs__feature .ph { aspect-ratio: 16 / 9; }
.cs__feature--split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: center; }
.cs__feature--split .ph { aspect-ratio: 1; }
.cs__feature--split > div:not(.ph) { display: flex; flex-direction: column; gap: var(--space-3); }
.cs__feature--flip .ph { order: 2; }
.cs__two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.cs__two > div { display: flex; flex-direction: column; gap: var(--space-3); }
.cs__next { display: grid; grid-template-columns: 1fr 1fr; gap: var(--grid-gap); padding-top: var(--space-6); border-top: 1px solid var(--sec-line); }
.cs__next a { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--sec-ring); text-decoration: none; color: inherit; transition: background-color .2s var(--ease-standard); }
.cs__next a:hover { background: var(--sec-card-hover); }
.cs__next small { font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.cs__next strong { font: 400 clamp(22px, 2.6vw, 32px)/1.1 var(--font-ntype); }
.cs__next a:last-child { text-align: right; align-items: flex-end; }

@media (max-width: 1023px) {
  .post, .cs__row, .essay { grid-template-columns: 1fr; gap: var(--space-4); }
  .post__label, .cs__label, .essay__meta { position: static; flex-direction: row; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
  .cs__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .post, .cs__row { padding-bottom: var(--space-8); }
  .post--feature .post__tile { aspect-ratio: 16 / 9; }
  .essay__evidence { grid-template-columns: 1fr; }
  .cs__stats, .cs__cards, .cs__steps, .cs__two, .cs__feature--split, .cs__next { grid-template-columns: 1fr; }
  .cs__stats--big { grid-template-columns: 1fr; }
  .cs__feature--flip .ph { order: 0; }
  .cs__next a:last-child { text-align: left; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .lab__tile { opacity: 1; transform: none; } .lab__tile:hover .lab__art svg { animation: none; } }

/* Text-only metric tiles (Work rows, case study hero, nav thumbnail) */
.case__tile { container-type: inline-size; }
.metric { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; color: #1d1d1b; }
.metric strong { font: 400 clamp(64px, 17cqw, 200px)/.9 var(--font-ntype); letter-spacing: -.035em; }
.metric span { font: 400 12px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: rgba(29, 29, 27, .65); }
.metric--sm { gap: 4px; }
.metric--sm strong { font-size: 30px; letter-spacing: -.02em; }
.metric--sm span { font-size: 9px; }
.pcard__thumb:has(.metric) { background: radial-gradient(70% 90% at 18% 12%, var(--t1), transparent 70%), radial-gradient(80% 80% at 88% 92%, var(--t2), transparent 72%), var(--t3); }
.case__tags { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.case__tags li { padding: 4px 8px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--sec-line); font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }

/* About: background lists */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--gutter); padding: var(--space-4) 0; border-top: 1px solid var(--sec-line); }
.tl li:first-child { border-top: 0; padding-top: 0; }
.tl__role { display: flex; flex-direction: column; gap: var(--space-1); font: 400 clamp(18px, 2vw, 24px)/1.2 var(--font-ntype); }
.tl__role em { font: 400 12px/1.25 var(--font-mono); font-style: normal; text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.tl__when { flex: none; font: 400 12px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); font-variant-numeric: tabular-nums; }
.tl--plain .tl__role { font-size: clamp(17px, 1.8vw, 20px); }
a.inline { color: var(--sec-fg); text-decoration: underline; text-underline-offset: 3px; transition: opacity .2s var(--ease-standard); }
a.inline:hover { opacity: .7; }
.modes__cta--left { justify-content: flex-start; margin-top: var(--space-5); }
.about-intro__lede--2 { margin-top: 0 !important; }

/* Playground: spec-sheet tiles (text only) */
.lab__tile { background: radial-gradient(60% 70% at var(--gx, 20%) var(--gy, 15%), color-mix(in srgb, var(--t1) 85%, transparent), transparent 70%), radial-gradient(80% 80% at 88% 92%, var(--t2), transparent 72%), var(--t3); }
.lab__bottom { position: relative; z-index: 2; display: flex; flex-direction: column; gap: var(--space-2); margin-top: auto; }
.lab__bottom .lab__title { margin-bottom: var(--space-1); font-size: clamp(22px, 2.3cqw, 30px); }
.lab__area { margin: 0; font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.lab__scope { margin: 0; max-width: 34ch; font: 400 14px/1.45 var(--font-body); color: var(--ink-soft); }

/* Case study: real-content blocks */
.cs__meta { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.cs[data-case] .cs__meta:has(> :nth-child(4):last-child) {
  grid-template-columns: max-content max-content minmax(max-content, 1fr) max-content;
}
.cs[data-case] .cs__meta dd { white-space: normal; }
.cs[data-case] .cs__meta:has(> :nth-child(4):last-child) dd { white-space: nowrap; }
.cs[data-case] #brief .cs__statement { max-width: none; white-space: nowrap; font-size: clamp(24px, 3.2vw, 48px); }
.cs__quote { margin: 0; padding: var(--space-5) 0 var(--space-5) var(--space-5); border-left: 2px solid var(--sec-fg); display: flex; flex-direction: column; gap: var(--space-3); }
.cs__quote p { font: 400 clamp(20px, 2.4vw, 30px)/1.25 var(--font-ntype) !important; color: var(--sec-fg) !important; max-width: 28ch !important; }
.cs__quote footer { font: 400 12px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.cs__cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: stretch; }
.cs__cards h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.cs__cards--2 li { min-height: 100%; }
.cs__cards--2 p { max-width: none !important; }
.cs__trades { display: grid; gap: var(--space-4); align-items: stretch; }
.cs__trades--1 { grid-template-columns: minmax(0, 1fr); }
.cs__trades--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs__trades--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs__trade { padding: var(--space-5); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--sec-ring); display: flex; flex-direction: column; gap: var(--space-4); min-height: 100%; }
.cs__trade-n { font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.cs__trade h3 { margin: 0; font-size: 22px; line-height: 1.25; }
.cs__trades--2 .cs__trade h3,
.cs__trades--3 .cs__trade h3 { min-height: 2.75em; }
.cs__trade dl { margin: 0; flex: 1; display: grid; gap: var(--space-4); align-content: start; }
.cs__trade dl div { display: flex; flex-direction: column; gap: var(--space-1); }
.cs__trade dt { font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.cs__trade dd { margin: 0; font: 400 14px/1.5 var(--font-body); color: var(--sec-muted); }
.cs__trade-note { flex: none; margin-top: auto !important; padding-top: var(--space-4); border-top: 1px solid var(--sec-line); font-size: 14px !important; line-height: 1.5 !important; color: var(--sec-fg) !important; max-width: none !important; }
.cs__trades--1 .cs__trade { max-width: 72ch; box-shadow: none; padding: 0; border-radius: 0; }
.cs__trades--1 .cs__trade dl { gap: var(--space-5); }
.cs__steps--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--grid-gap); }
.cs__steps--cards li { padding: var(--space-5); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--sec-ring); }
.cs__steps--cards .cs__n { font: 400 12px/1.25 var(--font-mono); letter-spacing: .04em; color: var(--sec-muted); }
.cs__steps--cards p { font-size: 14px !important; }
@media (max-width: 1023px) {
  .cs__meta, .cs[data-case] .cs__meta:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs[data-case] .cs__meta dd { white-space: normal; }
  .cs__trades--2, .cs__trades--3 { grid-template-columns: 1fr; }
  .cs__trades--2 .cs__trade h3, .cs__trades--3 .cs__trade h3 { min-height: 0; }
  .cs__media--3 { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .cs__cards--2, .cs__steps--cards { grid-template-columns: 1fr; }
  .cs[data-case] #brief .cs__statement { white-space: normal; }
}

/* ───────── Pixel-art Sambit (about portrait, drawn in portrait.js) ───────── */
.pixel-me { position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); background: none; color: var(--text-primary); cursor: pointer; animation: portrait-in 1.1s steps(14) both .2s; }
.pixel-me svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pixel-me .st, .pixel-me .pu { display: none; }
.pixel-me[data-mode="stand"] .st, .pixel-me[data-mode="hi"] .st, .pixel-me[data-mode="push"] .pu { display: inline; }
.pixel-me .pf { opacity: 0; animation: pf 1.6s steps(1) infinite; animation-delay: calc(var(--i) * .4s); }
@keyframes pf { 0%, 25% { opacity: 1; } 25.01%, 100% { opacity: 0; } }
/* idle fidgets */
.pixel-me .px-body { animation: px-breathe 2.4s steps(1) infinite; }
.pixel-me .px-head { animation: px-look 6s steps(1) infinite; }
.pixel-me .px-eyes { transform-box: fill-box; transform-origin: center; animation: px-blink 4s steps(1) infinite; }
.pixel-me .px-armL, .pixel-me .px-armR { animation: px-sway 2.4s steps(1) infinite; }
.pixel-me .px-armR { transform-origin: 22.5px 18px; }
.pixel-me .px-armL { transform-origin: 5.5px 18px; animation-delay: -1.2s; }
@keyframes px-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.5px); } }
@keyframes px-look { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(-1px); } 70% { transform: translateX(1px); } }
@keyframes px-blink { 0%, 92%, 100% { transform: scaleY(1); } 94%, 98% { transform: scaleY(.1); } }
@keyframes px-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(2deg); } }
/* hover: wave hello */
.pixel-me[data-mode="hi"] .px-armR { animation: px-wave .5s steps(1) infinite; }
.pixel-me[data-mode="hi"] .px-mouth { height: 2px; }
.pixel-me[data-mode="hi"] .px-body { animation: px-hop .5s steps(1) infinite; }
@keyframes px-wave { 0%, 100% { transform: rotate(-170deg); } 50% { transform: rotate(-190deg); } }
@keyframes px-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
.px-bubble {
  position: absolute; left: 62%; top: 4%; padding: 6px 12px; font: 400 14px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
  background: var(--text-primary); color: var(--bg-page); border-radius: var(--radius); opacity: 0; transform: translateY(6px); transition: opacity .2s steps(3), transform .2s steps(3); pointer-events: none;
}
.px-bubble::after { content: ""; position: absolute; left: 10px; bottom: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--text-primary); }
.pixel-me[data-mode="hi"] .px-bubble { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .pixel-me, .pixel-me * { animation: none !important; } .pixel-me .pf:first-child { opacity: 1; } }

.portrait__frame:has(.pixel-me)::before { display: none; }
.portrait:hover .portrait__frame:has(.pixel-me) { transform: none; }

/* Case-study image placeholders: swap each for a real image */
.cs__media { display: grid; gap: var(--space-4); grid-template-columns: 1fr; align-items: start; }
.cs__media--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs__media--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs__media--2 .shot__tile,
.cs__media--3 .shot__tile { padding: var(--space-4); }
.cs__media .shot { height: 100%; }
.cs__media .shot__tile { height: 100%; min-height: 0; }
.cs__media .shot figcaption { min-height: 2.8em; }
.ph { position: relative; margin: 0; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; padding: var(--space-5); text-align: center;
  border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--sec-ring); background: repeating-linear-gradient(135deg, transparent 0 10px, rgb(var(--greyscale-900) / .05) 10px 11px); }
.ph__tag { position: absolute; top: 12px; left: 12px; font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.ph figcaption { font: 400 14px/1.35 var(--font-body); color: var(--text-secondary); max-width: 28ch; }
@media (max-width: 720px) { .cs__media--2, .cs__media--3 { grid-template-columns: 1fr; } }
/* Real screenshots (DESIGN.md §9.5b): the image sits inset on the project's tinted gradient tile, no border or shadow */
.cs__wide, .cs__media { min-width: 0; }
@media (min-width: 1024px) {
  /* Break out to the left so screenshots and infographics use the label column too */
  .cs__content .cs__wide, .cs__content .cs__media { margin-left: calc(-1 * (33.333% + var(--gutter))); width: calc(133.333% + var(--gutter)); max-width: none; }
}
.shot { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.shot__tile { display: grid; place-items: center; width: 100%; padding: var(--space-4); border: 0; border-radius: var(--radius-lg); cursor: zoom-in; color: inherit; font: inherit;
  background: radial-gradient(70% 90% at 18% 12%, var(--t1), transparent 70%), radial-gradient(80% 80% at 88% 92%, var(--t2), transparent 72%), var(--t3); }
.shot__tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.shot img { display: block; width: 100%; height: auto; border-radius: 6px; opacity: 0; transition: opacity .4s ease-out; }
.shot img.is-loaded { opacity: 1; }
.shot--narrow img { max-width: 520px; }
.shot figcaption { display: flex; justify-content: space-between; gap: var(--space-3); font: 400 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.shot figcaption span:last-child { white-space: nowrap; }
@media (max-width: 767px) { .shot__tile { padding: var(--space-2); } }
@media (prefers-reduced-motion: reduce) { .shot img { opacity: 1; transition: none; } }
/* Lightbox: click a screenshot to read it at full size */
.lb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--space-5); background: rgb(var(--greyscale-black) / .94); opacity: 0; transition: opacity .2s var(--ease-standard); cursor: zoom-out; overflow: auto; }
.lb.is-open { opacity: 1; }
.lb img { display: block; max-width: min(96vw, 2000px); max-height: 92vh; width: auto; height: auto; border-radius: 6px; }
.lb button { position: fixed; top: var(--space-4); right: var(--space-4); height: 40px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius); background: rgb(var(--greyscale-white)); color: rgb(var(--greyscale-black)); font: 400 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.lb button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .lb { transition: none; } }

/* Case-study data dashboard (one tile shell for every chart type) */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--grid-gap); }
.dt { grid-column: span 4; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); min-height: 232px; border-radius: var(--radius-lg); background: var(--surface-card); color: var(--sec-fg); }
.dt--w6 { grid-column: span 6; } .dt--w8 { grid-column: span 8; } .dt--w12 { grid-column: span 12; }
.dt__head { min-height: 24px; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.dt__label { font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.dt__chip { padding: 3px 8px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--sec-ring); font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.dt__value { font: 400 44px/1 var(--font-ntype); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.dt__chart { margin-top: auto; }
.dt__note { margin: 0; font: 400 13px/1.4 var(--font-body); color: var(--sec-muted); }
.dt--kpi { justify-content: flex-start; } .dt--kpi .dt__note { margin-top: auto; }
/* bars */
.dt__chart:has(.dt__row) { display: flex; flex-direction: column; gap: 12px; }
.dt__row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; font: 400 12px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
.dt__row b { font: 400 14px/1 var(--font-mono); color: var(--sec-fg); font-variant-numeric: tabular-nums; }
.dt__track { grid-column: 1 / -1; height: 10px; border-radius: 2px; background: rgb(var(--greyscale-900) / .1); overflow: hidden; }
.dt__track i { display: block; height: 100%; width: var(--w); background: var(--sec-muted); opacity: .5; transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease-expressive); }
.dt__row.is-hi .dt__track i { background: var(--sec-fg); opacity: 1; }
.dash.in .dt__track i { transform: none; }
/* meter */
.dt--meter .dt__chart { display: flex; gap: 4px; }
.dt--meter .dt__chart i { flex: 1; height: 28px; border-radius: 2px; background: rgb(var(--greyscale-900) / .1); position: relative; overflow: hidden; }
.dt--meter .dt__chart i::after { content: ""; position: absolute; inset: 0; width: var(--f); background: var(--sec-fg); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-expressive); transition-delay: inherit; }
.dash.in .dt--meter .dt__chart i::after { transform: none; }
/* waffle */
.dt--waffle .dt__chart { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 4px; }
.dt--waffle .dt__chart i { aspect-ratio: 1; border-radius: 2px; background: rgb(var(--greyscale-900) / .1); transition: background .3s steps(2); }
.dash.in .dt--waffle .dt__chart i.on { background: var(--sec-fg); }
/* donut */
.dt--donut .dt__chart svg { display: block; width: 96px; height: 96px; }
.dt--donut circle { fill: none; stroke-width: 11; }
.dt--donut .trk { stroke: rgb(var(--greyscale-900) / .1); }
.dt--donut .arc { stroke: var(--sec-fg); transition: stroke-dashoffset 1.2s var(--ease-expressive); }
.dash.in .dt--donut .arc { stroke-dashoffset: var(--to); }
/* trend */
.dt--trend { gap: var(--space-3); }
.dt--trend .dt__chart { margin-top: auto; }
.dt--trend svg { display: block; width: 100%; height: 96px; overflow: visible; }
.dt--trend .grid { stroke: var(--sec-ring); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.dt--trend .line { fill: none; stroke: var(--sec-fg); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease-expressive); }
.dt--trend .area { opacity: 0; transition: opacity .8s .5s; }
.dt--trend .pt { fill: var(--bg-page); stroke: var(--sec-fg); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .3s 1s; }
.dt--trend .pt--hi { fill: var(--sec-fg); }
.dash.in .dt--trend .line { stroke-dashoffset: 0; } .dash.in .dt--trend .area, .dash.in .dt--trend .pt { opacity: 1; }
.dt__axis { display: flex; justify-content: space-between; font: 400 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--sec-muted); }
@media (max-width: 900px) { .dt, .dt--w6, .dt--w8 { grid-column: span 12; min-height: 0; } .dt--waffle .dt__chart { grid-template-columns: repeat(16, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .dt * { transition: none !important; } }

/* Arcade case study: embedded, interactive product prototypes */
.ap {
  --ap-bg: #000; --ap-panel: #0a0a0a; --ap-panel-2: #0f0f0f;
  --ap-line: rgba(255,255,255,.08); --ap-line-strong: rgba(255,255,255,.16);
  --ap-text: #fff; --ap-dim: #a3a3a3; --ap-faint: #737373;
  --ap-accent: #c6ff00; --ap-success: #86efac; --ap-warning: #f59e0b;
  margin: var(--space-3) 0; overflow: hidden; background: var(--ap-bg); color: var(--ap-text);
  border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--sec-ring);
  font-family: var(--font-body);
}
.ap *, .ap *::before, .ap *::after { box-sizing: border-box; }
.ap button { color: inherit; font: inherit; }
.ap__bar {
  min-height: 48px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--ap-line);
  display: flex; align-items: center; gap: 12px;
}
.ap__brand, .ap__sandbox, .ap__hint, .ap__screen-head > span, .ap__tool-bundle > span,
.ap__ia-copy > span, .ap__play-head, .ap__dash-head > span {
  font: 500 10px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}
.ap__brand { display: flex; align-items: center; gap: 8px; }
.ap__brand i { width: 10px; height: 10px; background: var(--ap-accent); box-shadow: 5px 5px 0 rgba(198,255,0,.35); }
.ap__sandbox { color: var(--ap-faint); }
.ap__body { min-height: 420px; padding: 24px; background-image: radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 20px 20px; }
.ap__hint { margin: 0; padding: 10px 16px; border-top: 1px solid var(--ap-line); color: var(--ap-faint); }
.ap__toggle { margin-left: auto; display: flex; border: 1px solid var(--ap-line); }
.ap__toggle button {
  min-height: 30px; padding: 0 10px; border: 0; border-left: 1px solid var(--ap-line); background: transparent;
  color: var(--ap-dim); cursor: pointer; font: 500 10px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
}
.ap__toggle button:first-child { border-left: 0; }
.ap__toggle button[aria-pressed="true"] { background: var(--ap-text); color: var(--ap-bg); }
.ap__primary {
  min-height: 40px; padding: 0 16px; border: 0; background: var(--ap-accent); color: #000 !important;
  cursor: pointer; font: 500 11px/1 var(--font-mono) !important; text-transform: uppercase; letter-spacing: .04em;
}
.ap__primary:disabled { opacity: .5; cursor: wait; }

/* IA switcher */
.ap--ia .ap__body { display: grid; grid-template-columns: minmax(180px, .8fr) 1.5fr; gap: 32px; align-items: center; }
.ap__ia-copy { display: flex; flex-direction: column; gap: 10px; }
.ap__ia-copy > span { color: var(--ap-accent); }
.ap__ia-copy > strong { font: 400 clamp(24px, 3vw, 40px)/1.05 var(--font-ntype); max-width: 10ch; }
.ap__ia-copy p { color: var(--ap-dim) !important; font-size: 13px !important; line-height: 1.5 !important; }
.ap__resource-list { border-top: 1px solid var(--ap-line); }
.ap__resource-list span { min-height: 34px; padding: 0 10px; border-bottom: 1px solid var(--ap-line); display: flex; align-items: center; gap: 14px; color: var(--ap-dim); font-size: 12px; }
.ap__resource-list b, .ap__job-list b { color: var(--ap-faint); font: 400 9px/1 var(--font-mono); }
.ap__job-list { border: 1px solid var(--ap-line); }
.ap__job-list button { width: 100%; min-height: 90px; padding: 16px; border: 0; border-top: 1px solid var(--ap-line); background: var(--ap-panel); display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: start; text-align: left; cursor: pointer; }
.ap__job-list button:first-child { border-top: 0; }
.ap__job-list button:hover { background: var(--ap-panel-2); }
.ap__job-list button span { display: flex; flex-direction: column; gap: 6px; }
.ap__job-list button strong { font-size: 16px; font-weight: 500; }
.ap__job-list button small { color: var(--ap-dim); font-size: 11px; line-height: 1.4; }
.ap__job-list button > i { color: var(--ap-accent); font-style: normal; }

/* Goal-first onboarding */
.ap__progress { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--ap-line); }
.ap__progress li { padding: 0 0 12px; color: var(--ap-faint); display: flex; gap: 8px; align-items: center; font: 500 10px/1 var(--font-mono); text-transform: uppercase; }
.ap__progress li i { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--ap-line-strong); font-style: normal; }
.ap__progress li.active { color: var(--ap-text); border-bottom: 1px solid var(--ap-accent); }
.ap__progress li.active i { background: var(--ap-accent); border-color: var(--ap-accent); color: #000; }
.ap__progress li.done { color: var(--ap-success); }
.ap__screen-head { max-width: 560px; margin-bottom: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ap__screen-head > span { color: var(--ap-accent); }
.ap__screen-head h3, .ap__dash-head h3 { margin: 0; color: var(--ap-text); font: 400 clamp(23px, 3vw, 34px)/1.1 var(--font-ntype); }
.ap__screen-head p { color: var(--ap-dim) !important; font-size: 13px !important; }
.ap__back { padding: 0; border: 0; background: none; color: var(--ap-dim) !important; cursor: pointer; font: 500 10px/1 var(--font-mono) !important; text-transform: uppercase; }
.ap__goal-grid, .ap__path-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ap-line); }
.ap__goal-grid button, .ap__path-grid button {
  min-height: 160px; padding: 16px; border: 0; border-left: 1px solid var(--ap-line); background: var(--ap-panel);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; cursor: pointer;
}
.ap__goal-grid button:first-child, .ap__path-grid button:first-child { border-left: 0; }
.ap__goal-grid button:hover, .ap__path-grid button:hover { background: var(--ap-panel-2); }
.ap__goal-grid strong, .ap__path-grid strong { font-size: 14px; font-weight: 500; }
.ap__goal-grid span, .ap__path-grid span { color: var(--ap-dim); font-size: 11px; line-height: 1.45; }
.ap__goal-grid i, .ap__path-grid i { margin-top: auto; color: var(--ap-accent); font: 500 10px/1 var(--font-mono); font-style: normal; text-transform: uppercase; }
.ap__path-grid button.recommended { box-shadow: inset 0 2px 0 var(--ap-accent); }
.ap__path-grid small { color: var(--ap-accent); font: 500 9px/1 var(--font-mono); text-transform: uppercase; }
.ap__tool-bundle { margin: -8px 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap__tool-bundle > span { margin-right: 4px; color: var(--ap-faint); }
.ap__tool-bundle b { padding: 6px 8px; border: 1px solid var(--ap-line); font: 500 10px/1 var(--font-mono); }
.ap__tool-bundle i, .ap__tool-bundle em { margin-left: 6px; color: var(--ap-success); font-style: normal; font-weight: 400; }
.ap__tool-bundle em { color: var(--ap-warning); }
.ap__success { min-height: 320px; border: 1px solid var(--ap-line); display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; background: var(--ap-panel); }
.ap__success > span { color: var(--ap-success); font: 500 10px/1 var(--font-mono); letter-spacing: .08em; }
.ap__success > strong { font: 400 clamp(26px, 4vw, 44px)/1 var(--font-ntype); }
.ap__success p { color: var(--ap-dim) !important; font-size: 13px !important; }
.ap__success button { margin-top: 8px; min-height: 40px; padding: 0 16px; border: 0; background: var(--ap-accent); color: #000; font: 500 10px/1 var(--font-mono); text-transform: uppercase; cursor: pointer; }

/* Runtime simulator */
.ap--runtime .ap__body { padding: 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr); }
.ap__play-main { min-height: 470px; padding: 24px; border-right: 1px solid var(--ap-line); display: flex; flex-direction: column; gap: 18px; }
.ap__play-head { padding-bottom: 12px; border-bottom: 1px solid var(--ap-line); display: flex; justify-content: space-between; color: var(--ap-faint); }
.ap__prompt { align-self: flex-end; max-width: 80%; padding: 12px; border: 1px solid var(--ap-line-strong); background: var(--ap-panel); font-size: 13px; line-height: 1.45; }
.ap__response { display: flex; flex-direction: column; gap: 8px; }
.ap__response > span { color: var(--ap-accent); font: 500 10px/1 var(--font-mono); letter-spacing: .08em; }
.ap__response > strong { font-size: 15px; }
.ap__response p { color: var(--ap-dim) !important; font-size: 13px !important; line-height: 1.5 !important; }
.ap__response code { color: var(--ap-text); font-family: var(--font-mono); }
.ap__play-main .ap__primary { margin-top: auto; align-self: flex-start; }
.ap__trace { list-style: none; margin: 0; padding: 16px; background: var(--ap-panel); }
.ap__trace li { min-height: 48px; border-bottom: 1px solid var(--ap-line); display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; color: var(--ap-faint); font-size: 11px; }
.ap__trace li i { font: 400 9px/1 var(--font-mono); font-style: normal; }
.ap__trace li b { font: 400 9px/1 var(--font-mono); text-transform: uppercase; }
.ap__trace li.running { color: var(--ap-text); }
.ap__trace li.running i { color: var(--ap-accent); }
.ap__trace li.done { color: var(--ap-success); }
.ap__trace li.blocked { color: var(--ap-warning); background: rgba(245,158,11,.08); }

/* Progressive dashboard */
.ap__toggle--states { overflow-x: auto; }
.ap--dashboard .ap__body { min-height: 390px; }
.ap__dash-head { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.ap__dash-head > span { color: var(--ap-faint); }
.ap__dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ap-line); }
.ap__dash-grid > div { min-height: 150px; padding: 16px; border-left: 1px solid var(--ap-line); background: var(--ap-panel); display: flex; flex-direction: column; gap: 8px; }
.ap__dash-grid > div:first-child { border-left: 0; }
.ap__dash-grid strong { font: 400 30px/1 var(--font-ntype); }
.ap__dash-grid span { color: var(--ap-dim); font-size: 12px; }
.ap__dash-grid i { margin-top: auto; color: var(--ap-success); font: 400 9px/1 var(--font-mono); font-style: normal; text-transform: uppercase; }
.ap__dash-grid .warn i { color: var(--ap-warning); }
.ap--dashboard .ap__primary { margin-top: 16px; }

/* Measurement architecture */
.cv { margin: var(--space-3) 0; padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface-card); }
.cv figcaption { margin-bottom: var(--space-5); color: var(--sec-muted); font: 400 11px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.cv__north { position: relative; width: min(100%, 420px); margin: 0 auto 48px; padding: 18px; border: 1px solid var(--sec-fg); display: flex; flex-direction: column; gap: 4px; text-align: center; }
.cv__north::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 25px; background: var(--sec-line); }
.cv__north span, .cv__north small, .cv__metrics i, .cv__metrics span { font: 400 10px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.cv__north span, .cv__north small { color: var(--sec-muted); }
.cv__north strong { font: 400 24px/1.1 var(--font-ntype); }
.cv__metrics { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--sec-line); }
.cv__metrics > div { position: relative; min-height: 140px; padding: 18px 12px 0; border-left: 1px solid var(--sec-line); display: flex; flex-direction: column; gap: 8px; }
.cv__metrics > div:first-child { border-left: 0; }
.cv__metrics > div::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 16px; background: var(--sec-line); }
.cv__metrics i { color: var(--sec-muted); font-style: normal; }
.cv__metrics span { color: var(--sec-muted); }
.cv__metrics strong { font: 400 14px/1.35 var(--font-body); }
.cv > p { margin: var(--space-4) 0 0 !important; padding-top: var(--space-3); border-top: 1px solid var(--sec-line); font-size: 12px !important; }

@media (max-width: 820px) {
  .ap__bar { flex-wrap: wrap; }
  .ap__toggle--states { order: 3; width: 100%; margin-left: 0; }
  .ap__toggle--states button { flex: 1; }
  .ap--ia .ap__body, .ap--runtime .ap__body { grid-template-columns: 1fr; }
  .ap__play-main { min-height: 360px; border-right: 0; border-bottom: 1px solid var(--ap-line); }
  .ap__goal-grid, .ap__path-grid, .ap__dash-grid { grid-template-columns: 1fr; }
  .ap__goal-grid button, .ap__path-grid button, .ap__dash-grid > div { min-height: 110px; border-left: 0; border-top: 1px solid var(--ap-line); }
  .ap__goal-grid button:first-child, .ap__path-grid button:first-child, .ap__dash-grid > div:first-child { border-top: 0; }
  .cv__metrics { grid-template-columns: 1fr; border-top: 0; }
  .cv__metrics > div { min-height: 0; padding: 14px 0; border-left: 0; border-top: 1px solid var(--sec-line); }
  .cv__metrics > div::before, .cv__north::after { display: none; }
  .cv__north { margin-bottom: var(--space-4); }
}
@media (max-width: 560px) {
  .ap__body { padding: 16px; }
  .ap__sandbox { display: none; }
  .ap__progress li { font-size: 0; }
  .ap__progress li i { font-size: 10px; }
  .ap__tool-bundle b { width: 100%; }
  .ap__toggle button { padding: 0 7px; font-size: 9px; }
  .ap__play-main { padding: 16px; }
  .ap__play-head { gap: 12px; }
  .ap__prompt { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) { .ap *, .cv * { scroll-behavior: auto !important; transition: none !important; } }

/* ── Case-study bento board (DESIGN.md: 8px gaps and radii, mono caps labels, NType numbers, no shadows) ── */
.dt--w3 { grid-column: span 3; }
@media (max-width: 1023px) { .dt--w3 { grid-column: span 6; } }
@media (max-width: 767px) { .dt--w3 { grid-column: span 12; } }
.bento { margin: 0; padding: var(--grid-gap); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(176px, auto); gap: var(--grid-gap);
  border-radius: var(--radius-lg); background: rgb(var(--greyscale-dm-light)); }
:root[data-theme="dark"] .bento { background: rgb(var(--greyscale-black)); }
.bt { --muted: color-mix(in srgb, currentColor 60%, transparent); --faint: color-mix(in srgb, currentColor 16%, transparent);
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border-radius: var(--radius-lg); container-type: inline-size; overflow: hidden;
  opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease-standard), transform .45s var(--ease-standard); transition-delay: calc(var(--i, 0) * 60ms); }
.bento.in .bt { opacity: 1; transform: none; }
.bt--w3 { grid-column: span 3; } .bt--w4 { grid-column: span 4; } .bt--w5 { grid-column: span 5; } .bt--w6 { grid-column: span 6; } .bt--w7 { grid-column: span 7; } .bt--w8 { grid-column: span 8; } .bt--w12 { grid-column: span 12; }
.bt--h2 { grid-row: span 2; }
/* tones: greyscale ramp plus the project accent */
.bt--ac { background: var(--ac, #F0299B); color: rgb(var(--greyscale-black)); }
.bt--soft { background: color-mix(in srgb, var(--ac, #F0299B) 28%, rgb(var(--greyscale-100))); color: rgb(var(--greyscale-black)); }
.bt--white { background: rgb(var(--greyscale-100)); color: rgb(var(--greyscale-black)); }
.bt--light { background: rgb(var(--greyscale-200)); color: rgb(var(--greyscale-black)); }
.bt--mid { background: rgb(var(--greyscale-700)); color: rgb(var(--greyscale-black)); }
.bt--graphite { background: rgb(var(--greyscale-900)); color: rgb(var(--greyscale-100)); }
.bt--dark { background: rgb(var(--greyscale-1000)); color: rgb(var(--greyscale-100)); }
/* shared type */
.bt__label { font: 400 11px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.bt__value { margin-top: auto; font: 400 clamp(44px, 24cqw, 112px)/.92 var(--font-ntype); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bt__value small { margin-left: .12em; font-size: .36em; letter-spacing: -.01em; }
.bt__sub { font: 400 13px/1.35 var(--font-body); color: var(--muted); max-width: 34ch; }
.bt__title { font: 400 clamp(18px, 7cqw, 24px)/1.15 var(--font-ntype); letter-spacing: -.01em; }
.bt__body { font: 400 13px/1.45 var(--font-body); color: var(--muted); }
.bt__chip { padding: 2px 6px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--faint); font: 400 10px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
/* num: progress bar */
.bt__bar { height: 56px; margin-top: var(--space-3); border-radius: 4px; background: var(--faint); overflow: hidden; }
.bt__bar i { display: block; height: 100%; width: var(--w); background: rgb(var(--greyscale-black)); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease-expressive) .2s; }
.bento.in .bt__bar i { transform: none; }
/* stack: inset cards, like a receipt */
.bt--stack { padding: var(--space-2); gap: var(--space-2); }
.bt--stack > .bt__label { padding: var(--space-2) var(--space-3) 0; }
.bt__card { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-radius: 6px; }
.bt__cardtop { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.bt__cardlabel { font: 500 14px/1.2 var(--font-body); max-width: 16ch; }
.bt__card strong { font: 400 clamp(28px, 13cqw, 48px)/1 var(--font-ntype); letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bt__card .bt__sub { font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
/* bars: faded track behind a solid bar, or before/after pairs */
.bt__chart { flex: 1; min-height: 180px; display: flex; align-items: stretch; gap: var(--space-2); margin-top: var(--space-3); }
.bt__col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.bt__plot { flex: 1; position: relative; display: flex; align-items: flex-end; gap: 3px; }
.bt__plot i { flex: 1; height: var(--h); border-radius: 6px; transform-origin: bottom; transform: scaleY(0); transition: transform .8s var(--ease-expressive); transition-delay: calc(var(--k, 0) * 70ms + 150ms); }
.bt__plot i.is-before { background: var(--faint); }
.bt__plot i.is-after { background: currentColor; }
.bt__plot i.is-track { position: absolute; inset: 0; height: 100%; background: var(--faint); transform: none; }
.bt__plot i.is-track + i { position: relative; z-index: 1; }
.bento.in .bt__plot i { transform: none; }
.bt__axis { font: 400 10px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt__legend { display: flex; gap: var(--space-4); }
.bt__legend span { display: inline-flex; align-items: center; gap: 6px; font: 400 10px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.bt__legend i { width: 10px; height: 10px; border-radius: 2px; }
.bt__legend i.is-before { background: var(--faint); } .bt__legend i.is-after { background: currentColor; }
/* donut */
.bt__ring { position: relative; width: min(100%, 220px); aspect-ratio: 1; margin: auto; }
.bt__ring svg { display: block; width: 100%; height: 100%; }
.bt__ring circle { fill: none; stroke-width: 20; }
.bt__ring .trk { stroke: var(--faint); }
.bt__ring .arc { stroke: currentColor; transition: stroke-dashoffset 1.2s var(--ease-expressive) .2s; }
.bento.in .bt__ring .arc { stroke-dashoffset: var(--to); }
.bt__ring strong { position: absolute; inset: 0; display: grid; place-items: center; font: 400 clamp(28px, 14cqw, 48px)/1 var(--font-ntype); letter-spacing: -.02em; }
/* dial: numbers on a ring, the active step marked */
.bt__dial { --r: 38cqw; position: relative; width: 100%; aspect-ratio: 1; margin: auto 0; border-radius: 50%; background: rgb(var(--greyscale-100)); color: rgb(var(--greyscale-black)); container-type: inline-size; }
.bt__dial > span { position: absolute; left: 50%; top: 50%; width: 15cqw; height: 15cqw; display: grid; place-items: center; border-radius: 50%; font: 400 10cqw/1 var(--font-ntype);
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--r))) rotate(calc(-1 * var(--a))); }
.bt__dial > span.is-at { background: var(--ac, #F0299B); }
.bt__dialmid { position: absolute; inset: 27%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 50%; background: rgb(var(--greyscale-1000)); color: rgb(var(--greyscale-100)); text-align: center; }
.bt__dialmid strong { font: 400 18cqw/1 var(--font-ntype); letter-spacing: -.03em; }
.bt__dialmid span { font: 400 3.4cqw/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: rgb(var(--greyscale-default)); }
/* list: ticker rows */
.bt__list { margin: auto 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.bt__list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--space-3); align-items: baseline; padding: 9px 0; border-top: 1px solid var(--faint); font: 500 14px/1.3 var(--font-body); }
.bt__mark { font: 400 11px/1.3 var(--font-mono); color: var(--muted); }
.bt__right { font: 400 11px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: right; white-space: nowrap; }
.bt--ac .bt__mark, .bt--soft .bt__mark { color: inherit; }
/* keys: 2 × 2 keypad */
.bt--keys { padding: var(--space-2); }
.bt--keys > .bt__label { padding: var(--space-2) var(--space-3) 0; }
.bt__keys { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.bt__key { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-4) var(--space-2); border-radius: 6px; background: rgb(var(--greyscale-100)); color: rgb(var(--greyscale-black)); text-align: center; }
.bt__key.is-hi { background: var(--ac, #F0299B); }
.bt__key strong { font: 400 clamp(26px, 13cqw, 52px)/1 var(--font-ntype); letter-spacing: -.02em; }
.bt__key span { font: 400 10px/1.25 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
/* text: one decision */
.bt--text .bt__title { margin-top: auto; }
/* timeline: bars on an 8-week grid */
.bt__time { margin-top: auto; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--grid-gap); }
.bt__phase { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.bt__phase > i { height: 14px; border-radius: 3px; background: var(--faint); transform-origin: left; transform: scaleX(0); transition: transform .8s var(--ease-expressive); transition-delay: calc(var(--k, 0) * 140ms + 150ms); }
.bt__phase.is-on > i { background: currentColor; }
.bento.in .bt__phase > i { transform: none; }
.bt__phasetop { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); font: 400 11px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.bt__phase b { font: 400 20px/1.15 var(--font-ntype); }
/* responsive: 12 → 6 → 1 column per tile */
@media (max-width: 1023px) {
  .bt--w3, .bt--w4, .bt--w5 { grid-column: span 6; }
  .bt--w6, .bt--w7, .bt--w8 { grid-column: span 12; }
}
@media (max-width: 767px) {
  .bento { grid-auto-rows: auto; }
  .bt { grid-column: span 12 !important; grid-row: auto !important; min-height: 168px; }
  .bt__time { grid-template-columns: 1fr; } .bt__phase { grid-column: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  .bt, .bt__bar i, .bt__plot i, .bt__phase > i, .bt__ring .arc { transition: none; }
  .bt { opacity: 1; transform: none; } .bt__bar i, .bt__plot i, .bt__phase > i { transform: none; } .bt__ring .arc { stroke-dashoffset: var(--to); }
}

/* Dashboard tiles pick up the project accent when one is set */
.dt--donut .arc, .dt--trend .line { stroke: var(--ac, var(--sec-fg)); }
.dt--trend .pt--hi { fill: var(--ac, var(--sec-fg)); }
.dt__row.is-hi .dt__track i, .dash.in .dt--waffle .dt__chart i.on, .dt--meter .dt__chart i::after { background: var(--ac, var(--sec-fg)); }

/* Wide media and infographics paint over the sticky section label instead of under it */
.cs__content { position: relative; z-index: 1; }

/* Playground: tile with a contextual page preview in a browser frame */
.lab__tile--shot { justify-content: flex-start; }
.lab__shot { position: absolute; z-index: 1; left: var(--space-5); right: var(--space-5); top: 56px; height: 47%; overflow: hidden; border-radius: 8px 8px 0 0; background: #fff; box-shadow: 0 0 0 1px rgba(23, 23, 23, .12); transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .lab__tile--shot:hover .lab__shot { transform: translateY(-6px); } }
.lab__shotbar { display: flex; align-items: center; gap: 4px; height: 18px; padding: 0 8px; background: #F4F4F2; }
.lab__shotbar i { width: 5px; height: 5px; border-radius: 50%; background: #C9C9C5; }
.lab__shotbar span { margin: 0 auto; padding: 1px 14px; border-radius: 3px; background: #fff; font: 400 8px/1.4 var(--font-mono); letter-spacing: .02em; color: #6F6F6C; }
.lab__shot img { display: block; width: 100%; height: calc(100% - 18px); object-fit: cover; object-position: top center; }
.lab__tile--shot .lab__bottom { margin-top: auto; }
.lab__tile--shot .lab__scope { display: none; }
@media (max-width: 767px) { .lab__shot { height: 52%; } }
@media (prefers-reduced-motion: reduce) { .lab__tile--shot:hover .lab__shot { transform: none; } }

/* Video in a case-study tile */
.shot--video video { display: block; width: 100%; max-width: 860px; max-height: 620px; height: auto; border-radius: 6px; background: #000; }

/* Case tile carrying product video instead of the headline metric */
.case__vid { display: block; max-width: 100%; max-height: 100%; width: auto; height: 100%; object-fit: contain; border-radius: 6px; background: #000; transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .case__link:hover .case__vid { transform: scale(1.02); } }
.case__tile--media { padding: var(--space-5); }
.case__tile--bleed { padding: 0; }
.case__tile--bleed :is(.case__vid, .case__img) { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border-radius: 0; background: none; }
@media (prefers-reduced-motion: reduce) { .case__link:hover .case__vid { transform: none; } }
.pcard__thumb .case__img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: center; border-radius: 0; }

/* Photo thumbnails: white type with a soft shadow so it holds on the bright crops */
.case__tile--photo .metric { color: #fff; text-shadow: 0 1px 28px rgba(0, 0, 0, .28); }
.case__tile--photo .metric span { color: rgba(255, 255, 255, .88); }

/* ── Work: CotonAI's three passcode-protected studies: two across, one below ── */
.lockgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-4); }
.lockgrid > li.is-wide { grid-column: 1 / -1; }
.lockcard { display: flex; flex-direction: column; gap: var(--space-1); text-decoration: none; color: inherit; }
.lockcard__tile { aspect-ratio: 16 / 10; padding: 0; margin-bottom: var(--space-3); transition: transform .35s var(--ease-out); }
.lockgrid > li.is-wide .lockcard__tile { aspect-ratio: 16 / 8; }
.lockcard__img, .lockcard__vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #000; }
.lockcard__vid { object-position: center; }
.lockcard__badge { position: absolute; top: var(--space-3); right: var(--space-3); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: rgb(20 20 15 / .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lockcard__icon { width: 18px; height: auto; overflow: visible; --lock-dot: #14140f; }
.lockcard__shackle { transform-box: fill-box; transform-origin: 85% 100%; transition: transform .35s var(--ease-standard); }
.lockcard:focus-visible .lockcard__shackle, .lockcard.is-open .lockcard__shackle { transform: translateY(-1.5px) rotate(-14deg); }
@media (hover: hover) and (pointer: fine) { .lockcard:hover .lockcard__shackle { transform: translateY(-1.5px) rotate(-14deg); } }
.lockcard:focus-visible .lockcard__tile { transform: translateY(-3px); }
@media (hover: hover) and (pointer: fine) { .lockcard:hover .lockcard__tile { transform: translateY(-3px); } }
.lockcard:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--radius-lg); }
.lockcard__title { margin: 0; font: 400 clamp(20px, 2vw, 26px)/1.1 var(--font-ntype); letter-spacing: -.01em; }
.lockcard__area { margin: 0; font: 400 13px/1.4 var(--font-body); color: var(--sec-muted); }
.lockcard:focus-visible .case__cta svg { transform: translateX(3px); }
@media (hover: hover) and (pointer: fine) { .lockcard:hover .case__cta svg { transform: translateX(3px); } }
@media (max-width: 1023px) { .case--locked { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .lockgrid { grid-template-columns: minmax(0, 1fr); } .lockgrid > li.is-wide .lockcard__tile { aspect-ratio: 16 / 10; } }
@media (prefers-reduced-motion: reduce) { .lockcard__tile, .lockcard__shackle { transition: none; } .lockcard:is(:hover, :focus-visible) .lockcard__tile { transform: none; } }

.lockcard__tile--contain { background: var(--t3); }
.lockcard__tile--contain .lockcard__img { object-fit: contain; object-position: center; padding: var(--space-3); background: none; }

/* ── Work filter: Recent, Featured, then the sectors ── */
.work__tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-6); padding: 0; }
#work .work__tabs { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: var(--space-1); }
.work__tab { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 8px 12px; border-radius: var(--radius); background: transparent; color: var(--sec-muted);
  box-shadow: inset 0 0 0 1px var(--sec-line); font: 400 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  transition: background-color .2s var(--ease-standard), color .2s var(--ease-standard), transform .16s var(--ease-out); }
.work__tab sup { font-size: 10px; line-height: 1; opacity: .6; }
.work__tab:hover { color: var(--sec-fg); }
.work__tab[aria-selected="true"] { background: var(--sec-fg); color: var(--sec-bg); box-shadow: none; }
.work__tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.work__tabs + .cards > .case:first-child { border-top: 0; }
@media (max-width: 767px) {
  .work__tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter, 16px) * -1); padding-inline: var(--gutter, 16px); scrollbar-width: none; }
  .work__tabs::-webkit-scrollbar { display: none; }
  #work .work__tabs { justify-content: flex-start; width: auto; }
}
@media (max-width: 1023px) {
  #work .work__headline { align-items: flex-start; text-align: left; }
  #work .work__headline .work__title { text-align: left; }
  #work .work__headline .dotfield { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .work__tab { transition: none; } }
.cards > li[hidden], .lockgrid > li[hidden] { display: none !important; }

/* ── Work: a minimal rim glow behind the top edge of the panel; it follows the pointer and brightens on hover ── */
.work { position: relative; --gx: 50%; --gi: .45; --glow-o: .9; }
:root[data-theme="light"] .work { --glow-o: .5; }
.work::before {
  content: ""; position: absolute; z-index: -1; left: 6%; right: 6%; top: -118px; height: 190px; pointer-events: none; opacity: var(--glow-o);
  background:
    radial-gradient(20% 64% at var(--gx), rgb(214 200 255 / calc(.62 * var(--gi))), transparent 76%),
    radial-gradient(40% 100% at calc(var(--gx) - 12%) 100%, rgb(124 98 255 / calc(.5 * var(--gi))), transparent 72%),
    radial-gradient(38% 100% at calc(var(--gx) + 16%) 100%, rgb(52 92 255 / calc(.42 * var(--gi))), transparent 72%),
    radial-gradient(22% 80% at calc(var(--gx) + 38%) 100%, rgb(255 108 56 / calc(.3 * var(--gi))), transparent 72%);
  background-position: 0 100%; background-repeat: no-repeat; filter: blur(30px); will-change: transform, opacity; animation: work-glow 10s ease-in-out infinite alternate;
}
.work::after {
  content: ""; position: absolute; left: 6%; right: 6%; top: 0; height: 1px; pointer-events: none; opacity: calc(.18 + .6 * var(--gi));
  background: linear-gradient(90deg, rgb(150 130 255 / .9), rgb(120 150 255 / .9) 55%, rgb(255 140 90 / .9));
  -webkit-mask-image: radial-gradient(32% 600% at var(--gx) 50%, #000, transparent); mask-image: radial-gradient(32% 600% at var(--gx) 50%, #000, transparent);
}
@keyframes work-glow { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
@media (prefers-reduced-motion: reduce) { .work::before { animation: none; } }
