/* AntJanus — Editorial Magazine
   A monthly-magazine system: nameplate, dateline, contents page,
   drop caps, pull quotes, bylines, departments, and a colophon. */

:root {
  /* primitives */
  --cream-50: #f6f1e6;
  --cream-100: #ece4d3;
  --cream-200: #dcd1ba;
  --cream-300: #c9bda3;
  --ink-900: #16130f;
  --ink-700: #342e27;
  --ink-500: #62584b;
  --vermilion-600: #b0301a;
  --vermilion-300: #ff8a6e;
  --slate-600: #364f6a;
  --slate-300: #9cbbdc;
  --night-900: #12100d;
  --night-800: #1c1915;
  --night-700: #27231d;
  --night-600: #3a342b;
  --bone-100: #f1ebdd;
  --bone-300: #d4cbb9;
  --bone-500: #a99e8b;

  /* semantic */
  --paper: var(--cream-50);
  --paper-2: var(--cream-100);
  --paper-3: var(--cream-200);
  --ink: var(--ink-900);
  --text: var(--ink-700);
  --muted: var(--ink-500);
  --hair: var(--cream-300);
  --rule: var(--ink-900);
  --spot: var(--vermilion-600);
  --slate: var(--slate-600);
  --on-spot: #fffaf0;
  --code-bg: #1b1814;
  --code-bar: #26221c;
  --code-ink: #efe6d3;
  --code-dim: #a99e8b;
  --code-key: #ff9d7f;
  --code-str: #b8d68f;
  --code-fn: #9cc6f0;
  --focus: var(--vermilion-600);
  --band: #16130f;
  --band-text: #f1ebdd;
  --band-muted: #c7bda9;

  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-text: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-label: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 40rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: var(--night-900);
    --paper-2: var(--night-800);
    --paper-3: var(--night-700);
    --ink: var(--bone-100);
    --text: var(--bone-300);
    --muted: var(--bone-500);
    --hair: var(--night-600);
    --rule: var(--bone-100);
    --spot: var(--vermilion-300);
    --slate: var(--slate-300);
    --on-spot: #1a0d08;
    --code-bg: #0b0a08;
    --code-bar: #1a1713;
    --focus: var(--vermilion-300);
    --band: #0b0a08;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: var(--night-900);
  --paper-2: var(--night-800);
  --paper-3: var(--night-700);
  --ink: var(--bone-100);
  --text: var(--bone-300);
  --muted: var(--bone-500);
  --hair: var(--night-600);
  --rule: var(--bone-100);
  --spot: var(--vermilion-300);
  --slate: var(--slate-300);
  --on-spot: #1a0d08;
  --code-bg: #0b0a08;
  --code-bar: #1a1713;
  --focus: var(--vermilion-300);
  --band: #0b0a08;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("assets/paper-grain.png");
  background-size: 600px;
  color: var(--text);
  font-family: var(--f-text);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--spot); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--f-display); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .75rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- labels ---------- */
