/* TyAk. Three voices, three jobs.
   Keyslate, a titling modern, sets everything that is read as a title. Its hairline is 26 units
   of a thousand, so it is never set below 28 pixels as a heading: under that the hairline is
   less than three quarters of a pixel.
   A text serif sets everything that is read as a sentence.
   The system sans, small, in tracked capitals, sets the labels that name things.
   One scale, one grid, hairline rules. */

@font-face {
  font-family: "Keyslate";
  src: url("/fonts/Keyslate-Display.woff2") format("woff2"),
       url("/fonts/Keyslate-Display.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00B7, U+00C0-00FC, U+2013-2014, U+2018-201D, U+2026, U+2191, U+2193;
}
@font-face {
  font-family: "Nightgilt";
  src: url("/fonts/Nightgilt-Display.woff2") format("woff2"),
       url("/fonts/Nightgilt-Display.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+2013-2014, U+2018-201D;
}
@font-face {
  font-family: "Hardlight";
  src: url("/fonts/Hardlight-Display.woff2") format("woff2"),
       url("/fonts/Hardlight-Display.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+2013-2014, U+2018-201D;
}
@font-face {
  font-family: "Silkhand";
  src: url("/fonts/Silkhand-Display.woff2") format("woff2"),
       url("/fonts/Silkhand-Display.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+2013-2014, U+2018-201D;
}

:root {
  /* colour: a warm paper, black leader, one grey, and the yellow of a film can.
     Yellow is a field or a mark under ink. It is never the colour of text on paper. */
  --paper: #f4f1ea;
  --paper-2: #e8e3d7;
  --ink: #14110d;
  --mute: #655f52;
  --hair: #cdc6b6;
  --accent: #f2c12e;
  --night: #0d0c0a;
  --night-ink: #f4f1ea;

  /* faces */
  --display: "Keyslate", Didot, "Bodoni 72", "Bodoni MT", Georgia, serif;
  --text: "Source Serif 4", Georgia, serif;
  --ui: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* text scale: label (sans capitals), then small, body, lede (serif) */
  --t-label: 0.75rem;
  --label-track: 0.09em;
  --t-small: 0.9375rem;
  --t-body: 1.125rem;
  --t-lede: clamp(1.25rem, 0.5vw + 1.1rem, 1.5rem);

  /* display scale (Keyslate). Four steps, each roughly double the last.
     --d-1 is the floor: a heading inside prose, 28 pixels. Nothing in Keyslate is set smaller as a title.
     The face is wide: a seven-letter word in capitals runs to nearly five ems, and "Designing Keyslate"
     to 8.3, so --d-3 stops where that title still holds one line of the page.
     --d-4 is the home word. Its four letters, kerned, set 2.58 em wide; --hero-share is how much
     of the measure they take, and the lede has the rest. */
  --d-1: clamp(1.75rem, 0.6vw + 1.6rem, 2.25rem);
  --d-2: clamp(2.125rem, 1.9vw + 1.45rem, 3.875rem);
  --d-3: clamp(3rem, 6.1vw + 0.75rem, 8.25rem);
  --hero-share: 0.66;
  --d-4: clamp(5.25rem, calc((100vw - 2 * var(--gutter)) * var(--hero-share) / 2.58), 24rem);
  /* the font is fitted for about 60 pixels. Larger than that the same fit looks loose, so each step closes up a little */
  --d-track: 0em;
  --d-track-3: -0.012em;
  --d-track-4: -0.02em;
  --d-lead: 1;           /* ascenders are 0.74 em and descenders 0.23: two mixed-case lines clear */
  --d-lead-caps: 0.96;   /* a list set in capitals has no descenders to clear, but its serifs want air */

  /* space: a 0.5rem step, used everywhere */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4.5rem;
  --s-7: 6.5rem;
  --s-8: 9rem;

  /* grid */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --gap: clamp(1rem, 2vw, 2rem);
  --page: 96rem;
  --measure: 36rem;
  --rule: 1px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--t-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--ink); color: var(--paper); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.14em; text-decoration-color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: inherit; margin: 0; text-wrap: balance; }
p { margin: 0 0 1.05em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.84em; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: var(--s-1);
  transform: translateY(-260%);
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-1) var(--s-2);
  text-decoration: none;
  z-index: 20;
}
.skip:focus { transform: none; color: var(--paper); }

/* Voices ------------------------------------------------------------------ */

/* 1. The title voice: Keyslate, always large. */
.hero-word, .hero-headline, .page-title, .sec-title, .index-word, .lockup, .big, .brand-mark, .footer-mark,
.fig-type, .showing, .waterfall p, .tester textarea, .glyphs span, .pull, .essay > h2, .prose h2, .stack,
.votes button, .votes .score, .card-title {
  font-family: var(--display);
  font-weight: 400;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  font-variant-numeric: normal;
  font-synthesis: none;
}

/* 2. The label voice: the system sans, in small capitals by tracking, never Keyslate.
      A modern at twelve pixels loses its hairlines; a plain sans is what a slate is chalked in. */
.label, .facts dt, .tag, .nav, .more, .dl-row, .footer-links, .filters button, .seg label,
.specimen-stage .support, .mood-tabs button, .cta {
  font-family: var(--ui);
  font-size: var(--t-label);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  font-variant-numeric: lining-nums tabular-nums;
}
.nav { font-size: 0.8125rem; letter-spacing: 0.08em; }
.label, .facts dt, .tag { margin: 0; }
.label a { text-decoration: none; }
.label.quiet, .sec-head p:not(.label) { color: var(--mute); }
.tag { display: inline-block; background: var(--accent); color: var(--ink); padding: 0.35em 0.7em 0.3em; }

/* Links that are actions: label voice, underlined by a rule. */
.more, .dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
  margin-top: var(--s-3);
}
.more a, .dl-row a {
  text-decoration: none;
  padding-block: 0.75rem 0.3rem;
  border-bottom: var(--rule) solid currentColor;
}
.more a:hover, .dl-row a:hover { box-shadow: inset 0 -0.5em 0 var(--accent); }
.slate .more a:hover, .slate a:hover { box-shadow: none; }
/* Links that are titles: the word itself is underlined, in yellow, on hover and focus. */
a:hover .index-word, a:hover .lockup, a:focus-visible .index-word, a:focus-visible .lockup {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.1em;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

/* Header / footer --------------------------------------------------------- */

.site-header { border-bottom: var(--rule) solid var(--ink); }
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: 0.6rem 0.4rem;
}
.brand { text-decoration: none; display: block; }
.brand-mark { font-size: 2.25rem; line-height: 1; letter-spacing: var(--d-track); }
.nav { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); }
.nav a { text-decoration: none; padding-block: 0.8rem 0.5rem; border-bottom: 2px solid transparent; margin-bottom: -0.35rem; }
.nav a:hover { border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { border-bottom-color: currentColor; }

.site-footer { border-top: var(--rule) solid var(--ink); margin-top: var(--s-5); }
.site-footer .wrap { padding-block: var(--s-3) var(--s-6); row-gap: var(--s-3); align-items: start; }
.footer-mark { grid-column: 1 / span 3; font-size: var(--d-2); line-height: 1; margin: 0; }
.footer-note { grid-column: 4 / span 5; font-size: var(--t-small); line-height: 1.5; color: var(--mute); max-width: 34rem; padding-top: 0.5rem; }
.footer-links { grid-column: 10 / span 3; display: flex; flex-direction: column; align-items: flex-start; padding-top: 0.35rem; }
.footer-links a { text-decoration: none; padding-block: 0.45rem; }

/* Home: the title card ----------------------------------------------------- */

.slate { background: var(--night); color: var(--night-ink); }
/* The clapper stick, reduced to a rule of leader. The one piece of decoration on the site. */
.sticks {
  height: 0.625rem;
  background: repeating-linear-gradient(-58deg, var(--night-ink) 0 0.75rem, var(--night) 0 1.5rem);
  opacity: 0.9;
}
.hero { padding-block: var(--s-3) 0; }
.hero-meta { display: flex; justify-content: space-between; gap: var(--s-3); }
.hero-word {
  font-size: var(--d-4);
  line-height: 0.8;
  letter-spacing: var(--d-track-4);
  /* the k stands above the capitals: keep it clear of the meta line. Below, room for the tail of the y */
  margin: 0.14em 0 calc(var(--d-4) * 0.14 + var(--s-4)) -0.035em;
  white-space: nowrap;
}
/* The lede shares the word's row and stands on its baseline, 0.11 em above the foot of the line box. */
.hero-lede { font-size: var(--t-lede); line-height: 1.4; margin: 0 0 calc(var(--d-4) * 0.26 + var(--s-4) - 0.35em); align-self: end; }
.slate-cells {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: var(--rule) solid var(--night-ink);
  list-style: none;
  margin: 0;
  padding: 0;
}
.slate-cells li + li { border-left: var(--rule) solid rgb(244 241 234 / 0.35); }
.slate-cells a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-4);
  height: 100%;
  min-height: 8.5rem;
  padding: var(--s-2) var(--s-2) var(--s-3);
  text-decoration: none;
}
.slate-cells li:first-child a { padding-left: 0; }
.slate-cells .index-word { font-size: clamp(2.125rem, 3.4vw, 4rem); line-height: 0.95; letter-spacing: var(--d-track); display: block; white-space: nowrap; }

