/* Hand-Drawn Sketch UI — whiteboard (light) / chalkboard (dark)
   Borders are drawn by rough.js at runtime (script.js). Without JS every
   [data-sk] element falls back to a CSS "wobbly" border-radius outline. */

:root {
  /* primitives */
  --board-white: #fbf9f4;
  --board-panel: #f3efe4;
  --paper-white: #ffffff;
  --marker-black: #1d2330;
  --marker-graphite: #3e4553;
  --marker-grey: #5a6170;
  --marker-blue: #2f4b6b;
  --marker-red: #a8322b;
  --marker-green: #1f6b4b;
  --highlighter: #ffe066;
  --sticky-yellow: #fff1a1;
  --sticky-blue: #dcebfb;
  --sticky-pink: #fde0dc;
  --chalk-board: #1c2327;
  --chalk-panel: #252e33;
  --chalk-white: #f1ede4;

  /* semantic (light = whiteboard) */
  --bg: var(--board-white);
  --bg-grid: rgba(47, 75, 107, 0.07);
  --panel: var(--board-panel);
  --surface: var(--paper-white);
  --ink: var(--marker-black);
  --text: var(--marker-graphite);
  --muted: var(--marker-grey);
  --line: #2a3140;
  --line-soft: #9aa0ab;
  --accent: var(--marker-blue);
  --accent-ink: #ffffff;
  --accent-2: var(--marker-red);
  --accent-3: var(--marker-green);
  --hl: var(--highlighter);
  --hl-ink: var(--marker-black);
  --sticky: var(--sticky-yellow);
  --sticky-2: var(--sticky-blue);
  --sticky-3: var(--sticky-pink);
  --sticky-ink: #1d2330;
  --tape: rgba(222, 205, 150, 0.78);
  --code-bg: #1f2a2e;
  --code-ink: #ece8df;
  --code-dim: #a3b0b4;
  --code-kw: #f5c872;
  --code-str: #a9dcb1;
  --code-fn: #9cc6ec;
  --code-tag: #f3a79c;
  --chalk-bg: var(--chalk-board);
  --chalk-ink: var(--chalk-white);
  --chalk-muted: #b9c0c2;
  --focus: #d4561c;

  --font-display: "Caveat", "Segoe Print", cursive;
  --font-hand: "Patrick Hand", "Comic Neue", cursive;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobble-2: 15px 255px 15px 225px / 225px 15px 255px 15px;
  --wobble-3: 30px 225px 25px 255px / 255px 25px 225px 30px;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--chalk-board);
    --bg-grid: rgba(241, 237, 228, 0.045);
    --panel: var(--chalk-panel);
    --surface: #20292e;
    --ink: #f4f0e8;
    --text: #d6d2c8;
    --muted: #b1b8ba;
    --line: #e7e2d6;
    --line-soft: #6d777c;
    --accent: #9cc6ec;
    --accent-ink: #13202b;
    --accent-2: #f3a79c;
    --accent-3: #95d8ae;
    --hl: rgba(255, 214, 90, 0.3);
    --hl-ink: #fff8e2;
    --sticky: #e3d68c;
    --sticky-2: #bcd4ee;
    --sticky-3: #efc7c0;
    --tape: rgba(210, 196, 150, 0.55);
    --code-bg: #141a1d;
    --chalk-bg: #11171a;
    --focus: #ffab6b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--chalk-board);
  --bg-grid: rgba(241, 237, 228, 0.045);
  --panel: var(--chalk-panel);
  --surface: #20292e;
  --ink: #f4f0e8;
  --text: #d6d2c8;
  --muted: #b1b8ba;
  --line: #e7e2d6;
  --line-soft: #6d777c;
  --accent: #9cc6ec;
  --accent-ink: #13202b;
  --accent-2: #f3a79c;
  --accent-3: #95d8ae;
  --hl: rgba(255, 214, 90, 0.3);
  --hl-ink: #fff8e2;
  --sticky: #e3d68c;
  --sticky-2: #bcd4ee;
  --sticky-3: #efc7c0;
  --tape: rgba(210, 196, 150, 0.55);
  --code-bg: #141a1d;
  --chalk-bg: #11171a;
  --focus: #ffab6b;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-x: clip;
}
html { overflow-x: clip; }
img { max-width: 100%; display: block; height: auto; }
a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .4em; line-height: 1.15; }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: .005em; }
h3, h4 { font-family: var(--font-hand); font-weight: 400; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--panel); padding: .1em .35em; border-radius: 5px; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; font-family: var(--font-hand); font-size: 1.1rem; border-radius: var(--wobble); }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* ---------- sketch primitive ---------- */
[data-sk] { position: relative; isolation: isolate; }
.sk-outline { border: 2px solid var(--line); border-radius: var(--wobble); }
.sk-outline.is-sk { border-color: transparent; }
.rough-svg { position: absolute; z-index: -1; pointer-events: none; overflow: visible; }
.rough-svg path { vector-effect: non-scaling-stroke; }
.rough-svg.draw-in path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sk-draw .7s ease-out forwards; }
@keyframes sk-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .rough-svg.draw-in path { animation: none; stroke-dashoffset: 0; stroke-dasharray: none; }
  * { scroll-behavior: auto !important; transition: none !important; }
}

