/* Ria — type specimen
   Interface: Helvetica Neue. Display & specimens: Ria.
   Motion language: things "build" in grid rows (stepped), the way the letters are made. */

@font-face {
  font-family: "Ria";
  src: url("../fonts/Ria-Regular.woff2?v=fcfb7d1d29") format("woff2"),
       url("../fonts/Ria-Regular.woff?v=fcfb7d1d29") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --ink: #000;
  --paper: #fff;
  --mute: #767676;
  --ghost: #c6c6c6;
  --rule: #e4e4e4;
  --rule-2: #cfcfcf;

  --ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ria: "Ria", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --m: clamp(16px, 2.4vw, 44px);        /* page margin */
  --g: clamp(12px, 1.25vw, 24px);       /* column gap */
  --cols: 12;
  --nav-h: 56px;
  --space: clamp(128px, 15vw, 248px);   /* between sections */

  /* Where the baseline sits inside a 1.2em line of Ria: half the line plus half of
     (ascender + descender). main.js recomputes it from the font's own metrics. */
  --baseline: calc(.6 + (.781 - .202) / 2);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  color-scheme: light;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--paper);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font: 400 13px/1.45 var(--ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}

p, h1, h2, h3, dl, dd, figure, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
b { font-weight: inherit; }

::selection { background: var(--ink); color: var(--paper); }

:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.ria {
  font-family: var(--ria);
  font-weight: 400;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  line-height: 1.2;
}
.tab { font-variant-numeric: tabular-nums; }
.mute { color: var(--mute); }
.right { text-align: right; }

.skip {
  position: fixed; left: var(--m); top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 8px 12px; font-size: 12px;
}
.skip:focus { top: 12px; }

/* Grid ------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--g);
  padding-inline: var(--m);
}

/* Text link with a drawn 1px underline */
.u, .trial__links a, .accept a, .doc a {
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size .6s var(--ease);
  padding-bottom: 1px;
}
.u:hover, .trial__links a:hover, .accept a:hover, .doc a:hover { background-size: 100% 1px; }

/* Navigation ------------------------------------------------------------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--g);
  align-items: baseline;
  padding: 16px var(--m) 0;
  height: var(--nav-h);
  color: #fff;
  mix-blend-mode: difference;
  font-size: 12px;
  letter-spacing: .005em;
  transition: transform .6s var(--ease);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__id { grid-column: 1 / 6; display: flex; align-items: baseline; gap: 8px; }
.nav__brand { font-size: 22px; line-height: 1; }
.nav__brand .ria { line-height: 1; }
.nav__links { grid-column: 6 / 11; display: flex; gap: clamp(16px, 2vw, 34px); }
.nav__cta { grid-column: 11 / 13; justify-self: end; }
.nav__menu { display: none; }

.nav__links a, .nav__cta { position: relative; padding-left: 12px; }
.nav__links a::before, .nav__cta::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 6px; height: 6px; background: currentColor;
  transform: scale(0); transition: transform .45s var(--ease);
}
.nav__links a:hover::before, .nav__links a.is-current::before,
.nav__cta:hover::before, .nav__cta.is-current::before { transform: scale(1); }
/* Helvetica's arrow sits low in its box: raise its ink to the middle of the text's ink */
.nav__cta .arrow { display: inline-block; position: relative; top: -.13em; transition: transform .45s var(--ease); }
.nav__cta:hover .arrow { transform: translateY(2px); }

/* Mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--paper);
  padding: calc(var(--nav-h) + 24px) var(--m) 24px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu[hidden] { display: none; }
.menu__links a {
  display: flex; align-items: baseline; gap: 14px;
  border-top: 1px solid var(--rule);
  padding: 10px 0 4px;
  font-size: clamp(40px, 12.5vw, 72px);
}
.menu__links .ria { line-height: 1.1; }
.menu__no { font: 11px var(--ui); color: var(--mute); width: 22px; flex: none; }
.menu__foot { font-size: 12px; color: var(--mute); }
.menu.is-open .menu__links a { animation: build-row .7s steps(14) both; }
.menu.is-open .menu__links a:nth-child(2) { animation-delay: .05s; }
.menu.is-open .menu__links a:nth-child(3) { animation-delay: .1s; }
.menu.is-open .menu__links a:nth-child(4) { animation-delay: .15s; }
.menu.is-open .menu__links a:nth-child(5) { animation-delay: .2s; }

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: calc(var(--nav-h) + 2vh);
  padding-bottom: 20px;
}

.hero__stage {
  --fs: min(calc((100vw - 2 * var(--m)) / 2.1), calc((100svh - 190px) / 1.08));
  position: relative;
  font-size: var(--fs);
  height: 1.2em;
  margin-top: auto;
  margin-bottom: auto;
  translate: 0 -.04em;
}
.hero__word {
  position: relative;
  display: flex;
  margin-left: calc(var(--m) - .042em);   /* align R's ink, not its sidebearing, to the margin */
  font-size: 1em;
  line-height: 1.2;
  white-space: nowrap;
  z-index: 1;
}
.hero__word span { display: inline-block; }

.metrics { position: absolute; inset: 0; pointer-events: none; }
.metric {
  position: absolute; left: 0; right: 0;
  top: calc((var(--baseline) - var(--h)) * 1em);
  height: 1px;
}
/* The rule itself is a pseudo-element so its scaleX build never drags the label with it */
.metric::before { content: ""; position: absolute; inset: 0; background: var(--rule); transform-origin: left center; }
.metric--base::before { background: var(--ink); }
.metric span {
  position: absolute; right: var(--m);
  font: 11px/1 var(--ui);
  color: var(--mute);
  white-space: nowrap;
}
.metric span b { color: var(--ink); margin-left: 4px; }
.metric--above span { bottom: 7px; }
.metric--below span { top: 7px; }

.crosshair { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease); z-index: 2; }
.crosshair__x, .crosshair__y { position: absolute; background: var(--ink); opacity: .16; }
.crosshair__x { left: 0; right: 0; top: 0; height: 1px; }
.crosshair__y { top: 0; bottom: 0; left: 0; width: 1px; }
.crosshair__read {
  position: absolute; left: 0; top: 0;
  font: 10px/1 var(--ui); color: var(--ink);
  white-space: pre;
  padding: 4px 5px; background: var(--paper);
}
.hero__stage.is-probing .crosshair { opacity: 1; }

@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(3px); } }

/* Loader: a percentage counter pinned to the bottom-right corner, ink flush with the edges.
   The number uses the same 1.2 line box as the hero, so --baseline places its baseline exactly
   on the viewport bottom; the right edge is pulled in by the % sign's own sidebearing (45/1000). */
.loader { display: none; }
.js .loader {
  display: block;
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  pointer-events: none;
}
.loader__n {
  position: absolute;
  right: -.045em;
  bottom: calc((var(--baseline, .8895) - 1.2) * 1em);
  font: clamp(125px, 39vw, 572px)/1.2 var(--ria);
  font-kerning: none;
  white-space: nowrap;
  opacity: .5;
}
.js .loader[hidden] { display: none; }
.js.is-loading { overflow: hidden; }

/* Hero load sequence */
.js .hero__word span { clip-path: inset(calc(100% + .1em) 0 -.1em 0); }
.js .metric::before { transform: scaleX(0); }
.js .metric span { opacity: 0; }
.js.is-ready .hero__word span { animation: build 1s steps(30) both; }
.js.is-ready .hero__word span:nth-child(1) { animation-delay: 0s; }
.js.is-ready .hero__word span:nth-child(2) { animation-delay: .25s; }
.js.is-ready .hero__word span:nth-child(3) { animation-delay: .5s; }
.js.is-ready .metric::before { transform: none; transition: transform 1.6s var(--ease); }
.js.is-ready .metric:nth-child(2)::before { transition-delay: .08s; }
.js.is-ready .metric:nth-child(3)::before { transition-delay: .16s; }
.js.is-ready .metric:nth-child(4)::before { transition-delay: .24s; }
.js.is-ready .metric span { opacity: 1; transition: opacity .9s var(--ease) .85s; }

