/*
  orkhon.ai
  Tokens follow the Lale brand kit (DESIGN.md): kit colours and kit fonts only.
  No gradients, glow or shadows. Square corners.
*/

/* Fonts: Fontsource variable 5.3.0 files, OFL. Licences ship beside the files. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin-wght-normal.2ee17598a98d.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin-wght-italic.77210cdde028.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
  Latin Extended has an upright file only. It is declared as a separate family
  so that italic text (the "ş" in "bengü taş") falls back to it and the browser
  slants the Instrument Sans glyph, instead of dropping to a system font.
*/
@font-face {
  font-family: "Instrument Sans Ext";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin-ext-wght-normal.c4fcfea41f2c.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.18be452724bf.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-ext-wght-normal.79bfdab9ba46.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens */

:root {
  --ink: #141518;
  --lichen: #5F5C56;
  --kok: #2A4F8A;
  --limestone: #E7E5DF;
  --paper: #F3F2EE;
  --stone: #DAD7CF;
  --white: #FFFFFF;

  --font-sans: "Instrument Sans", "Instrument Sans Ext", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 96px;

  --margin: var(--space-md);
  --gutter: var(--space-sm);
  --section: 72px;
  --header-h: 0px;

  /* Strong ease-out for entering things; strong ease-in-out for things that
     move across the screen (the decision token). */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: light;
}

@media (min-width: 768px) {
  :root {
    --margin: var(--space-lg);
    --gutter: var(--space-md);
    --section: var(--space-xl);
  }
}

@media (min-width: 1024px) {
  :root {
    --margin: 72px;
    --section: 128px;
    --header-h: 72px;
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background-color: var(--limestone);
  scroll-padding-top: calc(var(--header-h) + var(--space-md));
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--limestone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd,
pre {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  border-spacing: 0;
}

::selection {
  background-color: var(--kok);
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--kok);
  outline-offset: 3px;
}

a {
  color: var(--kok);
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 150ms ease;
}

a:focus-visible {
  text-decoration-color: currentColor;
}

a,
button {
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration-color: currentColor;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

/* Layout: 12 columns from 768 px, one column below. */

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--margin);
}

.section {
  padding-block: var(--section);
}

.surface-stone {
  background-color: var(--stone);
}

.surface-paper {
  background-color: var(--paper);
}

/* The dark sections, as defined by the kit (section-dark). */
.surface-ink {
  background-color: var(--ink);
  color: var(--limestone);
}

.surface-ink :focus-visible {
  outline-color: var(--limestone);
}

.surface-ink ::selection {
  background-color: var(--limestone);
  color: var(--ink);
}

/* Type */

.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lichen);
}

.surface-ink .label {
  color: var(--stone);
}

