/* negaflow — product page
   One column width. Even column counts only. Glass on the floating layer only. */

/* ── tokens ─────────────────────────────────────────────── */

:root {
  --ink:            #0b0b0c;
  --ink-2:          rgba(11, 11, 12, .62);
  --ink-3:          rgba(11, 11, 12, .42);
  --paper:          #ffffff;
  --paper-2:        #f4f4f6;
  --hairline:       rgba(0, 0, 0, .12);
  --hairline-soft:  rgba(0, 0, 0, .055);
  --fill:           rgba(0, 0, 0, .035);

  /* Regular glass: frosted, adaptive, legible over anything */
  --glass:          rgba(255, 255, 255, .60);
  --glass-strong:   rgba(255, 255, 255, .82);
  --glass-rim:      rgba(0, 0, 0, .08);
  --glass-spec:     rgba(255, 255, 255, .95);
  --glass-spec-low: rgba(255, 255, 255, .28);
  --glass-drop:     0 16px 40px -16px rgba(0, 0, 0, .20);
  --sheen:          rgba(255, 255, 255, .55);

  --shot-drop:      0 32px 76px -28px rgba(0, 0, 0, .30), 0 3px 12px -6px rgba(0, 0, 0, .15);

  /* one gutter, one column width, one section rhythm */
  --gutter:    clamp(20px, 5vw, 40px);
  --wrap:      1120px;
  --section-y: clamp(72px, 8.5vw, 112px);
  --row-y:     clamp(18px, 1.6vw, 22px);
  --col-gap:   clamp(24px, 3.4vw, 44px);

  --measure:     1;
  --ease:        cubic-bezier(.22, .61, .36, 1);
  --ease-spring: cubic-bezier(.32, .72, 0, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
          "Apple SD Gothic Neo", "Pretendard", "Hiragino Sans", "Yu Gothic",
          "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

html[data-lang="ko"],
html[data-lang="ja"],
html[data-lang="zh"] { --measure: 1.8; }

[data-theme="dark"] {
  --ink:            #f4f4f6;
  --ink-2:          rgba(244, 244, 246, .64);
  --ink-3:          rgba(244, 244, 246, .40);
  --paper:          #000000;
  --paper-2:        #0b0b0d;
  --hairline:       rgba(255, 255, 255, .14);
  --hairline-soft:  rgba(255, 255, 255, .07);
  --fill:           rgba(255, 255, 255, .045);

  --glass:          rgba(28, 28, 31, .56);
  --glass-strong:   rgba(58, 58, 63, .78);
  --glass-rim:      rgba(255, 255, 255, .11);
  --glass-spec:     rgba(255, 255, 255, .32);
  --glass-spec-low: rgba(255, 255, 255, .05);
  --glass-drop:     0 16px 44px -16px rgba(0, 0, 0, .8);
  --sheen:          rgba(255, 255, 255, .15);

  --shot-drop:      0 36px 92px -32px rgba(0, 0, 0, .95), 0 0 0 .5px rgba(255, 255, 255, .09);
}

/* ── base ───────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(15.5px, .45vw + 14.4px, 17px);
  line-height: 1.65;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .45s var(--ease), color .45s var(--ease);
}

/* ── line breaking ──────────────────────────────────────── */
/* Never split a word. Latin wraps at spaces, Korean wraps between 어절,
   Japanese and Chinese wrap per character under strict line-break rules. */

body { word-break: normal; overflow-wrap: normal; hyphens: none; }

/* Korean: break between 어절 only */
[data-lang="ko"] body { word-break: keep-all; }

/* Japanese and Chinese: strict kinsoku, and break at phrase boundaries
   instead of mid-word where the browser supports it */
[data-lang="ja"] body,
[data-lang="zh"] body {
  line-break: strict;
  word-break: normal;
  word-break: auto-phrase;
}

/* only these may break mid-token, because they have no spaces */
code { overflow-wrap: normal; word-break: normal; }
.link, .pkg code { overflow-wrap: anywhere; word-break: break-all; }
[data-lang="ko"] code { word-break: normal; }

h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

/* ── elements ───────────────────────────────────────────── */

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .88em; letter-spacing: 0; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.028em; line-height: 1.1; }
h2 { font-size: clamp(27px, 3.2vw + 12px, 48px); }
h3 { font-size: clamp(16.5px, .3vw + 15.5px, 18px); letter-spacing: -.018em; }
p, ul, ol { margin: 0; }

::selection { background: var(--ink); color: var(--paper); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  padding: 12px 18px; background: var(--paper); color: var(--ink);
}
.skip:focus { left: 0; }

/* reachable by a screen reader, invisible on screen */
.vh {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; white-space: nowrap;
  clip-path: inset(50%);
}

/* the single content column — every section uses it */
.wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
}

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

