/* AntJanus — DIY Zine. Photocopied, cut, taped, stapled. */

:root {
  /* primitives */
  --p-paper: #f3f0e8;
  --p-paper-cut: #fbfaf6;
  --p-toner: #141414;
  --p-toner-2: #34322e;
  --p-toner-3: #57534b;
  --p-stamp: #364f6a;
  --p-hilite: #ffe45c;
  --p-goldenrod: #f3d27a;
  --p-pink: #f4c3cf;

  /* semantic */
  --paper: var(--p-paper);
  --paper-cut: var(--p-paper-cut);
  --ink: var(--p-toner);
  --ink-2: var(--p-toner-2);
  --muted: var(--p-toner-3);
  --spot: var(--p-stamp);
  --hilite: var(--p-hilite);
  --on-hilite: #141414;
  --insert: var(--p-goldenrod);
  --insert-ink: #1d1a12;
  --insert-muted: #4a4332;
  --pink: var(--p-pink);
  --label-bg: #151515;
  --label-ink: #f7f5ef;
  --printout-bg: #1b1b1a;
  --printout-ink: #ecebe6;
  --printout-dim: #a9a79f;
  --printout-str: #ffe27a;
  --printout-kw: #9cc4ee;
  --rule: #1414142e;
  --shadow: 3px 4px 0 rgba(20, 20, 20, 0.16);
  --shadow-lift: 6px 8px 0 rgba(20, 20, 20, 0.2);
  --tape: rgba(226, 214, 170, 0.78);
  --tape-edge: rgba(160, 145, 100, 0.25);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  3 0 0 0 -1.62'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain-opacity: 0.55;
  --streak: rgba(20, 20, 20, 0.035);

  --font-type: "Courier Prime", "Courier New", Courier, monospace;
  --font-hand: "Permanent Marker", "Marker Felt", "Comic Sans MS", cursive;
  --font-cut: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-clip: "Playfair Display", Georgia, "Times New Roman", serif;

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161513;
    --paper-cut: #211f1c;
    --ink: #ece7da;
    --ink-2: #d3cdbf;
    --muted: #aaa396;
    --spot: #93b3d8;
    --hilite: #f1d541;
    --insert: #2d2612;
    --insert-ink: #f3e7c4;
    --insert-muted: #d2c49c;
    --pink: #3a2229;
    --label-bg: #2c4a6e;
    --label-ink: #f7f5ef;
    --printout-bg: #0b0b0a;
    --rule: #ece7da33;
    --shadow: 3px 4px 0 rgba(0, 0, 0, 0.55);
    --shadow-lift: 6px 8px 0 rgba(0, 0, 0, 0.6);
    --tape: rgba(240, 228, 190, 0.22);
    --tape-edge: rgba(240, 228, 190, 0.1);
    --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  3 0 0 0 -1.62'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    --grain-opacity: 0.3;
    --streak: rgba(236, 231, 218, 0.03);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161513;
  --paper-cut: #211f1c;
  --ink: #ece7da;
  --ink-2: #d3cdbf;
  --muted: #aaa396;
  --spot: #93b3d8;
  --hilite: #f1d541;
  --insert: #2d2612;
  --insert-ink: #f3e7c4;
  --insert-muted: #d2c49c;
  --pink: #3a2229;
  --label-bg: #2c4a6e;
  --label-ink: #f7f5ef;
  --printout-bg: #0b0b0a;
  --rule: #ece7da33;
  --shadow: 3px 4px 0 rgba(0, 0, 0, 0.55);
  --shadow-lift: 6px 8px 0 rgba(0, 0, 0, 0.6);
  --tape: rgba(240, 228, 190, 0.22);
  --tape-edge: rgba(240, 228, 190, 0.1);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  3 0 0 0 -1.62'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain-opacity: 0.3;
  --streak: rgba(236, 231, 218, 0.03);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background-color: var(--paper);
  background-image:
    url("assets/xerox-paper-scan.jpg"),
    repeating-linear-gradient(90deg, transparent 0 311px, var(--streak) 311px 313px, transparent 313px 587px, var(--streak) 587px 588px);
  background-size: 1200px auto, auto;
  background-blend-mode: multiply, normal;
  color: var(--ink);
  font-family: var(--font-type);
  font-size: 1.125rem;
  line-height: 1.65;
}
:root[data-theme="dark"] body { background-image: repeating-linear-gradient(90deg, transparent 0 311px, var(--streak) 311px 313px, transparent 313px 587px, var(--streak) 587px 588px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background-image: repeating-linear-gradient(90deg, transparent 0 311px, var(--streak) 311px 313px, transparent 313px 587px, var(--streak) 587px 588px); } }