.page-hero { padding-block: var(--s-5) var(--s-5); }
.page-hero .label { margin-bottom: var(--s-3); }
.page-title {
  font-size: var(--d-3);
  line-height: var(--d-lead);
  letter-spacing: var(--d-track-3);
  margin-left: -0.05em;
}
.page-hero .deck {
  grid-column: 4 / span 6;
  margin-top: var(--s-4);
  font-size: var(--t-lede);
  line-height: 1.4;
}
.page-hero .dl-row { grid-column: 4 / span 8; }

/* Sections: label column + body column ------------------------------------ */

.sec { border-top: var(--rule) solid var(--ink); padding-block: var(--s-3) var(--s-6); row-gap: var(--s-3); }
.slate + .sec { border-top: 0; }
.sec-head { grid-column: 1 / span 3; }
.sec-head .label { display: block; }
.sec-head .num { display: inline-block; min-width: 1.6em; color: var(--mute); font-variant-numeric: tabular-nums; }
.sec-head .label a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.sec-head p:not(.label) { font-size: var(--t-small); line-height: 1.5; margin-top: var(--s-1); max-width: 17rem; }
.sec-body { grid-column: 4 / -1; min-width: 0; }
.sec-body.full { grid-column: 1 / -1; }
.sec-title { font-size: var(--d-3); line-height: var(--d-lead); letter-spacing: var(--d-track-3); margin: -0.06em 0 var(--s-3) -0.05em; }
.sec-body > p { max-width: var(--measure); }
/* the whole alphabet on the home page: a showing, not a sentence */
.sec-body > .showing { max-width: none; container-type: inline-size; margin: 0 0 var(--s-4); padding-block: var(--s-2); border-block: var(--rule) solid var(--hair); }
/* three rows, one size: the widest row (the capitals) is set to the full measure */
.showing span { display: block; white-space: nowrap; font-size: calc(100cqi / var(--showing-em, 18)); line-height: 1.22; }

/* Style index ------------------------------------------------------------- */

.style-index { list-style: none; margin: 0; padding: 0; }
.style-index li { border-bottom: var(--rule) solid var(--hair); }
.style-index li:last-child { border-bottom-color: var(--ink); }
.style-index a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem 11rem;
  column-gap: var(--gap);
  align-items: baseline;
  padding-block: 0.9rem 0.55rem;
  text-decoration: none;
}
.style-index li:first-child a { padding-top: 0.5rem; }
.style-index .index-word { font-size: clamp(2.5rem, 4.9vw + 0.5rem, 6.25rem); line-height: var(--d-lead-caps); letter-spacing: var(--d-track-3); text-transform: uppercase; margin-left: -0.05em; }
.style-index .kind { text-align: right; }

/* Specimen stage: every value is a token ---------------------------------- */

