/* dowelly.app: tokens from docs/design/DESIGN.md §3 (same names as the app), page scale from §13. */

@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-400-normal.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: 'IBM Plex Sans';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-ext-400-normal.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: 'IBM Plex Sans';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-500-normal.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: 'IBM Plex Sans';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-ext-500-normal.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: 'IBM Plex Sans';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-600-normal.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: 'IBM Plex Sans';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-ext-600-normal.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;
}

:root {
  color-scheme: light;
  --ground: #f3f3f0;
  --surface: #ffffff;
  --raised: #f7f7f5;
  --well: #ecece8;
  --active: #e6e6e1;
  --border: #e3e3de;
  --rule: #eeeeea;
  --control: #c9c9c3;
  --text: #161616;
  --muted: #5c5c58;
  --faint: #6e6e69;
  --primary: #1c1c1b;
  --on-primary: #ffffff;
  --accent: #1b6c80;
  --accent-tint: rgba(27, 108, 128, 0.1);
  --on-accent: #ffffff;
  --positive: #1e7b4f;
  --negative: #c4242a;
  --pill-warning-bg: #fff4d6;
  --pill-warning-ink: #7a3e0a;
  --pill-neutral-bg: #e9e9e4;
  --pill-neutral-ink: #353533;
  --draw-line: #2a2a28;
  --draw-faint: #9a9a94;
  --draw-wall: #d9d9d3;
  --shadow-float: 0 8px 28px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.08);

  --font:
    'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-display: clamp(30px, 3.8vw, 58px);
  --fs-heading: clamp(28px, 3.1vw, 42px);
  --fs-lead: clamp(18px, 1.4vw, 20px);
  --fs-body: 17px;
  --fs-small: 14px;

  --radius-sheet: 16px;
  --radius-card: 10px;
  --radius-control: 8px;
  --target: 44px;
  --control-height: 48px;
  --margin: clamp(16px, 4vw, 48px);
  --section: clamp(96px, 12vw, 176px);
  --page: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0e0e0e;
    --surface: #181818;
    --raised: #1f1f1f;
    --well: #121212;
    --active: #2a2a2a;
    --border: #2b2b2b;
    --rule: #232323;
    --control: #4a4a4a;
    --text: #f2f2f0;
    --muted: #b3b3ad;
    --faint: #94948f;
    --primary: #f2f2f0;
    --on-primary: #111111;
    --accent: #5cb8cc;
    --accent-tint: rgba(92, 184, 204, 0.14);
    --on-accent: #0b1f24;
    --positive: #4cc287;
    --negative: #ef6b6f;
    --pill-warning-bg: #2d2412;
    --pill-warning-ink: #f0c56b;
    --pill-neutral-bg: #2a2a2a;
    --pill-neutral-ink: #d4d4cf;
    --draw-line: #e6e6e2;
    --draw-faint: #7a7a75;
    --draw-wall: #2f2f2d;
    --shadow-float: 0 10px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px #333333;
  }
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 var(--fs-body) / 1.55 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
img,
svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
button {
  font: inherit;
  color: inherit;
}
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: var(--margin);
  top: -60px;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-control);
  z-index: 5;
}
.skip:focus {
  top: 12px;
}

/* ---------- bar ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 16px var(--margin);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--target);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mark {
  width: 28px;
  height: 28px;
}
.mark rect {
  fill: var(--text);
}
.mark rect:last-child {
  fill: var(--accent);
  stroke: var(--mark-ground, var(--ground));
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 12px;
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
  transition:
    color 160ms,
    background-color 160ms;
}
.nav a:hover {
  color: var(--text);
  background: var(--active);
}
.nav .lang {
  color: var(--text);
  font-weight: 500;
}

/* ---------- sections ---------- */
main > section {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--margin);
}
main > section + section {
  margin-top: var(--section);
}
h2 {
  font-size: var(--fs-heading);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(16px, 3vw, 40px) !important;
}
h1 {
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.lead {
  margin-top: 24px;
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 34em;
}
.status {
  display: inline-block;
  margin-top: 24px;
  padding: 6px 12px;
  border-radius: var(--radius-control);
  background: var(--pill-neutral-bg);
  color: var(--pill-neutral-ink);
  font-size: var(--fs-small);
  font-weight: 500;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
  text-decoration: none;
  transition:
    transform 160ms var(--ease),
    opacity 160ms;
}
.button:hover {
  opacity: 0.88;
}
.button:active {
  transform: scale(0.98);
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--target);
  font-weight: 500;
  text-decoration: none;
}
.more svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform 200ms var(--ease);
}
.more:hover svg {
  transform: translateY(3px);
}
.hero-demo {
  margin: 0;
}
.hero-demo figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: var(--fs-small);
}

