/* ==========================================================================
   janmark.us · portfolio
   Printed in four inks on two stocks: ink, charcoal, grey and signal orange,
   on uncoated white and on kraft. Pages are containers; all page-internal
   sizes are in --u (1% of page width) so every spread scales like print.
   ========================================================================== */

:root {
  --paper:       oklch(0.956 0.009 88);
  --paper-2:     oklch(0.918 0.011 84);
  --grey:        oklch(0.805 0.005 95);
  --char:        oklch(0.385 0.009 115);
  --ink:         oklch(0.195 0.008 70);
  --ink-soft:    oklch(0.43 0.01 70);
  --kraft:       oklch(0.712 0.062 66);
  --kraft-deep:  oklch(0.6 0.068 60);
  --orange:      oklch(0.69 0.196 42);
  --orange-deep: oklch(0.6 0.195 36);
  --desk:        oklch(0.905 0.007 85);
  --desk-deep:   oklch(0.86 0.009 80);

  /* Two voices. The grotesk builds the page: headlines, labels, figures,
     captions. The serif is somebody talking: body copy, standfirsts, quotes. */
  --f-sans:  "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);      /* expo out */
  --ease-quart: cubic-bezier(.25, 1, .5, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 400 16px/1.45 var(--f-sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ==========================================================================
   Type
   One scale, ratio 4:3, anchored on the body size. Every role below uses a
   step of it; nothing on a page picks its own size.

     label 1.46u   body 1.95u   lead 2.6u   h3 3.47u   h2 4.62u   h1 6.16u
     (section openers are fitted to their measure)

   Weights: grotesk 300 for big figures, 400 for text, 500 for emphasis;
   serif 400 and its italic. Sentence case throughout.
   ========================================================================== */
.kick, .cap, .label {
  font-family: var(--f-sans); font-size: var(--t-label); line-height: 1.35; letter-spacing: .005em;
}
.kick { font-weight: 500; }
.cap { font-weight: 400; margin: 0; color: var(--ink-soft); }
.cap b { font-weight: 500; color: var(--ink); margin-right: .3em; }
.credit { font-style: italic; opacity: .8; }
.copy {
  font-family: var(--f-serif); font-weight: 400; font-optical-sizing: auto;
  font-size: var(--t-body); line-height: 1.5;
  hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3;
  text-wrap: pretty;
}
.copy p { margin: 0; }
.copy p + p { text-indent: 1.25em; }
.cols { columns: 2; column-gap: calc(var(--u) * 3.4); }
.lead {
  margin: 0; font-family: var(--f-serif); font-weight: 400; font-optical-sizing: auto;
  font-size: var(--t-lead); line-height: 1.28; letter-spacing: -.004em; text-wrap: pretty;
}
.hl {
  margin: 0; font-family: var(--f-sans); font-weight: 500;
  font-size: var(--t-h1); line-height: 1; letter-spacing: -.032em; text-wrap: balance;
}
.opener { margin: 0; font-family: var(--f-sans); font-weight: 500; line-height: .84; letter-spacing: -.052em; }
.fig { font-family: var(--f-sans); font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: .8; }

/* fitted display lines (font-size set by JS, in cqw) */
.fitline { display: block; white-space: nowrap; width: max-content; }

/* ==========================================================================
   The page (shared by flat and book modes)
   ========================================================================== */
.page {
  position: relative;
  container: page / size;
  overflow: hidden;
  background: var(--paper);
  contain: layout paint style;
}
.pg {
  --u: 1cqw;
  --t-label: max(10.5px, calc(var(--u) * 1.46));
  --t-body:  max(12.5px, calc(var(--u) * 1.95));
  --t-lead:  calc(var(--u) * 2.6);
  --t-h3:    calc(var(--u) * 3.47);
  --t-h2:    calc(var(--u) * 4.62);
  --t-h1:    calc(var(--u) * 6.16);
  position: absolute; inset: 0;
  padding: calc(var(--u) * 6) calc(var(--u) * 6) calc(var(--u) * 9);
  background: var(--paper);
  isolation: isolate;
}
/* printed ink sits in the paper: grain over everything, gutter shading toward the spine */
.pg::before, .pg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 30;
}
.pg::before {
  background: url(../imgs/paper.webp);
  background-size: 62cqw;
  mix-blend-mode: multiply;
  opacity: .3;
}
.pg::after {
  background:
    linear-gradient(90deg, oklch(0.3 0.02 60 / .16), oklch(0.3 0.02 60 / .05) 3.5%, transparent 9%),
    linear-gradient(90deg, transparent 97%, oklch(1 0 0 / .25));
}
.side-l > .pg::after {
  background:
    linear-gradient(270deg, oklch(0.3 0.02 60 / .18), oklch(0.3 0.02 60 / .05) 3.5%, transparent 9%),
    linear-gradient(270deg, transparent 97%, oklch(1 0 0 / .25));
}
.pg img { mix-blend-mode: multiply; width: 100%; height: 100%; object-fit: cover; }

/* folio */
.folio {
  position: absolute; z-index: 5;
  bottom: calc(var(--u) * 4); right: calc(var(--u) * 6);
  display: flex; gap: calc(var(--u) * 1.6); align-items: baseline;
  font-family: var(--f-sans); font-weight: 400; font-size: var(--t-label);
  color: var(--ink-soft);
}
.folio span:first-child { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.side-l > .pg .folio { right: auto; left: calc(var(--u) * 6); flex-direction: row-reverse; }

/* stocks and solids */
.p-bleed { padding: 0; }
.p-kraft { background-color: var(--kraft); background-blend-mode: multiply; }
.p-kraft .folio, .p-kraft .cap { color: oklch(0.25 0.03 55); }
.p-orange { background-color: var(--orange); background-blend-mode: multiply; }
.p-orange .folio { color: var(--ink); }
.p-ink, .p-char { background-blend-mode: multiply; color: var(--paper); }
.p-ink { background-color: var(--ink); }
.p-char { background-color: var(--char); }
.p-ink::before, .p-char::before { mix-blend-mode: screen; opacity: .045; }
.p-ink img, .p-char img { mix-blend-mode: normal; }
.p-ink .folio, .p-ink .folio span:first-child,
.p-char .folio, .p-char .folio span:first-child,
.p-bleed .folio, .p-bleed .folio span:first-child { color: var(--paper); }
.p-ink .cap, .p-char .cap { color: oklch(0.956 0.009 88 / .68); }
.p-ink .cap b, .p-char .cap b { color: var(--paper); }
.p-ink .copy, .p-char .copy { color: oklch(0.956 0.009 88 / .84); line-height: 1.56; }

/* the art department's inks */
.art { display: block; }
.art .o { fill: var(--orange); }
.art .k { fill: var(--ink); }
.art .c { fill: var(--char); }
.art .g { fill: var(--grey); }
.art .p { fill: var(--paper); }
.art .f { fill: var(--kraft); }
.stip { position: absolute; height: auto !important; aspect-ratio: 1; pointer-events: none; }
img[data-art="stipple"]:not(.art-done) { visibility: hidden; }

/* ==========================================================================
   01 · Cover
   A Bauhaus board, four cells across, that bleeds off three edges. The
   masthead and the cover lines sit in cells the generator leaves empty.
   ========================================================================== */
.p-cover { display: flex; flex-direction: column; }
.cv-head { padding: calc(var(--u) * 4.4) calc(var(--u) * 5) calc(var(--u) * 2.6); }
.cv-strip {
  display: flex; justify-content: space-between; gap: calc(var(--u) * 2);
  padding-bottom: calc(var(--u) * 1.1); border-bottom: 1.5px solid var(--ink);
}
.cv-strip span:first-child, .cv-strip span:last-child { font-variant-numeric: tabular-nums; }
.cv-mast { margin: calc(var(--u) * 3) 0 0 calc(var(--u) * -.5); font-weight: 600; letter-spacing: -.058em; line-height: .8; }
.cv-mast .lt { font-weight: 300; letter-spacing: -.045em; }
.cv-board { position: relative; flex: 1; min-height: 0; overflow: hidden; --cell: calc(var(--u) * 25); }
.cv-board > .art { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.cv-ht { position: absolute; left: 50%; top: 0; width: 50%; aspect-ratio: 1; overflow: hidden; }
.cv-line {
  position: absolute; z-index: 2;
  left: calc(var(--cell) * var(--col)); top: calc(var(--cell) * var(--row));
  width: calc(var(--cell) * var(--span)); height: var(--cell);
  padding: calc(var(--u) * 1.8) calc(var(--u) * 2.2);
  display: flex; flex-direction: column; gap: calc(var(--u) * .9);
  text-decoration: none;
}
.cv-line::before { content: ""; position: absolute; left: calc(var(--u) * 2.2); right: calc(var(--u) * 2.2); top: 0; height: 1.5px; background: var(--ink); }
.cv-n { font-size: var(--t-h2); color: var(--orange-deep); margin-bottom: calc(var(--u) * .4); }
.cv-line b { font-family: var(--f-sans); font-weight: 500; font-size: var(--t-lead); line-height: 1.05; letter-spacing: -.018em; text-wrap: balance; }
.cv-line > span:last-child { font-family: var(--f-serif); font-size: var(--t-body); line-height: 1.35; color: var(--ink-soft); text-wrap: pretty; }
.cv-line:hover b { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .14em; }

/* ==========================================================================
   02–03 · Contents
   ========================================================================== */
.p-idx-l { display: flex; flex-direction: column; justify-content: flex-end; gap: calc(var(--u) * 3.4); }
.orbits { position: absolute; inset: 0; width: 100%; height: 100%; color: oklch(0.956 0.009 88 / .42); pointer-events: none; }
.orbits .st-o { fill: var(--orange); stroke: none; }
.pg .stip-a { left: calc(var(--u) * 24); top: calc(var(--u) * 12); width: calc(var(--u) * 66); }
.pg .stip-b { left: calc(var(--u) * 8); top: calc(var(--u) * 44); width: calc(var(--u) * 38); }
.idx-kick { position: absolute; top: calc(var(--u) * 6); left: calc(var(--u) * 6); margin: 0; color: var(--orange); }
.idx-note { position: relative; width: 62%; color: oklch(0.956 0.009 88 / .86); }
.idx-title { position: relative; margin: 0 0 calc(var(--u) * 1 + var(--foot) * .5) calc(var(--u) * -.7); color: var(--paper); }

.p-idx-r { display: flex; flex-direction: column; }
.idx-head, .cli-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: calc(var(--u) * 1.1); border-bottom: 1.5px solid var(--ink);
}
.idx-head .kick:last-child, .cli-head .kick:last-child { font-weight: 400; color: var(--ink-soft); }
.idx-feat { list-style: none; margin: calc(var(--u) * 2.6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--u) * 2.4); }
.idx-feat a { display: grid; grid-template-columns: auto 1fr; column-gap: calc(var(--u) * 1.3); align-items: baseline; text-decoration: none; }
.idx-feat figure { grid-column: 1 / -1; aspect-ratio: 3 / 4; overflow: hidden; margin-bottom: calc(var(--u) * 1.6); background: var(--paper-2); }
.idx-n { font-family: var(--f-sans); font-weight: 300; font-size: var(--t-h2); line-height: .9; letter-spacing: -.04em; color: var(--orange-deep); font-variant-numeric: tabular-nums; transition: color .4s; }
.idx-t { font-family: var(--f-sans); font-weight: 500; font-size: var(--t-lead); line-height: 1.05; letter-spacing: -.018em; }
.idx-d { grid-column: 1 / -1; margin-top: calc(var(--u) * .9); font-family: var(--f-serif); font-size: var(--t-body); line-height: 1.38; color: var(--ink-soft); text-wrap: pretty; }
.idx-sub { margin: calc(var(--u) * 4.6) 0 0; padding-bottom: calc(var(--u) * 1.1); border-bottom: 1.5px solid var(--ink); }
.idx-list { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; }
.idx-list li { flex: 1; max-height: calc(var(--u) * 15); border-bottom: 1px solid var(--ink); }
.idx-list a {
  height: 100%; text-decoration: none; display: grid; align-items: baseline; align-content: center;
  grid-template-columns: calc(var(--u) * 11) calc(var(--u) * 24) 1fr; column-gap: calc(var(--u) * 1.5);
}
.idx-list .idx-t { font-size: var(--t-h3); letter-spacing: -.025em; }
.idx-list .idx-d { grid-column: auto; margin: 0; }
.idx-feat a:hover .idx-n, .idx-list a:hover .idx-n { color: var(--ink); }
.idx-feat a:hover .idx-t, .idx-list a:hover .idx-t { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .14em; }

/* ==========================================================================
   04–05 · Letter, headline across the gutter
   ========================================================================== */
.xhead {
  position: absolute; z-index: 8; top: calc(var(--u) * 6);
  width: 200%; margin: 0; padding: 0 calc(var(--u) * 26) 0 calc(var(--u) * 5.4);
  font-family: var(--f-sans); font-weight: 500;
  color: var(--ink); line-height: .88; letter-spacing: -.052em; pointer-events: none;
}
.xhead span { display: block; white-space: nowrap; width: max-content; }
.xhead span:last-child { margin-left: auto; translate: calc(var(--u) * 20) 0; }
.xhead-l { left: 0; }
.xhead-r { left: -100%; }
.solohead { display: none; }
.let-ht { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--u) * 58); }
.let-mark { --x: 44; --y: 66; --w: 12; --h: 18; }
.let-mark span { left: auto; right: -2px; }
.let-cap { position: absolute; left: calc(var(--u) * 6); top: calc(var(--u) * 52.5); width: 50%; z-index: 9; }
.p-let-l .folio, .p-let-l .folio span:first-child { color: var(--paper); }
.let-body {
  position: absolute; left: calc(var(--u) * 7); right: calc(var(--u) * 6);
  top: calc(var(--u) * 56); bottom: calc(var(--u) * 9);
  display: flex; flex-direction: column; gap: calc(var(--u) * 2.8);
}
.let-lead { font-size: var(--t-h3); line-height: 1.18; letter-spacing: -.012em; text-wrap: balance; }
.sign { margin: auto 0 0; display: flex; align-items: baseline; gap: calc(var(--u) * 2); }
.sign-n { font-family: var(--f-serif); font-style: italic; font-size: var(--t-h2); line-height: .9; color: var(--orange-deep); }
.sign .kick { font-weight: 400; color: var(--ink-soft); }