.kicker, .eyebrow {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--spot);
}
.label {
  font-family: var(--f-label);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.byline { font-family: var(--f-label); font-size: 0.9375rem; letter-spacing: 0.04em; color: var(--muted); }
.byline strong { color: var(--ink); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.folio { font-family: var(--f-display); font-style: italic; color: var(--spot); font-weight: 500; }

/* ---------- masthead ---------- */
.masthead { border-bottom: 4px double var(--rule); }
.dateline {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-top: .5rem; padding-bottom: .5rem;
  font-family: var(--f-label); font-size: 0.875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.dateline .dl-items { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.dateline .dl-items span + span::before { content: "✦"; color: var(--spot); margin-right: 1.25rem; font-size: .7em; vertical-align: .15em; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  min-height: 36px; padding: .25rem .9rem; cursor: pointer;
  font-family: var(--f-label); font-size: .875rem; letter-spacing: .1em; text-transform: uppercase;
}
.theme-toggle:hover { background: var(--ink); color: var(--paper); }
.theme-toggle svg { width: 16px; height: 16px; }
.nameplate-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; padding-top: 1rem; padding-bottom: .75rem; }
.nameplate {
  display: inline-flex; align-items: baseline; gap: .6rem;
  font-family: var(--f-display); font-weight: 800; color: var(--ink); text-decoration: none;
  font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: .9; letter-spacing: -0.035em;
}
.nameplate em { font-style: italic; font-weight: 500; color: var(--spot); }
.nameplate:hover { color: var(--ink); }
.motto { margin: 0; max-width: 24rem; text-align: right; font-style: italic; color: var(--muted); font-size: 1rem; line-height: 1.4; }
.is-cover .nameplate-row { grid-template-columns: 1fr; text-align: center; padding-top: 1.25rem; padding-bottom: .5rem; }
.is-cover .nameplate { justify-content: center; font-size: clamp(3.4rem, 15.5vw, 13.5rem); line-height: .82; letter-spacing: -0.05em; }
.is-cover .motto { margin: .75rem auto 0; text-align: center; max-width: none; font-size: 1.125rem; }

.sections { border-top: 1px solid var(--rule); }
.sections ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; }
.sections a {
  display: block; padding: .8rem 1.1rem; min-height: 44px;
  font-family: var(--f-label); font-weight: 600; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
.sections a:hover { color: var(--spot); }
.sections a[aria-current="page"] { color: var(--spot); box-shadow: inset 0 -3px 0 var(--spot); }
.sections .num { font-family: var(--f-display); font-style: italic; letter-spacing: 0; text-transform: none; color: var(--muted); margin-right: .35rem; font-weight: 500; }

/* ---------- section headers ---------- */
.dept-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 1rem;
  border-top: 3px solid var(--rule); padding-top: .75rem; margin-bottom: 2rem;
}
.dept-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-style: italic; font-weight: 500; }
.dept-head p { margin: 0; color: var(--muted); font-style: italic; font-size: 1.0625rem; }
.dept-head a { font-family: var(--f-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .875rem; color: var(--spot); text-decoration: none; white-space: nowrap; }
.dept-head a:hover { text-decoration: underline; }
.section { padding: clamp(3rem, 6vw, 5.5rem) 0 0; }
.section:last-of-type { padding-bottom: clamp(3rem, 6vw, 5.5rem); }

/* ---------- page openers (inner pages) ---------- */
.opener { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.opener-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 2rem; align-items: end; }
.opener h1 { font-size: clamp(3rem, 9vw, 8rem); line-height: .9; letter-spacing: -0.04em; font-weight: 700; margin: .5rem 0 0; }
.opener h1 em { font-weight: 400; color: var(--spot); }
.opener .standfirst { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.4; color: var(--ink); font-style: italic; margin: 0; }
.opener .o-title { grid-column: 1 / 8; }
.opener .o-stand { grid-column: 8 / 13; border-left: 1px solid var(--hair); padding-left: 1.5rem; padding-bottom: .5rem; }

.standfirst { font-family: var(--f-text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem;
  font-family: var(--f-label); font-weight: 700; font-size: 1rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; border: 2px solid var(--ink); cursor: pointer; transition: background .15s, color .15s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--spot); border-color: var(--spot); color: var(--on-spot); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.link-tertiary { font-family: var(--f-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .9375rem; color: var(--muted); }
.link-tertiary:hover { color: var(--spot); }

/* ---------- cover (home) ---------- */
.cover { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem; padding-top: 2rem; }
.cover-photo { grid-column: 1 / 8; position: relative; margin: 0; }
.cover-photo .frame { position: relative; aspect-ratio: 4 / 3.3; overflow: hidden; background: var(--paper-3); }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 22% 30%; filter: saturate(.85) contrast(1.04); }
.cover-lines { position: absolute; left: 0; right: 0; bottom: 0; padding: 4rem 1.5rem 1.25rem; background: linear-gradient(to top, rgb(12 10 8 / .88), rgb(12 10 8 / 0)); color: #f7f1e4; display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: flex-end; }
.cover-lines span { max-width: 12rem; line-height: 1.3; font-family: var(--f-label); font-weight: 700; font-size: .9375rem; letter-spacing: .12em; text-transform: uppercase; }
.cover-lines b { display: block; font-family: var(--f-display); font-size: 2rem; letter-spacing: -.02em; text-transform: none; line-height: 1; font-weight: 700; }
.cover-photo figcaption { margin-top: .6rem; font-size: .9375rem; color: var(--muted); font-style: italic; }
.cover-story { grid-column: 8 / 13; display: flex; flex-direction: column; justify-content: center; }
.cover-story h1 { font-size: clamp(2.6rem, 4.6vw, 4.4rem); line-height: .98; letter-spacing: -0.03em; font-weight: 700; margin: .75rem 0 1.25rem; }
.cover-story h1 em { font-weight: 400; color: var(--spot); }
.cover-story .standfirst { font-size: 1.3rem; line-height: 1.45; color: var(--ink); }
.cover-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.cover-ctas .secondary { font-family: var(--f-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); text-decoration-thickness: 2px; text-decoration-color: var(--spot); min-height: 44px; display: inline-flex; align-items: center; }

.by-numbers { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 1.5rem; }
.by-numbers div { padding: .9rem .75rem; text-align: center; }
.by-numbers div + div { border-left: 1px solid var(--hair); }
.by-numbers b { display: block; font-family: var(--f-display); font-size: 2.25rem; font-weight: 700; color: var(--ink); line-height: 1; font-variant-numeric: lining-nums; }
.by-numbers span { font-family: var(--f-label); font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- contents page ---------- */
.contents { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem; }
.contents-intro { grid-column: 1 / 4; }
.contents-intro h2 { font-size: clamp(3rem, 5vw, 4.6rem); line-height: .85; font-weight: 800; letter-spacing: -0.04em; }
.contents-intro h2 em { display: block; font-size: .72em; letter-spacing: -.02em; font-weight: 400; color: var(--spot); }
.contents-intro p { color: var(--muted); font-style: italic; margin-top: 1rem; }
.contents-col { grid-column: span 9; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
.toc-group h3 { font-family: var(--f-label); font-size: .9375rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--rule); padding-bottom: .4rem; margin-bottom: .25rem; }
.toc-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.toc-list li { border-bottom: 1px solid var(--hair); }
.toc-list a { display: grid; grid-template-columns: 3rem 1fr; gap: .9rem; padding: 1rem 0; text-decoration: none; }
.toc-list .pg { font-family: var(--f-display); font-size: 2rem; font-weight: 700; color: var(--spot); line-height: 1; font-variant-numeric: lining-nums; }
.toc-list .t { display: block; font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; line-height: 1.2; color: var(--ink); }
.toc-list a:hover .t { text-decoration: underline; text-decoration-thickness: 1px; }
.toc-list .d { display: block; font-size: 1rem; color: var(--muted); margin-top: .3rem; line-height: 1.45; }
.toc-list .m { display: block; font-family: var(--f-label); letter-spacing: .08em; text-transform: uppercase; font-size: .875rem; color: var(--muted); margin-top: .35rem; }

/* ---------- story cards ---------- */
.spread { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.story { display: flex; flex-direction: column; text-decoration: none; }
.story .pic { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-3); margin-bottom: 1rem; }
.story .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.story:hover .pic img { transform: scale(1.03); }
.story h3 { font-size: 1.6rem; line-height: 1.12; margin: .4rem 0 .6rem; }
.story:hover h3 { color: var(--spot); }
.story p { color: var(--text); font-size: 1.0625rem; line-height: 1.55; margin-bottom: .6rem; }
.story .meta { font-family: var(--f-label); letter-spacing: .08em; text-transform: uppercase; font-size: .875rem; color: var(--muted); margin-top: auto; }
.story.lead h3 { font-size: clamp(2rem, 3.4vw, 3rem); letter-spacing: -.02em; }
.story.lead p { font-size: 1.2rem; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-3 { grid-column: span 3; }
.span-12 { grid-column: 1 / -1; }
.col-rule { border-left: 1px solid var(--hair); padding-left: 2rem; }

/* big pull quote band */
.pull-band { padding: clamp(3rem, 7vw, 6rem) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: clamp(3rem, 6vw, 5.5rem); text-align: center; }
.pull-band blockquote { margin: 0 auto; max-width: 62rem; }
.pull-band blockquote p { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1.15; color: var(--ink); letter-spacing: -.015em; margin: 0; }
.pull-band blockquote p::before { content: "“"; display: block; font-size: 2.2em; line-height: .6; color: var(--spot); font-style: normal; font-weight: 800; }
.pull-band cite { display: block; margin-top: 1.5rem; font-style: normal; }

/* numbered departments list */
.dept-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.dept-grid > * { padding: 1.5rem 1.5rem 1.75rem 0; }
.dept-grid > * + * { border-left: 1px solid var(--hair); padding-left: 1.5rem; }
.dept-card { text-decoration: none; display: flex; flex-direction: column; gap: .5rem; }
.dept-card .n { font-family: var(--f-display); font-size: 3.5rem; font-weight: 800; line-height: .9; color: var(--spot); }
.dept-card h3 { font-size: 1.45rem; line-height: 1.15; }
.dept-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; }
.dept-card p { font-size: 1.0625rem; margin: 0; }
.dept-card .tech { font-family: var(--f-label); font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: auto; }

/* classifieds (back of book) */
.classifieds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 2px solid var(--rule); }
.classifieds > div { padding: 1.75rem; }
.classifieds > div + div { border-left: 1px solid var(--rule); }
.classifieds h3 { font-family: var(--f-label); font-size: 1rem; letter-spacing: .18em; text-transform: uppercase; text-align: center; border-bottom: 1px solid var(--rule); padding-bottom: .6rem; margin-bottom: 1rem; }
.classifieds ul { list-style: none; padding: 0; margin: 0; }
.classifieds li { padding: .55rem 0; border-bottom: 1px dotted var(--hair); display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.classifieds li a { font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.classifieds li a:hover { color: var(--spot); text-decoration: underline; }
.classifieds li span { font-style: italic; color: var(--muted); font-size: 1rem; text-align: right; }
.classifieds .ad { background: var(--ink); color: var(--paper); text-align: center; display: flex; flex-direction: column; justify-content: center; }
.classifieds .ad h3 { color: var(--paper); border-color: var(--paper); }
.classifieds .ad p { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.2; font-style: italic; color: var(--paper); }
.classifieds .ad .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); align-self: center; }
.classifieds .ad .btn:hover { background: var(--spot); border-color: var(--spot); color: var(--on-spot); }

/* ---------- article ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--spot); z-index: 40; }
.art-head { padding-top: clamp(2.5rem, 6vw, 5rem); text-align: center; }
.art-head .kicker a { text-decoration: none; }
.art-head h1 { font-size: clamp(2.6rem, 7.2vw, 6.25rem); line-height: .95; letter-spacing: -0.035em; font-weight: 700; max-width: 15ch; margin: 1rem auto 1.5rem; }
.art-head h1 em { font-weight: 400; color: var(--spot); }
.art-head .standfirst { font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-style: italic; line-height: 1.35; color: var(--ink); max-width: 36rem; margin: 0 auto 1.75rem; }
.art-byline { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: .8rem 0; max-width: 52rem; margin: 0 auto; }
.art-byline a { color: var(--spot); }
.art-hero { margin: 2.5rem auto 0; max-width: 1100px; }
.art-hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.art-hero figcaption { display: flex; justify-content: space-between; gap: 1rem; font-size: .9375rem; font-style: italic; color: var(--muted); padding-top: .5rem; border-bottom: 1px solid var(--hair); padding-bottom: .5rem; }

.art-body-grid { display: grid; grid-template-columns: 15rem minmax(0, 42rem) minmax(0, 1fr); gap: 3.5rem; justify-content: center; padding-top: 3rem; }
.art-toc { position: sticky; top: 1.5rem; align-self: start; }
.art-toc h2 { font-family: var(--f-label); font-size: .875rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; border-bottom: 2px solid var(--rule); padding-bottom: .4rem; }
.art-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.art-toc li { counter-increment: toc; border-bottom: 1px solid var(--hair); }
.art-toc ol a { display: grid; grid-template-columns: 1.75rem 1fr; padding: .6rem 0; text-decoration: none; font-size: 1rem; line-height: 1.35; color: var(--text); }
.art-toc ol a::before { content: counter(toc, upper-roman) "."; font-family: var(--f-display); font-style: italic; color: var(--muted); }
.art-toc a.is-active { color: var(--ink); font-weight: 600; }
.art-toc ol a.is-active::before { color: var(--spot); }
.art-toc .toc-mobile summary { display: none; }
.art-toc .toc-extra { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.art-aside { align-self: start; }

.prose { font-size: 1.1875rem; line-height: 1.68; color: var(--text); hanging-punctuation: first; }
.prose > * + * { margin-top: 1.3em; }
.prose p { margin-bottom: 0; }
.prose h2 { font-size: clamp(1.9rem, 3vw, 2.4rem); font-style: italic; font-weight: 500; margin-top: 2.5em; padding-top: .9rem; border-top: 1px solid var(--rule); scroll-margin-top: 1.5rem; }
.prose h2 .sec { display: block; font-family: var(--f-label); font-style: normal; font-size: .875rem; letter-spacing: .16em; text-transform: uppercase; color: var(--spot); font-weight: 700; margin-bottom: .4rem; }
.prose h2 + p { margin-top: .9em; }
.prose a { color: var(--ink); text-decoration-color: var(--spot); text-decoration-thickness: 2px; }
.prose a:hover { color: var(--spot); }
.prose code { font-family: var(--f-mono); font-size: .84em; background: var(--paper-2); padding: .08em .35em; border: 1px solid var(--hair); }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.prose ol, .prose ul { padding-left: 1.5rem; }
.prose li + li { margin-top: .35em; }
.prose ol li::marker { font-family: var(--f-display); font-weight: 700; color: var(--spot); }
.prose em { font-style: italic; }

.drop::first-letter {
  float: left;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 5.1em;
  line-height: .78;
  margin: .06em .1em 0 0;
  color: var(--spot);
}
@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
  .drop::first-letter { float: none; font-size: 1em; line-height: 1; margin: 0 .12em 0 0; -webkit-initial-letter: 3; initial-letter: 3; }
}
.drop::first-line { font-family: var(--f-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .95em; color: var(--ink); }

.eds-note { border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1rem 0 1.1rem; font-size: 1.0625rem; line-height: 1.55; }
.eds-note .label { color: var(--spot); display: block; margin-bottom: .35rem; }

.callout-why { border-left: 3px solid var(--spot); padding: .2rem 0 .2rem 1.25rem; font-size: 1.0625rem; line-height: 1.6; }
.callout-why .tag { font-family: var(--f-display); font-style: italic; font-weight: 700; color: var(--spot); font-size: 1.25rem; margin-right: .35rem; }
.callout-ask { background: var(--paper-2); border: 1px solid var(--hair); padding: 1.1rem 1.25rem 1.2rem; font-size: 1.0625rem; line-height: 1.6; position: relative; }
.callout-ask .tag { display: block; font-family: var(--f-label); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .875rem; color: var(--slate); margin-bottom: .35rem; }
.callout-ask p { font-family: var(--f-display); font-style: italic; font-size: 1.2rem; line-height: 1.4; color: var(--ink); }
.callout-note { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: .9rem 0; font-style: italic; }

.pullquote { margin: 2.25em 0 !important; padding: 1.25rem 0; border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pullquote p { font-family: var(--f-display); font-style: italic; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.2; color: var(--ink); letter-spacing: -.01em; }
.pullquote p::before { content: "“"; color: var(--spot); font-weight: 800; }
.pullquote p::after { content: "”"; color: var(--spot); font-weight: 800; }
@media (min-width: 1180px) {
  .pullquote.out { float: right; width: 20rem; margin: .4em -12rem 1.25em 2rem !important; }
}

/* code */
.code { background: var(--code-bg); color: var(--code-ink); margin-left: -1.5rem; margin-right: -1.5rem; border-top: 3px solid var(--spot); }
.code-bar { display: flex; align-items: center; justify-content: space-between; background: var(--code-bar); padding: .25rem .5rem .25rem 1.25rem; font-family: var(--f-label); letter-spacing: .14em; text-transform: uppercase; font-size: .875rem; color: var(--code-dim); }
.code-bar button { background: none; border: 1px solid #5a5145; color: var(--code-ink); cursor: pointer; font-family: var(--f-label); letter-spacing: .12em; text-transform: uppercase; font-size: .875rem; min-height: 36px; padding: .2rem .8rem; }
.code-bar button:hover { border-color: var(--code-ink); }
.code pre { margin: 0; padding: 1.1rem 1.25rem 1.3rem; overflow-x: auto; font-family: var(--f-mono); font-size: .9375rem; line-height: 1.6; tab-size: 2; font-variant-ligatures: none; }
.code .tk-c { color: var(--code-dim); font-style: italic; }
.code .tk-k { color: var(--code-key); }
.code .tk-s { color: var(--code-str); }
.code .tk-t { color: var(--code-fn); }

.filed { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 3rem; padding-top: 1rem; border-top: 3px solid var(--rule); }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: .15rem .7rem; border: 1px solid var(--hair); font-family: var(--f-label); font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); text-decoration: none; background: transparent; }
a.chip:hover { border-color: var(--spot); color: var(--spot); }
.end-mark { display: inline-block; width: .7em; height: .7em; background: var(--spot); margin-left: .3em; vertical-align: 0; }

.share { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.share .btn { min-height: 44px; padding: .5rem 1rem; font-size: .875rem; }

/* newsletter */
.subscribe { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; border: 2px solid var(--rule); padding: 2rem; background: var(--paper-2); align-items: center; }
.subscribe h2, .subscribe h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-style: italic; font-weight: 500; }
.subscribe p { margin: .5rem 0 0; }
.sub-form { display: flex; flex-wrap: wrap; gap: .75rem; }
.sub-form label:not(.sr-only) { width: 100%; }
.field { flex: 1 1 14rem; min-height: 48px; padding: .6rem .9rem; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-family: var(--f-text); font-size: 1.0625rem; }
.field::placeholder { color: var(--muted); }
.form-msg { width: 100%; font-style: italic; min-height: 1.5em; margin: 0; }

/* ---------- footer / colophon ---------- */
.colophon { margin-top: clamp(4rem, 8vw, 7rem); border-top: 4px double var(--rule); padding-top: 2.5rem; padding-bottom: 2rem; }
.colophon-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: 2.5rem; }
.colophon .nameplate { font-size: 3rem; }
.colophon h2 { font-family: var(--f-label); font-size: .9375rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--rule); padding-bottom: .4rem; margin-bottom: .6rem; }
.colophon ul { list-style: none; padding: 0; margin: 0; }
.colophon li a { display: inline-block; padding: .3rem 0; text-decoration: none; font-size: 1.0625rem; }
.colophon li a:hover { text-decoration: underline; color: var(--spot); }
.colophon .blurb { font-style: italic; color: var(--muted); margin-top: .75rem; }
.colophon-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 1rem; color: var(--muted); }
.colophon-base .set-in { font-style: italic; }
.monogram { width: 44px; height: 44px; flex: none; }

