/* Arris: two faces, one edge. Paper above (the workshop), Night below (the
 * Belt), and the arris between them. The faces are fixed by design, not by
 * the visitor's theme. Colour is for data: amber is live, red is the cut,
 * cyan is the world leaking through, the titanium colours are weight. */

:root {
  --paper: #f3eee3; --paper-ink: #151412; --paper-dim: #7a7368; --paper-line: #d9d1c1; --paper-panel: #ebe5d8;
  --night: #0c0e10; --night-ink: #f1ebdd; --night-dim: #8a847a; --night-line: #24282c; --night-panel: #121518;
  --amber: #ffb000; --cut: #e0402a; --leak: #3fd6ff;
  --t100: #a8804c; --t200: #804799; --t300: #4554cc; --t400: #4087e6; --t500: #a8cced;
  --t600: #f2cc61; --t700: #e67891; --t800: #9e66d1; --t900: #45c7a8;
  --sans: "Arris", ui-sans-serif, system-ui, sans-serif;
  --mono: "Arris Mono", ui-monospace, Menlo, Consolas, monospace;
  --c: 14px;                       /* the chamfer on panels */
  --gut: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.55; background: var(--night); color: var(--night-ink);
  font-variation-settings: "wght" 400, "GRAD" 0, "WTCH" 0; }
h1, h2, h3 { font-weight: inherit; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; font-variation-settings: "wght" 650, "GRAD" 0, "WTCH" 0; margin-bottom: 20px; }
h3 { font-size: 15px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; color: var(--dim); }
p { margin: 0 0 16px; max-width: 64ch; overflow-wrap: break-word; }
code, pre { font-family: var(--mono); }
code { font-size: .86em; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
section { padding: clamp(64px, 10vw, 128px) var(--gut-r) 0 var(--gut); max-width: calc(var(--max) + 40px); margin: 0 auto; }

/* the narrator: plain captions, each marked with a cut-corner square */
.note { font-family: var(--mono); font-size: 13.5px; line-height: 1.55; color: var(--dim); max-width: 60ch; }
.note::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .6em; vertical-align: -.02em;
  background: var(--accent); clip-path: polygon(0 0, 65% 0, 100% 35%, 100% 100%, 0 100%); }
.sub { color: var(--dim); }

/* ---------------------------------------------------------------- the bar */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gut-r) 10px var(--gut);
  background: color-mix(in srgb, var(--bar-bg, var(--paper)) 88%, transparent); color: var(--bar-ink, var(--paper-ink));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--bar-line, var(--paper-line));
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em; transition: background .4s, color .4s; }
.tab { display: grid; place-items: center; width: 28px; height: 24px; background: var(--amber); color: var(--night); text-decoration: none;
  font-family: var(--sans); font-variation-settings: "wght" 800, "GRAD" 0, "WTCH" 0; font-size: 15px;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%); }
.bar-name { font-family: var(--sans); font-size: 16px; font-variation-settings: "wght" 650, "GRAD" 0, "WTCH" 0; letter-spacing: 0; }
.ver { font-family: var(--mono); font-size: 10px; color: var(--paper-dim); font-variation-settings: normal; }
.bar nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.bar nav a { text-decoration: none; text-transform: uppercase; }
@media (hover: hover) { .bar nav a:hover { text-decoration: underline; } }
.bar nav .dl { color: var(--cut); }
body.past .bar { --bar-bg: var(--night); --bar-ink: var(--night-ink); --bar-line: var(--night-line); }
body.past .bar nav .dl { color: var(--amber); }
@media (max-width: 640px) { .bar nav a:not(.dl) { display: none; } }

/* ---------------------------------------------------------------- paper */
.face-paper { --bg: var(--paper); --ink: var(--paper-ink); --dim: var(--paper-dim); --line: var(--paper-line); --panel: var(--paper-panel); --accent: var(--cut);
  background: var(--bg); color: var(--ink); padding-bottom: clamp(64px, 10vw, 128px); color-scheme: light; }
.face-night { --bg: var(--night); --ink: var(--night-ink); --dim: var(--night-dim); --line: var(--night-line); --panel: var(--night-panel); --accent: var(--amber);
  background: var(--bg); color: var(--ink); color-scheme: dark; font-variation-settings: "wght" 400, "GRAD" -50, "WTCH" 0; }

.hero { padding-top: clamp(40px, 7vw, 96px); }
.mark { font-size: clamp(88px, 24vw, 330px); line-height: .86; letter-spacing: -.012em; margin-left: -.04em; user-select: none;
  touch-action: pan-y; cursor: crosshair; font-variation-settings: "wght" var(--w, 900), "GRAD" 0, "WTCH" var(--x, 0); }
.readout { display: flex; gap: 6px 24px; flex-wrap: wrap; margin: 18px 0 30px; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.readout b { font-weight: 400; color: var(--ink); display: inline-block; min-width: 3.5ch; font-variant-numeric: tabular-nums; }
.lede { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.35; max-width: 30ch; font-variation-settings: "wght" 350, "GRAD" 0, "WTCH" 0; }

.placard { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-top: 40px; border: 1px solid var(--ink); }
.placard div { padding: 10px 14px 12px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 0 -1px -1px 0; min-width: 0; }
.placard span { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.placard b { font-weight: inherit; font-variation-settings: "wght" 600, "GRAD" 0, "WTCH" 0; font-size: 17px; }

/* the watch, and how it's built: one instrument, two tabs */
.inst { display: grid; gap: 26px; }
.inst-tabs { justify-self: start; }
.inst-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.inst-panel[hidden] { display: none; }
.inst-panel { animation: inst-in .35s ease-out; }
@keyframes inst-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .inst-panel { animation: none; } }
.origin-hed { font-family: var(--sans); font-size: clamp(26px, 3.2vw, 40px); line-height: 1.08; letter-spacing: 0; text-transform: none; color: var(--ink);
  font-variation-settings: "wght" 650, "GRAD" 0, "WTCH" 0; margin-bottom: 16px; }

/* the watch */
.origin { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 820px) { .origin { grid-template-columns: 1fr; } }
.watch-wrap { display: grid; justify-items: center; gap: 18px; }
.watch { width: min(100%, 380px); aspect-ratio: 1; background: var(--night); color: var(--amber); display: grid; place-content: center; text-align: center; gap: 4px;
  clip-path: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%); }
