/* Code Maps marketing site. Colour, type and elevation come from tokens.css; this file is layout and components.
   The visual idea is a cadastral survey sheet: a faint plotting grid behind everything, parcel rules with tick
   marks between sections, screenshots presented as annotated plates, and the inspection stamp as the one loud mark. */

:root {
  --grid: color-mix(in srgb, var(--line) 55%, transparent);
  --tick: 32px;
  --shell: min(var(--page), 100% - var(--gutter) * 2);
  /* tokens.css keeps --moss/--amber/--orange at their map-legend brightness, which is right on a 3D
     façade and too pale for text on --fog. These are the same hues pulled down to AA on the page. */
  --ok: #1a6b4e;
  --gA: #1a6b4e; --gC: #8a6100; --gD: #a8480f; --gE: #c4211a;
}
:root[data-theme="noche"] { --ok: #4fd1a5; --gA: #4fd1a5; --gC: #f2a900; --gD: #ff9a4d; --gE: #ff6b61; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="dia"]) { --ok: #4fd1a5; --gA: #4fd1a5; --gC: #f2a900; --gD: #ff9a4d; --gE: #ff6b61; }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--ui);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

/* the plotting grid: fixed, so scrolling reads as panning a survey sheet */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px var(--tick)),
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px var(--tick));
  opacity: .55;
}

img { max-width: 100%; }
a { color: var(--survey); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }

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

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--pbg); color: var(--pfg); padding: 12px 18px;
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
  transition: top .15s;
}
.skip:focus { top: 12px; }

code, kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; }
code { background: var(--hover); padding: .1em .35em; border-radius: 4px; }
kbd {
  background: var(--plate); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: .05em .4em; font-size: .85em;
}

.ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); line-height: 1.04; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); line-height: 1.1; }
h3 { font-size: 1.1rem; line-height: 1.3; letter-spacing: -.012em; }

.h-big { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -.033em; max-width: 17ch; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.5; color: var(--muted); max-width: 58ch; margin: 18px 0 0; }
.measure { max-width: 62ch; }
.fine { font-size: .875rem; color: var(--muted); }
.sub-h { margin-top: clamp(34px, 5vw, 54px); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* ---------- shell ---------- */
.page { width: var(--shell); margin-inline: auto; }

.band { position: relative; padding-block: clamp(56px, 8vw, 104px); }
.band + .band { border-top: 1px solid var(--line); }
/* parcel boundary: the rule plus short tick marks hanging off it, like a plot edge on a survey drawing */
.band + .band::before {
  content: "";
  position: absolute; inset-inline: 0; top: 0; height: 9px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px var(--tick));
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}
.band-top { padding-bottom: clamp(32px, 4vw, 52px); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--fog) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-head-in {
  width: var(--shell); margin-inline: auto;
  display: flex; align-items: center; gap: 16px;
  min-height: 62px;
}
.mark {
  display: inline-flex; align-items: center; gap: 9px;
  font: 700 1.2rem/1 var(--display); letter-spacing: -.028em;
  color: inherit; text-decoration: none; margin-right: auto;
}
.mark-cube { flex: none; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a {
  color: inherit; text-decoration: none; padding: 8px 11px; border-radius: 8px;
  font-weight: 500; font-size: .96rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.site-nav > a:hover { background: var(--hover); }
.n-gh .ic { width: 16px; height: 16px; }

html[data-path="/features"] .n-features,
html[data-path="/pricing"] .n-pricing,
html[data-path="/contact"] .n-contact { color: var(--survey); }

.head-tools { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.langs { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.langs a {
  color: var(--muted); text-decoration: none; padding: 6px 9px;
  font-size: .8rem; font-weight: 600; letter-spacing: .01em; line-height: 1.4;
}
.langs a + a { border-left: 1px solid var(--line); }
.langs a:hover { background: var(--hover); color: var(--ink); }
html[data-locale="en"] .l-en,
html[data-locale="es"] .l-es,
html[data-locale="zh"] .l-zh { background: var(--pbg); color: var(--pfg); }

.theme-btn {
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; padding: 0;
}
.theme-btn:hover { border-color: var(--ink); }
.theme-btn .ic-moon { display: none; }
:root[data-theme="noche"] .theme-btn .ic-sun { display: none; }
:root[data-theme="noche"] .theme-btn .ic-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="dia"]) .theme-btn .ic-sun { display: none; }
  :root:not([data-theme="dia"]) .theme-btn .ic-moon { display: block; }
}

.burger {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; width: 38px; height: 38px; place-items: center; cursor: pointer; padding: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--plate); color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 18px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--pbg); color: var(--pfg); border-color: var(--pbg); font-weight: 600; }
.btn-primary:hover { background: var(--pbgh); border-color: var(--pbgh); }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(52px, 8vw, 96px); }
.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.3rem); line-height: 1.02; letter-spacing: -.022em; max-width: 13ch; }
.hero .lede { max-width: 46ch; }

.repo-form { margin: clamp(26px, 4vw, 38px) 0 0; max-width: 520px; }
.repo-field {
  display: flex; gap: 6px; align-items: center;
  background: var(--plate); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px; box-shadow: var(--lift);
}
.repo-field:focus-within { border-color: var(--survey); }
.repo-field input {
  flex: 1 1 auto; min-width: 0; border: 0; background: none;
  padding: 11px 12px; font-size: 1rem;
}
.repo-field input:focus { outline: none; }
.repo-field input::placeholder { color: var(--muted); opacity: .75; }
.repo-form.is-bad .repo-field { border-color: var(--hazard); }
.repo-error { margin: 10px 0 0; color: var(--hazard); font-size: .9rem; min-height: 0; }
.repo-error:empty { display: none; }

.hero-examples {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 16px 0 0; font-size: .9rem; color: var(--muted);
}
.chip {
  background: none; border: 1px dashed var(--line); border-radius: 999px;
  padding: 5px 13px; cursor: pointer; font-size: .875rem;
  color: var(--ink); text-decoration: none; display: inline-block;
}
.chip:hover { border-style: solid; border-color: var(--survey); color: var(--survey); }

.hero-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin: 22px 0 0; }
.link-dash { font-weight: 500; }
.hero-note { font-size: .875rem; color: var(--muted); }