.kicker {
  font-size: 11.5px;
  font-weight: 590;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

/*
 * Reading measures are written in `ch`, the width of "0". A CJK glyph is close
 * to twice that, so a measure tuned for Latin cuts Korean, Japanese and Chinese
 * lines roughly in half and wraps paragraphs that had room to spare.
 * --measure widens those measures for CJK; Latin keeps its own value.
 */
.lede { font-size: clamp(16px, .7vw + 14.5px, 19px); color: var(--ink-2); max-width: calc(60ch * var(--measure)); }
h2 + .lede { margin-top: clamp(14px, 1.6vw, 20px); }
.fine { font-size: clamp(12.5px, .25vw + 12px, 13.5px); line-height: 1.62; color: var(--ink-3); }
.sub  { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* ── ambience ───────────────────────────────────────────── */

.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] .grain { opacity: .05; }

.glow {
  position: fixed; inset: -18% -10% auto -10%; height: 88vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(58% 48% at 50% 0%, rgba(0, 0, 0, .07), transparent 70%),
    radial-gradient(38% 38% at 84% 16%, rgba(0, 0, 0, .045), transparent 72%);
  transition: background .45s var(--ease);
}
[data-theme="dark"] .glow {
  background:
    radial-gradient(56% 44% at 50% 0%, rgba(255, 255, 255, .10), transparent 70%),
    radial-gradient(36% 36% at 84% 14%, rgba(255, 255, 255, .045), transparent 74%);
}

/* ── glass (navigation layer only) ──────────────────────── */

.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  box-shadow:
    inset 0 .5px 0 var(--glass-spec),
    inset 0 -.5px 0 var(--glass-spec-low),
    0 0 0 .5px var(--glass-rim),
    var(--glass-drop);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--paper-2); }
}

.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, -20%),
              var(--sheen), transparent 62%);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.glass:hover::after { opacity: 1; }

/* ── nav ────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 0; right: 0;
  z-index: 100;
  display: flex; justify-content: center;
  padding-inline: var(--gutter);
}

.nav-inner {
  display: flex; align-items: center; gap: 10px;
  width: min(100%, var(--wrap));
  padding: 7px 8px 7px 15px;
  border-radius: 999px;
  transition: padding .5s var(--ease-spring), background .45s var(--ease);
}
.nav.scrolled .nav-inner { padding: 5px 8px 5px 13px; }

.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; letter-spacing: -.02em;
  text-decoration: none; white-space: nowrap;
}
.brand img { border-radius: 6px; }

.nav-links {
  display: flex; gap: 2px; margin-inline: auto;
  min-width: 0;
  font-size: 13.5px; color: var(--ink-2);
}
.nav-links a {
  flex: 0 0 auto;
  padding: 6px 11px; border-radius: 999px; text-decoration: none;
  white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.nav-links a:hover { background: var(--hairline-soft); color: var(--ink); }
/* on a topic page the bar navigates, so it marks where you already are */
.nav-links a[aria-current="page"] { background: var(--fill); color: var(--ink); }

.nav-tools { display: flex; align-items: center; gap: 7px; }

/* the capsule never squeezes its own ends — the section row gives way first */
.brand, .nav-tools { flex: 0 0 auto; }

/* ── compact bar and its menu ───────────────────────────
 *
 * The bar shows every section or none of them. As soon as one item would be
 * clipped — measured in app.js, because label widths follow the language —
 * the row is swapped for the button that opens the full-screen menu, so the
 * links are never half visible and never scroll sideways inside the capsule.
 */

.nav-burger {
  appearance: none; border: 0; background: none; cursor: pointer; font: inherit;
  display: none; align-items: center; justify-content: center;
  width: 33px; height: 33px;
  color: var(--ink-2);
  transition: color .3s var(--ease);
}
.nav-burger:hover { color: var(--ink); }

.nav-burger-bars {
  position: relative;
  display: block; width: 15px; height: 9px;
}
.nav-burger-bars::before,
.nav-burger-bars::after {
  content: ""; position: absolute; left: 0; right: 0;
  height: 1.2px; border-radius: 1px;
  background: currentColor;
}
.nav-burger-bars::before { top: 0; }
.nav-burger-bars::after { bottom: 0; }

.nav.is-compact .nav-links { display: none; }
.nav.is-compact .nav-burger { display: inline-flex; }
/* the section row carried the free space, so without it the tools take over */
.nav.is-compact .nav-tools { margin-left: auto; }

.nav-sheet {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper);
  opacity: 0;
  transition: opacity .32s var(--ease);
}
.nav-sheet[hidden] { display: none; }
.nav-sheet.is-open { opacity: 1; }
/* opening the sheet moves focus here, and that move is not worth a ring */
.nav-sheet:focus { outline: none; }

.nav-sheet-bar {
  display: flex; justify-content: flex-end;
  flex: 0 0 auto;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter) 0;
}
.nav-sheet-close {
  appearance: none; border: 0; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -10px;
  color: var(--ink-2);
  transition: color .3s var(--ease);
}
.nav-sheet-close:hover { color: var(--ink); }

.nav-sheet-nav {
  display: flex; flex-direction: column; align-items: flex-start;
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
  padding-block: clamp(24px, 5vw, 46px) clamp(48px, 12vw, 96px);
}
.nav-sheet-nav a {
  padding-block: clamp(9px, 1.6vw, 13px);
  font-size: clamp(23px, 4.4vw, 30px);
  font-weight: 600; letter-spacing: -.03em; line-height: 1.24;
  color: var(--ink); text-decoration: none;
  opacity: 0; transform: translateY(12px);
  transition: opacity .4s var(--ease), transform .55s var(--ease-spring);
}
.nav-sheet.is-open .nav-sheet-nav a { opacity: 1; transform: none; }
.nav-sheet-nav a[aria-current="page"]::after {
  content: ""; display: inline-block; vertical-align: middle;
  width: 6px; height: 6px; margin-left: 11px;
  border-radius: 50%; background: currentColor; opacity: .4;
}

body.menu-open { overflow: hidden; overscroll-behavior: none; }

/* ── segmented controls ─────────────────────────────────── */