/* ==========================================================================
   06–07 · Terminator
   --r (0 to 1) arrives from magazine.js while the spread is open.
   x = 3r walks the four renders; the gauge follows the sun.
   ========================================================================== */
.sky { position: absolute; inset: calc(var(--u) * -2); }
.sky img { position: absolute; inset: 0; }
.sky img:nth-child(2) { opacity: clamp(0, calc(var(--r, 0) * 3), 1); }
.sky img:nth-child(3) { opacity: clamp(0, calc(var(--r, 0) * 3 - 1), 1); }
.sky img:nth-child(4) { opacity: clamp(0, calc(var(--r, 0) * 3 - 2), 1); }
.term-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, oklch(0.14 0.02 280 / .5), transparent 34%, transparent 58%, oklch(0.12 0.02 280 / .6));
}
.p-term-l { color: var(--paper); }
.term-top {
  position: absolute; z-index: 3; left: calc(var(--u) * 6); right: calc(var(--u) * 6); top: calc(var(--u) * 5.5);
  display: flex; justify-content: space-between; padding-bottom: calc(var(--u) * 1.1);
  border-bottom: 1px solid oklch(0.956 0.009 88 / .5);
}
.term-top .kick:first-child { color: var(--orange); }
.term-top .kick:last-child { font-weight: 400; opacity: .8; }
.term-stages {
  position: absolute; z-index: 3; left: calc(var(--u) * 6); top: calc(var(--u) * 10.5); width: calc(var(--u) * 42);
  list-style: none; margin: 0; padding: 0;
}
.term-stages li {
  --x: calc(var(--r, 0) * 3);
  --on: min(clamp(0, calc((var(--x) - var(--i)) * 2 + 1.5), 1), clamp(0, calc((var(--i) - var(--x)) * 2 + 1.5), 1));
  position: relative;
  display: grid; grid-template-columns: calc(var(--u) * 5) 1fr auto; align-items: baseline;
  padding: calc(var(--u) * 1) 0 calc(var(--u) * .9);
  border-bottom: 1px solid oklch(0.956 0.009 88 / .28);
  opacity: calc(.42 + .58 * var(--on));
}
.term-stages li::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--orange); transform-origin: left; scale: var(--on) 1;
}
.ts-n, .ts-v { font-family: var(--f-sans); font-size: var(--t-label); font-variant-numeric: tabular-nums; }
.ts-n { font-weight: 500; }
.ts-t { font-family: var(--f-sans); font-weight: 500; font-size: var(--t-lead); line-height: 1.1; letter-spacing: -.018em; }
.term-gauge {
  --sun: calc(0.8 - 12.9 * min(var(--r, 0), .3333) - 13.5 * clamp(0, var(--r, 0) - .3333, .3333) + 13.5 * clamp(0, var(--r, 0) - .6667, .3333));
  position: absolute; z-index: 3; right: calc(var(--u) * 6); top: calc(var(--u) * 33); height: calc(var(--u) * 48); width: calc(var(--u) * 28);
}
.tg-scale {
  position: absolute; right: 0; top: 0; bottom: 0; width: calc(var(--u) * 1.4);
  border-right: 1px solid oklch(0.956 0.009 88 / .7);
  background: repeating-linear-gradient(to bottom, oklch(0.956 0.009 88 / .55) 0 1px, transparent 1px calc(100% / 22)) no-repeat;
}
.tg-mark {
  position: absolute; right: calc(var(--u) * 2.6); top: calc((4 - var(--e)) / 22 * 100%); translate: 0 -50%;
  white-space: nowrap; font-size: var(--t-label);
  display: flex; gap: .6em; align-items: baseline;
}
.tg-mark b { font-weight: 500; font-variant-numeric: tabular-nums; }
.tg-mark::after { content: ""; position: absolute; right: calc(var(--u) * -2.6); top: 50%; width: calc(var(--u) * 2.6); height: 1px; background: currentColor; }
.tg-sun {
  position: absolute; right: calc(var(--u) * -.9); top: calc((4 - var(--sun)) / 22 * 100%); translate: 0 -50%;
  width: calc(var(--u) * 3.2); aspect-ratio: 1; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 0 calc(var(--u) * .6) oklch(0.69 0.196 42 / .28);
}
.term-title { position: absolute; z-index: 3; left: calc(var(--u) * 5.2); right: calc(var(--u) * 5); bottom: calc(var(--u) * 12.5 + var(--foot)); }
.term-cap { position: absolute; z-index: 3; left: calc(var(--u) * 6); bottom: calc(var(--u) * 8 + var(--foot)); color: var(--paper); }
.p-term-l .term-cap { color: oklch(0.956 0.009 88 / .8); }

