/* ==========================================================================
   026 · MAXIMALISM — antjanus.com
   Rule of the house: patterns go around text, never behind it.
   Every sentence sits on a solid "reading slab"; the riot lives in the frame.
   ========================================================================== */

/* ---------- Primitives ---------- */
:root {
  --plum-950: #1a0b2e;
  --plum-900: #22103b;
  --plum-800: #2e1850;
  --plum-700: #3d2a55;
  --lilac-200: #e3d5f5;
  --cream-50: #fffaf0;
  --cream-100: #fff1d6;
  --cream-200: #ffe3ad;
  --pink-500: #ff4f8b;
  --pink-700: #c3124f;
  --pink-300: #ff8fb4;
  --lime-400: #c6f432;
  --tangerine-400: #ff8a2a;
  --cobalt-600: #2b3bff;
  --cobalt-300: #8d98ff;
  --teal-400: #16c2b0;
  --sun-300: #ffd23f;
  --slate-brand: #364f6a;
  --slate-brand-light: #6f92bd;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --border-w: 3px;
  --shadow-step: 8px;
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
}

/* ---------- Semantic tokens (light) ---------- */
:root {
  --ground: var(--cream-100);
  --slab: var(--cream-50);
  --slab-2: var(--cream-200);
  --ink: var(--plum-950);
  --ink-soft: var(--plum-700);
  --line: var(--plum-950);
  --on-bright: var(--plum-950);
  --on-deep: var(--cream-50);
  --deep: var(--plum-950);
  --link: var(--pink-700);
  --link-hover: var(--cobalt-600);
  --focus: var(--cobalt-600);
  --brand: var(--slate-brand);
  --pat-a: var(--pink-500);
  --pat-b: var(--sun-300);
  --pat-c: var(--cobalt-600);
  --pat-d: var(--lime-400);
  --pat-e: var(--teal-400);
  --pat-f: var(--tangerine-400);
  --code-bg: #1a0b2e;
  --code-ink: #fff1d6;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ground: #120822;
  --slab: var(--plum-900);
  --slab-2: var(--plum-800);
  --ink: var(--cream-100);
  --ink-soft: var(--lilac-200);
  --line: #f7e7c4;
  --deep: #07030f;
  --link: var(--pink-300);
  --link-hover: var(--lime-400);
  --focus: var(--lime-400);
  --brand: var(--slate-brand-light);
  --pat-c: #4b59ff;
  --code-bg: #07030f;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #120822;
    --slab: var(--plum-900);
    --slab-2: var(--plum-800);
    --ink: var(--cream-100);
    --ink-soft: var(--lilac-200);
    --line: #f7e7c4;
    --deep: #07030f;
    --link: var(--pink-300);
    --link-hover: var(--lime-400);
    --focus: var(--lime-400);
    --brand: var(--slate-brand-light);
    --pat-c: #4b59ff;
    --code-bg: #07030f;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: clip;
  font-variation-settings: "wdth" 100;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-variation-settings: "SOFT" 100, "WONK" 1; line-height: 1.05; margin: 0 0 0.4em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--lime-400); color: var(--on-bright); padding: 10px 16px; border: var(--border-w) solid var(--plum-950); font-weight: 700; }
.skip-link:focus { top: 12px; }
.mono { font-family: var(--font-mono); }

/* ---------- Pattern library (the "fabric") ---------- */
.pat { --a: var(--pat-a); --b: var(--pat-b); }
.pat-dots { background: radial-gradient(var(--a) 28%, transparent 31%) 0 0 / 22px 22px, radial-gradient(var(--a) 28%, transparent 31%) 11px 11px / 22px 22px, var(--b); }
.pat-stripes { background: repeating-linear-gradient(-45deg, var(--a) 0 14px, var(--b) 14px 28px); }
.pat-check { background: conic-gradient(var(--a) 25%, var(--b) 0 50%, var(--a) 0 75%, var(--b) 0) 0 0 / 36px 36px; }
.pat-grid { background: linear-gradient(var(--a) 2px, transparent 2px) 0 0 / 26px 26px, linear-gradient(90deg, var(--a) 2px, transparent 2px) 0 0 / 26px 26px, var(--b); }
.pat-zig {
  background:
    linear-gradient(135deg, var(--a) 25%, transparent 25%) -16px 0 / 32px 32px,
    linear-gradient(225deg, var(--a) 25%, transparent 25%) -16px 0 / 32px 32px,
    linear-gradient(315deg, var(--a) 25%, transparent 25%) 0 0 / 32px 32px,
    linear-gradient(45deg, var(--a) 25%, transparent 25%) 0 0 / 32px 32px,
    var(--b);
}
.pat-waves { background: radial-gradient(circle at 50% 100%, transparent 38%, var(--a) 40% 55%, transparent 57%) 0 0 / 40px 20px, var(--b); }
.pat-sun { background: repeating-conic-gradient(from 0deg at 50% 50%, var(--a) 0 10deg, var(--b) 10deg 20deg); }
.pat-plaid {
  background:
    repeating-linear-gradient(0deg, transparent 0 18px, color-mix(in srgb, var(--a) 70%, transparent) 18px 30px),
    repeating-linear-gradient(90deg, transparent 0 18px, color-mix(in srgb, var(--a) 70%, transparent) 18px 30px),
    var(--b);
}
.pat-confetti {
  background:
    radial-gradient(circle, var(--pat-a) 3px, transparent 4px) 0 0 / 46px 46px,
    radial-gradient(circle, var(--pat-d) 3px, transparent 4px) 23px 11px / 46px 46px,
    radial-gradient(circle, var(--pat-c) 3px, transparent 4px) 9px 30px / 46px 46px,
    radial-gradient(circle, var(--pat-f) 3px, transparent 4px) 34px 36px / 46px 46px,
    var(--b);
}