.hl { background: linear-gradient(100deg, transparent 2%, var(--hl) 4%, var(--hl) 94%, transparent 97%); color: var(--hl-ink); padding: 0 .12em; border-radius: 6px 10px 5px 12px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.scribble { position: relative; white-space: nowrap; }
.scribble svg { position: absolute; left: -2%; width: 104%; bottom: -.18em; height: .35em; stroke: var(--accent-2); fill: none; stroke-width: 3; stroke-linecap: round; overflow: visible; }

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px dashed var(--line-soft); }
.nav { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 48px; height: 48px; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1; }
.brand-word small { display: block; font-family: var(--font-hand); font-size: .95rem; font-weight: 400; color: var(--muted); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { display: inline-block; padding: 8px 12px; font-family: var(--font-hand); font-size: 1.25rem; color: var(--ink); text-decoration: none; min-height: 44px; }
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links .nav-ai { padding: 8px 14px; }
.nav-links .nav-ai span { background: var(--hl); color: var(--hl-ink); padding: 0 .3em; border-radius: 4px 12px 6px 10px; }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 6px; padding: 2px 4px 2px 12px; }
.search input { border: 0; background: transparent; color: var(--ink); font-family: var(--font-hand); font-size: 1.1rem; width: 8.5rem; min-height: 40px; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; }
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 14px; }
.search button, .icon-btn { background: transparent; border: 0; color: var(--ink); cursor: pointer; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; font: inherit; }
.theme-toggle .icon { width: 26px; height: 26px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; font-family: var(--font-hand); font-size: 1.2rem; color: var(--ink); padding: 8px 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: var(--gutter); left: var(--gutter); top: 72px; background: var(--surface); padding: 18px 20px; box-shadow: 6px 8px 0 rgba(0,0,0,.08); }
.menu-panel ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; }
.menu-panel a { display: block; padding: 8px 4px; font-family: var(--font-hand); font-size: 1.4rem; color: var(--ink); text-decoration: none; }
.menu-panel a[aria-current="page"] { color: var(--accent); text-decoration: underline wavy var(--accent-2) 2px; }
.menu-panel .search input { width: 100%; }

@media (max-width: 980px) {
  .nav-links, .nav-tools .search { display: none; }
  .nav-tools { margin-left: auto; }
  .menu { display: block; }
}

