/* Kanji's page: what style.css doesn't have yet. The waiting-list button (a button, no action yet), the comparison table and the
   demos' placeholders, in the site's paper, ink and hairlines. */

/* ---------- the waiting list ---------- */
.lead .get { margin-top: 1.75rem; }
.get button {
  display: inline-block; font: inherit; font-size: 1.05rem; line-height: 1.2; cursor: pointer;
  padding: 0.5rem 1rem 0.55rem; border: 0; border-radius: 2px;
  background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1px var(--ink);
}
.get button:hover { background: transparent; color: var(--ink); }
.get button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.get button small { display: block; font-size: 0.86rem; opacity: 0.8; margin-top: 0.1rem; }
.get.big button { font-size: 1.2rem; padding: 0.7rem 1.4rem 0.75rem; }
/* the waiting list's two buttons as wide as the text over each: the hero's paragraph (46ch) and the last section's summary (64ch),
   each list in the body's font so that its ch is theirs */
.lead .get, #waitlist .get { display: block; }
.lead .get { max-width: 46ch; }
#waitlist .get { max-width: 64ch; }
.lead .get li, #waitlist .get li { display: block; }
.lead .get button, #waitlist .get button { display: block; width: 100%; font-size: 1.3rem; padding: 0.85rem 1.2rem 0.9rem; }
.lead .get button small { font-size: 0.95rem; margin-top: 0.15rem; }
.get button.ghost { background: transparent; color: var(--ink); }      /* a secondary action: outlined, filled on hover */
.get button.ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- reading against writing: a comparison, in hairlines ---------- */
.compare-scroll { margin-top: 1.75rem; overflow-x: auto; }
.compare { width: 100%; min-width: 44rem; border-collapse: collapse; font-size: 1.02rem; line-height: 1.35; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--rule); }
.compare thead th {
  font-weight: 400; font-variant-caps: all-small-caps; letter-spacing: 0.09em; color: var(--ink-soft);
  border-bottom: 1px solid var(--ink); padding-top: 0;
}
.compare tbody th { font-weight: 400; font-variant-caps: all-small-caps; letter-spacing: 0.09em; color: var(--ink-soft); width: 15%; }
.compare td { color: var(--ink-soft); }
.compare td.us { color: var(--ink); background: color-mix(in srgb, var(--tint-release) 26%, transparent); padding-left: 0.7rem; }
.compare thead th.us { color: var(--ink); padding-left: 0.7rem; }
.compare td.us + td, .compare th.us + th { padding-left: 1.1rem; }   /* air between Kanji's tinted column and the next */

/* ---------- the demos' heading: "bring your own schema" in ink and medium weight, where a subtitle is grey */
h2 .sub.byos { color: var(--ink); font-weight: 500; }

/* ---------- benchmarks: a chart of Kanji's readings alone names its sets plainly, as the other charts name their other models */
.bars.one li.solid .name { font-weight: 400; color: var(--ink-soft); }
.bars.one li.solid:hover .name { color: var(--ink); }

/* ---------- benchmarks: on the documents' chart, a tick where the two independent gold tables of the same documents agree with each
   other, scored as Kanji is. It sits on the bars' own scale: --h over --max of the track less the 7.5ch kept for a value, in the
   bar's own font (so the tick sets no font size of its own; its number does) */