/* colourways */
.cw-pink { --a: var(--pink-500); --b: var(--sun-300); }
.cw-lime { --a: var(--plum-950); --b: var(--lime-400); }
.cw-cobalt { --a: var(--cobalt-600); --b: var(--pink-300); }
.cw-tang { --a: var(--tangerine-400); --b: var(--cream-200); }
.cw-teal { --a: var(--teal-400); --b: var(--plum-950); }
.cw-plum { --a: var(--plum-700); --b: var(--pink-500); }
.cw-sun { --a: var(--sun-300); --b: var(--cobalt-600); }
.cw-brand { --a: var(--slate-brand); --b: var(--cream-200); }
.cw-night { --a: #2b1a45; --b: #120822; }

/* Calm mode: a legibility escape hatch the reader controls */
:root[data-calm="on"] .pat,
:root[data-calm="on"] .pat-under::before { background: var(--slab-2) !important; }
:root[data-calm="on"] .marquee__track { animation: none !important; }

/* ---------- Slabs, borders, shadows ---------- */
.slab {
  background: var(--slab);
  color: var(--ink);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-step) var(--shadow-step) 0 var(--shadow, var(--pat-a));
}
.slab--deep { background: var(--deep); color: var(--on-deep); border-color: var(--line); }
.slab--deep a:not(.btn) { color: var(--lime-400); }
.shadow-pink { --shadow: var(--pink-500); }
.shadow-lime { --shadow: var(--lime-400); }
.shadow-cobalt { --shadow: var(--cobalt-600); }
.shadow-tang { --shadow: var(--tangerine-400); }
.shadow-teal { --shadow: var(--teal-400); }
.shadow-sun { --shadow: var(--sun-300); }

/* ---------- Eyebrows, chips, stickers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono); font-size: 0.875rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--lime-400); color: var(--on-bright);
  border: 2px solid var(--plum-950); border-radius: 999px; padding: 0.3em 0.9em;
}
.eyebrow--pink { background: var(--pink-500); }
.eyebrow--sun { background: var(--sun-300); }
.eyebrow--tang { background: var(--tangerine-400); }
.eyebrow--teal { background: var(--teal-400); }
.eyebrow--cobalt { background: var(--cobalt-600); color: #fff; }

.chip {
  display: inline-block; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.3;
  padding: 0.35em 0.7em; border: 2px solid var(--line); border-radius: 999px;
  color: var(--ink); background: var(--slab); text-decoration: none;
}
a.chip:hover { background: var(--lime-400); color: var(--on-bright); border-color: var(--plum-950); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }

.sticker {
  position: absolute; z-index: 3;
  display: grid; place-items: center; text-align: center;
  width: 132px; aspect-ratio: 1; border-radius: 50%;
  border: var(--border-w) solid var(--plum-950);
  color: var(--on-bright); background: var(--sun-300);
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.2;
  box-shadow: 5px 5px 0 var(--plum-950);
}
.sticker strong { display: block; font-family: var(--font-display); font-size: 2.3rem; line-height: 1; text-transform: none; letter-spacing: -0.02em; font-weight: 900; }
.sticker--star { border-radius: 0; border: 0; box-shadow: none; clip-path: polygon(50% 0%, 61% 13%, 78% 7%, 80% 25%, 97% 30%, 88% 46%, 100% 60%, 84% 69%, 86% 87%, 68% 86%, 57% 100%, 45% 88%, 28% 96%, 23% 79%, 5% 74%, 13% 58%, 0% 43%, 16% 34%, 13% 16%, 31% 16%, 40% 0%); }
.sticker--pink { background: var(--pink-500); }
.sticker--lime { background: var(--lime-400); }
.sticker--teal { background: var(--teal-400); }
.sticker--cobalt { background: var(--cobalt-600); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.6em 1.3em;
  font-family: var(--font-body); font-weight: 800; font-size: 1.0625rem; text-decoration: none;
  border: var(--border-w) solid var(--plum-950); border-radius: 999px; cursor: pointer;
  background: var(--plum-950); color: var(--cream-50);
  box-shadow: 5px 5px 0 var(--pink-500);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.btn:hover { color: var(--cream-50); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--pink-500); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--pink-500); }
:root[data-theme="dark"] .btn { border-color: var(--cream-100); }
.btn--bright { background: var(--lime-400); color: var(--on-bright); box-shadow: 5px 5px 0 var(--plum-950); }
.btn--bright:hover { color: var(--on-bright); box-shadow: 7px 7px 0 var(--plum-950); }
.btn--ghost { background: var(--slab); color: var(--ink); box-shadow: 5px 5px 0 var(--pat-c); }
.btn--ghost:hover { color: var(--ink); box-shadow: 7px 7px 0 var(--pat-c); }
.link-strong { font-weight: 800; color: var(--ink); text-decoration: underline wavy var(--pink-500); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.link-strong:hover { color: var(--ink); text-decoration-color: var(--cobalt-600); }
.link-quiet { color: var(--ink-soft); font-weight: 600; }

/* ---------- Marquee ticker ---------- */
.marquee { background: var(--plum-950); color: var(--cream-100); border-bottom: var(--border-w) solid var(--plum-950); overflow: hidden; font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; }
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee__track span { padding: 8px 0; white-space: nowrap; }
.marquee__track b { color: var(--lime-400); font-weight: 500; }
.marquee__track i { font-style: normal; color: var(--pink-300); padding: 0 1.2em; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Header / nav ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--ground); border-bottom: var(--border-w) solid var(--line); }
.site-head__inner { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand svg { width: 52px; height: 52px; flex: none; }
.brand__words { display: flex; flex-direction: column; line-height: 1; }
.brand__words small { white-space: nowrap; font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.brand__words strong { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; letter-spacing: -0.02em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: 1.0625rem; color: var(--ink); text-decoration: none;
}
.nav a:hover { border-color: var(--line); background: var(--slab); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--pink-500); color: var(--on-bright); border-color: var(--plum-950); box-shadow: 3px 3px 0 var(--plum-950); }
.nav a.nav-ai { color: var(--on-bright); border-color: var(--plum-950); --a: var(--pink-500); --b: var(--lime-400); background: repeating-linear-gradient(-45deg, var(--lime-400) 0 8px, var(--sun-300) 8px 16px); }
.nav a.nav-ai[aria-current="page"] { box-shadow: 3px 3px 0 var(--plum-950); }
.nav a.nav-ai span { background: var(--slab); color: var(--ink); padding: 0 8px; border-radius: 6px; }
.head-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 2px solid var(--line); border-radius: 50%; background: var(--slab); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--sun-300); color: var(--on-bright); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn[aria-pressed="true"] { background: var(--lime-400); color: var(--on-bright); }
.search-mini { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; background: var(--slab); overflow: hidden; }
.search-mini input { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; padding: 0 12px; width: 150px; min-height: 40px; }
.search-mini input::placeholder { color: var(--ink-soft); }
.search-mini button { border: 0; border-left: 2px solid var(--line); background: var(--sun-300); color: var(--on-bright); font-weight: 700; font-family: var(--font-body); font-size: 1rem; min-height: 44px; padding: 0 14px; cursor: pointer; }
.menu-btn { display: none; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }

@media (max-width: 1100px) {
  .search-mini { display: none; }
}
@media (max-width: 880px) {
  .menu-btn { display: inline-grid; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; align-items: stretch; background: var(--ground); border-bottom: var(--border-w) solid var(--line); padding: 16px var(--gutter) 24px; }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; }
  .nav a { font-size: 1.25rem; min-height: 52px; }
  .nav .search-mini { display: flex; margin-top: 12px; }
  .nav .search-mini input { flex: 1; width: auto; }
  .brand__words small { display: none; }
}

/* zig-zag edge helper */
.edge-zig { position: relative; }
.edge-zig::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -18px; height: 18px; z-index: 2;
  background:
    linear-gradient(135deg, var(--edge, var(--plum-950)) 50%, transparent 50%) 0 0 / 24px 18px,
    linear-gradient(225deg, var(--edge, var(--plum-950)) 50%, transparent 50%) 0 0 / 24px 18px;
}

/* ---------- Bands & section heads ---------- */
.band { position: relative; padding: clamp(56px, 8vw, 110px) 0; }
.band + .band { border-top: var(--border-w) solid var(--line); }
.band--pat { border-top: var(--border-w) solid var(--line); border-bottom: var(--border-w) solid var(--line); }
.sec-head { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; align-items: end; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head__num {
  grid-row: span 2; font-family: var(--font-display); font-weight: 900; font-size: clamp(4.5rem, 11vw, 9rem); line-height: 0.8;
  color: transparent; -webkit-text-stroke: 3px var(--ink); font-variation-settings: "SOFT" 100, "WONK" 1;
  text-shadow: 6px 6px 0 var(--num-shadow, var(--pat-a));
}
.sec-head h2 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-weight: 900; margin: 0; }
.sec-head p { margin: 0; color: var(--ink-soft); font-size: 1.25rem; }
.sec-head__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px; }
.sec-head--onpat { display: block; }
.sec-head--onpat .slab { display: inline-block; padding: 18px 26px; }
.sec-head--onpat h2 { margin-bottom: 4px; }
@media (max-width: 600px) {
  .sec-head { grid-template-columns: 1fr; }
  .sec-head__num { grid-row: auto; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; border-bottom: var(--border-w) solid var(--line); overflow: hidden; }
.page-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(40px, 6vw, 88px); }
.page-hero__text.slab { padding: clamp(24px, 3.5vw, 44px); }
.page-hero h1 { font-size: clamp(3rem, 8vw, 7.4rem); font-weight: 900; line-height: 0.92; margin: 16px 0 16px; }
.page-hero .lede { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.45; color: var(--ink-soft); margin: 0; }
.frame {
  position: relative; border: var(--border-w) solid var(--plum-950); border-radius: var(--radius);
  box-shadow: 10px 10px 0 var(--plum-950), 10px 10px 0 3px var(--sun-300);
  overflow: hidden; background: var(--plum-950);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--arch { border-radius: 999px 999px var(--radius) var(--radius); }
.frame--tilt { transform: rotate(2deg); }
@media (max-width: 860px) {
  .page-hero__grid { grid-template-columns: 1fr; }
  .frame--tilt { transform: none; }
}

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: var(--border-w) solid var(--line); }
.hero__fabric { position: absolute; inset: 0; z-index: 0; }
.hero__fabric::after {
  /* optional generated collage layer; the patterns underneath carry the page if it never arrives */
  content: ""; position: absolute; inset: 0; background: url("assets/collage-hero.webp") center / cover no-repeat; mix-blend-mode: multiply; opacity: 0.55;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding-block: clamp(40px, 6vw, 96px) clamp(56px, 7vw, 110px); }
.hero__copy { padding: clamp(24px, 3.5vw, 48px); }
.hero h1 { font-size: clamp(3.1rem, 7.6vw, 7.6rem); line-height: 0.9; font-weight: 900; margin: 18px 0 22px; }
.hero h1 .hl { display: inline-block; padding: 0 0.12em; border-radius: 0.14em; }
.hero h1 .hl--pink { background: var(--pink-500); color: var(--on-bright); transform: rotate(-3deg); box-shadow: 5px 5px 0 var(--plum-950); }
.hero h1 .hl--lime { background: var(--lime-400); color: var(--on-bright); transform: rotate(2deg); }
.hero h1 .squig { text-decoration: underline wavy var(--cobalt-600); text-decoration-thickness: 0.07em; text-underline-offset: 0.12em; text-decoration-skip-ink: none; }
.hero h1 em { font-style: italic; font-weight: 400; }
.hero__sub { font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.5; color: var(--ink-soft); max-width: 34em; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 20px 0 0; }
.hero__stats li { font-family: var(--font-mono); font-size: 0.9375rem; border: 2px solid var(--line); border-radius: 999px; padding: 0.3em 0.9em; background: var(--slab-2); }
.hero__stats b { font-family: var(--font-display); font-size: 1.2rem; font-weight: 900; }
.hero__photo { position: relative; justify-self: center; width: min(100%, 470px); }
.hero__photo .frame { aspect-ratio: 4 / 5; }
.hero__photo .frame img { object-position: 22% 30%; }
.hero__ring { position: absolute; inset: -34px -30px auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; border: var(--border-w) solid var(--plum-950); z-index: -1; }
.hero__photo .sticker:nth-of-type(1) { top: -30px; left: -40px; transform: rotate(-12deg); }
.hero__photo .sticker:nth-of-type(2) { bottom: 70px; right: -36px; transform: rotate(10deg); }
.hero__photo .sticker:nth-of-type(3) { bottom: -34px; left: 18px; transform: rotate(-6deg); width: 150px; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { width: min(82%, 380px); margin: 30px auto 40px; }
  .hero__photo .sticker { width: 104px; }
  .hero__photo .sticker strong { font-size: 1.8rem; }
  .hero__photo .sticker:nth-of-type(1) { left: -22px; top: -24px; }
  .hero__photo .sticker:nth-of-type(2) { right: -22px; }
  .hero__photo .sticker:nth-of-type(3) { width: 118px; }
}