.specimen-stage {
  position: relative;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: var(--specimen-valign, center);
  min-height: clamp(18rem, 44vw, 40rem);
  padding: clamp(3.5rem, 6vw, 5.5rem) clamp(1.25rem, 4vw, 4rem) clamp(1.75rem, 4vw, 3.5rem);
  background: var(--specimen-paper, var(--night));
  color: var(--specimen-ink, var(--night-ink));
  overflow: hidden;
}
.specimen-stage[data-frame="keyline"] { box-shadow: inset 0 0 0 var(--rule) var(--specimen-ink); }
.specimen-stage[data-frame="card"]::before,
.specimen-stage[data-frame="card"]::after {
  content: "";
  position: absolute;
  inset: clamp(0.75rem, 2vw, 1.5rem);
  border: 2px solid currentColor;
  pointer-events: none;
}
.specimen-stage[data-frame="card"]::after { inset: clamp(1.15rem, 2.6vw, 2.05rem); border-width: 1px; }
.specimen-stage .big {
  margin: 0;
  font-size: var(--specimen-size, var(--d-3));
  line-height: var(--specimen-leading, 0.95);
  letter-spacing: var(--specimen-tracking, 0em);
  text-align: var(--specimen-align, start);
  text-transform: var(--specimen-case, none);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.specimen-stage[data-align="start"] .big { margin-left: -0.03em; }
/* tracked, centred type carries a trailing space: put the same space in front */
.specimen-stage[data-align="center"] .big { padding-inline-start: max(0em, var(--specimen-tracking, 0em)); }
.specimen-stage .support {
  position: absolute;
  top: clamp(1.5rem, 3.2vw, 2.6rem);
  left: clamp(1.25rem, 4vw, 4rem);
  right: clamp(1.25rem, 4vw, 4rem);
  margin: 0;
}
.specimen-stage[data-align="center"] .support { text-align: center; }

/* Prose ------------------------------------------------------------------- */

.prose { max-width: var(--measure); }
.prose .lede { font-size: var(--t-lede); line-height: 1.4; }
.prose h2 { font-size: var(--d-1); line-height: 1.1; letter-spacing: var(--d-track); margin: var(--s-5) 0 var(--s-2); }
.prose em { font-style: italic; }
.pull {
  font-size: var(--d-2);
  line-height: 1.06;
  letter-spacing: var(--d-track);
  margin: var(--s-4) 0;
  padding-top: var(--s-2);
  border-top: var(--rule) solid var(--ink);
  text-wrap: balance;
}

.facts { margin: 0; display: grid; grid-template-columns: minmax(6rem, auto) 1fr; column-gap: var(--s-3); font-size: var(--t-small); }
.facts dt, .facts dd { margin: 0; padding-block: 0.5rem; border-top: var(--rule) solid var(--hair); }
.facts dt { padding-top: 0.72rem; }
.facts dd { font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top-color: var(--ink); }

.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr); column-gap: var(--gap); row-gap: var(--s-4); align-items: start; }

.film-list { list-style: none; margin: 0; padding: 0; }
.film-list li {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(8rem, 2fr);
  column-gap: var(--gap);
  align-items: last baseline;   /* a credit sits on the last line of a title that runs to two */
  padding-block: 0.95rem 0.8rem;
}
.film-list li:first-child { padding-top: 0; }
.film-list li + li { border-top: var(--rule) solid var(--hair); }
.film-list li:last-child { border-bottom: var(--rule) solid var(--ink); }
.film-list .lockup { font-size: clamp(1.875rem, 2.1vw + 1rem, 3.375rem); line-height: var(--d-lead-caps); letter-spacing: var(--d-track); margin-left: -0.04em; text-wrap: balance; }
.film-list .label { text-align: right; }

.style-nav { display: flex; justify-content: space-between; gap: var(--s-3); border-top: var(--rule) solid var(--ink); padding-block: var(--s-2) 0; }
.style-nav a { text-decoration: none; display: block; min-width: 0; }
.style-nav .lockup { display: block; font-size: var(--d-2); line-height: 1; letter-spacing: var(--d-track); margin-top: 0.35rem; }
.style-nav .next { text-align: right; margin-left: auto; }

/* Film titles sheet -------------------------------------------------------- */

.note { max-width: var(--measure); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); margin: var(--s-4) 0 var(--s-3); }
.filters .label { margin-right: var(--s-2); }
#filter-style { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.filters button {
  min-height: 2.75rem;
  padding: 0 0.95rem;
  border: var(--rule) solid var(--ink);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.filters button:hover { background: var(--accent); }
.filters button[aria-pressed="true"], .filters button[aria-pressed="true"]:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.title-row { list-style: none; margin: 0; padding: 0; }
.title-row > li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  column-gap: var(--gap);
  align-items: start;
  padding-block: var(--s-3) var(--s-3);
  border-top: var(--rule) solid var(--hair);
}
.title-row > li:first-child { border-top-color: var(--ink); }
.title-row > li:last-child { border-bottom: var(--rule) solid var(--ink); }
.title-row .rank { padding-top: 0.85rem; color: var(--mute); }
.title-row .lockup {
  font-size: clamp(2rem, 2.9vw + 1rem, 4.25rem);
  line-height: var(--d-lead-caps);
  letter-spacing: var(--d-track-3);
  margin-left: -0.045em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.title-row .secondary { margin-top: var(--s-2); }
.title-row .why { margin-top: 0.3rem; max-width: var(--measure); color: var(--mute); font-size: var(--t-small); line-height: 1.5; }
.votes { display: grid; grid-template-columns: 2.75rem 2.75rem 2.75rem; align-items: center; padding-top: 0.25rem; }
.votes button {
  width: 2.75rem;
  height: 2.75rem;
  text-transform: none;
  letter-spacing: 0;
  border: var(--rule) solid var(--ink);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
}
.votes button:hover { background: var(--accent); }
.votes button[aria-pressed="true"], .votes button[aria-pressed="true"]:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.votes .score { grid-column: 2; text-align: center; font-size: 2.25rem; line-height: 1; }
.votes button + .score { grid-column: auto; }

/* Lab: tester, waterfall, glyphs ------------------------------------------- */

.tester textarea {
  display: block;
  width: 100%;
  min-height: 2.2em;
  border: 0;
  border-block: var(--rule) solid var(--ink);
  border-radius: 0;
  background: transparent;
  resize: vertical;
  font-size: var(--d-3);
  line-height: 1.06;
  letter-spacing: var(--d-track);
  padding: var(--s-3) 0 var(--s-2);
  margin-top: var(--s-1);
}
.tester-meta { display: flex; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-1); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.cards a { display: block; padding: var(--s-2) 0 var(--s-4); border-top: var(--rule) solid var(--ink); text-decoration: none; }
.cards .lockup { display: inline-block; font-size: var(--d-2); line-height: 1; letter-spacing: var(--d-track); margin: var(--s-2) 0 var(--s-1); }
.cards p { color: var(--mute); max-width: 26rem; font-size: var(--t-small); line-height: 1.5; }

.waterfall { overflow: hidden; container-type: inline-size; }
.waterfall div { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); align-items: baseline; border-top: var(--rule) solid var(--hair); padding-block: 0.7rem 0.45rem; }
.waterfall div:first-child { border-top-color: var(--ink); }
.waterfall p { margin: 0; line-height: 1.12; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.waterfall p.run { white-space: normal; line-height: 1.18; letter-spacing: 0; text-wrap: balance; }

.glyphs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  border-top: var(--rule) solid var(--ink);
  border-left: var(--rule) solid var(--hair);
}
.glyphs span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-size: 4rem;
  line-height: 1;
  border-right: var(--rule) solid var(--hair);
  border-bottom: var(--rule) solid var(--hair);
}
.glyphs span:hover { background: var(--ink); color: var(--paper); }