.seg {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: var(--fill);
  box-shadow: inset 0 0 0 .5px var(--glass-rim);
}
.seg button {
  position: relative; z-index: 1;
  appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 11px; min-width: 32px; height: 27px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .35s var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"],
.seg button[aria-checked="true"] { color: var(--ink); }

.seg-pill {
  position: absolute; top: 3px; left: 0; height: calc(100% - 6px);
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: inset 0 .5px 0 var(--glass-spec), 0 1px 3px rgba(0, 0, 0, .16);
  transition: transform .55s var(--ease-spring), width .55s var(--ease-spring);
  will-change: transform, width;
}
#scheme button[data-scheme="auto"] span { font-size: 12px; font-weight: 650; }

/* ── language menu ──────────────────────────────────────── */

.lang { position: relative; }
.lang-btn {
  appearance: none; border: 0; cursor: pointer; font: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 11px; height: 33px;
  border-radius: 999px;
  font-size: 13px; color: var(--ink-2);
  background: var(--fill);
  box-shadow: inset 0 0 0 .5px var(--glass-rim);
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn svg { opacity: .55; transition: transform .35s var(--ease); }
.lang-btn:hover svg { opacity: .8; }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.lang-globe { stroke-linecap: round; stroke-linejoin: round; }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  margin: 0; padding: 6px; list-style: none;
  min-width: 158px;
  border-radius: 16px;
  transform-origin: top right;
  animation: menu-in .3s var(--ease-spring);
}
.lang-menu[hidden] { display: none; }
@keyframes menu-in {
  from { opacity: 0; transform: scale(.94) translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.lang-menu button {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--ink-2);
  display: block; width: 100%; text-align: left;
  padding: 8px 11px; border-radius: 10px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang-menu button:hover { background: var(--hairline-soft); color: var(--ink); }
.lang-menu button[aria-selected="true"] { color: var(--ink); font-weight: 560; }

/* ── hero ───────────────────────────────────────────────── */

.hero { padding-top: clamp(112px, 13vh, 168px); padding-bottom: 0; text-align: center; }

.hero-icon {
  width: clamp(84px, 9vw, 108px); height: auto;
  margin: 0 auto clamp(20px, 2.4vw, 26px);
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, .3));
}

.hero-title {
  font-size: clamp(46px, 8.4vw, 100px);
  font-weight: 600; letter-spacing: -.045em; line-height: 1;
  margin-bottom: clamp(16px, 2vw, 22px);
}

.hero-tagline {
  font-size: clamp(17px, 1vw + 14px, 21px);
  line-height: 1.55; color: var(--ink-2);
  max-width: 46ch; margin: 0 auto clamp(26px, 3vw, 34px);
  letter-spacing: -.018em;
}

.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: -.012em;
  text-decoration: none; white-space: nowrap;
  background: var(--fill);
  box-shadow: inset 0 0 0 .5px var(--glass-rim);
  transition: transform .3s var(--ease), background .3s var(--ease), opacity .3s var(--ease);
}
.btn:hover { transform: translateY(-1px); background: var(--hairline-soft); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .55);
}
.btn-primary:hover { background: var(--ink); opacity: .88; }

.hero-req { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); }

.hero-stage { margin-top: clamp(44px, 6.5vw, 76px); perspective: 1600px; }
.frame { transform-style: preserve-3d; will-change: transform; }
.frame img {
  width: 100%; height: auto;
  border-radius: clamp(6px, .8vw, 12px);
  box-shadow: var(--shot-drop);
}

/* ── story ──────────────────────────────────────────────── */

.story .wrap { max-width: var(--wrap); }
.story p {
  font-size: clamp(16.5px, .8vw + 14px, 20px);
  line-height: 1.7; color: var(--ink-2);
  letter-spacing: -.016em;
}
.story-gap {
  display: block;
  height: .85em;
}
.story p + p { margin-top: 0; }
.story-mark {
  margin-top: 0 !important;
  padding-top: clamp(22px, 2.8vw, 30px);
  border-top: 0;
  color: var(--ink) !important;
  font-weight: 500;
}

/* ── product core ───────────────────────────────────────── */

.product-core { padding-bottom: var(--section-y); }
.core-intro {
  max-width: calc(72ch * var(--measure));
  margin-inline: auto;
  font-size: clamp(17px, .75vw + 14px, 20px);
  line-height: 1.7;
  text-align: center;
  color: var(--ink-2);
}
.core-intro b { color: var(--ink); font-weight: 600; }
.core-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(36px, 4.5vw, 56px);
  border-top: .5px solid var(--hairline);
  border-left: .5px solid var(--hairline);
}
.core-item {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  min-height: 160px;
  padding: clamp(22px, 2.8vw, 32px);
  border-right: .5px solid var(--hairline);
  border-bottom: .5px solid var(--hairline);
  text-decoration: none;
  transition: background .25s var(--ease);
}
.core-item:hover { background: var(--fill); }
.core-index {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.core-item strong {
  align-self: end;
  font-size: clamp(18px, .8vw + 15px, 22px);
  letter-spacing: -.025em;
}
.core-item > span:last-child {
  color: var(--ink-2);
  font-size: 13.5px;
}

/* ── Chroma Engine focus ────────────────────────────────── */

.chroma {
  background:
    radial-gradient(55% 36% at 86% 3%, var(--hairline-soft), transparent 72%),
    var(--paper-2);
}
.base-measure {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) 1.2fr;
  gap: var(--col-gap);
  align-items: start;
  margin-top: clamp(34px, 4.2vw, 52px);
  padding: clamp(22px, 3vw, 34px);
  border: .5px solid var(--hairline);
  border-radius: 18px;
  background: var(--paper);
}
.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
}
.base-measure strong {
  display: block;
  font-size: clamp(18px, 1vw + 15px, 24px);
  line-height: 1.25;
  letter-spacing: -.028em;
}
.base-measure p {
  color: var(--ink-2);
  font-size: clamp(14px, .35vw + 13px, 15.5px);
}
.target-heading {
  margin-top: clamp(46px, 6vw, 72px);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
}
.targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
  border-top: .5px solid var(--hairline);
  border-left: .5px solid var(--hairline);
}
.target {
  display: flex;
  min-height: 116px;
  padding: clamp(18px, 2.2vw, 24px);
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  border-right: .5px solid var(--hairline);
  border-bottom: .5px solid var(--hairline);
  background: var(--paper);
}
.target-primary {
  color: var(--paper);
  background: var(--ink);
}
.target code {
  font-size: clamp(15px, .65vw + 13px, 18px);
  font-weight: 650;
  letter-spacing: .04em;
  color: inherit;
}
.target span {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.45;
}
.target-primary span { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.target-context {
  margin-top: clamp(22px, 2.6vw, 30px);
}
.target-context > p:first-child {
  color: var(--ink-2);
  font-size: clamp(14.5px, .4vw + 13.5px, 16px);
}
.target-context .fine {
  max-width: none;
  margin-top: 8px;
  font-size: 10.5px;
  white-space: nowrap;
}

.chroma .notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  max-width: none;
  border-top: .5px solid var(--hairline);
  border-left: .5px solid var(--hairline);
}
.chroma .notes p {
  padding: clamp(18px, 2.4vw, 26px);
  border-right: .5px solid var(--hairline);
  border-bottom: .5px solid var(--hairline);
}