.hero-city {
  position: relative;
  aspect-ratio: 5 / 4;
  min-height: 260px;
}
.hero-city canvas, .hero-city img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: contain;
}
.hero-city canvas { opacity: 0; transition: opacity .8s ease; }
.hero-city canvas.is-ready { opacity: 1; }

/* the inspection stamp: the one deliberately loud mark on the whole site */
.stamp { position: absolute; left: 0; bottom: 2%; z-index: 2; margin: 0; display: flex; align-items: center; gap: 14px; }
.stamp-seal {
  flex: none; width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 2.1rem/1 var(--display); letter-spacing: -.02em;
  color: var(--gC);
  border: 3px solid currentColor;
  outline: 1px solid currentColor; outline-offset: 4px;
  transform: rotate(-8deg);
  background: color-mix(in srgb, var(--plate) 72%, transparent);
  backdrop-filter: blur(6px);
}
.stamp figcaption { font-size: .8rem; color: var(--muted); max-width: 20ch; line-height: 1.35; }
.stamp figcaption b { display: block; color: var(--ink); font-size: .9rem; font-weight: 600; margin-bottom: 2px; }
.stamp-static { position: static; margin-bottom: 26px; }
.stamp-static .stamp-seal { width: 108px; height: 108px; font-size: 2.1rem; color: var(--gE); }

/* ---------- problem ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.prose { color: var(--muted); max-width: 58ch; }
.thesis {
  font: 600 clamp(1.45rem, 3.4vw, 2.3rem)/1.2 var(--display);
  letter-spacing: -.025em; color: var(--ink);
  max-width: 24ch; margin: clamp(38px, 6vw, 68px) 0 0;
  padding-left: 22px; border-left: 3px solid var(--hazard);
}

/* ---------- steps ---------- */
.steps {
  list-style: none; counter-reset: step; padding: 0;
  margin: clamp(30px, 4vw, 48px) 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 34px;
}
.steps li { counter-increment: step; position: relative; padding-top: 46px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--survey); color: var(--survey);
  display: grid; place-items: center;
  font: 600 .9rem/1 var(--ui);
}
.steps li::after {
  content: ""; position: absolute; top: 15px; left: 40px; right: -34px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px);
}
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); margin: 0; }

/* ---------- plates (screenshots) ---------- */
.plate { margin: clamp(26px, 4vw, 40px) 0 0; }
.plate img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--plate); box-shadow: var(--lift);
}
.plate figcaption {
  margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--line);
  font-size: .875rem; line-height: 1.5; color: var(--muted); max-width: 66ch;
}
.plate figcaption b { color: var(--ink); font-weight: 600; }
.plate-tall img { max-width: 340px; margin-inline: auto; }
.plate-tall figcaption { max-width: 38ch; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 34px); }
.duo .plate { margin-top: clamp(26px, 4vw, 40px); }

.pair {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(26px, 5vw, 56px); align-items: start;
}
.pair-flip > :first-child { order: 2; }
.pair-flip > :last-child { order: 1; }

/* ---------- lens legend ---------- */
.legend { list-style: none; padding: 0; margin: clamp(24px, 3vw, 34px) 0 0; border-top: 1.5px solid var(--ink); }
.legend li {
  display: grid;
  grid-template-columns: 54px 132px minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 20px; align-items: baseline;
  padding: 17px 0; border-bottom: 1px solid var(--line);
}
.legend-bar { height: 11px; border-radius: 3px; background: var(--heat); align-self: center; }
.legend-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-family: var(--display); }
.legend-name .ic { width: 16px; height: 16px; color: var(--survey); }
.legend-what { font-size: .95rem; }
.legend-for { font-size: .95rem; color: var(--muted); }

/* ---------- fact columns ---------- */
.facts {
  list-style: none; padding: 0;
  margin: clamp(28px, 4vw, 44px) 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 clamp(28px, 4vw, 48px);
}
.facts li { border-top: 2px solid var(--ink); padding: 16px 0 26px; }
.facts h3 { display: flex; gap: 9px; align-items: center; margin-bottom: 8px; }
.facts h3 .ic { color: var(--survey); }
.facts p { color: var(--muted); margin: 0; font-size: .97rem; }

.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .97rem; }
.ticks .ic { width: 17px; height: 17px; margin-top: 4px; color: var(--ok); stroke-width: 2.4; }

/* ---------- definition grids ---------- */
.key { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 0 clamp(28px, 4vw, 48px); margin: clamp(24px, 3vw, 34px) 0 0; }
.key > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); align-items: start; }
.key dt { font-weight: 600; }
.key dd { margin: 0; color: var(--muted); font-size: .95rem; }

.who-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 clamp(28px, 4vw, 48px); margin: clamp(24px, 3vw, 36px) 0 0; }
.who-list > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.who-list dt { font-family: var(--display); font-weight: 700; letter-spacing: -.015em; font-size: 1.08rem; margin-bottom: 6px; }
.who-list dd { margin: 0; color: var(--muted); font-size: .97rem; max-width: 52ch; }

/* ---------- faq ---------- */
.faq { margin: clamp(24px, 3vw, 34px) 0 0; border-top: 1.5px solid var(--ink); max-width: 78ch; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 18px 40px 18px 0; font-weight: 600; font-family: var(--display); letter-spacing: -.012em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 24px;
  width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(225deg); top: 28px; }
.faq p { margin: 0 0 20px; color: var(--muted); max-width: 68ch; }

/* ---------- pricing ---------- */
.notice {
  max-width: 74ch; margin: 26px 0 0;
  border-left: 3px solid var(--amber);
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .97rem;
}
.notice b { font-weight: 600; }
.notice-draft { border-left-color: var(--survey); background: color-mix(in srgb, var(--survey) 9%, transparent); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 0 clamp(24px, 3vw, 40px); }
.plan {
  border-top: 2px solid var(--line); padding: 18px 0 30px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.plan-live { border-top-color: var(--survey); }
.plan header { display: grid; gap: 6px; }
.plan h2 { font-size: 1.4rem; }
.plan-price { margin: 0; display: flex; align-items: baseline; gap: 7px; }
.plan-price b { font: 700 2rem/1 var(--display); letter-spacing: -.03em; }
.plan-price span { font-size: .85rem; color: var(--muted); }
.plan-state { margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.plan-state-live { color: var(--ok); }
.plan-state-live .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.plan-for { margin: 0; font-size: .95rem; color: var(--muted); }
.plan .ticks { margin: 0; flex: 1 1 auto; align-self: stretch; }
.plan .ticks li { font-size: .92rem; }
.plan .btn { align-self: stretch; }

.audit {
  margin: clamp(34px, 5vw, 56px) 0 0;
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr);
  gap: clamp(20px, 4vw, 48px);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--plate); padding: clamp(22px, 3.5vw, 36px);
}
.audit h2 { font-size: 1.5rem; margin-bottom: 10px; }
.audit .btn { margin-top: 18px; }

