/* Hyeok & Loop. Every value traces to DESIGN.md; raw colours live only in :root. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}
/* Arial resized to Bricolage's measure so the swap does not move the page. */
@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Roboto");
  size-adjust: 106.28%;
  ascent-override: 87.5%;
  descent-override: 25.4%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;

  --canvas: #f6f1e4;
  --paper: #ffffff;
  --ink: #111111;
  --blue-950: #0a1352;
  --blue-900: #0e1b78;
  --blue-800: #14279e;
  --blue-700: #1a31c2;
  --blue-600: #1f3be0;
  --blue-400: #6c84ff;
  --lemon: #ffd23f;
  --lemon-hi: #ffe680;
  --lemon-side: #d9a400;
  --key: #fbf7ec;
  --key-side: #d3c9b1;
  --key-deep: #b9ae93;

  --text: #111111;
  --text-2: #505050;
  --on-dark: #ffffff;

  --rule: rgba(17, 17, 17, 0.5);
  --rule-on-dark: rgba(255, 255, 255, 0.6);
  --drop: rgba(17, 17, 17, 0.4);
  --socket: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Crect x='.8' y='.8' width='8.4' height='8.4' rx='1.9'/%3E%3C/svg%3E");
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h14M11 4l6 6-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --wash: rgba(17, 17, 17, 0.06);
  --wash-strong: rgba(17, 17, 17, 0.1);
  --wash-on-dark: rgba(255, 255, 255, 0.14);
  --shade: rgba(10, 19, 82, 0.55);

  /* Room-scoped roles. A room class below repoints them. */
  --fg: var(--text);
  --fg-2: var(--text-2);
  --focus: var(--ink);
  --plate: var(--ink);
  --plate-solid: var(--blue-600);
  --edge: var(--rule);
  --key-edge: var(--ink);
  --tint: var(--wash);
  --solid-bg: var(--ink);
  --solid-fg: var(--on-dark);
  --solid-ico: var(--wash-on-dark);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px; --s32: 128px;

  --gutter: clamp(16px, 4.4vw, 48px);
  --content: 1280px;
  --chapter-gap: clamp(88px, 12vw, 168px);
  --nav-h: 56px;

  --r-xs: 8px;
  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 40px;
  --r-full: 999px;

  --clay: 0 1px 1px rgba(17, 17, 17, 0.1), inset 0 -1px 1px rgba(17, 17, 17, 0.04), 0 -0.5px 1px rgba(17, 17, 17, 0.05);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fall: cubic-bezier(0.55, 0, 0.9, 0.5);
  --spring-press: linear(0, 0.07 4.1%, 0.282 9.7%, 0.536 16%, 0.746 22.9%, 0.884 30.3%, 0.959 38%, 0.992 46.2%, 1.004 58.8%, 1.001 81.2%, 1);
  --spring-travel: linear(0, 0.059 4%, 0.256 9.7%, 0.512 16%, 0.747 22.9%, 0.909 30.3%, 0.996 38%, 1.028 46.1%, 1.031 50.4%, 1.019 63.2%, 1.005 76.5%, 1);
  --t-press: 360ms;
  --t-tint: 160ms;
  --t-std: 260ms;
  --t-enter: 640ms;
  --t-fall: 240ms;
  --t-build: 520ms;

  --font: "Bricolage Grotesque", "Bricolage Fallback", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;

  --wm: clamp(4.5rem, 25vw, 9rem);
  --tray: min(100%, 26rem);
  --tilt: -8deg;
}
@supports not (transition-timing-function: linear(0, 1)) {
  :root {
    --spring-press: cubic-bezier(0.2, 0.9, 0.3, 1);
    --spring-travel: cubic-bezier(0.3, 1.25, 0.5, 1);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--s8)); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4, p, dl, dd, ol, ul, figure, address { margin: 0; padding: 0; }
ol, ul { list-style: none; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--lemon); color: var(--ink); }

/* Rooms */
.room--blue, .room--ink {
  --fg: var(--on-dark);
  --fg-2: var(--on-dark);
  --focus: var(--on-dark);
  --edge: var(--rule-on-dark);
  --key-edge: transparent;
  --tint: var(--wash-on-dark);
  --solid-bg: var(--paper);
  --solid-fg: var(--ink);
  --solid-ico: var(--wash-strong);
  color: var(--fg);
}
.room--blue { --plate: var(--blue-950); --plate-solid: var(--blue-950); background: var(--blue-600); }
.room--ink { --plate: var(--paper); --plate-solid: var(--lemon); background: var(--ink); }