/* ---------- Cards (article "tickets") ---------- */
.grid { display: grid; gap: clamp(22px, 2.6vw, 34px); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--slab); color: var(--ink);
  border: var(--border-w) solid var(--line); border-radius: var(--radius);
  box-shadow: 7px 7px 0 var(--shadow, var(--pat-a));
  overflow: hidden;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.card:hover { transform: translate(-3px, -3px) rotate(-0.4deg); box-shadow: 10px 10px 0 var(--shadow, var(--pat-a)); }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 4px; }
.card__media { position: relative; aspect-ratio: 16 / 9; border-bottom: var(--border-w) solid var(--line); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--pat { display: grid; place-items: center; padding: 20px; }
.card__media--pat span { background: var(--slab); color: var(--ink); border: var(--border-w) solid var(--plum-950); border-radius: 12px; padding: 8px 14px; font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; line-height: 1.1; text-align: center; box-shadow: 4px 4px 0 var(--plum-950); max-width: 90%; }
.card__tab { position: absolute; top: 12px; left: 12px; z-index: 2; }
.card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 24px; flex: 1; }
.card__meta { font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.card h3 { font-size: 1.6rem; font-weight: 800; line-height: 1.12; margin: 0; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card h3 a:focus-visible { outline: none; }
.card p { margin: 0; color: var(--ink-soft); }
.card .chips { margin-top: auto; padding-top: 6px; position: relative; z-index: 2; }
.card--big h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.card--row { flex-direction: row; }
.card--row .card__media { aspect-ratio: auto; width: 42%; flex: none; border-bottom: 0; border-right: var(--border-w) solid var(--line); }
@media (max-width: 640px) {
  .card--row { flex-direction: column; }
  .card--row .card__media { width: 100%; aspect-ratio: 16/9; border-right: 0; border-bottom: var(--border-w) solid var(--line); }
}

/* list rows for archives */
.rows { container-type: inline-size; list-style: none; margin: 0; padding: 0; border: var(--border-w) solid var(--line); border-radius: var(--radius); background: var(--slab); overflow: hidden; box-shadow: 8px 8px 0 var(--shadow, var(--pat-d)); }
.rows li { position: relative; display: grid; grid-template-columns: 9.5rem 1fr auto; gap: 6px 24px; padding: 20px 24px; border-top: 2px dashed color-mix(in srgb, var(--line) 40%, transparent); align-items: baseline; }
.rows li:first-child { border-top: 0; }
.rows li:hover { background: var(--slab-2); }
.rows time { font-family: var(--font-mono); font-size: 0.9375rem; color: var(--ink-soft); }
.rows h3 { font-size: 1.45rem; margin: 0 0 4px; font-weight: 800; line-height: 1.15; }
.rows h3 a { color: var(--ink); text-decoration: none; }
.rows h3 a::after { content: ""; position: absolute; inset: 0; }
.rows h3 a:hover { text-decoration: underline wavy var(--pink-500); }
.rows p { margin: 0; color: var(--ink-soft); }
.rows .tagline { font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; }
@container (max-width: 700px) {
  .rows li { grid-template-columns: 1fr; gap: 4px; }
  .rows .tagline { display: none; }
}

/* year stamp */
.year { display: inline-block; font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; line-height: 1; padding: 6px 18px; background: var(--sun-300); color: var(--on-bright); border: var(--border-w) solid var(--plum-950); border-radius: 12px; transform: rotate(-2deg); margin: 34px 0 18px; box-shadow: 4px 4px 0 var(--plum-950); }

/* ---------- Feature tiles (experiments) ---------- */
.tile { position: relative; border: var(--border-w) solid var(--plum-950); border-radius: var(--radius); overflow: hidden; box-shadow: 7px 7px 0 var(--plum-950); display: flex; flex-direction: column; min-height: 320px; }
:root[data-theme="dark"] .tile { box-shadow: 7px 7px 0 var(--cream-100); }
.tile__pat { height: 110px; border-bottom: var(--border-w) solid var(--plum-950); position: relative; }
.tile__icon { position: absolute; left: 20px; bottom: -32px; width: 64px; height: 64px; border-radius: 50%; background: var(--slab); border: var(--border-w) solid var(--plum-950); display: grid; place-items: center; color: var(--ink); }
.tile__icon svg { width: 30px; height: 30px; }
.tile__body { background: var(--slab); padding: 44px 22px 22px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.tile h3 { font-size: 1.55rem; margin: 0; }
.tile h3 a { color: var(--ink); text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; }
.tile p { margin: 0; color: var(--ink-soft); }
.tile .chips { margin-top: auto; }
.type-badge { position: absolute; top: 12px; right: 12px; z-index: 2; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 18px; }
.stat { border: var(--border-w) solid var(--plum-950); border-radius: var(--radius); padding: 22px; color: var(--on-bright); box-shadow: 6px 6px 0 var(--plum-950); }
:root[data-theme="dark"] .stat { box-shadow: 6px 6px 0 var(--cream-100); }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(3rem, 6vw, 4.6rem); line-height: 0.9; font-weight: 900; letter-spacing: -0.03em; }
.stat span { font-family: var(--font-mono); font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stat--pink { background: var(--pink-500); } .stat--lime { background: var(--lime-400); } .stat--sun { background: var(--sun-300); } .stat--teal { background: var(--teal-400); } .stat--tang { background: var(--tangerine-400); }

/* ---------- Bottom trio / misc boxes ---------- */
.box { padding: clamp(22px, 3vw, 34px); }
.box h2, .box h3 { font-size: 2rem; }
.linklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.linklist a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 16px; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 700; background: var(--slab); }
.linklist a:hover { background: var(--lime-400); color: var(--on-bright); border-color: var(--plum-950); }
.linklist small { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 400; color: inherit; opacity: 0.85; }

/* ---------- Jump rail ---------- */
.jump { position: sticky; top: 79px; z-index: 30; background: var(--ground); border-bottom: var(--border-w) solid var(--line); }
.jump ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 10px 0; overflow-x: auto; scrollbar-width: thin; }
.jump li { flex: none; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; gap: 6px; padding: 0 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--slab); color: var(--ink); font-weight: 700; text-decoration: none; font-size: 1rem; }
.jump a:hover { background: var(--sun-300); color: var(--on-bright); }
.jump .count { font-family: var(--font-mono); font-size: 0.8125rem; background: var(--plum-950); color: var(--cream-100); border-radius: 999px; padding: 1px 7px; }
.jump__label { font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; align-self: center; color: var(--ink-soft); }