.story-grid,
.gm-grid,
.dataset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: .5px solid var(--hairline);
  border-left: .5px solid var(--hairline);
}
.story-grid > *,
.gm-card,
.dataset-card {
  min-width: 0;
  padding: clamp(22px, 2.8vw, 30px);
  border-right: .5px solid var(--hairline);
  border-bottom: .5px solid var(--hairline);
}
.gm-rgb-focus {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: var(--col-gap);
  align-items: end;
  margin-top: clamp(34px, 4.4vw, 52px);
  padding: clamp(24px, 3.2vw, 38px);
  border-radius: 18px;
  color: var(--paper);
  background: var(--ink);
}
.gm-rgb-focus .sub {
  margin: 0 0 12px;
  color: color-mix(in srgb, var(--paper) 58%, transparent);
}
.gm-rgb-focus h3 {
  max-width: 18ch;
  font-size: clamp(23px, 1.8vw + 16px, 34px);
  line-height: 1.15;
  letter-spacing: -.035em;
  color: inherit;
}
.gm-rgb-focus > p {
  color: color-mix(in srgb, var(--paper) 72%, transparent);
  font-size: clamp(14.5px, .45vw + 13.4px, 16px);
}
.gm-rgb-focus > p b {
  display: block;
  margin-bottom: 8px;
  color: var(--paper);
  font-weight: 620;
}

/* ── image compare shell ────────────────────────────────── */
/* shared by the Chroma Engine target picker and the GrainMend slider */

.cmp-stage { margin-top: clamp(28px, 4vw, 48px); }

/*
 * One glass sheet per widget: the photograph and its controls sit on a single
 * translucent card, reusing the same .glass treatment as the nav bar. Apple's
 * guidance is one primary glass surface per view and no stacked translucent
 * panes, so the photo frame inside stays opaque and the capsule is a plain
 * tinted fill rather than a second pane of glass.
 */
.cmp-card {
  --cmp-pad: clamp(12px, 1.4vw, 16px);
  padding: var(--cmp-pad);
  /* concentric with the frame inside: outer radius = inner radius + padding */
  border-radius: calc(18px + var(--cmp-pad));
}

.cmp {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shot-drop);
}

/* inside the card the frame only needs a rim; the card already casts the drop */
.cmp-card .cmp {
  box-shadow: 0 0 0 .5px var(--glass-rim), 0 8px 22px -14px rgba(0, 0, 0, .55);
}

.cmp-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

/* drag or swipe the picture sideways to move between the stills */
.tg-frame, .pl-frame {
  /* the gap that shows between two stills while the strip is on the move */
  --seam: 12px;
  cursor: grab; touch-action: pan-y;
}
.tg-frame.is-swiping, .pl-frame.is-swiping { cursor: grabbing; }
/* while a finger is down the stills track it instead of easing */
.is-swiping .tg-img, .is-swiping .pl-img { transition: opacity .34s var(--ease); }
/* the still that wraps round the strip is put in place, not walked there */
.tg-img.is-jump, .pl-img.is-jump { transition: none; }

.cmp-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* corner label */
.cmp-tag {
  position: absolute; top: 13px; z-index: 4;
  pointer-events: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(12, 12, 14, .55);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .92);
  font-size: 10px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
  transition: opacity .3s var(--ease);
}
.cmp-tag-l { left: 13px; }
.cmp-tag-r { right: 13px; }

/* control bar: sits under the frame, centred. It is on the page background
   rather than over a photograph, so it uses the header segmented control as-is. */
.cmp-bar {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: clamp(14px, 1.6vw, 18px);
}

/* Two segmented controls, always on one line. When the pair no longer fits,
   .is-compact drops the "Original" tab and the remaining one reads as a
   pressed / unpressed toggle. Narrower still, the left control scrolls. */
.cmp-bar-row {
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: center;
  gap: 10px;
  max-width: 100%;
}
.cmp-bar-row > .cmp-seg { min-width: 0; }