/* toner specks over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
  z-index: 100;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-style: wavy; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 400; }
button, input, select { font: inherit; color: inherit; }
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--hilite);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 200; background: var(--hilite); color: var(--on-hilite); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- reusable zine devices ---------- */
.hl {
  background: linear-gradient(100deg, transparent 0 2%, var(--hilite) 3% 96%, transparent 98%) 0 58% / 100% 72% no-repeat;
  color: var(--on-hilite);
  padding: 0 .12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hand { font-family: var(--font-hand); letter-spacing: .01em; }
.cut { font-family: var(--font-cut); text-transform: uppercase; letter-spacing: .01em; }
.clipface { font-family: var(--font-clip); font-weight: 900; }
.typed-label {
  font-family: var(--font-type);
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }

/* ransom-note letters */
.ransom { display: inline-flex; flex-wrap: wrap; gap: .06em; align-items: center; line-height: 1; }
.ransom .gap { width: .35em; }
.rn {
  display: inline-block;
  padding: .06em .14em .02em;
  box-shadow: 1px 2px 0 rgba(0, 0, 0, .18);
}
.rn1 { font-family: var(--font-cut); background: #141414; color: #f6f3ea; transform: rotate(-3deg); }
.rn2 { font-family: var(--font-clip); font-weight: 900; font-style: italic; background: #fbfaf6; color: #141414; transform: rotate(2deg) translateY(.04em); }
.rn3 { font-family: var(--font-type); font-weight: 700; background: #ffe45c; color: #141414; transform: rotate(-1deg); }
.rn4 { font-family: var(--font-clip); font-weight: 900; background: #364f6a; color: #fff; transform: rotate(4deg) translateY(-.05em); }
.rn5 { font-family: var(--font-cut); background: #f4c3cf; color: #141414; transform: rotate(-2deg) translateY(.06em); }
.rn6 { font-family: var(--font-hand); background: #e9e4d6; color: #141414; transform: rotate(1.5deg); }

/* masking tape */
.taped { position: relative; }
.taped::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 104px;
  height: 26px;
  margin-left: -52px;
  background: var(--tape);
  border-left: 1px dashed var(--tape-edge);
  border-right: 1px dashed var(--tape-edge);
  transform: rotate(-4deg);
  z-index: 2;
  pointer-events: none;
}
.taped.tape-l::before { left: 12%; transform: rotate(-9deg); }
.taped.tape-r::before { left: 84%; transform: rotate(7deg); }
.taped.tape-corners::before { left: -14px; top: 6px; margin: 0; width: 80px; transform: rotate(-38deg); }
.taped.tape-corners::after {
  content: ""; position: absolute; right: -14px; bottom: 6px; width: 80px; height: 26px;
  background: var(--tape); transform: rotate(-38deg); z-index: 2; pointer-events: none;
}

/* staple */
.stapled { position: relative; }
.stapled::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 22px;
  width: 30px;
  height: 5px;
  border: 2px solid #8b8b86;
  border-bottom-width: 0;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(#cfcfc9, #9a9a94);
  transform: rotate(-6deg);
}

.torn-b { clip-path: polygon(0 0, 100% 0, 100.0% calc(100% - 0.7px), 96.4% calc(100% - 4.9px), 92.9% calc(100% - 4.6px), 89.3% calc(100% - 6.6px), 85.7% calc(100% - 1.9px), 82.1% calc(100% - 1.8px), 78.6% calc(100% - 5.1px), 75.0% calc(100% - 4.6px), 71.4% calc(100% - 2.1px), 67.9% calc(100% - 4.8px), 64.3% calc(100% - 2.8px), 60.7% calc(100% - 5.4px), 57.1% calc(100% - 0.8px), 53.6% calc(100% - 1.6px), 50.0% calc(100% - 6.3px), 46.4% calc(100% - 2.5px), 42.9% calc(100% - 1.8px), 39.3% calc(100% - 5.6px), 35.7% calc(100% - 4.4px), 32.1% calc(100% - 1.0px), 28.6% calc(100% - 3.9px), 25.0% calc(100% - 4.6px), 21.4% calc(100% - 1.2px), 17.9% calc(100% - 4.6px), 14.3% calc(100% - 0.9px), 10.7% calc(100% - 2.4px), 7.1% calc(100% - 0.6px), 3.6% calc(100% - 1.4px), 0.0% calc(100% - 6.8px)); }
.torn { clip-path: polygon(0.0% 2.0px, 4.5% 5.0px, 9.1% 2.2px, 13.6% 3.0px, 18.2% 4.4px, 22.7% 3.4px, 27.3% 0.6px, 31.8% 2.9px, 36.4% 3.2px, 40.9% 0.9px, 45.5% 0.5px, 50.0% 4.4px, 54.5% 2.6px, 59.1% 1.0px, 63.6% 2.3px, 68.2% 1.1px, 72.7% 4.0px, 77.3% 2.5px, 81.8% 0.5px, 86.4% 4.1px, 90.9% 0.4px, 95.5% 1.4px, 100.0% 0.1px, 100.0% calc(100% - 3.7px), 95.5% calc(100% - 0.6px), 90.9% calc(100% - 2.6px), 86.4% calc(100% - 0.5px), 81.8% calc(100% - 2.4px), 77.3% calc(100% - 3.4px), 72.7% calc(100% - 2.7px), 68.2% calc(100% - 2.3px), 63.6% calc(100% - 2.4px), 59.1% calc(100% - 2.2px), 54.5% calc(100% - 3.0px), 50.0% calc(100% - 0.5px), 45.5% calc(100% - 2.4px), 40.9% calc(100% - 1.2px), 36.4% calc(100% - 4.3px), 31.8% calc(100% - 4.7px), 27.3% calc(100% - 0.3px), 22.7% calc(100% - 0.7px), 18.2% calc(100% - 3.5px), 13.6% calc(100% - 2.9px), 9.1% calc(100% - 0.1px), 4.5% calc(100% - 3.5px), 0.0% calc(100% - 4.7px)); }

/* xeroxed photo: grayscale, crushed contrast, halftone dots */
.xerox {
  position: relative;
  margin: 0;
  background: #d9d6ce;
  overflow: hidden;
}
.xerox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.75) brightness(1.08);
}
.xerox::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 0, 0, .32) 0.9px, transparent 1.35px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
  pointer-events: none;
}
:root[data-theme="dark"] .xerox img { filter: grayscale(1) contrast(1.6) brightness(.86); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .xerox img { filter: grayscale(1) contrast(1.6) brightness(.86); } }
.xerox figcaption, .caption {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--ink);
}

/* rubber stamp */
.stamp {
  display: inline-grid;
  place-items: center;
  text-align: center;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  border: 4px double var(--spot);
  color: var(--spot);
  padding: .8rem;
  transform: rotate(-9deg);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -4 0 0 0 3.1'/></filter><rect width='100%' height='100%' filter='url(%23w)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -4 0 0 0 3.1'/></filter><rect width='100%' height='100%' filter='url(%23w)'/></svg>");
}
.stamp strong { display: block; font-family: var(--font-cut); font-size: 2.6rem; line-height: 1; font-weight: 400; }
.stamp span { display: block; font-family: var(--font-type); font-weight: 700; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.25; }
.stamp:nth-child(2) { transform: rotate(6deg); }
.stamp:nth-child(3) { transform: rotate(-3deg); }
.stamps { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }

/* dymo label tape */
.dymo {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  min-height: 44px;
  padding: .45em .9em .4em;
  background: var(--label-bg);
  color: var(--label-ink);
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .22), 0 -1px 0 rgba(0, 0, 0, .5);
  border-radius: 3px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}
.dymo:hover { text-decoration: none; transform: rotate(-2deg) translateY(-2px); }
.dymo[aria-current="page"], .dymo[aria-pressed="true"] {
  background: var(--hilite);
  color: var(--on-hilite);
  text-shadow: none;
  outline: 2px solid var(--on-hilite);
  outline-offset: -5px;
}
.dymo[aria-current="page"]::before, .dymo[aria-pressed="true"]::before { content: "\25B6"; font-size: .7em; }
.dymo.sm { min-height: 36px; font-size: .875rem; padding: .3em .7em; letter-spacing: .1em; }
a.dymo.sm { min-height: 44px; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  min-height: 48px;
  padding: .7em 1.3em;
  font-family: var(--font-cut);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--hilite); transform: rotate(-1.5deg); }
.btn-ink:hover { text-decoration: none; transform: rotate(0) translate(-2px, -2px); box-shadow: 6px 6px 0 var(--hilite); }
.btn-ink:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--hilite); }
.btn-scrawl {
  font-family: var(--font-hand);
  text-transform: none;
  font-size: 1.3rem;
  padding: .6em .4em;
  color: var(--ink);
  background: none;
  text-decoration: underline wavy var(--spot) 2px;
  text-underline-offset: 7px;
}
.btn-quiet { font-family: var(--font-type); font-weight: 700; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--muted); padding: .6em .2em; background: none; text-decoration: underline dotted 2px; text-underline-offset: 5px; }
.btn-quiet:hover { color: var(--ink); }

