/* Chris Williams — a printed page, read by a machine, meant for a human.
   Daylight: midnight ink on one white page, top to bottom, the way a CV or a good report reads; no section changes colour.
   The dot is the unit of the whole page: the portrait is 3,115 of them, every rule is a line of them, each section number sits
   in one, and the gold plate dissolves into a halftone field of them (halftone.js) at the portrait, the pull quote and the year.
   Amber is the single warm signal: that gold, the highlighter across the key words, and the needle that shows where you are.
   Blue is the machine's ink (citations, focus, data you are pointing at). Shapes are round to match: pills, circles, soft frames.
   Foundation: tokens, type, layout, static components. Module CSS lives in portrait.css, case.css, coffee.css, print.css. */

/* Fallback faces sized to match the web fonts, so the swap does not move the page.
   size-adjust = web width / fallback width (measured); overrides = web metrics / size-adjust. */
@font-face{font-family:"Brygada Fallback";font-style:normal;font-weight:400 700;src:local("Georgia");size-adjust:104.4%;ascent-override:88.1%;descent-override:23.9%;line-gap-override:0%}
@font-face{font-family:"Brygada Fallback";font-style:italic;font-weight:400 700;src:local("Georgia Italic"),local("Georgia-Italic");size-adjust:96.5%;ascent-override:95.3%;descent-override:25.9%;line-gap-override:0%}
@font-face{font-family:"Archivo Fallback";font-style:normal;font-weight:400 500;src:local("Arial");size-adjust:95%;ascent-override:92.6%;descent-override:22.1%;line-gap-override:0%}
@font-face{font-family:"Archivo Fallback";font-style:normal;font-weight:600 900;src:local("Arial Bold"),local("Arial-BoldMT");size-adjust:98%;ascent-override:89.8%;descent-override:21.4%;line-gap-override:0%}
@font-face{font-family:"DM Mono Fallback";font-style:normal;font-weight:400 500;src:local("Courier New"),local("CourierNewPSMT");size-adjust:100%;ascent-override:99%;descent-override:31%;line-gap-override:0%}