.cmp-seg {
  padding: 4px;
  max-width: 100%;
  /* long localised labels scroll rather than overflow the frame */
  overflow: auto hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.cmp-seg::-webkit-scrollbar { display: none; }
.cmp-seg button {
  flex: none; /* a squeezed control scrolls; it never compresses its labels */
  height: 30px;
  padding: 0 14px;
  font-size: 13px; font-weight: 550;
}
.cmp-seg .seg-pill {
  top: 4px;
  height: calc(100% - 8px);
}

.cmp-hint {
  margin: 0;
  max-width: calc(46ch * var(--measure));
  text-align: center;
  font-size: clamp(12.5px, .25vw + 12px, 13.5px);
  line-height: 1.55;
  color: var(--ink-3);
  transition: opacity .25s var(--ease);
}
.cmp-hint[hidden] { display: none; }

@media (max-width: 640px) {
  .cmp-seg button { padding: 0 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmp-seg .seg-pill { transition: none; }
}

/* ── chroma engine: development target picker ───────────── */
/* five renders of one frame; only the colour treatment differs */

.tg-frame { aspect-ratio: 2000 / 1336; }

.tg-img {
  opacity: 0;
  transform: translateX(calc(var(--rel, 0) * (100% + var(--seam)) + var(--drag, 0px)));
  transition: opacity .34s var(--ease), transform .52s var(--ease-spring);
}
.tg-img.is-on { opacity: 1; }

.tg-code {
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

/* the auto-correction toggle is secondary to the target picker */
.tg-variant-seg { flex: none; }
.tg-variant { text-transform: none; letter-spacing: .02em; }

/* collapsed to one button: the pill is the "on" state, so it has to reach the
   button's own edges rather than the 4px inset the multi-tab controls use */
.is-compact .tg-variant-seg [data-variant="orig"] { display: none; }
.is-compact .tg-variant-seg .seg-pill { transition: transform .35s var(--ease), width .35s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .tg-img { transition: none; }
}

/* ── print: layout picker ───────────────────────────────── */
/*
 * The stills are Print-workspace captures, sheet plus rulers, all on the same
 * #121212 backdrop. `contain` on that exact colour lets the contact sheet and
 * the single-page layouts share one frame with no visible letterbox.
 */

.pl-frame {
  aspect-ratio: 13 / 10;
  background: #121212;
}
.pl-frame .cmp-img { object-fit: contain; }

.pl-img {
  opacity: 0;
  transform: translateX(calc(var(--rel, 0) * (100% + var(--seam)) + var(--drag, 0px)));
  transition: opacity .34s var(--ease), transform .52s var(--ease-spring);
}
.pl-img.is-on { opacity: 1; }

.pl-note { margin-top: clamp(18px, 2vw, 24px); }

@media (prefers-reduced-motion: reduce) {
  .pl-img { transition: none; }
}

/* ── grainmend before / after slider ────────────────────── */
/*
 * Every mode shares one 2000x1339 viewport. The crop / brush stills are a
 * 436x266 region of that frame, so switching modes zooms into (or out of)
 * that region rather than cutting to an unrelated picture. The zoom itself
 * runs from app.js (GM_ZOOM).
 */

.gm-frame {
  aspect-ratio: 2000 / 1339;
  cursor: ew-resize;
  touch-action: pan-y;
}

.gm-zoom {
  position: absolute; inset: 0;
  transform-origin: 50% 50%;
}

.gm-after  { z-index: 1; }
.gm-before {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--gm-pos, 50%)) 0 0);
}

/* vertical split line + drag knob */
.gm-divider {
  position: absolute; top: 0; bottom: 0;
  left: var(--gm-pos, 50%);
  z-index: 5;
  width: 1px;
  margin-left: -.5px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .22), 0 0 14px rgba(0, 0, 0, .35);
  cursor: ew-resize;
  outline: none;
  transition: opacity .3s var(--ease);
}
.gm-divider::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: -14px; right: -14px;
}

.gm-knob {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #14141a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35), inset 0 0 0 .5px rgba(0, 0, 0, .08);
  transition: transform .35s var(--ease-spring), background .25s var(--ease);
}
.gm-frame:hover .gm-knob { transform: translate(-50%, -50%) scale(1.06); }
.cmp.is-dragging .gm-knob { transform: translate(-50%, -50%) scale(.94); }
.gm-divider:focus-visible .gm-knob { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55), 0 2px 10px rgba(0, 0, 0, .35); }

.cmp.is-dragging { cursor: ew-resize; }

/* the divider and labels are meaningless mid-gesture */
.cmp.is-dragging .cmp-tag,
.cmp.is-zooming .cmp-tag,
.cmp.is-zooming .gm-divider { opacity: 0; }

@media (max-width: 640px) {
  .gm-knob { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .gm-knob { transition: none; }
}

.tools { margin-top: clamp(18px, 2.4vw, 26px); }
.gm-grid { margin-top: clamp(34px, 4vw, 48px); }
.gm-card p,
.dataset-card p {
  color: var(--ink-2);
  font-size: clamp(14px, .35vw + 13.2px, 15.5px);
}
.gm-card h3 {
  margin-bottom: 10px;
  font-size: clamp(16px, .45vw + 14.8px, 18px);
  line-height: 1.3;
}
.gm-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(18px, 2.4vw, 26px);
  border-top: .5px solid var(--hairline);
  border-left: .5px solid var(--hairline);
}
.gm-secondary > * {
  min-width: 0;
  padding: clamp(18px, 2.4vw, 26px);
  border-right: .5px solid var(--hairline);
  border-bottom: .5px solid var(--hairline);
}
.gm-ir-card h3 {
  margin-bottom: 8px;
  font-size: 14px;
}
.gm-ir-card p {
  color: var(--ink-3);
  font-size: clamp(12.5px, .25vw + 12px, 13.5px);
}
.gm-disclaimer {
  max-width: none;
  margin: 0;
}
.dataset-grid { margin-top: clamp(32px, 4vw, 46px); }