/* ---------- hero editor: a cropped piece of the app (DESIGN.md §7–8) ---------- */
.editor {
  position: relative;
  padding: 20px 20px 16px;
  border-radius: var(--radius-sheet);
  background: var(--well);
}
.editor-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 17px;
}
.editor-head span {
  color: var(--muted);
  font-size: 13px;
}
.canvas {
  margin-top: 8px;
}
.canvas .drawing {
  max-height: clamp(320px, calc(100svh - 250px), 720px);
  margin: 0 auto;
}
.editor-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-size: 15px;
  font-weight: 500;
}
.editor-status::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><circle cx="12" cy="12" r="9"/><path d="M8 12.5l3 3 5-6"/></svg>')
    center / contain no-repeat;
}
.editor-status.ok {
  color: var(--text);
}
.editor-status.ok::before {
  background: var(--positive);
}
.editor-status.warn {
  color: var(--negative);
}
.editor-status.warn::before {
  mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><circle cx="12" cy="12" r="9"/><path d="M12 7.5v6M12 16.5v.5"/></svg>');
}

.drawing {
  width: 100%;
  height: auto;
  overflow: visible;
}
.drawing .wall {
  fill: var(--draw-wall);
}
.drawing .line {
  fill: none;
  stroke: var(--draw-line);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}
.drawing .floor {
  stroke-width: 2.4;
}
.drawing .thin {
  stroke: var(--draw-faint);
  stroke-width: 1;
}
.drawing .carcass {
  fill: var(--surface);
  transition: fill 200ms;
}
.drawing .selected {
  fill: var(--accent-tint);
  stroke: var(--accent);
  stroke-width: 2.6;
}
.drawing .dim {
  stroke: var(--muted);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.drawing .dim.on {
  stroke: var(--accent);
  stroke-width: 1.6;
}
.drawing text {
  font-family: var(--font);
  font-size: 92px;
  font-variant-numeric: tabular-nums;
  fill: var(--text);
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--well);
  stroke-width: 26px;
  stroke-linejoin: round;
}
.drawing .chip {
  cursor: pointer;
  outline: none;
}
.drawing .chip .hit {
  fill: transparent;
  stroke: none;
}
.drawing .chip rect:not(.hit) {
  fill: var(--surface);
  stroke: var(--control);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  transition:
    fill 160ms,
    stroke 160ms;
}
.drawing .chip text {
  stroke: none;
  font-weight: 500;
}
.drawing .chip:hover rect:not(.hit),
.drawing .chip.on rect:not(.hit) {
  stroke: var(--accent);
}
.drawing .chip.on text {
  fill: var(--accent);
  font-weight: 600;
}
.drawing .chip.editing rect:not(.hit) {
  fill: var(--accent);
  stroke: var(--accent);
}
.drawing .chip.editing text {
  fill: var(--on-accent);
  font-weight: 600;
}
.drawing .chip:focus-visible rect:not(.hit) {
  stroke: var(--accent);
  stroke-width: 3;
}