@keyframes build {
  from { clip-path: inset(calc(100% + .1em) -.1em -.1em -.1em); }
  to   { clip-path: inset(-.1em -.1em -.1em -.1em); }
}
@keyframes build-row {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* Generic reveals */
.js [data-fade] { opacity: 0; translate: 0 12px; }
.js [data-fade].is-in { opacity: 1; translate: 0 0; transition: opacity 1s var(--ease), translate 1.2s var(--ease); transition-delay: var(--delay, 0s); }
.js .hero [data-fade] { opacity: 0; translate: 0 8px; }
.js.is-ready .hero [data-fade] { opacity: 1; translate: 0 0; transition: opacity 1s var(--ease) .8s, translate 1.2s var(--ease) .8s; }

.js [data-reveal="build"] { clip-path: inset(calc(100% + .3em) -.2em -.3em -.2em); }
.js [data-reveal="build"].is-in { animation: build-lg 1.15s steps(28) both; animation-delay: var(--delay, 0s); clip-path: none; }
@keyframes build-lg {
  from { clip-path: inset(calc(100% + .3em) -.2em -.3em -.2em); }
  to   { clip-path: inset(-.3em -.2em -.3em -.2em); }
}
.js [data-reveal="type"]:not(.is-typed) { clip-path: inset(0 100% 0 0); }

/* Section scaffolding ---------------------------------------------------- */

.section { margin-top: var(--space); scroll-margin-top: calc(var(--nav-h) - 8px); }

.sh {
  position: relative;
  align-items: baseline;
  padding-top: 10px;
  font-size: 12px;
}
.sh::before, .cap::before {
  content: ""; position: absolute; top: 0; left: var(--m); right: var(--m);
  height: 1px; background: var(--ink);
  transform-origin: left center;
}
.js .sh::before, .js .cap::before { transform: scaleX(0); transition: transform 1.4s var(--ease); }
.js .sh.is-in::before, .js .cap.is-in::before { transform: none; }
.js .sh.is-instant::before { transition: none; }
.sh__no { grid-column: 1 / 2; }
.sh__title { grid-column: 2 / 5; font-size: inherit; font-weight: 400; }
.sh__meta { grid-column: 5 / 10; }
.sh__aside { grid-column: 10 / 13; text-align: right; }

.cap {
  position: relative;
  padding-top: 9px;
  font-size: 11px;
  align-items: baseline;
}
.cap::before { background: var(--rule-2); }
.cap > :nth-child(1) { grid-column: 1 / 2; }
.cap > :nth-child(2) { grid-column: 2 / 4; }
.cap > :nth-child(3) { grid-column: 4 / 9; }
.cap > :nth-child(4) { grid-column: 9 / 13; }

/* 01 Typeface ------------------------------------------------------------ */

.intro { margin-top: clamp(56px, 8vw, 132px); }
.intro__label { grid-column: 1 / 4; font-size: 12px; padding-top: .7em; }
.intro__text {
  grid-column: 4 / 13;
  font-size: clamp(24px, 2.85vw, 48px);
  line-height: 1.1;
  letter-spacing: -.018em;
  max-width: 21em;
}
.intro__text p { margin: 0; }
.intro__text p + p { margin-top: 1em; }

.facts { margin-top: clamp(64px, 8vw, 128px); row-gap: 0; }
.facts > div { grid-column: span 3; border-top: 1px solid var(--rule); padding: 10px 0 30px; }
.facts dt { font-size: 11px; color: var(--mute); margin-bottom: 4px; }
.facts dd { font-size: 13px; }

.spec { margin-top: var(--space); }
.spec__word { margin: 0; padding-inline: var(--m); white-space: nowrap; }

.spec--form .spec__word { font-size: 22vw; line-height: .821; margin-top: clamp(32px, 4vw, 72px); }

[data-track] { transition: letter-spacing 1.2s var(--ease); }
.spec--form [data-track]:hover { letter-spacing: -.015em; }

/* Duo */
.duo__pair {
  display: grid; grid-template-columns: 1fr 1fr;
  margin: clamp(24px, 3vw, 48px) var(--m) 0;
  border-bottom: 1px solid var(--rule);
}
.duo__half { position: relative; display: flex; flex-direction: column; align-items: center; padding: clamp(24px, 4vw, 64px) 0 20px; }
.duo__half + .duo__half { border-left: 1px solid var(--rule); }
.duo__half::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: var(--rule);
}
.duo__glyph { position: relative; font-size: min(34vw, 74svh); line-height: 1; }
.duo__glyph span { display: inline-block; transition: transform 1.4s var(--ease); }
.duo__half:hover .duo__glyph span { transform: scale(1.035); }
.duo__note { position: relative; align-self: stretch; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 12px 14px 0; background: var(--paper); }