/* ---------- layout blocks ---------- */
main { display: block; }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tight { padding: 40px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-family: var(--font-hand); font-size: 1.3rem; }
.title-underline { display: block; width: min(260px, 70%); height: 14px; margin-top: 2px; stroke: var(--accent); fill: none; stroke-width: 3; stroke-linecap: round; }
.eyebrow { font-family: var(--font-hand); font-size: 1.2rem; color: var(--accent-2); letter-spacing: .04em; margin: 0 0 6px; display: inline-flex; align-items: center; gap: 8px; }
.lede { font-size: 1.3rem; line-height: 1.55; color: var(--text); max-width: 60ch; }
.more-link { font-family: var(--font-hand); font-size: 1.3rem; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.more-link:hover { text-decoration: underline wavy var(--accent-2) 2px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 28px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; font-family: var(--font-hand); font-size: 1.3rem; line-height: 1.1; text-decoration: none; color: var(--ink); background: transparent; border: 0; cursor: pointer; transition: transform .15s ease; }
.btn:hover { transform: translate(-1px, -2px) rotate(-.6deg); color: var(--ink); }
.btn:active { transform: translate(1px, 1px); }
.btn-primary { color: var(--accent-ink); background: var(--accent); border-radius: var(--wobble); }
.btn-primary:hover { color: var(--accent-ink); }
.btn-primary.is-sk { background: transparent; }
.btn-ghost { border: 2px solid var(--line); border-radius: var(--wobble-2); }
.btn-ghost.is-sk { border-color: transparent; }
.btn-link { padding: 10px 6px; color: var(--ink); }
.btn-link .scribble svg { stroke: var(--accent); }
.btn-quiet { padding: 10px 6px; color: var(--muted); }
.btn-quiet:hover { color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.btn.is-done { color: var(--accent-3); }

/* ---------- cards ---------- */
.card { background: var(--surface); padding: 22px; display: flex; flex-direction: column; gap: 10px; border-radius: 4px; transition: transform .18s ease; }
.card:hover { transform: rotate(-.4deg) translateY(-3px); }
.card:nth-child(3n+2):hover { transform: rotate(.5deg) translateY(-3px); }
.card h3 { font-size: 1.55rem; line-height: 1.2; margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card h3 a:hover { color: var(--accent); }
.card h3 a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 6px; }
.card p { margin: 0; font-size: 1.0625rem; }
.card .card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card .card-foot a, .card .card-foot button { position: relative; z-index: 2; }
.meta { font-family: var(--font-hand); font-size: 1.1rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.meta .dot::before { content: "~"; margin-right: 10px; color: var(--line-soft); }
.read { font-family: var(--font-hand); font-size: 1.15rem; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }

.frame { background: var(--panel); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 3px; position: relative; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame.term { background: #0f1417; }
.frame.term img { object-fit: contain; }
.frame .frame-tag { position: absolute; left: 10px; top: 8px; font-family: var(--font-mono); font-size: .8rem; color: #cfd6d8; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 4px; }
.doodle-fill { display: grid; place-items: center; width: 100%; height: 100%; color: var(--line-soft); background:
  repeating-linear-gradient(-35deg, transparent 0 9px, color-mix(in srgb, var(--line-soft) 30%, transparent) 9px 10.5px); }
.doodle-fill svg { width: 46%; max-width: 180px; height: auto; stroke: var(--accent); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; background: var(--surface); padding: 10px; border-radius: var(--wobble); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tag { display: inline-block; font-family: var(--font-hand); font-size: 1.05rem; line-height: 1.2; padding: 4px 11px; color: var(--ink); text-decoration: none; border: 1.5px solid var(--line-soft); border-radius: var(--wobble-3); background: var(--surface); min-height: 32px; position: relative; z-index: 2; }
a.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag.small { font-size: 1rem; padding: 2px 9px; }
.badge { font-family: var(--font-hand); font-size: 1.05rem; padding: 1px 10px; color: var(--sticky-ink); background: var(--sticky); transform: rotate(-3deg); display: inline-block; box-shadow: 1px 2px 0 rgba(0,0,0,.12); }
.badge.new { background: var(--sticky-3); }
.badge.blue { background: var(--sticky-2); }

/* sticky notes & tape */
.sticky { background: var(--sticky); color: var(--sticky-ink); padding: 22px 22px 20px; box-shadow: 2px 6px 14px rgba(0,0,0,.12), 0 1px 0 rgba(0,0,0,.08); transform: rotate(-1.2deg); position: relative; }
.sticky:nth-child(even) { transform: rotate(1deg); }
.sticky.blue { background: var(--sticky-2); }
.sticky.pink { background: var(--sticky-3); }
.sticky h2, .sticky h3, .sticky h4, .sticky a:not(.btn) { color: var(--sticky-ink); }
.sticky .muted { color: #464c57; }
.tape::before { content: ""; position: absolute; top: -13px; left: 50%; width: 96px; height: 26px; margin-left: -48px; background: var(--tape); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.08); z-index: 3; }
.pin::before { content: ""; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f59a8c, var(--marker-red) 60%); box-shadow: 1px 2px 2px rgba(0,0,0,.3); z-index: 3; }

.photo { position: relative; background: var(--paper-white); padding: 12px 12px 14px; box-shadow: 3px 8px 20px rgba(0,0,0,.16); transform: rotate(-2deg); }
.photo img { width: 100%; }
.photo::before, .photo::after { content: ""; position: absolute; width: 110px; height: 28px; background: var(--tape); z-index: 2; }
.photo::before { top: -12px; left: -22px; transform: rotate(-32deg); }
.photo::after { top: -10px; right: -24px; transform: rotate(28deg); }
.photo figcaption { font-family: var(--font-hand); color: #3e4553; font-size: 1.1rem; padding-top: 8px; text-align: center; }

/* chalkboard panel (dark in both themes) */
.chalk { background: var(--chalk-bg); color: var(--chalk-muted); padding: clamp(24px, 4vw, 44px); border-radius: 6px; box-shadow: inset 0 0 0 10px #6e5238, inset 0 0 0 12px #533c28, 4px 8px 24px rgba(0,0,0,.2); }
.chalk h2, .chalk h3, .chalk strong { color: var(--chalk-ink); }
.chalk a:not(.btn) { color: #a9d1f5; }
.chalk .btn-primary { --sk-fill: #f1ede4; background: #f1ede4; color: #1c2327; }
.chalk .btn-primary.is-sk { background: transparent; }

/* ---------- home hero ---------- */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(3.1rem, 7.2vw, 5.8rem); line-height: .98; margin-bottom: .35em; }
.hero .lede { margin-bottom: 26px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 14px 30px; list-style: none; padding: 0; margin: 0 0 30px; }
.stat-row li { padding: 8px 18px; text-align: center; }
.stat-row b { display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--accent); }
.stat-row span { font-family: var(--font-hand); font-size: 1.1rem; color: var(--text); }
.hero-photo { position: relative; max-width: 460px; justify-self: center; width: 100%; }
.hero-photo .photo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 30%; }
.annot { position: absolute; font-family: var(--font-display); font-size: 1.7rem; color: var(--accent-2); line-height: 1; }
.annot svg { stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.annot-me { left: -120px; bottom: 90px; transform: rotate(-8deg); width: 150px; }
.annot-me svg { width: 90px; height: 60px; margin-left: 60px; }
@media (max-width: 1180px) { .annot-me { left: -30px; bottom: -64px; } .annot-me svg { display: none; } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 250px; order: -1; margin: 10px auto 44px; }
  .hero-photo .photo img { aspect-ratio: 1 / 1; }
  .annot-me { left: auto; right: -8px; bottom: -52px; }
}

/* ---------- shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
@media (max-width: 900px) { .shelf { grid-template-columns: 1fr; } }
.shelf .sticky { display: flex; flex-direction: column; gap: 10px; }
.shelf .num { font-family: var(--font-display); font-size: 3rem; line-height: .8; color: var(--marker-red); }
.shelf h3 { font-size: 1.6rem; margin: 0; }
.shelf h3 a { text-decoration: none; }
.shelf h3 a:hover { text-decoration: underline wavy 2px; }
.shelf p { font-size: 1.0625rem; margin: 0; }
.shelf .frame { aspect-ratio: 2 / 1; }

/* ---------- list rows (whiteboard to-do style) ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px 28px; align-items: baseline; padding: 20px 4px; border-bottom: 2px dashed var(--line-soft); position: relative; }
.row:first-child { border-top: 2px dashed var(--line-soft); }
.row time { font-family: var(--font-hand); font-size: 1.15rem; color: var(--accent-2); }
.row h3 { margin: 0 0 4px; font-size: 1.55rem; }
.row h3 a { color: var(--ink); text-decoration: none; }
.row h3 a::after { content: ""; position: absolute; inset: 0; }
.row h3 a:hover { color: var(--accent); text-decoration: underline wavy var(--accent-2) 2px; }
.row p { margin: 0; font-size: 1.0625rem; }
.row .read { white-space: nowrap; }
.row:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.row h3 a:focus-visible { outline: none; }
@media (max-width: 700px) { .row { grid-template-columns: 1fr; gap: 2px; } .row .read { display: none; } }

/* ---------- experiments ---------- */
.exp { text-align: left; }
.exp .exp-icon { width: 64px; height: 64px; stroke: var(--accent); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 12px; font-family: var(--font-mono); font-size: .875rem; color: var(--muted); list-style: none; padding: 0; margin: 0; }
.chips li::before { content: "#"; color: var(--accent-2); margin-right: 2px; }
.type-circle { font-family: var(--font-hand); font-size: 1.1rem; color: var(--accent-2); padding: 2px 12px; align-self: flex-start; }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; align-items: start; }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; } }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.link-list a { display: flex; align-items: center; gap: 12px; padding: 8px 0; min-height: 44px; font-family: var(--font-hand); font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.link-list a:hover { color: var(--accent); }
.link-list small { font-family: var(--font-body); font-size: .95rem; color: var(--muted); margin-left: auto; }
.chalk .link-list a { color: var(--chalk-ink); }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; padding: 56px 0 28px; border-top: 2px dashed var(--line-soft); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 36px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 1.9rem; margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-block; padding: 4px 0; min-height: 36px; font-family: var(--font-hand); font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.site-footer li a:hover { color: var(--accent); text-decoration: underline wavy 2px; }
.foot-bottom { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-family: var(--font-hand); font-size: 1.1rem; color: var(--muted); }
.sub-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.field { flex: 1 1 200px; min-height: 48px; padding: 8px 14px; font-family: var(--font-hand); font-size: 1.2rem; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--wobble-2); }
.field.sk-outline.is-sk { border-color: transparent; }
.field::placeholder { color: var(--muted); }
.form-msg { font-family: var(--font-hand); font-size: 1.15rem; margin: 8px 0 0; min-height: 1.4em; color: var(--accent-3); }
.form-msg.err { color: var(--accent-2); }

/* ---------- page heads ---------- */
.page-head { padding: clamp(36px, 6vw, 72px) 0 24px; }
.page-head-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .page-head-grid { grid-template-columns: 1fr; } }
.page-head h1 { font-size: clamp(3.4rem, 8vw, 6rem); line-height: .95; margin-bottom: .2em; }
.page-head .photo { transform: rotate(2deg); }
.jump { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; list-style: none; padding: 12px 0; margin: 0; }
.jump-bar { position: sticky; top: 76px; z-index: 20; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px dashed var(--line-soft); }
.jump .label { font-family: var(--font-hand); color: var(--muted); font-size: 1.15rem; margin-right: 4px; }
.jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; font-family: var(--font-hand); font-size: 1.15rem; color: var(--ink); text-decoration: none; border: 1.5px solid var(--line-soft); border-radius: var(--wobble-3); background: var(--surface); }
.jump a:hover { border-color: var(--accent); color: var(--accent); }
.jump a span { color: var(--accent-2); margin-left: 6px; }
@media (max-width: 700px) { .jump-bar { position: static; } .jump { flex-wrap: nowrap; overflow-x: auto; } .jump a { white-space: nowrap; } }

/* ---------- mind map (writing) ---------- */
.mindmap { width: 100%; height: auto; }
.mindmap .mm-line { stroke: var(--line); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.mindmap .mm-node { fill: var(--surface); stroke: var(--line); stroke-width: 2.2; }
.mindmap .mm-core { fill: var(--hl); stroke: var(--line); stroke-width: 2.4; }
.mindmap text { font-family: var(--font-hand); font-size: 24px; fill: var(--ink); }
.mindmap .mm-big { font-family: var(--font-display); font-weight: 700; font-size: 40px; }
.mindmap .mm-sub { font-size: 19px; fill: var(--muted); }
.mindmap a:hover .mm-node, .mindmap a:focus .mm-node { fill: var(--sticky-2); }
.mindmap a:focus { outline: none; }
.mindmap a:focus-visible .mm-node { stroke: var(--focus); stroke-width: 4; }
.map-mobile { display: none; }
@media (max-width: 700px) { .mindmap { display: none; } .map-mobile { display: flex; flex-wrap: wrap; overflow: visible; } }
.page-head-grid > * { min-width: 0; }

/* ---------- about ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stat-tile { text-align: center; padding: 26px 12px; background: var(--surface); }
.stat-tile b { display: block; font-family: var(--font-display); font-size: clamp(3rem, 7vw, 4.4rem); line-height: 1; color: var(--accent); }
.stat-tile span { font-family: var(--font-hand); font-size: 1.3rem; }
@media (max-width: 600px) { .stat-tiles { grid-template-columns: 1fr; } }
.history { margin-top: 24px; }
.history > summary { list-style: none; cursor: pointer; display: inline-flex; }
.history > summary::-webkit-details-marker { display: none; }
.history[open] > summary .when-closed, .history:not([open]) > summary .when-open { display: none; }
.career-bar { display: flex; margin: 32px 0 10px; gap: 4px; flex-wrap: wrap; }
.career-bar div { flex: var(--w) 1 0; min-width: 104px; padding: 10px 12px; font-family: var(--font-hand); font-size: 1.05rem; line-height: 1.25; color: var(--sticky-ink); background: var(--c, var(--sticky)); border-radius: var(--wobble-3); }
.career-bar div b { display: block; font-weight: 400; font-size: 1.2rem; }
.timeline { list-style: none; margin: 30px 0 0; padding: 0 0 0 38px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 3px; background: repeating-linear-gradient(var(--line) 0 14px, transparent 14px 20px); border-radius: 3px; }
.timeline > li { position: relative; padding-bottom: 36px; }
.timeline > li::before { content: ""; position: absolute; left: -36px; top: 10px; width: 20px; height: 20px; border: 3px solid var(--accent); background: var(--bg); border-radius: 58% 42% 55% 45%; }
.timeline h3 { font-size: 1.8rem; margin: 0; }
.timeline .period { font-family: var(--font-hand); color: var(--accent-2); font-size: 1.2rem; }
.roles { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.roles li { padding-left: 26px; position: relative; }
.roles li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--font-hand); }
.roles ul { margin: 6px 0 0; padding-left: 20px; font-size: 1.0625rem; }
.principles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 26px; list-style: none; padding: 0; margin: 26px 0; }
.principles li { font-family: var(--font-hand); font-size: 1.35rem; line-height: 1.3; }
.checklist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 1.0625rem; }
.checklist .icon { color: var(--accent-3); margin-top: 3px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- storyboard (AI stories) ---------- */
.storyboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 30px; counter-reset: panel; }
.panel-frame { background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.panel-frame .part { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--accent-2); }
.panel-frame.soon { background: transparent; border: 2.5px dashed var(--line-soft); border-radius: var(--wobble); }
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; }
.notice .icon { width: 30px; height: 30px; color: var(--accent-2); margin-top: 2px; }

/* ---------- article ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 6px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent-2); border-radius: 0 6px 6px 0; clip-path: polygon(0 20%, 100% 0, 99% 100%, 0 80%); }
.progress-pct { position: fixed; right: 12px; top: 10px; z-index: 60; font-family: var(--font-hand); font-size: 1rem; color: var(--sticky-ink); background: var(--sticky); padding: 0 8px; transform: rotate(3deg); }
.art-head { padding: clamp(32px, 5vw, 60px) 0 12px; }
.crumb { font-family: var(--font-hand); font-size: 1.25rem; }
.art-head h1 { font-size: clamp(3rem, 7vw, 5.4rem); line-height: 1; max-width: 16ch; margin: 10px 0 14px; }
.art-hero { margin: 28px auto 8px; max-width: 980px; }
.art-hero .photo { transform: rotate(-1deg); }
.art-hero img { aspect-ratio: 21 / 9; object-fit: cover; }
.art-layout { display: grid; grid-template-columns: 250px minmax(0, 720px); gap: 56px; justify-content: center; padding-top: 30px; }
@media (max-width: 1100px) { .art-layout { grid-template-columns: minmax(0, 720px); } }
.toc-side { position: sticky; top: 100px; align-self: start; }
.toc-side .sticky { transform: rotate(-2deg); padding-top: 26px; }
.toc h2 { font-size: 1.8rem; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 22px; font-family: var(--font-hand); font-size: 1.15rem; line-height: 1.35; }
.toc li { padding: 4px 0; }
.toc a { color: var(--sticky-ink); text-decoration: none; }
.toc a:hover, .toc a.active { text-decoration: underline wavy var(--marker-red) 2px; }
.toc a.active { font-weight: 700; }
.toc-mobile { display: none; margin-bottom: 28px; }
.toc-mobile summary { cursor: pointer; font-family: var(--font-display); font-size: 1.8rem; color: var(--sticky-ink); min-height: 44px; }
@media (max-width: 1100px) { .toc-side { display: none; } .toc-mobile { display: block; } }
.prose { font-size: 1.1875rem; line-height: 1.75; color: var(--text); min-width: 0; }
.prose h2 { font-size: clamp(2.4rem, 5vw, 3rem); margin: 1.7em 0 .5em; position: relative; display: inline-block; }
.prose h2::after { content: ""; position: absolute; left: -4px; right: -10px; bottom: 2px; height: 12px; background: var(--hl); z-index: -1; border-radius: 3px 8px 4px 10px; transform: rotate(-.8deg); }
.prose h2 { isolation: isolate; }
.prose p, .prose ol, .prose ul { margin: 0 0 1.15em; }
.prose ol li::marker { font-family: var(--font-hand); color: var(--accent-2); font-size: 1.15em; }
.prose em { color: var(--ink); }
.prose a { color: var(--accent); }
.callout { margin: 1.8em 0; padding: 22px 24px 18px; font-size: 1.0625rem; line-height: 1.65; }
.callout p:last-child { margin: 0; }
.callout .callout-label { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.callout.why { background: var(--sticky); color: var(--sticky-ink); transform: rotate(-.7deg); box-shadow: 2px 6px 12px rgba(0,0,0,.1); }
.callout.why code { background: rgba(0,0,0,.08); color: inherit; }
.callout.ask { background: var(--sticky-2); color: var(--sticky-ink); border-radius: 26px 22px 28px 6px; margin-left: 24px; transform: rotate(.5deg); }
.callout.ask::before { content: "?"; position: absolute; left: -42px; top: 6px; font-family: var(--font-display); font-weight: 700; font-size: 3rem; color: var(--accent-2); line-height: 1; }
.callout.note { background: var(--surface); }
.callout.note .callout-label { color: var(--accent); }
.callout .callout-label { color: inherit; }
.callout.ask .callout-label, .callout.why .callout-label { color: var(--marker-red); }
.callout a { color: var(--accent); }
.callout.why a, .callout.ask a { color: #1f3b5a; }
@media (max-width: 600px) { .callout.ask { margin-left: 0; } .callout.ask::before { left: auto; right: 12px; top: -26px; } }
.code { margin: 1.8em -12px; background: var(--code-bg); border-radius: 6px; overflow: hidden; box-shadow: 4px 6px 0 color-mix(in srgb, var(--line) 18%, transparent); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 16px; border-bottom: 1px dashed #4a575c; }
.code-head span { font-family: var(--font-hand); color: var(--code-kw); font-size: 1.1rem; }
.code-head button { background: transparent; border: 1.5px solid #6d7a7f; color: var(--code-ink); font-family: var(--font-hand); font-size: 1.05rem; padding: 4px 14px; min-height: 36px; border-radius: var(--wobble-3); cursor: pointer; }
.code-head button:hover { border-color: var(--code-kw); color: var(--code-kw); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: .9rem; line-height: 1.6; color: var(--code-ink); tab-size: 2; }
.code pre:focus-visible { outline-offset: -3px; }
.tk-c { color: var(--code-dim); font-style: italic; }
.tk-k { color: var(--code-kw); }
.tk-s { color: var(--code-str); }
.tk-t { color: var(--code-tag); }
.tk-f { color: var(--code-fn); }
@media (max-width: 600px) { .code { margin-left: 0; margin-right: 0; } }
.art-end { max-width: 720px; margin: 40px auto 0; display: grid; gap: 36px; }
.share { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.signup { background: var(--surface); padding: 28px 28px 22px; background-image: repeating-linear-gradient(transparent 0 38px, color-mix(in srgb, var(--accent) 22%, transparent) 38px 39.5px); }
.signup h2 { font-size: 2.4rem; }

/* ---------- patterns ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin: 24px 0; }
@media (max-width: 860px) { .three-ways { grid-template-columns: 1fr; } }
.three-ways > div { background: var(--surface); padding: 20px; }
.three-ways h3 { font-size: 1.6rem; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.three-ways h3 .icon { color: var(--accent); width: 30px; height: 30px; }
.three-ways p { margin: 0; font-size: 1.0625rem; }
.filters { display: grid; gap: 16px; margin: 32px 0 26px; }
.search-lg { display: flex; align-items: center; gap: 12px; padding: 6px 18px; background: var(--surface); min-height: 60px; }
.search-lg .icon { color: var(--muted); width: 26px; height: 26px; }
.search-lg input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--font-hand); font-size: 1.3rem; color: var(--ink); min-height: 48px; }
.search-lg input::placeholder { color: var(--muted); }
.search-lg input:focus { outline: none; }
.search-lg:focus-within { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { font-family: var(--font-hand); font-size: 1.2rem; min-height: 44px; padding: 6px 18px; color: var(--ink); background: var(--surface); border: 2px solid var(--line-soft); border-radius: var(--wobble-3); cursor: pointer; }
.pill:hover { border-color: var(--accent); }
.pill[aria-pressed="true"] { background: var(--hl); color: var(--hl-ink); border-color: var(--line); border-width: 2.5px; }
.pill[aria-pressed="true"]::before { content: "✓ "; }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-family: var(--font-hand); font-size: 1.25rem; }
.result-bar .count { color: var(--ink); }
.result-bar label { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.result-bar select { font-family: var(--font-hand); font-size: 1.15rem; min-height: 44px; padding: 4px 10px; color: var(--ink); background: var(--surface); border: 2px solid var(--line-soft); border-radius: 10px 4px 12px 6px; }
.linkish { background: none; border: 0; padding: 4px 6px; min-height: 44px; font: inherit; color: var(--accent); text-decoration: underline wavy 1.5px; cursor: pointer; }
.pat-card .thumb { aspect-ratio: 16 / 10; background: var(--panel); display: grid; place-items: center; border-radius: 3px; overflow: hidden; }
.pat-card .thumb svg { width: 70%; height: auto; stroke: var(--ink); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pat-card .thumb .ac { stroke: var(--accent); }
.pat-card .thumb .fl { fill: var(--hl); }
.pat-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pat-card .cat { font-family: var(--font-hand); color: var(--accent-2); font-size: 1.1rem; }
.pat-card h2 { font-family: var(--font-hand); font-weight: 400; font-size: 1.55rem; line-height: 1.2; margin: 0; }
.pat-card h2 a { color: var(--ink); text-decoration: none; }
.pat-card h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pat-card h2 a:hover { color: var(--accent); }
.pat-card h2 a:focus-visible { outline: none; }
.empty { text-align: center; padding: 40px 20px; }
.empty svg { width: 150px; height: auto; margin: 0 auto 10px; stroke: var(--muted); fill: none; stroke-width: 2.2; stroke-linecap: round; }
.empty h2 { font-size: 2.4rem; }
[hidden] { display: none !important; }

/* pattern detail */
.back { font-family: var(--font-hand); font-size: 1.25rem; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.usecases { columns: 2 260px; column-gap: 40px; padding-left: 22px; margin: 8px 0 18px; }
.usecases li { margin-bottom: 6px; break-inside: avoid; }
.usecases li::marker { content: "✎  "; color: var(--accent-2); }
.panes { background: var(--surface); margin-top: 28px; }
.pane-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 2px dashed var(--line-soft); }
.tablist { display: flex; flex-wrap: wrap; gap: 4px; }
.tab { font-family: var(--font-hand); font-size: 1.25rem; min-height: 44px; padding: 4px 16px; background: transparent; border: 0; color: var(--muted); cursor: pointer; border-radius: 10px 4px 12px 6px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--hl); }
.pane-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pane-actions .btn { font-size: 1.1rem; min-height: 44px; padding: 6px 16px; }
.pane { padding: 22px; }
.pane pre { margin: 0; background: var(--code-bg); color: var(--code-ink); padding: 18px; overflow-x: auto; border-radius: 6px; font-family: var(--font-mono); font-size: .9rem; line-height: 1.6; max-height: 560px; }
.pane .note { font-size: 1.0625rem; margin: 0 0 14px; }
.prompt-text { max-width: 70ch; font-size: 1.0625rem; }
.prompt-text p { margin-bottom: 1em; }