.watch-date { font-family: var(--mono); font-size: clamp(12px, 3vw, 15px); letter-spacing: .14em; color: var(--night-dim); }
.watch-time { font-size: clamp(64px, 17vw, 112px); line-height: 1; font-variation-settings: "wght" 600, "GRAD" -50, "WTCH" 100; font-variant-numeric: tabular-nums; }
.watch.pixels .watch-time { font-feature-settings: "ss20" 1; }
.watch.leaking .watch-time { color: var(--leak); }
.watch-foot { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--night-dim); }
.switch { display: inline-flex; border: 1px solid var(--ink); }
.switch button { font: inherit; font-family: var(--mono); font-size: 13px; padding: 7px 14px; background: none; color: var(--ink); border: 0; cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* the upright: from the watch to the alphabet, a figure and a letter taken
   from the watch's pixels through the rule to Arris (site.js, transfer.json) */
.up-kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--cut); margin-bottom: 8px; }
.up-title { font-size: clamp(48px, 9vw, 136px); line-height: .95; letter-spacing: -.01em; max-width: 13ch; margin-bottom: 32px;
  font-variation-settings: "wght" 800, "GRAD" 0, "WTCH" 0; }
.tf { display: grid; gap: 14px; }
.tf-stage { background: var(--night); padding: clamp(18px, 4vw, 44px) clamp(18px, 5vw, 64px);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
#tf-svg { display: block; width: 100%; height: auto; max-height: 64vh; margin: 0 auto; overflow: visible; }
.tf-grid { fill: none; stroke: var(--night-line); stroke-width: 2; }
.tf-px, .tf-rule { fill: var(--amber); }
.tf-fill { fill: var(--night-ink); }
.tf-cut { fill: var(--cut); }
.tf-text { font-family: var(--sans); font-kerning: none; fill: var(--amber); }
.tf-ctl { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.tf-ctl input { flex: 1; min-width: 160px; accent-color: var(--cut); }
.tf-say { font-size: clamp(17px, 1.8vw, 20px); line-height: 1.45; max-width: 62ch; min-height: 2.9em; margin: 0; }
.tf-say b { font-weight: inherit; font-variation-settings: "wght" 650, "GRAD" 0, "WTCH" 0; }
.tf-pairs { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-pairs button { font: inherit; display: grid; gap: 2px; padding: 8px 14px 10px; background: none; color: var(--ink); border: 1px solid var(--line); cursor: pointer; text-align: left; }
.tf-pairs b { font-weight: inherit; font-size: 26px; line-height: 1.1; font-variation-settings: "wght" 600, "GRAD" 0, "WTCH" 0; }
.tf-pairs span { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--dim); }
.tf-pairs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tf-pairs button[aria-pressed="true"] span { color: var(--paper-line); }
.tf-also { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.tf-also span:first-child { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.tf-also-g { font-size: clamp(34px, 5vw, 60px); line-height: 1.1; word-spacing: .25em; font-variation-settings: "wght" 500, "GRAD" 0, "WTCH" 0; }
.up-weights .it-wtext { font-style: normal; }

/* the designspace: a dark instrument on the paper, so grade reads as it is
   meant to (light on dark) and the titanium colours keep their contrast */
.ds { display: grid; gap: 14px; margin-top: 8px; }
.ds-stage { position: relative; background: var(--night); padding: clamp(24px, 4vw, 52px) clamp(20px, 4vw, 48px); overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.ds-text, .ds-ghost { font-size: clamp(34px, 6.4vw, 92px); line-height: 1.1; margin: 0; max-width: none; outline: none; white-space: nowrap; }   /* one line, never rewrapped as it changes; the fade takes what overruns */
.ds-ghost { position: absolute; left: clamp(20px, 4vw, 48px); right: clamp(20px, 4vw, 48px); top: clamp(24px, 4vw, 52px); pointer-events: none;
  color: transparent; -webkit-text-stroke: 1px var(--cut); opacity: 0; transition: opacity .2s; }
.ds-stage.graded .ds-ghost { opacity: 1; }
.ds-text, .ds-ghost { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 90px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 90px), transparent); }
.ds-panel { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 14px; }
@media (max-width: 860px) { .ds-panel { grid-template-columns: 1fr; } }
.ds-mapbox { background: var(--night); color: var(--night-ink); padding: 14px 16px 12px; display: grid; gap: 10px; min-width: 0; }
.ds-pairs { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-pairs button, .ds-presets button, .ds-css button, .ds-fly { font: inherit; font-family: var(--mono); font-size: 12px; padding: 5px 10px; cursor: pointer;
  background: none; color: var(--night-dim); border: 1px solid var(--night-line); }
.ds-pairs button[aria-pressed="true"] { color: var(--night); background: var(--amber); border-color: var(--amber); }
.ds-mapwrap { display: grid; grid-template-columns: 1fr 26px; gap: 10px; }
.ds-map { position: relative; aspect-ratio: 7 / 5; touch-action: none; cursor: crosshair; outline-offset: 4px; }
.ds-map:focus-visible { outline: 2px solid var(--amber); }
.ds-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(5, 1fr); place-items: center;
  font-size: clamp(22px, 3.2vw, 44px); line-height: 1; user-select: none; }
.ds-cells span { opacity: .82; }
.ds-trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ds-cross { position: absolute; inset: 0; pointer-events: none; --px: calc(var(--x) * (100% - 100% / 7) + 50% / 7); --py: calc(var(--y) * (100% - 100% / 5) + 50% / 5); }
.ds-cross .h, .ds-cross .v { position: absolute; background: rgba(241,235,221,.35); }
.ds-cross .h { left: 0; right: 0; height: 1px; top: var(--py); }
.ds-cross .v { top: 0; bottom: 0; width: 1px; left: var(--px); }
.ds-cross b { position: absolute; left: var(--px); top: var(--py); width: 26px; height: 26px; translate: -50% -50%; border: 2px solid var(--amber);
  clip-path: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%); background: rgba(255,176,0,.18); }
.ds-third { position: relative; border: 1px solid var(--night-line); --u: .5; }
.ds-third i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--u) * 100%); background: rgba(255,176,0,.3); border-top: 2px solid var(--amber); }
.ds-third span { position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -90deg; white-space: nowrap; font-family: var(--mono); font-size: 11px; color: var(--night-ink); }
.ds-axislabels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--night-dim); padding-right: 36px; }
.ds-controls { display: grid; gap: 14px; align-content: start; min-width: 0; }
.ds-slider { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.ds-slider label { font-variation-settings: "wght" 600, "GRAD" 0, "WTCH" 0; font-size: 15px; }
.ds-slider label code { color: var(--dim); margin-left: 4px; }
.ds-slider input { grid-column: 1 / -1; grid-row: 2; width: 100%; accent-color: var(--ink); }
.ds-slider output { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.ds-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ds-fly { color: var(--ink); border-color: var(--ink); padding: 7px 14px; font-size: 13px; }
.ds-fly[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ds-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-presets button { color: var(--ink); border-color: var(--line); }
.ds-presets button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ds-css { display: flex; gap: 8px; align-items: center; background: var(--panel); padding: 8px 10px; min-width: 0; }
.ds-css code { flex: 1; min-width: 0; font-size: 12px; overflow-x: auto; white-space: nowrap; }
.ds-css button { color: var(--ink); border-color: var(--ink); }
.switch.small button { padding: 5px 12px; font-size: 12px; }
.switch.dark { border-color: var(--night-dim); }
.switch.dark button { color: var(--night-dim); }
.switch.dark button[aria-pressed="true"] { background: var(--night-ink); color: var(--night); }

/* the italic */
.italic { }
.it-kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--cut); margin-bottom: 8px; }
.it-title { font-style: italic; font-size: clamp(56px, 12vw, 176px); line-height: .95; letter-spacing: -.01em; outline: none;
  font-variation-settings: "wght" 800, "GRAD" 0, "WTCH" 0; margin-bottom: 26px; }
.it-lede { font-size: clamp(19px, 2vw, 23px); line-height: 1.45; max-width: 44ch; }
.it-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: 40px 0 14px; }
.it-pair { display: flex; justify-content: center; align-items: baseline; gap: .18em; padding: 18px 6px; font: inherit; font-size: clamp(60px, 8vw, 104px); line-height: 1.1;
  background: none; color: var(--ink); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: default;
  font-variation-settings: "wght" 500, "GRAD" 0, "WTCH" 0; }
