/*
  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);
}

/* Usta (MIT-063 STEER 8) is on its own site, getusta.com, and its link leaves
   orkhon.ai like the site's other outside links: same tab, no sign of its own.
   Its mark stands before the name: getusta.com's favicon, the copper tile of
   Usta's identity, used as delivered. It is one line high (1.2em, 18 px at the
   link size), so the cream "u" inside it stands about as tall as the capitals
   beside it; centred on the line like the words. The tile brings its own
   ground, so it reads on the light header and on /earspace/'s dark one. */
.site-nav__mark {
  flex: none;
  width: 1.2em;
  height: 1.2em;
  margin-inline-end: 0.4em;
}

/* The products (Breaker, Earspace, Usta) lead the row as one group; Lab and
   Careers follow it, set apart by space alone. On phones the space is smaller,
   so the five words keep a line to themselves down to 360 px. */
.site-nav__apart {
  margin-inline-start: 24px;
}

@media (max-width: 479px) {
  .site-nav__apart {
    margin-inline-start: 16px;
  }
}

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

/* Five links (Breaker joined first, 2026-10-26; Earspace after it, 2026-11-16;
   Usta in place of Bengü-1 and System One, MIT-063 STEER 8) share one row below
   the desktop layout. Every link has the same padding and is at least a 44 px
   target; the first word starts on the text column. On phones the padding
   narrows and, where the row fits, it spans the column edge to edge, the spare
   room shared equally between the links; only the shortest word (Lab) keeps a
   few pixels more air to stay 44 px wide. The five words fit on one line down
   to 360 px. Where they do not (narrower screens, larger text), the row never
   wraps: it scrolls sideways under the finger, edge to edge, and the next word
   shows cut at the screen's edge. The row's own padding carries the column
   margin, so the last word stops on the column edge at the end of the scroll,
   and a link brought into view from the keyboard (site.js) stops there too. A
   focused link keeps its ring inside the row, which clips anything past its
   edges. */
@media (max-width: 1023px) {
  .site-nav {
    --nav-inset: calc(var(--margin) - 11px);
    padding-inline: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-padding-inline: var(--nav-inset);
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav ul {
    gap: 0;
    width: max-content;
    min-width: 100%;
    margin-inline-start: 0;
    padding-inline: var(--nav-inset);
  }

  .site-nav a {
    justify-content: center;
    min-width: 44px;
    padding-inline: 11px;
  }

  .site-nav a:focus-visible {
    outline-offset: -2px;
  }
}

@media (max-width: 479px) {
  .site-nav {
    --nav-inset: calc(var(--margin) - 7px);
  }

  .site-nav ul {
    justify-content: space-between;
  }

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

@media (max-width: 389px) {
  .site-nav a {
    font-size: 0.875rem;
  }
}

@media (max-width: 369px) {
  .site-nav {
    --nav-inset: calc(var(--margin) - 5px);
  }

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

.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;
  }
}

/* Up to 1151 px the links close up to the 20 px their own padding leaves
   between the words. Six links needed it to share the row with the lockup and
   "Write to us"; the five of MIT-063 STEER 8 keep it, so the other entries sit
   as before, and the lockup keeps 207 px of clear room beside them at 1024 px. */
@media (min-width: 1024px) and (max-width: 1151px) {
  .site-nav ul {
    gap: 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));
  }

  /* Three products, three equal columns (Breaker joined 2026-10-25). Usta, the one in use, keeps the white card. */
  .products__list > li {
    grid-column: span 4;
  }

  /* Sized so each "Name, by Orkhon" title holds one line in a third of the row. */
  .products__list .card__title {
    font-size: clamp(1.5rem, 0.6rem + 1.6vw, 2.5rem);
  }

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

  /* Four products on the home page (Earspace joined 2026-11-16): two rows of
     two, every card the same size, in the same order. /lab/ keeps its three. */
  .products__list--pairs > li {
    grid-column: span 6;
  }
}

/* Earspace's card carries its mark from the Earspace kit (logo/earspace-mark-
   light.svg, the cut for light grounds), as delivered: the file's own clear
   space (one core height on every side) is inside it. It follows the title's
   size: 44 px high (the mark 37.6 px wide) beside the large titles, 36 px
   (30.9 px wide) beside the smaller ones from 768 to 1279 px; both are above
   the kit's 30 px floor for the full cut. It sits in the top corner, level
   with the title, where the arrow sits at the bottom; the file's clear space
   is let into the card's padding so the drawn mark lines up with the arrow's
   edge, and the title keeps clear of it by the drawn mark and its clear
   space. Where the title does not fit beside the mark, "by Orkhon"
   moves to the second line whole. Its facts line is the product page's own:
   status and platform. */