/* ---------- generic lists ---------- */
.rowlist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.rowlist li { border-bottom: 1px solid var(--hair); }
.rowlist a { display: grid; grid-template-columns: 8rem 1fr; gap: 1.5rem; padding: 1.1rem 0; text-decoration: none; align-items: baseline; }
.rowlist time, .rowlist .kind { font-family: var(--f-label); letter-spacing: .08em; text-transform: uppercase; font-size: .875rem; color: var(--muted); }
.rowlist b { display: block; font-family: var(--f-display); font-size: 1.35rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.rowlist span { display: block; color: var(--text); font-size: 1.0625rem; margin-top: .25rem; }
.rowlist a:hover b { color: var(--spot); }

.twocol-prose { columns: 2 18rem; column-gap: 3rem; column-rule: 1px solid var(--hair); }
.twocol-prose > * { break-inside: avoid; }

/* picks / popular */
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 3px solid var(--rule); }
.picks > section { padding: 1.5rem 2rem 0 0; }
.picks > section + section { padding: 1.5rem 0 0 2rem; border-left: 1px solid var(--rule); }
.picks h2 { font-size: 2rem; font-style: italic; font-weight: 500; }
.picks .sub { color: var(--muted); font-style: italic; margin: .25rem 0 1rem; }
.picks ol { list-style: none; counter-reset: pick; padding: 0; margin: 0; }
.picks li { counter-increment: pick; border-top: 1px solid var(--hair); }
.picks li a { display: grid; grid-template-columns: 3rem 1fr; gap: .75rem; padding: 1rem 0; text-decoration: none; }
.picks li a::before { content: counter(pick); font-family: var(--f-display); font-size: 2.6rem; line-height: .9; font-weight: 800; color: var(--spot); }
.picks b { display: block; font-family: var(--f-display); font-size: 1.35rem; color: var(--ink); line-height: 1.2; }
.picks span { display: block; font-size: 1.0625rem; margin-top: .3rem; }
.picks li a:hover b { color: var(--spot); }