/* ── view detail ────────────────────────────────────────── */

.view-detail {
  display: flex;
  align-items: baseline;
  gap: 12px;
  max-width: calc(72ch * var(--measure));
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 13px;
}
.view-detail a {
  flex: 0 0 auto;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.view-detail a:hover { color: var(--ink); border-color: var(--ink); }

/* ── shared row grid: 1 or 2 columns, never 3 ───────────── */

.rows {
  display: grid; grid-template-columns: 1fr;
  padding: 0; list-style: none;
  border-top: .5px solid var(--hairline);
}
.rows > * {
  padding-block: var(--row-y);
  border-bottom: .5px solid var(--hairline);
}
@media (min-width: 720px) {
  .rows { grid-template-columns: 1fr 1fr; }
  .rows > *:nth-child(odd)  { padding-right: var(--col-gap); }
  .rows > *:nth-child(even) { padding-left: var(--col-gap); border-left: .5px solid var(--hairline); }
}

/* ── views: one block per screen ────────────────────────── */

.view { padding-top: clamp(26px, 3vw, 36px); border-top: .5px solid var(--hairline); }
.view + .view { margin-top: clamp(56px, 7vw, 96px); }
.view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 6vw, 72px) var(--col-gap);
  margin-top: clamp(26px, 3vw, 36px);
}
.view-grid .view {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-top: clamp(22px, 2.6vw, 28px);
}
.view-grid .view + .view { margin-top: 0; }

.view-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  color: var(--ink-3); margin-bottom: 12px;
}
.view h3 { font-size: clamp(21px, 1.4vw + 16px, 28px); letter-spacing: -.026em; }
.view-desc {
  margin-top: 10px;
  max-width: calc(56ch * var(--measure));
  font-size: clamp(14.5px, .4vw + 13.5px, 16px);
  color: var(--ink-2);
}
.view .shot {
  width: 100%; height: auto;
  margin-top: 0;
  border-radius: clamp(5px, .8vw, 12px);
  box-shadow: var(--shot-drop);
  cursor: zoom-in;
  transition: transform .5s var(--ease-spring), box-shadow .5s var(--ease);
}
.shot-wrap {
  width: 100%;
  margin-top: auto;
  padding-top: clamp(22px, 2.8vw, 30px);
}
.view-grid .shot {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
}
/* the settings panel is a smaller, taller window — don't blow it up */
.view .shot-tall {
  max-width: none;
  object-fit: contain;
  background: var(--paper-2);
}

#heroShot { cursor: zoom-in; }

@media (hover: hover) and (pointer: fine) {
  .shot-wrap .shot:hover {
    transform: translateY(-4px) scale(1.006);
    box-shadow: 0 38px 88px -30px rgba(0, 0, 0, .38), 0 5px 16px -8px rgba(0, 0, 0, .2);
  }
}

.shot-wrap .shot:active { transform: translateY(-1px) scale(.996); }

body.lightbox-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, .84);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .36s var(--ease);
}
.shot-lightbox[hidden] { display: none; }
.shot-lightbox.is-open { opacity: 1; }
.shot-lightbox:focus { outline: none; }
.shot-lightbox-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  object-fit: contain;
  border-radius: clamp(6px, .7vw, 10px);
  box-shadow: 0 34px 110px rgba(0, 0, 0, .56);
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── notes ──────────────────────────────────────────────── */

.notes { margin-top: clamp(32px, 4vw, 46px); display: grid; gap: 13px; max-width: calc(60ch * var(--measure)); }
.notes p { font-size: clamp(14.5px, .4vw + 13.5px, 15.5px); color: var(--ink-2); }
.notes b { font-weight: 600; color: var(--ink); }

/* ── grainmend ──────────────────────────────────────────── */

.sub { margin-top: clamp(34px, 4.4vw, 52px); margin-bottom: 14px; }
.tool h3 { margin-bottom: 8px; }
.tool p { font-size: clamp(14px, .35vw + 13.2px, 15px); color: var(--ink-2); line-height: 1.58; }

.ir {
  margin-top: clamp(32px, 4vw, 46px);
  padding-top: clamp(22px, 2.6vw, 28px);
  border-top: .5px solid var(--hairline);
}
.ir h3 { margin-bottom: 10px; }
.ir p { font-size: clamp(14.5px, .4vw + 13.5px, 15.5px); color: var(--ink-2); max-width: calc(60ch * var(--measure)); }
.ir .fine { margin-top: 12px; }

/* ── scanner plugin ─────────────────────────────────────── */

.scanner-plugin {
  padding-top: 0;
  padding-bottom: var(--section-y);
}
.scanner-plugin-panel {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: var(--col-gap);
  align-items: end;
  padding: clamp(24px, 3.2vw, 38px);
  border: .5px solid var(--hairline);
  border-radius: 18px;
  background: var(--paper-2);
}
.scanner-plugin-panel .kicker { margin-bottom: 10px; }
.scanner-plugin-panel h2 {
  font-size: clamp(24px, 2.4vw + 15px, 40px);
  overflow-wrap: anywhere;
}
.scanner-plugin-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 2vw, 22px);
}
.scanner-plugin-copy p {
  max-width: calc(44ch * var(--measure));
  color: var(--ink-2);
  font-size: clamp(15px, .45vw + 14px, 17px);
}
.scanner-plugin-copy b {
  color: var(--ink);
  font-weight: 600;
}
.scanner-plugin-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.scanner-plugin-link,
.topic-more a,
.download .fine a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.scanner-plugin-link,
.topic-more a {
  font-size: 13.5px;
  font-weight: 560;
}
.scanner-plugin-link:hover,
.topic-more a:hover,
.download .fine a:hover { border-bottom-color: var(--ink); }