:root{
  color-scheme:light;
  /* the inks */
  --night:#0A0E17;             /* midnight: the ink */
  --white:#FFFFFF;
  --amber:#FFB547;             /* the signal, for fills and marks only (too light for text on white): the gold plate, the highlighter, the needle */
  --amber-deep:#9A5A00;        /* amber that is text-safe: 5.5:1 on white, 5.0:1 on a lifted panel */
  --blue:#1D5FD0;              /* the machine's ink: 5.8:1 on white */
  /* the roles. Every rule is written with these; the portrait's gold plate re-points them for itself. */
  --paper:var(--white);
  --paper-2:#F3F4F7;           /* a lifted panel: the declaration, the screenshot frame's top strip */
  --ink:var(--night);
  --ink-2:#4A5263;             /* 7.9:1 on white, 7.2:1 on a lifted panel */
  --rule:rgba(10,14,23,.12);
  --rule-hard:rgba(10,14,23,.42);
  --em:var(--amber-deep);      /* emphasis in text */
  --mark:rgba(255,181,71,.7);  /* the highlighter behind key words; midnight on it is 13:1 */
  --mach:var(--blue);          /* the machine's ink: chips, focus, marks */
  --hot:#B45309;               /* graphic accent: busy days, the second product, the redaction rule (5.0:1) */
  --ul:#D9962A;                /* link underline */
  --acc:var(--amber);          /* fill a control takes on hover */
  --on-acc:var(--night);
  --hl:rgba(255,181,71,.45);   /* the jump highlight */
  /* a line of dots: every rule on the page is drawn with one of these as a repeating background, sized per rule */
  --dot:radial-gradient(circle,var(--rule-hard) 1.15px,transparent 1.6px);
  --dot-ink:radial-gradient(circle,var(--ink) 1.6px,transparent 2.1px);
  --serif:"Brygada 1918","Brygada Fallback","Iowan Old Style",Georgia,"Times New Roman",serif;
  --sans:"Archivo","Archivo Fallback","Helvetica Neue",Arial,sans-serif;
  --mono:"DM Mono","DM Mono Fallback",ui-monospace,"SFMono-Regular",Menlo,monospace;
  --gutter:clamp(16px,3.4vw,40px);
  --rail:112px;
  --bar:60px;
  --measure:62ch;
  --mono-s:.6875rem;   /* 11px: the smallest text on the site */
  --mono-m:.75rem;     /* 12px: labels */
  --mono-l:.8125rem;   /* 13px: lists and chips */
  --gl:max(var(--gutter),env(safe-area-inset-left));
  --gr:max(var(--gutter),env(safe-area-inset-right));
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--bar) + 20px);-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--serif);font-size:clamp(1.0625rem,1rem + .25vw,1.1875rem);line-height:1.6;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-x:clip}
::selection{background:var(--amber);color:var(--night)}
img,svg,canvas{max-width:100%}
[hidden]{display:none!important}
p{margin:0 0 1.1em}
p:last-child{margin-bottom:0}
strong{font-weight:600}
a{color:var(--ink);text-decoration-color:var(--ul);text-decoration-thickness:1.5px;text-underline-offset:.2em}
a:hover{color:var(--em)}
:focus-visible{outline:2px solid var(--mach);outline-offset:3px;border-radius:2px}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
a.skip{position:absolute;left:12px;top:-60px;z-index:100;background:var(--amber);color:var(--night);padding:.7em 1em;border-radius:6px;font-family:var(--sans);font-weight:600;text-decoration:none}
a.skip:focus{top:12px}
.mono{font-family:var(--mono);font-size:var(--mono-m);font-weight:400;letter-spacing:.08em;text-transform:uppercase;line-height:1.4}
.ico{width:.95em;height:.95em;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
a:hover .ico,button:hover .ico{transform:translateX(3px)}

/* ---------- top bar ---------- */
.bar{position:sticky;top:0;z-index:20;background:var(--paper);color:var(--ink);border-bottom:1px solid var(--rule);transition:transform .28s ease}
/* frosted where the browser can: the page blurs as it passes under, and the bar's text stays at least 5:1 whatever is beneath */
@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){.bar{background:rgba(255,255,255,.86);-webkit-backdrop-filter:blur(14px) saturate(1.3);backdrop-filter:blur(14px) saturate(1.3)}}
.bar.away{transform:translateY(-101%)}
.bar-in{max-width:1440px;margin:0 auto;min-height:var(--bar);padding:.5rem var(--gr) .5rem var(--gl);display:flex;align-items:center;gap:1rem}
.who{display:inline-flex;align-items:center;gap:.7rem;font-family:var(--sans);font-weight:700;font-size:1rem;letter-spacing:-.01em;color:var(--ink);text-decoration:none;white-space:nowrap}
.who .face{width:34px;height:34px;border-radius:50%;object-fit:cover;background:var(--white);box-shadow:0 0 0 1px var(--rule)}
/* the face in the bar is the portrait's gold plate in miniature: dark marks on amber (face.js reads these two inks from the canvas) */
.bar .who .face-dots{--ink:var(--night);--hot:#7A3E00;width:auto;height:auto;padding:3px 4px;margin:-3px -4px;border-radius:2px;background:var(--amber);box-shadow:none;object-fit:initial}
.clock{color:var(--ink-2);white-space:nowrap}
.bar-actions{margin-left:auto;display:flex;align-items:center;gap:.6rem}
.pill{display:inline-flex;align-items:center;justify-content:center;gap:.5em;min-height:40px;padding:.6em 1.05em;border-radius:999px;border:1.5px solid var(--ink);background:transparent;color:var(--ink);font:600 .875rem/1 var(--sans);letter-spacing:0;text-decoration:none;cursor:pointer;transition:background .16s,color .16s,border-color .16s}
.pill.solid{background:var(--ink);color:var(--paper)}
.pill.solid:hover{background:var(--acc);border-color:var(--acc);color:var(--on-acc)}
.pill.ghost:hover{background:var(--ink);color:var(--paper)}
@media (pointer:coarse){.pill{min-height:44px}}
@media (max-width:600px){.clock{display:none}.who span{font-size:.95rem}.pill{padding:.6em .9em}}
.bar .pill{white-space:nowrap}
@media (max-width:520px){.bar-in{gap:.6rem}.bar-actions{gap:.4rem}}
@media (max-width:360px){.who span{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}

/* below the rail's breakpoint the bar carries the needle instead: a 2px amber line that fills as you read down the page.
   Driven by the scroll itself (no script); browsers without scroll timelines simply do not draw it. */
@keyframes read{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@supports (animation-timeline:scroll()){
  @media (max-width:1199.98px){
    .bar::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;background:var(--amber);transform:scaleX(0);transform-origin:0 50%;pointer-events:none;animation:read auto linear both;animation-timeline:scroll(root)}
  }
}

/* ---------- shell + rail ---------- */
.shell{max-width:1440px;margin:0 auto}
.rail{display:none}
main{display:block;padding-inline:var(--gl) var(--gr)}
@media (min-width:1200px){
  .shell{display:grid;grid-template-columns:var(--rail) minmax(0,1fr)}
  main{padding-inline:20px var(--gr)}
  .rail{display:block;position:sticky;top:calc(var(--bar) + 28px);align-self:start;z-index:2;padding-left:var(--gutter);height:max-content}
  /* the rail is a scale: a spine of dots, a dot for each plate, and one gold dot, the needle, that slides to the plate you are reading
     (site.js measures the current link into --ny and --nh). Without the script there is no needle and nothing is lost. */
  .rail ol{position:relative;list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.1rem;background:var(--dot) 100% 0/4px 8px repeat-y}
  .rail ol::after{content:"";position:absolute;top:0;right:-4.5px;width:13px;height:13px;border-radius:50%;transform:translateY(calc(var(--ny,0px) + var(--nh,0px) / 2 - 6.5px));background:var(--amber);box-shadow:0 0 0 3px var(--paper);transition:transform .5s cubic-bezier(.2,.7,.2,1)}
  .rail a{position:relative;display:flex;flex-direction:column;gap:.1rem;padding:.4rem .6rem .4rem 0;color:var(--ink-2);text-decoration:none;transition:color .2s}
  .rail a::after{content:"";position:absolute;right:-.5px;top:.8rem;width:5px;height:5px;border-radius:50%;background:var(--rule-hard)}
  .rail b{font:800 1.05rem/1 var(--sans);font-stretch:62%;letter-spacing:.02em}
  .rail span{font:400 var(--mono-s)/1.2 var(--mono);letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;max-height:0;opacity:0;overflow:hidden;transition:max-height .25s,opacity .25s}
  .rail a:hover,.rail a[aria-current="true"]{color:var(--em)}
  .rail a:hover span,.rail a:focus-visible span,.rail a[aria-current="true"] span{max-height:1.4em;opacity:1}
}
@media (prefers-reduced-motion:reduce){.rail ol::after{transition:none}}

/* ---------- plates ---------- */
.plate{padding-block:clamp(56px,7vw,112px)}
/* every plate opens the same way, so the page keeps one rhythm on one ground: its number in a gold dot, a line of dots to the edge, its name */
.plate-head{display:flex;align-items:center;gap:1.1rem;margin-bottom:clamp(24px,3.4vw,48px);color:var(--ink-2)}
.plate-head::before{content:"";order:1;flex:1 1 auto;min-width:1.5rem;height:8px;background:var(--dot) 0 50%/8px 8px repeat-x}
.plate-head > span:first-child{flex:none;display:inline-grid;place-items:center;width:3.25rem;height:3.25rem;border-radius:50%;background:var(--amber);color:var(--night);font:800 1.2rem/1 var(--sans);font-stretch:62%;letter-spacing:.03em;white-space:nowrap}
@media (max-width:600px){.plate-head > span:first-child{width:2.75rem;height:2.75rem;font-size:1.05rem}}
.plate-head > span:last-child{order:2;text-align:right}
@media (max-width:600px){.plate-head{gap:.75rem}.plate-head::before{min-width:1rem}}
.qa{margin-bottom:clamp(28px,4vw,56px)}
.q{font-family:var(--sans);font-stretch:118%;font-weight:700;font-size:clamp(1.15rem,.95rem + 1.1vw,1.9rem);line-height:1.1;letter-spacing:-.025em;margin:0 0 .55em;max-width:26em;text-wrap:balance}
/* one mark, the site's unit, in front of each section name */
.q::before{content:"";display:inline-block;width:.42em;height:.42em;border-radius:50%;background:var(--amber);margin-right:.7em;vertical-align:.14em}
.a{font-family:var(--serif);font-weight:500;font-size:clamp(2.2rem,1.1rem + 4.8vw,5.6rem);line-height:1;letter-spacing:-.035em;margin:0;max-width:15em;text-wrap:balance}
.a em,.pull em,h1 em,.not em{font-style:italic;font-weight:500;color:var(--ink);letter-spacing:-.02em}
/* the human highlighter: amber across the lower part of the key words, the way you would mark up a CV */
.a em,h1 em .ln{background:linear-gradient(transparent 60%,var(--mark) 60%,var(--mark) 90%,transparent 90%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.a em{padding:0 .05em;margin:0 -.05em}
h1 em .ln{width:fit-content}
.lede em{font-style:italic}
.prose{max-width:var(--measure)}
.prose .big,.big{font-size:clamp(1.35rem,1.05rem + 1vw,1.95rem);line-height:1.32;margin-bottom:1.1em;max-width:34em}
.prose h4,.meta h4,.about-grid h3.mono{margin:1.6em 0 .7em;color:var(--ink-2);font-weight:500}
.prose h4:first-child{margin-top:0}
a.out{font-family:var(--sans);font-weight:600;font-size:.95rem;letter-spacing:-.005em;text-decoration:none;border-bottom:1.5px solid var(--ul);padding-bottom:.1em}
a.out:hover{border-bottom-color:var(--ink)}
a.out .ico{margin-left:.15em}

/* a jump lands with the highlighter: works with no JS via :target, JS adds .hit for non-section targets */
@keyframes sweep{from{background-size:0 100%}to{background-size:100% 100%}}
:target > .plate-head + .qa .q,.plate:target .q,.case:target h3,p:target,li:target,dd:target,figcaption:target,.row:target,.meta > div:target,.declaration:target,ul.tags:target,.eyebrow:target,.footer span:target,.hit{background:linear-gradient(transparent 12%,var(--hl) 12%,var(--hl) 92%,transparent 92%) no-repeat 0 0/100% 100%;animation:sweep 1.1s cubic-bezier(.2,.7,.2,1);-webkit-box-decoration-break:clone;box-decoration-break:clone}
@media (prefers-reduced-motion:reduce){:target,.hit{animation:none!important}}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;gap:.6em;min-height:48px;padding:.8em 1.4em;border-radius:999px;border:1.5px solid var(--ink);background:transparent;color:var(--ink);font:600 1rem/1 var(--sans);letter-spacing:-.005em;text-decoration:none;cursor:pointer;transition:background .16s,color .16s,border-color .16s}
.btn.primary{background:var(--ink);color:var(--paper)}
.btn.primary:hover{background:var(--acc);border-color:var(--acc);color:var(--on-acc)}
/* a quiet round control that is only an icon (the replays): a hairline ring and the icon in the second ink; its name is in aria-label and the tooltip */
.icon-btn{position:relative;display:inline-grid;place-items:center;flex:none;width:32px;height:32px;padding:0;border:1px solid var(--rule-hard);border-radius:50%;background:transparent;color:var(--ink-2);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:color .16s,border-color .16s}
.icon-btn .ico{width:15px;height:15px;transition:transform .3s cubic-bezier(.2,.7,.2,1)}
@media (hover:hover){.icon-btn:hover{color:var(--ink);border-color:var(--ink)}.icon-btn:hover .ico{transform:rotate(-90deg)}}
@media (pointer:coarse){.icon-btn::after{content:"";position:absolute;inset:-7px;border-radius:50%}}   /* a 46px target that stays drawn at 32px */
@media (prefers-reduced-motion:reduce){.icon-btn .ico{transition:none}}
.cta{display:flex;flex-wrap:wrap;gap:.7rem}

/* ---------- I. hero ---------- */
.plate.hero{position:relative;isolation:isolate;padding-top:clamp(24px,3.4vw,52px);padding-bottom:clamp(40px,6vw,88px);display:grid;grid-template-columns:minmax(0,1.85fr) minmax(280px,1fr);gap:clamp(28px,4vw,72px);align-items:center;min-height:calc(100svh - var(--bar))}
.hero-text{container-type:inline-size;min-width:0}
/* the title line is the first thing a recruiter reads, so it is set in plain sans at reading size, not small spaced capitals */
.eyebrow{display:flex;flex-wrap:wrap;gap:.3rem .9rem;margin:0 0 clamp(16px,2.6vw,32px);color:var(--ink-2)}
.eyebrow.mono{font:500 clamp(.9375rem,.88rem + .25vw,1.0625rem)/1.4 var(--sans);letter-spacing:0;text-transform:none}
.eyebrow span:not(:last-child)::after{content:"/";margin-left:.9rem;color:var(--rule-hard)}
.eyebrow span:first-child{color:var(--ink);font-weight:700}
h1{font-family:var(--serif);font-weight:500;font-size:clamp(3rem,12.5vw,8rem);line-height:.93;letter-spacing:-.04em;margin:0 0 .28em;text-wrap:balance}
@supports (font-size:1cqi){h1{font-size:clamp(2.6rem,19.6cqi,8.4rem)}}
h1 .ln{display:block}
.lede{font-size:clamp(1.15rem,1.02rem + .6vw,1.45rem);line-height:1.45;max-width:33em;margin:0 0 1.4rem}
.lede em{color:var(--ink);font-weight:500;white-space:nowrap}
.tags{display:flex;flex-wrap:wrap;gap:.4rem .5rem;margin:0 0 1.6rem;padding:0;list-style:none}
.tags li{border:1px solid var(--rule-hard);border-radius:999px;padding:.45em .9em .4em;font-size:var(--mono-s);letter-spacing:.09em;line-height:1;color:var(--ink)}
/* portrait screens: eyebrow, headline, THEN the face, then the words. The face is the one ownable thing; it belongs on the first screen. */
@media (max-width:860px) and (orientation:portrait),(max-width:560px){
  .plate.hero{grid-template-columns:minmax(0,1fr);min-height:0;align-items:start;gap:0}
  .hero-text{display:contents}
  .hero-text > .eyebrow{order:1}
  .hero-text > h1{order:2;font-size:clamp(2.6rem,17vw,5.6rem)}
  .plate.hero > .hero-side{order:3;margin:.4rem 0 1.6rem}
  .hero-text > .lede{order:4}
  .hero-text > .tags{order:5}
  .hero-text > .cta{order:6}
}
@media (max-width:480px){.hero-text > .tags{display:none}}

/* the toolkit sits with the portrait's other facts, under its caption and in the captions' own type (DM Mono, as Fig. 1):
   three tools as small overlapping round badges, each cut out of the page by a white ring. On hover they spread a little and
   name themselves; screen readers always get the names (the images' alt text). */
.toolkit{display:flex;align-items:center;gap:.75rem;margin-top:1rem;padding-top:.95rem;background:var(--dot) 0 0/8px 6px repeat-x}
.toolkit-logos{display:flex;margin:0;padding:0;list-style:none}
.tool{position:relative;display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:50%;background:var(--tool-bg,var(--paper-2));box-shadow:0 0 0 2.5px var(--paper),0 6px 12px -8px rgba(10,14,23,.5);transition:transform .25s cubic-bezier(.2,.7,.2,1),margin .25s cubic-bezier(.2,.7,.2,1)}
.tool::after{content:"";position:absolute;inset:0;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(10,14,23,.1);pointer-events:none}   /* a hairline edge, so a light badge still reads as a circle on white */
.tool + .tool{margin-left:-6px}   /* a slight overlap: the ring cuts in, the marks inside stay whole */
.tool:nth-child(1){z-index:3}.tool:nth-child(2){z-index:2}.tool:nth-child(3){z-index:1}
.tool img{display:block;width:56%;height:56%}
.tool-claude{--tool-bg:#F3E9D7}                     /* Claude's cream, with its spark */
.tool-codex img{width:100%;height:100%;border-radius:50%}   /* the Codex face is its own round badge */
.tool-cursor{--tool-bg:var(--night)}
.tool-tip{position:absolute;left:50%;bottom:calc(100% + 8px);padding:.4em .6em .35em;border-radius:3px;background:var(--ink);color:var(--paper);font:500 var(--mono-s)/1 var(--mono);letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;opacity:0;transform:translate(-50%,4px);pointer-events:none;transition:opacity .15s,transform .15s}
.toolkit-text{margin:0;display:flex;flex-direction:column;font:400 .75rem/1.55 var(--mono);letter-spacing:.02em;color:var(--ink-2)}
.toolkit-text b{font-weight:500;color:var(--ink);text-transform:uppercase;letter-spacing:.08em}
@media (hover:hover){
  .toolkit-logos:hover .tool + .tool{margin-left:2px}
  .tool:hover{transform:translateY(-2px);z-index:4}
  .tool:hover .tool-tip{opacity:1;transform:translate(-50%,0)}
}
@media (prefers-reduced-motion:reduce){.tool,.tool-tip{transition:none}.tool:hover{transform:none}}
@media (forced-colors:active){.tool{forced-color-adjust:none}}   /* keep each tool's own colours, or the white Cursor mark would vanish */
/* short landscape phones: text and face side by side, never a stamp-sized portrait */
@media (max-width:860px) and (orientation:landscape) and (max-height:560px){
  .plate.hero{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);min-height:0;gap:clamp(20px,4vw,40px)}
}

/* figure frame + crop marks (shared by the portrait and the year plate) */
.fig{margin:0}
.fig-frame{position:relative;border:1px solid var(--crop,var(--ink));background:var(--paper);padding:10px;--t:9px}
.fig-frame::before{content:"";position:absolute;inset:-9px;pointer-events:none;background:
  linear-gradient(var(--crop,var(--ink)),var(--crop,var(--ink))) 0 0/1px var(--t) no-repeat,linear-gradient(var(--crop,var(--ink)),var(--crop,var(--ink))) 0 0/var(--t) 1px no-repeat,
  linear-gradient(var(--crop,var(--ink)),var(--crop,var(--ink))) 100% 0/1px var(--t) no-repeat,linear-gradient(var(--crop,var(--ink)),var(--crop,var(--ink))) 100% 0/var(--t) 1px no-repeat,
  linear-gradient(var(--crop,var(--ink)),var(--crop,var(--ink))) 0 100%/1px var(--t) no-repeat,linear-gradient(var(--crop,var(--ink)),var(--crop,var(--ink))) 0 100%/var(--t) 1px no-repeat,
  linear-gradient(var(--crop,var(--ink)),var(--crop,var(--ink))) 100% 100%/1px var(--t) no-repeat,linear-gradient(var(--crop,var(--ink)),var(--crop,var(--ink))) 100% 100%/var(--t) 1px no-repeat}
.fig-frame img{display:block;width:100%;height:auto}
.fig{--crop:var(--ink)}   /* crop marks and frame line take the plate's ink, whatever the frame is printed on */
.fig.portrait .fig-frame{--paper:#F3F4F7;--paper-2:#E8EAF0;--ink:var(--night);--ink-2:#4A5263;--rule:rgba(10,14,23,.14);--rule-hard:rgba(10,14,23,.5);--em:var(--amber-deep);--mach:var(--blue);--hot:#7A3E00;background:var(--amber);color:var(--ink)}
.fig-readout{display:flex;align-items:baseline;gap:.7rem;margin-top:1rem;color:var(--ink-2)}
.fig-readout .count{font:800 2.4rem/1 var(--sans);font-stretch:62%;letter-spacing:-.01em;color:var(--ink);font-variant-numeric:tabular-nums lining-nums}
.fig-readout .date{margin-left:auto}
.fig figcaption{font:400 .75rem/1.55 var(--mono);letter-spacing:.02em;color:var(--ink-2);margin-top:.9rem;max-width:46em}
.fig figcaption b{color:var(--ink);font-weight:500;margin-right:.5em;text-transform:uppercase;letter-spacing:.08em}

/* ---------- II. position ---------- */
.lead-in{margin-bottom:clamp(36px,5vw,64px)}
.ledger-head{margin-bottom:.9rem;color:var(--ink-2)}
.ledger-head p{margin:0}
.ledger{margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.8rem clamp(16px,2.4vw,36px)}
.ledger .row{padding-top:1.2rem;background:var(--dot-ink) 0 0/8px 7px repeat-x;display:flex;flex-direction:column;gap:.9rem;min-width:0}
.ledger dt{color:var(--ink-2)}
.ledger dd{margin:0;display:flex;flex-direction:column;gap:.85rem}
.figure{display:block;font:800 clamp(3.6rem,1.6rem + 5.4vw,7.2rem)/.86 var(--sans);font-stretch:62%;letter-spacing:-.01em;font-variant-numeric:lining-nums tabular-nums}
.figure small{font:italic 500 .26em/1 var(--serif);font-stretch:100%;letter-spacing:0;color:var(--ink-2)}
.marks{display:grid;grid-template-columns:repeat(var(--c,6),11px);gap:6px}
.marks i{width:11px;height:11px;border-radius:50%;background:var(--ink)}
.marks i.o{background:none;box-shadow:inset 0 0 0 1.5px var(--ink)}
.marks.v i{background:var(--hot)}
.marks.t i{background:var(--mach)}
.ledger .row{container-type:inline-size}
.ledger .figure{font-size:min(clamp(3.6rem,1.6rem + 5.4vw,7.2rem),36cqi)}
.ledger .cap{font-size:1rem;line-height:1.45;color:var(--ink-2);max-width:22em}
.ledger-foot{margin:1.8rem 0 0;padding-top:1rem;background:var(--dot) 0 0/8px 6px repeat-x}
@media (max-width:980px){.ledger{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---------- III. work ---------- */
.case-index{list-style:none;margin:0 0 clamp(36px,5vw,64px);padding:4px 0 0;background:var(--dot-ink) 0 0/8px 7px repeat-x}
.case-index a{display:grid;grid-template-columns:2.6rem minmax(0,1fr) auto;gap:.4rem 1rem;align-items:baseline;padding:1rem 0;background:var(--dot) 0 100%/8px 6px repeat-x;color:var(--ink);text-decoration:none}
.case-index .t{font:600 clamp(1.05rem,.95rem + .8vw,1.55rem)/1.15 var(--sans);font-stretch:112%;letter-spacing:-.02em}
.case-index .n,.case-index .s{color:var(--ink-2)}
.case-index .s.done{color:var(--mach)}
.case-index a:hover .t{color:var(--em)}
@media (max-width:640px){.case-index a{grid-template-columns:2rem 1fr}.case-index .s{grid-column:2}}
.case{padding-block:clamp(32px,4.4vw,64px);background:var(--dot) 0 0/8px 6px repeat-x;display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,.4fr);gap:clamp(22px,3vw,44px) clamp(28px,4vw,68px)}
.case-index + .case{background:none;padding-top:0}   /* the index's last line already closes it: a second rule here read as an empty fourth row */
.case-head{grid-column:1/-1}
.case-body{grid-column:1;min-width:0}
/* a side column gets a line of dots down its left, clear of the text; a stacked one (below) gets one across its top */
.case .meta{grid-column:2;align-self:start;background:var(--dot) 0 0/6px 8px repeat-y;padding-left:1.4rem;display:flex;flex-direction:column;gap:1.7rem}
.case .meta h4{margin:0 0 .7rem}
.case h3{font:500 clamp(2.2rem,1.3rem + 3.6vw,4.8rem)/1 var(--serif);letter-spacing:-.035em;margin:.55rem 0 .35em;max-width:15em;text-wrap:balance}
.sub{font-style:italic;font-size:clamp(1.15rem,1rem + .8vw,1.65rem);line-height:1.3;color:var(--ink-2);margin:0;max-width:30em}
.stamp{display:inline-block;border:1.5px solid var(--em);border-radius:999px;padding:.45em .9em .4em;color:var(--em);font-weight:500;letter-spacing:.1em}
.stamp.done{border-color:var(--mach);color:var(--mach)}
.viewer{grid-column:1/-1;min-width:0}
.shots{list-style:none;margin:0;padding:0;display:grid;gap:clamp(24px,3vw,44px)}
.shot figure{margin:0}
.shot-frame{border:1px solid var(--rule-hard);border-radius:14px;overflow:hidden;background:var(--white);background-clip:padding-box}
.shot img{display:block;width:100%;height:auto}
.shot figcaption{margin-top:.8rem;font-size:1rem;line-height:1.45;color:var(--ink-2);max-width:44em}
.shot figcaption b{font-family:var(--sans);font-weight:700;color:var(--ink);margin-right:.4em}
.pipe-wrap{margin:2rem 0 2.4rem}
.pipe{list-style:none;display:flex;flex-wrap:wrap;gap:1.4rem 0;margin:0;padding:0}
.pipe .step{position:relative;flex:1 1 7.5rem;padding:1.1rem 1rem 0 0;display:flex;flex-direction:column;gap:.15rem}
.pipe .step::before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:var(--ink)}
.pipe .step::after{content:"";position:absolute;left:0;top:-5px;width:12px;height:12px;border-radius:50%;background:var(--paper);border:2px solid var(--ink)}
.pipe .step b{font:500 var(--mono-l)/1.3 var(--mono);letter-spacing:.06em;text-transform:uppercase}
.pipe .step small{font-size:.95rem;color:var(--ink-2)}
.pipe .step.ai b{color:var(--mach)}
.pipe .step.ai::after{background:var(--mach);border-color:var(--mach)}
.chips{display:flex;flex-wrap:wrap;gap:.4rem;margin:0;padding:0;list-style:none}
.chips li{border:1px solid var(--rule-hard);border-radius:999px;padding:.4em .85em .35em;font:400 var(--mono-l)/1.1 var(--mono);color:var(--ink)}
.list{margin:0;padding:0;list-style:none;font:400 var(--mono-l)/1.85 var(--mono);color:var(--ink-2)}
p.list{font:400 1rem/1.5 var(--serif);max-width:none}
.case-pair{display:grid;grid-template-columns:minmax(0,1fr);gap:0 clamp(28px,4vw,72px)}
@media (min-width:1000px){
  .case-pair{grid-template-columns:repeat(2,minmax(0,1fr))}
  .case-pair .case{grid-template-columns:minmax(0,1fr);align-content:start}
  .case-pair .case-head,.case-pair .case-body,.case-pair .meta{grid-column:1}
  .case-pair .case h3{font-size:clamp(1.9rem,1.1rem + 2.2vw,3.1rem)}
  .case-pair .case .meta{padding:1.4rem 0 0;background:var(--dot) 0 0/8px 6px repeat-x}
}
/* the sentence the redaction gag lives on gets a stage of its own */
#p-res-3{margin-top:1.6rem;padding:.2rem 0 .2rem 1.1rem;border-left:3px solid var(--hot);font-size:clamp(1.25rem,1.05rem + .8vw,1.6rem);line-height:1.35;max-width:none}
@media (max-width:900px){.case{grid-template-columns:1fr}.case .meta{grid-column:1;padding:1.4rem 0 0;background:var(--dot) 0 0/8px 6px repeat-x}}

/* ---------- IV. thinking ---------- */
.principles{display:grid;gap:clamp(44px,6vw,92px)}
.principle{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.2rem clamp(28px,5vw,88px);align-items:start}
.principle .glyph{grid-column:1;width:clamp(72px,8vw,112px);height:clamp(72px,8vw,112px);color:var(--em)}
.principle:nth-of-type(2) .glyph{color:var(--mach)}
.principle:nth-of-type(3) .glyph{color:var(--ink)}
.glyph .r{fill:none;stroke:currentColor;stroke-width:1.4}
.glyph .d,.glyph .d *{fill:currentColor}
.principle h3{grid-column:1;margin:0;font:500 clamp(1.9rem,1.1rem + 2.8vw,3.5rem)/1.02 var(--serif);letter-spacing:-.035em;text-wrap:balance}
.principle h3 .num{display:block;margin-bottom:.7rem;font-size:.75rem;letter-spacing:.1em;color:var(--em)}
.principle .prose{grid-column:2;grid-row:1/span 2;padding-top:.4rem}
/* the pull quote is printed on gold that dissolves into dots to the right (halftone.js draws it and adds .ht-on);
   without the script, or in forced colours, it is a plain gold panel */
.pull{position:relative;isolation:isolate;margin:0;padding:clamp(40px,6vw,104px) clamp(24px,5vw,88px);background:var(--amber)}
.pull.ht-on{background:none}
/* the halftone fields (halftone.js): canvases behind the hero and the pull quote, and a band under the year's gold stage */
canvas.ht{position:absolute;display:block;max-width:none;pointer-events:none}
.plate.hero > canvas.ht{top:0;left:0;width:calc(100% + var(--gr));height:100%;z-index:-1}   /* to the right edge of the window, where the gold dissolves */
.pull > canvas.ht{inset:0;width:100%;height:100%;z-index:-1}
canvas.ht.band{position:relative;width:100%;height:clamp(48px,6vw,88px)}
@media (forced-colors:active){canvas.ht{display:none}}
.pull p{max-width:13em;margin:0;font:500 clamp(2.4rem,1.2rem + 5.4vw,6.6rem)/.98 var(--serif);letter-spacing:-.04em;text-wrap:balance}
.pull em:nth-of-type(2){text-decoration:underline dotted;text-decoration-thickness:3px;text-underline-offset:.14em}   /* the simpler thing: underlined in dots */
@media (max-width:820px){.principle{grid-template-columns:1fr}.principle .prose{grid-column:1;grid-row:auto}}

/* ---------- V. the year ---------- */
.year-note{color:var(--ink-2);max-width:var(--measure)}
.a .figure-inline .num{font:800 1em/1 var(--sans);font-stretch:62%;letter-spacing:-.01em;font-variant-numeric:lining-nums tabular-nums}
.fig.year{margin-top:clamp(20px,3vw,40px);--crop:var(--rule-hard)}
.year-stats{display:flex;flex-wrap:wrap;gap:1rem clamp(24px,4vw,64px);margin:1.4rem 0 .6rem;padding:0}
.year-stats div{min-width:0}
.year-stats dt{color:var(--ink-2)}
.year-stats dd{margin:.2rem 0 0;font:800 2.4rem/1 var(--sans);font-stretch:62%;letter-spacing:-.01em;font-variant-numeric:lining-nums tabular-nums}
.year-prov{margin:.4rem 0 1rem;color:var(--ink-2)}
.year-table summary{cursor:pointer;color:var(--ink-2);padding:.4rem 0}
.year-table summary:hover{color:var(--ink)}
.table-wrap{overflow-x:auto;margin:.6rem 0 0}
.table-wrap table{border-collapse:collapse;font:400 var(--mono-l)/1.4 var(--mono);min-width:22rem}
.table-wrap th,.table-wrap td{padding:.35em 1.2em .35em 0;text-align:left;background:var(--dot) 0 100%/6px 5px repeat-x}
.table-wrap th{font-weight:500;color:var(--ink-2)}

/* ---------- VI. about ---------- */
.about-grid{display:grid;gap:clamp(30px,4.4vw,64px)}
.about-not{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(260px,1fr);gap:1.6rem clamp(24px,4vw,64px);align-items:center}
.not{margin:0;max-width:14em;font:500 clamp(1.8rem,1.1rem + 2.6vw,3.3rem)/1.04 var(--serif);letter-spacing:-.03em;text-wrap:balance}
.declaration{border:1px solid transparent;border-radius:20px;background:var(--paper-2);padding:1.2rem 1.4rem}
.declaration dl{margin:0;display:grid;gap:.9rem}
.declaration dt{color:var(--ink-2);margin-bottom:.15rem}
.declaration dd{margin:0;font-size:1rem;line-height:1.45}
.stamp-notmet{display:inline-block;border:2px solid var(--em);border-radius:999px;color:var(--em);padding:.4em .9em .35em;letter-spacing:.1em;font-weight:500;background:var(--paper)}
@media (max-width:820px){.about-not{grid-template-columns:1fr}}

/* ---------- VII. coffee ---------- */
.coffee{min-height:min(86svh,900px)}
.coffee-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,340px);gap:2rem clamp(24px,5vw,88px);align-items:center}
.coffee-text .big{max-width:28em}
.coffee-text .cta{margin-top:1.8rem}
.kettle{margin:1.8rem 0 0;color:var(--ink-2);min-height:1.4em}
.cup-fig{margin:0;justify-self:center;width:100%;max-width:320px}
.cup{display:block;width:100%;height:auto;overflow:visible}
.cup path,.cup ellipse{fill:none;stroke:var(--ink);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.cup .fill{fill:#3A2415;stroke:none}
.cup .crema{stroke:var(--amber);stroke-width:2}
.cup .shadow{stroke:var(--rule)}
.cup .steam{stroke:var(--ink-2);stroke-width:1.3;animation:steam 3.2s ease-in-out 3}
.cup .steam:nth-child(2){animation-delay:-1.1s}.cup .steam:nth-child(3){animation-delay:-2.2s}
@keyframes steam{0%{opacity:0;transform:translateY(6px)}30%{opacity:.7}100%{opacity:0;transform:translateY(-16px)}}
@media (prefers-reduced-motion:reduce){.cup .steam{animation:none;opacity:.45}}
@media (max-width:760px){.coffee-grid{grid-template-columns:1fr}.cup-fig{max-width:200px;justify-self:start}}

/* ---------- footer ---------- */
.footer{background:var(--paper);color:var(--ink-2);border-top:1px solid var(--rule)}
.footer-in{max-width:1440px;margin:0 auto;padding:1.4rem var(--gr) calc(2.2rem + env(safe-area-inset-bottom)) var(--gl);display:grid;grid-template-columns:minmax(0,1fr);gap:.6rem 2rem;font:400 var(--mono-m)/1.5 var(--mono);letter-spacing:.02em}
@media (min-width:900px){.footer-in{grid-template-columns:auto minmax(0,1.3fr) minmax(0,1fr) auto}}
.footer a{color:var(--ink);text-decoration-color:var(--ul)}

/* ---------- entrance (JS adds .rv; no JS = everything simply visible) ---------- */
.js .rv{opacity:0;transform:translateY(16px);transition:opacity .7s cubic-bezier(.2,.7,.2,1),transform .7s cubic-bezier(.2,.7,.2,1)}
.js .rv.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.js .rv{opacity:1;transform:none;transition:none}}

/* ---------- forced colours / contrast ---------- */
@media (forced-colors:active){.fig-frame::before{display:none}.stamp,.stamp-notmet,.declaration,.chips li,.tags li{border-color:CanvasText}.pill.solid,.btn.primary{border-color:CanvasText}
  .rail ol::after{forced-color-adjust:none;background:Highlight}.plate-head::before{forced-color-adjust:none;height:1px;background:GrayText}.bar .who .face-dots{forced-color-adjust:none}
  .plate-head > span:first-child{border:1px solid CanvasText}.pull{border:1px solid CanvasText}}   /* the needle, the plate lines and the gold face are drawn with backgrounds, which forced colours would erase */
@media (prefers-contrast:more){:root{--ink-2:#2E3442;--rule:rgba(10,14,23,.5)}}

/* ---------- touch ---------- */
@media (pointer:coarse){
  .who{min-height:44px}
  .footer a{display:inline-block;padding:.55em 0}
  .year-table summary{min-height:44px;display:flex;align-items:center}
}
@media (max-height:500px){.bar{position:relative}}

/* count-up: real digits stay in the text; the running number is painted over them */
.num.counting{position:relative;color:transparent}
.num.counting::after{content:attr(data-shown);position:absolute;left:0;top:0;color:var(--ink);white-space:nowrap}
