:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --mint: #e8f1ed;
  --ink: #0f2420;
  --muted: #4b635c;
  --accent: #0f6659;
  --accent-strong: #0a4e44;
  --line: #d4e0db;
  --line-soft: #e4ece8;

  /* Dark CAD Workbench tokens */
  --cad-bg: #0c1c19;
  --cad-panel: #122824;
  --cad-panel-hover: #17332e;
  --cad-line: rgba(214, 238, 230, 0.14);
  --cad-text: #eef6f3;
  --cad-muted: #9bb8af;
  --cad-accent: #67dfc2;

  /* Copper / Render tokens */
  --stage: #f1eee5;
  --copper: #c8622b;
  --copper-ui: #b0521d;

  --sans: "SF Pro Display", "Avenir Next", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Inter", "SF Pro Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(18px, 4.5vw, 60px);
  --header-h: 69px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 36, 32, 0.04), 0 6px 18px rgba(15, 36, 32, 0.05);
  --shadow-lg: 0 8px 30px rgba(15, 36, 32, 0.1), 0 2px 8px rgba(15, 36, 32, 0.06);
}

* { box-sizing: border-box; }
/* Keeps in-page jumps and focused elements clear of the sticky header */
html { scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--sans); letter-spacing: -0.028em; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { width: min(100% - 2 * var(--gutter), 1240px); margin-inline: auto; }
.section { padding-block: clamp(56px, 7vw, 96px); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Progressive enhancement: <html class="js"> is set in <head> */
html:not(.js) .js-only, .js .nojs-only { display: none !important; }

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-sm); background: var(--ink); color: #fff; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 248, 247, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 9px; justify-self: start;
  color: var(--ink); font: 750 21px/1 var(--sans); letter-spacing: -0.03em; text-decoration: none;
}
.wordmark-mark { display: inline-flex; color: var(--accent); }
.wordmark-tld { color: var(--accent); font-weight: 550; }

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.8vw, 34px); }
.site-nav a {
  position: relative; padding-block: 6px;
  color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none;
  transition: color 0.16s ease;
}
.site-nav a:hover, .site-nav a.is-current { color: var(--ink); }
.site-nav a.is-current::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--accent);
}

.header-right { justify-self: end; display: flex; align-items: center; gap: 6px; }
.header-cta {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 7px 14px; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: background-color 0.16s ease;
}
.header-cta:hover { background: var(--accent); }
.header-cta-icon { display: none; flex: none; }

/* Language menu: native <details>, so it opens without JavaScript */
.lang-menu { position: relative; }
.lang-summary {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 40px; padding: 0 10px; border-radius: 999px;
  color: var(--muted); font-size: 13px; font-weight: 650; line-height: 1; white-space: nowrap;
  list-style: none; cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.lang-summary::-webkit-details-marker { display: none; }
.lang-summary:hover, .lang-menu[open] > .lang-summary { background: var(--mint); color: var(--ink); }
.lang-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-globe, .lang-caret { flex: none; }
.lang-caret { transition: transform 0.16s ease; }
.lang-menu[open] .lang-caret { transform: rotate(180deg); }
.lang-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  min-width: 172px; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-lg);
}
.lang-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 40px; padding: 0 12px; border-radius: 8px;
  color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.lang-list a:hover { background: var(--mint); }
.lang-list a[aria-current="page"] { color: var(--accent); }
.lang-list a[aria-current="page"]::after {
  content: ""; flex: none; width: 9px; height: 5px; margin-top: -3px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg);
}

.pulse-dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%; background: #45e0ba;
  box-shadow: 0 0 0 3px rgba(69, 224, 186, 0.24);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(69, 224, 186, 0); } }