.p-term-r { display: flex; flex-direction: column; gap: calc(var(--u) * 2.2); }
.term-k { margin: 0; color: var(--orange); }
.term-h { margin-top: calc(var(--u) * .6); }
.term-lead { color: var(--paper); }
.chart { display: grid; gap: calc(var(--u) * 1.1); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--f-sans); font-size: 7.6px; font-weight: 400; font-variant-numeric: tabular-nums; }
.chart-ray { border-top: 1px solid oklch(0.956 0.009 88 / .3); padding-top: calc(var(--u) * 1.6); }
.chart-ray .bg { stroke: oklch(0.956 0.009 88 / .2); stroke-width: 2.6; stroke-linecap: round; }
.chart-ray .fg { stroke: var(--orange); stroke-width: 3.9; stroke-linecap: round; }
.chart-ray text { fill: oklch(0.956 0.009 88 / .6); }
.chart-ray .val { fill: var(--orange); font-weight: 500; }
.chart-ray .ax-b { fill: var(--paper); font-weight: 500; }
.chart-ray .val .ax { fill: oklch(0.956 0.009 88 / .6); font-weight: 400; }
.term-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--u) * 1.2); }
.term-strip li { display: flex; flex-direction: column; gap: calc(var(--u) * .8); }
.term-strip img { height: auto; aspect-ratio: 4 / 3; }
.term-strip span { font-size: var(--t-label); color: oklch(0.956 0.009 88 / .7); }
.term-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: calc(var(--u) * 3); }
.spec { margin: 0; display: grid; grid-auto-flow: column; column-gap: calc(var(--u) * 3.6); }
.spec dt { font-size: var(--t-label); opacity: .7; }
.spec dd { margin: calc(var(--u) * .4) 0 0; font-family: var(--f-sans); font-weight: 400; font-size: var(--t-h3); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cta {
  position: relative; z-index: 6; flex: none;
  display: inline-flex; align-items: center; gap: calc(var(--u) * 1.6);
  padding: calc(var(--u) * .9) calc(var(--u) * .9) calc(var(--u) * .9) calc(var(--u) * 1.8);
  border: 1.5px solid currentColor; color: inherit; text-decoration: none;
  font-family: var(--f-sans); font-weight: 500; font-size: var(--t-body); letter-spacing: -.005em;
  transition: background-color .35s var(--ease-quart), color .35s var(--ease-quart), border-color .35s var(--ease-quart);
}
.cta-a {
  display: grid; place-items: center; width: calc(var(--u) * 3.6); aspect-ratio: 1;
  background: var(--orange); color: var(--ink); font-weight: 400; font-size: 1.15em;
  transition: background-color .35s var(--ease-quart), color .35s var(--ease-quart), translate .5s var(--ease-out);
}
.cta:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.cta:hover .cta-a { background: var(--ink); color: var(--orange); }

/* ==========================================================================
   08–09 · Trolejbus BA
   ========================================================================== */
.p-bus-l { display: flex; flex-direction: column; gap: calc(var(--u) * 2.2); }
.p-bus-l > .kick { margin: 0; }
.bus-title { margin-left: calc(var(--u) * -.4); }
.wires { flex: 1 1 calc(var(--u) * 24); min-height: calc(var(--u) * 16); width: calc(100% + var(--u) * 12); margin: 0 calc(var(--u) * -6); }
.wires .w-out { fill: none; stroke: var(--ink); stroke-width: 4.6; stroke-linejoin: round; }
.wires .w-hi { stroke: var(--orange); }
.wires .w-in { fill: none; stroke: var(--kraft); stroke-width: 2.6; stroke-linejoin: round; }
.wires .w-span { fill: none; stroke: var(--ink); stroke-width: .45; opacity: .75; }
.wires .w-pole { fill: var(--ink); }
.bus-row { display: grid; grid-template-columns: 1.45fr 1fr; gap: calc(var(--u) * 3.4); align-items: start; padding-top: calc(var(--u) * 1.6); border-top: 1.5px solid var(--ink); }
.chart-pac .grid { stroke: var(--ink); stroke-width: .5; opacity: .3; }
.chart-pac .cv { fill: none; stroke: var(--ink); stroke-width: 3.6; stroke-linecap: round; stroke-dasharray: 0 6.2; }
.chart-pac .cv0 { stroke: var(--orange-deep); stroke-width: 4.4; }
.chart-pac .pk { stroke: var(--ink); stroke-width: .8; stroke-dasharray: 2 3; }
.chart-pac text { fill: var(--ink); }
.chart-pac .lb { font-weight: 500; }
.chart-pac .lb0 { fill: var(--orange-deep); }
.spec-v { grid-auto-flow: row; }
.spec-v div { display: flex; justify-content: space-between; align-items: baseline; gap: calc(var(--u) * 1.5); padding: calc(var(--u) * 1.1) 0; border-bottom: 1px solid var(--ink); }
.spec-v div:first-child { padding-top: 0; }
.spec-v dt { opacity: .8; }
.spec-v dd { margin: 0; font-size: var(--t-lead); letter-spacing: -.02em; }
.keys {
  list-style: none; margin: 0 0 calc(var(--u) * .4); padding: 0; display: flex; flex-wrap: wrap; gap: calc(var(--u) * 1) calc(var(--u) * 2.6);
  font-size: var(--t-label);
}
kbd {
  display: inline-grid; place-items: center; min-width: 2em; height: 2em; margin-right: .4em; padding: 0 .4em;
  border: 1px solid var(--ink); border-bottom-width: 2.5px; border-radius: 2px; font: inherit; font-weight: 500;
}

.sat { position: absolute; inset: 0; overflow: hidden; }
.sat-frame { position: absolute; top: 0; bottom: 0; left: 50%; aspect-ratio: 1100 / 1170; translate: -50% 0; }
.sat-frame img { mix-blend-mode: normal; }
.mark {
  position: absolute; z-index: 2;
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%); height: calc(var(--h) * 1%);
  border: 2px solid var(--orange);
}
.mark span {
  position: absolute; left: -2px; bottom: calc(100% + 2px); white-space: nowrap;
  padding: .3em .55em .28em; background: var(--orange); color: var(--ink);
  font-family: var(--f-sans); font-style: normal; font-weight: 500; font-size: var(--t-label);
}
.bus-cap {
  position: absolute; z-index: 3; left: calc(var(--u) * 6); top: calc(var(--u) * 6); max-width: 50%;
  padding: calc(var(--u) * 1) calc(var(--u) * 1.3); background: var(--paper);
}
.bus-inset {
  position: absolute; z-index: 3; left: calc(var(--u) * 6); bottom: calc(var(--u) * 9 + var(--foot));
  width: calc(var(--u) * 36); padding: calc(var(--u) * 1); background: var(--paper);
  box-shadow: 0 calc(var(--u) * .4) calc(var(--u) * 1.4) oklch(0.2 0.02 60 / .35);
  display: grid; gap: calc(var(--u) * 1);
}
.bus-inset img { height: auto; aspect-ratio: 1.55; mix-blend-mode: normal; }
.cta-paper {
  position: absolute; right: calc(var(--u) * 6); bottom: calc(var(--u) * 9 + var(--foot));
  background: var(--paper); border-color: var(--paper); color: var(--ink); font-size: var(--t-lead);
}
.cta-paper .cta-a { width: calc(var(--u) * 4.6); }