/* Bands */
.bands { overflow: hidden; }
.band { overflow: hidden; margin-top: clamp(20px, 2.4vw, 40px); }
.band + .band { margin-top: 0; }
.band__row {
  display: inline-block;
  font-size: clamp(72px, 14vw, 260px);
  line-height: 1.02;
  white-space: nowrap;
  padding-inline: var(--m);
  will-change: transform;
}

/* Figures */
.spec--figs .spec__word { font-size: 16vw; line-height: .821; margin-top: clamp(32px, 4vw, 72px); }

/* Waterfall */
.fall { margin-top: clamp(24px, 3vw, 48px); }
.fall li {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--g);
  align-items: baseline;
  padding: 6px var(--m) 4px;
  border-bottom: 1px solid var(--rule);
}
.fall__size { grid-column: 1 / 2; font-size: 11px; color: var(--mute); }
.fall__line {
  grid-column: 2 / -1;
  font-size: calc(var(--s) * 1px);
  line-height: 1.2;
  white-space: nowrap;
  padding-inline-start: 2px;
}

/* 02 Glyphs -------------------------------------------------------------- */

.glyphs { margin-top: clamp(40px, 5vw, 80px); align-items: start; }

.insp { grid-column: 1 / 6; position: sticky; top: calc(var(--nav-h) + 8px); }
.insp__stage { container-type: inline-size; border-top: 1px solid var(--ink); }
.insp__canvas {
  position: relative;
  font-size: min(64cqw, 48svh);
  height: 1.2em;
  overflow: hidden;
}
.insp__metrics i {
  position: absolute; left: 0; right: 0; top: calc((var(--baseline) - var(--h)) * 1em);
  height: 1px; background: var(--rule);
}
.insp__metrics i.is-base { background: var(--ink); }
.insp__metrics span {
  position: absolute; left: 0; bottom: 5px;
  font: 10px/1 var(--ui); color: var(--mute); font-style: normal;
  font-variant-numeric: tabular-nums;
}
.insp__glyphwrap { position: relative; display: flex; justify-content: center; height: 100%; }
.insp__glyph {
  display: inline-block;
  line-height: 1.2;
  height: 1.2em;
  box-shadow: inset 1px 0 0 var(--rule-2), inset -1px 0 0 var(--rule-2);
}
.insp__glyph.is-soon { font-family: var(--ui); color: var(--ghost); font-size: .62em; line-height: 1.935; height: 1.935em; box-shadow: none; }

.insp__data { display: grid; grid-template-columns: 1fr 1fr 1fr; column-gap: var(--g); margin-top: 0; }
.insp__data > div { border-top: 1px solid var(--rule); padding: 9px 0 14px; }
.insp__data .insp__name { grid-column: 1 / -1; border-top-color: var(--ink); }
.insp__data dt { font-size: 11px; color: var(--mute); margin-bottom: 3px; }
.insp__data dd { font-size: 13px; }
.insp__name dd { font-size: 15px; }

.sets { grid-column: 7 / 13; }
.set + .set { margin-top: clamp(48px, 5vw, 88px); }
.set__head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--ink);
  padding: 9px 0 14px;
  font-size: 12px;
}
.set__head .tag { font-size: 11px; color: var(--mute); }
.set__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(58px, 5.6vw, 104px), 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.cell {
  position: relative;
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--ria);
  font-size: clamp(26px, 2.7vw, 50px);
  line-height: 1.2;
  font-kerning: none;
  transition: background-color .18s steps(3), color .18s steps(3);
}
.cell__g { display: block; transition: transform .6s var(--ease); }
.cell__u {
  position: absolute; left: 6px; bottom: 5px;
  font: 9px/1 var(--ui); letter-spacing: .02em;
  opacity: 0; transition: opacity .3s var(--ease);
  font-variant-numeric: tabular-nums;
}
.cell:hover, .cell.is-active { background: var(--ink); color: var(--paper); }
.cell:hover .cell__u, .cell.is-active .cell__u { opacity: 1; }
.cell:hover .cell__g { transform: scale(1.12); }
.cell:focus-visible { outline-offset: -4px; outline-color: currentColor; }