/* Hairline stat strip — pattern preview, uses the library's own tokens */
.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; --p-radius: 10px;
  background: var(--p-ground); color: var(--p-ink); padding: 22px; border-radius: 8px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
: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 10px; }
.hss-strip { display: grid; gap: 1px; background: var(--p-border); border: 1px solid var(--p-border); border-radius: var(--p-radius); overflow: hidden; grid-template-columns: 1fr; margin-bottom: 26px; }
@media (min-width: 30rem) { .hss-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 56rem) { .hss-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hss-strip.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 30rem) and (max-width: 55.99rem) { .hss-strip.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hss-tile { background: var(--p-surface); padding: 14px 16px; display: grid; gap: 2px; min-width: 0; text-align: left; border: 0; font: inherit; color: inherit; }
.hss-label { font-family: var(--font-mono); text-transform: uppercase; font-size: .8125rem; letter-spacing: .04em; color: var(--p-dim); overflow-wrap: anywhere; }
.hss-fig { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hss-fig.none { color: var(--p-dim); font-weight: 400; }
.hss-sub { font-size: .875rem; color: var(--p-dim); }
button.hss-tile { cursor: pointer; }
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 -3px 0 var(--p-accent); }
button.hss-tile:focus-visible { outline: 3px solid var(--p-accent); outline-offset: -3px; border-radius: 0; }
.hss-list { list-style: none; margin: 0; padding: 0; background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--p-radius); }
.hss-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--p-border); font-size: 1rem; }
.hss-list li:first-child { border-top: 0; }
.hss-st { font-family: var(--font-mono); font-size: .8125rem; white-space: nowrap; }
.hss-st.Done { color: var(--p-ok); } .hss-st.Failed { color: var(--p-bad); } .hss-st.Downloading { color: var(--p-accent); } .hss-st.Queued { color: var(--p-warn); }
.hss-status { margin: 10px 0 0; color: var(--p-dim); font-size: 1rem; }