.display-xl {
  font-size: clamp(4rem, 0.6rem + 10vw, 10rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.display {
  font-size: clamp(3.25rem, 1rem + 6.6vw, 7.5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.h2 {
  font-size: clamp(1.875rem, 1.2rem + 2.2vw, 3.25rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  max-width: 34em;
  font-size: clamp(1.1875rem, 1rem + 0.55vw, 1.5rem);
  line-height: 1.42;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.body-lg {
  max-width: 36em;
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.muted {
  color: var(--lichen);
}

.surface-ink .muted {
  color: var(--stone);
}

/* Display headings are inscribed: each line is revealed left to right, like a
   line cut into stone. The spans hold the lines; the text reads normally. */
.inscribe > span {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .inscribe:not([data-reveal]) > span {
    animation: inscribe 1100ms var(--ease-out) backwards;
    animation-delay: 120ms;
  }

  .inscribe:not([data-reveal]) > span:nth-child(2) {
    animation-delay: 260ms;
  }
}

/* Display titles further down the page are inscribed the first time they
   come into view (the script arms them; see Reveal below). */
.is-armed.inscribe > span {
  clip-path: inset(-0.3em -0.1em -0.3em -0.1em);
  transition: clip-path 1100ms var(--ease-out);
}

.is-armed.inscribe > span:nth-child(2) {
  transition-delay: 140ms;
}

.is-armed.inscribe:not(.is-shown) > span {
  clip-path: inset(-0.3em 100% -0.3em -0.1em);
}

@keyframes inscribe {
  from {
    clip-path: inset(-0.3em 100% -0.3em -0.1em);
  }

  to {
    clip-path: inset(-0.3em -0.1em -0.3em -0.1em);
  }
}

/* Small parts */

.arrow {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  transition: transform 200ms var(--ease-out);
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  font-weight: 500;
  color: var(--kok);
}

.surface-ink .more {
  color: var(--limestone);
}

@media (hover: hover) and (pointer: fine) {
  .more:hover .arrow {
    transform: translateX(4px);
  }
}

/* Status: a hollow square for "not yet trained". It states a real status,
   so it is the one marker of its kind on a page. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
}

/* The one filled action on a page (button-primary). */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  background-color: var(--ink);
  color: var(--limestone);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 160ms var(--ease-out);
}

.button:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background-color: var(--kok);
    color: var(--white);
  }
}

/* Skip link */

.skip {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 30;
  padding: 12px 16px;
  background-color: var(--ink);
  color: var(--limestone);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus-visible {
  transform: none;
  outline-color: var(--kok);
}

/* Header. The lockup file carries its own clear space; the negative margin
   aligns the visible mark with the text column without cropping the file. */

.site-header {
  background-color: var(--limestone);
  border-bottom: 1px solid var(--stone);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "brand . cta"
    "nav nav nav";
  align-items: center;
  column-gap: var(--space-sm);
}

.lockup-link {
  grid-area: brand;
  display: inline-block;
  padding-block: 10px;
  justify-self: start;
}

.lockup {
  --w: 132px;
  width: var(--w);
  margin-inline-start: calc(var(--w) * -48 / 798);
}

.site-nav {
  grid-area: nav;
  margin-inline: calc(var(--margin) * -1);
  padding-inline: var(--margin);
  border-top: 1px solid var(--stone);
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin-inline-start: -10px;
}

.site-nav a,
.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.site-nav a {
  padding-inline: 10px;
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.55em;
}

.site-nav a[aria-current="page"] {
  text-decoration-color: var(--ink);
}

.header-cta {
  grid-area: cta;
  gap: 8px;
  color: var(--kok);
}

/* Four links (Careers joined after Lab) fill a 360 px row exactly; below that
   the padding narrows so the row never scrolls. Tap targets stay 44 px tall. */
@media (max-width: 359px) {
  .site-nav ul {
    gap: 0;
    margin-inline-start: -7px;
  }

  .site-nav a {
    padding-inline: 7px;
  }
}

.header-cta .arrow {
  width: 16px;
  height: 16px;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover {
    color: var(--kok);
    text-decoration-color: currentColor;
  }

  .header-cta:hover .arrow {
    transform: translateX(3px);
  }
}

@media (min-width: 1024px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .site-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "brand . nav cta";
    min-height: var(--header-h);
    column-gap: var(--space-lg);
  }

  .lockup {
    --w: 156px;
  }

  .site-nav {
    margin-inline: 0;
    padding-inline: 0;
    border-top: 0;
  }

  .site-nav ul {
    gap: 16px;
    margin-inline-start: 0;
  }
}

/* Home: hero. The stele stands over the slab, and the slab stands on the
   hero's ground line, like a stone on its plinth. */

.hero {
  border-bottom: 1px solid var(--ink);
}

.hero__grid {
  display: grid;
  /* On a phone the stone follows the lead closely, so the stone and its whole caption fit the first screen. */
  gap: var(--space-md);
  padding-block: var(--space-lg) 0;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero__title {
  margin-top: var(--space-xs);
}

.hero__lead span {
  display: block;
}

.hero__lead span + span {
  margin-top: 0.15em;
}

/* The stele. Its poster is the kit mark; stele.js replaces it with the
   carved stone once it has drawn the first frame. The stone is lit inside
   its own render; nothing here adds light or shade.
   The stage frames the mark itself (petal tips to stele tips, plus two units
   of the kit's 100-unit box: x 15.5 to 84.5, y 6 to 94). The poster is the
   whole kit file, clear space included, so it is placed larger than the
   stage and offset by that clear space: nothing of the mark is cut. */
.stele {
  display: grid;
  justify-items: center;
  align-content: end;
  /* Room under the stone for the ground shade the render draws below its foot. */
  gap: var(--space-md);
  margin: 0;
}

.stele__stage {
  position: relative;
  width: min(100%, 300px, calc(30svh * 69 / 88));
  aspect-ratio: 69 / 88;
}

/* The kit file spans x 7.776 to 92.224 and y -0.4 to 100.4 in its own units. */
.stele__poster {
  position: absolute;
  top: -7.273%;
  left: -11.194%;
  width: 122.389%;
  height: 114.545%;
  max-width: none;
  /* The poster leaves fast and the stone arrives slower, so the flat mark and
     the turned stone are barely seen on top of each other. */
  transition: opacity 200ms var(--ease-out);
}

/* The canvas reaches 6% past the poster on every side, so a tilted stone is
   never cropped. It takes no pointer events: links and text stay reachable. */
.stele__canvas {
  position: absolute;
  top: -6%;
  left: -6%;
  width: 112%;
  height: 112%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms var(--ease-out);
}

.stele[data-stele="live"] .stele__canvas,
.stele[data-stele="still"] .stele__canvas {
  opacity: 1;
}

.stele[data-stele="live"] .stele__poster,
.stele[data-stele="still"] .stele__poster {
  opacity: 0;
}

.stele__caption {
  max-width: 28rem;
  color: var(--lichen);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.stele__caption .label {
  display: block;
  margin-bottom: 2px;
}

.slab {
  margin-inline: calc(var(--margin) * -1);
  padding: var(--space-sm) var(--margin);
  background-color: var(--ink);
  color: var(--limestone);
}

.ledger li + li {
  border-top: 1px solid var(--lichen);
}

.ledger a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-sm);
  row-gap: 4px;
  padding-block: 18px;
  color: var(--limestone);
  text-decoration: none;
}

.ledger__key {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}

.ledger__title {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.ledger__note {
  grid-column: 1;
  color: var(--stone);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.ledger .arrow {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: center;
}

@media (hover: hover) and (pointer: fine) {
  .ledger a:hover .ledger__title {
    color: var(--white);
  }

  .ledger a:hover .arrow {
    transform: translateX(4px);
  }
}

/* After the slogan is inscribed, the slab's index settles in, one entry at a
   time: the lab's record, read in order. */
@media (prefers-reduced-motion: no-preference) {
  .ledger li {
    animation: settle 700ms var(--ease-out) backwards;
  }

  .ledger li:nth-child(1) {
    animation-delay: 640ms;
  }

  .ledger li:nth-child(2) {
    animation-delay: 710ms;
  }

  .ledger li:nth-child(3) {
    animation-delay: 780ms;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (min-width: 768px) {
  .slab {
    margin-inline: 0;
    padding: var(--space-md) var(--space-lg);
  }

  .stele__stage {
    width: min(100%, 360px, calc(40svh * 69 / 88));
  }
}

/* Desktop: the slogan on the left, the stele on the right, and the slab as
   one plinth across the hero's foot, its three entries side by side. */
@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: var(--gutter);
    row-gap: 0;
    /* The first screen ends on the ground line: the hero fills it to the fold. */
    min-height: calc(100svh - var(--header-h));
    max-height: 1000px;
    padding-block: 0;
  }

  .hero__text {
    grid-column: 1 / span 8;
    grid-row: 1;
    align-self: center;
    padding-block: var(--space-lg);
  }

  .stele {
    grid-column: 9 / span 4;
    grid-row: 1;
    align-self: stretch;
    container-type: size;
    padding-block: var(--space-lg) 56px;
  }

  .stele__stage {
    width: min(100cqw, calc((100cqh - 5.75rem) * 69 / 88));
  }

  .slab {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    padding: 0;
  }

  .ledger {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ledger li + li {
    border-top: 0;
    border-left: 1px solid var(--lichen);
  }

  .ledger a {
    height: 100%;
    padding: 26px 32px 24px;
    align-content: start;
  }

  /* Side by side, the arrows line up on the titles, whatever the length of the note below. */
  .ledger .arrow {
    grid-row: 2;
  }
}

@media (min-width: 1360px) {
  .hero__text {
    grid-column: 1 / span 7;
  }

  .stele {
    grid-column: 8 / span 5;
  }
}

/* Sections shared by the pages: a heading stack, then content. */

.stack {
  display: grid;
  gap: var(--space-md);
}

.stack .h2 {
  max-width: 18em;
}

.section-head {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-head .h2 {
  max-width: 17em;
}

@media (min-width: 1024px) {
  .section-head {
    margin-bottom: 72px;
  }
}

/* Lanes: the System One routing drawn as two lanes. Fast lane below, the
   slow lane above; a decision leaves the fast lane only when it is unsure.
   The escalation wire hangs from the junction, so it meets the slow node at
   any row height. */

.lanes {
  position: relative;
}

.lanes__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "in ."
    "w1 ."
    "model ."
    "w2 slow"
    "out ."
    "trail trail";
  column-gap: var(--space-md);
}

.node {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 112px;
  padding: 14px 16px 16px;
  border: 1px solid var(--ink);
  background-color: var(--paper);
}

.node__k {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lichen);
}

.node__v {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.node--in {
  grid-area: in;
}

.node--model {
  grid-area: model;
  background-color: var(--ink);
  color: var(--limestone);
}

.node--model .node__k {
  color: var(--stone);
}

.node--out {
  grid-area: out;
  background-color: var(--white);
}

.node--slow {
  grid-area: slow;
  align-self: center;
  background-color: var(--stone);
}

/* Wires are drawn with transforms so they can be drawn in. */
.wire {
  position: relative;
  display: block;
}

.wire::before {
  content: "";
  position: absolute;
  background-color: var(--ink);
}

.wire--1 {
  grid-area: w1;
  height: 40px;
}

.wire--2 {
  grid-area: w2;
  min-height: 72px;
}

.wire--1::before,
.wire--2::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform-origin: top;
}

/* Junction: where the decision is checked against its own probability. */
.wire--2::after {
  content: "";
  position: absolute;
  left: calc(50% - 4px);
  top: calc(50% - 4px);
  width: 9px;
  height: 9px;
  background-color: var(--ink);
}

/* On narrow screens the escalation runs sideways from the junction to the
   slow node: half a column plus the gap. */
.wire--up {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(50% + var(--space-md));
  height: 1px;
}

.wire--up::before {
  inset: 0;
  transform-origin: left;
}

.wire__label {
  display: none;
}

.trail {
  grid-area: trail;
  display: grid;
  gap: 6px;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--ink);
}

.trail p {
  max-width: 34em;
  font-size: 0.9375rem;
  line-height: 1.45;
}

@media (min-width: 900px) {
  .lanes__grid {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(32px, 0.45fr)
      minmax(0, 1fr)
      minmax(96px, 0.9fr)
      minmax(0, 1.15fr);
    grid-template-rows: auto 64px auto auto;
    grid-template-areas:
      ". . . slow ."
      ". . . . ."
      "in w1 model w2 out"
      "trail trail trail trail trail";
    column-gap: 0;
  }

  .node {
    min-height: 128px;
    padding: 16px 18px 18px;
  }

  .node--slow {
    align-self: end;
    justify-self: center;
    width: max-content;
    max-width: 300px;
    min-height: 0;
  }

  .wire--1 {
    align-self: center;
    height: 1px;
  }

  .wire--2 {
    min-height: 0;
  }

  .wire--1::before,
  .wire--2::before {
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
    transform-origin: left;
  }

  .wire--2::before {
    top: 50%;
  }

  /* Vertical escalation: from the junction up through the spacer row to the
     bottom of the slow node. */
  .wire--up {
    top: auto;
    bottom: 50%;
    width: 1px;
    height: calc(50% + 64px);
  }

  .wire--up::before {
    transform-origin: bottom;
  }

  .wire__label {
    position: absolute;
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lichen);
    white-space: nowrap;
  }

  .wire--up .wire__label {
    left: 14px;
    top: 20px;
  }

  .wire--2 > .wire__label {
    right: 12px;
    top: calc(50% + 12px);
  }

  .trail {
    margin-top: var(--space-lg);
  }
}

/* Reveal: diagrams draw once when they first come into view (JS arms them;
   without JS or with reduced motion they are simply shown). */

.is-armed [data-step] {
  transition:
    opacity 500ms var(--ease-out),
    transform 600ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms);
}

.is-armed .wire[data-step]::before {
  transition: transform 520ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms);
}

.is-armed:not(.is-shown) .node[data-step],
.is-armed:not(.is-shown) .trail[data-step],
.is-armed:not(.is-shown) .step[data-step] {
  opacity: 0;
  transform: translateY(8px);
}

.is-armed:not(.is-shown) .wire[data-step]::before {
  transform: scale(0, 1);
}

.is-armed:not(.is-shown) .wire--1[data-step]::before,
.is-armed:not(.is-shown) .wire--2[data-step]::before {
  transform: scale(1, 0);
}

.is-armed:not(.is-shown) .wire--up[data-step]::before {
  transform: scale(0, 1);
}

.is-armed:not(.is-shown) .wire--2[data-step]::after,
.is-armed:not(.is-shown) .wire[data-step] .wire__label {
  opacity: 0;
}

.is-armed .wire--2[data-step]::after,
.is-armed .wire[data-step] .wire__label {
  transition: opacity 400ms ease;
  transition-delay: calc(var(--d, 0) * 110ms + 300ms);
}

@media (min-width: 900px) {
  .is-armed:not(.is-shown) .wire--1[data-step]::before,
  .is-armed:not(.is-shown) .wire--2[data-step]::before {
    transform: scale(0, 1);
  }

  .is-armed:not(.is-shown) .wire--up[data-step]::before {
    transform: scale(1, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-armed [data-step],
  .is-armed .wire[data-step]::before {
    transition: none;
  }
}

/* Home: the thesis */

.thesis__lanes {
  margin-top: var(--space-lg);
}

@media (min-width: 1024px) {
  .thesis__lanes {
    margin-top: 80px;
  }
}

/* A key and value record, set like a plate: mono keys, sans values. */

.record {
  border-top: 1px solid var(--ink);
}

.record__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding-block: 14px;
  border-bottom: 1px solid var(--stone);
}

.record dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lichen);
}

.record dd {
  font-size: 1rem;
  line-height: 1.45;
}

.record code,
.code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

@media (min-width: 560px) {
  .record__row {
    grid-template-columns: minmax(8.5rem, 32%) minmax(0, 1fr);
    gap: var(--space-sm);
  }

  .record dt {
    padding-top: 0.25em;
  }
}

.surface-ink .record {
  border-top-color: var(--stone);
}

.surface-ink .record__row {
  border-bottom-color: var(--lichen);
}

.surface-ink .record dt {
  color: var(--stone);
}

/* Home: Bengü-1 band */

.model-band__grid {
  display: grid;
  gap: var(--space-lg);
}

/* Below 1024 px the name block opens up so the description comes before
   the etymology: title, what it is, then the word. */
.model-band__name {
  display: contents;
}

.model-band__head {
  order: 1;
}

.model-band__body {
  order: 2;
}

.model-band__etym {
  order: 3;
}

.model-band__head {
  display: grid;
  gap: var(--space-md);
}

.model-band__etym {
  display: grid;
  gap: var(--space-xs);
  max-width: 26em;
  padding-top: var(--space-md);
  border-top: 1px solid var(--lichen);
}

.model-band__word {
  font-size: clamp(2.25rem, 1.6rem + 2vw, 3.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.model-band__title {
  font-size: clamp(4.5rem, 1rem + 11vw, 12rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.model-band__body {
  display: grid;
  align-content: start;
  gap: var(--space-md);
}

.model-band__body .record {
  margin-top: var(--space-sm);
}

@media (min-width: 1024px) {
  .model-band__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
  }

  .model-band__name {
    display: grid;
    grid-column: 1 / span 6;
    align-content: space-between;
    gap: var(--space-lg);
  }

  .model-band__body {
    grid-column: 8 / span 5;
    padding-top: 6px;
  }
}

/* Products: each card is one link (name, line and domain in one target). */

.products__list {
  display: grid;
  gap: var(--gutter);
}

.products__list > li {
  display: flex;
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  min-height: 232px;
  padding: 28px 24px 24px;
  border: 1px solid transparent;
  background-color: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition:
    background-color 200ms ease,
    border-color 200ms ease;
}

.card--white {
  background-color: var(--white);
}

.card__title {
  font-size: clamp(2rem, 1.5rem + 1.6vw, 3.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.card__by {
  color: var(--lichen);
}

.card__line {
  max-width: 24em;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.4;
}

.card__domain {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--lichen);
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition:
    color 150ms ease,
    text-decoration-color 150ms ease;
}

.card {
  position: relative;
}

.card__arrow {
  position: absolute;
  right: 24px;
  bottom: 26px;
  color: var(--lichen);
}

@media (min-width: 768px) {
  .card__arrow {
    right: 36px;
    bottom: 32px;
  }
}

.card:focus-visible {
  border-color: var(--kok);
}

.card:focus-visible .card__domain,
.card:focus-visible .card__arrow {
  color: var(--kok);
  text-decoration-color: currentColor;
}

.card:active {
  background-color: var(--white);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: var(--kok);
    background-color: var(--white);
  }

  .card:hover .card__domain {
    color: var(--kok);
    text-decoration-color: currentColor;
  }

  .card:hover .card__arrow {
    color: var(--kok);
    transform: translateX(4px);
  }
}

@media (min-width: 768px) {
  .products__list {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .products__list > li:nth-child(1) {
    grid-column: 1 / span 7;
  }

  .products__list > li:nth-child(2) {
    grid-column: 8 / span 5;
  }

  .card {
    min-height: 320px;
    padding: 36px 36px 30px;
  }
}

/* Proof: the kitchens. */

.proof__grid {
  display: grid;
  gap: var(--space-md);
}

.proof__statement {
  max-width: 22em;
  font-size: clamp(1.625rem, 1.1rem + 1.9vw, 2.75rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

@media (min-width: 1024px) {
  .proof__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: baseline;
  }

  .proof__grid > .label {
    grid-column: 1 / span 3;
  }

  .proof__body {
    grid-column: 4 / span 9;
  }
}

.proof__body {
  display: grid;
  gap: var(--space-md);
  justify-items: start;
}

/* Home: the name */

.name__grid {
  display: grid;
  gap: var(--space-md);
}

.name__mark {
  width: 64px;
  margin-inline-start: calc(64px * -40 / 402);
}

.name__body {
  display: grid;
  gap: var(--space-md);
  justify-items: start;
}

.name__body p {
  max-width: 34em;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.5;
  text-wrap: pretty;
}

@media (min-width: 1024px) {
  .name__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
  }

  .name__mark {
    grid-column: 1 / span 3;
    width: 120px;
    margin-inline-start: calc(120px * -40 / 402);
  }

  .name__body {
    grid-column: 4 / span 9;
  }
}

/* Contact */

.contact {
  border-top: 1px solid var(--ink);
}

.contact__grid {
  display: grid;
  gap: var(--space-md);
}

/* The visible address is the second mailto link, with a 44 px tap target. */
.contact__address {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: clamp(2rem, 1rem + 4.2vw, 5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
}

@media (min-width: 1024px) {
  .contact__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
  }

  .contact__grid > .label {
    grid-column: 1 / span 3;
    padding-top: 1.6em;
  }

  .contact__body {
    grid-column: 4 / span 9;
  }
}

.contact__body {
  display: grid;
  gap: var(--space-md);
  justify-items: start;
}

/* Footer: the mark and the slogan as a sign-off, then the links. */

.site-footer {
  border-top: 1px solid var(--ink);
  color: var(--lichen);
  font-size: 0.9375rem;
}

.site-footer__grid {
  display: grid;
  gap: var(--space-lg);
  padding-block: var(--space-lg) var(--space-md);
}

.site-footer__sign {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.site-footer__mark {
  width: 40px;
  margin-inline-start: calc(40px * -40 / 402);
}

.site-footer__slogan {
  color: var(--ink);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-md);
}

.site-footer__nav .label {
  margin-bottom: var(--space-xs);
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--ink);
}

.site-footer__nav a[aria-current="page"] {
  text-decoration-color: currentColor;
}

.site-footer__line {
  padding-top: var(--space-md);
  border-top: 1px solid var(--stone);
  font-size: 0.875rem;
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    padding-block: 72px var(--space-md);
  }

  .site-footer__sign {
    grid-column: 1 / span 6;
    align-self: start;
  }

  .site-footer__mark {
    width: 52px;
    margin-inline-start: calc(52px * -40 / 402);
  }

  .site-footer__nav {
    grid-column: 7 / span 6;
  }

  .site-footer__line {
    grid-column: 1 / -1;
  }
}

/* Page heroes (Bengü-1, System One, Lab) */

.page-hero {
  padding-block: var(--space-lg) var(--section);
}

.page-hero__grid {
  display: grid;
  gap: var(--space-lg);
}

.page-hero__text {
  display: grid;
  gap: var(--space-md);
  align-content: start;
}

.page-hero__title {
  margin-top: var(--space-xs);
}

@media (min-width: 1024px) {
  .page-hero {
    padding-block: var(--space-xl) var(--section);
  }

  .page-hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
  }

  .page-hero__text {
    grid-column: 1 / span 8;
  }

  .page-hero__aside {
    grid-column: 9 / span 4;
    align-self: end;
  }
}

/* Bengü-1: the hero's etymology plate */

.etym {
  display: grid;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--stone);
}

.etym__word {
  font-size: clamp(3rem, 2rem + 3vw, 4.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

.etym__gloss {
  color: var(--stone);
}

.etym p:last-child {
  max-width: 26em;
}

/* Bengü-1: document layout with a sticky model card. */

.doc__grid {
  display: grid;
  gap: var(--space-xl);
}

.doc__main {
  display: grid;
  gap: var(--space-xl);
  min-width: 0;
}

.doc-section {
  display: grid;
  gap: var(--space-md);
  min-width: 0;
}

.doc-section > .h2 {
  max-width: 16em;
}

.doc-section > .figure,
.doc-section > figure,
.doc-section > .record,
.doc-section > .table-wrap {
  margin-top: var(--space-sm);
}

@media (min-width: 1024px) {
  .doc__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: start;
  }

  .doc__main {
    grid-column: 1 / span 7;
    gap: 128px;
  }

  .doc__aside {
    grid-column: 9 / span 4;
    position: sticky;
    top: calc(var(--header-h) + var(--space-md));
  }

  /* On short screens the card scrolls inside itself rather than being cut. */
  .doc__aside .model-card {
    max-height: calc(100vh - var(--header-h) - var(--space-lg));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* The model card */

.model-card {
  border: 1px solid var(--ink);
  background-color: var(--paper);
}

.model-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  padding: 12px 18px;
  background-color: var(--ink);
  color: var(--limestone);
}

.model-card__head .label {
  color: var(--stone);
}

.model-card__name {
  font-size: 1.125rem;
  font-weight: 500;
}

.model-card__group {
  padding: 10px 18px;
  transition: background-color 200ms ease;
}

.model-card__group + .model-card__group {
  border-top: 1px solid var(--stone);
}

.model-card__group.is-current {
  background-color: var(--white);
}

.model-card__group h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--lichen);
}

@media (hover: hover) and (pointer: fine) {
  .model-card__group h3 a:hover {
    color: var(--kok);
  }
}

.model-card__group h3 {
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lichen);
}