/* Essay -------------------------------------------------------------------- */

.essay { row-gap: 0; padding-bottom: var(--s-6); border-top: var(--rule) solid var(--ink); padding-top: var(--s-3); }
.essay > * { grid-column: 4 / span 6; }
.essay > p, .essay > ol, .essay > ul { max-width: var(--measure); }
.essay > .lede { font-size: var(--t-lede); line-height: 1.4; max-width: 40rem; margin-bottom: 1.2em; }
.essay > .lede::first-letter {
  font-family: var(--display);
  font-weight: 400;
  font-size: 3.6em;
  line-height: 0.74;
  float: left;
  padding: 0.07em 0.08em 0 0;
  margin-left: -0.04em;
}
.essay > h2 {
  grid-column: 4 / span 8;
  font-size: var(--d-2);
  line-height: 1.04;
  letter-spacing: var(--d-track);
  margin: var(--s-6) 0 var(--s-3);
  padding-top: var(--s-2);
  border-top: var(--rule) solid var(--ink);
}
.essay > .pull { grid-column: 4 / span 8; font-size: clamp(2.25rem, 3vw + 1rem, 4.25rem); line-height: 1.04; margin: var(--s-5) 0; max-width: 15em; border-top: 0; padding-top: 0; }
/* the revisions list closes the essay: version in the label voice, what changed in the text voice */
.essay > #revisions { max-width: var(--measure); margin-top: var(--s-2); grid-template-columns: 4rem 1fr; }
.essay > .byline { grid-column: 1 / span 3; grid-row: 1 / span 4; align-self: start; padding-right: var(--s-3); }
.essay > .byline .facts { grid-template-columns: 1fr; }
.essay > .byline .facts dt { padding-bottom: 0; }
.essay > .byline .facts dd { border-top: 0; padding-top: 0.1rem; }

.fig { grid-column: 1 / -1; margin: var(--s-5) 0; }
.fig.inset { grid-column: 4 / -1; }
.fig-stage {
  background: var(--paper-2);
  padding: clamp(1.75rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 3.5rem) clamp(1.5rem, 3.6vw, 3.25rem);
  overflow: hidden;
}
.fig-stage.night { background: var(--night); color: var(--night-ink); }
.fig-stage.signal { background: var(--accent); color: var(--ink); }
.fig-type { margin: 0 0 0 -0.05em; font-size: var(--fig-size, clamp(3.5rem, 14vw, 13rem)); line-height: 1; letter-spacing: 0; white-space: nowrap; }
/* A line of capitals has nothing below the baseline, so the line box leaves it sitting high in its
   stage. Trim the box to the cap line and the baseline, and the stage's own padding is what shows. */
.fig-type.caps { text-box: trim-both cap alphabetic; }
/* the tail of the Q is the one thing in a line of capitals that goes below it */
.fig-stage:has(.fig-type.caps) { padding-bottom: clamp(2rem, 5vw, 4.5rem); }
.stack { margin: 0; font-size: clamp(2.5rem, 10vw, 9.5rem); line-height: 0.92; letter-spacing: 0.02em; text-transform: uppercase; text-align: center; }
.stack span { display: block; }
.fig-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.fig-pair > div { min-width: 0; overflow: hidden; }
.fig-pair .label { margin-bottom: var(--s-1); }
.fig-pair .fig-type { border-top: var(--rule) solid currentColor; padding-top: var(--s-2); padding-bottom: 0.14em; } /* room for a descender inside the clip */
.no-kern { font-kerning: none; font-feature-settings: "kern" 0; }
.no-liga { font-variant-ligatures: none; }
.fig-diagram { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: center; }
.fig-diagram img { width: 100%; height: auto; max-width: 31rem; margin-inline: auto; }
.fig-diagram ol { margin: 0; padding-left: 1.2em; font-size: var(--t-small); line-height: 1.5; max-width: 27rem; }
.fig-diagram li { padding-block: 0.3rem; }
.fig figcaption {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  margin-top: var(--s-2);
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--mute);
}
.fig figcaption .label { grid-column: 1 / span 3; color: var(--ink); padding-top: 0.22rem; }
.fig figcaption span:last-child { grid-column: 4 / span 6; max-width: var(--measure); }
.fig.inset figcaption .label { grid-column: 1 / span 2; }
.fig.inset figcaption span:last-child { grid-column: 3 / -1; }

/* Builder ------------------------------------------------------------------ */

.builder { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: var(--gap); row-gap: var(--s-4); align-items: start; }
.builder-controls { display: flex; flex-direction: column; gap: var(--s-3); }
.builder-controls label, .builder-controls fieldset { display: flex; flex-direction: column; gap: 0.3rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.builder-controls .label { display: flex; justify-content: space-between; gap: var(--s-2); }
.builder-controls output { color: var(--mute); }
.builder-controls legend { padding: 0; }
.builder-controls textarea, .builder-controls select {
  width: 100%;
  border: 0;
  border-bottom: var(--rule) solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-family: var(--text);
  font-size: 1.1875rem;
  line-height: 1.3;
  padding: 0.45rem 0;
  min-height: 2.75rem;
}
.builder-controls textarea { resize: vertical; }
.builder-controls input[type="range"] { width: 100%; height: 2.75rem; margin: 0; accent-color: var(--ink); background: transparent; }
.seg { display: flex; gap: var(--s-3); }
.seg label { flex-direction: row; text-transform: uppercase; align-items: center; gap: 0.5rem; min-height: 2.75rem; cursor: pointer; }
.seg input { accent-color: var(--ink); width: 1.1rem; height: 1.1rem; margin: 0; }
.builder-stage-wrap { min-width: 0; }
.builder-stage-wrap .specimen-stage { margin-bottom: var(--s-3); }
.token-readout { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); column-gap: var(--gap); }
.token-readout div { border-top: var(--rule) solid var(--hair); padding-block: 0.55rem; }
.token-readout dt, .token-readout dd { border: 0; padding: 0; }

/* 404 ---------------------------------------------------------------------- */

.missing { padding-block: var(--s-6) var(--s-7); }
.missing p { max-width: var(--measure); margin-top: var(--s-3); }

/* Narrow screens ----------------------------------------------------------- */