.it-up { color: var(--dim); opacity: .55; }
.it-it { position: relative; font-style: italic; }
.it-g { transition: color .15s; }
.it-over { position: absolute; left: 0; top: 0; font-style: normal; color: transparent; -webkit-text-stroke: 1.5px var(--cut); opacity: 0; transition: opacity .15s; }
.it-pair:focus-visible .it-over, .it-pair.show .it-over { opacity: 1; }
.it-pair:focus-visible .it-g, .it-pair.show .it-g { color: var(--paper-line); }
@media (hover: hover) { .it-pair:hover .it-over { opacity: 1; } .it-pair:hover .it-g { color: var(--paper-line); } }
.it-wave { font-kerning: none; font-feature-settings: "kern" 0; font-style: italic; font-size: clamp(28px, 5.2vw, 72px); line-height: 1.15; margin: 56px 0 14px; cursor: crosshair; user-select: none; }
.it-line { display: block; white-space: pre; }
.it-weights { display: grid; margin: 56px 0 0; border-top: 1px solid var(--line); }
.it-wrow { display: grid; grid-template-columns: 15ch minmax(0, 1fr); align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.it-wlabel { font-family: var(--mono); font-size: 12px; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.it-wlabel i { width: 10px; height: 10px; clip-path: polygon(0 0, 65% 0, 100% 35%, 100% 100%, 0 100%); }
.it-wtext { font-style: italic; font-size: clamp(24px, 4vw, 48px); line-height: 1.2; white-space: nowrap; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 60px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 60px), transparent); }
.it-locl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; margin: 56px 0 14px; }
.it-locl-row { background: var(--panel); padding: 14px 18px 18px; display: grid; gap: 4px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
.it-lang { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.it-sample { font-style: italic; font-size: clamp(40px, 4.4vw, 60px); line-height: 1.1; font-variation-settings: "wght" 500, "GRAD" 0, "WTCH" 0; }

.field { margin: 40px 0 0; }
.field video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--night);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.field figcaption { margin-top: 12px; }

/* specimen */
.spec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; margin-bottom: 16px; }
@media (max-width: 860px) { .spec { grid-template-columns: 1fr; } }
.card { position: sticky; top: 72px; background: var(--night); color: var(--night-ink); padding: 16px 18px 18px;
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 0 100%); }
@media (max-width: 860px) { .card { position: static; } }
.card-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 13px; color: var(--amber); }
.card-head span:last-child { color: var(--night-dim); margin-right: 32px; }
.card-stage { position: relative; aspect-ratio: 1; overflow: hidden; }
.card-lines div { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid rgba(241,235,221,.14); }
.card-lines div.base { border-top-color: rgba(255,176,0,.7); }
.card-lines span { position: absolute; left: 2px; bottom: 3px; font-family: var(--mono); font-size: 10.5px; color: rgba(241,235,221,.45); white-space: nowrap; }
.card-glyph { position: absolute; left: 0; right: 0; text-align: center; white-space: pre; color: var(--night-ink);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); }
.card-ctl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-top: 10px; }
.card-side { display: grid; gap: 10px; justify-items: start; }
.card-metrics { display: grid; gap: 2px; }
.tri { display: block; width: 100%; max-width: 240px; height: auto; touch-action: none; cursor: crosshair; overflow: visible; }
.tri-edge { fill: rgba(241,235,221,.03); stroke: rgba(241,235,221,.28); stroke-width: 1; }
.tri-median { stroke: rgba(241,235,221,.16); stroke-dasharray: 3 4; }
.tri-label { font-family: var(--mono); font-size: 9.5px; fill: var(--night-dim); }
.tri-shape { fill: rgba(255,176,0,.2); stroke: var(--amber); stroke-width: 1.2; stroke-linejoin: round; }
.tri-handle { cursor: grab; outline: none; }
.tri-handle polygon { fill: var(--night); stroke: var(--amber); stroke-width: 2; }
.tri-handle:focus-visible polygon { fill: var(--amber); }
.tri-reset { font: inherit; font-family: var(--mono); font-size: 11px; padding: 4px 10px; background: none; color: var(--night-dim); border: 1px solid var(--night-line); cursor: pointer; }
.grid-wait { grid-column: 1 / -1; padding: 24px 14px; margin: 0; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.card-name { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; min-height: 2.6em; }
.card-metrics { font-family: var(--mono); font-size: 11px; color: var(--night-dim); }
.groups { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.groups button { font: inherit; font-family: var(--mono); font-size: 12px; padding: 5px 10px; background: none; color: var(--ink); border: 1px solid var(--line); cursor: pointer; }
.groups button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.groups small { opacity: .6; margin-left: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line);
  max-height: 560px; overflow-y: auto; overscroll-behavior: contain; }
.grid button { font: inherit; font-size: 24px; line-height: 1; aspect-ratio: 1; background: none; color: var(--ink); border: 0;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: cell; padding: 0; min-width: 0; }
@media (hover: hover) { .grid button:hover { background: var(--panel); } }
.grid button[aria-selected="true"] { background: var(--cut); color: var(--paper); }

/* features */
.feat-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); border-top: 1px solid var(--line); }
.feat { display: grid; grid-template-columns: 5ch minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.feat code { color: var(--cut); font-size: 13px; }
.feat .off, .feat .on { font-size: clamp(22px, 6vw, 30px); line-height: 1.1; font-variation-settings: "wght" 450, "GRAD" 0, "WTCH" 0; white-space: nowrap; }
.feat .off { color: var(--dim); }
.feat .arrow { color: var(--dim); font-size: 14px; }
.feat .what { grid-column: 2 / -1; font-family: var(--mono); font-size: 12.5px; color: var(--dim); margin-top: -4px; }

/* measured, not eyeballed: each method shown in the font itself. A stage's
   text sits in a 1.225 em line (the font's ascender to descender), so its
   baseline is 0.975 em down and a guide at v units sits (975 - v) / 1000 em
   down */
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.m { margin: 0; background: var(--panel); padding: 18px 20px 20px; min-width: 0;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%); }
.m figcaption { font-size: 15px; line-height: 1.5; margin-top: 12px; }
.m figcaption b { font-weight: inherit; font-variation-settings: "wght" 650, "GRAD" 0, "WTCH" 0; }
.m-stage { position: relative; font-size: clamp(64px, 9vw, 120px); line-height: 1.225; height: 1.225em; white-space: nowrap; overflow: hidden; }
.m-line { position: absolute; left: 0; right: 0; top: calc((975 - var(--v)) / 1000 * 1em); height: 0; border-top: 1px solid var(--cut); opacity: .55; }
.m-line.base { opacity: .9; }
.m-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.m-head .sub { margin: 0; max-width: 52ch; }
.m-grid { --mx: 0; }
.m-num { position: absolute; top: 4px; font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--cut); }
.m-over .m-hs { font-variation-settings: "wght" 400, "GRAD" 0, "WTCH" var(--mx); }
.m-over .m-num { right: 150px; }
.lens { position: absolute; right: 6px; top: 50%; width: 128px; height: 128px; margin-top: -64px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--cut); background: var(--paper); }
.lens-in { position: absolute; line-height: 1.225; white-space: nowrap; color: var(--ink); }
.lens-line { position: absolute; left: -10em; width: 30em; top: .255em; height: 0; border-top: 1px solid var(--cut); }
.m-centre span { font-variation-settings: "wght" 300, "GRAD" 0, "WTCH" var(--mx); letter-spacing: .04em; }
.m-centre .m-num { right: 0; }
.m-line.mid { border-top-style: dashed; opacity: .9; }
.m-small { display: flex; gap: .7em; align-items: flex-start; height: auto; }
.m-col { display: inline-flex; flex-direction: column; font-variation-settings: "wght" 500, "GRAD" 0, "WTCH" 0; }
.m-col small { font-family: var(--mono); font-size: 12px; line-height: 1; color: var(--cut); margin-top: -.6em; font-variation-settings: normal; }
.frac-sub { font-feature-settings: "subs" 1; }
.m-scaled > span > span { font-size: .62em; position: relative; top: .18em; }
.m-bars { display: flex; gap: .7em; }
.m-bars span { position: relative; }
.m-bars small { position: absolute; left: 100%; bottom: .3em; margin-left: .15em; font-family: var(--mono); font-size: 13px; color: var(--cut); font-variation-settings: normal; }
.m-open { display: flex; justify-content: space-between; font-size: clamp(56px, 7vw, 96px); }
.m-open span { letter-spacing: .02em; }
.m-squint span { display: inline-block; font-variation-settings: "wght" 900, "GRAD" 0, "WTCH" 0; filter: blur(var(--blur, 0px)); }
.m-ctl { display: flex; gap: 12px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.m-ctl input { flex: 1; accent-color: var(--cut); }

/* ---------------------------------------------------------------- the arris */
.crossing { max-width: none; padding: 0; height: 220vh; position: relative; background: var(--night); }
.crossing-sticky { position: sticky; top: 0; --h: 100vh; height: var(--h); overflow: hidden; --p: 0; }
@supports (height: 100svh) { .crossing-sticky { --h: 100svh; } }
.cface { position: absolute; inset: 0; display: grid; align-items: end; padding: 0 var(--gut-r) 48px var(--gut); }
.cface span { font-size: clamp(56px, 13vw, 200px); line-height: .9; }
.cface-paper { background: var(--paper); color: var(--paper-ink); font-variation-settings: "wght" 200, "GRAD" 0, "WTCH" 0; }
/* the edge runs at 45 degrees: its top at X, its bottom at X minus the
   stage's own height (--h, the one it is drawn across: on a phone 100vh
   and 100svh differ, and the edge leant off the slogan's 45); X sweeps
   from past the right edge (all paper) to 0 */
.crossing-sticky { --x: calc((1 - var(--p)) * (100vw + var(--h))); }
.cface-night { background: var(--night); color: var(--amber); justify-items: end; align-items: start; padding-top: 96px;
  font-variation-settings: "wght" 850, "GRAD" -60, "WTCH" 0;
  clip-path: polygon(var(--x) 0, 100% 0, 100% 100%, calc(var(--x) - var(--h)) 100%); }
.cface-cut { background: var(--cut); clip-path: polygon(calc(var(--x) - 7px) 0, 100% 0, 100% 100%, calc(var(--x) - var(--h) - 7px) 100%); }
/* the one line of slogan rides the cut, the scissors at the middle of the
   edge and a dashed cut line running on ahead of them, as on the deck's
   strip; both sit just off the red band, on the paper side */
.crossing-sticky { --f: .5; --ax: calc(var(--x) - var(--h) * var(--f) - 4px); }   /* the scissors, --f down the edge */
@media (max-width: 640px) { .crossing-sticky { --f: .4; } }                        /* room below them for the whole line */
.slogan, .slogan-cut { position: absolute; left: var(--ax); top: calc(var(--f) * 100%); margin: 0; height: 1.4em; margin-top: -.7em; line-height: 1.4em; white-space: nowrap;
  font-family: var(--mono); font-size: clamp(13px, 1.6vw, 17px); color: var(--cut); opacity: var(--o, 0); transform-origin: 0 50%; }
.slogan { max-width: none; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-45deg) translate(calc(-100% - .9em), -18px); }
.slogan-cut { display: flex; align-items: center; gap: .5em; width: 160vmax; transform: rotate(-45deg) translate(-.6em, -18px); }
.slogan-x { font-family: var(--sans); font-size: 1.9em; line-height: 1; }
.slogan-dash { flex: 1; height: 2px; background: repeating-linear-gradient(to right, var(--cut) 0 7px, transparent 7px 14px); }
@media (prefers-reduced-motion: reduce) {
  .crossing { height: auto; } .crossing-sticky { position: relative; --h: 60vh; --p: .5 !important; }
}