.model-card dl {
  display: grid;
  gap: 4px;
}

.model-card dl > div {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 12px;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.model-card dt {
  color: var(--lichen);
}

.model-card dd {
  min-width: 0;
}

.model-card__foot {
  padding: 10px 18px 12px;
  border-top: 1px solid var(--ink);
  color: var(--lichen);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Bengü-1: what goes in, what comes out */

.io {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.io__part {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--ink);
}

.io__email {
  background-color: var(--paper);
}

.io__lines {
  display: grid;
  gap: 9px;
  padding-top: 6px;
}

.io__lines span {
  display: block;
  height: 7px;
  background-color: var(--stone);
}

.io__lines span:nth-child(1) {
  width: 46%;
  background-color: var(--lichen);
}

.io__lines span:nth-child(2) {
  width: 92%;
}

.io__lines span:nth-child(3) {
  width: 84%;
}

.io__lines span:nth-child(4) {
  width: 96%;
}

.io__lines span:nth-child(5) {
  width: 58%;
}

.io__model {
  align-content: center;
  background-color: var(--ink);
  color: var(--limestone);
}

.io__model .node__k {
  color: var(--stone);
}

.io__model-name {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.io__decision {
  background-color: var(--white);
}

.io__fields {
  display: grid;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.io__fields div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 7px;
  border-top: 1px solid var(--stone);
}

.io__fields dt {
  color: var(--ink);
}

.io__fields dd {
  color: var(--lichen);
}

.io__fields .io__none dd {
  color: var(--ink);
}

.io__wire {
  position: relative;
  height: 32px;
}

.io__wire::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--ink);
  transform-origin: top;
}

@media (min-width: 640px) {
  .io {
    grid-template-columns: minmax(0, 1.05fr) 40px minmax(0, 0.8fr) 40px minmax(0, 1.1fr);
    align-items: stretch;
  }

  .io__wire {
    height: auto;
  }

  .io__wire::before {
    left: 0;
    right: 0;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 1px;
    transform-origin: left;
  }
}

.is-armed:not(.is-shown) .io__wire[data-step]::before {
  transform: scale(1, 0);
}

.is-armed .io__wire[data-step]::before {
  transition: transform 520ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms);
}