@media (max-width: 62rem) {
  .hero > .hero-lede, .page-hero .deck, .page-hero .dl-row { grid-column: 1 / -1; max-width: var(--measure); }
  :root { --hero-share: 1; }
  /* the lede drops to its own row, under the tail of the y */
  .hero > .hero-word { margin-bottom: calc(var(--d-4) * 0.2); }
  .hero > .hero-lede { margin: 0 0 var(--s-5); }
  .slate-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slate-cells li:nth-child(3) { border-left: 0; }
  .slate-cells li:nth-child(n + 3) { border-top: var(--rule) solid rgb(244 241 234 / 0.35); }
  .slate-cells li:nth-child(3) a { padding-left: 0; }
  .slate-cells a { min-height: 8rem; gap: var(--s-4); }
  .sec { row-gap: var(--s-3); }
  .sec-head, .sec-body { grid-column: 1 / -1; }
  .sec-head p:not(.label) { max-width: var(--measure); }
  .sec-title { margin-top: 0; }
  .essay > *, .essay > h2, .essay > .pull, .essay > .byline, .fig, .fig.inset { grid-column: 1 / -1; }
  .essay > .byline { grid-row: auto; margin-bottom: var(--s-4); padding-right: 0; }
  .essay > .byline .facts { grid-template-columns: minmax(6rem, auto) 1fr; }
  .essay > .byline .facts dd { border-top: var(--rule) solid var(--hair); padding-top: 0.5rem; }
  .fig figcaption .label, .fig.inset figcaption .label { grid-column: 1 / -1; margin-bottom: 0.2rem; }
  .fig figcaption span:last-child, .fig.inset figcaption span:last-child { grid-column: 1 / -1; }
  .split, .builder, .fig-diagram { grid-template-columns: minmax(0, 1fr); }
  .footer-mark, .footer-note, .footer-links { grid-column: 1 / -1; }
  .footer-note { padding-top: 0; }
}

@media (max-width: 40rem) {
  :root { --t-body: 1.0625rem; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 0; padding-bottom: 0.35rem; }
  .nav { width: 100%; justify-content: space-between; gap: 0 var(--s-1); font-size: 0.75rem; letter-spacing: 0.06em; }
  /* three fitted rows would set the alphabet at 18 pixels here: let it wrap at the floor size instead */
  /* the alphabets carry one break opportunity, at their middle: thirteen and thirteen, not twenty-five and a z */
  .showing span { white-space: normal; font-size: min(var(--d-1), 7.6cqi); line-height: 1.16; }
  .nav a { padding-block: 0.95rem 0.6rem; }
  .hero-meta { flex-direction: column; gap: 0.2rem; }
  .slate-cells { grid-template-columns: minmax(0, 1fr); }
  .slate-cells li + li { border-left: 0; border-top: var(--rule) solid rgb(244 241 234 / 0.35); }
  .slate-cells a { min-height: 0; flex-direction: row; align-items: baseline; padding: var(--s-2) 0 0.85rem; gap: var(--s-2); }
  .style-index a { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.4rem; }
  .style-index .index-word { grid-column: 1 / -1; }
  .film-list li { grid-template-columns: minmax(0, 1fr); row-gap: 0.4rem; }
  .film-list .label { text-align: left; }
  .title-row > li { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-2); }
  .title-row .rank { padding-top: 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .waterfall div { grid-template-columns: minmax(0, 1fr); }
  /* a fact is a label over a value: side by side, the values wrap to three lines */
  .sec-body > .facts, .essay > .byline .facts { grid-template-columns: minmax(0, 1fr); }
  .sec-body > .facts dt, .essay > .byline .facts dt { padding-bottom: 0; }
  .sec-body > .facts dd, .essay > .byline .facts dd { border-top: 0; padding-top: 0.1rem; }
  .glyphs { grid-template-columns: repeat(auto-fill, minmax(4rem, 1fr)); }
  .glyphs span { font-size: 2.75rem; }
  .more, .dl-row { gap: 0 var(--s-3); }
  .style-nav { flex-direction: column; gap: var(--s-3); }
  .style-nav .next { text-align: left; margin-left: 0; }
}

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

@media (forced-colors: active) {
  .sticks { forced-color-adjust: none; }
  .filters button[aria-pressed="true"], .votes button[aria-pressed="true"] { outline: 2px solid CanvasText; }
}

@media print {
  .site-header, .site-footer, .skip, .filters, .votes { display: none; }
  .slate, .fig-stage.night { background: none; color: #000; }
}

/* Grid placement for hero children (kept last so the cascade is obvious) */
.hero > .hero-meta,
.page-hero > .label, .page-hero > .tag, .page-hero > .page-title { grid-column: 1 / -1; }
.page-hero > .tag { justify-self: start; margin-bottom: var(--s-3); }
.hero > .hero-word { grid-column: 1 / -1; grid-row: 2; }
@media (min-width: 62.01rem) {
  .hero > .hero-lede { grid-column: 9 / -1; grid-row: 2; }
}
.stage-wrap { margin-bottom: var(--s-6); }

/* Marketing home ----------------------------------------------------------- */

.hero-visual {
  position: relative;
}
.hero-visual .specimen-stage {
  min-height: clamp(14rem, 28vw, 22rem);
  padding: 2.5rem var(--gutter) 3.25rem;
}
.hero-visual .specimen-stage .support,
.specimen-stage.compact .support { display: none; }
.hero-visual .specimen-stage .big {
  font-size: clamp(3.25rem, 9vw, 9.5rem);
  transition: opacity 0.45s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-caption {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--s-2);
  margin: 0;
  pointer-events: none;
  max-width: var(--page);
  margin-inline: auto;
}
.hero-visual .specimen-stage.is-leaving .big {
  opacity: 0;
  transform: translateY(0.35em);
}
.hero-visual .specimen-stage.is-entering .big {
  animation: hero-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(0.45em); }
  to { opacity: 1; transform: none; }
}
.hero-copy {
  padding-block: var(--s-4) var(--s-5);
  row-gap: var(--s-2);
}
.hero-copy > .label,
.hero-copy > .hero-headline,
.hero-copy > .hero-lede,
.hero-copy > .cta-row { grid-column: 1 / span 8; }
.hero-headline {
  font-size: clamp(2.25rem, 3.2vw + 0.9rem, 5.25rem);
  line-height: 1.02;
  letter-spacing: var(--d-track);
  word-spacing: 0.16em;
  margin: 0 0 var(--s-2) -0.04em;
  animation: hero-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}