/* link from an overview section to the page that section has of its own */
.topic-more { margin-top: clamp(14px, 1.6vw, 20px); }
.topic-more a { cursor: pointer; }

/* a topic page promotes its section heading to the heading of the page */
.topic-page h1 { font-size: clamp(27px, 3.2vw + 12px, 48px); }
.topic-page h1 + .lede { margin-top: clamp(14px, 1.6vw, 20px); }

/* ── profiles ───────────────────────────────────────────── */

.stats {
  margin-top: clamp(34px, 4.4vw, 52px);
  display: grid; grid-template-columns: 1fr;
  border-top: .5px solid var(--hairline);
}
.stat { padding-block: clamp(24px, 3vw, 34px); border-bottom: .5px solid var(--hairline); }
.stat .num {
  display: block;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 600; letter-spacing: -.05em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat .lbl { display: block; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
@media (min-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd)  { padding-right: var(--col-gap); }
  .stat:nth-child(even) { padding-left: var(--col-gap); border-left: .5px solid var(--hairline); }
}

/* ── workflow ───────────────────────────────────────────── */

.steps {
  margin-top: clamp(26px, 3.4vw, 36px);
  margin-bottom: clamp(28px, 3.6vw, 40px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0; list-style: none;
  counter-reset: step;
  border-top: .5px solid var(--hairline);
  border-left: .5px solid var(--hairline);
}
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 28px 1fr;
  align-items: baseline;
  min-height: 92px;
  padding: clamp(18px, 2.4vw, 26px);
  border-right: .5px solid var(--hairline);
  border-bottom: .5px solid var(--hairline);
  font-size: clamp(15px, .5vw + 14px, 16.5px);
  color: var(--ink-2);
}
.steps li::before {
  content: counter(step);
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
}

/* ── numbered rows (features) ───────────────────────────── */

.feature-grid { counter-reset: feat; }
.feature-grid li {
  counter-increment: feat;
  display: grid; grid-template-columns: 28px 1fr;
  align-items: baseline;
  font-size: clamp(14.5px, .4vw + 13.5px, 16px);
  color: var(--ink-2);
}
.feature-grid li::before {
  content: counter(feat, decimal-leading-zero);
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: .06em;
}

/* ── scanner plugin ─────────────────────────────────────── */

.plugin { padding-top: 0; }
.plugin .wrap > * { max-width: calc(60ch * var(--measure)); }
.plugin-body {
  padding-top: clamp(22px, 2.6vw, 28px);
  border-top: .5px solid var(--hairline);
}
.plugin-body p { font-size: clamp(14.5px, .4vw + 13.5px, 15.5px); color: var(--ink-2); }
.link {
  display: inline-block; margin-top: 16px;
  font-size: 13.5px; font-family: var(--mono);
  text-decoration: none;
  color: var(--ink-2);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.link:hover { border-color: var(--ink); color: var(--ink); }

/* ── download ───────────────────────────────────────────── */

.pkgs {
  margin-top: clamp(32px, 4vw, 46px);
  margin-bottom: clamp(28px, 3.6vw, 40px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: .5px solid var(--hairline);
  border-left: .5px solid var(--hairline);
}
.pkg {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  align-items: baseline;
  padding: clamp(18px, 2.4vw, 26px);
  border-right: .5px solid var(--hairline);
  border-bottom: .5px solid var(--hairline);
}
.pkg code { font-size: 12.5px; }
.pkg span { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
.download .cta { justify-content: flex-start; }
.download .fine { margin-top: 24px; }
@media (max-width: 560px) {
  .pkg { grid-template-columns: 1fr; gap: 4px; }
  .pkg span { white-space: normal; }
}

/* ── footer ─────────────────────────────────────────────── */

.foot {
  padding-top: clamp(36px, 4.4vw, 48px);
  padding-bottom: calc(clamp(44px, 5.4vw, 60px) + env(safe-area-inset-bottom));
  border-top: .5px solid var(--hairline);
  background: var(--paper-2);
  text-align: center;
  transition: background .45s var(--ease);
}
.foot .wrap {
  width: min(100% - var(--gutter) * 2, 1320px);
}
.foot-top {
  display: flex; align-items: center; gap: 8px;
  justify-content: center;
  font-size: 14px; font-weight: 600; letter-spacing: -.02em;
  margin-bottom: 18px;
}
.foot-top img { border-radius: 5px; opacity: .9; }

/* every page is one click from every other page, crawler or reader */
.foot-nav {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 7px 18px;
  margin-bottom: 20px;
  font-size: 13px;
}
.foot-nav a { border-bottom: 0; }
.foot-nav a[aria-current="page"] { color: var(--ink); }
.foot .fine {
  max-width: none;
  font-size: clamp(9.6px, 1vw - 3.4px, 11px);
  white-space: nowrap;
}
.foot .fine + .fine { margin-top: 10px; }
.foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--hairline-soft); }
.foot a:hover { color: var(--ink); }

/* ── reveal ─────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(15px);
  filter: blur(5px);
  transition: opacity .75s var(--ease), transform .75s var(--ease), filter .75s var(--ease);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ── responsive ─────────────────────────────────────────── */

@media (max-width: 1200px) {
  .target-context .fine,
  .foot .fine { white-space: normal; }
}

@media (max-width: 820px) {
  .base-measure, .target-context { grid-template-columns: 1fr; }
  .gm-rgb-focus { grid-template-columns: 1fr; align-items: start; }
  .scanner-plugin-panel { grid-template-columns: 1fr; align-items: start; }
  .targets { grid-template-columns: repeat(2, 1fr); }
  .view-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  html { scroll-padding-top: 84px; }
  .brand span { display: none; }
  .nav.is-compact .brand span { display: inline; }
  .cta .btn { flex: 1 1 auto; min-width: 150px; }
  .hero-tagline { max-width: 29ch; }
  .steps li, .feature-grid li { grid-template-columns: 24px 1fr; }
  .targets { grid-template-columns: 1fr 1fr; }
  .target { min-height: 104px; padding: 17px; }
  .view-detail { display: block; }
  .view-detail a { display: inline-block; margin-top: 8px; }
  .core-grid,
  .story-grid,
  .gm-grid,
  .gm-secondary,
  .dataset-grid,
  .chroma .notes,
  .steps,
  .pkgs { grid-template-columns: 1fr; }
  .core-item { min-height: 0; }
  .view-grid { gap: clamp(44px, 12vw, 60px); }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-top: 92px; }
  .hero-icon { width: 64px; margin-bottom: 14px; }
  .hero-stage { margin-top: 32px; }
}

@media (pointer: coarse) {
  .seg button { min-height: 34px; min-width: 40px; }
  .lang-btn { height: 38px; }
  .lang-menu button { padding: 11px 12px; }
  .nav-links a { padding: 9px 12px; }
  .glass::after { display: none; }
}

/* ── accessibility preferences ──────────────────────────── */

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

@media (prefers-reduced-transparency: reduce) {
  .glass {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--paper-2);
  }
  .glass::after { display: none; }
  .shot-lightbox {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(0, 0, 0, .94);
  }
}