.grades { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.grades li { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.grades b {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1.05rem/1 var(--display);
  border: 2px solid currentColor; transform: rotate(-8deg);
}
.grades [data-g="A"], .grades [data-g="B"] { color: var(--gA); }
.grades [data-g="C"] { color: var(--gC); }
.grades [data-g="D"] { color: var(--gD); }
.grades [data-g="E"] { color: var(--gE); }

/* ---------- contact ---------- */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 clamp(28px, 4vw, 56px); }
.channels article { border-top: 2px solid var(--ink); padding: 18px 0 30px; }
.channels h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.channels h2 .ic { color: var(--survey); }
.channels p { color: var(--muted); font-size: .97rem; }
.big-link { font-family: var(--display); font-weight: 600; font-size: clamp(1.1rem, 2.2vw, 1.4rem); letter-spacing: -.02em; }
.big-link a { display: inline-flex; align-items: center; gap: 8px; }
.big-link .ic { width: 16px; height: 16px; }

/* ---------- legal documents ---------- */
.doc { max-width: 70ch; }
.doc h2 { font-size: 1.35rem; margin: clamp(30px, 4vw, 44px) 0 10px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--ink); }
.doc ul { margin: 0 0 1.1em; padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }

/* ---------- endings ---------- */
.band-end { background: var(--soft); }
.end-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: clamp(24px, 3vw, 34px) 0 0; }
.partners { margin: 26px 0 0; max-width: 60ch; color: var(--muted); font-size: .95rem; }
.band-price .btn { margin-top: 22px; }
.band-claude { background: var(--soft); }
.band-404 { text-align: left; }
.plain-links { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .95rem; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--plate); padding-block: clamp(40px, 6vw, 64px) 0; }
.site-foot-in {
  width: var(--shell); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: clamp(28px, 5vw, 64px);
}
.foot-brand p { color: var(--muted); font-size: .95rem; max-width: 40ch; margin: 14px 0 0; }
.foot-brand .mark { margin-right: 0; }
.foot-mail { font-weight: 500; }
.foot-mail a { color: var(--survey); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.foot-cols h2 { font-size: .95rem; font-family: var(--display); font-weight: 700; margin-bottom: 12px; }
.foot-cols a { display: block; color: var(--muted); text-decoration: none; padding: 5px 0; font-size: .93rem; }
.foot-cols a:hover { color: var(--survey); text-decoration: underline; }
.foot-base {
  width: var(--shell); margin: clamp(32px, 5vw, 52px) auto 0;
  border-top: 1px solid var(--line); padding: 18px 0 26px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  font-size: .85rem; color: var(--muted);
}
.foot-langs { display: flex; gap: 16px; }
.foot-langs a { color: var(--muted); text-decoration: none; }
.foot-langs a:hover { color: var(--survey); text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-city { order: 2; max-width: 620px; }
  .hero h1 { max-width: 16ch; }
  .pair, .split { grid-template-columns: 1fr; }
  .pair-flip > :first-child, .pair-flip > :last-child { order: 0; }
  .plate-tall img { max-width: 300px; }
  .audit { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .burger { display: grid; }
  .site-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--plate); border-bottom: 1px solid var(--line);
    padding: 10px var(--gutter) 18px; box-shadow: var(--lift);
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a { padding: 12px 4px; font-size: 1.05rem; }
  .head-tools { margin: 12px 0 0; flex-wrap: wrap; }
  .head-tools .btn { flex: 1 1 160px; }
  .site-head { position: relative; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .legend li { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 14px; }
  .legend-what, .legend-for { grid-column: 2; }
  .duo { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .key > div { grid-template-columns: 1fr; gap: 4px; }
  .foot-base { flex-direction: column; }
  .site-foot-in { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .repo-field { flex-wrap: wrap; }
  .repo-field input { flex-basis: 100%; }
  .repo-field .btn { flex: 1 1 auto; }
  .stamp-seal { width: 62px; height: 62px; font-size: 1.75rem; }
}

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

/* ==========================================================================
   Motion layer — added with the hero redesign and the scroll choreography.
   Every rule below has a resting state that is correct with JavaScript blocked;
   site-motion.js only animates *towards* what is already rendered here.
   ========================================================================== */

:root { --grid-y: 0px; }
/* the plotting grid drifts under the page on scroll (site-motion.js scrubs --grid-y) */
body::before { background-position: 0 var(--grid-y), 0 var(--grid-y); }

/* the hero copy starts hidden only while site.js says an entrance is coming */
.cm-anim [data-rise] { opacity: 0; }
.cm-anim .hl-mask .hl-l { transform: translateY(112%); }

/* ---------- the headline ---------- */
.hero-h1 {
  font-family: var(--display);
  font-weight: 700;
  font-optical-sizing: auto;
  font-stretch: 100%;
  font-size: clamp(2.55rem, 6.4vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -.021em;
  margin: 0;
  max-width: 15ch;
}
.hero h1 { max-width: 15ch; }
.hl-mask { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.cm-in .hl-mask { overflow: visible; }
.hl-l { display: block; }
.hl-l2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .26em; }
.hl-verb {
  position: relative; display: inline-block; overflow: hidden;
  padding: .12em 0 .2em; margin: -.12em 0 -.2em;
  color: var(--survey); white-space: nowrap;
}
.hl-word { opacity: 0; white-space: nowrap; padding-right: .04em; }
.hl-mid { white-space: nowrap; }
html[data-locale="zh"] .hl-mid { margin-right: 0; }
.hl-word:not(:first-child) { position: absolute; left: 0; top: .12em; }
.hl-word.is-on { opacity: 1; }
/* Chinese sets solid: no tracking tricks, no word gap, a little more leading */
html[data-locale="zh"] .hero-h1 { letter-spacing: 0; font-size: clamp(2.15rem, 5.4vw, 3.8rem); line-height: 1.2; max-width: 13ch; }
html[data-locale="zh"] .hl-l2 { gap: 0; }

h1, h2, h3, .h-big, .thesis, .walk-step h3 { font-optical-sizing: auto; }

/* headings rise out of a mask, one measured line at a time */
.ln { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.ln-i { display: inline-block; }

/* ---------- header on scroll ---------- */
.site-head { transition: background-color .2s ease, border-color .2s ease; }
.site-head-in { transition: min-height .2s ease; }
.site-head.is-stuck .site-head-in { min-height: 50px; }
.site-head.is-stuck {
  background: color-mix(in srgb, var(--fog) 94%, transparent);
  border-bottom-color: color-mix(in srgb, var(--ink) 26%, transparent);
}

/* ---------- the primary call to action ---------- */
.btn { transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: none; }

/* ---------- parcel rules as real elements ---------- */
.band.has-rule::before { content: none; }
.rule { position: absolute; inset-inline: 0; top: 0; height: 9px; pointer-events: none; }
.rule-line {
  display: block; position: absolute; inset-inline: 0; top: -1px; height: 1px;
  background: var(--line); transform-origin: left center;
}
.rule-ticks {
  --p: 100%;
  display: block; position: absolute; inset-inline: 0; top: 0; height: 9px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px var(--tick));
  -webkit-mask-image: linear-gradient(#000, transparent), linear-gradient(90deg, #000 var(--p), transparent var(--p));
  mask-image: linear-gradient(#000, transparent), linear-gradient(90deg, #000 var(--p), transparent var(--p));
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* ---------- screenshots in a browser frame ---------- */
.frame {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--plate); box-shadow: var(--lift); overflow: hidden;
}
.frame-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 13px; border-bottom: 1px solid var(--line); background: var(--soft);
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.frame-url { margin-left: 10px; font-size: .72rem; color: var(--muted); letter-spacing: .015em; }
.plate .frame img { border: 0; border-radius: 0; box-shadow: none; background: none; }

/* ---------- the walk through the city ---------- */
.walk { position: relative; }
.walk + .band, .walk { border-top: 1px solid var(--line); }
/* the resting layout is one column: heading, city, steps. The two-column pinned version is opt-in,
   so a reader with JavaScript off or reduced motion on never sees a half-built grid. */
.walk-in {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px) clamp(28px, 4vw, 60px);
  padding-block: clamp(54px, 8vw, 92px);
}
.walk-head { display: grid; gap: 10px; }
.walk-stage { position: relative; }
.walk-city { position: relative; }
.walk-city:empty { display: none; }
.walk-city canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.walk-side { display: grid; gap: 18px; align-content: center; }
.walk-h { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.walk-lede { color: var(--muted); margin: -8px 0 4px; max-width: 46ch; }
.walk-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 30px; }
.walk-step { border-left: 2px solid var(--line); padding-left: 18px; }
.walk-step.is-on { border-left-color: var(--survey); }
.walk-n { display: block; font: 600 .78rem/1 var(--ui); letter-spacing: .09em; color: var(--survey); margin-bottom: 9px; }
.walk-step h3 { font-size: clamp(1.2rem, 2.1vw, 1.6rem); letter-spacing: -.022em; margin-bottom: 7px; }
.walk-step p { color: var(--muted); margin: 0; max-width: 44ch; }
.walk-rail { display: none; gap: 7px; }
.walk-dot { width: 28px; height: 3px; border-radius: 2px; background: var(--line); transition: background-color .3s ease; }
.walk-dot.is-on { background: var(--survey); }
.walk-chat { margin-top: 20px; }

/* the city follows the steps down the page on narrow screens: plain CSS sticky, no pin, no hijack */
.walk-city { aspect-ratio: 16 / 10; max-height: 62svh; }
.walk:not(.is-pinned) .walk-stage { position: sticky; top: 74px; }
.walk:not(.is-pinned) .walk-side { max-width: 62ch; }

/* pinned: heading and steps share the right column, the city holds the left one, the steps stack
   in one place and cross-fade, and the chat lands over the city */
.walk.is-pinned .walk-in {
  min-height: 100svh; align-items: start;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .92fr);
  grid-template-rows: auto minmax(0, 1fr);
}
.walk.is-pinned .walk-head { grid-column: 2; grid-row: 1; align-self: end; }
.walk.is-pinned .walk-stage { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.walk.is-pinned .walk-side { grid-column: 2; grid-row: 2; }
.walk.is-pinned .walk-city { display: block; aspect-ratio: 4 / 3; min-height: 300px; }
.walk.is-pinned .walk-steps { gap: 0; }
.walk.is-pinned .walk-step {
  grid-area: 1 / 1; border-left: 0; padding-left: 0;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
.walk.is-pinned .walk-step.is-on { opacity: 1; transform: none; }
.walk.is-pinned .walk-rail { display: flex; }
.walk.is-pinned .walk-chat {
  position: absolute; right: -8px; bottom: -14px; width: min(400px, 92%); margin: 0; z-index: 2;
  opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s ease;
}
.walk.is-pinned .walk-chat.is-on { opacity: 1; transform: none; }

/* ---------- holders for the rebuilt panels ---------- */
.pan-hold { display: grid; justify-items: start; gap: 0; }
.dock-holder { display: flex; justify-content: center; margin-top: clamp(22px, 3vw, 34px); }
.hover-holder { margin-top: clamp(24px, 3vw, 36px); }
.ticks-wide {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px clamp(28px, 4vw, 48px); margin-top: clamp(28px, 4vw, 44px);
}

@media (max-width: 760px) {
  .walk-city { aspect-ratio: 3 / 2; }
  .walk:not(.is-pinned) .walk-stage { top: 66px; }
  .hero-h1 { font-size: clamp(2.3rem, 9vw, 3rem); max-width: 100%; }
  html[data-locale="zh"] .hero-h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
}

/* ==========================================================================================
   Living layer — a bigger stage for the hero city, the real-skyline stamp, and the small
   physical responses (spotlight on the sheet, magnetic buttons, tilting panels, page-to-page
   transitions). Everything pointer-driven is gated on (hover: hover) and reduced motion.
   ========================================================================================== */

/* pages cross-fade instead of blinking; the header and the brand stay put across the navigation */
@view-transition { navigation: auto; }
.site-head { view-transition-name: site-head; }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .34s ease both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* the hero city gets the room a set piece deserves and bleeds past the page edge on wide screens */
.hero { overflow-x: clip; }
.hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.hero-city { aspect-ratio: 1 / .92; margin-block: -28px; margin-right: calc(-1 * clamp(0px, (100vw - var(--page)) / 2 - 16px, 170px)); }
.hero-city::before {
  content: ""; position: absolute; inset: 8% 4% 2%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--survey) 16%, transparent), transparent 72%);
  filter: blur(18px);
}
.hero-tip {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; white-space: nowrap;
  font: 500 .78rem/1 var(--ui); font-variant-numeric: tabular-nums;
  padding: 7px 10px; border-radius: 8px; background: var(--ink); color: var(--fog);
  opacity: 0; transition: opacity .16s ease;
}
.hero-tip.is-on { opacity: 1; }

.stamp {
  padding: 8px 18px 8px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--plate) 78%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: var(--lift);
}
.stamp-seal { width: 64px; height: 64px; font-size: 1.85rem; transition: color .3s ease; }
.stamp[data-grade="A"] .stamp-seal, .stamp[data-grade="B"] .stamp-seal { color: var(--gA); }
.stamp[data-grade="C"] .stamp-seal { color: var(--gC); }
.stamp[data-grade="D"] .stamp-seal { color: var(--gD); }
.stamp[data-grade="E"] .stamp-seal { color: var(--gE); }
.stamp figcaption span { display: block; }
.stamp.is-hit .stamp-seal { animation: stamp-hit .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stamp-hit { from { transform: rotate(22deg) scale(2.2); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.chip { transition: border-color .16s ease, color .16s ease, background-color .16s ease; }
.chip.is-live { border-style: solid; border-color: var(--survey); color: var(--survey); background: color-mix(in srgb, var(--survey) 9%, transparent); }

/* a surveyor's lamp follows the pointer across the plotting grid */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--lamp, 0);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--survey) 11%, transparent), transparent 70%);
  transition: opacity .6s ease;
}

/* buttons lean towards the pointer; panels tilt under it (site.js writes the variables) */
.btn-primary, .pan, .plate .frame { --tx: 0px; --ty: 0px; --rx: 0deg; --ry: 0deg; }
.btn-primary { transform: translate(var(--tx), var(--ty)); }
.btn-primary:hover { transform: translate(var(--tx), calc(var(--ty) - 1px)); }
.pan, .plate .frame { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s ease-out; will-change: transform; }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, #ffffff38 50%, transparent 62%);
  transform: translateX(-120%);
}
.btn-primary:hover::after { transform: translateX(120%); transition: transform .7s ease; }