.wrap { width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: absolute; left: var(--s4); top: var(--s4); z-index: 30;
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s5); border-radius: var(--r-full);
  background: var(--ink); color: var(--on-dark);
  font-size: 0.9375rem; font-weight: 600;
  translate: 0 -300%;
}
.skip:focus-visible { translate: none; outline-color: var(--on-dark); outline-offset: -5px; }

/* Type */
.display { font-size: clamp(2.75rem, 7vw, 6.25rem); font-weight: 800; line-height: 0.92; letter-spacing: -0.05em; text-wrap: balance; }
.h2 { font-size: clamp(2.125rem, 4.6vw, 3.75rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
.h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; }
.h4 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.small { font-size: 0.9375rem; font-weight: 500; line-height: 1.45; }
.lead { font-size: clamp(1.1875rem, 1.6vw, 1.4375rem); line-height: 1.45; letter-spacing: -0.012em; color: var(--fg-2); text-wrap: pretty; }
.address { font-size: clamp(1.375rem, 6.2vw, 4.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.04em; }
.label {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: 0.875rem; font-weight: 600; line-height: 1.2; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-2);
}
.amp, .h2 em, .display em { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.02em; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; border-radius: var(--s1); }
.link:hover { text-decoration-thickness: 3px; }

/* Status: a shape plus words */
.status::before {
  content: ""; flex: none; width: 12px; height: 12px; border-radius: var(--r-full);
  border: 1.5px solid currentColor;
}
.status[data-status="live"]::before { background: var(--lemon); }
.status[data-status="private"]::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status[data-status="dev"]::before { border-style: dashed; }

/* Nav island */
.nav {
  position: fixed; z-index: 20; inset: var(--s3) 0 auto 0;
  display: grid; justify-items: center; padding-inline: var(--gutter);
  pointer-events: none;
}
.nav-pill {
  --focus: var(--ink);
  position: relative; pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  min-height: var(--nav-h); padding: 6px; border-radius: var(--r-full);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--rule), 0 12px 28px -14px var(--drop);
  color: var(--text);
}
.brand {
  display: inline-flex; align-items: baseline; gap: 0.2em; min-height: 44px; padding-inline: var(--s4);
  border-radius: var(--r-full); line-height: 44px;
  font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap;
}
.brand .amp { font-size: 1.2em; }
.nav-menu { display: flex; align-items: center; gap: var(--s2); }
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: var(--s5);
  border-radius: var(--r-full); background: var(--ink); color: var(--on-dark);
  font-size: 0.9375rem; font-weight: 600; white-space: nowrap;
  transition: background-color var(--t-tint);
}
.nav-cta:hover { background: var(--blue-600); }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list a, .nav-toggle {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding-inline: var(--s4);
  border-radius: var(--r-full);
  font-size: 0.9375rem; font-weight: 500; color: var(--text-2); white-space: nowrap;
  transition: color var(--t-tint), background-color var(--t-tint);
}
.nav-list a:hover, .nav-toggle:hover { color: var(--text); background: var(--wash); }
.nav-list a[aria-current="true"] { color: var(--text); background: var(--wash-strong); }
.nav-toggle { display: none; font-weight: 600; color: var(--text); }
.nav-toggle .ico-close, .nav-toggle[aria-expanded="true"] .ico-menu { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: block; }

@media (max-width: 899px) {
  .nav-pill { width: 100%; }
  html:not(.js) .nav-pill { flex-wrap: wrap; border-radius: var(--r-md); }
  html:not(.js) .nav-list, html:not(.js) .nav-menu { flex-wrap: wrap; }
  .js .nav-toggle { display: inline-flex; }
  .js .nav-menu {
    position: absolute; inset: calc(100% + var(--s2)) 0 auto 0;
    padding: var(--s2); border-radius: var(--r-md);
    display: grid; gap: var(--s2);
    background: var(--paper); box-shadow: 0 0 0 1px var(--rule), 0 20px 40px -18px var(--drop);
    opacity: 0; visibility: hidden; translate: 0 -8px;
    transition: opacity var(--t-std) var(--ease-out), translate var(--t-std) var(--ease-out), visibility 0s linear var(--t-std);
  }
  .js .nav-pill[data-open="true"] .nav-menu { opacity: 1; visibility: visible; translate: none; transition-delay: 0s; }
  .js .nav-list { flex-direction: column; align-items: stretch; }
  .js .nav-list a { min-height: 48px; font-size: 1.0625rem; }
  .js .nav-cta { min-height: 48px; }
}