/* ==========================================================================
   10–11 · Clients
   ========================================================================== */
.p-cli-l { display: flex; flex-direction: column; padding-bottom: 0; }
.cli-title { margin-left: calc(var(--u) * -.6); }
.cli-title .fitline + .fitline { color: var(--orange); }
.cli-note { width: 70%; margin-top: calc(var(--u) * 3.2); color: oklch(0.956 0.009 88 / .86); }
.cli-art { position: relative; flex: 1; min-height: calc(var(--u) * 30); margin: calc(var(--u) * 5) calc(var(--u) * -6) 0; }
.cli-art .art { position: absolute; inset: 0; width: 100%; height: 100%; }

.p-cli-r { display: flex; flex-direction: column; }
.clients { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; }
.clients li {
  flex: 1; max-height: calc(var(--u) * 22);
  display: grid; grid-template-columns: calc(var(--u) * 8) 1fr; grid-template-rows: auto auto; align-content: center;
  border-bottom: 1px solid var(--ink); padding: calc(var(--u) * 1.4) 0;
}
.clients .n { grid-row: span 2; font-family: var(--f-sans); font-weight: 500; font-size: var(--t-label); padding-top: .55em; color: var(--orange-deep); font-variant-numeric: tabular-nums; }
.clients .name { font-family: var(--f-sans); font-weight: 500; font-size: var(--t-h2); line-height: 1; letter-spacing: -.035em; }
.clients .what { font-family: var(--f-serif); font-style: italic; font-size: var(--t-body); color: var(--ink-soft); margin-top: calc(var(--u) * .8); }
.cli-foot { margin-top: calc(var(--u) * 2.2); }