.hero-copy .hero-lede {
  font-size: var(--t-lede);
  line-height: 1.4;
  max-width: 36rem;
  margin: 0;
  animation: hero-in 1s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-4) 0 0;
  animation: hero-in 1.05s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.2rem 0.6rem;
  text-decoration: none;
  border: var(--rule) solid currentColor;
  letter-spacing: var(--label-track);
}
.cta.primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.cta.ghost { background: transparent; }
.cta:hover { box-shadow: inset 0 -0.45em 0 var(--accent); }
.slate .cta.primary:hover { box-shadow: inset 0 -0.45em 0 var(--night-ink); }
.slate .cta.ghost { border-color: var(--night-ink); }
.slate .cta.ghost:hover { background: var(--night-ink); color: var(--night); box-shadow: none; }

.benefit-grid, .how-steps, .lockup-showcase {
  list-style: none;
  margin: 0;
  padding: 0;
}
.benefit-grid, .how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4) var(--gap);
}
.benefit-grid li, .how-steps li {
  min-width: 0;
  padding-top: var(--s-2);
  border-top: var(--rule) solid var(--ink);
}
.card-title {
  font-size: var(--d-1);
  line-height: 1.08;
  letter-spacing: var(--d-track);
  margin: 0 0 var(--s-2) -0.03em;
}
.card-title a { text-decoration: none; }
.benefit-grid p, .how-steps p, .card-line { color: var(--ink); max-width: 22rem; }
.how-steps .label { display: block; margin-bottom: var(--s-2); color: var(--mute); }

.lockup-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.lockup-tile a { display: block; text-decoration: none; }
.lockup-tile .specimen-stage { min-height: 16rem; }
.lockup-caption {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--s-2) 0 var(--s-1);
}
.lockup-caption .lockup {
  font-size: clamp(1.75rem, 1.6vw + 1rem, 2.5rem);
  line-height: var(--d-lead-caps);
  letter-spacing: var(--d-track);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--rule) solid var(--ink);
}
.feature-grid li + li { border-left: var(--rule) solid var(--hair); }
.feature-grid a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 9rem;
  padding: var(--s-2) var(--s-2) var(--s-3);
  text-decoration: none;
}
.feature-grid li:first-child a { padding-left: 0; }
.feature-grid .index-word {
  font-size: clamp(2.125rem, 3.2vw, 3.75rem);
  line-height: 0.95;
  letter-spacing: var(--d-track);
  display: block;
  white-space: nowrap;
}

.close-cta {
  background: var(--night);
  color: var(--night-ink);
  margin-top: var(--s-5);
}
.close-cta .wrap { padding-block: var(--s-6) var(--s-7); }
.close-body { grid-column: 1 / span 8; }
.close-cta .sec-title { margin: 0 0 var(--s-3) -0.04em; }
.close-cta p { max-width: 32rem; }
.close-cta .cta-row { margin-top: var(--s-4); }

/* Style library ------------------------------------------------------------ */

.mood-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  margin-bottom: var(--s-4);
}
.mood-tabs button {
  min-height: 2.75rem;
  padding: 0 0.95rem;
  border: var(--rule) solid var(--ink);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.mood-tabs button:hover { background: var(--accent); }
.mood-tabs button[aria-selected="true"],
.mood-tabs button[aria-selected="true"]:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.style-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6) var(--gap);
}
.style-card { min-width: 0; }
.style-card[hidden] { display: none; }
.card-stage { display: block; text-decoration: none; }
.style-card .specimen-stage,
.specimen-stage.compact { min-height: 16rem; padding: 3rem 1.25rem 1.5rem; }
.specimen-stage.compact .big { font-size: min(var(--specimen-size), clamp(1.75rem, 12cqi, 5.5rem)); }
.card-body { padding-top: var(--s-3); }
.card-body > .label { margin-bottom: var(--s-2); }
.card-body .card-title { font-size: var(--d-2); margin-bottom: var(--s-2); }
.uses {
  list-style: none;
  margin: var(--s-2) 0 0;
  padding: 0;
  max-width: 26rem;
}
.uses li {
  font-size: var(--t-small);
  line-height: 1.45;
  color: var(--mute);
  padding-block: 0.35rem;
  border-top: var(--rule) solid var(--hair);
}
.uses li:first-child { border-top-color: var(--ink); }
.prose .uses { margin-top: var(--s-2); }

@media (max-width: 62rem) {
  .hero-copy > .label,
  .hero-copy > .hero-headline,
  .hero-copy > .hero-lede,
  .hero-copy > .cta-row,
  .close-body { grid-column: 1 / -1; }
  .benefit-grid, .how-steps { grid-template-columns: minmax(0, 1fr); }
  .lockup-showcase, .style-library { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid li:nth-child(3) { border-left: 0; }
  .feature-grid li:nth-child(n + 3) { border-top: var(--rule) solid var(--hair); }
  .feature-grid li:nth-child(3) a { padding-left: 0; }
}

@media (max-width: 40rem) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-grid li + li { border-left: 0; border-top: var(--rule) solid var(--hair); }
  .feature-grid a { min-height: 0; flex-direction: row; align-items: baseline; padding: var(--s-2) 0 0.85rem; gap: var(--s-2); }
  .hero-visual .specimen-stage { min-height: 12.5rem; padding-block: 2rem 2.5rem; }
  .hero-copy { padding-block: var(--s-4) var(--s-4); }
  .lockup-tile .specimen-stage, .style-card .specimen-stage { min-height: 14rem; }
}

/* Lab faces: each page has its own structure. Never the Keyslate essay. -- */