/* hand-lettered section header on a torn strip */
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1.5rem; margin: 0 0 2rem; }
.sec-head h2 {
  font-family: var(--font-hand);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  display: inline-block;
  background: var(--paper-cut);
  padding: .25em .5em .35em;
  transform: rotate(-1.5deg);
  box-shadow: var(--shadow);
}
.sec-head .sub { display: block; margin-top: .6rem; color: var(--muted); font-size: 1.125rem; }
.sec-head .more { font-family: var(--font-hand); font-size: 1.25rem; text-decoration: underline wavy var(--spot) 2px; text-underline-offset: 6px; min-height: 44px; display: inline-flex; align-items: center; }
.page-no { font-family: var(--font-type); font-weight: 700; font-size: .875rem; letter-spacing: .12em; color: var(--muted); }

section.block { padding: clamp(3rem, 7vw, 5.5rem) 0; }
section.block + section.block { border-top: 2px dashed var(--rule); }

/* ---------- masthead ---------- */
.masthead { padding: 1.25rem 0 0; border-bottom: 3px solid var(--ink); position: relative; }
.masthead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; border-bottom: 1px solid var(--ink); }
.mast-top { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem 1.5rem; align-items: center; }
.logo { display: inline-block; width: 64px; height: 64px; color: var(--spot); transform: rotate(-8deg); }
.logo svg { width: 100%; height: 100%; }
.mast-title a { text-decoration: none; display: inline-block; }
.mast-title .ransom { font-size: clamp(1.8rem, 5vw, 3.2rem); }
.issue { margin: .45rem 0 0; font-weight: 700; font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mast-tools { display: flex; align-items: center; gap: .6rem; }
.search { display: flex; align-items: stretch; border: 2px solid var(--ink); background: var(--paper-cut); }
.search input { border: 0; background: transparent; padding: .5em .7em; width: 11rem; min-height: 44px; font-size: 1rem; }
.search input::placeholder { color: var(--muted); }
.search button { border: 0; border-left: 2px solid var(--ink); background: var(--ink); color: var(--paper); padding: 0 .9em; font-weight: 700; cursor: pointer; font-size: 1rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-width: 44px; min-height: 44px; padding: 0 .7em;
  border: 2px solid var(--ink); background: var(--paper-cut); cursor: pointer;
  font-weight: 700; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase;
}
.icon-btn:hover { background: var(--hilite); color: var(--on-hilite); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }
.dymo-nav { padding-top: 1rem; padding-bottom: 1.1rem; }
.dymo-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem .7rem; }
.dymo-nav li:nth-child(odd) .dymo { transform: rotate(-1.2deg); }
.dymo-nav li:nth-child(even) .dymo { transform: rotate(1deg); }
.dymo-nav li:nth-child(odd) .dymo:hover, .dymo-nav li:nth-child(even) .dymo:hover { transform: rotate(0) translateY(-2px); }
.dymo-nav .dymo.ai { background: var(--spot); color: #fff; }
:root[data-theme="dark"] .dymo-nav .dymo.ai { color: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dymo-nav .dymo.ai { color: #111; } }
.dymo-nav .dymo.ai[aria-current="page"] { background: var(--hilite); color: var(--on-hilite); }
.nav-search { display: none; }

@media (max-width: 860px) {
  .mast-top { grid-template-columns: auto 1fr auto; }
  .mast-tools .search, .theme-label { display: none; }
  .menu-btn { display: inline-flex; }
  .logo { width: 48px; height: 48px; }
  .js .dymo-nav { display: none; }
  .js .dymo-nav.open { display: block; }
  .nav-search { display: flex; margin-top: 1rem; }
  .nav-search input { flex: 1; width: auto; }
}
@media (max-width: 420px) {
  .issue { font-size: .8125rem; letter-spacing: .06em; }
}

/* reading progress: a highlighter stroke across the top */
.progress { position: fixed; top: 0; left: 0; height: 7px; width: 0; background: var(--hilite); z-index: 150; box-shadow: 0 1px 0 var(--ink); }

/* ---------- cards: newspaper clippings ---------- */
.clip {
  position: relative;
  background: var(--paper-cut);
  box-shadow: var(--shadow);
  padding: 1rem 1rem 1.25rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.clip-grid { display: grid; align-items: start; gap: 2.5rem 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.clip-grid > :nth-child(3n+1) { transform: rotate(-1deg); }
.clip-grid > :nth-child(3n+2) { transform: rotate(.8deg) translateY(10px); }
.clip-grid > :nth-child(3n) { transform: rotate(-.4deg); }
.clip-grid > .clip:hover, .clip-grid > .clip:focus-within { transform: rotate(0) translateY(-4px); box-shadow: var(--shadow-lift); z-index: 3; }
.clip .xerox { aspect-ratio: 16 / 9; margin-bottom: 1rem; }
.clip .kicker { display: flex; flex-wrap: wrap; gap: .25rem .8rem; font-weight: 700; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.clip .kicker .coll { color: var(--spot); }
.clip h3 { font-family: var(--font-clip); font-weight: 900; font-size: 1.5rem; line-height: 1.15; margin-bottom: .6rem; }
.clip h3 a { text-decoration: none; }
.clip h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.clip h3 a:hover { text-decoration: underline; }
.clip p { font-size: 1.0625rem; line-height: 1.55; margin: 0; color: var(--ink-2); }
.clip .readmore { display: inline-block; margin-top: .8rem; font-family: var(--font-hand); font-size: 1.05rem; color: var(--spot); }

/* typed archive rows */
.typed-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.typed-list li { border-bottom: 1px dashed var(--rule); }
.typed-list a {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: .25rem 1.5rem;
  padding: 1.1rem .25rem;
  text-decoration: none;
  transition: background .15s ease;
}
.typed-list a:hover { background: color-mix(in srgb, var(--hilite) 35%, transparent); }
.typed-list time { font-weight: 700; font-size: .9375rem; letter-spacing: .06em; color: var(--muted); padding-top: .2rem; }
.typed-list .t { font-family: var(--font-clip); font-weight: 900; font-size: 1.3rem; line-height: 1.2; }
.typed-list .d { grid-column: 2; color: var(--ink-2); font-size: 1.0625rem; }
.typed-list .coll-tag { grid-column: 2; font-weight: 700; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--spot); }
@media (max-width: 600px) {
  .typed-list a { grid-template-columns: 1fr; }
  .typed-list .d, .typed-list .coll-tag { grid-column: 1; }
}

/* ---------- home ---------- */
.cover { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.cover-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.cover-kicker { margin-bottom: 1.25rem; }
.headline { font-family: var(--font-cut); text-transform: uppercase; font-size: clamp(2.3rem, 5.4vw, 4.5rem); line-height: .98; margin: 0 0 1.75rem; }
.headline .strip { display: inline-block; white-space: nowrap; background: var(--paper-cut); padding: .04em .18em .02em; box-shadow: var(--shadow); margin: 0 0 .1em; }
.headline .strip:nth-child(1) { transform: rotate(-2deg); }
.headline .strip:nth-child(2) { transform: rotate(1deg) translateX(.35em); }
.headline .strip:nth-child(3) { transform: rotate(-.6deg); }
.headline .strip.ink { background: var(--ink); color: var(--paper); }
.headline .scrawl { font-family: var(--font-hand); text-transform: none; color: var(--spot); display: inline-block; transform: rotate(-4deg); }
.typed-slip { background: var(--paper-cut); padding: 1.1rem 1.3rem; box-shadow: var(--shadow); max-width: 36rem; font-size: 1.1875rem; transform: rotate(.6deg); margin-bottom: 2rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-bottom: 2.5rem; }
.cover-photo { transform: rotate(2.4deg); background: var(--paper-cut); padding: 14px 14px 10px; box-shadow: var(--shadow-lift); }
.cover-photo .xerox { aspect-ratio: 4 / 5; }
.cover-photo .xerox img { object-position: 25% 30%; }
.cover-photo figcaption { padding-top: .6rem; font-size: 1.15rem; }
@media (max-width: 900px) {
  .cover-grid { grid-template-columns: 1fr; }
  .cover-photo { max-width: 26rem; margin: 0 auto; }
}

.contents { display: grid; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 2rem; }
.in-issue { background: var(--paper-cut); padding: 1.5rem 1.5rem 1rem; box-shadow: var(--shadow); transform: rotate(-.6deg); }
.in-issue h2 { font-family: var(--font-cut); text-transform: uppercase; font-size: 2rem; border-bottom: 3px solid var(--ink); padding-bottom: .4rem; margin-bottom: .6rem; }
.in-issue ol { list-style: none; margin: 0; padding: 0; }
.in-issue li a { display: flex; align-items: baseline; gap: .5rem; padding: .55rem 0; text-decoration: none; min-height: 44px; }
.in-issue li a .dots { flex: 1; border-bottom: 2px dotted var(--muted); transform: translateY(-.3em); }
.in-issue li a:hover .name { background: var(--hilite); color: var(--on-hilite); }

.start-here { display: grid; gap: 2rem; }
.start-card { display: grid; grid-template-columns: 180px 1fr; gap: 1.25rem; align-items: start; }
.start-card .xerox { aspect-ratio: 1; }
.start-card .num { font-family: var(--font-cut); font-size: 2.5rem; line-height: 1; color: var(--spot); }
@media (max-width: 520px) { .start-card { grid-template-columns: 1fr; } .start-card .xerox { aspect-ratio: 16/9; } }

.sticker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 2rem; }
.sticker { position: relative; padding: 1.5rem 1.25rem 1.4rem; background: var(--paper-cut); box-shadow: var(--shadow); transition: transform .15s ease; }
.sticker:nth-child(1) { background: var(--hilite); color: var(--on-hilite); transform: rotate(-2deg); }
.sticker:nth-child(2) { transform: rotate(1.5deg); }
.sticker:nth-child(3) { background: var(--pink); transform: rotate(-1deg); }
.sticker:nth-child(4) { background: var(--insert); color: var(--insert-ink); transform: rotate(2deg); }
.sticker:hover, .sticker:focus-within { transform: rotate(0) translateY(-3px); }
.sticker .type { font-weight: 700; font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; }
.sticker h3 { font-family: var(--font-hand); font-size: 1.6rem; margin: .4rem 0 .5rem; line-height: 1.15; }
.sticker h3 a { text-decoration: none; }
.sticker h3 a::after { content: ""; position: absolute; inset: 0; }
.sticker p { font-size: 1.0625rem; margin: 0 0 .6rem; }
.sticker .tech { font-size: .9375rem; font-weight: 700; }
.sticker:nth-child(1) p, .sticker:nth-child(1) .tech { color: var(--on-hilite); }

.back-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 2.5rem; align-items: start; }
.back-row.two { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 960px) { .back-row, .back-row.two { grid-template-columns: 1fr; } }
.note-card { background: var(--paper-cut); padding: 1.5rem; box-shadow: var(--shadow); }
.note-card h3 { font-family: var(--font-cut); text-transform: uppercase; font-size: 1.7rem; margin-bottom: 1rem; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px dashed var(--rule); }
.link-list a { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; min-height: 44px; align-items: center; text-decoration: none; font-weight: 700; }
.link-list a:hover { background: color-mix(in srgb, var(--hilite) 35%, transparent); }
.link-list .meta { font-weight: 400; color: var(--muted); font-size: 1rem; }

/* flyer with tear-off tabs */
.flyer { background: var(--paper-cut); box-shadow: var(--shadow-lift); padding: 1.6rem 1.6rem 0; transform: rotate(1.2deg); border: 2px solid var(--ink); }
.flyer .flyer-kicker { font-family: var(--font-type); font-weight: 700; letter-spacing: .14em; font-size: .875rem; text-transform: uppercase; }
.flyer h3 { font-family: var(--font-cut); text-transform: uppercase; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: .95; margin: .4rem 0 .8rem; }
.flyer p { font-size: 1.125rem; }
.tabs-tear { display: flex; margin: 1.2rem -1.6rem 0; border-top: 2px dashed var(--ink); }
.tabs-tear a {
  flex: 1;
  min-width: 0;
  writing-mode: vertical-rl;
  padding: .8rem .2rem;
  min-height: 9.5rem;
  border-right: 2px dashed var(--ink);
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .06em;
  text-decoration: none;
  text-align: center;
}
.tabs-tear > :last-child { border-right: 0; }
.tabs-tear .gone { flex: 1; min-width: 0; border-right: 2px dashed var(--ink); min-height: 2.2rem; align-self: flex-start; }
.tabs-tear a:hover { background: var(--hilite); color: var(--on-hilite); }

/* ---------- page heads (inner pages) ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem); }
.page-head-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: center; }
@media (max-width: 860px) { .page-head-grid { grid-template-columns: 1fr; } }
.page-head h1 { font-size: clamp(2.8rem, 9vw, 6.2rem); margin: .6rem 0 1.25rem; }
.page-head .lede { font-size: clamp(1.1875rem, 2.2vw, 1.4375rem); max-width: 40rem; line-height: 1.5; }
.head-art { transform: rotate(-2.5deg); background: var(--paper-cut); padding: 12px; box-shadow: var(--shadow-lift); }
.head-art .xerox { aspect-ratio: 4 / 3; }
.head-art figcaption { padding-top: .5rem; }

.jump { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.5rem; }
.jump .typed-label { margin-right: .3rem; }

/* ---------- projects ---------- */
.centerfold { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; background: var(--paper-cut); box-shadow: var(--shadow-lift); padding: clamp(1.25rem, 3vw, 2.25rem); border: 3px solid var(--ink); position: relative; }
.centerfold::before { content: ""; position: absolute; top: 0; bottom: 0; left: 55%; border-left: 2px dashed var(--rule); }
@media (max-width: 900px) { .centerfold { grid-template-columns: 1fr; } .centerfold::before { display: none; } }
.centerfold h3 { font-family: var(--font-cut); text-transform: uppercase; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: .95; margin: .4rem 0 1rem; }
.centerfold .xerox { aspect-ratio: 16/10; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.chips li { font-weight: 700; font-size: .875rem; letter-spacing: .06em; border: 2px solid currentColor; padding: .15em .55em; }

.os-list { display: grid; gap: 3rem; }
.os-item { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.os-item:nth-child(even) .os-art { order: 2; }
.os-item:nth-child(odd) .os-art { transform: rotate(-1.5deg); }
.os-item:nth-child(even) .os-art { transform: rotate(1.5deg); }
.os-art { background: var(--paper-cut); padding: 10px; box-shadow: var(--shadow); }
.os-art .xerox { aspect-ratio: 16/10; }
.os-item h3 { font-family: var(--font-clip); font-weight: 900; font-size: 2rem; margin-bottom: .5rem; }
.os-item .gh { font-family: var(--font-hand); font-size: 1.15rem; display: inline-flex; min-height: 44px; align-items: center; }
.os-stats { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: .8rem; }
.os-stats div { border-left: 3px solid var(--spot); padding-left: .6rem; }
.os-stats b { display: block; font-family: var(--font-cut); font-size: 1.6rem; font-weight: 400; line-height: 1; }
.os-stats span { font-size: .875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .os-item { grid-template-columns: 1fr; } .os-item:nth-child(even) .os-art { order: 0; } }

.term-art { aspect-ratio: 16/10; background: #121212; color: #e8e6df; display: grid; place-items: center; font-family: var(--font-type); position: relative; overflow: hidden; }
.term-art pre { margin: 0; font-size: 1rem; line-height: 1.4; color: #e8e6df; }
.term-art::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 3px); }
.term-art .badge { position: absolute; top: 10px; right: 10px; background: #ffe45c; color: #141414; font-weight: 700; font-size: .8125rem; letter-spacing: .1em; padding: .1em .5em; text-transform: uppercase; }

.contact-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 2rem 1.5rem; }
.frame { background: var(--paper-cut); padding: 10px 10px 1rem; box-shadow: var(--shadow); position: relative; }
.frame:nth-child(4n+1) { transform: rotate(-1.2deg); }
.frame:nth-child(4n+2) { transform: rotate(.9deg); }
.frame:nth-child(4n+3) { transform: rotate(-.3deg); }
.frame:nth-child(4n) { transform: rotate(1.6deg); }
.frame .xerox, .frame .term-art { aspect-ratio: 4/3; }
.frame .frame-no { position: absolute; top: 16px; left: 16px; z-index: 2; background: var(--ink); color: var(--paper); font-weight: 700; font-size: .875rem; padding: .05em .45em; }
.frame h3 { font-family: var(--font-hand); font-size: 1.45rem; margin: .8rem .3rem .3rem; }
.frame h3 a { text-decoration: none; }
.frame h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.frame p { margin: 0 .3rem .5rem; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.frame .tech { margin: 0 .3rem; font-weight: 700; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--spot); }

.compact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.index-card {
  position: relative;
  background:
    linear-gradient(var(--paper-cut), var(--paper-cut)) padding-box;
  background-image: repeating-linear-gradient(transparent 0 31px, color-mix(in srgb, var(--spot) 30%, transparent) 31px 32px);
  background-color: var(--paper-cut);
  border-top: 3px solid #c0392b;
  padding: 1rem 1.2rem 1.2rem;
  box-shadow: var(--shadow);
  line-height: 32px;
}
.index-card h3 { font-family: var(--font-hand); font-size: 1.4rem; line-height: 32px; }
.index-card h3 a { text-decoration: none; }
.index-card h3 a::after { content: ""; position: absolute; inset: 0; }
.index-card p { margin: 0; font-size: 1.0625rem; line-height: 32px; }
.index-card .stars { position: absolute; top: .6rem; right: .8rem; font-family: var(--font-cut); font-size: 1.25rem; color: var(--spot); }

/* ---------- AI / stories ---------- */
.consult-strip { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; background: var(--ink); color: var(--paper); padding: 1.5rem clamp(1.25rem, 3vw, 2rem); transform: rotate(-.7deg); box-shadow: 5px 5px 0 var(--hilite); }
.consult-strip p { margin: 0; font-size: 1.25rem; font-weight: 700; }
.consult-strip .btn-ink { background: var(--hilite); color: var(--on-hilite); box-shadow: 4px 4px 0 var(--paper); }
@media (max-width: 640px) { .consult-strip { grid-template-columns: 1fr; } }

.insert {
  background: var(--insert);
  color: var(--insert-ink);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  box-shadow: var(--shadow-lift);
  transform: rotate(.4deg);
  position: relative;
}
.insert .muted, .insert .sub { color: var(--insert-muted); }
.insert-label { position: absolute; top: -16px; right: 24px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: .875rem; letter-spacing: .14em; text-transform: uppercase; padding: .2em .7em; transform: rotate(3deg); }
.insert h2 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin-bottom: .8rem; }
.insert .intro { font-size: 1.25rem; max-width: 42rem; }
.original { border: 2px dashed currentColor; padding: .8rem 1rem; margin: 1.5rem 0 2rem; max-width: 44rem; font-size: 1.0625rem; }
.story-row { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.story { position: relative; background: #fffdf5; color: #1d1a12; padding: .9rem .9rem 1.2rem; box-shadow: 3px 4px 0 rgba(0,0,0,.25); }
.story:nth-child(1) { transform: rotate(-1.5deg); }
.story:nth-child(2) { transform: rotate(1deg); }
.story:nth-child(3) { transform: rotate(-.5deg); }
.story .xerox { aspect-ratio: 3/2; margin-bottom: .8rem; }
.story .part { font-family: var(--font-cut); font-size: 1.1rem; letter-spacing: .06em; color: #7a2f10; text-transform: uppercase; }
.story h3 { font-family: var(--font-clip); font-weight: 900; font-size: 1.45rem; line-height: 1.15; margin: .2rem 0 .5rem; }
.story h3 a { text-decoration: none; }
.story h3 a::after { content: ""; position: absolute; inset: 0; }
.story p { font-size: 1rem; line-height: 1.55; margin: 0 0 .6rem; color: #2e2a20; }
.story .readmore { font-family: var(--font-hand); color: #7a2f10; }
.coming { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.coming div { border: 2px dashed currentColor; padding: .8rem 1rem; flex: 1 1 280px; }
.coming b { font-family: var(--font-cut); font-weight: 400; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .05em; }
:root[data-theme="dark"] .story { background: #f3ecd8; }

/* ---------- about ---------- */
.about-hero { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
@media (max-width: 860px) { .about-hero { grid-template-columns: 1fr; } }
.polaroid { background: #fbfaf6; padding: 14px 14px 1rem; box-shadow: var(--shadow-lift); transform: rotate(-3deg); position: relative; max-width: 28rem; }
.polaroid .xerox { aspect-ratio: 1; }
.polaroid figcaption { text-align: center; color: #141414; font-size: 1.3rem; padding-top: .7rem; line-height: 1.3; }
.about-hero h1 { font-family: var(--font-hand); font-size: clamp(3rem, 8vw, 5.4rem); line-height: 1; margin-bottom: 1rem; }
.about-hero .tag { font-size: 1.3125rem; line-height: 1.5; }
.summary-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .summary-grid { grid-template-columns: 1fr; } }
.typed-sheet { background: var(--paper-cut); padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow); font-size: 1.1875rem; }

.career-tape { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2.5rem; padding: 0; list-style: none; }
.career-tape li { background: var(--label-bg); color: var(--label-ink); padding: .35em .75em; font-weight: 700; font-size: .9375rem; letter-spacing: .06em; box-shadow: 2px 2px 0 rgba(0,0,0,.25); }
.career-tape li:nth-child(odd) { transform: rotate(-1deg); }
.career-tape li:nth-child(even) { transform: rotate(1.2deg); }
.career-tape li span { opacity: .85; font-weight: 400; }
.career-tape li:first-child { background: var(--hilite); color: var(--on-hilite); }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--ink); }
.timeline > li { position: relative; padding: 0 0 2.5rem 2rem; }
.timeline > li::before { content: ""; position: absolute; left: -12px; top: .35rem; width: 20px; height: 20px; background: var(--paper); border: 3px solid var(--ink); transform: rotate(45deg); }
.timeline > li:first-child::before { background: var(--hilite); }
.timeline .period { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .9375rem; color: var(--spot); }
.timeline h3 { font-family: var(--font-cut); text-transform: uppercase; font-size: 2rem; margin: .2rem 0 .5rem; }
.timeline .roles { list-style: none; padding: 0; margin: .8rem 0 0; }
.timeline .roles li { padding: .35rem 0 .35rem 1.4rem; position: relative; }
.timeline .roles li::before { content: "\2192"; position: absolute; left: 0; color: var(--spot); }
.timeline .bullets { margin: .6rem 0 0; padding-left: 1.4rem; color: var(--ink-2); }
.timeline .bullets li { margin-bottom: .4rem; }

.ransom-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 2rem 1.75rem; list-style: none; margin: 0; padding: 0; counter-reset: q; }
.ransom-quotes li { background: var(--paper-cut); padding: 1.3rem 1.3rem 1.3rem 3.6rem; box-shadow: var(--shadow); font-family: var(--font-clip); font-style: italic; font-weight: 900; font-size: 1.45rem; line-height: 1.3; position: relative; counter-increment: q; }
.ransom-quotes li::before { content: counter(q); position: absolute; left: 1rem; top: 1rem; font-family: var(--font-cut); font-style: normal; font-weight: 400; font-size: 2rem; color: var(--spot); line-height: 1; }
.ransom-quotes li:nth-child(odd) { transform: rotate(-1deg); }
.ransom-quotes li:nth-child(even) { transform: rotate(1deg); }
.ransom-quotes li:nth-child(3) { background: var(--hilite); color: var(--on-hilite); }
.ransom-quotes li:nth-child(3)::before { color: var(--on-hilite); }

.beyond { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .beyond { grid-template-columns: 1fr; } }
.beyond-list { display: grid; gap: 1.25rem; }
.beyond-list div { border-left: 4px solid var(--ink); padding: .2rem 0 .2rem 1.2rem; }
.beyond-list h3 { font-family: var(--font-hand); font-size: 1.6rem; margin-bottom: .3rem; }
.beyond-list p { margin: 0; }

.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 2rem; }
.checklist .note-card h3 { font-family: var(--font-hand); text-transform: none; font-size: 1.7rem; margin-bottom: .3rem; }
.checklist ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.checklist li { padding: .4rem 0 .4rem 2rem; position: relative; border-bottom: 1px dashed var(--rule); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .6rem; width: 18px; height: 18px; border: 2px solid var(--ink); }
.checklist li::after { content: "\2713"; position: absolute; left: 3px; top: .1rem; font-family: var(--font-hand); color: var(--spot); font-size: 1.3rem; }

/* ---------- article ---------- */
.art-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1rem; }
.crumb { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.25rem; }
.art-head h1 { font-family: var(--font-clip); font-weight: 900; font-size: clamp(2.4rem, 6.4vw, 4.8rem); line-height: 1.02; max-width: 60rem; margin-bottom: 1rem; letter-spacing: -.01em; }
.art-head .desc { font-size: clamp(1.1875rem, 2.2vw, 1.4375rem); max-width: 44rem; }
.art-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .9375rem; color: var(--muted); margin-top: 1rem; }
.art-meta a { color: var(--spot); }
.art-banner { margin: 2rem 0 0; background: var(--paper-cut); padding: 12px; box-shadow: var(--shadow-lift); transform: rotate(-.8deg); }
.art-banner .xerox { aspect-ratio: 21/8; }
.art-banner figcaption { padding-top: .5rem; }
.art-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3.5rem; padding-block: 3rem 2rem; align-items: start; }
@media (max-width: 1100px) { .art-layout { grid-template-columns: minmax(0, 1fr); } }
.toc { position: sticky; top: 1.5rem; background: var(--paper-cut); padding: 1.1rem 1.1rem 1rem; box-shadow: var(--shadow); transform: rotate(-1deg); }
.toc h2 { font-family: var(--font-cut); text-transform: uppercase; font-size: 1.3rem; border-bottom: 3px solid var(--ink); padding-bottom: .3rem; margin-bottom: .4rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: .5rem; padding: .45rem .3rem; text-decoration: none; font-size: 1rem; line-height: 1.35; min-height: 44px; align-items: center; }
.toc a::before { content: counter(t, decimal-leading-zero); font-weight: 700; color: var(--muted); font-size: .875rem; }
.toc a:hover { text-decoration: underline; }
.toc a[aria-current="true"] { background: var(--hilite); color: var(--on-hilite); font-weight: 700; }
.toc a[aria-current="true"]::before { color: var(--on-hilite); }
.toc details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.toc details summary::-webkit-details-marker { display: none; }
.toc details summary::after { content: "+"; font-family: var(--font-cut); font-size: 1.6rem; }
.toc details[open] summary::after { content: "\2212"; }
.toc details summary h2 { border: 0; margin: 0; padding: 0; }
@media (max-width: 1100px) { .toc { position: static; transform: none; max-width: 40rem; } }

.prose { max-width: 42rem; font-size: 1.1875rem; line-height: 1.7; }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 {
  font-family: var(--font-hand);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.1;
  margin-top: 2.2em;
  display: inline-block;
  background: var(--paper-cut);
  padding: .2em .45em .3em;
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
  scroll-margin-top: 1.5rem;
}
.prose h2 + * { margin-top: 1.3em; }
.prose a { color: var(--spot); font-weight: 700; }
.prose code:not(pre code) { background: color-mix(in srgb, var(--hilite) 45%, transparent); padding: .05em .3em; font-size: .95em; font-weight: 700; }
.prose ol, .prose ul { padding-left: 1.6rem; }
.prose li { margin: .35rem 0; }
.prose ol li::marker { font-family: var(--font-cut); color: var(--spot); }
.prose em { font-style: italic; }
.callout { position: relative; padding: 1.1rem 1.25rem 1.1rem 1.25rem; box-shadow: var(--shadow); }
.callout p { margin: 0; }
.callout .flag { display: inline-block; font-family: var(--font-cut); text-transform: uppercase; font-size: 1.1rem; letter-spacing: .06em; padding: .05em .5em; margin-right: .5rem; transform: rotate(-3deg); }
.callout.why { background: var(--paper-cut); border-left: 8px solid var(--hilite); }
.callout.why .flag { background: var(--hilite); color: var(--on-hilite); }
.callout.q { background: var(--pink); transform: rotate(.6deg); }
.callout.q .flag { background: var(--ink); color: var(--paper); }
.callout.note { background: var(--paper-cut); border: 2px dashed var(--ink); box-shadow: none; }
.callout.note .flag { background: var(--spot); color: var(--paper); }
.callout.skill { background: var(--insert); color: var(--insert-ink); transform: rotate(-.5deg); }
.callout.skill a { color: inherit; }
.callout.skill code { background: rgba(255,255,255,.45) !important; color: inherit; }
:root[data-theme="dark"] .callout.skill code { background: rgba(0,0,0,.35) !important; }

.printout { position: relative; margin-top: 1.8em !important; margin-bottom: .4em; }
.printout-bar { display: flex; justify-content: space-between; align-items: center; background: var(--printout-bg); color: var(--printout-ink); padding: .3rem .4rem .3rem 1rem; border-bottom: 1px dashed #555; }
.printout-bar span { font-weight: 700; font-size: .875rem; letter-spacing: .14em; }
.copy-btn { background: transparent; color: var(--printout-ink); border: 2px solid var(--printout-ink); min-height: 40px; padding: 0 .8em; font-weight: 700; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.copy-btn:hover { background: #ffe45c; color: #141414; border-color: #ffe45c; }
.printout pre {
  margin: 0;
  background: var(--printout-bg);
  color: var(--printout-ink);
  padding: 1.1rem 1.2rem 1.3rem;
  overflow-x: auto;
  font-size: 1rem;
  line-height: 1.6;
  tab-size: 2;
}
.printout pre code { font-family: var(--font-type); }
.printout .c { color: var(--printout-dim); font-style: italic; }
.printout .s { color: var(--printout-str); }
.printout .k { color: var(--printout-kw); font-weight: 700; }
.printout::before { content: ""; position: absolute; top: -12px; right: 18%; width: 90px; height: 24px; background: var(--tape); transform: rotate(5deg); z-index: 2; }
@media (min-width: 1100px) { .prose .printout { margin-right: -6rem; } }

.filed { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 3rem; }
.art-foot { display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; margin: 3rem 0; }
@media (max-width: 860px) { .art-foot { grid-template-columns: 1fr; } }
.share-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* coupon (newsletter) */
.coupon { border: 3px dashed var(--ink); padding: 1.6rem; position: relative; background: var(--paper-cut); }
.coupon::before { content: "\2702"; position: absolute; top: -1.05rem; left: 1.4rem; background: var(--paper); padding: 0 .3rem; font-size: 1.5rem; line-height: 1; }
.coupon h2, .coupon h3 { font-family: var(--font-cut); text-transform: uppercase; font-size: clamp(1.7rem, 3.5vw, 2.3rem); line-height: 1; margin-bottom: .6rem; }
.coupon form { display: grid; gap: .8rem; margin-top: 1rem; }
.coupon .field { display: flex; flex-wrap: wrap; gap: .6rem; }
.coupon input[type="email"] { flex: 1 1 14rem; min-height: 48px; border: 0; border-bottom: 3px solid var(--ink); background: transparent; padding: .4em .2em; font-size: 1.125rem; }
.coupon input[type="email"]::placeholder { color: var(--muted); }
.coupon .check { display: flex; gap: .6rem; align-items: flex-start; font-size: 1rem; }
.coupon .check input { width: 22px; height: 22px; margin-top: .2rem; accent-color: var(--ink); flex: none; }
.form-msg { font-weight: 700; margin: 0; min-height: 1.5em; }
.form-msg.error { color: #b3261e; }
:root[data-theme="dark"] .form-msg.error { color: #ff9b8f; }
.form-msg.ok { background: var(--hilite); color: var(--on-hilite); padding: .6rem .8rem; }

/* ---------- patterns ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1rem; }
@media (max-width: 860px) { .three-ways { grid-template-columns: 1fr; } }
.three-ways > div { background: var(--paper-cut); padding: 1.2rem; box-shadow: var(--shadow); }
.three-ways > div:nth-child(2) { transform: rotate(1deg); }
.three-ways > div:nth-child(3) { background: var(--hilite); color: var(--on-hilite); transform: rotate(-1deg); }
.three-ways h3 { font-family: var(--font-cut); text-transform: uppercase; font-size: 1.8rem; margin-bottom: .4rem; }
.three-ways p { margin: 0; font-size: 1.0625rem; }
.point { margin-top: 1.75rem; font-size: 1.125rem; max-width: 60rem; border-left: 6px solid var(--ink); padding-left: 1rem; }

.pat-tools { display: grid; gap: 1.2rem; margin: 2.5rem 0 2rem; }
.pat-search { display: flex; border: 3px solid var(--ink); background: var(--paper-cut); }
.pat-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .7em .9em; font-size: 1.125rem; min-height: 52px; }
.pat-search input::placeholder { color: var(--muted); }
.filter-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.filter-row button.dymo { border: 0; cursor: pointer; }
.result-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.result-row .count { font-family: var(--font-hand); font-size: 1.4rem; }
.result-row select { min-height: 44px; border: 2px solid var(--ink); background: var(--paper-cut); padding: 0 .6em; font-size: 1rem; }
.clear-btn { background: none; border: 0; font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 .4em; font-size: 1rem; }

.pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 2.5rem 2rem; }
.pat-card { position: relative; background: var(--paper-cut); box-shadow: var(--shadow); padding: 12px 12px 1.2rem; transition: transform .15s ease, box-shadow .15s ease; }
.pat-card:nth-child(3n+1) { transform: rotate(-.8deg); }
.pat-card:nth-child(3n+2) { transform: rotate(.6deg); }
.pat-card:hover, .pat-card:focus-within { transform: rotate(0) translateY(-3px); box-shadow: var(--shadow-lift); z-index: 2; }
.pat-thumb { aspect-ratio: 16/9; background: var(--paper); border: 2px solid var(--ink); display: grid; place-items: center; color: var(--ink); position: relative; overflow: hidden; }
.pat-thumb svg { width: 72%; height: 72%; }
.pat-card:nth-child(4n+2) .pat-thumb { background: color-mix(in srgb, var(--hilite) 45%, var(--paper)); }
.pat-card:nth-child(4n+3) .pat-thumb { background: var(--pink); }
.pat-card:nth-child(4n) .pat-thumb { background: repeating-linear-gradient(0deg, var(--paper) 0 17px, color-mix(in srgb, var(--spot) 25%, var(--paper)) 17px 18px); }
.pat-card:nth-child(even) .pat-thumb svg { transform: scaleX(-1) rotate(-3deg); }
.pat-card:nth-child(3n) .pat-thumb svg { transform: rotate(4deg) scale(.9); }

.pat-thumb .glyph { position: absolute; left: 10px; bottom: 6px; font-family: var(--font-cut); font-size: 1.1rem; text-transform: uppercase; color: var(--muted); }
.pat-card .row1 { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin: .9rem .2rem .3rem; font-weight: 700; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.badge { display: inline-block; font-family: var(--font-cut); font-weight: 400; font-size: .95rem; letter-spacing: .06em; padding: .05em .5em; transform: rotate(-3deg); }
.badge.new { background: var(--hilite); color: var(--on-hilite); }
.badge.updated { background: var(--ink); color: var(--paper); }
.pat-card h2, .pat-card h3 { font-family: var(--font-clip); font-weight: 900; font-size: 1.45rem; line-height: 1.15; margin: 0 .2rem .4rem; }
.pat-card h2 a, .pat-card h3 a { text-decoration: none; }
.pat-card h2 a::after, .pat-card h3 a::after { content: ""; position: absolute; inset: 0; }
.pat-card p { margin: 0 .2rem .6rem; font-size: 1.0625rem; line-height: 1.5; color: var(--ink-2); }
.pat-card .tags { margin: 0 .2rem; font-size: .9375rem; color: var(--muted); }
.empty { text-align: center; padding: 3rem 1rem; border: 3px dashed var(--ink); }
.empty h2 { font-family: var(--font-hand); font-size: 2rem; margin-bottom: .5rem; }

/* pattern detail */
.back-link { font-family: var(--font-hand); font-size: 1.2rem; display: inline-flex; min-height: 44px; align-items: center; }
.use-cases { columns: 2 16rem; column-gap: 2rem; padding-left: 1.3rem; margin: .5rem 0 1.5rem; }
.use-cases li { margin-bottom: .4rem; break-inside: avoid; }
.panes { border: 3px solid var(--ink); background: var(--paper-cut); box-shadow: var(--shadow-lift); margin-top: 2rem; }
.pane-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding: .7rem; border-bottom: 3px solid var(--ink); background: var(--paper); }
.pane-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.pane-tabs [role="tab"] { border: 0; cursor: pointer; }
.pane-tabs [role="tab"][aria-selected="true"] { background: var(--hilite); color: var(--on-hilite); text-shadow: none; outline: 2px solid var(--on-hilite); outline-offset: -5px; }
.pane-tabs [role="tab"][aria-selected="true"]::before { content: "\25B6"; font-size: .7em; }
.pane-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pane { padding: clamp(1rem, 3vw, 1.75rem); }
.pane[hidden] { display: none; }
.pane pre { margin: 0; background: var(--printout-bg); color: var(--printout-ink); padding: 1rem; overflow-x: auto; font-size: .9375rem; line-height: 1.55; white-space: pre; }
.pane .pane-note { font-size: 1rem; margin-bottom: 1rem; color: var(--ink-2); }
.prompt-text { max-width: 44rem; }
.prompt-text p { margin-bottom: 1em; }

/* the demo pattern itself, rendered in the preview pane (uses pattern tokens) */
.stage {
  --ground: #eef0f3; --surface: #ffffff; --surface-2: #f5f7f9; --border: #d2d8e0; --dim: #56606e; --accent: #364f6a; --radius: 10px;
  --s-ink: #161b22;
  background: var(--ground);
  color: var(--s-ink);
  padding: clamp(1rem, 3vw, 1.75rem);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
}
:root[data-theme="dark"] .stage { --ground: #10141a; --surface: #191f27; --surface-2: #202834; --border: #2c3743; --s-ink: #e6ecf3; --dim: #97a4b4; --accent: #6f92bd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stage { --ground: #10141a; --surface: #191f27; --surface-2: #202834; --border: #2c3743; --s-ink: #e6ecf3; --dim: #97a4b4; --accent: #6f92bd; } }
.stage .cap { color: var(--dim); margin: 0 0 .8rem; font-size: 1rem; }
.stage .cap + .hss-strip { margin-bottom: 2rem; }
.hss-strip { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; grid-template-columns: 1fr; container-type: inline-size; }
@media (min-width: 30rem) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56rem) { .hss-strip.four { grid-template-columns: repeat(4, 1fr); } .hss-strip.five { grid-template-columns: repeat(5, 1fr); } }
.hss-tile { background: var(--surface); padding: .9rem 1rem; display: grid; gap: .2rem; text-align: left; border: 0; color: inherit; font: inherit; min-width: 0; }
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-label { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); overflow-wrap: anywhere; }
.hss-fig { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hss-fig.none { color: var(--dim); }
.hss-sub { font-size: .875rem; color: var(--dim); }
.hss-list { list-style: none; margin: 1rem 0 .5rem; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.hss-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .9rem; border-top: 1px solid var(--border); }
.hss-list li:first-child { border-top: 0; }
.hss-list li[hidden] { display: none; }
.hss-list .st { font-family: ui-monospace, Menlo, monospace; font-size: .875rem; color: var(--dim); white-space: nowrap; }
.hss-status { color: var(--dim); margin: .4rem 0 0; }

/* ---------- footer: back cover ---------- */
.back-cover { margin-top: 4rem; border-top: 3px solid var(--ink); position: relative; padding: 3.5rem 0 2rem; }
.back-cover::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; border-top: 1px solid var(--ink); }
.foot-grid { display: grid; grid-template-columns: 1.1fr .7fr .7fr 1.3fr; gap: 2.5rem; }
@media (max-width: 1000px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h2 { font-family: var(--font-cut); text-transform: uppercase; font-size: 1.4rem; margin-bottom: .6rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid ul a { display: inline-flex; min-height: 40px; align-items: center; text-decoration: none; font-weight: 700; }
.foot-grid ul a:hover { text-decoration: underline wavy; }
.foot-blurb .ransom { font-size: 1.6rem; margin-bottom: 1rem; }
.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.2rem; border-top: 2px dashed var(--rule); font-size: 1rem; color: var(--muted); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print { body::after { display: none; } }

/* ---------- phone adjustments ---------- */
@media (max-width: 600px) {
  .mast-top { grid-template-columns: 1fr auto; }
  .logo { display: none; }
  .mast-title .ransom { font-size: 1.55rem; }
  .issue .extra { display: none; }
  .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stamp { width: 6.9rem; height: 6.9rem; padding: .5rem; border-width: 3px; }
  .stamp strong { font-size: 1.75rem; }
  .stamp span { font-size: .8125rem; letter-spacing: .04em; }
  .stamps { gap: .5rem; }
  .polaroid { max-width: 88%; }
  .headline .strip { white-space: normal; }
  .cover-photo { transform: rotate(1.5deg); }
  .clip-grid > :nth-child(3n+2) { transform: rotate(.8deg); }
}

/* UI pattern library article */
.prose .prose-fig { margin: 2rem 0; }
.prose .prose-fig img { height: auto; aspect-ratio: auto; object-fit: contain; }
.prose .callout p + p { margin-top: .8rem; }
.prose .live-pattern a.btn { color: var(--paper); font-weight: 700; white-space: normal; text-decoration: none; }
.prose p code { overflow-wrap: anywhere; }