/* ==========================================================================
   12–15 · Photographs
   ========================================================================== */
.p-ph-l { display: flex; flex-direction: column; gap: calc(var(--u) * 2); }
.ph-k { margin: 0; color: var(--orange-deep); }
.ph-title { width: 84%; }
.ph-intro { width: 80%; }
.ph-big { position: relative; flex: 1 1 auto; min-height: calc(var(--u) * 30); margin-top: calc(var(--u) * .8); overflow: hidden; }
.ph-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--u) * 1.6); }
.ph-row li, .night-strip li { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
/* frame numbers, the same tab on every photograph */
.ph-big b, .ph-row b, .night-strip b, .night-tag {
  position: absolute; left: 0; top: 0; z-index: 2; padding: .3em .55em .28em;
  background: var(--ink); color: var(--paper);
  font-family: var(--f-sans); font-weight: 500; font-size: var(--t-label); font-variant-numeric: tabular-nums;
}

/* flight log: one row per frame, straight from the file's metadata */
.log { width: 100%; border-collapse: collapse; font-family: var(--f-sans); font-size: var(--t-label); font-variant-numeric: tabular-nums; }
.log th { text-align: left; font-weight: 400; color: var(--ink-soft); padding: 0 0 calc(var(--u) * .7); border-bottom: 1.5px solid var(--ink); }
.log td { padding: calc(var(--u) * .6) 0 calc(var(--u) * .5); border-bottom: 1px solid oklch(0.195 0.008 70 / .22); white-space: nowrap; }
.log td:first-child { font-weight: 500; color: var(--orange-deep); }
.log th:last-child, .log td:last-child { text-align: right; }
.log-note { margin-top: calc(var(--u) * -.6); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.p-night { color: var(--paper); }
.night-hero { position: absolute; inset: calc(var(--u) * -2); }
.night-hero img { mix-blend-mode: normal; }
.night-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, oklch(0.12 0.02 270 / .62), transparent 34%, transparent 50%, oklch(0.1 0.01 270 / .9) 76%);
}
.night-head { position: absolute; z-index: 3; left: calc(var(--u) * 6); top: calc(var(--u) * 6); width: 60%; }
.night-head .kick { margin: 0; color: var(--orange); }
.night-title { margin: calc(var(--u) * 1.8) 0 0 calc(var(--u) * -.5); }
.night-lead { margin-top: calc(var(--u) * 2.2); color: oklch(0.956 0.009 88 / .9); }
.night-tag { left: auto; right: calc(var(--u) * 6); top: calc(var(--u) * 6); z-index: 3; }
.night-foot { position: absolute; z-index: 3; left: calc(var(--u) * 6); right: calc(var(--u) * 6); bottom: calc(var(--u) * 8.5 + var(--foot)); display: grid; gap: calc(var(--u) * 2.4); }
.night-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--u) * 1.6); }
.night-strip li { box-shadow: 0 0 0 1px oklch(0.956 0.009 88 / .35); }
.night-strip img { mix-blend-mode: normal; }
.log-night th { color: oklch(0.956 0.009 88 / .66); border-bottom-color: var(--paper); }
.log-night td { border-bottom-color: oklch(0.956 0.009 88 / .2); }
.log-night td:first-child { color: var(--orange); }

/* ==========================================================================
   16–17 · Contact
   ========================================================================== */
