/* Quench. A black workshop: the page has no light of its own.
   Colour comes from three places only: the blade's glow (canvas, laid over the page with screen
   blending, so its light falls on the type), the --glow-* variables the scene writes for lit type,
   and the heat that the pointer leaves in bars, links and table rows. */

/* The two families, served from this folder (latin subsets; licence texts beside them in fonts/). Newsreader is one
   variable file with its optical size and weight axes; DM Mono has no variable build, so each weight is a file. */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 600;
  font-display: swap;
  src: url('../fonts/newsreader-latin-opsz-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-latin-500-normal.woff2') format('woff2');
}

@property --k { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --h { syntax: '<number>'; inherits: true; initial-value: 0; }

:root {
  --bg: #040302;
  --ink: #70685f;            /* unlit display type */
  --body: #9a9187;           /* running text; the scene warms it a little */
  --dim: #857d73;
  --faint: #3a3531;
  --line: rgb(255 236 214 / 0.085);
  --glow-near: #fff1cf;
  --glow-mid: #c98b45;
  --glow-far: #70685f;
  --glow-r: 1500px;
  --coal-c: rgb(255 150 60 / 0);
  --coal-r: 240px;
  --hot: #ffb648;            /* colour of the blade right now */
  --m: clamp(1.25rem, 4.4vw, 5.6rem);
  /* type scale (round 2): one mono size, body, one larger text size, then the display sizes.
     No screen carries more than four of them. */
  --fs-mono: 0.8125rem;
  --fs-body: clamp(1.06rem, 0.55vw + 0.92rem, 1.32rem);
  --fs-large: 1.25em;
  --fs-head: clamp(2.7rem, 6.1vw, 7.6rem);
  --fs-giant: 29.5vw;
  /* (owner stage) the footer word is the brand's name, "Tang": four letters where six stood. Set larger (36vw, was
     29.5), it covers the blade from its point to its shoulder and leaves the hot tang free at the right, beside the
     word that names it. At 44vw it filled the old width but its T ran into the header. Held to the window's height
     on wide, low windows. */
  --fs-word: min(36vw, 70svh);
  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scrollbar-color: #2b2420 var(--bg); scrollbar-width: thin; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.46;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, p, ol, ul, figure, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: #ff8a2a; color: #120a04; }
:focus-visible { outline: 1px solid var(--hot); outline-offset: 5px; border-radius: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -4rem; z-index: 9; font: 400 var(--fs-mono) var(--mono); color: #fff1cf; background: #1a120a; padding: 0.7rem 1rem; }
.skip:focus { top: 0.8rem; }

/* ---------- the scene ---------- */
#forge {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 3; pointer-events: none; display: block;
  mix-blend-mode: screen;
  transition: opacity 0.32s linear;
}
html:not(.js) #forge, html.no-gl #forge { display: none; }
/* (owner stage 3) while the scene's shaders compile the canvas is empty; kept out of the picture until it has a frame
   (page.js says why: Firefox shows no frame of the page at all while a canvas it must show is busy compiling) */
html.gl-wait #forge { visibility: hidden; }
/* the intro's line drawing (intro.js): a second canvas over the scene, blended the same way, gone when the intro ends */
#sketch { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; display: block; mix-blend-mode: screen; }
/* While the drawing is made the header and the rail wait in the dark (still there for assistive tech and the
   keyboard: any key ends the intro); they come in with the steel's light, like the hero's type. */
html.intro .top, html.intro .rail { opacity: 0; }
/* (the hero's lines wait a little further under their masks: at 112 % a hair of the letters' tops showed in the forge light) */
html.intro .hero .rv .ln > .lit { transform: translateY(135%); }
/* The lead, the button and the caption are painted from the start at four thousandths (at most one level of 255 on
   this black, measured on a capture; at one hundredth they were two levels and could be made out): the first time the browser paints them costs one frame of about 90 ms, and at full hiding that
   frame fell in the middle of the heating, as the type came in. Now it falls before the second stroke. */
html.intro .hero .rv:not(:has(.ln)) { opacity: 0.004; }
html.intro-lit .top, html.intro-lit .rail { transition: opacity 1.2s var(--ease); }
html.intro-fast .top, html.intro-fast .rail { transition-duration: 0.28s; }
html.intro-fast .hero .rv .ln > .lit, html.intro-fast .hero .rv:not(:has(.ln)) { transition-duration: 0.3s; transition-delay: 0s; }
html.no-gl .pyro { visibility: hidden; }   /* no scene, no reading */
html.no-gl body { background: radial-gradient(120% 70% at 60% 30%, #2a1206 0, #0a0503 45%, var(--bg) 75%) fixed; }

/* ---------- lit type ---------- */
/* the padding gives the gradient room: background-clip paints only inside the box, and tight
   line-heights leave parts of the letters outside it */
.lit { display: block; color: #cdbfa9; padding: 0.2em 0.1em 0.24em; margin: -0.2em -0.1em -0.24em; }
html.js .lit {
  background-image:
    radial-gradient(circle at var(--cx, -999px) var(--cy, -999px), var(--coal-c) 0, transparent var(--coal-r)),
    radial-gradient(circle at var(--lx, 50%) var(--ly, 50%), var(--glow-near) 0, var(--glow-mid) calc(var(--glow-r) * 0.5), var(--glow-far) var(--glow-r));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- reveals (rest state is visible; hidden only when scripts run) ---------- */
.ln { display: block; overflow: hidden; padding: 0.2em 0.1em 0.24em; margin: -0.2em -0.1em -0.24em; }
html.js .rv .ln > .lit { transform: translateY(112%); transition: transform 1.25s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + var(--j, 0) * 110ms); }
html.js .rv .ln:nth-child(2) > .lit { --j: 1; }
html.js .rv.in .ln > .lit { transform: none; }
html.js .rv:not(:has(.ln)) { opacity: 0; transform: translateY(1.1rem); transition: opacity 1.1s var(--ease), transform 1.3s var(--ease); transition-delay: calc(var(--i, 0) * 110ms + 120ms); }
html.js .rv.in:not(:has(.ln)) { opacity: 1; transform: none; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 2rem;
  padding: 1.55rem var(--m) 0;
  font: 400 var(--fs-mono)/1 var(--mono); letter-spacing: 0.01em; color: var(--dim);
}
/* content scrolls under the header and is gone before it reaches the logo and the nav: the band is the page's
   own black down to the bottom of the nav, then a short fall. The canvas is above it, so the blade's light still
   crosses the header. */
.top::before { content: ''; position: absolute; inset: 0 0 -2.4rem 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, var(--bg) 0, var(--bg) 60%, rgb(4 3 2 / 0)); }
.mark { font: 400 var(--fs-body)/1 var(--serif); letter-spacing: -0.02em; color: #b9ac99; justify-self: start; }
.nav { display: flex; gap: clamp(1rem, 2.2vw, 2.6rem); }
.nav a, .foot__nav a { color: #938b80; padding: 0.5rem 0; }   /* a little over --dim: the footer blade's glow crosses the header */
.top__r { justify-self: end; display: flex; align-items: baseline; gap: clamp(0.9rem, 2vw, 2.2rem); }
.pyro { display: flex; align-items: baseline; gap: 0.35rem; color: var(--hot); font-variant-numeric: tabular-nums; }
.pyro__dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0.7rem var(--hot); align-self: center; margin-right: 0.35rem; }
.pyro__n { font-weight: 500; min-width: 3.1em; text-align: right; }
.pyro__u { color: var(--dim); }

/* ---------- side rail ---------- */
.rail { position: fixed; left: calc(var(--m) * 0.28); top: 50%; z-index: 2; transform: translateY(-50%); display: grid; gap: 0.85rem; }
.rail li { width: 0.6rem; height: 1px; background: var(--faint); transition: width 0.7s var(--ease), background-color 0.7s linear; }
.rail li.is-on { width: 1.5rem; background: var(--hot); }

/* ---------- the one part label (owner stage): page.js moves it to the blade's tang and fades it in at the paper cut ---------- */
.part { position: fixed; left: 0; top: 0; z-index: 1; margin: 0; padding-top: 2.5rem; opacity: 0; pointer-events: none; white-space: nowrap; font: 400 var(--fs-mono)/1 var(--mono); letter-spacing: 0.01em; color: #938b80; }
.part::before { content: ''; position: absolute; left: 50%; top: 0; width: 1px; height: 1.8rem; background: var(--hot); }

/* ---------- type ---------- */
.display {
  font-weight: 300; font-size: clamp(3.9rem, 11.4vw, 14rem); line-height: 0.86; letter-spacing: -0.042em;
  font-variation-settings: 'opsz' 72;
}
.h2 {
  font-weight: 320; font-size: var(--fs-head); line-height: 0.92; letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 44; margin: 1.5rem 0 2.6rem;
}
.label { font: 400 var(--fs-mono)/1 var(--mono); color: var(--dim); display: flex; gap: 1.6rem; align-items: baseline; }
.label__n { color: var(--hot); font-variant-numeric: tabular-nums; }
.lead { font-size: var(--fs-large); line-height: 1.34; max-width: 27ch; color: #b0a698; letter-spacing: -0.006em; }
.prose { display: grid; gap: 1.15em; max-width: 31ch; }
/* text that gives way to the blade: page.js writes its opacity from its place in the window */
[data-yield] { transition: none; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: grid; grid-template-rows: 1fr auto;
  padding: clamp(6.5rem, 14.5vh, 11rem) var(--m) clamp(1.6rem, 5vh, 3.4rem);
}
.hero__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.hero__say { display: grid; gap: 2.2rem; justify-items: start; }
.hero__cap { font: 400 var(--fs-mono)/1.5 var(--mono); color: var(--dim); display: flex; align-items: center; gap: 0.9rem; }
.tick { width: 2.6rem; height: 1px; background: var(--hot); }

/* ---------- bars: buttons made of steel. page.js keeps a row of temperatures along each one ---------- */
.bar {
  --bar-glow: rgb(255 120 30 / 0);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.5rem; padding: 0 2.1rem; border: 0; border-radius: 1px; cursor: pointer;
  font: 400 var(--fs-mono)/1 var(--mono); letter-spacing: 0.01em; color: #cbbda8;
  background-color: #14100d;
  background-image: linear-gradient(180deg, rgb(255 240 220 / 0.07), rgb(255 240 220 / 0) 42%, rgb(0 0 0 / 0.35));
  box-shadow: inset 0 1px 0 rgb(255 236 214 / 0.16), inset 0 0 0 1px rgb(255 236 214 / 0.07), 0 0 2.4rem var(--bar-glow), 0 0 0.5rem var(--bar-glow);
  -webkit-tap-highlight-color: transparent;
}
.bar > span { position: relative; z-index: 1; }
.bar::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background-image: var(--bar-heat, none); }
.bar:active { transform: translateY(1px); }

/* links and small labels warm under the pointer and cool slowly (page.js) */
[data-warm] { transition: none; }

/* ---------- sections ---------- */
.sec { min-height: 132vh; padding: 16vh var(--m); display: grid; align-items: center; }
.sec__col { width: min(34rem, 100%); }
.sec__col--head { width: min(50rem, 100%); }   /* room for a heading line longer than the text column */
.sec--right .sec__col, .beat--right .sec__col { margin-left: 55vw; width: min(32rem, calc(45vw - var(--m))); }

/* the 770 figure: one number in a full window, as large as the footer word. It counts with the blade, and the
   blade comes to lie behind it at that heat (story.js, keys curie and curie-hold) */
.beat--stat { align-content: center; }
.figure { display: grid; gap: 2.6rem; }
.figure__n { font-weight: 300; font-size: var(--fs-giant); line-height: 0.86; letter-spacing: -0.06em; margin-left: -0.05em; font-variation-settings: 'opsz' 72; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.figure__n .lit { display: flex; align-items: flex-start; }
.figure__u { font: 400 var(--fs-mono)/1 var(--mono); letter-spacing: 0.01em; margin: 0.5em 0 0 1.2rem; }
.figure__txt { display: grid; grid-template-columns: repeat(2, minmax(0, 31ch)); gap: 1.15em 4.5rem; }

.tall { padding: 0 var(--m); }
.beat { min-height: 112vh; display: grid; align-items: center; }
.beat--low { align-items: end; padding-bottom: 20vh; }
.beat--under { align-items: end; padding-bottom: 9vh; }
.beat--under .h2 { margin-bottom: 2.2rem; }
/* (owner stage) two beats that a picture holds, where a statement line in display type used to stand.
   After the quench: the blade comes out of the oil, one sentence beside it; the beat is long so the flames have
   scroll to die in. At the edge: the paper cut, no text at all. */
.beat--after { min-height: 160vh; }
.beat--paper { min-height: 230vh; }
/* type that passes behind the steel: page.js cuts it along the blade's outline (clip-path) */
[data-behind] { will-change: clip-path; }
/* (round 4) the quench heading stands in the blade's column (the blade hangs at 67 % of the width) and the blade
   passes in front of it; the sentence under it keeps to the left column, clear of the steel and the fire */
.beat--cross { align-content: center; }
.cross { margin-left: 53vw; }
.cross .h2 { margin-bottom: 0; }
.beat--cross .sec__col { margin-top: 2.6rem; }
/* portrait screens: the space the blade rides in, between the heading and the text (story.js, mSeat) */
.seat { display: none; }

/* ---------- the chart ---------- */
.sec--table { align-items: start; padding-top: 22vh; padding-bottom: 22vh; }
.tablewrap { width: min(74rem, calc(100vw - var(--m) * 2 - 9vw)); }
.note { max-width: 52ch; color: var(--dim); margin-bottom: 3.2rem; }
.chart { width: 100%; border-collapse: collapse; text-align: left; }
.chart th, .chart td { padding: 0.95rem 1.4rem 0.95rem 0; font-weight: 400; vertical-align: baseline; }
.chart thead th { font: 400 var(--fs-mono)/1 var(--mono); color: var(--dim); padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.chart thead th:first-child, .chart tbody td:first-child { padding-left: 1.3rem; width: 8.5rem; }
.chart tbody tr { position: relative; border-bottom: 1px solid var(--line); transition: --k 1.9s var(--ease), --h 3.4s cubic-bezier(0.2, 0.6, 0.3, 1); }
.chart tbody tr.on { --k: 1; }
.chart tbody tr:hover { --h: 1; transition-duration: 1.9s, 0.55s; }
.chart tbody tr.taken { --h: 1; }
.chart tbody td:first-child { font: 400 var(--fs-mono)/1 var(--mono); color: var(--dim); }
.chart tbody th { font-size: var(--fs-large); letter-spacing: -0.015em; white-space: nowrap; width: 15rem; color: color-mix(in srgb, var(--c-ink, #cdbfa9) calc(var(--k) * 100%), var(--ink)); }
.chart .num { font: 400 var(--fs-mono)/1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; width: 12rem; color: #a2988b; }
.chart tbody td:last-child { color: var(--body); }
.chart__gap td, .chart__gap th { padding-top: 3.4rem; }
/* each row is a strip of steel: glow rows light up and cool again, temper rows take their colour and keep it */
.chart tbody td:first-child::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3.35rem; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--c, transparent) 0, var(--c, transparent) 3px, transparent 3px),
    linear-gradient(90deg, color-mix(in srgb, var(--c, #000) 46%, transparent) 0, color-mix(in srgb, var(--c, #000) calc(8% + var(--h) * 20%), transparent) calc(var(--k) * 16% + var(--h) * 30%), transparent calc(var(--k) * 44% + var(--h) * 56%));
  opacity: calc(0.12 + 0.88 * var(--k));
}
.chart tbody tr[data-glow] td:first-child::before { filter: drop-shadow(0 0 calc(0.5rem + var(--h) * 0.7rem) var(--c, transparent)); }
.chart tbody tr[data-temper] td:first-child::before {
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.05) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, var(--c, transparent) 0, color-mix(in srgb, var(--c, #000) 78%, transparent) calc(var(--k) * 9% + var(--h) * 34%), color-mix(in srgb, var(--c, #000) calc(var(--h) * 34%), transparent) calc(var(--k) * 16% + var(--h) * 66%), transparent calc(var(--k) * 24% + var(--h) * 76%));
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(var(--k) * 12% + var(--h) * 48%), transparent calc(var(--k) * 24% + var(--h) * 76%));
  mask-image: linear-gradient(90deg, #000 0, #000 calc(var(--k) * 12% + var(--h) * 48%), transparent calc(var(--k) * 24% + var(--h) * 76%));
}
/* the stage label sits on the strip as a small dark tag, so one light ink reads on every row
   (round 2: picking dark or light ink per row still left the brightest strips under 4.5:1) */
.chart tbody tr td:first-child { color: color-mix(in srgb, #d9cdb8 calc(var(--k) * 100%), var(--dim)); }
.chart .tag { display: inline-block; padding: 0.36rem 0.5rem 0.38rem; margin: -0.36rem 0 -0.38rem -0.5rem; background: rgb(4 3 2 / 0.88); }
/* (round 3) the stage is named once, on the first row of its group; a boxed label in each of 17 rows made the
   chart a form. The other rows keep the word for screen readers. */
.chart tbody tr:not(:first-child):not(.chart__gap) .tag { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.chart tbody tr[data-temper] th { color: color-mix(in srgb, #f1e6d4 calc(var(--k) * 100%), var(--ink)); }
.chart tbody tr[data-ours] td:last-child { color: #e8d9bd; }
.src { font: 400 var(--fs-mono)/1.5 var(--mono); color: var(--dim); margin-top: 1.6rem; }

/* ---------- three knives ---------- */
/* (round 4) padding-bottom 26vh (was 8): the knife stays until its rows have gone, so the swap to the next blade
   happens later; the room keeps the waiting-list heading low in the window while no steel is in it */
.sec--knives { align-items: stretch; grid-template-rows: auto minmax(max(38vh, 17rem), 1fr) auto auto; min-height: 108vh; padding-top: 12vh; padding-bottom: 26vh; }
.knives__head .h2 { margin-bottom: 0; }
.knives { align-self: end; border-top: 1px solid var(--line); }
.knife {
  width: 100%; display: grid; grid-template-columns: minmax(12rem, 1.15fr) 7rem minmax(0, 1.5fr) auto; gap: 2rem; align-items: baseline;
  padding: 1.05rem 0 1.15rem; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer;
  position: relative;
}
/* the chosen knife is marked by light: its name goes bright and a hot line runs under the row.
   The other two keep full-strength ink (they were dimmed to 42 %, which failed contrast). */
.knife::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--hot); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease); }
.knife.is-on::after { transform: scaleX(1); }
.knife .knife__name.lit { transition: -webkit-text-fill-color 0.9s var(--ease); }
.knife.is-on .knife__name.lit, .knife:hover .knife__name.lit, .knife:focus-visible .knife__name.lit { -webkit-text-fill-color: #f4e8d2; }
.knife__txt, .knife__len, .knife__price { transition: color 0.9s var(--ease); }
.knife.is-on .knife__txt { color: #e8d9bd; }
.knife.is-on .knife__len { color: #f1e3c8; }
.knife.is-on .knife__price { color: #c9b99d; }
.knife__name { font-weight: 320; font-size: clamp(2.1rem, 3.5vw, 4.1rem); line-height: 1; letter-spacing: -0.035em; font-variation-settings: 'opsz' 44; }
.knife__len, .knife__price { font: 400 var(--fs-mono)/1 var(--mono); color: #a2988b; font-variant-numeric: tabular-nums; white-space: nowrap; }
.knife__txt { max-width: 38ch; }
.knife__price { color: var(--dim); }
.knives__note { margin-top: 1.5rem; font: 400 var(--fs-mono)/1.6 var(--mono); color: var(--dim); max-width: 70ch; }

/* ---------- waiting list ---------- */
.sec--list { min-height: 128vh; }
/* (round 3) the two fields are set in display type (the size of the knife names) on bars of steel. The bars lie
   toward the next blade and take its heat: their far end is the blade's colour right now (--hot), so they
   brighten as the form feeds the fire. A field in use heats along its whole length. */
.form { display: grid; gap: 2.2rem; margin-top: 3.2rem; width: min(46rem, calc(100vw - var(--m) * 2)); }
.field { display: grid; gap: 0.15rem; }
.field__l { font: 400 var(--fs-mono)/1 var(--mono); color: var(--dim); padding: 0; }
.field input {
  width: 100%; background-color: transparent; border: 0; border-radius: 0;
  padding: 0.12em 0 0.2em; font-weight: 320; font-size: clamp(2.1rem, 3.5vw, 4.1rem); line-height: 1.12; letter-spacing: -0.035em; font-variation-settings: 'opsz' 44;
  color: color-mix(in srgb, #f4e8d2 82%, var(--hot)); caret-color: var(--hot);
  background-image:
    linear-gradient(90deg, #7a1c05, #ff8a2a 45%, #ffd98a),
    linear-gradient(90deg, rgb(255 236 214 / 0.16) 0, rgb(255 236 214 / 0.2) 55%, color-mix(in srgb, var(--hot) 85%, transparent));
  background-repeat: no-repeat; background-position: 0 100%, 0 100%; background-size: 0 2px, 100% 2px;
  transition: background-size 1.1s var(--ease);
}
.field input:focus { outline: none; background-size: 100% 2px, 100% 2px; }
.field input:focus-visible { box-shadow: 0 0.9rem 1.6rem -1.1rem rgb(255 138 42 / 0.55); }
.field input[aria-invalid='true'] { background-image: linear-gradient(90deg, #7a1c05, #ff8a2a 45%, #ffd98a), linear-gradient(90deg, #c9461b, #c9461b); }
.pick { border: 0; display: flex; flex-wrap: wrap; gap: 0.1rem 1.5rem; align-items: baseline; }
.pick legend { margin-bottom: 0.4rem; }
.pick label { cursor: pointer; font: 400 var(--fs-mono)/1 var(--mono); }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: inline-block; padding: 1rem 0 0.95rem; min-width: 2.75rem; color: var(--dim); border-bottom: 1px solid transparent; }
.pick input:checked + span { border-bottom-color: var(--hot); }
.pick input:focus-visible + span { outline: 1px solid var(--hot); outline-offset: 5px; }
.form__end { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; margin-top: 0.6rem; }
.form__msg { font: 400 var(--fs-mono)/1.55 var(--mono); color: #d8c7a8; max-width: 30ch; min-height: 1.2em; }
.form__msg small { display: block; font-size: inherit; color: var(--dim); }

/* ---------- footer ---------- */
.foot { min-height: 100svh; padding: 0 var(--m) 2.2rem; display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
.foot__word { align-self: center; font-weight: 300; font-size: var(--fs-word); line-height: 0.86; letter-spacing: -0.065em; margin-left: -0.045em; font-variation-settings: 'opsz' 72; white-space: nowrap; }
.foot__grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 2rem; align-items: end; font: 400 var(--fs-mono)/1.7 var(--mono); color: var(--dim); }
.foot__line { color: #a2988b; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.foot__fine { color: var(--dim); }

/* ---------- pause control (round 3: in the header at every width; fixed at the bottom right it lay over the
   knife prices, the footer word and the footer links) ---------- */
.motion {
  font: 400 var(--fs-mono)/1 var(--mono); color: #938b80; background: none; border: 1px solid rgb(255 236 214 / 0.14); border-radius: 1px;
  padding: 0.6rem 0.8rem; margin: -0.6rem 0; cursor: pointer; transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.motion:hover, .motion[aria-pressed='true'] { color: #f1e3c8; border-color: rgb(255 180 90 / 0.5); }
html.reduced .motion { display: none; }

@media (min-width: 901px) {
  .h2 .lit { white-space: nowrap; }
}

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  :root { --fs-giant: 26vw; --fs-word: 41vw; }
  .rail { display: none; }
  .top { grid-template-columns: 1fr auto; padding-top: 1.1rem; }
  .nav { display: none; }
  .hero { padding-top: 5.6rem; padding-bottom: 4.4rem; }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .sec { min-height: 120vh; align-items: end; padding: 12vh var(--m) 13vh; }
  .sec--knives { align-items: stretch; }   /* after .sec: the knife's space must keep its height (it collapsed to 0) */
  .sec--right .sec__col, .beat--right .sec__col { margin-left: 0; width: min(34rem, 100%); }
  .beat--cross { align-content: end; }
  .cross { margin-left: 0; }
  .cross .h2 { margin-bottom: 1.7rem; }
  .beat--cross .sec__col { margin-top: 0; }
  .figure__txt { grid-template-columns: minmax(0, 31ch); }
  .figure__u { margin-left: 0.7rem; }
  .figure__n { font-size: 38vw; }
  .h2 { margin: 1.1rem 0 1.7rem; }
  .beat { min-height: 108vh; }
  .beat--after { min-height: 160vh; }
  .beat--paper { min-height: 230vh; }
  .beat--left, .beat--right { align-items: end; padding-bottom: 12vh; }
  .sec--table { padding-top: 14vh; }
  .tablewrap { width: 100%; }
  .chart thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .chart, .chart tbody { display: block; }
  .chart tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; padding: 0.8rem 0 0.85rem 0.95rem; align-items: baseline; }
  .chart th, .chart td { padding: 0; width: auto !important; }
  .chart tbody td:first-child { grid-area: 1 / 1 / 3 / 3; font-size: 0; padding: 0; }
  .chart .tag { padding: 0; margin: 0; background: none; }
  .chart tbody th { grid-area: 1 / 1; white-space: normal; }
  .chart tbody .num { grid-area: 1 / 2; }
  .chart tbody td:last-child { grid-area: 2 / 1 / 3 / 3; }
  .chart tbody tr[data-temper] th { text-shadow: 0 0 0.5em rgb(0 0 0 / 0.55); }
  .chart tbody td:first-child::before { height: 100%; }
  /* phones (round 2): the strip is a swatch at the start of the row and the text stands clear of it; the notes
     used to begin on the bright end of the pale strips */
  .chart tbody tr { padding-left: 3.7rem; }
  .chart tbody td:first-child::before { right: auto; width: 2.9rem; }
  .chart tbody tr[data-glow] td:first-child::before { background: linear-gradient(90deg, var(--c, transparent) 0, var(--c, transparent) 3px, color-mix(in srgb, var(--c, #000) 50%, transparent) 3px, color-mix(in srgb, var(--c, #000) 12%, transparent) 100%); }
  .chart tbody tr[data-temper] td:first-child::before { background: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.05) 0 1px, transparent 1px 3px), var(--c, transparent); -webkit-mask-image: none; mask-image: none; }
  .chart__gap { margin-top: 2.4rem; }
  .chart__gap td, .chart__gap th { padding-top: 0; }
  .chart .num { align-self: center; }
  .sec--knives { min-height: 112vh; padding-top: 12vh; padding-bottom: 20vh; }
  .knife { grid-template-columns: 1fr auto; gap: 0.4rem 1rem; padding: 1.1rem 0 1.2rem; }
  .knife__txt { grid-column: 1 / -1; }
  .knife__price { grid-column: 1 / -1; }
  .foot__grid { grid-template-columns: 1fr; padding-bottom: 0.6rem; }
  .foot__nav a { padding: 0.8rem 0; }
  .motion { padding: 0.55rem 0.7rem; margin: -0.55rem 0; }
}
/* portrait screens (the same test story.js uses for its `m` poses): one column of text, and the blade rides
   with the page in a space kept free above it, so text never scrolls through the steel */
@media (max-aspect-ratio: 4/5) {
  #steel, #heat .beat--right { padding-top: 50vh; }
  .seat { display: block; height: 34vh; }
  #list { padding-top: 30vh; }   /* the next blade lies above the heading (story.js, keys next and list) */
  /* (owner stage) after the quench: the blade hangs at the right, over the oil, and the sentence comes up through the
     dark oil at the left as the flames die; it is narrow so it stays clear of the steel and the fire */
  .beat--after { align-items: start; padding-top: 106vh; }
  .beat--after .prose { max-width: 17ch; }
  .sec__col--head .h2 { margin-bottom: 0.4rem; }
}
@media (max-width: 480px) {
  .motion__x { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .rv .ln > .lit, html.js .rv:not(:has(.ln)) { transition-duration: 0.01s; transition-delay: 0s; transform: none; }
  .chart tbody tr { transition-duration: 0.01s, 0.01s; }
  .field input { transition: none; }
}
html.motion-paused .rv .ln > .lit, html.motion-paused .rv:not(:has(.ln)) { transition-duration: 0.01s !important; transition-delay: 0s !important; }

/* The pointer is drawn in the scene as a coal. While that coal is lit (page.js sets .coal-on) the system cursor is
   hidden; text fields keep their caret cursor so a visitor can still place it. */
@media (hover: hover) and (pointer: fine) {
  html.coal-on, html.coal-on * { cursor: none !important; }
  html.coal-on input, html.coal-on textarea { cursor: text !important; }
}