/* A paper surface inside a dark room takes the light roles back. */
.on-paper {
  --fg: var(--text); --fg-2: var(--text-2); --focus: var(--ink); --edge: var(--rule); --tint: var(--wash);
  --solid-bg: var(--ink); --solid-fg: var(--on-dark); --solid-ico: var(--wash-on-dark);
  --plate: var(--ink); --plate-solid: var(--blue-600); --key-edge: var(--ink);
  background: var(--paper); color: var(--fg);
}

/* Buttons */
.btn {
  position: relative; isolation: isolate; display: inline-flex; min-height: 52px;
  border-radius: var(--r-full); font-size: 0.9375rem; font-weight: 600; line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--btn-plate); transition: translate var(--t-std) var(--ease-out);
}
.btn-face {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s3);
  width: 100%; min-height: inherit; padding-inline: var(--s5); border-radius: inherit;
  background: var(--btn-bg); color: var(--btn-fg); box-shadow: inset 0 0 0 1.5px var(--btn-edge);
  white-space: nowrap;
  transition: translate var(--t-std) var(--ease-out), rotate var(--t-std) var(--ease-out), scale var(--t-press) var(--spring-press), background-color var(--t-tint), filter var(--t-tint);
}
.btn-face:has(.btn-ico) { padding-right: var(--s3); }
.btn-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-full); background: var(--btn-ico); }
.btn-ico .ico { transition: translate var(--t-std) var(--ease-out); }
.btn--key { --btn-bg: var(--lemon); --btn-fg: var(--ink); --btn-edge: var(--key-edge); --btn-plate: var(--plate); --btn-ico: var(--wash-strong); }
.btn--solid { --btn-bg: var(--solid-bg); --btn-fg: var(--solid-fg); --btn-edge: transparent; --btn-plate: var(--plate-solid); --btn-ico: var(--solid-ico); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--fg); --btn-edge: var(--edge); --btn-plate: transparent; --btn-ico: var(--tint); }
.btn--sm { min-height: 44px; }
.btn:focus-visible { outline-offset: 3px; }
.btn:active .btn-face { scale: 0.97; }
@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover .btn-face { background: var(--tint); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn:not(.btn--ghost):hover::before { translate: -5px 5px; }
  .btn:not(.btn--ghost):hover .btn-face { translate: 2px -3px; rotate: -2deg; }
  .btn:hover .btn-ico .ico { translate: 2px 0; }
  .btn:not(.btn--ghost):active::before, .btn:not(.btn--ghost):active .btn-face { translate: none; rotate: none; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .btn:not(.btn--ghost):hover .btn-face { filter: brightness(0.9); }
}
.cta { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Hero: stacked by default, an overlay stage on wide screens */
.hero {
  position: relative; overflow: clip; border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: calc(var(--nav-h) + var(--s16)) 0 var(--s12);
}
.hero > .wrap { width: min(100% - 2 * var(--gutter), 1680px); }
.hero-stage { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--s5); }
.wordmark {
  grid-area: 1 / 1 / span 3 / auto; display: grid; grid-template-rows: subgrid;
  font-size: var(--wm); font-weight: 800; line-height: 0.86; letter-spacing: -0.055em;
}
.wm { display: block; width: max-content; rotate: var(--tilt); }
.wm-a { grid-row: 1; justify-self: start; transform-origin: 0 100%; }
.wm-b { grid-row: 3; justify-self: end; transform-origin: 100% 0; margin-bottom: 0.22em; }
.hero-board { grid-area: 2 / 1; justify-self: center; z-index: 1; margin-block: var(--s2); }
.hero-copy { grid-area: 4 / 1; z-index: 1; display: grid; gap: var(--s5); justify-items: start; max-width: 34rem; }
.hero-copy .lead { color: var(--fg); }
.hero-copy .label { display: block; }
@supports not (grid-template-rows: subgrid) {
  .wordmark { grid-area: 1 / 1; }
  .wm-b { grid-row: 2; }
  .hero-copy { grid-area: 3 / 1; }
}
@media (min-width: 1120px) {
  :root { --wm: clamp(8.5rem, 13.2vw, 13rem); --tray: clamp(21rem, min(30vw, 46vh), 30rem); --tilt: -22deg; }
  .hero { display: grid; min-height: max(100svh, 46rem); padding: calc(var(--nav-h) + var(--s6)) 0 var(--s10); }
  .hero > .wrap { display: grid; }
  .hero-stage { grid-template: minmax(0, 1fr) / minmax(0, 1fr); row-gap: 0; }
  .wordmark, .hero-board, .hero-copy { grid-area: 1 / 1; }
  .wordmark { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
  .wm-a, .wm-b { grid-area: 1 / 1; transform-origin: 50% 50%; margin: 0; }
  .wm-a { place-self: start start; margin-top: 6.5vw; }
  .wm-b { place-self: end end; margin-bottom: 4vw; }
  .hero-board { place-self: center; margin: 0; }
  .hero-copy { place-self: end start; max-width: min(27rem, calc((100% - var(--tray)) / 2 - var(--s6))); }
}

/* Remake Board */
.board { position: relative; display: grid; justify-items: center; width: var(--tray); container-type: inline-size; }
.tray {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 9.6cqi;
  background: linear-gradient(160deg, var(--blue-700), var(--blue-800) 60%);
  box-shadow: inset 0 1px 0 var(--blue-400), inset 0 -0.6cqi 0 var(--blue-900), 0 7cqi 14cqi -5cqi var(--shade), 0 2cqi 4cqi -2cqi var(--shade);
}
.floor {
  position: absolute; inset: 3cqi; border-radius: 6.6cqi; background: var(--blue-900);
  box-shadow: inset 0 0.8cqi 2cqi var(--blue-950), inset 0 -1px 0 var(--blue-700);
}
.floor::before {
  content: ""; position: absolute; inset: 2.2cqi; background: var(--blue-800);
  -webkit-mask: var(--socket) 0 0 / calc(100% / 9) calc(100% / 9);
  mask: var(--socket) 0 0 / calc(100% / 9) calc(100% / 9);
}
.grid { position: absolute; inset: 2.2cqi; --u: calc(89.6cqi / 9); }
.key {
  position: absolute; left: 0; top: 0; width: var(--u); height: var(--u);
  translate: calc(var(--x) * var(--u)) calc(var(--y) * var(--u));
  rotate: 0deg; scale: var(--sx, 1) var(--sy, 1);
}
.key::before, .key::after { content: ""; position: absolute; inset: 4% 6% 17%; border-radius: 24%; }
.key::before {
  background: linear-gradient(160deg, var(--paper), var(--key) 60%);
  box-shadow: inset 0 0.5px 0 var(--paper), 0 calc(var(--u) * 0.1) 0 var(--key-side), 0 calc(var(--u) * 0.13) 0 var(--key-deep), 0 calc(var(--u) * 0.2) calc(var(--u) * 0.14) var(--shade);
}
.key::after {
  background: radial-gradient(circle, var(--ink) 0 13%, transparent 14.5%), linear-gradient(160deg, var(--lemon-hi), var(--lemon) 60%);
  box-shadow: 0 calc(var(--u) * 0.1) 0 var(--lemon-side), 0 calc(var(--u) * 0.13) 0 var(--lemon-side);
  opacity: 0; transition: opacity var(--t-tint) linear;
}
.key[data-t="l"]::after { opacity: 1; }
.key[data-off] { opacity: 0; scale: 0.4; }
.board--live .tray { cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .js .board[data-phase="boot"] .key, .board[data-phase="down"] .key {
    translate: calc(var(--hx) * var(--u)) calc(var(--hy) * var(--u)); rotate: var(--hr); scale: 1; opacity: 1;
  }
  .board[data-phase="down"] .key {
    transition: translate var(--t-fall) var(--ease-fall) var(--hd), rotate var(--t-fall) var(--ease-fall) var(--hd), scale var(--t-fall) var(--ease-fall) var(--hd), opacity var(--t-tint) linear;
  }
  .board[data-phase="up"] .key {
    transition: translate var(--t-build) var(--spring-travel) var(--d, 0ms), rotate var(--t-build) var(--spring-travel) var(--d, 0ms), scale var(--t-build) var(--spring-travel) var(--d, 0ms), opacity var(--t-tint) linear var(--d, 0ms);
  }
  .board--live .grid { transition: translate var(--t-press) var(--spring-press); }
  .board--live .tray:active .grid { translate: 0 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .board--live .grid { transition: opacity var(--t-tint) linear; }
  .board[data-phase="down"] .grid { opacity: 0; }
}
.tag {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  width: calc(100% - 2 * var(--s4)); margin-top: calc(var(--s4) * -1);
  padding: var(--s2) var(--s2) var(--s2) var(--s5); border-radius: var(--r-md);
  box-shadow: 0 0 0 1px var(--rule), 0 12px 24px -12px var(--shade);
}
.tag-text { display: grid; gap: 2px; min-width: 0; }
.tag-name { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.well { padding: var(--s3); border-radius: var(--r-md); background: var(--blue-600); }
.well .board { width: 100%; }


/* Chapters: label -> title -> lead, then the content */
.chapter { padding-block: calc(var(--chapter-gap) / 2); }
.hero + .chapter { padding-top: var(--chapter-gap); }
.chapter--ink { margin-block: calc(var(--chapter-gap) / 2); padding-block: var(--chapter-gap); border-radius: var(--r-lg); }
.chapter-head { display: grid; gap: var(--s5); max-width: 46rem; margin-bottom: var(--s16); }
.sheet { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--paper); }
.caption { font-size: 0.9375rem; font-weight: 500; line-height: 1.45; color: var(--fg-2); }

/* Product module: keyword -> title -> body -> graphic, the flow goes underneath */
.products { display: grid; gap: var(--s8); }
.product { display: grid; gap: var(--s10) var(--s12); padding: clamp(var(--s6), 4.4vw, var(--s16)); }
.product-text { display: grid; gap: var(--s6); align-content: start; }
.product-head { display: grid; gap: var(--s3); justify-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  display: inline-flex; align-items: center; min-height: 32px; padding-inline: var(--s3);
  border: 1px solid var(--rule); border-radius: var(--r-full);
  font-size: 0.9375rem; font-weight: 500; color: var(--fg-2);
}
.points { display: grid; gap: var(--s5); }
.points > div { display: grid; gap: var(--s1); }
.points dd { max-width: 36rem; color: var(--fg-2); }
.product-fig { display: grid; gap: var(--s3); align-content: start; }
.product-fig .well { width: min(100%, 17rem); }
.product-fig .caption { max-width: 17rem; }
.product-flow { grid-column: 1 / -1; display: grid; gap: var(--s5); padding-top: var(--s8); border-top: 1px solid var(--rule); }
@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr) auto; }
  .product-fig .well { width: clamp(15rem, 22vw, 19rem); }
  .product-fig .caption { max-width: 19rem; }
}