.p-con-l { display: flex; flex-direction: column; padding-bottom: 0; }
.con-title { margin-left: calc(var(--u) * -.6); }
.con-title .fitline + .fitline { color: var(--paper); }
.con-art { position: relative; flex: 1; min-height: calc(var(--u) * 26); margin: calc(var(--u) * 4) calc(var(--u) * -6) 0; }
.con-art .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.p-con-l .folio, .p-con-l .folio span:first-child { color: var(--paper); }

.p-con-r { display: flex; flex-direction: column; gap: calc(var(--u) * 2.6); }
.con-k { margin: 0; color: var(--orange-deep); }
.con-mail { display: block; text-decoration: none; color: var(--ink); margin-left: calc(var(--u) * -.3); transition: color .4s; }
.con-mail:hover { color: var(--orange-deep); }
.con-list { margin: 0; border-top: 1.5px solid var(--ink); flex: 1; max-height: calc(var(--u) * 70); display: flex; flex-direction: column; }
.con-list div { flex: 1; display: grid; grid-template-columns: 30% 1fr; border-bottom: 1px solid var(--ink); padding: calc(var(--u) * 1.75) 0 calc(var(--u) * 1.45); align-items: center; }
.con-list dt { font-size: var(--t-label); color: var(--ink-soft); }
.con-list dd { margin: 0; font-family: var(--f-sans); font-weight: 400; font-size: var(--t-h3); line-height: 1.05; letter-spacing: -.025em; }
.con-list a { text-decoration: none; background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease-out); }
.con-list a:hover { background-size: 100% 2px; }
.social { list-style: none; margin: auto 0 calc(var(--u) * 1); padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--u) * 2); }
.social a {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: calc(var(--u) * 1.5); align-items: center;
  padding: calc(var(--u) * 1.8) calc(var(--u) * 1.4) calc(var(--u) * 1.6) calc(var(--u) * 2);
  border: 1.5px solid var(--ink); text-decoration: none;
  transition: background-color .35s var(--ease-quart), border-color .35s var(--ease-quart);
}
.social-n { font-family: var(--f-sans); font-weight: 500; font-size: var(--t-h3); line-height: 1; letter-spacing: -.03em; }
.social-h { grid-row: 2; margin-top: calc(var(--u) * .9); font-size: var(--t-label); color: var(--ink-soft); }
.social .cta-a { grid-row: 1 / span 2; grid-column: 2; width: calc(var(--u) * 4.6); font-size: var(--t-lead); }
.social a:hover { background: var(--orange); border-color: var(--orange); }
.social a:hover .social-h { color: var(--ink); }
.social a:hover .cta-a { background: var(--ink); color: var(--orange); }

/* ==========================================================================
   18 · Back cover
   ========================================================================== */
.back-sun {
  position: absolute; left: calc(var(--u) * 18); top: calc(var(--u) * 38); width: calc(var(--u) * 64); aspect-ratio: 1;
  border-radius: 50%; overflow: hidden;
}
.back-sun img { mix-blend-mode: normal; }
.back-url {
  position: absolute; z-index: 3; left: calc(var(--u) * 5); right: calc(var(--u) * 5); top: calc(var(--u) * 5.5);
  font-weight: 600; letter-spacing: -.058em; color: var(--paper);
}
.colophon {
  position: absolute; z-index: 3; left: calc(var(--u) * 6); bottom: calc(var(--u) * 6 + var(--foot) * 1.6); width: 52%;
  font-family: var(--f-sans); font-size: var(--t-label); line-height: 1.45; color: oklch(0.956 0.009 88 / .8);
}
.colophon p { margin: 0 0 calc(var(--u) * 1.2); }
.colophon .kick { color: var(--orange); margin-bottom: calc(var(--u) * .8); }
.colophon .barcode { display: block; width: calc(var(--u) * 26); height: calc(var(--u) * 6.5); margin-top: calc(var(--u) * 2); padding: calc(var(--u) * 1) calc(var(--u) * 1.2); background: var(--paper); box-sizing: content-box; }
.barcode rect { fill: var(--ink); }
.barcode-n { margin: calc(var(--u) * .8) 0 0 !important; color: var(--paper); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Reveals: a page "prints" when it is first uncovered
   ========================================================================== */
/* the mask reaches below the baseline so descenders survive tight leading;
   letters start far enough down to hide under it */
.rv-chars .ln { display: block; clip-path: inset(-0.4em -0.2em -0.32em -0.2em); }
.fitline.rv-chars { clip-path: inset(-0.4em -0.2em -0.32em -0.2em); }
.rv-chars .ch { display: inline-block; translate: 0 145%; transition: translate 1.15s var(--ease-out); transition-delay: calc(var(--i, 0) * 32ms + 120ms); }
.rv-up { opacity: 0; translate: 0 calc(var(--u) * 2.5); transition: opacity 1s var(--ease-quart), translate 1.2s var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms + 200ms); }
.rv-img { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms + 150ms); }
.rv-img img { scale: 1.12; transition: scale 1.8s var(--ease-out); transition-delay: inherit; }
.is-in .rv-chars .ch, .is-in .rv-up { translate: 0 0; opacity: 1; }
.is-in .rv-img { clip-path: inset(0 0 0 0); }
.is-in .rv-img img { scale: 1; }
.no-anim, .no-anim * { transition: none !important; }

/* ==========================================================================
   Flat mode: no JS, reduced motion. Pages stack like proofs on a wall.
   ========================================================================== */
.stage, .scroller, .dock { display: none; }
#pages { position: relative; z-index: 1; display: grid; justify-items: center; gap: 48px; padding: 96px 16px 120px; }
#pages .page { width: min(100%, 720px); aspect-ratio: .72; box-shadow: 0 1px 2px oklch(0.3 0.02 60 / .15), 0 20px 40px -20px oklch(0.3 0.02 60 / .35); }
html:not(.is-book) .rv-chars .ch, html:not(.is-book) .rv-up { translate: none; opacity: 1; }
html:not(.is-book) .rv-img { clip-path: none; }
html:not(.is-book) .rv-img img { scale: 1; }
html:not(.is-book) .xhead { display: none; }
html:not(.is-book) .solohead { display: block; }