/* ---------- Featured project ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden; }
.feature__text { padding: clamp(24px, 3.5vw, 48px); display: flex; flex-direction: column; gap: 16px; }
.feature__text h3 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); font-weight: 900; margin: 0; }
.feature__media { border-left: var(--border-w) solid var(--line); min-height: 320px; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: var(--line); border: var(--border-w) solid var(--line); border-radius: 14px; overflow: hidden; }
.feature__stats div { background: var(--slab-2); padding: 14px; }
.feature__stats dt { font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.feature__stats dd { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 2.4rem; line-height: 1; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature__media { border-left: 0; border-top: var(--border-w) solid var(--line); min-height: 220px; }
}

/* project landscape rows */
.proj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.proj:nth-child(even) .proj__media { order: 2; border-left: var(--border-w) solid var(--line); border-right: 0; }
.proj__media { position: relative; border-right: var(--border-w) solid var(--line); min-height: 280px; display: grid; place-items: center; padding: 22px; }
.proj__media img { width: 100%; max-height: 340px; object-fit: contain; border: var(--border-w) solid var(--plum-950); border-radius: 12px; background: #0d0718; box-shadow: 6px 6px 0 var(--plum-950); }
.proj__text { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.proj__text h3 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 900; margin: 0; }
.proj__text p { margin: 0; color: var(--ink-soft); }
.mini-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.mini-stats span { font-family: var(--font-mono); font-size: 0.875rem; padding: 4px 10px; border-radius: 8px; background: var(--slab-2); border: 2px solid var(--line); }
.stack-lg { display: grid; gap: clamp(28px, 4vw, 44px); }
@media (max-width: 800px) {
  .proj { grid-template-columns: 1fr; }
  .proj:nth-child(even) .proj__media { order: 0; border-left: 0; }
  .proj__media, .proj:nth-child(even) .proj__media { border-right: 0; border-bottom: var(--border-w) solid var(--line); min-height: 200px; }
}
.term-label { position: absolute; bottom: 10px; right: 12px; }

/* ---------- Callout strip ---------- */
.strip { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; padding: 22px clamp(20px, 3vw, 36px); }
.strip p { margin: 0; font-size: 1.3rem; font-weight: 700; max-width: 40em; }

/* ---------- Story shelf ---------- */
.story { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.story__media { border-right: var(--border-w) solid var(--line); min-height: 280px; }
.story__media img { width: 100%; height: 100%; object-fit: cover; }
.story__text { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 12px; }
.story__part { font-family: var(--font-display); font-size: 5rem; line-height: 0.8; font-weight: 900; color: transparent; -webkit-text-stroke: 2px var(--ink); }
.story__text h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 0; }
.story__text h3 a { color: var(--ink); text-decoration: none; }
.story__text h3 a:hover { text-decoration: underline wavy var(--pink-500); }
.story--soon { opacity: 1; }
.story--soon .story__text { background: repeating-linear-gradient(-45deg, var(--slab) 0 18px, var(--slab-2) 18px 36px); }
@media (max-width: 760px) {
  .story { grid-template-columns: 1fr; }
  .story__media { border-right: 0; border-bottom: var(--border-w) solid var(--line); min-height: 200px; }
}
.notice { border: var(--border-w) solid var(--plum-950); border-radius: 14px; background: var(--sun-300); color: var(--on-bright); padding: 16px 20px; box-shadow: 5px 5px 0 var(--plum-950); }
.notice strong { font-family: var(--font-display); font-size: 1.2rem; }

/* ---------- About ---------- */
.career { display: flex; flex-wrap: wrap; border: var(--border-w) solid var(--line); border-radius: 14px; overflow: hidden; }
.career li { list-style: none; flex: 1 1 auto; padding: 12px 14px; border-right: 2px solid var(--plum-950); color: var(--on-bright); font-weight: 700; font-size: 1rem; line-height: 1.25; }
.career li small { display: block; font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 400; }
.career li:last-child { border-right: 0; }
.career { padding: 0; margin: 0 0 40px; }
.career li:nth-child(6n+1) { background: var(--pink-500); }
.career li:nth-child(6n+2) { background: var(--lime-400); }
.career li:nth-child(6n+3) { background: var(--sun-300); }
.career li:nth-child(6n+4) { background: var(--teal-400); }
.career li:nth-child(6n+5) { background: var(--tangerine-400); }
.career li:nth-child(6n+6) { background: var(--pink-300); }
.timeline { display: grid; gap: 26px; }
.phase { display: grid; grid-template-columns: 220px 1fr; gap: 20px 32px; padding: clamp(20px, 3vw, 32px); }
.phase__when { font-family: var(--font-mono); font-size: 0.9375rem; text-transform: uppercase; }
.phase__when b { display: block; font-family: var(--font-display); font-size: 2rem; text-transform: none; line-height: 1.05; margin-top: 6px; font-weight: 900; }
.phase ul { margin: 12px 0 0; padding-left: 1.2em; }
.phase li { margin-bottom: 6px; }
.phase li::marker { color: var(--pink-500); content: "✦  "; }
@media (max-width: 720px) { .phase { grid-template-columns: 1fr; } }
.proverbs { list-style: none; counter-reset: pv; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.proverbs li { counter-increment: pv; position: relative; padding: 24px 24px 24px 76px; border: 2px solid var(--cream-100); border-radius: 14px; font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1.3; }
.proverbs li::before { content: counter(pv); position: absolute; left: 18px; top: 18px; width: 42px; height: 42px; border-radius: 50%; background: var(--pink-500); color: var(--on-bright); display: grid; place-items: center; font-style: normal; font-weight: 900; border: 2px solid var(--cream-100); }
.cap-row { display: grid; grid-template-columns: 260px 1fr; gap: 12px 30px; padding: 22px 0; border-top: 2px dashed rgba(255, 241, 214, 0.35); }
.cap-row h3 { font-size: 1.6rem; margin: 0 0 6px; color: var(--lime-400); }
.cap-row p { margin: 0; color: var(--cream-100); }
.cap-row .chip { background: transparent; color: var(--cream-100); border-color: var(--cream-100); }
@media (max-width: 720px) { .cap-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-foot { position: relative; margin-top: 0; background: var(--plum-950); color: var(--cream-100); border-top: var(--border-w) solid var(--line); }
.site-foot::before { content: ""; display: block; height: 26px; --a: var(--pink-500); --b: var(--sun-300); background: repeating-linear-gradient(90deg, var(--pink-500) 0 40px, var(--sun-300) 40px 80px, var(--lime-400) 80px 120px, var(--teal-400) 120px 160px, var(--tangerine-400) 160px 200px); border-bottom: var(--border-w) solid var(--plum-950); }
.site-foot a { color: var(--cream-100); }
.site-foot a:hover { color: var(--lime-400); }
.foot-big { font-family: var(--font-display); font-weight: 900; font-size: clamp(3.4rem, 13vw, 12rem); line-height: 0.85; letter-spacing: -0.03em; padding: 48px 0 10px; color: transparent; -webkit-text-stroke: 2px var(--cream-100); font-variation-settings: "SOFT" 100, "WONK" 1; overflow-wrap: anywhere; }
.foot-big span { color: var(--pink-500); -webkit-text-stroke: 0; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.5fr; gap: 32px; padding: 30px 0 40px; }
.foot-grid h2 { font-family: var(--font-mono); font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lime-400); margin: 0 0 14px; font-weight: 500; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-grid ul a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; font-weight: 600; }
.foot-grid ul a:hover { text-decoration: underline wavy; }
.foot-grid p { color: #e7dcf5; }
.nl-form { display: flex; flex-wrap: wrap; gap: 10px; }
.nl-form input[type="email"] { flex: 1 1 200px; min-height: 48px; padding: 0 14px; border: var(--border-w) solid var(--cream-100); border-radius: 12px; background: var(--plum-900); color: var(--cream-100); font: inherit; font-size: 1.0625rem; }
.nl-form input::placeholder { color: #c9b8e0; }
.nl-form .btn { box-shadow: 4px 4px 0 var(--pink-500); }
.nl-msg { margin: 10px 0 0; font-weight: 700; min-height: 1.6em; }
.foot-bottom { border-top: 2px dashed rgba(255, 241, 214, 0.35); padding: 20px 0 30px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-family: var(--font-mono); font-size: 0.875rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 8px; z-index: 60; background: transparent; }
.progress__bar { height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--pink-500) 0 8px, var(--sun-300) 8px 16px); border-right: 3px solid var(--plum-950); }
.progress__pct { position: fixed; bottom: 14px; right: 14px; border: 2px solid var(--cream-100); z-index: 60; font-family: var(--font-mono); font-size: 0.8125rem; background: var(--plum-950); color: var(--cream-100); padding: 2px 8px; border-radius: 999px; }
.art-hero { border-bottom: var(--border-w) solid var(--line); }
.art-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(36px, 5vw, 80px); }
.art-hero__text { padding: clamp(22px, 3vw, 40px); }
.art-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.8rem); font-weight: 900; line-height: 0.95; margin: 16px 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.art-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--font-mono); font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-top: 18px; }
.art-meta a { color: var(--ink); }
.art-layout { display: grid; grid-template-columns: 250px minmax(0, 720px) 1fr; gap: 48px; padding-block: clamp(36px, 5vw, 64px); }
.toc { position: sticky; top: 100px; align-self: start; }
.toc .slab { padding: 18px 20px; box-shadow: 6px 6px 0 var(--lime-400); }
.toc h2 { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 1.8em 1fr; padding: 6px 0; color: var(--ink); text-decoration: none; font-size: 1rem; line-height: 1.35; font-weight: 600; border-radius: 6px; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-soft); padding-top: 2px; }
.toc a:hover { text-decoration: underline wavy var(--pink-500); }
.toc a.is-active { background: var(--pink-500); color: var(--on-bright); padding-left: 6px; }
.toc a.is-active::before { color: var(--on-bright); }
.toc-mobile { display: none; margin-bottom: 28px; }
.toc-mobile summary { cursor: pointer; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.9375rem; min-height: 48px; display: flex; align-items: center; padding: 0 18px; }
.toc-mobile ol { margin: 0; padding: 4px 18px 16px 2.6em; }
.toc-mobile a { display: block; padding: 6px 0; color: var(--ink); font-weight: 600; }
.art-aside { align-self: start; position: sticky; top: 100px; display: grid; gap: 16px; }
.art-aside .slab { padding: 18px; }
.art-aside h2 { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 10px; }
@media (max-width: 1240px) {
  .art-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .art-aside { display: none; }
}
@media (max-width: 960px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-mobile { display: block; }
  .art-hero__grid { grid-template-columns: 1fr; }
}