/* misc */
.center { text-align: center; }
.mt { margin-top: 28px; }
.divider { display: block; width: 100%; height: 22px; stroke: var(--line-soft); fill: none; stroke-width: 2; stroke-linecap: round; margin: 0; }
.big-quote { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.15; color: var(--ink); }

pre code { background: none; padding: 0; border-radius: 0; color: inherit; font-size: inherit; }

@media (max-width: 480px) { .brand-word small { display: none; } .brand svg { width: 42px; height: 42px; } }
.pat-card:nth-child(3n+2) .thumb svg { transform: scaleX(-1) rotate(-2deg); }
.pat-card:nth-child(3n) .thumb svg { transform: rotate(3deg) scale(.88); }
.pat-card:nth-child(4n+1) .thumb { background: color-mix(in srgb, var(--sticky-2) 45%, var(--panel)); }
@media (max-width: 980px) { .progress-pct { top: auto; bottom: 14px; right: 14px; } }
@media (max-width: 600px) { .stat-row { gap: 14px 16px; padding-left: 10px; } .stat-row li { padding: 8px 12px; } }

/* gallery article */
.prose .prose-photo { margin: 2em 8px; }
.prose .prose-photo img { display: block; height: auto; }
.prose blockquote.callout { margin-inline: 0; }
.prose .callout p + p { margin-top: .75em; }
.prose code { overflow-wrap: anywhere; }