/* small pages: bigger relative type, fewer extras */
@container page (max-width: 540px) {
  /* a phone page is a small print page: the scale keeps its steps but the
     lower ones bottom out at sizes a hand-held screen can still read */
  .pg {
    --u: 1.32cqw;
    --t-label: max(11px, calc(var(--u) * 1.46));
    --t-body:  max(13px, calc(var(--u) * 1.95));
    --t-lead:  calc(var(--u) * 3.1);
    --t-h3:    calc(var(--u) * 3.9);
    --t-h2:    calc(var(--u) * 4.9);
    --t-h1:    calc(var(--u) * 6.2);
  }
  .pg:not(.p-bleed) { padding: calc(var(--u) * 5) calc(var(--u) * 5) calc(var(--u) * 8.5); }
  .hide-s { display: none !important; }
  .cols { columns: 1; }
  .cv-board { --cell: calc(100cqw / 4); }
  .cv-line { padding: calc(var(--u) * 1.4) calc(var(--u) * 1.6); }
  .cv-line > span:last-child { display: none; }
  .idx-feat { grid-template-columns: 1fr 1fr; }
  .idx-feat li:nth-child(3) { display: none; }
  .idx-list a { grid-template-columns: calc(var(--u) * 9) 1fr; }
  .idx-list .idx-d { display: none; }
  .term-stages { width: calc(100% - var(--u) * 10); }
  .term-gauge { top: auto; bottom: calc(var(--u) * 34 + var(--foot)); height: calc(var(--u) * 40); }
  .term-strip, .keys { display: none; }
  .term-foot { flex-direction: column; align-items: flex-start; }
  .spec:not(.spec-v) { grid-auto-flow: row; grid-template-columns: 1fr 1fr; row-gap: calc(var(--u) * 1.5); }
  .bus-row { grid-template-columns: 1fr; }
  .bus-inset { width: calc(var(--u) * 40); }
  .ph-title, .ph-intro { width: auto; }
  .night-head { width: auto; right: calc(var(--u) * 5); }
  .night-title { width: 70%; }
  .social { grid-template-columns: 1fr; gap: calc(var(--u) * 1.4); }
  .colophon { width: auto; right: calc(var(--u) * 5); }
}

/* ==========================================================================
   Book mode
   ========================================================================== */
html.is-book, html.is-book body { overscroll-behavior: none; }
html.is-book { scrollbar-width: none; }
html.is-book::-webkit-scrollbar { display: none; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: url(../imgs/paper.webp) 0 0 / 300px; opacity: .45; mix-blend-mode: multiply;
}
.is-book #pages { display: block; position: fixed; inset: 0; padding: 0; visibility: hidden; pointer-events: none; }
.is-book .stage { display: block; position: fixed; inset: 0; perspective: 2600px; perspective-origin: 50% 45%; overflow: hidden; }
/* pages can be grabbed and turned; vertical swipes still scroll */
.is-book .stage { touch-action: pan-y; cursor: grab; -webkit-tap-highlight-color: transparent; }
.dragging, .dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.dragging .stage a { pointer-events: none; }
.is-book .scroller { display: block; }
.is-book .dock { display: flex; }