.card--earspace {
  --mark-h: 44px;
  --pad-top: 28px;
  --pad-end: 24px;
}

.card__mark {
  position: absolute;
  top: calc(var(--pad-top) - var(--mark-h) * 18.8 / 109.6 + 2px);
  right: calc(var(--pad-end) - var(--mark-h) * 18.8 / 109.6);
  width: auto;
  max-width: none;
  height: var(--mark-h);
}

.card--earspace .card__title {
  padding-inline-end: calc(var(--mark-h) * 112.5 / 109.6);
}

.card__facts {
  max-width: 28em;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--lichen);
}

@media (min-width: 768px) {
  .card--earspace {
    --mark-h: 36px;
    --pad-top: 36px;
    --pad-end: 36px;
  }
}

@media (min-width: 1280px) {
  .card--earspace {
    --mark-h: 44px;
  }
}

/* Breaker's card carries its mark the same way (MIT-063 STEER 9), on the home
   page and on /lab/: the Breaker kit's logo/breaker-mark-light.svg, the cut
   for light grounds (the graphite box carries the mark, the orange cable is
   its accent), as delivered, its clear space (one lead, 65 of the file's 330
   units high) inside the file. Its box stands as tall as the Earspace mark's
   outer band: the file 48 px high (the box 29.1 px, the mark 48 px wide)
   where Earspace's is 44 px, 40 px (the box 24.2 px, the mark 40 px wide)
   where Earspace's is 36 px. 40 px wide is the kit's floor for the drawn
   mark, so no width draws it smaller. Placed like Earspace's: the box level
   with the title (centred on its capitals, within a pixel, 1 px higher
   beside the 24 to 26 px titles of 768 to 1023 px), the cable's end on the
   arrow's edge, the title clear of the mark and its clear space. */
.card--breaker {
  --mark-h: 48px;
  --mark-nudge: 2px;
  --pad-top: 28px;
  --pad-end: 24px;
}

.card--breaker .card__mark {
  top: calc(var(--pad-top) - var(--mark-h) * 65 / 330 + var(--mark-nudge));
  right: calc(var(--pad-end) - var(--mark-h) * 65 / 330);
}

.card--breaker .card__title {
  padding-inline-end: calc(var(--mark-h) * 395 / 330);
}

@media (min-width: 768px) {
  .card--breaker {
    --mark-h: 40px;
    --pad-top: 36px;
    --pad-end: 36px;
  }
}

@media (min-width: 1280px) {
  .card--breaker {
    --mark-h: 48px;
  }
}

/* /lab/ lists three products in one row. From 768 to 1023 px a third of the
   row leaves "by Orkhon" too little room beside the mark, so there the mark
   keeps its room beside the title's first line only (1.05em, the title's
   line height: the box stands within that line), and "by Orkhon" runs on
   below it, more than the mark's clear space under the box. */
@media (min-width: 768px) and (max-width: 1023px) {
  .card--breaker {
    --mark-nudge: 1px;
  }

  .products__list:not(.products__list--pairs) .card--breaker .card__title {
    padding-inline-end: 0;
  }

  .products__list:not(.products__list--pairs) .card--breaker .card__title::before {
    content: "";
    float: right;
    width: calc(var(--mark-h) * 395 / 330);
    height: 1.05em;
  }
}

/* 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;
}

/* A long command scrolls inside its block instead of widening the page. */
.signature-figure {
  min-width: 0;
}

/* On a phone the command wraps at a space, so all of it stays in view. */
@media (max-width: 559px) {
  .signature {
    padding-inline: 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

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

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

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

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

/* Bengü-1: the results table. */

.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;
}

.scoreboard .num {
  padding-right: 0;
  padding-left: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 559px) {
  .scoreboard thead th {
    letter-spacing: 0.04em;
  }
}

/* Bengü-1's own row reads in ink; the systems it is compared with stay in lichen. */
.scoreboard .is-ours td {
  color: var(--ink);
  font-weight: 600;
}

/* 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;
  }
}