@media (max-width: 900px) { .hero-city { margin: 0; aspect-ratio: 5 / 4; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .stamp.is-hit .stamp-seal { animation: none; }
  body::after { display: none; }
  .pan, .plate .frame, .btn-primary { transform: none; }
}
/* the headline tail always takes its own line: a short verb must not pull it up and shift the whole hero */
.hl-tail { flex-basis: 100%; }

/* ---------- hero city furniture: district pills, the lens in words, the hover card ---------- */
.hero-city { aspect-ratio: 1 / 1; min-height: min(640px, 78svh); margin-block: -56px -40px; }
.hero-label {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; white-space: nowrap;
  font: 600 .72rem/1 var(--ui); letter-spacing: .01em; color: var(--ink);
  padding: 5px 9px 5px 7px; border-radius: 999px; margin-top: 6px;
  background: color-mix(in srgb, var(--plate) 86%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.hero-label::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; background: var(--hue); }
.hero-lens {
  position: absolute; right: clamp(8px, 12%, 120px); top: 9%; z-index: 2; display: flex; align-items: center; gap: 8px;
  font: 600 .8rem/1 var(--ui); color: var(--ink); padding: 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--plate) 86%, transparent); border: 1px solid var(--line); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(4px); transition: opacity .3s ease, transform .3s ease;
}
.hero-lens.is-on { opacity: 1; transform: none; }
.hero-lens i { width: 54px; height: 6px; border-radius: 3px; background: var(--heat); }
.hero-tip { display: grid; gap: 5px; padding: 10px 12px; border-radius: 10px; min-width: 168px; box-shadow: var(--lift); }
.hero-tip b { font: 600 .82rem/1.2 var(--ui); margin-bottom: 2px; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; }
.hero-tip-row { display: grid; grid-template-columns: 58px 1fr; gap: 8px; align-items: center; font-size: .72rem; opacity: .92; }
.hero-tip-row em { font-style: normal; }
.hero-tip-row i { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--fog) 22%, transparent); position: relative; overflow: hidden; }
.hero-tip-row i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: 3px; background: linear-gradient(90deg, #ffb347, #e0342b); }
.walk-city .hero-label, .walk-city .hero-lens { display: none; }
@media (max-width: 900px) { .hero-city { min-height: 0; margin: 0; aspect-ratio: 5 / 4; } .hero-label { font-size: .66rem; } }
.hero-lens { right: auto; left: 0; top: auto; bottom: calc(2% + 96px); }
.hero-call {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; white-space: nowrap;
  display: flex; align-items: center; gap: 7px; margin: -14px 0 0 18px;
  font: 500 .74rem/1 var(--ui); color: var(--ink); padding: 6px 10px; border-radius: 8px;
  background: var(--plate); border: 1px solid color-mix(in srgb, var(--hazard) 55%, var(--line)); box-shadow: var(--lift);
  opacity: 0; transition: opacity .35s ease;
}
.hero-call.is-on { opacity: 1; }
.hero-call::before { content: ""; position: absolute; left: -19px; bottom: -15px; width: 22px; height: 1px; background: var(--hazard); transform: rotate(-38deg); transform-origin: left bottom; }
.hero-call b { color: var(--hazard); font-weight: 700; display: flex; align-items: center; gap: 5px; }
.hero-call b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hazard); }
.hero-call em { font-style: normal; color: var(--muted); }
.walk-city .hero-call { display: none; }