.cell--soon { font-family: var(--ui); font-size: clamp(16px, 1.5vw, 24px); color: var(--ghost); }
.cell--soon:hover, .cell--soon.is-active { background: #f4f4f4; color: var(--mute); }
.cell--soon:hover .cell__g { transform: none; }

.js .cell { opacity: 0; }
.js .set.is-in .cell { opacity: 1; transition: opacity .01s linear calc(var(--i) * 18ms), background-color .18s steps(3), color .18s steps(3); }

/* 03 Try it -------------------------------------------------------------- */

.controls { margin-top: clamp(40px, 5vw, 80px); row-gap: 28px; align-items: end; }
.ctl { display: block; font-size: 11px; }
.ctl:nth-child(1) { grid-column: 1 / 4; }
.ctl:nth-child(2) { grid-column: 4 / 7; }
.ctl:nth-child(3) { grid-column: 7 / 10; }
.ctl--case { grid-column: 10 / 12; }
.ctl--reset { grid-column: 12 / 13; justify-self: end; padding-bottom: 1px; }
.ctl__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ctl__head > span:first-child { color: var(--mute); }
.ctl output { color: var(--ink); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 16px; margin: 0;
  background: transparent;
  --p: 50%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(to right, var(--ink) var(--p), var(--rule-2) var(--p));
}
input[type="range"]::-moz-range-track {
  height: 1px;
  background: linear-gradient(to right, var(--ink) var(--p), var(--rule-2) var(--p));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 11px; height: 11px; margin-top: -5px;
  background: var(--ink); border: 0; border-radius: 0;
  transition: transform .3s var(--ease);
}
input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px; background: var(--ink); border: 0; border-radius: 0;
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.4); }
input[type="range"]:focus-visible { outline-offset: 6px; }

.seg { display: flex; gap: 0; border-bottom: 1px solid var(--ink); }
.seg button {
  flex: 1; padding: 0 0 3px; font-size: 12px; color: var(--mute);
  text-align: left; position: relative;
}
.seg button[aria-checked="true"] { color: var(--ink); }
.seg button[aria-checked="true"]::after {
  content: ""; position: absolute; left: 0; right: 30%; bottom: -1px; height: 3px; background: var(--ink);
}
.ctl--reset { font-size: 12px; }
.ctl--reset:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.canvas {
  --t-size: 160px; --t-track: 0; --t-lead: 1.1; --t-case: none;
  position: relative;
  margin-top: clamp(28px, 3.5vw, 56px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  min-height: 58svh;
}
.canvas__mirror, .canvas__input {
  display: block;
  width: 100%;
  margin: 0; border: 0; border-radius: 0;
  padding: clamp(28px, 4vw, 64px) var(--m) clamp(40px, 5vw, 80px);
  font-family: var(--ria);
  font-size: var(--t-size);
  letter-spacing: calc(var(--t-track) * .001em);
  line-height: var(--t-lead);
  text-transform: var(--t-case);
  font-kerning: normal;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
  tab-size: 4;
}
.canvas__mirror { position: absolute; inset: 0; pointer-events: none; color: var(--ink); overflow: hidden; }
.canvas__mirror .x { color: var(--ghost); }
.canvas__input {
  position: relative;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--ink);
  resize: none;
  overflow: hidden;
  outline: none;
  min-height: 58svh;
}
.canvas__input::placeholder { color: var(--ghost); -webkit-text-fill-color: var(--ghost); }
.canvas__input::selection { background: rgba(0, 0, 0, .12); color: transparent; -webkit-text-fill-color: transparent; }
.canvas:focus-within { border-top-color: var(--ink); }