@media (prefers-contrast: more) {
  :root { --ink-2: rgba(11, 11, 12, .82); --ink-3: rgba(11, 11, 12, .64); --hairline: rgba(0, 0, 0, .28); }
  [data-theme="dark"] { --ink-2: rgba(244, 244, 246, .86); --ink-3: rgba(244, 244, 246, .66); --hairline: rgba(255, 255, 255, .3); }
  .glass { background: var(--paper-2); }
}

@media print {
  .nav, .grain, .glow, .shot-lightbox { display: none; }
  body { background: #fff; color: #000; }
}

/* ── new content components ───────────────────────────── */

/* comparison table */
.cmp-table-wrap {
  margin-top: clamp(24px, 3.2vw, 40px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--card-bg);
}
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: clamp(13.5px, .35vw + 12.5px, 15px);
}
.cmp-table th, .cmp-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.cmp-table th {
  font-weight: 600;
  color: var(--ink-1);
  background: var(--glass-bg);
}
.cmp-table th:nth-child(2) { color: var(--accent); }
.cmp-table td:first-child { font-weight: 600; color: var(--ink-1); width: 25%; }
.cmp-table td:nth-child(2) { color: var(--ink-1); width: 40%; background: rgba(239, 139, 38, 0.04); }
.cmp-table td:nth-child(3) { color: var(--ink-3); width: 35%; }
.cmp-table tr:last-child td { border-bottom: none; }

.scanner-table { min-width: 900px; }
.scanner-table th:nth-child(2) { color: var(--ink-1); }
.scanner-table td:first-child { width: 34%; }
.scanner-table td:nth-child(2) {
  width: 14%;
  color: var(--ink-1);
  background: transparent;
}
.scanner-table td:nth-child(3) { width: 24%; color: var(--ink-2); }
.scanner-table td:nth-child(4) { width: 28%; color: var(--ink-2); }
.scanner-support-note {
  max-width: calc(76ch * var(--measure));
  margin-top: clamp(16px, 2vw, 24px);
}
.scanner-support-note a { color: inherit; }

/* faq list */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(24px, 3.2vw, 40px);
}
.faq-card {
  padding: clamp(20px, 2.8vw, 30px);
  border-radius: var(--r-card);
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-card h3 {
  font-size: clamp(16px, .4vw + 15px, 18px);
  color: var(--ink-1);
  line-height: 1.35;
}
.faq-card p {
  font-size: clamp(13.5px, .3vw + 12.5px, 14.5px);
  color: var(--ink-2);
  line-height: 1.6;
}

/* release highlights */
.rel-card {
  padding: clamp(24px, 3.2vw, 36px);
  border-radius: var(--r-card);
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  margin-top: clamp(20px, 2.5vw, 32px);
}
.rel-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(239, 139, 38, 0.15);
  color: var(--accent);
  font-weight: 600;
  font-size: 12.5px;
  margin-bottom: 12px;
}
.rel-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
  list-style: none;
  padding: 0;
}
.rel-list li {
  position: relative;
  padding-left: 20px;
  font-size: clamp(13.5px, .3vw + 12.5px, 14.5px);
  color: var(--ink-2);
  line-height: 1.5;
}
.rel-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 2px;
}

@media (max-width: 768px) {
  .faq-grid, .rel-list { grid-template-columns: 1fr; }
  .cmp-table th, .cmp-table td { padding: 12px 14px; }
}