.keypad {
  position: absolute;
  top: 56px;
  right: 16px;
  z-index: 2;
  width: 268px;
  padding: 14px;
  border-radius: var(--radius-sheet);
  background: var(--surface);
  box-shadow: var(
    --shadow-float
  ); /* taste-skill-ignore: the keypad floats over the drawing (DESIGN.md §5) */
  animation: keypad-in 220ms var(--ease);
}
.keypad[hidden] {
  display: none;
}
@keyframes keypad-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.keypad-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 14px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-control);
}
.keypad-value output {
  font-size: 30px;
  font-weight: 500;
}
.keypad-value span {
  color: var(--muted);
  font-size: 15px;
}
.keypad-hint {
  margin: 6px 2px 12px;
  color: var(--muted);
  font-size: 13px;
}
.keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.key {
  height: 52px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--raised);
  font-size: 21px;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 120ms var(--ease),
    background-color 120ms;
}
.key:hover {
  background: var(--active);
}
.key:active {
  transform: scale(0.95);
}
.key.fn {
  background: var(--active);
  color: var(--muted);
  font-size: 15px;
}
.key svg {
  width: 22px;
  height: 22px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.key.done {
  grid-column: 1 / -1;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 16px;
}

/* ---------- how it works ---------- */
.stages {
  margin-top: 32px;
  display: grid;
  gap: 64px;
}
.stage {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.stage h3 {
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.stage p {
  margin-top: 16px;
  max-width: 30em;
}
.stage-shot {
  padding: clamp(12px, 2vw, 28px);
  border-radius: var(--radius-sheet);
  background: var(--well);
}
.stage-shot img {
  border-radius: var(--radius-card);
}
.js .stages {
  grid-template-areas: 'stage';
}
.js .stage {
  grid-area: stage;
  transition: opacity 260ms var(--ease);
}
.js .stage[hidden] {
  display: grid;
  opacity: 0;
  visibility: hidden;
}
/* The app's step bar (DESIGN.md §6): current step bold, 3 px accent underline. */
.steps {
  margin-top: 32px;
}
.steps .tabs {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px 32px;
}
.steps .tabs button {
  position: relative;
  font-size: var(--fs-lead);
  font-weight: 500;
  letter-spacing: 0;
}
.steps .tabs button[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
/* ---------- output ---------- */
.output-intro {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}
.output-intro p {
  max-width: 36em;
  padding-left: clamp(16px, 3vw, 40px);
}
.outputs {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 56px);
  margin-top: 48px;
  align-items: start;
}
.tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.tabs button {
  min-height: var(--target);
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-align: left;
  cursor: pointer;
  transition: color 160ms;
}
.tabs button:hover,
.tabs button[aria-selected='true'] {
  color: var(--text);
}
.tabs button[aria-selected='true'] {
  font-weight: 600;
}
.sheet-stage {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(16px, 3vw, 40px);
  border-radius: var(--radius-sheet);
  background: var(--well);
}
.js .sheet {
  grid-area: 1 / 1;
}
.sheet {
  min-width: 0;
  padding: clamp(16px, 2.4vw, 28px);
  border-radius: var(--radius-card);
  background: var(--surface);
  font-size: 14px;
  transition: opacity 240ms var(--ease);
}
.js .sheet[hidden] {
  display: block;
  opacity: 0;
  visibility: hidden;
}
.sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--text);
}
.sheet-head strong {
  font-size: 17px;
}
.sheet-head span,
.sheet-sub,
.sheet-foot,
.legend {
  color: var(--muted);
  font-size: 13px;
}
.sheet-sub {
  margin-top: 14px;
}
.sheet-foot {
  margin-top: 14px;
  font-weight: 500;
}
.sheet table {
  width: 100%;
  border-collapse: collapse;
}
.sheet th {
  padding: 10px 8px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}
.sheet td {
  padding: 7px 8px;
  border-top: 1px solid var(--rule);
  vertical-align: top;
}
.sheet td:first-child,
.sheet th:first-child {
  padding-left: 0;
}
.sheet td:nth-child(n + 4) {
  white-space: nowrap;
}
.parts th:nth-child(1),
.parts th:nth-child(3),
.parts th:nth-child(4),
.parts th:nth-child(5),
.sheet .num {
  text-align: right;
}
.parts td:first-child {
  color: var(--muted);
}
.parts td:nth-child(4),
.parts td:nth-child(5) {
  font-weight: 500;
}
.band {
  width: 30px;
  height: 16px;
}
.band rect {
  fill: none;
  stroke: var(--draw-faint);
  stroke-width: 1;
}
.band path {
  stroke: var(--text);
  stroke-width: 3;
}
.side {
  width: 100%;
  margin-top: 8px;
}
.side .panel {
  fill: var(--raised);
  stroke: var(--draw-line);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}
.side .through {
  fill: var(--accent);
}
.side .face {
  fill: none;
  stroke: var(--draw-line);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
.side .dim {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.side text {
  fill: var(--text);
  font-family: var(--font);
  font-size: 84px;
  text-anchor: middle;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 8px;
}
.legend .band {
  flex: none;
  margin-right: 4px;
}
.legend span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend span + span,
.legend .face {
  margin-left: 12px;
}
.legend .through {
  background: var(--accent);
}
.legend .face {
  border: 1.4px solid var(--draw-line);
}
.sheet pre {
  margin: 12px 0 0;
  padding: 14px;
  overflow-x: auto;
  border-radius: var(--radius-control);
  background: var(--raised);
  font:
    13px / 1.7 ui-monospace,
    'SF Mono',
    Menlo,
    Consolas,
    monospace;
}

/* ---------- who ---------- */
.who {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.who-lead {
  margin-top: 20px;
  font-size: var(--fs-lead);
}
.points {
  display: grid;
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.points strong {
  font-weight: 600;
}
.who-text {
  grid-column: 2;
  grid-row: 1;
}
.who-shot {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding: clamp(12px, 2vw, 28px);
  border-radius: var(--radius-sheet);
  background: var(--well);
}
.who-shot img {
  border-radius: var(--radius-card);
}
.who-shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--fs-small);
}

/* ---------- contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px clamp(32px, 5vw, 72px);
  align-items: end;
  padding-top: clamp(40px, 6vw, 80px) !important;
  padding-bottom: clamp(40px, 6vw, 80px) !important;
}
.contact p {
  margin-top: 20px;
  max-width: 34em;
  font-size: var(--fs-lead);
}
.email {
  display: inline-block;
  padding: 4px 0;
  font-size: var(--fs-heading);
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

/* ---------- footer ---------- */
.footer {
  margin-top: var(--section);
  background: var(--surface);
}
.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--margin) 40px;
}
.footer-word {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  font-size: clamp(56px, 11vw, 168px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}
.footer-word .mark {
  --mark-ground: var(--surface);
  width: 0.8em;
  height: 0.8em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
}
.footer-note {
  margin-top: 12px;
  max-width: 48em;
  color: var(--muted);
  font-size: var(--fs-small);
}

/* ---------- documents ---------- */
.doc {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 56px) var(--margin) 0;
}
.doc h1 {
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.doc h2 {
  margin-top: 56px;
  font-size: clamp(22px, 2vw, 26px);
  letter-spacing: -0.01em;
  scroll-margin-top: 24px;
}
.doc h3 {
  margin-top: 32px;
  font-size: 19px;
}
.doc p,
.doc ol,
.doc ul {
  margin-top: 16px;
  max-width: 64ch;
}
.doc li {
  text-wrap: pretty;
}
.doc ol,
.doc ul {
  padding-left: 1.4em;
}
.doc li + li {
  margin-top: 6px;
}
.doc li > ol,
.doc li > ul {
  margin-top: 6px;
}
.doc-lead {
  font-size: var(--fs-lead);
}
.doc .steps li {
  margin-top: 12px;
}
.toc ol {
  margin-top: 24px;
  padding: 18px 18px 18px 2.4em;
  border-radius: var(--radius-card);
  background: var(--raised);
  columns: 2 16em;
  column-gap: 32px;
  font-size: 15px;
}
.toc li {
  break-inside: avoid;
}
.toc a {
  display: inline-block;
  padding: 3px 0;
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}
.draft {
  margin-bottom: 32px !important;
  padding: 14px 18px;
  border-radius: var(--radius-card);
  background: var(--pill-warning-bg);
  color: var(--pill-warning-ink);
  font-size: 15px;
  font-weight: 500;
  max-width: none !important;
}
.note {
  padding: 14px 18px;
  border-radius: var(--radius-card);
  background: var(--raised);
  color: var(--muted);
  font-size: 15px;
}
.todo {
  padding: 0 6px;
  border: 1px dashed var(--pill-warning-ink);
  border-radius: 4px;
  background: var(--pill-warning-bg);
  color: var(--pill-warning-ink);
  white-space: nowrap;
}
.table {
  margin-top: 20px;
  overflow-x: auto;
}
.table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}
.table th {
  padding: 8px 12px 8px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  vertical-align: bottom;
}
.table td {
  padding: 10px 12px 10px 0;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

/* ---------- entrance (only with script, content never waits on it) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
  .js .reveal {
    transform: none;
  }
}

/* ---------- tablet portrait and phone ---------- */
@media (max-width: 1000px) {
  :root {
    --fs-display: clamp(30px, 7vw, 56px);
  }
  .canvas .drawing {
    max-height: clamp(300px, 52svh, 620px);
  }
  .who-text,
  .who-shot {
    grid-column: auto;
    grid-row: auto;
  }
  .output-intro p {
    padding-left: 0;
  }
  .contact,
  .hero,
  .stage,
  .output-intro,
  .outputs,
  .who {
    grid-template-columns: minmax(0, 1fr);
  }
  .tabs {
    flex-direction: row;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .tabs button {
    flex: none;
    font-size: 22px;
    scroll-snap-align: start;
  }
}
@media (max-width: 720px) {
  .nav a:not(.lang) {
    display: none;
  }
  .keypad {
    position: static;
    width: auto;
    margin-top: 12px;
  }
  .sheet {
    overflow-x: auto;
  }
  .sheet table {
    min-width: 560px;
  }
}