/* HERO */
.hero-stage {
  background:
    radial-gradient(760px 420px at 80% 18%, rgba(15, 102, 89, 0.09), transparent 70%),
    radial-gradient(circle, rgba(15, 102, 89, 0.075) 1px, transparent 1px),
    linear-gradient(180deg, #eff5f2 0%, var(--bg) 100%);
  background-size: auto, 26px 26px, auto;
  padding-block: clamp(36px, 4.8vw, 68px) clamp(32px, 4vw, 52px);
  border-bottom: 1px solid var(--line-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(28px, 4.4vw, 56px);
}

.hero-eyebrow {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  margin-bottom: 18px;
  padding: 4px 12px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}
.eyebrow-tag {
  padding: 3px 8px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.eyebrow-text { color: var(--muted); font-weight: 600; }

h1 {
  font-size: clamp(40px, 5.1vw, 68px);
  font-weight: 760;
  line-height: 1.03;
  letter-spacing: -0.036em;
  color: var(--ink);
  text-wrap: balance;
}
.headline-accent { color: var(--accent); }

/* Chinese / Japanese: no negative tracking on headings, a little more leading; Japanese breaks at phrase boundaries */
:lang(zh-Hans) :is(h1, h2, h3), :lang(ja) :is(h1, h2, h3) { letter-spacing: 0; text-wrap: balance; }
:lang(zh-Hans) h1, :lang(ja) h1 { line-height: 1.2; }
:lang(ja) :is(h1, h2, h3, .btn) { word-break: auto-phrase; }
/* Chinese headings break only at spaces and punctuation (they are short and written with those break points) */
:lang(zh-Hans) :is(h1, h2, h3) { word-break: keep-all; }
:lang(ja) h1 { font-size: clamp(32px, 3.9vw, 54px); }
:lang(zh-Hans) .hero-lead, :lang(ja) .hero-lead { text-wrap: pretty; }
:lang(ja) .hero-lead { word-break: auto-phrase; }

.hero-lead {
  margin-top: 18px; max-width: 44ch;
  color: var(--muted); font-size: clamp(16px, 1.3vw, 18.5px); line-height: 1.58;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid transparent;
  font-family: var(--body); font-size: 14.5px; font-weight: 650;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px rgba(15, 102, 89, 0.24);
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.85); border-color: var(--line); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: #fff; }

/* Hero CAD window */
.hero-showcase {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(15, 36, 32, 0.12);
  background: var(--cad-bg);
  box-shadow: var(--shadow-lg);
}
.viewport-chrome {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 10px 16px;
  background: #102420;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.chrome-left { display: flex; align-items: center; gap: 7px; min-width: 0; }
.chrome-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.chrome-title { margin-left: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--cad-muted); letter-spacing: 0.02em; }
.chrome-badge {
  padding: 3px 9px; border-radius: 999px;
  background: rgba(69, 224, 186, 0.14); color: #79e8cb;
  font-family: var(--mono); font-size: 11px; font-weight: 600; white-space: nowrap;
}

.hero-canvas { position: relative; background: var(--stage); }
.hero-canvas img { aspect-ratio: 1.44; object-fit: cover; }

/* Hero hotspots */
.hotspot {
  position: absolute; z-index: 4; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; text-decoration: none;
}
.hotspot:focus-visible { outline-offset: 0; }
.hotspot-ping {
  position: relative; display: block; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); border: 2.5px solid #fff;
  box-shadow: 0 2px 10px rgba(15, 36, 32, 0.35);
  transition: transform 0.16s ease, background-color 0.16s ease;
}
.hotspot-ping::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 2px solid rgba(15, 102, 89, 0.55);
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping {
  from { transform: scale(0.55); opacity: 1; }
  70%, to { transform: scale(1.5); opacity: 0; }
}
.hotspot:hover .hotspot-ping,
.hotspot.is-active .hotspot-ping { transform: scale(1.25); background: var(--copper); }
.hotspot-tip {
  position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  padding: 6px 11px; border-radius: 8px;
  background: rgba(12, 28, 25, 0.92); color: #eef6f3;
  font-size: 12px; font-weight: 500; pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  opacity: 0; transition: opacity 0.16s ease, transform 0.16s ease;
}
.hotspot-tip strong { color: #7cead0; font-weight: 700; }
.hotspot:hover .hotspot-tip,
.hotspot:focus-visible .hotspot-tip,
.hotspot.is-active .hotspot-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Only one tip at a time: hovering or focusing another pin hides the active one */
.hero-canvas:has(.hotspot:hover, .hotspot:focus-visible) .hotspot.is-active:not(:hover, :focus-visible) .hotspot-tip { opacity: 0; }

.canvas-footer-hud {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px;
  padding: 9px 16px;
  background: rgba(16, 36, 32, 0.96);
  color: var(--cad-muted);
  font-size: 12px;
}

/* Spec strip */
.spec-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  margin-top: clamp(28px, 3.6vw, 44px);
}
.spec-cell {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.78);
}
.spec-cell dt { color: var(--accent); font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 6px; }
.spec-cell dd { color: var(--muted); font-size: 13.5px; line-height: 1.48; }
.spec-cell dd strong { color: var(--ink); font-weight: 650; }

/* DARK CAD WORKBENCH */
.workbench-section {
  background:
    radial-gradient(700px 380px at 85% 12%, rgba(69, 224, 186, 0.08), transparent 70%),
    var(--cad-bg);
  color: var(--cad-text);
  padding-block: clamp(56px, 7vw, 92px);
}
.workbench-section :focus-visible { outline-color: var(--cad-accent); }

.workbench-top {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 28px;
}
.section-heading-dark { max-width: 62ch; }
.kicker-dark { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--cad-accent); margin-bottom: 10px; }
.workbench-section h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; color: #fff; }
.lead-dark { margin-top: 10px; color: var(--cad-muted); font-size: 16px; }