.tester__status { margin-top: 10px; font-size: 11px; }
.tester__status > :nth-child(1) { grid-column: 1 / 4; }
.tester__status > :nth-child(2) { grid-column: 4 / 7; }
.tester__note { grid-column: 7 / 13; text-align: right; opacity: 0; transition: opacity .5s var(--ease); }
.tester__note.is-shown { opacity: 1; }

/* 04 Trial --------------------------------------------------------------- */

.trial { margin-top: clamp(56px, 8vw, 132px); align-items: start; }
.trial__word { grid-column: 1 / 7; font-size: 19vw; line-height: .86; white-space: nowrap; }
.trial__panel { grid-column: 8 / 13; padding-top: .5em; }

.trial__pkg > div { display: grid; grid-template-columns: 1fr 2fr; gap: var(--g); border-top: 1px solid var(--rule); padding: 8px 0 10px; font-size: 13px; }
.trial__pkg dt { color: var(--mute); font-size: 11px; padding-top: 2px; }
.accept { position: relative; display: flex; gap: 12px; align-items: baseline; margin-top: 36px; font-size: 13px; cursor: pointer; }
.accept input { position: absolute; opacity: 0; width: 12px; height: 12px; margin: 0; }
.accept__box {
  flex: none; position: relative; top: 1px;
  width: 12px; height: 12px; border: 1px solid var(--ink);
}
.accept__box::after {
  content: ""; position: absolute; inset: 1px; background: var(--ink);
  transform: scale(0); transition: transform .3s steps(4);
}
.accept input:checked + .accept__box::after { transform: scale(1); }
.accept input:focus-visible + .accept__box { outline: 1px solid var(--ink); outline-offset: 3px; }
.accept.is-nudged .accept__box { animation: nudge-x .5s var(--ease-io); }
@keyframes nudge-x { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.dl {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  column-gap: 4px;                  /* meta → arrow; the label column is 1fr and takes the rest */
  margin-top: 24px;
  padding: 22px 0 20px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);          /* backdrop for the difference-blended label */
  font-size: 16px;
  overflow: hidden;
}
.dl__fill {
  position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .42s steps(14);
}
.dl__label, .dl__meta, .dl__arrow { color: #fff; mix-blend-mode: difference; }
.dl__label { padding-left: 0; transition: padding-left .5s var(--ease); }
.dl__meta { font-size: 12px; }
.dl__arrow { display: inline-block; position: relative; top: -.13em; transition: transform .5s var(--ease); }
.dl:hover .dl__fill, .dl:focus-visible .dl__fill, .dl.is-busy .dl__fill, .dl.is-done .dl__fill { transform: scaleX(1); }
.dl:hover .dl__label { padding-left: 8px; }
.dl:hover .dl__arrow { transform: translateY(3px); }
.dl__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: #fff; mix-blend-mode: difference;
  transform: scaleX(0); transform-origin: left center;
}
.dl.is-busy .dl__progress { transform: scaleX(1); transition: transform .9s steps(18); }
.dl.is-busy .dl__arrow { animation: nudge 0.9s var(--ease-io) infinite; }
.dl.is-locked .dl__meta, .dl.is-locked .dl__arrow { opacity: .45; }
.dl__hint { min-height: 1.5em; margin-top: 10px; font-size: 12px; }

.trial__links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; font-size: 13px; }

/* Footer ----------------------------------------------------------------- */

.foot {
  position: relative;
  margin-top: var(--space);
  padding-top: 14px; padding-bottom: 32px;
  font-size: 12px;
  align-items: start;
  row-gap: 24px;
}
.foot::before { content: ""; position: absolute; top: 0; left: var(--m); right: var(--m); height: 1px; background: var(--ink); }
.foot__rights { grid-column: 1 / 8; }
.foot__top { grid-column: 12 / 13; justify-self: end; }

/* Cursor ----------------------------------------------------------------- */