.is-armed:not(.is-shown) .io__part[data-step] {
  opacity: 0;
  transform: translateY(8px);
}

@media (min-width: 640px) {
  .is-armed:not(.is-shown) .io__wire[data-step]::before {
    transform: scale(0, 1);
  }
}

/* Type signature, as a researcher would write it. */

.signature {
  padding: 20px 22px;
  border-left: 2px solid var(--kok);
  background-color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}

.signature .k {
  color: var(--kok);
}

.signature .c {
  color: var(--lichen);
}

@media (min-width: 768px) {
  .signature {
    font-size: 0.875rem;
  }
}

/* Bengü-1: the data boundary */

.boundary {
  position: relative;
  padding: 40px 18px 18px;
  border: 1px solid var(--ink);
}

.boundary__name {
  position: absolute;
  top: -0.7em;
  left: 14px;
  padding-inline: 8px;
  background-color: var(--limestone);
  color: var(--ink);
}

.boundary__grid {
  display: grid;
  gap: var(--space-md);
}

.step {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  background-color: var(--paper);
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--lichen);
}

.step--out {
  background-color: var(--stone);
}

.excluded {
  display: grid;
  gap: 0;
  font-size: 0.9375rem;
}

.excluded li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 7px;
}

.excluded li + li {
  border-top: 1px solid var(--limestone);
}