.bars li.ref .track { position: relative; }
.bars .agree {
  position: absolute; top: 50%; left: calc(var(--h) / var(--max) * (100% - 7.5ch));
  height: 1.5rem; transform: translateY(-50%);
  display: flex; align-items: center; padding-left: 0.35rem;
  border-left: 1.5px solid var(--ink); pointer-events: none;
}
.bars .agree .n { font-size: 0.86rem; color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.key span.agree { height: 1.1rem; box-shadow: none; border-radius: 0; background: linear-gradient(var(--ink), var(--ink)) center / 1.5px 100% no-repeat; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* read aloud, not shown */

/* ---------- a video in a popup: everything around it dimmed; a click outside it, or Escape, closes it ---------- */
.player { padding: 0; border: 0; background: transparent; width: min(calc(100vw - 9rem), 1280px, calc(82vh * 16 / 9)); max-width: none; max-height: 92vh; overflow: visible; }
.player::backdrop { background: rgb(20 17 14 / 0.84); }
.player video { display: block; width: 100%; height: auto; max-height: 92vh; background: #000; box-shadow: 0 12px 48px rgb(0 0 0 / 0.45); }
.player .hint { position: absolute; top: -2rem; right: 0; margin: 0; color: rgb(247 238 227 / 0.8); font-size: 0.95rem; pointer-events: none; }
.player .title {
  position: absolute; top: -2.25rem; left: 0; max-width: 62%; margin: 0; pointer-events: none;
  font-family: var(--display); font-style: italic; font-size: 1.3rem; line-height: 1.2; color: #F7EEE3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* the arrows to the previous and next demo, in the dimmed space on either side of the video */
.player .step {
  position: absolute; top: 50%; width: 3rem; height: 3rem; margin-top: -1.5rem; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; font: inherit; font-size: 1.3rem; line-height: 1; color: #F7EEE3;
  background: rgb(247 238 227 / 0.1); box-shadow: inset 0 0 0 1px rgb(247 238 227 / 0.6); transition: background-color 0.2s ease;
}
.player .step:hover { background: rgb(247 238 227 / 0.25); }
.player .step:focus-visible { outline: 2px solid #F7EEE3; outline-offset: 3px; }
/* under a video made from someone else's footage, a link to the original, in the paper's colour over the dimmed page */
.player .source {
  position: absolute; top: calc(100% + 0.6rem); left: 0; right: 0; margin: 0;
  font-size: 0.95rem; line-height: 1.35; color: rgb(247 238 227 / 0.8);
}
.player .source[hidden] { display: none; }
.player .source a { color: #F7EEE3; }
.player .prev { left: -4rem; }
.player .next { right: -4rem; }
@media (max-width: 46rem) {   /* no room beside the video on a phone: the arrows sit on its edges, the hint under it */
  .player { width: 94vw; }
  .player .step { width: 2.5rem; height: 2.5rem; margin-top: -1.25rem; background: rgb(20 17 14 / 0.6); }
  .player .prev { left: 0.35rem; }
  .player .next { right: 0.35rem; }
  .player .title { max-width: 100%; font-size: 1.1rem; }
  .player .hint { top: auto; bottom: -1.9rem; }
  .player .source { top: calc(100% + 2.4rem); }   /* under the hint */
}
/* a phone held upright plays a demo's portrait version (the script's `upright`): as tall as the screen allows, with room left above
   it for the title and below it for the hint and a credit; dvh where the browser has it, so that its own bars are counted */
.player.portrait { width: min(94vw, calc((100vh - 12rem) * 9 / 16)); width: min(94vw, calc((100dvh - 12rem) * 9 / 16)); }
.player.portrait video { max-height: calc(100vh - 12rem); max-height: calc(100dvh - 12rem); }

/* ---------- the demos, to come ---------- */
/* a horizontal carousel: three tiles in view, the rest a scroll away (arrows, a swipe or a tab), each tile snapping to the start */
.carousel { margin-top: 1.75rem; }
.reels {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 1.5rem) / 3); gap: 1.5rem;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding: 3px 3px 0.25rem; margin: -3px -3px 0; scroll-padding-inline: 3px;   /* room for a tile's focus ring */
}
.reels::-webkit-scrollbar { display: none; }
.reel { margin: 0; scroll-snap-align: start; }
.carousel-nav { display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem; margin-top: 0.9rem; }
.carousel-nav .count { margin-right: auto; font-size: 0.95rem; color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }
.carousel-nav button {
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  font: inherit; font-size: 1.1rem; line-height: 1; color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--ink);
}
.carousel-nav button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.carousel-nav button:disabled { opacity: 0.3; cursor: default; }
.carousel-nav button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.reel .frame {
  aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 1rem;
  box-shadow: inset 0 0 0 1px var(--ink-soft);
  background: repeating-linear-gradient(135deg, rgb(35 31 26 / 0.05) 0 1px, transparent 1px 7px);
  font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--ink-soft);
}
.reel figcaption { margin-top: 0.55rem; font-size: 0.98rem; color: var(--ink-soft); }
.reel figcaption b { font-weight: 500; color: var(--ink); }

/* a demo's tile: its poster as a button that opens the video in the popup, a play mark on it and its length in a corner */
.reel .frame.play {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 0; cursor: pointer; overflow: hidden;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink-soft);
}
.reel .frame.play img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter 0.3s ease; }
.reel .frame.play::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 3.2rem; height: 3.2rem; margin: -1.6rem 0 0 -1.6rem; border-radius: 50%;
  background: rgb(35 31 26 / 0.78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%23F7EEE3'/%3E%3C/svg%3E") center / 1.5rem no-repeat;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.22); transition: transform 0.2s ease, background-color 0.2s ease;
}
.reel .frame.play:hover img { filter: brightness(0.94); }
.reel .frame.play:hover::after { transform: scale(1.07); background-color: rgb(35 31 26 / 0.92); }
.reel .frame.play:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.reel .frame .len {
  position: absolute; right: 0.45rem; bottom: 0.4rem; padding: 0.05rem 0.4rem; border-radius: 2px;
  font-family: var(--text, inherit); font-style: normal; font-size: 0.82rem; line-height: 1.3; color: #F7EEE3; background: rgb(35 31 26 / 0.75);
  font-variant-numeric: lining-nums tabular-nums;
}