.cursor {
  position: fixed; left: 0; top: 0; z-index: 100;
  width: 0; height: 0;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.cursor::before {
  content: ""; position: absolute; left: -5px; top: -5px;
  width: 10px; height: 10px; background: #fff;
  transition: transform .45s var(--ease);
}
.cursor.is-on { opacity: 1; }
.cursor.is-link::before { transform: scale(2.6); }
.cursor.is-cell::before { transform: scale(.6); }
.cursor.is-text::before { transform: scale(0); }

html.has-cursor, html.has-cursor * { cursor: none; }
html.has-cursor textarea { cursor: text; }

/* Legal page ------------------------------------------------------------- */

.doc-hero { padding-top: calc(var(--nav-h) + 8vh); }
.doc-hero__label { grid-column: 1 / -1; font-size: 12px; }
.doc-hero__title { grid-column: 1 / -1; font-size: 13.4vw; line-height: 1; white-space: nowrap; margin: 4vh 0 0 -.03em; }
.doc { margin-top: clamp(64px, 8vw, 128px); }
.doc__intro { grid-column: 4 / 11; font-size: clamp(20px, 2vw, 30px); line-height: 1.2; letter-spacing: -.012em; margin-bottom: clamp(48px, 6vw, 96px); }
.doc__row { display: contents; }
.doc__no { grid-column: 1 / 2; font-size: 12px; border-top: 1px solid var(--ink); padding-top: 10px; }
.doc__h { grid-column: 2 / 4; font-size: 12px; font-weight: 400; border-top: 1px solid var(--ink); padding-top: 10px; }
.doc__body { grid-column: 4 / 11; font-size: 15px; line-height: 1.55; border-top: 1px solid var(--rule); padding: 10px 0 48px; }
.doc__body p + p, .doc__body ol { margin-top: .8em; }
.doc__body ol { list-style: lower-alpha; padding-left: 1.4em; }
.doc__body li + li { margin-top: .35em; }
.doc__todo { color: var(--mute); }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1100px) {
  .nav__id { grid-column: 1 / 5; }
  .nav__links { grid-column: 5 / 11; }
  .insp { grid-column: 1 / 7; }
  .sets { grid-column: 7 / 13; }
}

@media (max-width: 900px) {
  :root { --cols: 6; --nav-h: 52px; }
  .nav { padding-top: 14px; }
  .nav__id { grid-column: 1 / 5; }
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: block; grid-column: 5 / 7; justify-self: end; font-size: 12px; }


  .sh__no { grid-column: 1 / 2; }
  .sh__title { grid-column: 2 / 4; }
  .sh__meta { grid-column: 4 / 7; text-align: right; }
  .sh__aside { display: none; }
  .cap > :nth-child(2) { grid-column: 2 / 4; }
  .cap > :nth-child(3) { grid-column: 4 / 7; text-align: right; }
  .cap > :nth-child(4) { display: none; }

  .intro__label { grid-column: 1 / -1; padding: 0 0 18px; }
  .intro__text { grid-column: 1 / -1; }
  .facts > div { grid-column: span 3; }

  /* Inspector becomes a sticky preview at the bottom of the viewport: it follows the
     character set and parks under the last row once the section scrolls out. */
  .insp {
    grid-column: 1 / -1; order: 1;
    position: sticky; top: auto; bottom: 0; z-index: 20;
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--g); align-items: start;
    margin: 24px calc(-1 * var(--m)) 0;
    padding: 0 var(--m) env(safe-area-inset-bottom);
    background: var(--paper);
    border-top: 1px solid var(--ink);
  }
  .insp__stage { width: clamp(88px, 26vw, 112px); border-top: 0; padding-top: 8px; }
  .insp__canvas { font-size: clamp(64px, 19vw, 82px); }
  .insp__metrics span { display: none; }
  .insp__data > div { padding: 8px 0; }
  .insp__data .insp__name { border-top: 0; }
  .insp__data dt { margin-bottom: 2px; }
  .insp__data dd { font-size: 12px; }
  .insp__name dd { font-size: 14px; }
  .sets { grid-column: 1 / -1; }

  .ctl:nth-child(1) { grid-column: 1 / 4; }
  .ctl:nth-child(2) { grid-column: 4 / 7; }
  .ctl:nth-child(3) { grid-column: 1 / 4; }
  .ctl--case { grid-column: 4 / 6; }
  .ctl--reset { grid-column: 6 / 7; }
  .canvas { --t-size: 96px; }
  .tester__status > :nth-child(1) { grid-column: 1 / 3; }
  .tester__status > :nth-child(2) { grid-column: 3 / 5; }
  .tester__note { grid-column: 1 / -1; text-align: left; margin-top: 6px; }

  .trial__word { grid-column: 1 / -1; font-size: 34vw; margin-bottom: 40px; }
  .trial__panel { grid-column: 1 / -1; padding-top: 0; }

  .foot__rights { grid-column: 1 / 6; }
  .foot__top { grid-column: 6 / 7; }

  .doc__intro { grid-column: 1 / -1; }
  .doc__no { grid-column: 1 / 2; }
  .doc__h { grid-column: 2 / -1; }
  .doc__body { grid-column: 2 / -1; border-top: 0; padding-top: 6px; }
}