.view-mode-switch, .grid-bulk {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px;
  border: 1px solid var(--cad-line); background: var(--cad-panel);
}
.mode-btn, .bulk-btn {
  min-height: 40px; padding: 8px 14px; border: 0; border-radius: 7px;
  background: transparent; color: var(--cad-muted);
  font-family: var(--body); font-size: 13.5px; font-weight: 650; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.mode-btn[aria-pressed="true"] { background: #1e463e; color: #fff; }
.mode-btn:hover, .bulk-btn:hover { color: #fff; }
.bulk-btn:hover { background: var(--cad-panel-hover); }

.js [data-mode="workbench"] .all-grid-panel,
.js [data-mode="grid"] .workbench-shell { display: none; }

/* Workbench: parameter tabs | stage, legend under the tabs */
.workbench-shell {
  display: grid;
  grid-template-columns: minmax(270px, 0.78fr) minmax(0, 1.42fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "params stage" "legend stage";
  column-gap: 20px;
  align-items: start;
}
.wb-params, .wb-legend { background: var(--cad-panel); border: 1px solid var(--cad-line); }
.wb-params {
  grid-area: params;
  padding: 16px 16px 12px;
  border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.wb-legend {
  grid-area: legend;
  display: flex; flex-direction: column; gap: 7px;
  padding: 0 16px 16px;
  border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg);
  font-size: 12.5px; color: var(--cad-muted);
}
.wb-legend::before { content: ""; border-top: 1px solid var(--cad-line); margin-bottom: 5px; }
.legend-row { display: flex; align-items: center; gap: 9px; }
.swatch-copper { flex: none; width: 20px; border-top: 2.5px dashed #e28450; }
.swatch-split {
  flex: none; width: 20px; height: 10px; border-radius: 3px;
  background: linear-gradient(90deg, #8fb9ae 50%, #3f8a7b 50%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.wb-params-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 2px 4px 8px; margin-bottom: 10px; border-bottom: 1px solid var(--cad-line);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--cad-muted);
}
.wb-params-count { color: var(--cad-accent); }

.param-list { position: relative; display: flex; flex-direction: column; gap: 8px; }
.param-item {
  display: block; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 11px;
  border: 1px solid transparent; background: rgba(255, 255, 255, 0.03);
  color: var(--cad-text); font-family: var(--body); cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.param-item:hover { background: var(--cad-panel-hover); }
.param-item[aria-selected="true"] {
  background: rgba(15, 102, 89, 0.34);
  border-color: rgba(103, 223, 194, 0.55);
}
.param-item-top { display: flex; align-items: center; gap: 8px; }
.param-index { font-size: 11.5px; color: var(--cad-muted); }
.param-name { margin-right: auto; font-size: 14.5px; font-weight: 700; color: #fff; }
.param-delta { color: #f6c29b; font-weight: 650; font-size: 12px; white-space: nowrap; }
.param-item-meta { display: block; margin-top: 4px; font-size: 12.5px; color: var(--cad-muted); }

/* Stage */
.wb-stage {
  grid-area: stage;
  border: 1px solid var(--cad-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--cad-panel);
}
.wb-hud {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--cad-line);
}
.wb-hud-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wb-hud-title { font-family: var(--sans); font-size: 18px; font-weight: 700; color: #fff; }
.wb-hud-badge, .template-tag {
  padding: 2px 8px; border-radius: 999px;
  background: rgba(103, 223, 194, 0.14); color: #80ead0; font-size: 11px; font-weight: 650;
}
.wb-hud-badge.tag-paed, .template-tag.tag-paed { background: rgba(242, 178, 133, 0.18); color: #f6c29b; }
.wb-hint { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--cad-muted); }

/* Segmented view control, shared by the stage and the example cards */
.states {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
  min-inline-size: 0; margin: 0; padding: 4px;
  border: 1px solid var(--cad-line); border-radius: 10px; background: rgba(0, 0, 0, 0.25);
}
.states label { position: relative; min-width: 0; cursor: pointer; }
.states input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.states label span {
  display: grid; place-items: center; height: 100%; min-height: 40px; padding: 4px 12px;
  border-radius: 7px; color: var(--cad-muted);
  font-size: 13px; font-weight: 650; line-height: 1.2; text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.states label:hover input:not(:checked) + span { color: #fff; background: rgba(255, 255, 255, 0.06); }
.states input:checked + span { background: #e8f1ed; color: var(--ink); }
.states input:not([value="original"]):checked + span { background: var(--copper-ui); color: #fff; }
.states input:focus-visible + span { outline: 2px solid var(--cad-accent); outline-offset: 2px; }
.wb-states { min-width: min(100%, 250px); }

/* Before/after curtain: --pos is the divider position, 0 = all adjusted, 1 = all original */
.curtain {
  --pos: 0.3333;
  --edge: 23px;
  position: relative;
  aspect-ratio: 1440 / 812;
  background: var(--stage);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.curtain-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.curtain-before {
  position: absolute; inset: 0; pointer-events: none;
  clip-path: inset(0 calc(100% - var(--pos) * 100%) 0 0);
}
.curtain-line {
  position: absolute; top: 0; bottom: 0; z-index: 4; left: calc(var(--pos) * 100%);
  width: 2px; margin-left: -1px;
  background: var(--copper); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
/* The handle stays a few pixels inside the edge so it can always be grabbed */
.curtain-handle {
  position: absolute; top: 50%; z-index: 6;
  left: clamp(var(--edge), calc(var(--pos) * 100%), calc(100% - var(--edge)));
  display: grid; place-items: center; width: 40px; height: 40px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff; border-radius: 50%;
  background: #0f2420; color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}
.curtain.is-animating .curtain-before { transition: clip-path 0.22s ease; }
.curtain.is-animating .curtain-line,
.curtain.is-animating .curtain-handle { transition: left 0.22s ease; }
.curtain-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; pointer-events: none;
}
.curtain-range:focus-visible ~ .curtain-handle { outline: 3px solid var(--cad-accent); outline-offset: 3px; }
.curtain-label {
  position: absolute; top: 12px; z-index: 3;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  pointer-events: none; transition: opacity 0.15s ease;
}
.curtain-label-left { left: 12px; background: rgba(15, 36, 32, 0.8); color: #eef6f3; }
.curtain-label-right { right: 12px; background: var(--copper-ui); color: #fff; }
.curtain-label.is-hidden { opacity: 0; }

.wb-readout {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
  padding: 16px 18px;
  border-top: 1px solid var(--cad-line);
}
.wb-desc { color: var(--cad-muted); font-size: 14px; max-width: 60ch; }

.delta {
  justify-self: start; padding: 4px 10px; border-radius: 7px;
  border: 1px solid var(--cad-line); color: var(--cad-muted);
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
}
.delta.change { background: rgba(200, 98, 43, 0.2); border-color: rgba(242, 178, 133, 0.45); color: #f8c6a2; }

/* All examples: static cards with a CSS-only view toggle */
.grid-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px; color: var(--cad-muted); font-size: 13.5px;
}
.bulk-btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }

.compare-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start;
}
.example {
  display: flex; flex-direction: column; grid-column: span 2; min-width: 0; overflow: hidden;
  border: 1px solid var(--cad-line); border-radius: var(--r-md); background: var(--cad-panel);
}
.example:last-child { grid-column: 2 / span 2; }
.example-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 14px 16px 12px;
}
.example-header h3 { color: #fff; font-size: 17px; }
.example .states { display: none; margin: 0 16px 14px; }
.state-view + .state-view { margin-top: 16px; border-top: 1px solid var(--cad-line); }
.state-view img { aspect-ratio: 1440 / 812; background: var(--stage); }
.state-media { position: relative; }
.state-media picture { display: block; }
/* Measured change written next to the arrow: phones only (see the 600px block) */
.arrow-tag { display: none; }
.measurement {
  display: grid; grid-template-columns: minmax(0, 1fr) fit-content(48%); align-items: center; gap: 8px 12px;
  min-height: 74px; padding: 12px 16px 14px;
  border-top: 1px solid var(--cad-line);
  color: var(--cad-muted); font-size: 13.5px;
}
.state-label { grid-column: 1 / -1; color: var(--cad-accent); font-size: 12px; font-weight: 650; }

@supports selector(:has(*)) {
  .compare-grid { align-items: stretch; }
  .example .states { display: grid; }
  .state-view { display: none; flex-grow: 1; }
  .state-view + .state-view { margin-top: 0; border-top: 0; }
  .example:has(input[value="original"]:checked) .state-view[data-state="original"],
  .example:has(input[value="adjusted"]:checked) .state-view[data-state="adjusted"],
  .example:has(input[value="heelward"]:checked) .state-view[data-state="heelward"],
  .example:has(input[value="toeward"]:checked) .state-view[data-state="toeward"] { display: block; }
  .state-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}

.wb-footnote { margin-top: 16px; color: var(--cad-muted); font-size: 12.5px; }

/* WORKFLOW + SCALE */
.workflow-section { background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.workflow-grid {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 68px); align-items: center;
}
.kicker { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 10px; }
.section-heading { max-width: 64ch; margin-bottom: clamp(28px, 3.6vw, 40px); }
.section-lead { margin-top: 10px; color: var(--muted); font-size: 16.5px; }
.workflow-section h2, .production-section h2 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.08; color: var(--ink); }

.timeline { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }
.timeline li {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start;
  padding-top: 18px; border-top: 1px solid var(--line-soft);
}
.timeline li:first-child { padding-top: 0; border-top: 0; }
.step-num {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--mint); color: var(--accent); font-size: 12.5px; font-weight: 750;
}
.timeline h3 { font-size: 18px; font-weight: 680; margin-bottom: 4px; }
.timeline p { color: var(--muted); font-size: 14.8px; }

.scale-card {
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--stage); box-shadow: var(--shadow-sm);
}
.scale-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--muted);
}
.scale-badge {
  padding: 3px 10px; border-radius: 999px;
  background: var(--mint); color: var(--accent); font-weight: 700; font-size: 12px;
}
.scale-caption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 14px 18px; background: var(--surface); border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 13.5px;
}
.scale-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 11.5px; font-weight: 650; color: var(--accent);
}
.scale-meta span { padding: 3px 9px; border-radius: 999px; background: var(--mint); }

/* PRODUCTION BENTO */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.bento-card {
  padding: 24px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.bento-featured { grid-column: span 3; }
.bento-way { grid-column: span 2; background: #fbfcfb; }
.bento-icon {
  display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px;
  border-radius: 11px; background: var(--mint); color: var(--accent);
}
.bento-eyebrow { display: block; font-size: 11.5px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 6px; }
.bento-card h3 { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.bento-card p { color: var(--muted); font-size: 14.8px; }
.way-num { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.bento-way h3 { font-size: 17px; margin-bottom: 6px; }
.bento-way p { font-size: 14px; }

/* LAUNCH */
.launch-section { margin-block: clamp(40px, 5vw, 68px); }
.launch-card {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(24px, 4.5vw, 52px);
  border-radius: var(--r-lg);
  background:
    radial-gradient(500px 260px at 90% 10%, rgba(69, 224, 186, 0.16), transparent 70%),
    #0e2722;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.launch-card :focus-visible { outline-color: var(--cad-accent); }
.launch-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06);
  font-size: 12px; font-weight: 650; color: #d5ece4;
}
.launch-card h2 { font-size: clamp(28px, 3.4vw, 42px); color: #fff; line-height: 1.08; }
.launch-desc { margin-top: 10px; color: #c4ded5; font-size: 15.5px; max-width: 52ch; }

.composer-groups { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.composer-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.composer-label { min-width: 96px; font-size: 12.5px; font-weight: 600; color: #9bc0b4; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-chip {
  min-height: 34px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22); background: transparent; color: #e2f1eb;
  font-family: var(--body); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.choice-chip:hover { border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.08); }
.choice-chip[aria-pressed="true"] { background: #e8f1ed; border-color: #e8f1ed; color: #0f2420; }

.launch-right {
  display: flex; flex-direction: column; gap: 11px;
  padding: 20px; border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}
.mail-preview { padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.mail-preview-label { display: block; font-size: 10.5px; color: #8cb7a9; letter-spacing: 0.08em; margin-bottom: 4px; }
.mail-preview-subject { font-size: 13px; color: #eef6f3; line-height: 1.45; }

.btn-light { background: #e8f1ed; color: #0f2420; }
.btn-light:hover { background: #fff; }
.btn-dark-outline {
  border-color: rgba(255, 255, 255, 0.24); background: transparent; color: #e2f1eb; min-height: 40px; font-size: 13.5px;
}
.btn-dark-outline:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  padding-block: 22px 34px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13.5px;
}
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.footer-brand strong { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; font-weight: 550; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Toast */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  padding: 11px 16px; border-radius: 10px;
  background: #0f2420; color: #fff; font-size: 13.5px; font-weight: 600;
  border: 1px solid rgba(103, 223, 194, 0.4);
  box-shadow: var(--shadow-lg);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .workflow-grid, .launch-card { grid-template-columns: minmax(0, 1fr); }
  .spec-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-featured, .bento-way { grid-column: span 6; }
}

/* Phones and narrow tablets: parameters become a chip row directly above the stage */
@media (max-width: 860px) {
  .workbench-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "params" "stage" "legend";
    row-gap: 12px;
  }
  .wb-params, .wb-legend { padding: 0; border: 0; border-radius: 0; background: none; }
  .wb-params-head, .param-index, .param-item-meta, .wb-legend::before { display: none; }
  .param-list {
    flex-direction: row; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .param-list::-webkit-scrollbar { display: none; }
  .param-item {
    flex: none; width: auto; min-height: 48px; padding: 7px 14px;
    border-color: var(--cad-line); background: var(--cad-panel); scroll-snap-align: start;
  }
  .param-item-top { flex-direction: column; align-items: flex-start; gap: 0; }
  .param-name { margin-right: 0; font-size: 14px; white-space: nowrap; }
  .wb-legend { flex-flow: row wrap; gap: 6px 18px; }
  /* Tap targets at least 40px high */
  .site-nav a, .wordmark, .header-cta, .choice-chip, .bulk-btn { min-height: 40px; }
  .site-nav a { display: inline-flex; align-items: center; }
  .compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .example, .example:last-child { grid-column: auto; }
}

@media (max-width: 720px) {
  :root { --header-h: 94px; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; min-height: 0; padding-top: 4px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; gap: 20px; border-top: 1px solid var(--line-soft); }
  .site-nav a { padding-block: 0; }
  .header-right { grid-column: 2; grid-row: 1; }
  .wordmark { min-height: 48px; }
  .spec-strip, .compare-grid { grid-template-columns: minmax(0, 1fr); }
  .hotspot-tip {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}

/* Phones: zoomed 4:3 close-ups (assets/m/) with the divider centred and the measured change beside the arrow */
@media (max-width: 600px) {
  .curtain { --pos: 0.5; aspect-ratio: 4 / 3; }
  .state-view img { aspect-ratio: 4 / 3; }
  .arrow-tag {
    display: block; position: absolute; left: var(--tag-x); top: var(--tag-y);
    transform: translate(-50%, -50%);
    padding: 3px 8px; border-radius: 999px;
    background: var(--copper-ui); color: #fff;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 2px 8px rgba(15, 36, 32, 0.25);
    font: 700 12px/1.25 var(--mono); white-space: nowrap;
    pointer-events: none;
  }
  .arrow-tag[hidden] { display: none; }
  .swatch-copper { border-top-width: 3.5px; }
}

@media (max-width: 560px) {
  .wb-hud { padding: 12px 14px; }
  .wb-states { flex: 1 1 100%; }
  .states label span { padding-inline: 6px; }
  .curtain-label { top: 8px; padding: 3px 8px; font-size: 10px; }
  .curtain-label-left { left: 8px; }
  .curtain-label-right { right: 8px; }
  .wb-readout { padding: 14px; }
  .measurement { grid-template-columns: minmax(0, 1fr); }
  .chrome-dot { display: none; }
  .chrome-title { margin-left: 0; }
  .hero-eyebrow { border-radius: 14px; }
  .composer-label { min-width: 0; flex-basis: 100%; }
  .launch-right { padding: 14px; }
}

@media (max-width: 380px) {
  .wordmark { gap: 7px; font-size: 19px; }
  .header-cta { gap: 6px; padding-inline: 11px; font-size: 12.5px; }
}

/* Too narrow for the language menu and the full CTA: the CTA becomes a 40px bell button (name kept as hidden text) */
@media (max-width: 449px) {
  .header-cta { position: relative; justify-content: center; width: 40px; height: 40px; padding: 0; }
  .header-cta-icon { display: block; }
  .header-cta-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .header-cta .pulse-dot { position: absolute; top: 8px; right: 9px; }
  .header-right { gap: 4px; }
  .lang-summary { gap: 4px; padding-inline: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* FAQ (SEO/GEO structured Q&A, progressive enhancement with native <details>) */
.faq-section {
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
}
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 860px;
  margin-top: 28px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item:hover {
  border-color: var(--accent);
}
.faq-item[open] {
  border-color: var(--accent);
}
.faq-q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.4;
  color: var(--ink);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--accent-strong);
  font: 600 18px/1 var(--mono);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.faq-item[open] > .faq-q::after {
  content: "−";
  background: var(--accent);
  color: #fff;
}
.faq-a {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
}
.faq-a p + p { margin-top: 10px; }
@media (max-width: 560px) {
  .faq-q { padding: 15px 16px; }
  .faq-a { padding: 0 16px 16px; font-size: 15px; }
}