.excluded li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 2px;
  background-color: var(--ink);
}

.boundary__foot {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--stone);
  font-size: 0.9375rem;
  color: var(--lichen);
}

@media (min-width: 768px) {
  .boundary {
    padding: 44px 24px 24px;
  }

  .boundary__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Scrubbing, shown as shapes: words are bars, typed placeholders are text. */

.redact {
  display: grid;
  gap: 12px;
  padding: 18px 16px 16px;
  background-color: var(--white);
}

.redact__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 6px;
}

.redact__w {
  display: block;
  height: 9px;
  background-color: var(--stone);
}

.redact__tok {
  display: inline-grid;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.redact__tok > * {
  grid-area: 1 / 1;
}

.redact__tok b {
  padding: 4px 5px;
  border: 1px solid var(--kok);
  color: var(--kok);
  font-weight: 500;
  white-space: nowrap;
}

.redact__tok i {
  display: block;
  height: 9px;
  background-color: var(--ink);
}

.w1 { width: 22px; }
.w2 { width: 34px; }
.w3 { width: 46px; }
.w4 { width: 58px; }
.w5 { width: 70px; }
.w6 { width: 28px; }
.w7 { width: 40px; }

.is-armed .redact__tok b,
.is-armed .redact__tok i {
  transition:
    opacity 360ms ease,
    transform 360ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 260ms + 400ms);
}