/* Flow: numbered cells joined by arrows */
.flow { --gap: var(--s8); display: grid; gap: var(--gap); }
.flow-step {
  position: relative; display: grid; gap: var(--s2); align-content: start;
  padding: var(--s5); border: 1px solid var(--edge); border-radius: var(--r-sm);
}
.flow-step p { color: var(--fg-2); }
.flow[data-arrows] .flow-step + .flow-step::before {
  content: ""; position: absolute; left: var(--s5); top: calc(var(--gap) / -2 - 10px);
  width: 20px; height: 20px; rotate: 90deg; background: var(--fg);
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
}
.flow:not([data-arrows]) { --gap: var(--s3); }
@media (min-width: 760px) {
  .flow { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .flow[data-arrows] .flow-step + .flow-step::before { left: calc(var(--gap) / -2 - 10px); top: 50%; translate: 0 -50%; rotate: 0deg; }
}

/* Pipeline: the one ink chapter */
.pipe { display: grid; gap: var(--s4); }
.pipe-rail {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4);
  padding: var(--s4) var(--s5); border-radius: var(--r-sm);
  background: var(--lemon); color: var(--ink);
}
.pipe-rail .label { color: var(--ink); }
.pipe-rail p { font-weight: 600; }
.pipe-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: var(--s4); }
.pipe-step {
  display: grid; gap: var(--s3); align-content: start; padding: var(--s6);
  border: 1px solid var(--edge); border-radius: var(--r-sm); background: var(--tint);
}
.pipe-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.pipe-top::after {
  content: ""; width: 20px; height: 20px; background: var(--fg);
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
}
.pipe-step:last-child .pipe-top::after { display: none; }
.pipe-art { display: grid; gap: var(--s2); margin-top: var(--s2); }
.lanes { display: grid; gap: var(--s2); }
.lanes li, .frames li {
  display: flex; align-items: center; min-height: 32px; padding-inline: var(--s3);
  border: 1px solid var(--edge); border-radius: var(--r-xs);
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.frames { display: flex; align-items: flex-end; gap: var(--s2); }
.frames li { justify-content: center; }
.frames li:first-child { flex: 1; min-height: 64px; }
.frames li:last-child { min-height: 88px; padding-inline: var(--s2); }
.pipe-note { display: grid; gap: var(--s2); padding: var(--s6); border: 1.5px dashed var(--edge); border-radius: var(--r-sm); }


/* Two-up rows that stack on their own */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr)); gap: var(--s12) var(--s16); align-items: start; }
.stack { display: grid; gap: var(--s5); align-content: start; }
.rows > li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4);
  padding-block: var(--s4); border-top: 1px solid var(--rule);
}
.rows > li:last-child { border-bottom: 1px solid var(--rule); }
.strengths { display: grid; gap: var(--s3); }
.strength { display: grid; gap: var(--s2); padding: var(--s6); border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--paper); }
.strength p { color: var(--fg-2); }