.index-cloud { columns: 3 12rem; column-gap: 2.5rem; column-rule: 1px solid var(--hair); }
.index-cloud div { break-inside: avoid; padding: .35rem 0; font-size: 1.0625rem; }
.index-cloud b { font-family: var(--f-display); font-weight: 700; color: var(--ink); }
.index-cloud span { color: var(--muted); font-style: italic; }
.index-letter { font-family: var(--f-display); font-size: 2rem; font-weight: 800; color: var(--spot); line-height: 1; padding-top: .5rem !important; }

/* ---------- full-bleed opener with image ---------- */
.bleed { position: relative; color: #f7f1e4; background: #0c0a08; overflow: hidden; }
.bleed > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.bleed .wrap { position: relative; padding-top: clamp(4rem, 10vw, 8rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.bleed h1 { color: #fbf6ea; font-size: clamp(3.5rem, 13vw, 11rem); line-height: .85; letter-spacing: -0.045em; font-weight: 800; }
.bleed h1 em { font-weight: 400; color: #ff9d7f; }
.bleed .eyebrow { color: #ffb49c; }
.bleed .standfirst { color: #efe6d3; max-width: 40rem; font-size: clamp(1.25rem, 2vw, 1.55rem); font-style: italic; line-height: 1.4; margin-top: 1.5rem; }
.bleed .scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(12 10 8 / .9) 0%, rgb(12 10 8 / .55) 60%, rgb(12 10 8 / .3) 100%); }

.notice { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; border: 1px solid var(--rule); padding: 1.25rem 1.5rem; }
.notice .label { color: var(--spot); }
.notice p { margin: 0; font-family: var(--f-display); font-size: 1.35rem; font-style: italic; color: var(--ink); line-height: 1.3; }

/* fiction section — reversed page */
.fiction { background: var(--band); color: var(--band-text); margin-top: clamp(3rem, 6vw, 5.5rem); padding: clamp(3rem, 6vw, 5rem) 0; }
.fiction h2, .fiction h3 { color: #fbf6ea; }
.fiction .dept-head { border-color: #fbf6ea; }
.fiction .dept-head p { color: var(--band-muted); }
.fiction .dept-head a { color: #ffb49c; }
.fiction .eyebrow, .fiction .kicker { color: #ffb49c; }
.fiction-title { font-size: clamp(4rem, 12vw, 10rem); font-style: italic; font-weight: 400; line-height: .85; letter-spacing: -.04em; }
.fiction-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 2.5rem; }
.fiction .story p { color: #ddd3c0; }
.fiction .story .meta { color: var(--band-muted); }
.fiction .story:hover h3 { color: #ffb49c; }
.fiction .soon { border-top: 1px solid #5a5145; padding-top: 1rem; color: var(--band-muted); }
.fiction .soon b { color: #fbf6ea; font-family: var(--f-display); font-size: 1.25rem; font-weight: 600; }
.orig { border: 1px solid #8a7a5f; padding: 1rem 1.25rem; margin-top: 2rem; font-size: 1.0625rem; color: #efe6d3; max-width: 44rem; }
.orig b { color: #ffcf7a; font-family: var(--f-label); letter-spacing: .14em; text-transform: uppercase; font-size: .875rem; display: block; }

/* ---------- about ---------- */
.profile-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem; padding-top: clamp(2rem, 5vw, 4rem); align-items: end; }
.profile-hero figure { grid-column: 1 / 6; margin: 0; }
.profile-hero .portrait { aspect-ratio: 4 / 5; background-image: url("assets/halftone-portrait.jpg"), url("https://cdn.antjanus.com/static-assets/me.jpg"); background-size: cover; background-position: center 30%; filter: grayscale(1) contrast(1.1); }
.profile-hero figcaption { font-size: .9375rem; font-style: italic; color: var(--muted); margin-top: .5rem; }
.profile-hero .ph-text { grid-column: 6 / 13; padding-bottom: 1rem; }
.profile-hero h1 { font-size: clamp(3.5rem, 10vw, 9rem); line-height: .85; letter-spacing: -.045em; font-weight: 800; margin: .5rem 0 1.5rem; }
.profile-hero h1 em { font-weight: 400; color: var(--spot); display: block; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 2rem; }
.stat-strip div { background: var(--paper); padding: 1rem 1.25rem; }
.stat-strip b { display: block; font-family: var(--f-display); font-size: 2.75rem; line-height: 1; color: var(--ink); font-weight: 700; }
.stat-strip span { font-family: var(--f-label); letter-spacing: .1em; text-transform: uppercase; font-size: .875rem; color: var(--muted); }

.career-bar { display: flex; flex-wrap: wrap; border: 1px solid var(--rule); margin: 1.5rem 0 2rem; }
.career-bar span { flex: 1 1 8rem; padding: .7rem .8rem; border-right: 1px solid var(--hair); font-family: var(--f-label); font-size: .9375rem; letter-spacing: .04em; }
.career-bar span b { display: block; font-family: var(--f-display); font-size: 1.1rem; color: var(--ink); letter-spacing: 0; }
.career-bar span:first-child { background: var(--ink); color: var(--paper); }
.career-bar span:first-child b { color: var(--paper); }
.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 3px solid var(--rule); }
.phases article { padding: 1.25rem 1.5rem 1.5rem 0; }
.phases article + article { border-left: 1px solid var(--hair); padding-left: 1.5rem; }
.phases h3 { font-size: 1.5rem; font-style: italic; font-weight: 500; margin: .25rem 0 .6rem; }
.phases p { font-size: 1.0625rem; }
.phases ul { list-style: none; padding: 0; margin: 0; font-size: 1rem; }
.phases li { padding: .45rem 0; border-top: 1px dotted var(--hair); }
.phases li b { color: var(--ink); display: block; }
details.history > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.history > summary::-webkit-details-marker { display: none; }
details.history[open] > summary .when-closed { display: none; }
details.history:not([open]) > summary .when-open { display: none; }

.principles { background: var(--band); color: var(--band-text); padding: clamp(3rem, 6vw, 5rem) 0; margin-top: clamp(3rem, 6vw, 5.5rem); }
.principles .dept-head { border-color: #fbf6ea; }
.principles h2 { color: #fbf6ea; }
.principles .dept-head a { color: #ffb49c; }
.principles ol { list-style: none; counter-reset: pr; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.principles li { counter-increment: pr; border-top: 1px solid #4a4238; padding: 1.25rem 0; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; }
.principles li::before { content: counter(pr, upper-roman); font-family: var(--f-display); font-style: italic; color: #ffb49c; font-size: 1.5rem; }
.principles li p { margin: 0; font-family: var(--f-display); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.2; color: #fbf6ea; }
.principles li:first-child { grid-column: 1 / -1; }
.principles li:first-child p { font-size: clamp(2rem, 4.5vw, 3.6rem); }

.sidebar-box { border: 2px solid var(--rule); padding: 1.5rem; background: var(--paper-2); }
.sidebar-box h3 { font-family: var(--f-label); letter-spacing: .16em; text-transform: uppercase; font-size: .9375rem; border-bottom: 1px solid var(--rule); padding-bottom: .5rem; margin-bottom: .75rem; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.spec > div { border-top: 1px solid var(--hair); padding: 1rem 0 1.25rem; }
.spec h4 { font-size: 1.35rem; font-weight: 700; }
.spec p { font-style: italic; color: var(--muted); font-size: 1.0625rem; margin: .3rem 0 .6rem; }
.spec ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }

.beyond { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem; align-items: start; }
.beyond figure { grid-column: 1 / 7; margin: 0; }
.beyond figure img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.beyond figcaption { font-size: .9375rem; font-style: italic; color: var(--muted); margin-top: .5rem; }
.beyond .items { grid-column: 7 / 13; }
.beyond .items div { border-top: 1px solid var(--hair); padding: 1rem 0; }
.beyond .items h3 { font-size: 1.5rem; font-style: italic; font-weight: 500; }
.beyond .items p { margin: .3rem 0 0; }

/* ---------- projects ---------- */
.feature-spread { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem; border-top: 3px solid var(--rule); padding-top: 1.25rem; }
.feature-spread figure { grid-column: 1 / 8; margin: 0; }
.feature-spread figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.feature-spread figcaption { font-size: .9375rem; font-style: italic; color: var(--muted); margin-top: .5rem; }
.feature-spread .fs-text { grid-column: 8 / 13; }
.feature-spread h3 { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.02em; margin: .5rem 0 1rem; }

.profile-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--rule); align-items: center; }
.profile-row .pr-img { grid-column: 1 / 6; background: var(--paper-3); aspect-ratio: 16 / 10; overflow: hidden; }
.profile-row .pr-img img { width: 100%; height: 100%; object-fit: cover; }
.profile-row .pr-text { grid-column: 6 / 13; }
.profile-row:nth-of-type(even) .pr-img { grid-column: 8 / 13; order: 2; }
.profile-row:nth-of-type(even) .pr-text { grid-column: 1 / 8; order: 1; }
.profile-row h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: .35rem 0 .6rem; }
.profile-row h3 a { text-decoration: none; }
.profile-row h3 a:hover { color: var(--spot); }
.stats-inline { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .75rem; font-family: var(--f-label); letter-spacing: .08em; text-transform: uppercase; font-size: .875rem; color: var(--muted); }
.stats-inline b { font-family: var(--f-display); letter-spacing: 0; font-size: 1.25rem; color: var(--ink); margin-right: .3rem; }

.catalogue { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 2.5rem 2rem; }
.cat-item { text-decoration: none; display: flex; flex-direction: column; }
.cat-item .plate { aspect-ratio: 4 / 3; background: #15120f; overflow: hidden; position: relative; margin-bottom: .75rem; display: grid; place-items: center; }
.cat-item .plate img { width: 100%; height: 100%; object-fit: cover; }
.cat-item .plate .no { position: absolute; left: .6rem; top: .5rem; font-family: var(--f-display); font-style: italic; font-size: 1.1rem; color: #fbf6ea; background: rgb(12 10 8 / .7); padding: .1rem .5rem; }
.cat-item .plate .ph { font-family: var(--f-display); font-size: 3rem; font-style: italic; color: #b8ab93; text-align: center; padding: 1rem; line-height: 1; }
.cat-item h3 { font-size: 1.4rem; margin: .25rem 0 .4rem; }
.cat-item:hover h3 { color: var(--spot); }
.cat-item p { font-size: 1.0625rem; margin: 0 0 .5rem; }
.cat-item .tech { font-family: var(--f-label); letter-spacing: .08em; text-transform: uppercase; font-size: .875rem; color: var(--muted); margin-top: auto; }

.jump { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 .25rem; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: .25rem .85rem; font-family: var(--f-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .9375rem; text-decoration: none; }
.jump a:hover { color: var(--spot); }
.jump .label { margin-right: .5rem; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- patterns ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); }
.three-ways > div { padding: 1.5rem 1.5rem 1.5rem 0; }
.three-ways > div + div { border-left: 1px solid var(--hair); padding-left: 1.5rem; }
.three-ways h3 { font-size: 1.75rem; font-style: italic; font-weight: 500; }
.three-ways h3 span { font-family: var(--f-display); font-style: normal; font-weight: 800; color: var(--spot); margin-right: .4rem; }
.three-ways p { margin: .5rem 0 0; font-size: 1.0625rem; }
.three-ways-foot { font-family: var(--f-display); font-style: italic; font-size: 1.3rem; line-height: 1.45; color: var(--ink); margin: 1.5rem 0 0; max-width: 60rem; }

.pattern-tools { display: grid; grid-template-columns: 1fr auto; gap: 1rem 1.5rem; align-items: end; margin-bottom: 1.5rem; }
.search-field { width: 100%; min-height: 52px; padding: .7rem 1rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-family: var(--f-text); font-size: 1.125rem; }
.search-field::placeholder { color: var(--muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; grid-column: 1 / -1; }
.pill { min-height: 40px; padding: .3rem 1rem; border: 1px solid var(--ink); background: transparent; cursor: pointer; font-family: var(--f-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .875rem; }
.pill:hover { background: var(--paper-2); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.sortbox { display: flex; align-items: center; gap: .6rem; }
.sortbox select { min-height: 44px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-family: var(--f-text); font-size: 1rem; padding: .3rem .6rem; }
.result-line { display: flex; gap: 1rem; align-items: center; grid-column: 1 / -1; font-family: var(--f-label); letter-spacing: .08em; text-transform: uppercase; font-size: .9375rem; color: var(--ink); }
.result-line button { background: none; border: none; color: var(--spot); text-decoration: underline; cursor: pointer; font: inherit; min-height: 44px; }

.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--hair); }
.pcard { border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .4rem; }
.pcard[hidden] { display: none; }
.pcard .plate-no { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.pcard .plate-no .n { font-family: var(--f-display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--ink); font-variant-numeric: lining-nums; }
.pcard h2 { font-size: 1.4rem; line-height: 1.15; }
.pcard h2 a { text-decoration: none; }
.pcard h2 a::after { content: ""; }
.pcard:hover h2 a { color: var(--spot); }
.pcard p { font-size: 1.0625rem; margin: 0; }
.pcard .date { font-family: var(--f-label); letter-spacing: .06em; text-transform: uppercase; font-size: .875rem; color: var(--muted); }
.pcard .tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .5rem; }
.badge { display: inline-block; font-family: var(--f-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8125rem; padding: .15rem .5rem; border: 1px solid currentColor; }
.badge.new { background: var(--spot); border-color: var(--spot); color: var(--on-spot); }
.badge.upd { color: var(--slate); }
.empty-state { border: 1px solid var(--rule); padding: 3rem 1.5rem; text-align: center; }
.empty-state h2 { font-size: 2rem; font-style: italic; font-weight: 500; }

/* pattern detail */
.pd-head { max-width: 64rem; }
.pd-head h1 { font-size: clamp(3rem, 8vw, 6.5rem); line-height: .9; letter-spacing: -.04em; font-weight: 800; margin: .5rem 0 1.25rem; }
.back { font-family: var(--f-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .9375rem; text-decoration: none; color: var(--spot); display: inline-flex; min-height: 44px; align-items: center; }
.usecases { columns: 2 16rem; column-gap: 2.5rem; padding: 0; list-style: none; margin: .75rem 0 0; }
.usecases li { break-inside: avoid; padding: .45rem 0; border-top: 1px solid var(--hair); }
.usecases li::before { content: "▸ "; color: var(--spot); }
.panes { border: 2px solid var(--rule); margin-top: 2.5rem; }
.pane-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.pane-tabs { display: flex; flex-wrap: wrap; }
.pane-tabs button { min-height: 48px; padding: .5rem 1.1rem; border: none; border-right: 1px solid var(--hair); background: transparent; cursor: pointer; font-family: var(--f-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .9375rem; }
.pane-tabs button[aria-selected="true"] { background: var(--paper); color: var(--spot); box-shadow: inset 0 3px 0 var(--spot); }
.pane-actions { display: flex; gap: .5rem; align-items: center; padding: .3rem .5rem; }
.pane-actions .btn { min-height: 40px; padding: .3rem .9rem; font-size: .875rem; border-width: 1px; }
.pane { padding: 1.5rem; }
.pane[hidden] { display: none; }
.pane pre { font-variant-ligatures: none; margin: 0; background: var(--code-bg); color: var(--code-ink); padding: 1.25rem; overflow-x: auto; font-family: var(--f-mono); font-size: .9375rem; line-height: 1.6; }
.pane-note { font-size: 1.0625rem; font-style: italic; margin-bottom: 1rem; }
.prompt-text { max-width: 44rem; font-size: 1.125rem; }
.prompt-text p { margin-bottom: 1em; }
.plate-cap { font-family: var(--f-display); font-style: italic; color: var(--muted); margin-top: 1rem; font-size: 1rem; }

/* the live hairline stat strip (scoped) */
.hss { --ground: #eef0f3; --surface: #fff; --surface-2: #f5f7f9; --border: #d2d8e0; --ink: #161b22; --dim: #56606e; --accent: #364f6a; --ok: #1c6e52; --warn: #7e610f; --bad: #a03227; --radius: 10px;
  background: var(--ground); color: var(--ink); padding: 1.5rem; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1rem; }
:root[data-theme="dark"] .hss { --ground: #10141a; --surface: #191f27; --surface-2: #202834; --border: #2c3743; --ink: #e6ecf3; --dim: #97a4b4; --accent: #6f92bd; --ok: #4fbe93; --warn: #ddb44a; --bad: #ee8579; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hss { --ground: #10141a; --surface: #191f27; --surface-2: #202834; --border: #2c3743; --ink: #e6ecf3; --dim: #97a4b4; --accent: #6f92bd; --ok: #4fbe93; --warn: #ddb44a; --bad: #ee8579; } }
.hss-cap { color: var(--dim); margin: 0 0 .75rem; font-size: 1rem; }
.hss-cap + .hss-strip { margin-bottom: 1.75rem; }
.hss-strip { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; grid-template-columns: 1fr; }
@media (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 42rem) { .hss-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hss-strip.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .hss-strip.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hss-tile { background: var(--surface); padding: .9rem 1rem; min-width: 0; text-align: left; border: 0; color: var(--ink); font: inherit; }
button.hss-tile { cursor: pointer; }
button.hss-tile:hover { background: var(--surface-2); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); box-shadow: inset 0 -3px 0 var(--accent); }
.hss-tile .l { display: block; font-family: ui-monospace, "SF Mono", Menlo, monospace; text-transform: uppercase; letter-spacing: .06em; font-size: .8125rem; color: var(--dim); overflow-wrap: anywhere; }
.hss-tile .f { display: block; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; margin: .15rem 0; }
.hss-tile .f.none { color: var(--dim); font-weight: 400; }
.hss-tile .s { display: block; color: var(--dim); font-size: .875rem; overflow-wrap: anywhere; }
.hss-list { list-style: none; margin: .75rem 0 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hss-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-top: 1px solid var(--border); }
.hss-list li:first-child { border-top: 0; }
.hss-list li[hidden] { display: none; }
.hss-st { font-size: .875rem; font-weight: 600; white-space: nowrap; }
.hss-st[data-s="Done"] { color: var(--ok); }
.hss-st[data-s="Failed"] { color: var(--bad); }
.hss-st[data-s="Downloading"] { color: var(--accent); }
.hss-st[data-s="Queued"] { color: var(--warn); }
.hss-status { color: var(--dim); margin: .75rem 0 0; font-size: 1rem; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .art-body-grid { grid-template-columns: 14rem minmax(0, 42rem); }
  .art-aside { display: none; }
}
@media (max-width: 1000px) {
  .cover-photo, .cover-story { grid-column: 1 / -1; }
  .contents-intro, .contents-col { grid-column: 1 / -1; }
  .contents { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 6; }
  .span-lead-md { grid-column: 1 / -1; }
  .col-rule { border-left: 0; padding-left: 0; }
  .dept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dept-grid > *:nth-child(3) { border-left: 0; padding-left: 0; }
  .dept-grid > *:nth-child(n+3) { border-top: 1px solid var(--hair); }
  .classifieds { grid-template-columns: 1fr; }
  .classifieds > div + div { border-left: 0; border-top: 1px solid var(--rule); }
  .colophon-grid { grid-template-columns: 1fr 1fr; }
  .phases { grid-template-columns: 1fr 1fr; }
  .phases article:nth-child(3) { border-left: 0; padding-left: 0; }
  .phases article:nth-child(n+3) { border-top: 1px solid var(--hair); }
  .opener .o-title, .opener .o-stand { grid-column: 1 / -1; }
  .opener .o-stand { border-left: 0; padding-left: 0; border-top: 1px solid var(--hair); padding-top: 1rem; margin-top: 1.25rem; }
  .feature-spread figure, .feature-spread .fs-text { grid-column: 1 / -1; }
  .profile-hero figure { grid-column: 1 / 6; }
  .profile-hero .ph-text { grid-column: 6 / 13; }
  .fiction-grid { grid-template-columns: 1fr 1fr; }
  .art-body-grid { grid-template-columns: minmax(0, 42rem); }
  .art-toc { position: static; }
  .art-toc .toc-mobile summary { display: flex; justify-content: space-between; align-items: center; min-height: 48px; cursor: pointer; font-family: var(--f-label); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .9375rem; border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); list-style: none; }
  .art-toc .toc-mobile summary::-webkit-details-marker { display: none; }
  .art-toc .toc-mobile summary::after { content: "+"; font-family: var(--f-display); font-size: 1.5rem; color: var(--spot); }
  .art-toc .toc-mobile[open] summary::after { content: "–"; }
  .art-toc .toc-mobile h2 { display: none; }
  .art-toc .toc-extra { display: none; }
}
@media (max-width: 720px) {
  .cover, .spread, .opener-grid, .feature-spread, .profile-row, .profile-hero, .beyond { grid-template-columns: minmax(0, 1fr); }
  .nameplate-row { grid-template-columns: 1fr; gap: .25rem; }
  .motto { text-align: left; }
  .dateline .dl-items span:nth-child(n+2) { display: none; }
  .theme-toggle { white-space: nowrap; }
  .sections ul { display: grid; grid-template-columns: repeat(3, 1fr); }
  .sections a { padding: .7rem .25rem; text-align: center; font-size: .875rem; letter-spacing: .1em; }
  .sections .num { display: none; }
  .dept-head { grid-template-columns: 1fr; gap: .35rem; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: 1 / -1; }
  .contents-col { grid-template-columns: 1fr; }
  .dept-grid { grid-template-columns: 1fr; }
  .dept-grid > * + * { border-left: 0; padding-left: 0; border-top: 1px solid var(--hair); }
  .colophon-grid { grid-template-columns: 1fr; }
  .phases { grid-template-columns: 1fr; }
  .phases article + article { border-left: 0; padding-left: 0; border-top: 1px solid var(--hair); }
  .picks { grid-template-columns: 1fr; }
  .picks > section + section { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); margin-top: 1.5rem; }
  .picks > section { padding-right: 0; }
  .rowlist a { grid-template-columns: 1fr; gap: .25rem; }
  .profile-hero figure, .profile-hero .ph-text { grid-column: 1 / -1; }
  .profile-row .pr-img, .profile-row .pr-text, .profile-row:nth-of-type(even) .pr-img, .profile-row:nth-of-type(even) .pr-text { grid-column: 1 / -1; order: 0; }
  .beyond figure, .beyond .items { grid-column: 1 / -1; }
  .principles ol { grid-template-columns: 1fr; }
  .spec { grid-template-columns: 1fr; }
  .fiction-grid { grid-template-columns: 1fr; }
  .three-ways { grid-template-columns: 1fr; }
  .three-ways > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--hair); }
  .pattern-tools { grid-template-columns: 1fr; }
  .subscribe { grid-template-columns: 1fr; padding: 1.5rem; }
  .notice { grid-template-columns: 1fr; gap: .75rem; }
  .stat-strip b { font-size: 2rem; }
  .by-numbers b { font-size: 1.8rem; }
  .code { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .cover-lines { justify-content: flex-start; padding: 3rem 1rem 1rem; gap: 1rem; }
  .cover-lines b { font-size: 1.5rem; }
  .art-hero img { aspect-ratio: auto; }
  .jump ul { flex-wrap: nowrap; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .masthead nav, .theme-toggle, .progress, .share, .subscribe { display: none; }
}

/* buttons placed inside prose keep their own colors */
.prose .btn { text-decoration: none; }
.prose .btn-primary { color: var(--paper); }
.prose .btn-primary:hover { color: var(--on-spot); }
.prose .btn-ghost { color: var(--ink); }
.prose .btn-ghost:hover { color: var(--paper); }
[hidden] { display: none !important; }

/* UI pattern library article */
.prose .art-fig { margin: 2em 0; }
.prose .art-fig img { width: 100%; height: auto; border-top: 3px solid var(--rule); }
.prose .callout-ask p + p { margin-top: .7em; }
.prose .live-pattern a.btn { text-decoration: none; white-space: normal; }
.prose .live-pattern a.btn-primary { color: var(--paper); }
.prose .live-pattern a.btn-primary:hover { color: var(--on-spot); }