/* ---------- the walk as the product window ----------
   Not the hero again: the city sits inside the app's own chrome, with the real dock pressed on the
   lens each step is about, and the section gets a band of its own. */
.walk { background: linear-gradient(var(--soft), color-mix(in srgb, var(--soft) 40%, transparent)); }
.walk-window {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--plate);
  box-shadow: 0 2px 4px #14213d14, 0 40px 80px -24px #14213d59;
}
.walk-window .frame-bar { padding: 11px 15px; }
.walk-count { margin-left: auto; font: 500 .72rem/1 var(--ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.walk-count b { color: var(--survey); font-weight: 700; }
.walk-view {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 58%, color-mix(in srgb, var(--survey) 9%, transparent), transparent 70%),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 32px),
    var(--fog);
}
.walk-view .walk-city { aspect-ratio: 16 / 10; max-height: none; }
.walk-view .walk-city:empty { display: block; }
.walk-dock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; width: max-content; max-width: calc(100% - 24px); }
.walk-dock .pan { transform: none; }
.walk-dock .pan-sheet { box-shadow: var(--lift); }
.walk-dock .pan-seg > span, .walk-dock .pan-toggle, .walk-dock .pan-tool { transition: background-color .3s ease, color .3s ease; }
.walk-dock .pan-toggle.is-on .pan-box { background: var(--survey); border-color: var(--survey); }
.walk-dock .pan-tool.is-on { background: var(--pbg); color: var(--pfg); border-radius: 8px; }
/* inside the window the district names and the critical annotations are the point; the dock already says the lens */
.walk-city .hero-label, .walk-city .hero-call { display: flex; }
.walk-city .hero-label { display: block; }