/* Planned: dashed means not built */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); gap: var(--s5); }
.plan { display: grid; gap: var(--s3); align-content: start; padding: var(--s8); border: 1.5px dashed var(--rule); border-radius: var(--r-md); }
.plan p:not(.label) { color: var(--fg-2); }

/* Company */
.entry {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); gap: var(--s6) var(--s12);
  align-items: start; padding-block: var(--s12); border-top: 1px solid var(--rule);
}
.entry-head { display: grid; gap: var(--s3); }
.entry-body { display: grid; gap: var(--s6); }
.entry-body > p { max-width: 36rem; color: var(--fg-2); }
.traits { display: grid; gap: var(--s3); }
.traits li { position: relative; padding-left: var(--s6); }
.traits li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 3px; background: var(--ink); }
.loop-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.loop-step { display: grid; gap: var(--s2); align-content: start; padding: var(--s5); border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--paper); }
.loop-back { display: inline-flex; align-items: center; gap: var(--s2); }
.facts-sheet { padding: var(--s2) clamp(var(--s5), 4vw, var(--s10)); }
.facts > div { display: grid; grid-template-columns: minmax(9rem, 0.4fr) minmax(0, 1fr); gap: var(--s1) var(--s6); align-items: baseline; padding-block: var(--s4); }
.facts > div + div { border-top: 1px solid var(--rule); }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }
.contact { display: grid; gap: var(--s6); justify-items: start; margin-top: var(--s16); padding-top: var(--s16); border-top: 1px solid var(--rule); }
.address a { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.14em; border-radius: var(--s1); }
.address a:hover { text-decoration-thickness: 0.12em; }
html:not(.js) [data-copy] { display: none; }