@media (max-width: 600px) {
  :root { --cols: 4; }
  .nav__id { grid-column: 1 / 4; }
  .nav__menu { grid-column: 4 / 5; }

  .hero { min-height: 92svh; }
  .hero__stage { margin-top: auto; margin-bottom: 18px; }
  .metric span { font-size: 9px; }
  .metric--above span { bottom: 4px; }
  .metric--below span { top: 4px; }

  .sh__title { grid-column: 2 / -1; white-space: nowrap; }
  .sh__meta { display: none; }
  .cap > :nth-child(2) { grid-column: 2 / 3; white-space: nowrap; }
  .cap > :nth-child(3) { grid-column: 3 / 5; }

  .facts > div { grid-column: span 2; padding-bottom: 22px; }

  .duo__note { flex-direction: column; gap: 0; padding-inline: 8px; font-size: 11px; }

  .fall li { padding-inline: var(--m); }
  .fall__size { grid-column: 1 / -1; margin-bottom: -2px; }
  .fall__line { grid-column: 1 / -1; font-size: calc(var(--s) * .62px + 6px); }

  .set__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cell { font-size: 30px; }

  .controls { row-gap: 24px; }
  .ctl:nth-child(1), .ctl:nth-child(2), .ctl:nth-child(3) { grid-column: 1 / -1; }
  .ctl--case { grid-column: 1 / 4; }
  .ctl--reset { grid-column: 4 / 5; }
  .canvas { --t-size: 48px; min-height: 46svh; }
  .canvas__input { min-height: 46svh; }
  .tester__status > :nth-child(1) { grid-column: 1 / 3; }
  .tester__status > :nth-child(2) { grid-column: 3 / 5; text-align: right; }

  .dl { font-size: 15px; }

  .foot__rights { grid-column: 1 / 4; }
  .foot__top { grid-column: 4 / 5; justify-self: end; }

  .doc-hero__title { font-size: 15vw; }
  .doc__body { font-size: 14px; }
}

@media (hover: none) { .hint-hover { display: none; } }
@media (hover: hover) {
  .hint-touch { display: none; }
  /* While the pointer is over the set, only the hovered cell is lit; the selected one comes back on leave */
  .sets.is-hovering .cell.is-active:not(:hover) { background: transparent; color: inherit; }
  .sets.is-hovering .cell.is-active:not(:hover) .cell__u { opacity: 0; }
  .sets.is-hovering .cell--soon.is-active:not(:hover) { color: var(--ghost); }
}

/* Touch targets: ~44px hit areas for the small text controls, without moving anything. */
@media (pointer: coarse) {
  .nav__menu { position: relative; }
  .nav__menu::before { content: ""; position: absolute; inset: -14px -16px -13px -16px; }
  .seg button::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; bottom: -8px; }
  .ctl--reset { position: relative; }
  .ctl--reset::before { content: ""; position: absolute; inset: -16px -12px -14px -12px; }
  .accept { padding-block: 14px; margin-top: 22px; margin-bottom: -14px; }
}

/* Page transition (cross-document) -------------------------------------- */

::view-transition-old(root) { animation: vt-out .38s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in .7s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

/* Reduced motion --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .hero__word span { clip-path: none !important; }
  .js [data-fade], .js .cell, .js .metric span { opacity: 1 !important; translate: none !important; }
  .js .metric::before, .js .sh::before, .js .cap::before { transform: none !important; }
  .band__row { transform: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