.walk.is-pinned .walk-in { grid-template-columns: minmax(0, 1.75fr) minmax(280px, .8fr); align-items: center; gap: clamp(28px, 4vw, 64px); width: min(1560px, 94vw); }
.walk.is-pinned .walk-stage { align-self: center; }
.walk.is-pinned .walk-view .walk-city { aspect-ratio: auto; height: min(74svh, 760px); min-height: 380px; }
.walk.is-pinned .walk-head { align-self: end; }
.walk.is-pinned .walk-h { font-size: clamp(2rem, 3.4vw, 3rem); }
.walk.is-pinned .walk-step h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.walk.is-pinned .walk-n { font: 700 clamp(3.4rem, 6vw, 5.4rem)/.9 var(--display); letter-spacing: -.04em; color: color-mix(in srgb, var(--survey) 22%, transparent); margin-bottom: 14px; }
.walk.is-pinned .walk-chat { right: 18px; bottom: 84px; }
@media (max-width: 900px) { .walk-dock { display: none; } .walk-view .walk-city { aspect-ratio: 4 / 3; } }

/* ---------- "what you see": one organised set of cards instead of loose pieces ----------
   Every card is copy + a stage. The stage is a recessed sheet of plotting paper the panel sits ON,
   so a panel never floats over the page or over its neighbour. */
.see-grid { display: grid; gap: clamp(18px, 2.4vw, 28px); margin-top: clamp(34px, 5vw, 56px); }
.see-card {
  border: 1px solid var(--line); border-radius: 22px; background: var(--plate);
  padding: clamp(20px, 3vw, 36px); box-shadow: 0 1px 2px #14213d0f;
  display: grid; gap: clamp(20px, 3vw, 40px);
}
.see-copy h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -.02em; margin: 0 0 8px; }
.see-copy h3:not(:first-child) { margin-top: clamp(22px, 3vw, 34px); padding-top: clamp(22px, 3vw, 34px); border-top: 1px solid var(--line); }
.see-copy p { color: var(--muted); margin: 0; max-width: 52ch; }
.see-stage {
  position: relative; border-radius: 16px; border: 1px solid var(--line); overflow: hidden;
  padding: clamp(18px, 3vw, 36px); display: grid; justify-items: center; align-content: center; gap: 18px;
  background:
    radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--survey) 8%, transparent), transparent 72%),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 28px),
    var(--fog);
}
.see-stage .pan-figcap { margin: 0; text-align: center; max-width: 52ch; border: 0; padding: 0; }
.see-split { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; }
.see-flip > .see-copy { order: 2; }
.see-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.see-copy .link-dash { display: inline-block; margin-top: 18px; }

.see-lenses { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; }
.see-lenses .legend { grid-column: 1 / -1; margin: 0; border-top: 1px solid var(--line); }
.see-lenses .legend li { transition: background-color .2s ease; border-radius: 10px; padding-inline: 10px; }
.see-lenses .legend li:hover { background: var(--hover); }
.see-stage-dock { min-height: 150px; }

/* the hover card overlaps the corner of the building card on purpose, and stays inside the stage */
.see-stage .pan-cluster { padding: 0 56px 136px 0; }
.see-stage .pan-cluster .pan-hover { right: 0; bottom: 0; width: min(290px, 70%); }

@media (max-width: 900px) {
  .see-split, .see-lenses { grid-template-columns: minmax(0, 1fr); }
  .see-flip > .see-copy { order: 0; }
  .see-stage .pan-cluster { padding: 0; }
}

/* ---------- pricing: open source vs Cloud, plan cards, the quota table ---------- */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(18px, 2.4vw, 28px); margin-top: clamp(24px, 3vw, 36px); }
.path {
  border: 1px solid var(--line); border-radius: 22px; background: var(--plate); padding: clamp(22px, 3vw, 36px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; box-shadow: 0 1px 2px #14213d0f;
}
.path-live { border-color: color-mix(in srgb, var(--survey) 55%, var(--line)); box-shadow: 0 1px 2px #14213d0f, 0 30px 60px -32px color-mix(in srgb, var(--survey) 60%, transparent); }
.path-cloud { background: repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 28px), repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 28px), var(--soft); border-style: dashed; }
.path h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.025em; margin: 0; }
.path-tag { margin: 0; font-size: .85rem; font-weight: 600; color: var(--survey); }
.path-body { margin: 0; color: var(--muted); max-width: 54ch; flex: 1 1 auto; }
.path-cmd { margin: 4px 0; align-self: stretch; background: var(--ink); color: var(--fog); border-radius: 12px; padding: 14px 16px; font-size: .82rem; line-height: 1.7; overflow-x: auto; }
.path-cmd code { background: none; padding: 0; color: inherit; }
.path .end-actions { margin: 6px 0 0; }