.is-armed:not(.is-shown) .redact__tok b {
  opacity: 0;
  transform: scale(0.96);
}

.is-armed .redact__tok i {
  opacity: 0;
}

.is-armed:not(.is-shown) .redact__tok i {
  opacity: 1;
}

.redact__tok i {
  opacity: 0;
}

/* Bengü-1: the time split */

.split {
  display: grid;
  gap: 14px;
}

.split__bar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  min-height: 112px;
  border: 1px solid var(--ink);
}

.split__part {
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.split__train {
  background-color: var(--stone);
}

.split__gold {
  border-left: 2px solid var(--ink);
  background-color: var(--white);
}

.split__name {
  font-weight: 500;
  line-height: 1.3;
}

.split__axis {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lichen);
}

.split__axis::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--lichen);
}

.figure-note {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--lichen);
}

/* Bengü-1: the comparison we will publish. Empty on purpose. */

.table-wrap {
  overflow-x: auto;
}

.scoreboard {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.scoreboard caption {
  padding-bottom: 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lichen);
}

.scoreboard th,
.scoreboard td {
  padding: 14px 12px 14px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--stone);
}

.scoreboard thead th {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lichen);
}

.scoreboard tbody th {
  font-weight: 500;
}

.scoreboard td {
  color: var(--lichen);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* Next page link block */

.next {
  display: grid;
  gap: var(--space-sm);
  padding-block: var(--space-lg);
  border-top: 1px solid var(--ink);
}

.next a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 3.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
}