/* ---------------------------------------------------------------- night */
.face-night section:first-child { padding-top: clamp(64px, 9vw, 112px); }
.prop-row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.prop-row.reverse > .prop { order: 2; }
@media (max-width: 860px) { .prop-row { grid-template-columns: 1fr; } .prop-row.reverse > .prop { order: 0; } }
.prop-side { display: grid; gap: 16px; min-width: 0; }
.prop-side video { display: block; width: 100%; height: auto; background: #000;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); }
.prop { min-width: 0; }
.leak { color: var(--leak); text-decoration: none; }
.leak:focus-visible { text-decoration: underline; text-decoration-color: var(--leak); }
@media (hover: hover) { .leak:hover { text-decoration: underline; text-decoration-color: var(--leak); } }

/* paperwork: documents laid on the desk at angles, Departure-style; each
   straightens and comes to the top under the pointer */
.desk { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: end; }
@media (max-width: 980px) { .desk { grid-template-columns: 1fr; } }
.pile { position: relative; min-height: 760px; }
.doc { position: absolute; color: #1d1b17; box-shadow: 0 1px 0 rgba(0,0,0,.25), 0 18px 40px -12px rgba(0,0,0,.7); transform: rotate(var(--r, 0deg));
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2), box-shadow .35s; cursor: default; }
.doc:has(:focus-visible), .doc.lift { transform: rotate(0deg) translateY(-6px) scale(1.02); z-index: 10; box-shadow: 0 1px 0 rgba(0,0,0,.25), 0 30px 60px -14px rgba(0,0,0,.8); }
@media (hover: hover) { .doc:hover { transform: rotate(0deg) translateY(-6px) scale(1.02); z-index: 10; box-shadow: 0 1px 0 rgba(0,0,0,.25), 0 30px 60px -14px rgba(0,0,0,.8); } }
.redact { background: #1d1b17; color: #1d1b17; padding: 0 .15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.redact::selection { background: var(--cut); color: #fff; }

.clip { left: 0; top: 30px; width: min(470px, 62%); background: #ebe4d2; padding: 18px 22px 46px; z-index: 1;
  clip-path: polygon(0 0, 100% 0, 100% 93%, 96% 95%, 91% 93.5%, 85% 96%, 79% 94%, 72% 96.5%, 66% 94.5%, 58% 97%, 51% 94.5%, 44% 96.5%, 37% 94%, 30% 96.5%, 23% 94.5%, 16% 97%, 9% 94.5%, 4% 96%, 0 94%); }
.clip-mast { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px double #1d1b17; padding-bottom: 6px;
  font-size: 30px; font-variation-settings: "wght" 800, "GRAD" 0, "WTCH" 0; letter-spacing: -.01em; }
.clip-mast span:last-child { font-size: 13px; font-style: italic; font-variation-settings: "wght" 500, "GRAD" 0, "WTCH" 0; }
.clip-date { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; padding: 5px 0 10px; border-bottom: 1px solid #1d1b17; }
.clip-hed { font-family: var(--sans); text-transform: none; letter-spacing: -.01em; color: #1d1b17; font-style: italic; font-size: 31px; line-height: 1.05; margin: 12px 0 8px;
  font-variation-settings: "wght" 800, "GRAD" 0, "WTCH" 0; }
.clip-dek { font-size: 14px; line-height: 1.35; margin: 0 0 10px; font-variation-settings: "wght" 500, "GRAD" 0, "WTCH" 0; }
.clip-cols { columns: 2; column-gap: 18px; font-size: 12px; line-height: 1.45; }
.clip-cols p { margin: 0 0 8px; }

.manifest { right: 4%; top: 0; width: min(430px, 56%); background: #f4f1e8; padding: 16px 30px 18px; z-index: 2; font-family: var(--mono); font-size: 12px;
  background-image: radial-gradient(circle at 10px 12px, #2a2a2a 4px, transparent 4.5px), radial-gradient(circle at calc(100% - 10px) 12px, #2a2a2a 4px, transparent 4.5px);
  background-size: 100% 24px; background-repeat: repeat-y; }
.man-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed #1d1b17; padding-bottom: 6px; margin-bottom: 6px; }
.man-head b { font-family: var(--sans); font-size: 26px; font-variation-settings: "wght" 800, "GRAD" 0, "WTCH" 0; }
.manifest table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.manifest th { text-align: left; font-weight: 400; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #6b665c; padding: 2px 6px 4px 0; }
.manifest td { padding: 4px 6px 4px 0; border-top: 1px dotted #b8b1a2; white-space: nowrap; }
.manifest td:nth-child(3), .manifest th:nth-child(3) { text-align: right; }
.manifest .held td { text-decoration: line-through; text-decoration-color: var(--cut); }
.man-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11px; }
.stamp { color: var(--cut); border: 2px solid var(--cut); padding: 2px 10px; font-size: 20px; letter-spacing: .2em; transform: rotate(-9deg); opacity: .85;
  font-family: var(--sans); font-variation-settings: "wght" 900, "GRAD" 0, "WTCH" 0; }

.ticket { left: 30%; top: 420px; width: 330px; background: var(--amber); padding: 14px 18px 12px 30px; z-index: 3;
  background-image: radial-gradient(circle at 0 50%, transparent 0 0), repeating-linear-gradient(to bottom, #0c0e10 0 5px, transparent 5px 10px);
  background-size: 2px 100%; background-position: 14px 0; background-repeat: no-repeat; background-color: var(--amber); }
.tk-line { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.tk-route { display: flex; gap: 10px; align-items: baseline; font-size: 24px; font-variation-settings: "wght" 750, "GRAD" 0, "WTCH" 0; margin: 4px 0 10px; }
.tk-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid #0c0e10; border-bottom: 1.5px solid #0c0e10; }
.tk-grid div { padding: 4px 6px 6px 0; display: grid; }
.tk-grid div + div { border-left: 1px solid rgba(12,14,16,.4); padding-left: 8px; }
.tk-grid span { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; }
.tk-grid b { font-weight: inherit; font-size: 26px; line-height: 1.1; font-variation-settings: "wght" 700, "GRAD" 0, "WTCH" 100; }
.px { font-feature-settings: "ss20" 1; }
.frac { font-feature-settings: "frac" 1; }
.tk-foot { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; margin-top: 8px; }

.receipt { left: 4%; top: 520px; width: 230px; background: #fbfaf6; padding: 16px 16px 22px; z-index: 4;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 92% 98%, 84% 100%, 76% 98%, 68% 100%, 60% 98%, 52% 100%, 44% 98%, 36% 100%, 28% 98%, 20% 100%, 12% 98%, 4% 100%, 0 98%); }
/* torn, not cut: belt.js draws the tear (--tear) and the paler core of the
   paper just outside it (--rim) under the text; the zigzags above stay for
   a page without its script. A drop shadow, which follows the tear, stands
   in for the box shadow that clipping would cut away */
.doc.torn { background: none; clip-path: none; box-shadow: none; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)) drop-shadow(0 16px 18px rgba(0,0,0,.5)); }
.doc.torn:has(:focus-visible), .doc.torn.lift { box-shadow: none; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)) drop-shadow(0 26px 26px rgba(0,0,0,.55)); }
@media (hover: hover) { .doc.torn:hover { box-shadow: none; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)) drop-shadow(0 26px 26px rgba(0,0,0,.55)); } }
.doc.torn::before, .doc.torn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--torn-paper); clip-path: var(--tear); }
.doc.torn::after { z-index: -2; background: var(--torn-core); clip-path: var(--rim); }
.clip.torn { --torn-paper: #ebe4d2; --torn-core: #fbf8ef; }
.receipt.torn { --torn-paper: #fbfaf6; --torn-core: #dcd8ce; }
.rc-head { font-style: italic; font-size: 24px; line-height: 1.05; text-align: center; font-variation-settings: "wght" 750, "GRAD" 0, "WTCH" 0; }
.rc-sub { font-family: var(--mono); font-size: 10px; text-align: center; color: #6b665c; margin: 4px 0 10px; }
.rc-rows { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; border-top: 1px dashed #1d1b17; padding-top: 6px; }
.rc-rows div { display: flex; justify-content: space-between; padding: 2px 0; }
.rc-total { border-top: 1px dashed #1d1b17; margin-top: 6px; padding-top: 6px !important; font-weight: 700; }
.rc-foot { font-family: var(--mono); font-size: 9.5px; text-align: center; margin-top: 12px; color: #6b665c; }

.badge { right: 8%; top: 450px; width: 210px; background: #e9eef0; padding: 14px 16px 16px; z-index: 5; border-top: 10px solid var(--leak);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
@media (hover: hover) { .badge:hover { transform: rotate(3deg) translate(-40px, -14px) scale(1.03); } }
.bd-top { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: #2d5560; }
.bd-name { font-size: 24px; line-height: 1.1; margin-top: 8px; font-variation-settings: "wght" 700, "GRAD" 0, "WTCH" 0; }
.bd-role { font-style: italic; font-size: 15px; color: #2d5560; }
.bd-num { font-size: 52px; line-height: 1; margin: 10px 0 6px; font-variation-settings: "wght" 600, "GRAD" 0, "WTCH" 100; color: #0c0e10; }
.bd-foot { font-family: var(--mono); font-size: 9.5px; color: #4f7480; }
.desk-notes { display: grid; gap: 4px; }

@media (max-width: 820px) {
  .pile { min-height: 0; display: grid; gap: 0; justify-items: center; }
  .doc { position: relative; left: auto; right: auto; top: auto; width: min(100%, 440px); margin-top: -18px; }
  .doc:first-child { margin-top: 0; }
  .receipt, .badge, .ticket { width: min(86%, 330px); }
}

/* the article: a paper sheet on the dark; each line's weight is set by
   where it stands in the window (js), from Thin below to the reading
   weight above */
.sheet-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center;
  --x: clamp(-60px, -4vw, 0px); --tilt: -.6deg; }
.sheet { grid-area: 2 / 1; position: relative; z-index: 2; width: min(100%, 760px); min-width: 0; background: #f1ece0; color: #1a1915;
  padding: clamp(24px, 5vw, 64px) clamp(20px, 5vw, 72px) clamp(32px, 5vw, 64px);
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%);
  transform-origin: 50% 0; transform: translateX(var(--x)) perspective(1800px) rotateX(0deg) rotate(var(--tilt));
  transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .4s; }
.sheet-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--cut); }
.sheet-hed { font-family: var(--sans); text-transform: none; letter-spacing: -.01em; color: inherit; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; margin: 10px 0 14px;
  font-variation-settings: "wght" 700, "GRAD" 0, "WTCH" 0; }
.sheet-dek { font-style: italic; font-size: clamp(18px, 2vw, 22px); line-height: 1.4; max-width: none; font-variation-settings: "wght" 400, "GRAD" 0, "WTCH" 0; }
.sheet-by { font-family: var(--mono); font-size: 12px; color: #6b665c; padding-bottom: 14px; border-bottom: 1px solid #1a1915; }
.sheet-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(90px, 100%), 1fr)); gap: 8px; padding: 14px 0; border-bottom: 1px solid #cfc7b5; margin-bottom: 26px; }
.sheet-nums b { display: block; font-weight: inherit; font-size: 28px; line-height: 1.1; font-variation-settings: "wght" 650, "GRAD" 0, "WTCH" 0; font-variant-numeric: tabular-nums; }
.sheet-nums span { font-family: var(--mono); font-size: 10.5px; color: #6b665c; }
.sheet-body { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; }
.sheet-body p { max-width: none; margin: 0 0 1.1em; }
.taper { font-variation-settings: "wght" 430, "GRAD" 0, "WTCH" 0; }
.taper .tl { display: block; white-space: nowrap; }
.taper > span:not(.tl) { white-space: nowrap; }   /* measuring: a word is never broken at its hyphens */
.taper .k { font-variation-settings: "wght" 430, "GRAD" 0, "WTCH" 0; }
.pull { font-style: italic; font-size: 1.45em; line-height: 1.3; font-variation-settings: "wght" 650, "GRAD" 0, "WTCH" 0; padding: 14px 0; margin: 18px 0 !important;
  border-top: 2px solid #1a1915; border-bottom: 2px solid #1a1915; }
/* the next story, a file standing behind the page you read: its tab and
   head rise over the page's top edge, off to the right and square to the
   page (the same lean), and the rest goes down behind the page and on
   down its side, a shade off the night that darkens into it, so it sits a
   layer down. The tab is cut like the letters, and so is the page's top
   right corner, by --c; the tab's height is --lip, its width --tab. It rises a little under the pointer; a tap drops it behind
   as the page folds away, and it comes back up with the story you left
   (belt.js) */
.sheet-wrap { --card: min(380px, calc(100% - 24px)); --tuck: 28px; --lip: 30px; --tab: 132px; --c: 14px; }
.next { grid-area: 1 / 1; justify-self: end; position: relative; z-index: 1; width: var(--card); padding: 0; border: 0;
  margin: 0 max(12px, calc(50% - 434px - var(--x))) calc(-1 * var(--tuck)) 0;
  background: none; font: inherit; text-align: left; color: var(--night-ink); cursor: pointer;
  filter: drop-shadow(0 -1px 0 rgba(241,235,221,.1));
  transform: translateY(0) rotate(var(--tilt)); transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.next::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 240px; pointer-events: none;
  background: linear-gradient(#101316, rgba(16,19,22,0)); }
.next-card { position: relative; display: grid; gap: 4px; padding: calc(var(--lip) + 14px) 22px calc(var(--tuck) + 20px);
  background: linear-gradient(180deg, #1f2429, #15181c 65%, #101316);
  clip-path: polygon(0 0, var(--tab) 0, calc(var(--tab) + var(--lip)) var(--lip), calc(100% - var(--c)) var(--lip), 100% calc(var(--lip) + var(--c)), 100% 100%, 0 100%);
  transition: filter .3s; }
.next-card::before { content: ""; position: absolute; left: 0; top: 0; width: var(--tab); height: 2px; background: var(--amber); }
.next-turn { position: absolute; left: 0; top: 0; height: var(--lip); display: flex; align-items: center; gap: 8px; padding: 2px 0 0 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.next-turn i { display: inline-block; font-style: normal; transition: transform .25s; }
.next-top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.next-kicker { color: var(--cut); }
.next-n { flex: none; color: var(--night-dim); }
.next-hed { margin-top: 4px; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.12; color: #e8e2d4; font-variation-settings: "wght" 680, "GRAD" -50, "WTCH" 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.next-dek { margin-top: 2px; font-style: italic; font-size: 14.5px; line-height: 1.38; color: #a9a396; font-variation-settings: "wght" 400, "GRAD" -50, "WTCH" 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.next:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
@media (hover: hover) {
  .next:hover { transform: translateY(-8px) rotate(var(--tilt)); }
  .next:hover .next-card { filter: brightness(1.25); }
  .next:hover .next-turn i { transform: translateX(4px); }
}
.sheet-wrap.turning .next { opacity: 0; transform: translateY(56px) rotate(var(--tilt)); transition: transform .3s ease-in, opacity .3s ease-in; }
.sheet.fold { opacity: 0; transform: translateX(var(--x)) perspective(1800px) rotateX(-80deg) rotate(var(--tilt));
  transition: transform .34s cubic-bezier(.55,0,.85,.35), opacity .34s ease-in; }
.sheet.unfold { opacity: 0; transform: translateX(var(--x)) perspective(1800px) rotateX(70deg) rotate(var(--tilt)); transition: none; }
@media (prefers-reduced-motion: reduce) { .sheet, .next { transition: none; } }
.sheet-fig { margin: 4px 0 1.4em auto; width: min(100%, 78%); }
.sheet-fig video { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 804; background: #000; }
.sheet-fig figcaption { font-family: var(--mono); font-size: 11px; color: #6b665c; margin-top: 6px; }
@media (max-width: 640px) { .sheet-fig { width: 100%; } }
.reading, .desk { overflow-x: clip; }
@media (max-width: 640px) { .sheet-wrap { --x: 0px; --tilt: -.3deg; --tuck: 22px; --card: min(340px, calc(100% - 48px)); } }

.dock { background: #3a3c3e linear-gradient(135deg, #45474a, #2c2e30); color: #e9e2d0; padding: clamp(18px, 3vw, 32px); display: grid; gap: 8px;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%); }
.dock-head { font-size: clamp(40px, 7vw, 76px); line-height: 1; color: var(--amber); font-variation-settings: "wght" 800, "GRAD" 0, "WTCH" 0; margin-bottom: 12px; }
.dock-langs { display: block; font-size: .3em; letter-spacing: .04em; margin-top: 8px; font-variation-settings: "wght" 600, "GRAD" 0, "WTCH" 0; }
.bay { display: grid; grid-template-columns: auto 1fr; gap: 0 20px; align-items: end; border-top: 3px solid #e9e2d0; padding-top: 8px; }
.bay b { font-weight: inherit; font-size: clamp(56px, 10vw, 104px); line-height: .9; font-variation-settings: "wght" 700, "GRAD" 0, "WTCH" 0; font-variant-numeric: tabular-nums; }
.bay span { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; padding-bottom: 8px; }

.survey { background: #06141a; color: #d8f6ff; padding: clamp(18px, 3vw, 28px); font-family: var(--mono); border: 1px solid #12303a;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%); }
.survey-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--sans); font-size: clamp(28px, 4vw, 44px);
  font-variation-settings: "wght" 700, "GRAD" -50, "WTCH" 0; }
.survey-head span:last-child { font-family: var(--mono); font-size: 13px; color: #4f7480; }
.survey-head b { font-weight: 400; color: var(--leak); }
.survey-sub { font-size: 11.5px; color: #4f7480; margin: 6px 0 18px; letter-spacing: .04em; }
.survey table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.survey th { text-align: left; font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #4f7480; padding: 0 0 8px; }
.survey td { padding: 7px 0; border-top: 1px solid #12303a; }
.survey td:last-child, .survey th:last-child { text-align: right; }
.survey td:first-child { color: #4f7480; width: 3ch; }
.survey .leak-row td { color: transparent; text-shadow: 0 0 0 #2d5560; transition: color .25s, text-shadow .25s; }
.survey .leak-row.on td { color: var(--leak); text-shadow: none; }
@media (hover: hover) { .survey .leak-row:hover td { color: var(--leak); text-shadow: none; } }
.survey tfoot td { border-top: 1px solid #2d5560; color: #d8f6ff; padding-top: 9px; }
.survey tfoot td:first-child { color: #4f7480; }
.survey.leaking tfoot td:last-child { color: var(--leak); }

/* Arris Mono: one cell is 0.578 em wide (1ch) and box drawing spans
   1.225 em, so a 1.225 line-height joins frames row to row */
.mono-lede { font-size: clamp(19px, 2vw, 23px); line-height: 1.45; max-width: 46ch; }
.mono h3.lig-title { margin: 56px 0 14px; }
.editor { --code-bg: #0a0b0c; background: var(--code-bg); border: 1px solid var(--line); margin-top: 28px;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%); }
.ed-bar { display: flex; justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.ed-tabs { display: flex; overflow-x: auto; }
.ed-tabs button, .ed-tools button { font: inherit; font-family: var(--mono); font-size: 13px; background: none; color: var(--dim); border: 0; padding: 11px 16px; cursor: pointer; white-space: nowrap; }
.ed-tabs button[aria-selected="true"] { color: var(--ink); background: #111417; box-shadow: inset 0 -2px 0 var(--amber); }
.ed-tools { display: flex; flex-wrap: wrap; padding-right: 18px; }
.ed-tools button[aria-pressed="true"] { color: var(--amber); }
.ed-tools button[aria-pressed="true"]::before { content: "■ "; }
.ed-tools button[aria-pressed="false"]::before { content: "□ "; }
.ed-tools code { font-size: inherit; }
.ed-body { display: grid; grid-template-columns: auto minmax(0, 1fr); font-family: var(--mono); font-size: clamp(13px, 1.45vw, 17px); line-height: 1.6; }
.ed-nums { margin: 0; padding: 18px 14px 22px 18px; color: #3a4148; text-align: right; user-select: none; }
.ed-code { margin: 0; padding: 18px 20px 22px 4px; overflow-x: auto; outline: none; color: var(--night-ink); tab-size: 4; min-height: 12em;
  font-variant-ligatures: contextual; font-feature-settings: "calt" 1; }
.editor.no-calt .ed-code { font-feature-settings: "calt" 0; }
.editor.ss03 .ed-code { font-feature-settings: "calt" 1, "ss03" 1; }
.editor.no-calt.ss03 .ed-code { font-feature-settings: "calt" 0, "ss03" 1; }
.editor.bold .ed-code { font-weight: 700; }
.editor.ital .ed-code { font-style: italic; }
.editor.cells .ed-code { background-image: repeating-linear-gradient(90deg, rgba(255,176,0,.13) 0 1px, transparent 1px 1ch),
  repeating-linear-gradient(180deg, rgba(255,176,0,.08) 0 1px, transparent 1px 1.6em);
  background-origin: content-box; background-clip: content-box; background-attachment: local; }
.ed-code .kw { color: var(--amber); } .ed-code .ty { color: var(--t500); } .ed-code .st { color: var(--t900); }
.ed-code .nu { color: var(--t700); } .ed-code .fn { color: var(--t600); } .ed-code .cm { color: var(--night-dim); font-style: italic; }
/* keywords and comments in the Mono's cursive italic, as cursive coding faces set them */
.ed-code .kw { font-style: italic; }

.ligs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.lig { position: relative; display: grid; justify-items: center; gap: 10px; padding: 22px 6px 14px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: none; color: var(--ink); font: inherit; cursor: default; min-width: 0; }
.lig-sign { position: relative; font-family: var(--mono); font-size: clamp(40px, 5.4vw, 64px); line-height: 1.225; white-space: pre; }
.lig-sign { transition: color .15s; }
.lig-raw { position: absolute; inset: 0; font-feature-settings: "calt" 0; color: transparent; -webkit-text-stroke: 2px var(--cut); opacity: 0; transition: opacity .15s; }
.lig:focus-visible .lig-sign, .lig.show .lig-sign { color: #4a4f55; }
@media (hover: hover) { .lig:hover .lig-sign { color: #4a4f55; } }
.lig-sign::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .15s;
  background-image: repeating-linear-gradient(90deg, rgba(224,64,42,.5) 0 1px, transparent 1px 1ch); background-size: calc(100% - 1px) 100%; border-right: 1px solid rgba(224,64,42,.5); }
.lig:focus-visible .lig-raw, .lig.show .lig-raw, .lig:focus-visible .lig-sign::after, .lig.show .lig-sign::after { opacity: 1; }
@media (hover: hover) { .lig:hover .lig-raw, .lig:hover .lig-sign::after { opacity: 1; } }
.lig-chars { font-family: var(--mono); font-size: 12px; color: var(--dim); font-feature-settings: "calt" 0; letter-spacing: .2em; }
.lig-group { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber);
  padding: 10px 12px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.never { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; margin: 22px 0 10px; font-family: var(--mono); font-size: clamp(22px, 3vw, 32px); }
.never-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

.tui { margin: 0; font-family: var(--mono); font-size: clamp(9.5px, 2.15vw, 21px); line-height: 1.225; color: #d7dde2; background: #0a0b0c;
  padding: clamp(14px, 2.4vw, 26px); border: 1px solid var(--line); overflow-x: auto; }
.tui .p1 { background: var(--amber); color: var(--night); } .tui .p1f { color: var(--amber); }
.tui .p2 { background: #2a2f35; color: var(--night-ink); } .tui .p2f { color: #2a2f35; }
.tui .p3 { color: var(--t700); } .tui .ok { color: var(--t900); } .tui .dim { color: var(--night-dim); }
.tui .w1 { color: var(--t100); } .tui .w4 { color: var(--t400); } .tui .w9 { color: var(--t900); }

.shopfront { background: #1b1410; border-top: 10px solid var(--t600); padding: clamp(22px, 4vw, 40px); display: grid; gap: 10px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 26px 100%, 0 calc(100% - 26px)); }
.shop-name { font-style: italic; font-size: clamp(44px, 7.5vw, 92px); line-height: 1; color: var(--t600); font-variation-settings: "wght" 750, "GRAD" -50, "WTCH" 0; }
.shop-sub { font-style: italic; font-size: clamp(20px, 2.6vw, 30px); color: var(--t700); font-variation-settings: "wght" 400, "GRAD" -50, "WTCH" 0; }
.shop-hours { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--night-dim); }

.build p { font-size: 20px; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.checks li { background: var(--panel); padding: 16px 18px; font-size: 15.5px;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, 0 100%); }
.checks b { font-weight: inherit; font-variation-settings: "wght" 650, "GRAD" -50, "WTCH" 0; color: var(--amber); display: block; }

.dl-button { display: inline-flex; align-items: baseline; gap: 14px; background: var(--amber); color: var(--night); text-decoration: none; padding: 16px 28px 18px;
  font-size: clamp(24px, 3vw, 34px); font-variation-settings: "wght" 750, "GRAD" 0, "WTCH" 0; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  transition: font-variation-settings .2s; }
@media (hover: hover) { .dl-button:hover { font-variation-settings: "wght" 750, "GRAD" 100, "WTCH" 0; } }
.dl-button small { font-family: var(--mono); font-size: 13px; font-variation-settings: normal; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; margin: 40px 0 28px; }
.dl-grid > div { min-width: 0; }
.dl-grid ul { margin: 0; padding-left: 18px; font-size: 16px; }
.dl-grid li { margin-bottom: 6px; }
.css { margin: 0 0 10px; background: var(--panel); padding: 16px; font-size: 13px; line-height: 1.6; overflow-x: auto; }
.copy { font: inherit; font-family: var(--mono); font-size: 13px; padding: 7px 14px; background: none; color: var(--ink); border: 1px solid var(--ink); cursor: pointer; }
.licence { font-size: 16px; color: var(--dim); }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 96px auto 0; max-width: calc(var(--max) + 40px);
  padding: 18px var(--gut-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gut); border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--dim); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