.prose { font-size: 1.1875rem; line-height: 1.7; min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 900; margin-top: 2.2em; margin-bottom: 0.4em; position: relative; padding-left: 0.1em; }
.prose h2::before { content: ""; display: block; width: 96px; height: 14px; margin-bottom: 16px; border: 2px solid var(--plum-950); border-radius: 999px; background: repeating-linear-gradient(-45deg, var(--pink-500) 0 7px, var(--sun-300) 7px 14px); }
.prose h2:nth-of-type(3n+2)::before { background: repeating-linear-gradient(-45deg, var(--lime-400) 0 7px, var(--teal-400) 7px 14px); }
.prose h2:nth-of-type(3n)::before { background: repeating-linear-gradient(-45deg, var(--cobalt-600) 0 7px, var(--pink-300) 7px 14px); }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li { margin: 0.35em 0; }
.prose ol li::marker { font-family: var(--font-mono); font-weight: 700; color: var(--link); }
.prose code:not(pre code) { font-family: var(--font-mono); font-size: 0.88em; background: var(--slab-2); border: 1.5px solid color-mix(in srgb, var(--line) 50%, transparent); border-radius: 6px; padding: 0.08em 0.35em; }
.prose em { font-style: italic; }
.callout { position: relative; border: var(--border-w) solid var(--plum-950); border-radius: 14px; padding: 18px 22px 18px 22px; margin-left: 0; margin-right: 0; color: var(--on-bright); font-size: 1.125rem; box-shadow: 6px 6px 0 var(--plum-950); }
:root[data-theme="dark"] .callout { box-shadow: 6px 6px 0 var(--cream-100); }
.callout p { margin: 0; }
.callout a { color: var(--plum-950); font-weight: 700; }
.callout code { background: rgba(255, 255, 255, 0.55) !important; }
.callout__tag { display: inline-block; font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; background: var(--plum-950); color: var(--cream-100); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
.callout--why { background: var(--lime-400); }
.callout--question { background: var(--pink-300); }
.callout--note { background: var(--sun-300); }
.callout--skill { background: var(--teal-400); }
.callout--question::after { content: "?"; position: absolute; right: 14px; top: -22px; font-family: var(--font-display); font-weight: 900; font-size: 3.6rem; line-height: 1; color: var(--pink-500); -webkit-text-stroke: 2px var(--plum-950); }
.codeblock { margin-left: 0; margin-right: 0; border: var(--border-w) solid var(--plum-950); border-radius: 14px; overflow: hidden; box-shadow: 8px 8px 0 var(--pat-c); background: var(--code-bg); }
.codeblock__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 14px; border-bottom: var(--border-w) solid var(--plum-950); --a: var(--pink-500); --b: var(--sun-300); }
.codeblock__lang { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 700; background: var(--plum-950); color: var(--cream-100); padding: 2px 10px; border-radius: 6px; }
.copy-btn { min-height: 40px; padding: 0 14px; border: 2px solid var(--plum-950); border-radius: 999px; background: var(--cream-50); color: var(--plum-950); font-family: var(--font-mono); font-size: 0.875rem; font-weight: 700; cursor: pointer; }
.copy-btn:hover { background: var(--lime-400); }
.codeblock pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.6; color: var(--code-ink); tab-size: 2; }
.tok-k { color: #ff8fb4; } .tok-s { color: #c6f432; } .tok-c { color: #b9a5d6; font-style: italic; } .tok-t { color: #ffd23f; } .tok-f { color: #6ee7da; }
.filed { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 3em; padding-top: 1.4em; border-top: 3px dashed color-mix(in srgb, var(--line) 50%, transparent); }
.filed span { font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; }
.share-row { display: flex; flex-wrap: wrap; gap: 12px; }
.newsletter { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; padding: clamp(22px, 3.5vw, 44px); }
.newsletter h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 900; margin: 0 0 8px; }
.newsletter .nl-form input[type="email"] { background: var(--slab); color: var(--ink); border-color: var(--line); }
.newsletter .nl-form input::placeholder { color: var(--ink-soft); }
@media (max-width: 800px) { .newsletter { grid-template-columns: 1fr; } }