.next a .arrow {
  width: 0.7em;
  height: 0.7em;
}

@media (hover: hover) and (pointer: fine) {
  .next a:hover {
    color: var(--kok);
  }

  .next a:hover .arrow {
    transform: translateX(6px);
  }
}

/* System One: fast and slow */

.systems {
  display: grid;
  gap: var(--space-lg);
}

.system {
  display: grid;
  gap: var(--space-sm);
  align-content: start;
}

.system__name {
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.system__traits {
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .cadence {
    height: 72px;
  }
}

/* Cadence: System 1 as a quick run of strokes, System 2 as one long line
   drawn slowly to a single mark. Drawn once, the first time it is seen. */
.cadence {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 56px;
  margin-block: var(--space-sm) var(--space-xs);
  border-bottom: 1px solid var(--ink);
}

.cadence i {
  display: block;
  width: 2px;
  height: 100%;
  background-color: var(--ink);
  transform-origin: bottom;
}

.cadence--fast i:nth-child(3n + 2) {
  height: 62%;
}

.cadence--fast i:nth-child(3n) {
  height: 81%;
}

.cadence--slow b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 50%;
  height: 1px;
  background-color: var(--ink);
  transform-origin: left;
}

.cadence--slow i {
  margin-left: auto;
}

.is-armed .cadence--fast i {
  transition: transform 140ms var(--ease-out);
  transition-delay: calc(var(--i) * 28ms);
}

.is-armed .cadence--slow b {
  transition: transform 2600ms var(--ease-in-out) 200ms;
}

.is-armed .cadence--slow i {
  transition: transform 300ms var(--ease-out) 2800ms;
}

.is-armed:not(.is-shown) .cadence i {
  transform: scale(1, 0);
}

.is-armed:not(.is-shown) .cadence--slow b {
  transform: scale(0, 1);
}

.cite {
  max-width: 40em;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--lichen);
}

@media (min-width: 1024px) {
  .router__bar {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: var(--space-lg);
  }

  .router__status {
    min-height: 0;
  }
}

@media (min-width: 768px) {
  .systems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--gutter);
  }
}

/* System One: prose against a decision */

.versus {
  display: grid;
  gap: var(--gutter);
}

.versus__panel {
  display: grid;
  align-content: start;
  gap: var(--space-md);
  padding: 22px 20px;
}

.versus__panel h3 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.versus__prose {
  background-color: var(--paper);
}

.versus__decision {
  background-color: var(--white);
  border: 1px solid var(--ink);
}

.prose-bars {
  display: grid;
  gap: 10px;
}

.prose-bars span {
  display: block;
  height: 7px;
  background-color: var(--stone);
}

.prose-bars span:nth-child(3n + 1) {
  width: 100%;
}

.prose-bars span:nth-child(3n + 2) {
  width: 92%;
}

.prose-bars span:nth-child(3n) {
  width: 97%;
}

.prose-bars span:last-child {
  width: 54%;
}

.decision-rec {
  display: grid;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.decision-rec div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 10px;
  border-top: 1px solid var(--stone);
}

.decision-rec div:first-child {
  border-top-color: var(--ink);
}

.decision-rec dt {
  color: var(--ink);
}

.decision-rec dd {
  color: var(--lichen);
}