body.lab-nightgilt {
  --ng-title-tracking: 0.07em;
  --paper: #0c0a08;
  --paper-2: #16120e;
  --ink: #e8d5a8;
  --mute: #b9a47a;
  --hair: #3a3228;
  --accent: #c4a46a;
  --night: #0c0a08;
  --night-ink: #e8d5a8;
  --lab-face: "Nightgilt", "Keyslate", Didot, Georgia, serif;
  background: #0c0a08;
  color: #e8d5a8;
}
body.lab-nightgilt .gilt-name,
body.lab-nightgilt .gilt-line,
body.lab-nightgilt .gilt-reel .lockup,
body.lab-nightgilt .gilt-alpha,
body.lab-nightgilt .tester textarea {
  font-family: var(--lab-face);
  font-weight: 400;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  font-synthesis: none;
}
.gilt-card {
  padding: clamp(3rem, 8vw, 7rem) var(--gutter) clamp(2.5rem, 6vw, 5rem);
  background:
    linear-gradient(180deg, rgba(232, 213, 168, 0.06), transparent 40%),
    #0c0a08;
  border-bottom: var(--rule) solid var(--hair);
}
.gilt-card .label { margin-bottom: var(--s-3); }
.gilt-name {
  font-size: clamp(4.5rem, 16vw, 13rem);
  line-height: 0.86;
  letter-spacing: -0.03em;
  margin: 0 0 var(--s-4) -0.04em;
}
.gilt-line {
  font-size: clamp(1.75rem, 4.2vw, 3.75rem);
  line-height: 1.02;
  margin: 0 0 var(--s-3);
  max-width: 22em;
}
.gilt-card .deck { max-width: 38rem; color: var(--mute); }
.gilt-card .dl-row { margin-top: var(--s-4); }
.gilt-card .tester { margin-top: var(--s-5); max-width: 48rem; }
.gilt-card .tester textarea {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair);
}
.gilt-reel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-block: var(--s-6);
  list-style: none;
  margin: 0;
}
.gilt-reel li {
  padding-block: var(--s-4);
  border-top: var(--rule) solid var(--hair);
}
.gilt-reel li:first-child { border-top: 0; }
.gilt-reel .lockup {
  display: block;
  font-size: clamp(2.75rem, 7vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-1) -0.03em;
}
.gilt-plates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5) var(--gap);
  padding-block: var(--s-6);
  border-top: var(--rule) solid var(--ink);
  list-style: none;
  margin: 0;
  counter-reset: plate;
}
.gilt-plates li {
  padding-top: var(--s-2);
  border-top: var(--rule) solid var(--hair);
}
.gilt-plates li::before {
  counter-increment: plate;
  content: "Plate " counter(plate, decimal-leading-zero);
  display: block;
  font-family: var(--ui);
  font-size: var(--t-label);
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: var(--s-2);
}
.gilt-plates h2 {
  font-family: var(--lab-face);
  font-weight: 400;
  font-size: clamp(1.75rem, 2vw + 1rem, 2.75rem);
  line-height: 1.05;
  margin: 0 0 var(--s-2);
}
.gilt-plates p { max-width: 32rem; color: var(--mute); }
.gilt-strip {
  border-top: var(--rule) solid var(--ink);
  border-bottom: var(--rule) solid var(--ink);
  padding-block: var(--s-4);
  overflow: hidden;
}
.gilt-strip .facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gap);
}
.gilt-alpha {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 1.18;
  letter-spacing: 0.02em;
  padding-block: var(--s-5);
  overflow-wrap: anywhere;
}
.gilt-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding-block: var(--s-5) var(--s-7);
  border-top: var(--rule) solid var(--hair);
}
.gilt-nav a { text-decoration: none; }

body.lab-hardlight {
  --hl-title-tracking: 0.075em;
  --paper: #071018;
  --paper-2: #101a28;
  --ink: #d7e4ff;
  --mute: #8aa0c4;
  --hair: #243044;
  --accent: #9db8ff;
  --night: #071018;
  --night-ink: #d7e4ff;
  --lab-face: "Hardlight", "Keyslate", Arial, Helvetica, sans-serif;
  background: #071018;
  color: #d7e4ff;
}
body.lab-hardlight .light-name,
body.lab-hardlight .light-line,
body.lab-hardlight .lamp-bank .lockup,
body.lab-hardlight .light-alpha,
body.lab-hardlight .light-term textarea {
  font-family: var(--lab-face);
  font-weight: 400;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  font-synthesis: none;
}
.light-plot {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) var(--s-5);
  border-bottom: var(--rule) solid var(--accent);
}
.light-name {
  font-size: clamp(3.5rem, 12vw, 10rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 var(--s-3);
}
.light-line {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 var(--s-3);
}
.light-plot .deck { max-width: 38rem; color: var(--mute); }
.lamp-bank {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  margin: 0;
  border-bottom: var(--rule) solid var(--hair);
}
.lamp-bank li {
  padding: var(--s-5) var(--gutter);
  border-right: var(--rule) solid var(--hair);
  background:
    linear-gradient(180deg, rgba(157, 184, 255, 0.08), transparent 55%);
}
.lamp-bank li:last-child { border-right: 0; }
.lamp-bank .lockup {
  display: block;
  font-size: clamp(2rem, 4.5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 var(--s-2);
}
body.lab-hardlight .lamp-bank .lockup {
  letter-spacing: var(--hl-title-tracking, 0.075em);
}
.light-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--s-5) var(--gap);
  padding-block: var(--s-6);
}
.light-term textarea {
  width: 100%;
  min-height: 7rem;
  background: #050b14;
  color: var(--ink);
  border: var(--rule) solid var(--accent);
  padding: 0.8rem;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.1;
}
.light-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: lamp;
}
.light-notes li {
  padding-block: 0.65rem;
  border-top: var(--rule) solid var(--hair);
  padding-left: 3.2rem;
  position: relative;
}
.light-notes li:first-child { border-top: 0; }
.light-notes li::before {
  counter-increment: lamp;
  content: "LMP " counter(lamp, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--ui);
  font-size: var(--t-label);
  letter-spacing: var(--label-track);
  color: var(--accent);
}
.light-alpha {
  font-size: clamp(1.6rem, 3.6vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  padding-block: var(--s-5);
  border-top: var(--rule) solid var(--hair);
  overflow-wrap: anywhere;
}
.light-legend {
  border-top: var(--rule) solid var(--accent);
  padding-block: var(--s-5) var(--s-7);
}
.light-legend .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }

body.lab-silkhand {
  --paper: #f6eee6;
  --paper-2: #ead9cc;
  --ink: #5a2430;
  --mute: #8a5560;
  --hair: #e2cfc4;
  --accent: #b85a4a;
  --night: #2a1218;
  --night-ink: #f0d4c8;
  --lab-face: "Silkhand", "Keyslate", "Palatino Linotype", Palatino, serif;
  background: #f6eee6;
  color: #5a2430;
}
body.lab-silkhand .silk-name,
body.lab-silkhand .silk-sign,
body.lab-silkhand .silk-rules .lockup,
body.lab-silkhand .silk-alpha,
body.lab-silkhand .silk-write textarea,
body.lab-silkhand .silk-note h2 {
  font-family: var(--lab-face);
  font-weight: 400;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "calt" 1;
  font-synthesis: none;
}
.silk-fold {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 70vh;
  border-bottom: var(--rule) solid var(--ink);
}
.silk-leaf {
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
}
.silk-leaf-left {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), var(--hair) calc(100% - 1px));
}
.silk-leaf-right {
  background: repeating-linear-gradient(
    180deg,
    transparent 0 2.6rem,
    var(--hair) 2.6rem calc(2.6rem + 1px)
  );
}
.silk-name {
  font-size: clamp(3.25rem, 7vw, 6.25rem);
  line-height: 0.9;
  /* l, k, h and d stand above the line box: keep them clear of the written-card label */
  margin: 0.4em 0 var(--s-4) -0.04em;
}
.silk-sign {
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.08;
  margin: 0 0 var(--s-3);
}
.silk-leaf-left .deck { max-width: 28rem; }
.silk-rules {
  list-style: none;
  margin: 3.2rem 0 0;
  padding: 0;
}
.silk-rules li { padding-block: 0.85rem; }
.silk-rules .lockup {
  display: block;
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  line-height: 1.1;
}
.silk-note {
  max-width: 40rem;
  padding-block: var(--s-6);
}
.silk-note h2 {
  font-size: clamp(1.85rem, 3vw + 1rem, 2.85rem);
  line-height: 1.1;
  margin: var(--s-5) 0 var(--s-2);
}
.silk-note h2:first-child { margin-top: 0; }
.silk-note p { margin: 0 0 1em; }
.silk-alpha {
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1.18;
  padding-block: var(--s-5);
  border-top: var(--rule) solid var(--ink);
  overflow-wrap: anywhere;
}
.silk-write {
  padding-bottom: var(--s-5);
  max-width: 44rem;
}
.silk-write textarea {
  width: 100%;
  min-height: 6rem;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: var(--rule) solid var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.2;
  padding: 0.4rem 0;
}
.silk-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding-block: var(--s-4) var(--s-7);
  border-top: var(--rule) solid var(--hair);
}

/* TyCode: a terminal band, a grid, and a mono rhythm. Text in the face
   stays at 0.875rem (14px) or larger. Headings on the rest of the site
   stay in Keyslate. */

@font-face {
  font-family: "TyCode";
  src: url("/fonts/TyCode-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TyCode";
  src: url("/fonts/TyCode-Bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TyCode";
  src: url("/fonts/TyCode-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

body.lab-tycode .tyc,
body.lab-tycode .tyc-name,
body.lab-tycode .tyc-frame,
body.lab-tycode .tyc-pair,
body.lab-tycode .tyc-h,
body.lab-tycode .tyc-code,
body.lab-tycode .tyc-code code,
body.lab-tycode .tyc-weight,
body.lab-tycode .tester textarea.tyc {
  font-family: "TyCode", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-synthesis: none;
  font-weight: 400;
  font-style: normal;
  font-variant-ligatures: none;
  letter-spacing: 0;
}

.tyc-band {
  background-color: #10140f;
  background-image:
    linear-gradient(to right, rgba(226, 236, 214, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 236, 214, 0.06) 1px, transparent 1px);
  background-size: 8px 8px;
  color: #e7f2dc;
  border-bottom: var(--rule) solid #10140f;
}
.tyc-band-inner {
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
  min-width: 0;
}
.tyc-band .label { color: #f2c12e; margin-bottom: var(--s-3); }
.tyc-name {
  font-size: clamp(3.25rem, 12vw, 7.5rem);
  line-height: 0.95;
  margin: 0 0 var(--s-4);
}
.tyc-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 var(--s-4);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: clamp(1.25rem, 3.2vw, 1.75rem);
  line-height: 1.35;
  overflow-x: auto;
  white-space: pre;
}
.tyc-band .deck {
  max-width: 40rem;
  color: #c5d4bc;
  font-family: var(--text);
  font-size: var(--t-lede);
}
.tyc-band .dl-row a { color: #e7f2dc; }
.tyc-band ::selection { background: #f2c12e; color: #14110d; }

.tyc-block {
  padding-block: var(--s-6);
  min-width: 0;
}
.tyc-block + .tyc-block { border-top: var(--rule) solid var(--hair); }
.tyc-h {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  line-height: 1.15;
  margin: 0 0 var(--s-3);
}
.tyc-block > p {
  max-width: var(--measure);
  margin: 0 0 var(--s-4);
}
.tyc-pairs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--s-4) var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}
.tyc-pair {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.2;
  margin: 0 0 var(--s-1);
}
.tyc-pairs .label { color: var(--mute); }

.tyc-screen {
  background: #10140f;
  color: #e4f0da;
  padding: var(--s-4) var(--s-3) var(--s-3);
  min-width: 0;
}
.tyc-sample + .tyc-sample {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: var(--rule) solid #2c3828;
}
.tyc-screen .label { color: #f2c12e; margin-bottom: var(--s-2); }
.tyc-code {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 var(--s-1);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.55;
  white-space: pre;
  color: #e4f0da;
  background: transparent;
}
.tyc-code code {
  font-size: 0.875rem;
  color: inherit;
}
body.lab-tycode .tyc-code .k { color: #f2c12e; font-weight: bold; font-size: 0.875rem; }
.tyc-code .s { color: #b7d7c4; }
body.lab-tycode .tyc-code .c { color: #8aa084; font-style: italic; font-size: 0.875rem; }
.tyc-code .f { color: #f7fbf4; }

.tyc-weights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4) var(--gap);
  list-style: none;
  margin: 0 0 var(--s-5);
  padding: 0;
}
.tyc-weight {
  font-size: 1.35rem;
  line-height: 1.35;
  margin: var(--s-1) 0 0;
  overflow-x: auto;
  max-width: 100%;
  white-space: pre;
}
body.lab-tycode .tyc-b { font-weight: bold; font-size: 1.35rem; }
body.lab-tycode .tyc-i { font-style: italic; font-weight: 400; font-size: 1.35rem; }
body.lab-tycode .tester { max-width: 44rem; }
body.lab-tycode .tester textarea.tyc {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.35;
  letter-spacing: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tyc-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 60rem;
}
.tyc-gallery figure { margin: 0; }
.tyc-gallery img {
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--paper-2);
}
.tyc-gallery figcaption {
  margin-top: var(--s-2);
  max-width: 40rem;
  color: var(--mute);
  font-family: var(--text);
  font-size: var(--t-small);
}

.tyc-facts {
  border-top: var(--rule) solid var(--ink);
  padding-block: var(--s-4);
}
.tyc-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding-block: var(--s-4) var(--s-7);
  border-top: var(--rule) solid var(--hair);
}
.tyc-links a { text-decoration: none; }

@media (max-width: 62rem) {
  .gilt-plates, .lamp-bank, .light-body, .silk-fold, .tyc-weights { grid-template-columns: minmax(0, 1fr); }
  .gilt-strip .facts, .light-legend .facts { grid-template-columns: minmax(0, 1fr); }
  .lamp-bank li { border-right: 0; border-bottom: var(--rule) solid var(--hair); }
  .silk-leaf-left { background: none; border-bottom: var(--rule) solid var(--hair); }
}