/* ---------- Patterns ---------- */
.threeways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; background: var(--line); border: var(--border-w) solid var(--line); border-radius: var(--radius); overflow: hidden; }
.threeways > div { background: var(--slab); padding: 24px; }
.threeways h3 { font-size: 1.8rem; margin: 10px 0 6px; }
.threeways p { margin: 0; color: var(--ink-soft); }
.threeways__foot { grid-column: 1 / -1; background: var(--slab-2) !important; font-size: 1.125rem; }
@media (max-width: 800px) { .threeways { grid-template-columns: 1fr; } }
.p-controls { display: grid; gap: 18px; margin: 34px 0 30px; }
.p-search { display: flex; border: var(--border-w) solid var(--line); border-radius: 999px; overflow: hidden; background: var(--slab); box-shadow: 6px 6px 0 var(--pat-c); }
.p-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.125rem; padding: 0 22px; min-height: 60px; }
.p-search input::placeholder { color: var(--ink-soft); }
.p-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pill { min-height: 44px; padding: 0 18px; border: 2px solid var(--line); border-radius: 999px; background: var(--slab); color: var(--ink); font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; }
.pill:hover { background: var(--sun-300); color: var(--on-bright); }
.pill[aria-pressed="true"] { background: var(--plum-950); color: var(--cream-100); border-color: var(--plum-950); box-shadow: 3px 3px 0 var(--pink-500); }
:root[data-theme="dark"] .pill[aria-pressed="true"] { background: var(--lime-400); color: var(--on-bright); }
.p-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.p-count { font-family: var(--font-mono); font-size: 1rem; }
.p-sort { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.p-sort select { min-height: 44px; border: 2px solid var(--line); border-radius: 10px; background: var(--slab); color: var(--ink); font: inherit; font-size: 1rem; padding: 0 12px; }
.p-empty { display: none; text-align: center; padding: 40px 24px; }
.p-empty.is-shown { display: block; }
.p-empty h3 { font-size: 2rem; }
.pcard .card__media { aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 18px; }
.pcard .mini { width: 100%; max-width: 280px; background: var(--slab); border: var(--border-w) solid var(--plum-950); border-radius: 12px; padding: 12px; box-shadow: 5px 5px 0 var(--plum-950); color: var(--ink); }
.pcard .mini-name { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; line-height: 1.05; }
.mini-bars { display: flex; align-items: flex-end; gap: 5px; height: 48px; margin-top: 10px; }
.mini-bars i { flex: 1; background: var(--pink-500); border: 2px solid var(--plum-950); border-radius: 4px 4px 0 0; }
.mini-bars i:nth-child(2n) { background: var(--lime-400); } .mini-bars i:nth-child(3n) { background: var(--cobalt-600); }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
.mini-grid i { height: 18px; border: 2px solid var(--plum-950); border-radius: 4px; background: var(--sun-300); }
.mini-grid i:nth-child(2) { grid-column: span 2; background: var(--teal-400); } .mini-grid i:nth-child(4) { background: var(--pink-300); }
.mini-btns { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.mini-btns i { height: 22px; flex: 1; min-width: 40px; border-radius: 999px; border: 2px solid var(--plum-950); background: var(--lime-400); box-shadow: 2px 2px 0 var(--plum-950); }
.mini-btns i:first-child { background: var(--plum-950); }
.mini-form { display: grid; gap: 6px; margin-top: 10px; }
.mini-form i { height: 16px; border: 2px solid var(--plum-950); border-radius: 5px; background: var(--slab-2); }
.mini-form i:last-child { width: 50%; background: var(--pink-500); }
.mini-swatch { display: flex; margin-top: 10px; border: 2px solid var(--plum-950); border-radius: 6px; overflow: hidden; height: 30px; }
.mini-swatch i { flex: 1; }
.mini-swatch i:nth-child(1) { background: #364f6a; } .mini-swatch i:nth-child(2) { background: #6f92bd; } .mini-swatch i:nth-child(3) { background: #a65210; } .mini-swatch i:nth-child(4) { background: #1c6e52; } .mini-swatch i:nth-child(5) { background: #e39a4a; }
.badge { display: inline-block; font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 9px; border-radius: 6px; border: 2px solid var(--plum-950); color: var(--on-bright); }
.badge--new { background: var(--lime-400); } .badge--upd { background: var(--sun-300); }
.goodfor { font-size: 1rem; color: var(--ink-soft); }
.goodfor b { color: var(--ink); }

/* pattern detail */
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--ink); }
.usecases { columns: 2; column-gap: 32px; padding-left: 1.2em; margin: 0; }
.usecases li { margin-bottom: 8px; break-inside: avoid; }
.usecases li::marker { content: "✦  "; color: var(--pink-500); }
@media (max-width: 640px) { .usecases { columns: 1; } }
.panes { overflow: hidden; }
.panes__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 10px; border-bottom: var(--border-w) solid var(--line); background: var(--slab-2); }
.panes__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.panes__tabs button { min-height: 44px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--slab); color: var(--ink); font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; }
.panes__tabs button[aria-selected="true"] { background: var(--pink-500); color: var(--on-bright); border-color: var(--plum-950); box-shadow: 3px 3px 0 var(--plum-950); }
.panes__actions { display: flex; gap: 8px; }
.panes__actions button { min-height: 44px; padding: 0 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--slab); color: var(--ink); font-family: var(--font-mono); font-size: 0.875rem; font-weight: 700; cursor: pointer; }
.panes__actions button:hover { background: var(--lime-400); color: var(--on-bright); }
.pane { padding: clamp(16px, 3vw, 32px); }
.pane[hidden] { display: none; }
.pane pre { margin: 0; background: var(--code-bg); color: var(--code-ink); border: var(--border-w) solid var(--plum-950); border-radius: 12px; padding: 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.6; }
.pane-note { border-left: 6px solid var(--pink-500); padding: 10px 16px; background: var(--slab-2); margin: 0 0 16px; border-radius: 0 10px 10px 0; }
.prompt-text { max-width: 70ch; }
.prompt-text p { margin-bottom: 1em; }
/* the stage uses the pattern library's own tokens, scoped */
.stage {
  --p-ground: #eef0f3; --p-surface: #ffffff; --p-border: #d2d8e0; --p-ink: #161b22; --p-dim: #56606e; --p-accent: #364f6a; --p-ok: #1c6e52; --p-warn: #7e610f; --p-bad: #a03227;
  background: var(--p-ground); color: var(--p-ink); border: var(--border-w) solid var(--plum-950); border-radius: 14px; padding: clamp(16px, 3vw, 28px); font-family: var(--font-body);
}
:root[data-theme="dark"] .stage { --p-ground: #10141a; --p-surface: #191f27; --p-border: #2c3743; --p-ink: #e6ecf3; --p-dim: #97a4b4; --p-accent: #6f92bd; --p-ok: #4fbe93; --p-warn: #ddb44a; --p-bad: #ee8579; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stage { --p-ground: #10141a; --p-surface: #191f27; --p-border: #2c3743; --p-ink: #e6ecf3; --p-dim: #97a4b4; --p-accent: #6f92bd; --p-ok: #4fbe93; --p-warn: #ddb44a; --p-bad: #ee8579; } }
.stage__cap { color: var(--p-dim); font-size: 1rem; margin: 0 0 12px; }
.hss-strip { display: grid; gap: 1px; background: var(--p-border); border: 1px solid var(--p-border); border-radius: 10px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 26px; }
@media (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 42rem) { .hss-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 60rem) { .hss-strip--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hss-tile { background: var(--p-surface); padding: 14px 16px; min-width: 0; text-align: left; border: 0; font: inherit; color: var(--p-ink); }
.hss-label { display: block; font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--p-dim); overflow-wrap: anywhere; }
.hss-fig { display: block; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 4px; }
.hss-fig--missing { color: var(--p-dim); }
.hss-sub { display: block; color: var(--p-dim); font-size: 0.9375rem; overflow-wrap: anywhere; }
button.hss-tile { cursor: pointer; min-height: 44px; }
button.hss-tile:hover { background: color-mix(in srgb, var(--p-accent) 7%, var(--p-surface)); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--p-accent) 14%, var(--p-surface)); box-shadow: inset 0 -4px 0 var(--p-accent); }
button.hss-tile:focus-visible { outline: 3px solid var(--p-accent); outline-offset: -3px; }
.hss-list { list-style: none; margin: 0; padding: 0; background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 10px; }
.hss-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--p-border); }
.hss-list li:first-child { border-top: 0; }
.hss-list li[hidden] { display: none; }
.hss-status { font-family: var(--font-mono); font-size: 0.875rem; white-space: nowrap; }
.hss-status[data-s="Done"] { color: var(--p-ok); } .hss-status[data-s="Failed"] { color: var(--p-bad); } .hss-status[data-s="Downloading"] { color: var(--p-accent); } .hss-status[data-s="Queued"] { color: var(--p-warn); }
.hss-live { margin: 12px 0 0; color: var(--p-dim); font-size: 1rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}

/* small screens: tame sticker pile & shadows so nothing overflows */
@media (max-width: 480px) {
  :root { --shadow-step: 6px; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 3.6rem); }
  .sticker { width: 96px; }
  .card { box-shadow: 5px 5px 0 var(--shadow, var(--pat-a)); }
  .rows li { padding: 18px 16px; }
}