/* Footer */
.foot { margin-top: calc(var(--chapter-gap) / 2); padding: var(--s12) 0 var(--s10); border-top: 1px solid var(--rule); }
.foot > .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); gap: var(--s8) var(--s16); align-items: start; }
.legal { display: grid; gap: var(--s1); font-style: normal; font-size: 0.9375rem; font-weight: 500; line-height: 1.5; color: var(--fg-2); }
.legal strong { font-weight: 700; color: var(--fg); }
.foot-nav { display: flex; flex-wrap: wrap; gap: var(--s1); margin-inline: calc(var(--s3) * -1); }
.foot-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s3); border-radius: var(--r-full);
  font-size: 0.9375rem; font-weight: 500; color: var(--fg-2);
  transition: color var(--t-tint), background-color var(--t-tint);
}
.foot-nav a:hover { color: var(--fg); background: var(--wash); }

/* Text page */
.page { padding: calc(var(--nav-h) + var(--s24)) 0 0; }
.prose { display: grid; gap: var(--s5); max-width: 62ch; }
.prose .h4 { margin-top: var(--s6); }
.prose p { color: var(--fg-2); }

/* Entrances */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; translate: 0 14px;
    transition: opacity var(--t-enter) var(--ease-out), translate var(--t-enter) var(--ease-out);
    transition-delay: calc(var(--i, 0) * 60ms);
  }
  .js [data-reveal].in { opacity: 1; translate: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 0; transition: opacity var(--t-std) linear; }
  .js [data-reveal].in { opacity: 1; }
}

@media (max-width: 479px) {
  .loop-steps { grid-template-columns: minmax(0, 1fr); }
  .facts > div { grid-template-columns: minmax(0, 1fr); }
  .tag { width: 100%; padding-left: var(--s4); }
}