.plans-cards { gap: clamp(14px, 1.8vw, 22px); margin-top: clamp(24px, 3vw, 36px); align-items: stretch; }
.plans-cards .plan {
  border: 1px solid var(--line); border-radius: 20px; background: var(--plate); padding: 22px 22px 24px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.plans-cards .plan:hover { transform: translateY(-4px); border-color: var(--survey); box-shadow: var(--lift); }
.plans-cards .plan-live { border-top: 1px solid color-mix(in srgb, var(--survey) 55%, var(--line)); }
.plans-cards .plan-star { background: linear-gradient(color-mix(in srgb, var(--survey) 7%, var(--plate)), var(--plate) 45%); }
.plans-cards .plan h3 { font-size: 1.35rem; margin: 0; }
.plans-cards .plan-state { line-height: 1.45; display: block; }
.plans-cards .plan-state-live { display: inline-flex; }

.pt-wrap { overflow-x: auto; margin-top: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: var(--plate); }
.pt { width: 100%; min-width: 820px; border-collapse: collapse; font-size: .92rem; }
.pt th, .pt td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.pt tbody tr:last-child > * { border-bottom: 0; }
.pt thead th { font: 700 1rem/1.2 var(--display); position: sticky; top: 0; background: var(--soft); }
.pt thead td { background: var(--soft); }
.pt tbody th { font-weight: 600; color: var(--ink); width: 24%; }
.pt td { color: var(--muted); }
.pt td:nth-child(2) { color: var(--ink); background: color-mix(in srgb, var(--survey) 5%, transparent); }
.pt tbody tr { transition: background-color .15s ease; }
.pt tbody tr:hover { background: var(--hover); }
.pt-yes .ic { width: 17px; height: 17px; color: var(--ok); stroke-width: 2.6; }
.pt-no { opacity: .55; }
.path { min-width: 0; }
.path-cmd { min-width: 0; max-width: 100%; box-sizing: border-box; }
.paths { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.plans-cards .ticks { align-content: start; }
/* the visually hidden "included" label is absolutely positioned: anchor it inside the scrolling table */
.pt-yes { position: relative; display: inline-block; }

/* ---------- integrations: what runs by itself, what comes in through SARIF, what is only planned ---------- */
.ig { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(14px, 2vw, 22px); margin-top: clamp(26px, 4vw, 40px); align-items: stretch; }
.ig-col { border: 1px solid var(--line); border-radius: 20px; background: var(--plate); padding: clamp(18px, 2.4vw, 26px); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ig-col:not(.ig-live) { border-style: dashed; background: var(--soft); }
.ig-col h3 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.ig-col h3 .ic { width: 17px; height: 17px; color: var(--ok); stroke-width: 2.6; }
.ig-col > p { margin: 0; color: var(--muted); font-size: .92rem; }
.ig-tiles { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ig-tiles-1 { grid-template-columns: 1fr; }
.ig-tiles li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; background: var(--fog); transition: transform .2s ease, border-color .2s ease; }
.ig-live .ig-tiles li:hover { transform: translateY(-2px); border-color: var(--survey); }
.ig-tiles b { font: 700 .95rem/1.2 var(--display); letter-spacing: -.01em; }
.ig-tiles span { font-size: .72rem; color: var(--muted); }
.ig-soon b { font: 500 .88rem/1.35 var(--ui); color: var(--muted); letter-spacing: 0; }
.ig .path-cmd { margin-top: auto; font-size: .78rem; }
.mn-ig { margin: 18px 0 0; font-size: .88rem; color: var(--muted); max-width: 86ch; }
@media (max-width: 1000px) { .ig { grid-template-columns: minmax(0, 1fr); } }
.ig-rules { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); margin-top: 18px; }
.ig-col h4 { margin: 0; font: 700 1.1rem/1.25 var(--display); letter-spacing: -.015em; }
.ig-state { margin: 0; font-size: .76rem; font-weight: 700; color: var(--muted); }
.ig-live > .ig-state { color: var(--ok); }

/* ---------- static site: no dashboard, no free URL ---------- */
html[data-static] a[href$="/dashboard"], html[data-static] .link-dash[href$="/dashboard"] { display: none; }
html[data-static] .repo-field select { flex: 1 1 auto; min-width: 0; border: 0; background: none; padding: 11px 12px; font-size: 1rem; color: var(--ink); font-family: inherit; }
html[data-static] .repo-field select:focus { outline: none; }

/* ---------- who it is for: the one card for everyone, before the four profiles ---------- */
.who-all {
  margin-top: clamp(24px, 3vw, 36px); padding: clamp(22px, 3vw, 34px); border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--survey) 55%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--survey) 12%, var(--plate)), var(--plate) 60%);
  box-shadow: 0 1px 2px #14213d0f, 0 30px 60px -32px color-mix(in srgb, var(--survey) 60%, transparent);
}
.who-tag { display: inline-block; font: 700 .74rem/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--survey); margin-bottom: 10px; }
.who-all h3 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); letter-spacing: -.025em; margin: 0 0 10px; }
.who-all p { margin: 0; color: var(--muted); max-width: 70ch; }
.who-langs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px !important; }
.who-langs code { font-size: .78rem; padding: 4px 8px; border-radius: 6px; background: color-mix(in srgb, var(--survey) 10%, transparent); color: var(--ink); }

