/* Scandinavian Minimal — antjanus.com redesign 067
   Linen walls, birch shelves, muted pastels, one calm sans. */

:root {
  --ground: #f5f1ea;
  --surface: #fbf9f5;
  --surface-2: #ede6da;
  --line: #ddd4c6;
  --ink: #26241f;
  --ink-2: #57524a;
  --accent: #364f6a;
  --accent-hover: #2a3f54;
  --on-accent: #ffffff;
  --wood-1: #e6d3b3;
  --wood-2: #d4b88e;
  --wood-3: #b8966a;
  --wood-edge: #a7865c;
  --mat: #efe8dc;
  --shadow: 0 1px 2px rgb(60 45 25 / .06), 0 8px 24px -12px rgb(60 45 25 / .18);
  --sage: #d9e1d1; --sage-ink: #3c5739;
  --rose: #f0ddd6; --rose-ink: #7a4337;
  --sky: #d8e2eb; --sky-ink: #2f4a66;
  --oat: #efe3c8; --oat-ink: #6a4f1f;
  --code-bg: #f0eadf;
  --code-head: #e6ddcd;
  --lamp-glow: transparent;
  --focus: #1f5fa8;
  --radius: 14px;
  --radius-sm: 8px;
  --sans: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1200px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ground: #1c1a17;
  --surface: #25221e;
  --surface-2: #2f2a24;
  --line: #3d372f;
  --ink: #efe9df;
  --ink-2: #b9af9f;
  --accent: #a9c1db;
  --accent-hover: #c5d6e8;
  --on-accent: #16202b;
  --wood-1: #7a6247;
  --wood-2: #6a543b;
  --wood-3: #574431;
  --wood-edge: #45352575;
  --mat: #2b2722;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 28px -14px rgb(0 0 0 / .7);
  --sage: #2b3428; --sage-ink: #c3d6bb;
  --rose: #3a2a26; --rose-ink: #ecc5ba;
  --sky: #25303b; --sky-ink: #bed1e5;
  --oat: #372e21; --oat-ink: #e8cf9f;
  --code-bg: #211e1a;
  --code-head: #2c2721;
  --lamp-glow: rgb(255 196 120 / .3);
  --focus: #9fc6f0;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --ground: #1c1a17; --surface: #25221e; --surface-2: #2f2a24; --line: #3d372f;
    --ink: #efe9df; --ink-2: #b9af9f; --accent: #a9c1db; --accent-hover: #c5d6e8; --on-accent: #16202b;
    --wood-1: #7a6247; --wood-2: #6a543b; --wood-3: #574431; --mat: #2b2722;
    --sage: #2b3428; --sage-ink: #c3d6bb; --rose: #3a2a26; --rose-ink: #ecc5ba;
    --sky: #25303b; --sky-ink: #bed1e5; --oat: #372e21; --oat-ink: #e8cf9f;
    --code-bg: #211e1a; --code-head: #2c2721; --lamp-glow: rgb(255 196 120 / .3); --focus: #9fc6f0;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); font-weight: 300; letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 300; }
h3 { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .6rem 1rem; z-index: 100; border-radius: 8px; }
.skip:focus { left: 16px; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
@media (max-width: 520px) { .wrap { width: calc(100% - 2rem); } }

.eyebrow {
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tone-ink, var(--wood-3)); }
.lede { font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.55; color: var(--ink-2); max-width: 40ch; font-weight: 300; }

/* ---------- Birch rail + header ---------- */
.rail {
  height: 12px;
  background:
    url("assets/birch-grain.webp") center/cover,
    repeating-linear-gradient(90deg, transparent 0 38px, rgb(120 85 40 / .07) 38px 39px, transparent 39px 91px, rgb(120 85 40 / .05) 91px 93px),
    linear-gradient(180deg, var(--wood-1), var(--wood-2));
  box-shadow: inset 0 -1px 0 var(--wood-3);
}
.site-head { position: relative; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { width: 44px; height: 44px; flex: none; }
.brand-words { display: flex; flex-direction: column; line-height: 1.1; }
.brand-words b { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-words span { font-family: var(--mono); font-size: .8125rem; color: var(--ink-2); letter-spacing: .06em; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; }
.nav a {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 .9rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 1.0625rem;
  transition: background-color .15s;
}
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
/* the peg: every current page hangs from the rail */
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: 50%; top: -1.35rem; width: 2px; height: 1.1rem; margin-left: -1px;
  background: var(--wood-3);
}
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; top: -1.6rem; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: var(--wood-3); box-shadow: 0 1px 0 rgb(0 0 0 / .2);
}
.tools { display: flex; align-items: center; gap: .5rem; }
.theme-toggle, .menu-toggle {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 500 .95rem var(--sans); cursor: pointer; transition: background-color .15s;
}
.theme-toggle:hover, .menu-toggle:hover { background: var(--surface-2); }
.theme-toggle svg, .menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; display: none; background: var(--surface); border-block: 1px solid var(--line); padding: .75rem 1rem 1rem; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { width: 100%; border-radius: 10px; }
  .nav a[aria-current="page"]::before, .nav a[aria-current="page"]::after { display: none; }
  .theme-toggle .label { display: none; }
  .theme-toggle { padding: 0 .8rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: 0 1.4rem;
  border-radius: 999px; border: 1px solid transparent; font: 500 1.0625rem var(--sans);
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.btn-soft { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-soft:hover { background: var(--surface-2); color: var(--ink); }
.btn-text { padding: 0 .2rem; min-height: 44px; color: var(--ink-2); border-radius: 6px; text-decoration: underline; text-underline-offset: .25em; }
.btn-text:hover { color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }

/* ---------- Wood: planks and shelves ---------- */
.plank {
  height: 16px; border-radius: 3px;
  background:
    url("assets/birch-grain.webp") center/cover,
    repeating-linear-gradient(90deg, transparent 0 57px, rgb(110 75 35 / .08) 57px 58px, transparent 58px 133px, rgb(110 75 35 / .06) 133px 135px),
    linear-gradient(180deg, var(--wood-1) 0 60%, var(--wood-2) 60% 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 10px 16px -10px rgb(60 40 15 / .45);
}
.shelf { position: relative; padding-bottom: 0; margin-bottom: 3.5rem; }
.shelf-items { display: grid; gap: 1.75rem; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); align-items: start; padding-inline: 1.25rem; }
.shelf .plank { margin-top: -2px; position: relative; }
.shelf .plank::before, .shelf .plank::after {
  content: ""; position: absolute; top: 16px; width: 12px; height: 26px; background: var(--wood-3);
  clip-path: polygon(0 0, 100% 0, 70% 100%, 30% 100%); opacity: .9;
}
.shelf .plank::before { left: 12%; }
.shelf .plank::after { right: 12%; }
@media (max-width: 860px) { .shelf-items { --cols: 1 !important; padding-inline: .25rem; } }
@media (min-width: 861px) and (max-width: 1080px) { .shelf-items { --cols: 2 !important; } }

/* ---------- Framed prints (image cards) ---------- */
.print { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); height: 100%; }
.print:hover { color: var(--ink); }
.print .frame {
  background: var(--mat); padding: 12px; border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  transition: transform .2s ease;
}
.print:hover .frame { transform: translateY(-3px); }
.print .frame .pic {
  aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-radius: 2px;
  background: linear-gradient(135deg, var(--tone-bg, var(--surface-2)), var(--surface-2));
  filter: saturate(.78) contrast(.96);
}
.print .frame .pic.placeholder { display: grid; place-items: center; color: var(--tone-ink, var(--ink-2)); }
.print .frame .pic.placeholder svg { width: 22%; height: auto; opacity: .7; }
.print .body { padding: 1.1rem .25rem .25rem; }
.print h3 { margin-bottom: .35rem; font-size: 1.25rem; }
.print:hover h3 { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.print p { color: var(--ink-2); font-size: 1.0625rem; margin: 0; }
.meta { font-family: var(--mono); font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-bottom: .45rem; }

/* ---------- Pastel tones ---------- */
.tone-sage { --tone-bg: var(--sage); --tone-ink: var(--sage-ink); }
.tone-rose { --tone-bg: var(--rose); --tone-ink: var(--rose-ink); }
.tone-sky  { --tone-bg: var(--sky);  --tone-ink: var(--sky-ink); }
.tone-oat  { --tone-bg: var(--oat);  --tone-ink: var(--oat-ink); }
.swatch { background: var(--tone-bg); color: var(--ink); border-radius: var(--radius); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section + .section { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .5rem 0 0; color: var(--ink-2); max-width: 52ch; }
.more-link { font-weight: 500; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; gap: .4rem; }
.more-link:hover { text-decoration: underline; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band.tint { background: var(--tone-bg); border: 0; }

/* ---------- Page hero (interior) ---------- */
.page-hero { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3.5rem); }
.page-hero .grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: end; }
.page-hero h1 { margin-bottom: 1.25rem; }
@media (max-width: 860px) { .page-hero .grid { grid-template-columns: 1fr; gap: 2rem; } }
.arch {
  border-radius: 999px 999px 18px 18px; overflow: hidden; aspect-ratio: 4 / 5;
  background: linear-gradient(180deg, var(--tone-bg, var(--sky)), var(--surface-2));
  box-shadow: 0 0 0 10px var(--mat), 0 0 0 11px var(--line), var(--shadow);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 520px) { .brand-words span { display: none; } .brand-words b { font-size: 1rem; } }

/* ---------- Home hero ---------- */
.home-hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) 0; overflow: clip; }
.home-hero .grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.home-hero h1 { font-size: clamp(2.75rem, 6.2vw, 5.4rem); margin-bottom: 1.5rem; }
.home-hero h1 em { font-style: normal; color: var(--accent); }
.home-hero .lede { max-width: 44ch; margin-bottom: 2rem; }
.hero-photo { position: relative; padding-top: 110px; }
.hero-photo .arch { max-width: 380px; margin-inline: auto; position: relative; z-index: 1; }
.hero-photo .arch img { object-position: 22% 30%; }
.lamp { position: absolute; top: -1.2rem; left: 50%; transform: translateX(-50%); width: 170px; z-index: 2; pointer-events: none; }
.lamp .shade { fill: var(--surface); stroke: var(--ink); }
.lamp .cord { stroke: var(--ink-2); }
.lamp-glow { position: absolute; left: 50%; top: 60px; width: 520px; height: 520px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, var(--lamp-glow), transparent 65%); z-index: 0; pointer-events: none; }
:root[data-theme="dark"] .lamp .bulb { fill: #ffd79a; }
.lamp .bulb { fill: var(--surface-2); }
@media (max-width: 860px) {
  .home-hero .grid { grid-template-columns: 1fr; }
  .hero-photo { padding-top: 90px; }
  .hero-photo .arch { max-width: 300px; }
  .lamp { width: 140px; }
}
.stat-shelf { margin-top: clamp(3rem, 6vw, 5rem); }
.stat-shelf .shelf-items { --cols: 3; align-items: start; }
.stat { text-align: center; padding-bottom: .9rem; }
.stat b { display: block; font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 200; letter-spacing: -0.04em; line-height: 1; }
.stat span { font-family: var(--mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
@media (max-width: 860px) { .stat-shelf .shelf-items { --cols: 3 !important; gap: .5rem; } .stat b { font-size: 2.2rem; } }

/* ---------- Rows / archive lists ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: .5rem 2rem; align-items: baseline;
  padding: 1.4rem .5rem; text-decoration: none; color: var(--ink); transition: background-color .15s;
}
.row:hover { background: var(--surface); color: var(--ink); }
.row:hover .title { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.row .date { font-family: var(--mono); font-size: .875rem; color: var(--ink-2); }
.row .title { font-size: 1.25rem; font-weight: 500; display: block; margin-bottom: .2rem; letter-spacing: -0.01em; }
.row .desc { color: var(--ink-2); font-size: 1.0625rem; display: block; }
.row .coll { font-family: var(--mono); font-size: .8125rem; color: var(--tone-ink); background: var(--tone-bg); padding: .2rem .65rem; border-radius: 999px; white-space: nowrap; }
@media (max-width: 700px) {
  .row { grid-template-columns: 1fr; padding-inline: .25rem; }
  .row .coll { justify-self: start; }
}
.year-group { display: grid; grid-template-columns: 7rem 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.year-group > h3 { font-size: 2rem; font-weight: 200; color: var(--ink-2); position: sticky; top: 1rem; align-self: start; }
@media (max-width: 700px) { .year-group { grid-template-columns: 1fr; gap: .5rem; } .year-group > h3 { position: static; } }
.year-group .row { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 700px) { .year-group .row { grid-template-columns: 1fr; } }

/* ---------- Chips & filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: .15rem .8rem; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); font-family: var(--mono); font-size: .8125rem; text-decoration: none;
}
a.chip:hover { background: var(--line); color: var(--ink); }
.filter-pill {
  min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: 500 1rem var(--sans); cursor: pointer; transition: background-color .15s;
}
.filter-pill:hover { background: var(--surface-2); }
.filter-pill[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.filter-pill[aria-pressed="true"]::before { content: "✓ "; }
.jump { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.jump .wrap { display: flex; gap: .5rem; align-items: center; overflow-x: auto; padding-block: .6rem; scrollbar-width: thin; }
.jump .eyebrow { margin: 0 .5rem 0 0; white-space: nowrap; }
.jump a { white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; padding: 0 .9rem; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); font-size: 1rem; }
.jump a:hover { background: var(--surface-2); }
.jump a small { font-family: var(--mono); color: var(--ink-2); margin-left: .35rem; font-size: .8125rem; }

/* ---------- Tiles ---------- */
.tiles { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tile {
  display: flex; flex-direction: column; gap: .5rem; padding: 1.6rem; border-radius: var(--radius);
  background: var(--tone-bg, var(--surface)); color: var(--ink); text-decoration: none; min-height: 100%;
  transition: transform .2s ease;
}
a.tile:hover { transform: translateY(-3px); color: var(--ink); }
a.tile:hover h3 { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.tile h3 { margin: 0; font-size: 1.25rem; }
.tile p { margin: 0; color: var(--ink); opacity: .85; font-size: 1.0625rem; }
.tile .kind { font-family: var(--mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tone-ink); }
.tile .icon { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--tone-ink); margin-bottom: .5rem; }
.tile .icon svg { width: 22px; height: 22px; }
.tile .foot { margin-top: auto; padding-top: .75rem; font-family: var(--mono); font-size: .8125rem; color: var(--tone-ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); }
.card.dark { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.card.dark h2, .card.dark h3 { color: var(--ground); }
.card.dark p { color: var(--ground); opacity: .88; }
.card.dark .btn-primary { background: var(--ground); color: var(--ink); }
.card.dark .btn-primary:hover { background: var(--surface-2); }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li + li { border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 52px; text-decoration: none; color: var(--ink); }
.link-list a:hover { color: var(--accent); }
.link-list small { font-family: var(--mono); font-size: .8125rem; color: var(--ink-2); }
.three { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .three, .two { grid-template-columns: 1fr; } }

/* ---------- Newsletter ---------- */
.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; padding: clamp(1.75rem, 4vw, 3rem); border-radius: 24px; background: var(--tone-bg, var(--sage)); }
.newsletter h2 { margin-bottom: .4rem; }
.newsletter p { color: var(--ink); opacity: .85; margin: 0; }
.nl-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.nl-form label.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nl-form input[type="email"] {
  flex: 1 1 220px; min-height: 48px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 400 1.0625rem var(--sans);
}
.nl-form input::placeholder { color: var(--ink-2); }
.nl-status { flex-basis: 100%; min-height: 1.5em; margin: .25rem 0 0; font-size: 1rem; }
@media (max-width: 860px) { .newsletter { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-foot { margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); background: var(--surface); }
.site-foot .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 2.5rem; padding-block: 3.5rem; }
.site-foot h2 { font-family: var(--mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); font-weight: 400; margin-bottom: 1rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li a { display: inline-flex; min-height: 36px; align-items: center; color: var(--ink); text-decoration: none; }
.site-foot li a:hover { text-decoration: underline; color: var(--accent); }
.site-foot .bottom { border-top: 1px solid var(--line); padding-block: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--ink-2); font-size: 1rem; }
@media (max-width: 960px) { .site-foot .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .site-foot .grid { grid-template-columns: 1fr; } }

/* ---------- Book spines (I, AI) ---------- */
.bookshelf .shelf-items { display: flex; justify-content: flex-start; gap: 6px; padding-inline: 2rem; align-items: flex-end; }
.spine {
  --h: 280px;
  display: flex; align-items: center; justify-content: space-between; flex-direction: column;
  width: 74px; height: var(--h); padding: 1rem 0 .9rem; border-radius: 4px 4px 2px 2px;
  background: var(--tone-bg); color: var(--tone-ink); text-decoration: none;
  box-shadow: inset -6px 0 0 rgb(0 0 0 / .05), inset 2px 0 0 rgb(255 255 255 / .35), var(--shadow);
  transition: transform .2s ease;
}
a.spine:hover { transform: translateY(-10px); color: var(--tone-ink); }
.spine .t { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 1.1rem; font-weight: 500; letter-spacing: .01em; white-space: nowrap; }
.spine .n { font-family: var(--mono); font-size: .875rem; }
.spine.ghost { background: transparent; border: 1.5px dashed var(--line); box-shadow: none; color: var(--ink-2); }
.bookend { width: 18px; height: 120px; background: var(--wood-2); border-radius: 3px 3px 0 0; margin-left: 10px; box-shadow: var(--shadow); }
.plant { width: 90px; height: 150px; margin-left: auto; }
@media (max-width: 600px) {
  .bookshelf .shelf-items { padding-inline: .5rem; gap: 4px; }
  .spine { width: 54px; --h: 230px !important; }
  .spine .t { font-size: 1rem; }
  .plant, .bookend { display: none; }
}

/* ---------- Timeline (About) ---------- */
.career-bar { display: flex; height: 64px; border-radius: 10px; overflow: hidden; margin-bottom: 1rem; box-shadow: 0 0 0 1px var(--line); }
.career-bar span { flex: var(--w) 1 0; display: flex; align-items: flex-end; padding: .4rem .5rem; font-size: .875rem; font-family: var(--mono); color: var(--tone-ink); background: var(--tone-bg); border-right: 1px solid var(--ground); overflow: hidden; white-space: nowrap; }
.career-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; list-style: none; padding: 0; margin: 0 0 3rem; font-size: 1rem; color: var(--ink-2); }
.career-legend li::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--tone-ink); margin-right: .45rem; }
@media (max-width: 700px) { .career-bar { display: none; } }
.phases { list-style: none; padding: 0; margin: 0; position: relative; }
.phase { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2rem; padding-block: 2rem; border-top: 1px solid var(--line); }
.phase .when { font-family: var(--mono); font-size: .9375rem; color: var(--ink-2); }
.phase .when b { display: block; font-family: var(--sans); font-size: 1.4rem; font-weight: 400; color: var(--ink); letter-spacing: -0.01em; margin-bottom: .25rem; }
.phase ul { padding-left: 1.2rem; margin: .5rem 0 0; }
.phase li { margin-bottom: .4rem; }
.role { font-weight: 500; }
.role small { font-family: var(--mono); font-size: .875rem; color: var(--ink-2); font-weight: 400; margin-left: .35rem; }
@media (max-width: 700px) { .phase { grid-template-columns: 1fr; gap: .75rem; } }
.quote-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: q; }
.quote-list li { background: var(--surface); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.5rem 1.5rem; font-size: 1.25rem; font-weight: 300; line-height: 1.45; counter-increment: q; }
.quote-list li::before { content: "0" counter(q); display: block; font-family: var(--mono); font-size: .8125rem; color: var(--tone-ink); margin-bottom: .6rem; }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--wood-3); z-index: 50; }
.article-head { padding-block: clamp(2.5rem, 5vw, 4.5rem) 2rem; }
.article-head .inner { max-width: 820px; }
.crumb { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 500; text-decoration: none; }
.article-head h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin: .5rem 0 1rem; }
.article-head .lede { max-width: 46ch; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.5rem; font-family: var(--mono); font-size: .875rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.byline img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.hero-print { max-width: 900px; margin: 1rem auto 0; }
.hero-print .frame { background: var(--mat); padding: clamp(10px, 2vw, 22px); border-radius: 6px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.hero-print img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; filter: saturate(.8); border-radius: 2px; }
.hero-print figcaption { font-size: .9375rem; color: var(--ink-2); margin-top: .8rem; text-align: center; }
.article-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 4rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.toc-side { position: sticky; top: 1.5rem; align-self: start; }
.toc-side .eyebrow { margin-bottom: .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .45rem 0 .45rem 1rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: 1rem; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--wood-3); font-weight: 500; }
.toc-mobile { display: none; margin-bottom: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-mobile summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; padding: 0 1.2rem; font-weight: 500; list-style: none; }
.toc-mobile summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; font-weight: 300; }
.toc-mobile[open] summary::after { content: "–"; }
.toc-mobile .toc { padding: 0 1.2rem 1rem; }
.side-tools { margin-top: 2rem; display: grid; gap: .5rem; }
.side-tools a, .side-tools button { justify-content: flex-start; }
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc-side { display: none; }
  .toc-mobile { display: block; }
}
.prose { max-width: 700px; font-size: 1.1875rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.4em; }
.prose p, .prose ol, .prose ul { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin: 2.4em 0 .6em; scroll-margin-top: 1.5rem; font-weight: 400; }
.prose h2::before { content: ""; display: block; width: 48px; height: 6px; border-radius: 3px; background: var(--wood-2); margin-bottom: 1rem; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose code:not(pre code) { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .12em .4em; border-radius: 5px; }
.prose em { font-style: italic; }
.callout { border-radius: var(--radius); padding: 1.2rem 1.4rem 1.2rem 1.4rem; background: var(--tone-bg); color: var(--ink); margin-block: 1.6em; font-size: 1.0625rem; line-height: 1.65; }
.callout .label { display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tone-ink); margin-bottom: .35rem; font-weight: 500; }
.callout .label svg { width: 16px; height: 16px; }
.callout p { margin: 0; }
.callout a { color: var(--tone-ink); }
.code {
  margin-block: 1.8em; border-radius: var(--radius); overflow: hidden; background: var(--code-bg);
  box-shadow: 0 0 0 1px var(--line);
}
@media (min-width: 1300px) { .prose .code { margin-right: -120px; } }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: .35rem .5rem .35rem 1.1rem; background: var(--code-head); font-family: var(--mono); font-size: .8125rem; color: var(--ink-2); letter-spacing: .08em; }
.copy-btn { min-height: 36px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 .875rem var(--sans); cursor: pointer; }
.copy-btn:hover { background: var(--surface-2); }
.code pre { margin: 0; padding: 1.2rem 1.25rem 1.4rem; overflow-x: auto; font-family: var(--mono); font-size: .9375rem; line-height: 1.65; tab-size: 2; color: var(--ink); }
.code pre code { font-family: inherit; }
.token.comment, .token.prolog { color: #7a7266; font-style: italic; }
.token.keyword, .token.module, .token.operator.arrow { color: #7a4337; }
.token.string, .token.template-string { color: #4a6b3f; }
.token.function, .token.class-name { color: #2f5a88; }
.token.tag, .token.boolean, .token.number { color: #8a5a12; }
.token.attr-name, .token.property { color: #5a4a8a; }
.token.punctuation { color: #6b6357; }
:root[data-theme="dark"] .token.comment { color: #968d7e; }
:root[data-theme="dark"] .token.keyword, :root[data-theme="dark"] .token.module { color: #eeb3a4; }
:root[data-theme="dark"] .token.string, :root[data-theme="dark"] .token.template-string { color: #b8d4a6; }
:root[data-theme="dark"] .token.function, :root[data-theme="dark"] .token.class-name { color: #a9c9ec; }
:root[data-theme="dark"] .token.tag, :root[data-theme="dark"] .token.boolean, :root[data-theme="dark"] .token.number { color: #e8c68a; }
:root[data-theme="dark"] .token.attr-name, :root[data-theme="dark"] .token.property { color: #cbbcf0; }
:root[data-theme="dark"] .token.punctuation { color: #b0a695; }
.after-article { max-width: 700px; margin-top: 3.5rem; }
.share { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* ---------- Patterns ---------- */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 860px) { .ways { grid-template-columns: 1fr; } }
.search-field { position: relative; }
.search-field input {
  width: 100%; min-height: 60px; padding: 0 1.4rem 0 3.3rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 400 1.125rem var(--sans);
}
.search-field input::placeholder { color: var(--ink-2); }
.search-field svg { position: absolute; left: 1.25rem; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--ink-2); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 1.5rem; }
.results-bar select { min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 1rem; font: 400 1rem var(--sans); }
.pattern-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); list-style: none; margin: 0; padding: 0; }
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; position: relative; }
.pcard:hover { box-shadow: var(--shadow); }
.pcard .thumb { height: 170px; background: var(--tone-bg); display: grid; place-items: center; position: relative; }
.pcard .thumb svg { width: 62%; height: 70%; color: var(--tone-ink); }
.pcard .pbody { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.pcard h2 { font-size: 1.25rem; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.pcard h2 a { color: var(--ink); text-decoration: none; }
.pcard h2 a::after { content: ""; position: absolute; inset: 0; }
.pcard:hover h2 a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.pcard p { margin: 0; color: var(--ink-2); font-size: 1.0625rem; }
.pcard .top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.badge { font-family: var(--mono); font-size: .8125rem; padding: .15rem .6rem; border-radius: 999px; background: var(--ink); color: var(--ground); }
.badge.updated { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); }
.pcard .chips { margin-top: auto; padding-top: .5rem; }
.empty { text-align: center; padding: 4rem 1rem; border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty[hidden] { display: none; }

/* pattern detail */
.back { display: flex; width: fit-content; align-items: center; gap: .4rem; min-height: 44px; text-decoration: none; font-weight: 500; }
.uses { columns: 2; column-gap: 2.5rem; padding-left: 1.2rem; margin: 0; }
.uses li { margin-bottom: .45rem; break-inside: avoid; }
@media (max-width: 700px) { .uses { columns: 1; } }
.panes { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; margin-top: 2.5rem; }
.pane-bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .6rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.tabs [role="tab"] { min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); font: 500 1rem var(--sans); cursor: pointer; }
.tabs [role="tab"]:hover { color: var(--ink); background: var(--surface); }
.tabs [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pane-actions { display: flex; gap: .5rem; }
.pane { padding: clamp(1.25rem, 3vw, 2.25rem); }
.pane[hidden] { display: none; }
.pane pre { margin: 0; background: var(--code-bg); border-radius: 10px; padding: 1.2rem; overflow-x: auto; font: .9375rem/1.65 var(--mono); }
.pane .note { background: var(--oat); border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1rem; font-size: 1rem; }
.prompt-text { max-width: 68ch; }
.prompt-text p { margin-bottom: 1em; }

/* the pattern itself, living in the page */
.hss-cap { font-size: 1rem; color: var(--ink-2); margin: 0 0 .75rem; }
.hss-strip { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 2.25rem; }
.hss-tile { background: var(--surface); padding: 1rem 1.15rem; min-width: 0; }
.hss-tile .lbl { display: block; font-family: var(--mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.hss-tile .fig { display: block; font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; margin: .15rem 0; }
.hss-tile .sub { display: block; font-size: .9375rem; color: var(--ink-2); }
.hss-tile .fig.none { color: var(--ink-2); font-weight: 400; }
@media (min-width: 440px) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 820px) { .hss-strip.report { grid-template-columns: repeat(4, 1fr); } }
.hss-strip.filter .hss-tile { border: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: background-color .15s; }
.hss-strip.filter .hss-tile:hover { background: var(--surface-2); }
.hss-strip.filter .hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: inset 0 -3px 0 var(--accent); }
.hss-strip.filter .hss-tile:focus-visible { outline-offset: -4px; }
@media (min-width: 440px) { .hss-strip.filter .hss-tile:first-child { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .hss-strip.filter { grid-template-columns: repeat(5, 1fr); } .hss-strip.filter .hss-tile:first-child { grid-column: auto; } }
.hss-list { list-style: none; padding: 0; margin: 0 0 .75rem; border-top: 1px solid var(--line); }
.hss-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .25rem; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
.hss-list li[hidden] { display: none; }
.hss-list .st { font-family: var(--mono); font-size: .875rem; color: var(--ink-2); white-space: nowrap; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.two.wide-right { grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); }
@media (max-width: 860px) { .two.wide-right { grid-template-columns: 1fr; } }

.prose-fig { margin: 1.8em 0; }
.prose-fig .frame { border-radius: var(--radius); overflow: hidden; }
.prose-fig img { display: block; width: 100%; height: auto; }
.prose blockquote.callout { margin-inline: 0; }
.prose .callout p + p { margin-top: .7em; }
.prose code { overflow-wrap: anywhere; }
.prose > * + p, .prose > * + ul, .prose > * + ol { margin-top: 1.1em; }