@media (min-width: 768px) {
  .versus {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .versus__panel {
    padding: 32px 30px;
  }
}

/* System One: the router. The same two lanes, with a decision to send. */

.router {
  display: grid;
  gap: var(--space-lg);
}

.router__controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.router__controls[hidden] {
  display: none;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background-color: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 160ms var(--ease-out);
}

.choice:active {
  transform: scale(0.97);
}

.choice[aria-pressed="true"] {
  background-color: var(--ink);
  color: var(--limestone);
}

@media (hover: hover) and (pointer: fine) {
  .choice[aria-pressed="false"]:hover {
    border-color: var(--kok);
    color: var(--kok);
  }
}

.router__bar {
  display: grid;
  gap: var(--space-md);
}

.router__status {
  min-height: 3em;
  max-width: 40em;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.router__status strong {
  font-weight: 500;
}

/* The decision token: a small Kök square that travels the chosen route. */
.token {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 12px;
  height: 12px;
  background-color: var(--kok);
  pointer-events: none;
  opacity: 0;
}

.router .node {
  transition:
    border-color 200ms ease,
    background-color 200ms ease,
    color 200ms ease;
}

.router .wire::before {
  transition: background-color 200ms ease;
}

.router[data-route="fast"] .node--out,
.router[data-route="up"] .node--slow {
  border-color: var(--kok);
  outline: 1px solid var(--kok);
  outline-offset: -3px;
}

.router[data-route="fast"] .wire--1::before,
.router[data-route="fast"] .wire--2::before,
.router[data-route="up"] .wire--1::before,
.router[data-route="up"] .wire--up::before {
  background-color: var(--kok);
}

.router[data-route] .wire--2::after {
  background-color: var(--kok);
  transition: background-color 200ms ease;
}

/* System One: the kitchen */

.kitchen__grid {
  display: grid;
  gap: var(--space-lg);
}

.kitchen__quote {
  max-width: 19em;
  font-size: clamp(1.875rem, 1.1rem + 2.9vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.kitchen__quote em {
  font-style: italic;
  font-weight: 400;
}

.kitchen__lanes {
  display: grid;
  gap: var(--gutter);
}

.kitchen__lane {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--stone);
}

.kitchen__lane h3 {
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.kitchen__lane p {
  color: var(--stone);
  max-width: 26em;
}

.kitchen__after {
  display: grid;
  gap: var(--space-md);
  justify-items: start;
}

.kitchen__after p {
  max-width: 30em;
  font-size: clamp(1.1875rem, 1rem + 0.55vw, 1.5rem);
  line-height: 1.42;
}

@media (min-width: 768px) {
  .kitchen__lanes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .kitchen__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    row-gap: 80px;
  }

  .kitchen__grid > .label {
    grid-column: 1 / -1;
  }

  .kitchen__quote {
    grid-column: 1 / span 10;
  }

  .kitchen__lanes {
    grid-column: 1 / span 8;
  }

  .kitchen__after {
    grid-column: 1 / span 8;
  }
}

/* A single statement, set large. */

.statement {
  max-width: 20em;
  font-size: clamp(2rem, 1.1rem + 3.4vw, 4.5rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.statement .muted {
  display: block;
}

/* Sources */

.sources {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink);
}

.sources li {
  display: grid;
  gap: 4px;
  padding-block: 18px;
  border-bottom: 1px solid var(--stone);
}

.sources .label {
  font-size: 0.6875rem;
}

.sources p {
  max-width: 44em;
}

@media (min-width: 768px) {
  .sources li {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    gap: var(--gutter);
  }

  .sources .label {
    padding-top: 0.35em;
  }
}

/* Lab: the kitchens, by name */

.places {
  display: grid;
  gap: var(--space-md);
}

.places__names {
  display: grid;
  gap: 0;
  margin-top: var(--space-md);
  border-top: 1px solid var(--ink);
}

.places__names li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  padding-block: 18px;
  border-bottom: 1px solid var(--ink);
}

.places__name {
  font-size: clamp(2rem, 1rem + 4vw, 5.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Lab: principles */

.principles {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink);
}

.principle {
  display: grid;
  gap: var(--space-sm);
  padding-block: var(--space-md) var(--space-lg);
}

.principle + .principle {
  border-top: 1px solid var(--stone);
}

.principle h3 {
  max-width: 16em;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.principle p {
  max-width: 32em;
  color: var(--lichen);
}

@media (min-width: 1024px) {
  .principle {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    padding-block: 36px 48px;
  }

  .principle h3 {
    grid-column: 1 / span 6;
  }

  .principle p {
    grid-column: 8 / span 5;
    padding-top: 0.4em;
  }
}

/* Lab: the name and the mark */

.mark-sheet__grid {
  display: grid;
  gap: var(--space-xl);
}

.mark-figure {
  position: relative;
  width: min(100%, 260px);
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .mark-figure {
    width: min(100%, 360px);
  }
}

.mark-figure img {
  width: 100%;
}

.mark-figure svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mark-figure .dim {
  fill: none;
  stroke: var(--stone);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.dimlabel {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--stone);
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.dimlabel--petal {
  transform: translate(-50%, -50%) rotate(76deg);
}

.mark-caption {
  max-width: 30em;
  margin-top: var(--space-lg);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--stone);
}

.story {
  display: grid;
  gap: var(--space-md);
}

.story p {
  max-width: 32em;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.5;
  text-wrap: pretty;
}

@media (min-width: 1024px) {
  .mark-sheet__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: center;
  }

  .mark-sheet__figure {
    grid-column: 1 / span 5;
    grid-row: 1;
  }

  .story {
    grid-column: 7 / span 6;
    grid-row: 1;
  }
}

/* Not found */

.notfound__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-lg);
  margin-top: var(--space-sm);
}

/* Reduced motion: keep colour feedback, drop the press scale and movement. */

@media (prefers-reduced-motion: reduce) {
  .button,
  .choice {
    transition:
      background-color 150ms ease,
      color 150ms ease,
      border-color 150ms ease;
  }

  .button:active,
  .choice:active {
    transform: none;
  }

  .arrow {
    transition: none;
  }
}