@media (max-width: 46rem) {
  .reels { grid-auto-columns: 86%; gap: 1rem; }   /* one tile at a time, the next one's edge in view */
}

/* ---------- where it fits: use cases in a ruled grid, three across (one on a phone), each with the demos that show it, which open
   the player as "Watch the race" does ---------- */
.uses { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* rules between the cards only: none above the first row or under the last (three across here, one on a phone) */
@media (min-width: 46.0625rem) {
  .uses li:nth-child(3n + 1):nth-last-child(-n + 3), .uses li:nth-child(3n + 1):nth-last-child(-n + 3) ~ li { border-bottom: 0; }
}
.uses li { padding: 1.05rem 1.25rem 1.15rem 0; border-bottom: 1px solid var(--rule); }
.uses li:not(:nth-child(3n + 1)) { border-left: 1px solid var(--rule); padding-left: 1.25rem; }
.uses b { display: block; font-weight: 500; color: var(--ink); }
/* each use case's icon, to the left of its title, its text hanging under the title: ink lines as fine as the text's, one part
   washed in a tint of the chart bars (pine, ochre, mist), as the site's engravings are hand-tinted */
.uses li { display: grid; grid-template-columns: 1.45rem minmax(0, 1fr); column-gap: 0.65rem; }
.uses li > .ic { grid-column: 1; grid-row: 1; align-self: start; margin-top: calc((1.55em - 1.45rem) / 2); }   /* on the title's first line */
.uses li > :not(.ic) { grid-column: 2; }
/* a row's cards share its two row lines (a subgrid): the title and its line in the first, "Watch" or "See" in the second, so
   that a row's links start level however long the text above them */
.uses li { grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
.uses li > .what { grid-row: 1; }
.uses li > .watch { grid-row: 2; }
.uses .ic { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: var(--ink); }
.uses .ic .pine { fill: var(--tint-release); }
.uses .ic .ochre { fill: var(--tint-earlier); }
.uses .ic .mist { fill: var(--tint-unpruned); }
.uses .ic .ink { fill: currentColor; stroke: none; }
.uses p { margin: 0.3rem 0 0; font-size: 1.02rem; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.uses p.watch { margin-top: 0.55rem; font-size: 0.95rem; }
.uses .watch button {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap;
  text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em;
}
.uses .watch button:hover { text-decoration-thickness: 2px; }
.uses .watch .nw { white-space: nowrap; }   /* a link and the dot after it stay on one line */
.uses .watch a { color: var(--ink); }
@media (max-width: 46rem) {
  .uses { grid-template-columns: minmax(0, 1fr); }
  .uses li, .uses li:not(:nth-child(3n + 1)) { border-left: 0; padding: 0.95rem 0 1rem; }
  .uses li:last-child { border-bottom: 0; }
}

/* ---------- the waiting list's form, in a dialog over the page dimmed: the site's paper, labels in small caps as "What it gives you"
   names its facts, fields on a lighter paper with the hairline, the waiting list's own button to send ---------- */
.signup { padding: 0; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); color: var(--ink);
  width: min(30rem, calc(100vw - 2rem)); max-width: none; box-shadow: 0 18px 60px rgb(35 31 26 / 0.25); }
.signup::backdrop { background: rgb(20 17 14 / 0.55); }
.signup .panel { position: relative; padding: 2rem 2rem 1.6rem; }
.signup h2 { font-size: 2rem; padding-right: 2.25rem; }
.signup .intro { margin: 0.55rem 0 0.4rem; color: var(--ink-soft); text-wrap: pretty; }
.signup label { display: block; margin-top: 0.9rem; }
.signup label span { display: block; font-variant-caps: all-small-caps; letter-spacing: 0.09em; font-size: 1.02rem; color: var(--ink-soft); }
.signup label i { font-variant-caps: normal; letter-spacing: 0; font-size: 0.92rem; color: var(--ink-dim); margin-left: 0.25rem; }
.signup input[type=email], .signup input[type=text] { display: block; width: 100%; margin-top: 0.2rem; font: inherit; font-size: 1.1rem; color: var(--ink);
  background: color-mix(in srgb, #fff 55%, var(--paper)); border: 1px solid var(--rule); border-radius: 2px; padding: 0.5rem 0.65rem; }
.signup input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.signup .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup .send { display: block; width: 100%; margin-top: 1.4rem; font: inherit; font-size: 1.2rem; line-height: 1.2; cursor: pointer;
  padding: 0.75rem 1rem 0.8rem; border: 0; border-radius: 2px; background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.signup .send:hover:not(:disabled) { background: transparent; color: var(--ink); }
.signup .send:disabled { opacity: 0.6; cursor: default; }
.signup .status { min-height: 1.45em; margin: 0.7rem 0 0; font-size: 0.98rem; color: var(--ink-soft); }
/* consent, unticked until the person ticks it, and the notice's first layer under the button */
.signup label.consent { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1.1rem; cursor: pointer; }
.signup label.consent input { flex: none; width: 1.05rem; height: 1.05rem; margin: 0.28rem 0 0; accent-color: var(--ink); }
.signup label.consent span { font-variant-caps: normal; letter-spacing: 0; font-size: 1rem; line-height: 1.45; color: var(--ink); }
.signup .privacy { margin: 0.35rem 0 0; font-size: 0.88rem; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.signup .close { position: absolute; top: 0.85rem; right: 0.85rem; width: 2.3rem; height: 2.3rem; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 50%; background: none; font: inherit; font-size: 1.6rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.signup .close:hover { color: var(--ink); background: rgb(35 31 26 / 0.06); }
.signup .done p { margin: 0.6rem 0 0.4rem; color: var(--ink-soft); }
@media (max-width: 46rem) {
  .signup .panel { padding: 1.6rem 1.25rem 1.3rem; }
  .signup h2 { font-size: 1.75rem; }
}

@media print {
  .get button { display: none; }
}