/* ---------- the waitlist pill: bottom-right, after the hero, dismissable, remembers the dismissal ---------- */
.wl { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; display: grid; justify-items: end; gap: 10px; }
.wl[hidden] { display: none; }
.wl-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--pbg); color: var(--pfg); font: 600 .92rem/1 var(--ui); box-shadow: 0 10px 30px -8px #14213d80;
  animation: wl-in .5s cubic-bezier(.2, 1.4, .4, 1) both; transition: transform .2s ease;
}
.wl-pill:hover { transform: translateY(-2px); }
.wl-pill .ic { width: 16px; height: 16px; }
@keyframes wl-in { from { transform: translateY(24px); opacity: 0; } }
.wl-card {
  position: relative; width: min(360px, calc(100vw - 32px)); padding: 20px 20px 16px; border-radius: 18px; margin: 0;
  background: var(--plate); border: 1px solid var(--line); box-shadow: var(--lift);
  animation: wl-in .35s cubic-bezier(.2, 1.4, .4, 1) both;
}
.wl-card[hidden] { display: none; }
.wl-card b { display: block; font: 700 1.05rem/1.25 var(--display); letter-spacing: -.015em; margin-right: 28px; }
.wl-card p { margin: 6px 0 12px; font-size: .88rem; color: var(--muted); }
.wl-row { display: flex; gap: 6px; }
.wl-row input { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--fog); color: var(--ink); font: inherit; font-size: .95rem; }
.wl-row input:focus { outline: none; border-color: var(--survey); }
.wl-card.is-bad .wl-row input { border-color: var(--hazard); }
.wl-msg { margin: 10px 0 0 !important; font-size: .84rem !important; color: var(--ink) !important; }
.wl-msg:empty { display: none; }
.wl-close { position: absolute; right: 10px; top: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.wl-close:hover { background: var(--hover); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .wl-pill, .wl-card { animation: none; } }
.wl-pill[hidden] { display: none; }

/* ==========================================================================================
   Mobile pass (21-sep night). Later desktop rules above won the cascade over the early media
   queries, so every narrow-screen override lives here, after everything else.
   ========================================================================================== */
@media (max-width: 900px) {
  .hero { padding-block: 28px 44px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-copy { order: 1; }
  .hero-city { order: 2; margin: 0; aspect-ratio: 4 / 3; min-height: 0; max-width: none; }
  .hero-city::before { inset: 10% 6% 4%; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); max-width: none; }
  .hl-tail { flex-basis: auto; }
  .hero .lede { font-size: 1.05rem; }
  .repo-form { max-width: none; }
  .repo-field { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; }
  .repo-field input, .repo-field select, html[data-static] .repo-field select { width: 100%; padding: 12px; }
  .repo-field .btn { width: 100%; justify-content: center; }
  .hero-examples { gap: 6px; }
  .stamp { left: 8px; bottom: 8px; padding: 6px 12px 6px 6px; gap: 10px; }
  .stamp-seal { width: 48px; height: 48px; font-size: 1.4rem; }
  .stamp figcaption { font-size: .72rem; max-width: 18ch; }
  .stamp figcaption b { font-size: .8rem; }
  .hero-lens { bottom: auto; top: 8px; left: 8px; font-size: .72rem; padding: 6px 10px; }
  .hero-lens i { width: 40px; }
  .hero-call { font-size: .68rem; padding: 5px 8px; }
  .hero-tip { display: none; }

  .walk-in { padding-block: 40px; gap: 18px; }
  .walk-window { border-radius: 14px; }
  .walk-view .walk-city { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
  .walk-n { font-size: .78rem; }

  .see-card { padding: 18px; border-radius: 16px; }
  .see-stage { padding: 14px; }
  .see-stage .pan-cluster { padding: 0; }
  .see-stage .pan-cluster .pan-hover { position: static; width: 100%; margin-top: 12px; }
  .walk.is-pinned .walk-in { grid-template-columns: minmax(0, 1fr); width: auto; }

  .ig { grid-template-columns: minmax(0, 1fr); }
  .ig-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who-all { padding: 20px; border-radius: 16px; }

  .paths { grid-template-columns: minmax(0, 1fr); }
  .plans-cards { grid-template-columns: minmax(0, 1fr); }
  .wl { right: 12px; bottom: 12px; left: 12px; justify-items: end; }
  .wl-card { width: 100%; }
  .wl-pill { padding: 11px 16px; font-size: .88rem; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: clamp(2rem, 11vw, 2.6rem); }
  html[data-locale="zh"] .hero-h1 { font-size: clamp(1.8rem, 9vw, 2.3rem); }
  .band { padding-block: 44px; }
  .h-big { font-size: clamp(1.7rem, 8vw, 2.3rem); }
}
@media (max-width: 900px) {
  /* the walk on phones: a portrait product window that sticks, the chat laid over it on the last step */
  .walk-view .walk-city { aspect-ratio: 3 / 4; }
  .walk:not(.is-pinned) .walk-stage { top: 62px; }
  .walk:not(.is-pinned) .walk-chat { position: absolute; left: 8px; right: 8px; bottom: 8px; margin: 0; z-index: 3; display: none; }
  .walk:not(.is-pinned) .walk-chat.is-on { display: block; }
  .walk:not(.is-pinned) .walk-chat .pan-sheet { font-size: 12px; }
  .walk:not(.is-pinned) .walk-side { padding-top: 12px; }
}

/* ---------- features: the playground ---------- */
.play { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .9fr); gap: clamp(18px, 2.4vw, 32px); margin-top: clamp(24px, 3vw, 36px); align-items: start; }
.play-window { position: sticky; top: 84px; }
.play-city { aspect-ratio: 5 / 4; min-height: 0; margin: 0; max-width: none; }
.play-city::before { display: none; }
.play-city .hero-label, .play-city .hero-call { display: flex; }
.play-city .hero-label { display: block; }
.play-dock .pan-toggle.is-on .pan-box { background: var(--survey); border-color: var(--survey); }
.play-dock .pan-tool.is-on { background: var(--pbg); color: var(--pfg); border-radius: 8px; }
.play-hint { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; font-size: .9rem; color: var(--survey); font-weight: 500; }
.play-hint .ic { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.play-key { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
.play-key > div { grid-template-columns: 96px minmax(0, 1fr); padding: 12px 12px; border-radius: 12px; border-bottom: 0; cursor: pointer; transition: background-color .2s ease, transform .2s ease; outline: none; }
.play-key > div:hover, .play-key > div.is-on, .play-key > div:focus-visible { background: color-mix(in srgb, var(--survey) 10%, transparent); transform: translateX(4px); }
.play-key dt { color: var(--survey); }
.play-legend li { border-radius: 10px; padding-inline: 10px; transition: background-color .2s ease; }
.play-legend li:hover, .play-legend li.is-on { background: color-mix(in srgb, var(--survey) 10%, transparent); }
.facts-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.facts-cards li { border: 1px solid var(--line); border-top-width: 1px; border-radius: 16px; background: var(--plate); padding: 18px; transition: transform .25s ease, border-color .25s ease; }
.facts-cards li:hover { transform: translateY(-3px); border-color: var(--survey); }
.key-cards { gap: 12px; }
.key-cards > div { border: 1px solid var(--line); border-radius: 14px; background: var(--plate); padding: 14px 16px; }
.see-card > .see-stage:only-child { width: 100%; }
@media (max-width: 900px) { .play { grid-template-columns: minmax(0, 1fr); } .play-window { position: static; } .play-key > div { grid-template-columns: 84px 1fr; } }
.play-city .hero-lens { display: none; }