.desk-light {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 30% 0%, oklch(1 0 0 / .55), transparent 60%),
    radial-gradient(90% 70% at 85% 110%, oklch(0.5 0.03 60 / .12), transparent 70%);
}
.book-wrap {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  transform-style: preserve-3d;
}
.intro .book-wrap { opacity: 0; transform: translateY(7vh) rotateX(16deg) scale(.94); }
.book-wrap { transition: opacity 1.2s var(--ease-quart), transform 1.6s var(--ease-out); }
.book {
  position: absolute; left: var(--spine-x); top: var(--book-y);
  width: 0; height: var(--ph);
  transform-origin: 0 50%;
  will-change: transform;
}
.leaves { position: absolute; inset: 0; }
.leaf {
  position: absolute; top: 0; left: 0; width: var(--pw); height: var(--ph);
  perspective: var(--persp, 2400px); perspective-origin: var(--po, 0 50%);
  /* a turned leaf's box stays over the right-hand page while its back face
     shows on the left; only the face you can see may take the pointer */
  pointer-events: none;
}
.face { position: absolute; top: 0; left: 0; width: var(--pw); height: var(--ph); pointer-events: auto; }
.face .page, .clip .page { position: absolute; top: 0; left: 0; width: var(--pw); height: var(--ph); }
.leaf .back { opacity: 0; pointer-events: none; }
.leaf.down .front { opacity: 0; pointer-events: none; }
.leaf.down .back { opacity: 1; pointer-events: auto; translate: -100% 0; }
.leaf.turning .flat, .leaf.buried .flat { opacity: 0; pointer-events: none; }
.leaf.turning .face, .leaf.buried .face { pointer-events: none; }
.leaf.turning .flat { visibility: hidden; }
.strips { position: absolute; inset: 0; transform-style: preserve-3d; display: none; pointer-events: none; }
.leaf.turning .strips { display: block; }
.seg { position: absolute; top: 0; left: 0; width: var(--sw); height: var(--ph); transform-style: preserve-3d; transform-origin: 0 50%; }
.seg .seg { left: var(--sw); }
.clip { position: absolute; top: 0; left: 0; width: calc(var(--sw) + 1.5px); height: var(--ph); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.clip.cb { transform: rotateY(180deg); }
.clip .page { box-shadow: none; }
.shade { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.ghost { position: absolute; inset: 0; background: var(--paper); }
.ghost .page { scale: -1 1; opacity: .07; filter: blur(.4px) grayscale(1); }

/* the stacks under each side: page edges that thicken as you read */
.stack { position: absolute; top: 0; height: var(--ph); width: var(--pw); background: var(--paper-2); opacity: 0; transition: opacity .3s; }
.stack-l { left: calc(var(--pw) * -1); }
.stack-r { left: 0; }
.bshadow { position: absolute; top: 0; height: var(--ph); width: var(--pw); pointer-events: none; }
.bshadow-l { left: calc(var(--pw) * -1); box-shadow: -18px 30px 50px -10px oklch(0.3 0.03 60 / .28), -2px 4px 8px oklch(0.3 0.03 60 / .14); }
.bshadow-r { left: 0; box-shadow: 18px 30px 50px -10px oklch(0.3 0.03 60 / .28), 2px 4px 8px oklch(0.3 0.03 60 / .14); }
.cast { position: absolute; top: 0; height: var(--ph); width: var(--pw); pointer-events: none; z-index: 590; }
.cast-l { left: calc(var(--pw) * -1); }
.cast-r { left: 0; }
.sheen {
  position: absolute; top: 0; width: var(--pw); height: var(--ph);
  pointer-events: none; z-index: 2000; mix-blend-mode: soft-light; opacity: 0;
  background: radial-gradient(60% 70% at var(--lx, 30%) var(--ly, 20%), oklch(1 0 0 / .5), transparent 70%) 0 0 / calc(var(--pw) * 2) 100% no-repeat;
}
.sheen-l { left: calc(var(--pw) * -1); }
.sheen-r { left: 0; background-position: calc(var(--pw) * -1) 0; }
.mode-single .sheen-l { display: none; }
.mode-single .sheen-r { background-size: var(--pw) 100%; background-position: 0 0; }
.mode-single .xhead { display: none; }
.mode-single .solohead { display: block; }

/* single-page mode: solohead replaces the cross-gutter headline */
.solohead {
  position: relative; z-index: 8; margin: 0;
  font-family: var(--f-sans); font-weight: 500;
  font-size: calc(var(--u) * 11.5); line-height: .9; letter-spacing: -.05em; text-wrap: balance;
}
.mode-single .let-ht, html:not(.is-book) .let-ht { top: auto; height: 52%; }
.mode-single .let-cap, html:not(.is-book) .let-cap { top: auto; bottom: calc(52% + var(--u) * 2); }
.mode-single .let-body, html:not(.is-book) .let-body { top: calc(var(--u) * 7); }
.mode-single .let-lead, html:not(.is-book) .let-lead { font-size: var(--t-h2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.mode-single .leaf.down .flat { opacity: 0; }

/* ==========================================================================
   Dock: section skipper + page indicator, printed on a tab over the magazine
   ========================================================================== */
.dock {
  position: fixed; z-index: 3000; left: 50%; bottom: 12px; translate: -50% 0;
  align-items: center; gap: 18px; padding: 0 6px 0 16px; height: 34px;
  background: var(--ink); color: var(--paper);
  font-family: var(--f-sans); font-stretch: 85%; font-variation-settings: "wdth" 85;
  font-size: 11.5px; font-weight: 620; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 1px 1px oklch(0.2 0.02 60 / .25), 0 10px 24px -10px oklch(0.2 0.02 60 / .55);
  white-space: nowrap;
}
.dock a { color: inherit; text-decoration: none; }
.dock-sections { display: flex; gap: 16px; }
.dock-sections a { position: relative; padding: 9px 0; opacity: .72; transition: opacity .3s; }
.dock-sections a:hover, .dock-sections a[aria-current="true"] { opacity: 1; }
.dock-sections a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 2px; background: var(--orange); scale: 0 1; transform-origin: right; transition: scale .5s var(--ease-out); }
.dock-sections a:hover::after, .dock-sections a[aria-current="true"]::after { scale: 1 1; transform-origin: left; }
.ticks { list-style: none; margin: 0; padding: 0 0 0 16px; display: flex; gap: 1px; align-items: center; height: 100%; border-left: 1px solid oklch(1 0 0 / .18); }
.ticks button { display: block; width: 11px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.ticks button::before { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 6px; translate: 0 -50%; background: var(--paper); opacity: .3; transition: height .5s var(--ease-out), opacity .3s, background-color .3s; }
.ticks button:hover::before { opacity: .75; height: 12px; }
.ticks button[aria-current="true"]::before { opacity: 1; height: 16px; background: var(--orange); }
.dock-count { display: none; font-variant-numeric: tabular-nums; padding-right: 10px; }
.hint { padding: 0 10px; color: var(--orange); max-width: 20ch; overflow: hidden; transition: max-width .8s var(--ease-out), opacity .5s, padding .8s var(--ease-out); }
.turned .hint { max-width: 0; opacity: 0; padding: 0; }

/* the dock sits over the foot of the pages: keep that band clear of copy */
.pg { --foot: 16px; }
.mode-single .pg { --foot: 38px; }
.mode-single .folio { display: none; }
.mode-single .pg:not(.p-bleed) { padding-bottom: calc(var(--u) * 6 + var(--foot)); }
.mode-single .p-cli-l, .mode-single .p-con-l { padding-bottom: 0; }
.mode-single .let-body { bottom: calc(var(--u) * 6 + var(--foot)); }
.mode-single .night-foot { bottom: calc(var(--u) * 6 + var(--foot)); }

@media (max-width: 700px) {
  .dock { gap: 12px; padding: 0 12px; font-size: 10.5px; letter-spacing: .06em; height: 32px; bottom: 10px; max-width: calc(100vw - 20px); }
  .dock-sections { gap: 11px; }
  .ticks { display: none; }
  .dock-count { display: block; padding: 0 0 0 12px; border-left: 1px solid oklch(1 0 0 / .18); }
  .hint { display: none; }
}
@media (max-width: 360px) { .dock-sections a[href="#letter"] { display: none; } }

/* ==========================================================================
   Dark desk: only the surface around the magazine changes. The paper stays paper.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root { --desk: oklch(0.2 0.006 70); --desk-deep: oklch(0.165 0.006 70); }
  body::before { mix-blend-mode: soft-light; opacity: .5; }
  .desk-light {
    background:
      radial-gradient(110% 80% at 30% 0%, oklch(0.9 0.02 80 / .07), transparent 60%),
      radial-gradient(90% 70% at 85% 110%, oklch(0 0 0 / .35), transparent 70%);
  }
  .bshadow-l { box-shadow: -18px 30px 60px -6px oklch(0 0 0 / .55), -2px 4px 10px oklch(0 0 0 / .35); }
  .bshadow-r { box-shadow: 18px 30px 60px -6px oklch(0 0 0 / .55), 2px 4px 10px oklch(0 0 0 / .35); }
  #pages .page { box-shadow: 0 1px 2px oklch(0 0 0 / .4), 0 24px 48px -20px oklch(0 0 0 / .7); }
  .dock { box-shadow: 0 0 0 1px oklch(1 0 0 / .08), 0 10px 24px -10px oklch(0 0 0 / .7); }
}


/* folios that land on generated art get a printed tab so they never vanish into a shape */
.p-cli-l .folio, .p-con-l .folio { background: var(--ink); padding: calc(var(--u) * .5) calc(var(--u) * 1.1); bottom: calc(var(--u) * 3.4); }
