/* TERRA3000 page CSS. Tokens only (theme.css); composition on foundation.css. */

body { font-stretch: 100%; }
::selection { background: var(--accent-fill); color: var(--accent-on-fill); }
.h3 { font-weight: 700; }
.lead { color: var(--muted-strong); }
.fn { font-family: var(--font-mono); font-size: 0.6em; color: var(--accent-text); margin-left: 0.1em; }
.band-ink .fn { color: var(--on-ink-muted); }
.ph { font-family: var(--font-mono); font-size: 0.92em; color: var(--muted); }
.band-ink .ph { color: var(--on-ink-muted); }

/* tags: demo, placeholder, illustrative */
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3;
  border: 1px solid var(--accent); color: var(--accent-text); border-radius: var(--radius-sm); white-space: nowrap;
}
.tag-solid { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-on-fill); }
.tag-dashed { border-style: dashed; border-color: var(--line-strong); color: var(--muted); }
.label-red { color: var(--accent-text); }
.band-ink .label-red { color: var(--accent); }

/* buttons: square, mono-ish weight */
.button { letter-spacing: 0.01em; }
.button-sm { min-height: 40px; padding: 8px 16px; font-size: var(--fs-small); }
.button-primary:hover { filter: brightness(0.9); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid transparent; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: none; }
.header-inner { gap: 20px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); }
.logo { height: 34px; width: auto; }
.logo .logo-sub { color: var(--muted); }
.nav-links { gap: 22px; font-weight: 500; }
.nav-links a { color: var(--muted-strong); }
.tools { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.lang a {
  display: grid; place-items: center; min-width: 38px; min-height: 36px; padding: 0 6px;
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; text-decoration: none; color: var(--muted-strong);
}
.lang a + a { border-left: 1px solid var(--line-strong); }
.lang a[aria-current] { background: var(--ink); color: var(--bg); }
.lang abbr { text-decoration: none; }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink);
}
.theme-toggle svg { width: 18px; height: 18px; transition: transform 400ms var(--ease-out); }
:root[data-theme="dark"] .theme-toggle svg { transform: rotate(180deg); }
.theme-toggle[hidden] { display: none; }
.header-cta { display: none; }
@media (min-width: 1180px) { .header-cta { display: inline-flex; } }
@media (min-width: 900px) and (max-width: 1179px) { .nav-links { gap: 16px; } }
.nav-links { display: none; }
@media (min-width: 1040px) { .nav-links { display: flex; } }

.mobile-nav { position: relative; }
.mobile-nav summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.mobile-nav summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 16px; height: 1.6px; background: currentColor; position: relative; transition: transform 240ms var(--ease-out); }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; } .burger::after { top: 5px; }
.mobile-nav[open] .burger { background: transparent; }
.mobile-nav[open] .burger::before { transform: translateY(5px) rotate(45deg); }
.mobile-nav[open] .burger::after { transform: translateY(-5px) rotate(-45deg); }
/* full-screen menu: the panel sits under the header row (logo, languages, theme, close),
   so the burger turned into a cross stays the close control, with or without script */
.header-inner { position: relative; z-index: 0; }
.mobile-panel {
  position: fixed; inset: 0; z-index: -1;
  display: flex; flex-direction: column; gap: 28px;
  padding: calc(var(--header-height) + 12px) calc((100vw - var(--shell)) / 2) calc(24px + env(safe-area-inset-bottom));
  background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
}
.mobile-nav[open] .mobile-panel { animation: mp-in 260ms var(--ease-out); }
@keyframes mp-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.mp-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mp-links a {
  display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 780; font-stretch: 74%; font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.6rem); line-height: 1; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.mp-links a:active, .mp-links a:hover { color: var(--accent-text); }
.mp-n { min-width: 2.2em; font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 500; font-stretch: 100%; letter-spacing: 0.06em; color: var(--accent-text); }
.mp-actions { display: grid; gap: 12px; margin-top: auto; }
.mp-actions .button { min-height: 56px; width: 100%; }
.mp-watch { justify-content: flex-start; gap: 12px; color: var(--ink); border-color: var(--ink); }
.mp-watch span { white-space: nowrap; text-align: left; }
.mp-watch svg { width: 20px; height: 20px; flex: none; color: var(--accent-text); }
.mp-note { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
html:not(.js) .mp-watch { display: none; }
@media (max-width: 374px) { .mp-note { display: none; } }
@media (max-width: 1039px) {
  html:has(.mobile-nav[open]) { overflow: hidden; }
  .site-header:has(.mobile-nav[open]) { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (min-width: 1040px) { .mobile-nav { display: none; } }
@media (max-width: 420px) { .logo { height: 28px; } .tools { gap: 6px; } .lang a { min-width: 32px; } }

/* ---------- hero: the drawing sheet ---------- */
.hero-sheet { min-height: min(92svh, 940px); border-bottom: 1px solid var(--line); }
.hero-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.hero-sheet .hero-inner { gap: clamp(32px, 4vw, 64px); }

/* film hero: muted site footage under an asphalt scrim that fades to black at the foot */
.hero-film { isolation: isolate; background: var(--bg); color: var(--ink); }
.hero-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--bg); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 40%, transparent) 0%, transparent 28%, color-mix(in srgb, var(--bg) 70%, transparent) 72%, var(--bg) 100%),
    color-mix(in srgb, var(--bg) 74%, transparent);
}
@media (min-width: 900px) {
  .hero-bg::after {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--bg) 35%, transparent) 0%, transparent 30%, color-mix(in srgb, var(--bg) 55%, transparent) 75%, var(--bg) 100%),
      linear-gradient(90deg, color-mix(in srgb, var(--bg) 90%, transparent) 0%, color-mix(in srgb, var(--bg) 76%, transparent) 48%, color-mix(in srgb, var(--bg) 72%, transparent) 100%);
  }
}
@media (min-width: 900px) { .hero-sheet .hero-inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; } }
.hero-copy { display: grid; gap: 22px; }
.hero-copy .display { display: grid; }
.hero-copy .display .line { display: block; }
.hero-copy .display .line-red { color: var(--accent-text); }
.hero .lead { max-width: 52ch; }
.display-sm { font-size: clamp(2.4rem, 1.4rem + 4vw, 5rem); }

.hero-figure { display: grid; gap: 14px; margin: 0; }
.duel { display: grid; gap: 4px; }
.duel-row { display: grid; gap: 2px; padding-top: 10px; border-top: 2px solid var(--ink); }
.duel-terra { border-top-color: var(--accent); }
.duel-num { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-weight: 860; font-stretch: 70%; line-height: 0.82; letter-spacing: -0.02em; }
.duel-num .big { font-size: clamp(5rem, 2.4rem + 6vw, 8.5rem); font-variant-numeric: lining-nums tabular-nums; }
.duel-num .unit, .duel-num .pre { font-family: var(--font-mono); font-size: var(--fs-small); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-stretch: 100%; }
.duel-conv .big { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.duel-terra .big { color: var(--accent); }
.timeline { width: 100%; height: auto; overflow: visible; }
.timeline text, .chart text, .stage-svg text { font-family: var(--font-mono); font-size: 15px; fill: var(--muted); }
.axis line { stroke: var(--line-strong); stroke-width: 1.5; }
.axis-unit { text-transform: uppercase; letter-spacing: 0.08em; }
.bar-conv { fill: var(--ink); }
.bar-conv-range { stroke: var(--ink); stroke-width: 1.5; }
.hatch-line { stroke: var(--hatch); stroke-width: 1.4; }
.bar-conv-range ~ * .hatch-line, #hatch-hero line, #hatch-c1 line { stroke: var(--ink); stroke-width: 1.6; }
.bar-terra { fill: var(--accent); }
.dim line, .dim path { stroke: var(--dim); stroke-width: 1.5; fill: none; }
.dim .dim-head { fill: var(--dim); stroke: none; }
.dim text { fill: var(--accent-text); font-weight: 600; }
.hero-figure figcaption { margin: 0; max-width: 52ch; }

/* ---------- product ---------- */
.spec { display: grid; gap: 14px; }
.spec-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.spec .kv dd { font-family: var(--font-mono); font-size: 0.95rem; }
.spec .kv > div:first-child { border-top: 0; }
.product-quote { padding-left: 18px; border-left: 3px solid var(--accent); font-weight: 700; font-stretch: 80%; text-transform: uppercase; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.2rem); line-height: 1.05; margin-top: 12px; }

/* ---------- process ---------- */
.process .index-list > li { border-color: color-mix(in srgb, var(--on-ink) 22%, transparent); transition: opacity 300ms var(--ease-out); }
.process .index-list > li::before { color: var(--accent); font-stretch: 70%; }
@media (min-width: 760px) { .process .index-list > li { grid-template-columns: 4.5rem minmax(0, 1fr); } .process .step-body { grid-column: 2; } }
.step-body { display: grid; gap: 12px; color: var(--on-ink-muted); }
.machines { display: grid; gap: 6px; font-family: var(--font-mono); font-size: var(--fs-small); }
.machines li { padding-left: 18px; position: relative; }
.machines li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 10px; height: 1.5px; background: var(--accent); }
.js .process .step:not(.is-active) { opacity: 0.55; }
.finish { margin-top: 28px; display: grid; gap: 10px; padding: 18px 0 0; border-top: 1px dashed color-mix(in srgb, var(--on-ink) 35%, transparent); }
.finish ul { display: grid; gap: 6px; color: var(--on-ink-muted); }

.stage { margin: 0; display: grid; gap: 14px; }
.stage-svg { width: 100%; height: auto; background: color-mix(in srgb, var(--on-ink) 4%, transparent); outline: 1px solid color-mix(in srgb, var(--on-ink) 14%, transparent); }
.process .stage-svg text { fill: var(--on-ink-muted); }
.process .hatch-line { stroke: color-mix(in srgb, var(--on-ink) 26%, transparent); }
.subgrade { fill: var(--subgrade); }
.process .subgrade { fill: color-mix(in srgb, var(--on-ink) 6%, transparent); }
.process .work { fill: color-mix(in srgb, var(--on-ink) 12%, transparent); }
.process .topsoil { fill: color-mix(in srgb, var(--on-ink) 22%, transparent); }
.ghost { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 6; }
.process .ghost { stroke: var(--on-ink-muted); }
.dot-red { fill: var(--accent); }
.mill { fill: var(--on-ink); }
.mill-arrow, .roll-arrow { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.profile { stroke: var(--on-ink); stroke-width: 2.5; fill: none; }
.terra-layer { fill: var(--terra); }
.st { opacity: 0; transition: opacity 600ms var(--ease-out); }
.stage[data-stage="1"] .st-topsoil { opacity: 0; }
.stage[data-stage="1"] .st-ghost, .stage[data-stage="2"] .st-ghost, .stage[data-stage="3"] .st-ghost, .stage[data-stage="4"] .st-ghost { opacity: 1; }
.stage[data-stage="2"] .st-mix, .stage[data-stage="2"] .st-mill { opacity: 1; }
.stage[data-stage="3"] .st-mix, .stage[data-stage="3"] .st-profile { opacity: 1; }
.stage[data-stage="4"] .st-solid, .stage[data-stage="4"] .st-roll { opacity: 1; }
.stage[data-stage="0"] .st-topsoil { opacity: 1; }
.st-dim { transition: opacity 600ms var(--ease-out); opacity: 0; }
.stage[data-stage="2"] .st-dim, .stage[data-stage="3"] .st-dim, .stage[data-stage="4"] .st-dim { opacity: 1; }
.process .dim text { fill: var(--accent); }
.process .dim line { stroke: var(--accent); }
.stage-caption { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 0; color: var(--on-ink); font-size: var(--fs-body); }
.stage-count { font-family: var(--font-mono); font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.stage-n { font-weight: 600; }
.stage-dots { display: flex; gap: 6px; }
.stage-dots li { flex: 1; height: 3px; background: color-mix(in srgb, var(--on-ink) 18%, transparent); transition: background 300ms; }
.stage[data-stage="1"] [data-dot="1"], .stage[data-stage="2"] [data-dot="1"], .stage[data-stage="2"] [data-dot="2"],
.stage[data-stage="3"] [data-dot="1"], .stage[data-stage="3"] [data-dot="2"], .stage[data-stage="3"] [data-dot="3"],
.stage[data-stage="4"] li { background: var(--accent); }
@media (max-width: 899px) { .process-grid .stage { position: sticky; top: calc(var(--header-height) + 8px); z-index: 2; background: var(--ink-field); padding-bottom: 10px; } }

/* ---------- comparison ---------- */
.tabs { display: grid; gap: 0; }
.tablist { display: flex; flex-wrap: wrap; border-bottom: 2px solid var(--ink); }
.tablist [role="tab"] {
  appearance: none; background: transparent; border: 0; cursor: pointer; padding: 14px 18px 12px;
  font-family: var(--font-mono); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  border-bottom: 4px solid transparent; margin-bottom: -2px;
}
.tablist [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tablist [role="tab"]:hover { color: var(--ink); }
.tabpanel { display: grid; gap: 18px; padding: clamp(24px, 3vw, 40px) 0; }
.tabpanel + .tabpanel { border-top: 1px solid var(--line); }
.js .tabpanel[hidden] { display: none; }
.js .tabpanel + .tabpanel { border-top: 0; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart-label { text-transform: uppercase; letter-spacing: 0.08em; fill: var(--muted) !important; }
.chart-value { fill: var(--ink) !important; font-weight: 600; font-size: 17px !important; }
.chart-red { fill: var(--accent-text) !important; }
.chart-on-red { fill: var(--accent-on-fill) !important; }
.grow { transform-box: fill-box; transform-origin: left center; }
.js .tabpanel:not([hidden]) .grow { animation: grow 900ms var(--ease-out) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.truck rect { fill: none; stroke: var(--accent); stroke-width: 2; }
.truck path { stroke: var(--accent); stroke-width: 2; }
.js .tabpanel:not([hidden]) .truck { animation: pop 420ms var(--ease-out) both; animation-delay: calc(var(--i) * 12ms); }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
.truck { transform-box: fill-box; transform-origin: center; }
.trucks-legend { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: baseline; }
.mat { display: grid; gap: 24px; }
@media (min-width: 760px) { .mat { grid-template-columns: 1fr 1fr; gap: 48px; } }
.mat > div { display: grid; gap: 12px; align-content: start; padding-top: 12px; border-top: 2px solid var(--ink); }
.mat .mat-terra { border-top-color: var(--accent); }
.mat-list { counter-reset: m; display: grid; gap: 10px; }
.mat-list li { counter-increment: m; display: grid; grid-template-columns: 2.2rem 1fr; font-size: var(--fs-lead); }
.mat-list li::before { content: counter(m, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); padding-top: 0.25em; }

.estimator { margin-top: clamp(24px, 3vw, 40px); display: grid; gap: 22px; padding: clamp(22px, 3vw, 36px); background: var(--surface-2); border-left: 4px solid var(--accent); }
.est-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.est-range { display: grid; gap: 10px; grid-template-columns: 1fr auto; align-items: center; }
.est-range .label { grid-column: 1 / -1; }
.est-len { font-family: var(--font-mono); font-size: 1.1rem; min-width: 6.5ch; text-align: right; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--ink); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; background: var(--accent-fill); border: 2px solid var(--bg); outline: 1.5px solid var(--accent-fill); border-radius: 0; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; background: var(--accent-fill); border: 2px solid var(--bg); border-radius: 0; }
.est-out { display: grid; gap: 12px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .est-out { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.est-out > div { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-strong); }
.est-out dt { font-size: var(--fs-small); color: var(--muted); }
.est-out dd { font-family: var(--font-mono); color: var(--muted); }
.est-out b { font-family: var(--font-display); font-stretch: 72%; font-weight: 820; font-size: clamp(2rem, 1.5rem + 2vw, 3.2rem); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.est-out .est-terra b { color: var(--accent-text); }

/* ---------- cross-section ---------- */
.defs { position: absolute; width: 0; height: 0; }
.xs { margin: 0; display: grid; gap: 14px; }
.xs-heads { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.xs-heads p { margin: 0 0 12px; }
.xs-heads p:last-child { text-align: right; }
.xs-stage { position: relative; aspect-ratio: 1200 / 520; min-height: 300px; overflow: hidden; background: var(--bg); outline: 1px solid var(--line-strong); user-select: none; }
.xs-pane { position: absolute; inset: 0; }
.xs-pane-terra { clip-path: inset(0 0 0 var(--pos)); }
.xs-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.xs-bg { fill: var(--bg); }
.l1 { fill: var(--layer-1); } .l2 { fill: var(--layer-2); } .l3 { fill: var(--layer-3); } .l4 { fill: var(--layer-4); } .l5 { fill: var(--layer-5); }
.xs .hatch-line { stroke: var(--hatch); }
.hatch-faint { opacity: 0.6; }
.dot { fill: var(--hatch); }
.surface-opt { fill: var(--surface-2); stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 8 6; vector-effect: non-scaling-stroke; }
.xs .ghost { vector-effect: non-scaling-stroke; }
.xs-layer { transition: opacity 240ms var(--ease-out); }
.xs[data-focus] .xs-layer { opacity: 0.28; }
.xs[data-focus] .xs-layer.is-focus { opacity: 1; }
.xs-tags { position: absolute; inset: 0; pointer-events: none; }
.xs-tag {
  position: absolute; left: 12px; transform: translateY(-50%);
  padding: 2px 7px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; line-height: 1.3;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line-strong); white-space: nowrap;
}
.xs-tag-r { left: auto; right: 12px; }
.xs-tag-terra { background: var(--terra); color: var(--terra-ink); border-color: var(--terra); }
.xs-ghost { border-style: dashed; color: var(--muted); }
.xs-dim { position: absolute; right: 30%; width: 0; border-left: 1.5px solid var(--terra-ink); }
.xs-dim::before, .xs-dim::after { content: ""; position: absolute; left: -8px; width: 15px; height: 1.5px; background: var(--terra-ink); }
.xs-dim::before { top: 0; } .xs-dim::after { bottom: 0; }
.xs-dim span { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--terra-ink); white-space: nowrap; }
.xs-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; border-left: 2px solid var(--accent); pointer-events: none; }
.xs-handle span { position: absolute; top: 50%; left: -16px; width: 30px; height: 30px; transform: translateY(-50%); background: var(--accent-fill); }
.xs-handle span::before, .xs-handle span::after { content: ""; position: absolute; top: 10px; border: 5px solid transparent; }
.xs-handle span::before { left: 2px; border-right-color: var(--accent-on-fill); }
.xs-handle span::after { right: 2px; border-left-color: var(--accent-on-fill); }
.xs-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.xs-range:focus-visible + .xs-handle, .xs-stage:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.no-js .xs-pane-terra { clip-path: inset(0 0 0 50%); }
@media (max-width: 640px) {
  .xs-stage { aspect-ratio: auto; height: 380px; }
  .xs-tag { font-size: 10.5px; left: 6px; max-width: 46%; white-space: normal; }
  .xs-tag-r { right: 6px; left: auto; text-align: right; }
  .xs-dim { right: auto; left: calc(var(--pos) + 18px); }
  .xs-dim span { display: none; } /* depth is in the layer list below; no room beside the tag */
}
.layers { display: grid; gap: 32px; margin-top: clamp(28px, 3vw, 44px); }
@media (min-width: 900px) { .layers { grid-template-columns: 1fr 1fr; gap: 56px; } }
.layers > div { display: grid; gap: 12px; align-content: start; }
.layer-list { display: grid; }
.layer-list li { border-top: 1px solid var(--line-strong); padding-block: 10px 12px; }
.layer-btn { appearance: none; display: flex; gap: 12px; align-items: center; width: 100%; padding: 4px 0; background: none; border: 0; cursor: pointer; text-align: left; font-weight: 700; }
.layer-btn:hover .layer-name, .layer-btn[aria-pressed="true"] .layer-name { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.layer-swatch { flex: none; width: 22px; height: 14px; outline: 1px solid var(--line-strong); }
.sw-c0 { background: var(--layer-1); } .sw-c1 { background: var(--layer-2); } .sw-c2 { background: var(--layer-3); } .sw-c3 { background: var(--layer-4); } .sw-c4 { background: var(--layer-5); }
.sw-t0 { background: var(--surface-2); outline: 1.5px dashed var(--ink); } .sw-t1 { background: var(--terra); outline-color: var(--terra); } .sw-t2 { background: var(--subgrade); }
.layer-text { padding-left: 34px; font-size: var(--fs-small); color: var(--muted-strong); }

/* ---------- map ---------- */
.map-grid { display: grid; gap: clamp(28px, 4vw, 56px); }
@media (min-width: 1000px) { .map-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start; } .map-intro { position: sticky; top: calc(var(--header-height) + 32px); } }
.demo-note { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-small); color: var(--muted-strong); padding: 12px 0; border-block: 1px dashed var(--line-strong); }
.pcards { display: grid; }
.pcard { appearance: none; width: 100%; display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 12px; align-items: center; padding: 14px 0; background: none; border: 0; border-top: 1px solid var(--line-strong); cursor: pointer; text-align: left; }
.pcards li:last-child .pcard { border-bottom: 1px solid var(--line-strong); }
.pcard-n { font-family: var(--font-mono); color: var(--accent-text); font-weight: 600; }
.pcard-body { display: grid; gap: 2px; }
.pcard-title { font-weight: 700; }
.pcard-meta { font-size: var(--fs-small); color: var(--muted); }
.pcard:hover .pcard-title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.map { margin: 0; display: grid; gap: 10px; }
.map-canvas { position: relative; width: 100%; outline: 1px solid var(--line-strong); }
.map-canvas svg { width: 100%; height: 100%; }
.map-sea { fill: var(--map-sea); }
.map-grat { fill: none; stroke: var(--grid-strong); stroke-width: 0.8; }
.map-land { fill: var(--map-land); stroke: var(--map-edge); stroke-width: 0.6; }
.map-hi { fill: var(--map-land-hi); stroke: var(--map-edge); stroke-width: 0.6; }
.spot { position: absolute; transform: translate(-14px, -50%); display: flex; align-items: center; gap: 8px; padding: 6px; background: none; border: 0; cursor: pointer; color: var(--ink); }
.spot-dot { position: relative; display: block; width: 16px; height: 16px; background: var(--accent-fill); outline: 3px solid var(--bg); }
.spot-dot::after { content: ""; position: absolute; inset: -9px; border: 1.5px solid var(--accent); animation: ping 2.4s var(--ease-out) infinite; }
.spot-dot-static { display: inline-block; vertical-align: -3px; width: 12px; height: 12px; outline-width: 2px; }
.spot-dot-static::after { display: none; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 1; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.spot-label { font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding: 3px 7px; background: var(--bg); border: 1px solid var(--line-strong); white-space: nowrap; letter-spacing: 0.02em; }
.spot-demo { color: var(--accent-text); text-transform: uppercase; }
.spot:hover .spot-label, .spot:focus-visible .spot-label { border-color: var(--accent); }
.spot:focus-visible { outline-offset: 0; }
.spot-left { flex-direction: row-reverse; transform: translate(calc(-100% + 14px), -50%); }
.map-legend { display: flex; gap: 8px; align-items: center; margin: 0; }
@media (max-width: 640px) { .spot-label { font-size: 10.5px; padding: 2px 5px; } .spot { gap: 4px; } }

/* lightbox */
.lightbox { width: min(1040px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); overflow: auto; }
.lightbox::backdrop { background: rgba(11, 11, 11, 0.72); backdrop-filter: blur(3px); }
.lightbox[open] { animation: lb-in 320ms var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.lb-inner { display: grid; }
@media (min-width: 860px) { .lb-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.lb-media { position: relative; margin: 0; background: var(--surface-2); }
.lb-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.lb-media figcaption { position: absolute; left: 12px; bottom: 12px; margin: 0; }
.lb-media .tag-dashed { background: var(--bg); color: var(--ink); border-color: var(--ink); }
.lb-body { display: grid; gap: 14px; align-content: start; padding: clamp(22px, 3vw, 36px); }
.lb-badges { display: flex; gap: 10px; align-items: center; }
.lb-country { color: var(--muted-strong); }
.lb-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.lb-stats > div { padding: 8px 0; border-top: 1px solid var(--line); }
.lb-stats dt { font-size: var(--fs-micro); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.lb-stats dd { font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-small); }
.lightbox:has(.lb-film) { width: min(1200px, calc(100vw - 24px)); background: var(--ink-field); }
.lb-inner:has(.lb-film) { grid-template-columns: minmax(0, 1fr); }
.lb-film { margin: 0; }
.lb-film video { display: block; width: 100%; height: auto; max-height: calc(100svh - 24px); aspect-ratio: 848 / 464; background: var(--ink-field); }
.lb-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; background: var(--bg); color: var(--ink); border: 1px solid var(--line-strong); cursor: pointer; }
.lb-close svg { width: 18px; height: 18px; }

/* ---------- demo projects board ---------- */
.demo-board { position: relative; border: 1px solid var(--line); }
.demo-board .board { border: 0; min-width: 920px; }
.board caption { caption-side: top; text-align: left; padding: 14px 18px; font-size: var(--fs-small); color: var(--muted); border-bottom: 1px solid var(--line); background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--accent-soft) 10px 20px); }
.ribbon { display: inline-block; margin-right: 10px; padding: 3px 10px; background: var(--accent-fill); color: var(--accent-on-fill); font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.board th[scope="row"] { font-weight: 700; }
.board td, .board th[scope="row"] { font-size: var(--fs-small); }
.board td.num-cell { font-family: var(--font-mono); }
.board .row-tag { display: inline-flex; padding: 3px 8px; margin-bottom: 6px; }
.row-title { display: block; }
.row-meta { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-micro); margin-top: 2px; }

/* ---------- benefits ---------- */
.field { border-radius: var(--radius); }
.field-n { font-family: var(--font-mono); font-size: var(--fs-small); font-weight: 600; opacity: 0.8; }
.field .h3 { text-transform: uppercase; font-stretch: 78%; font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.5rem); line-height: 1; }
.field .text-link { color: inherit; font-size: var(--fs-small); }
.field-2 .fn, .field-3 .fn { color: inherit; }
.field-3 .text-link { text-decoration-color: var(--accent); }

/* ---------- certificates ---------- */
.cert { gap: 12px; }
.cert-seal svg { width: 64px; height: 64px; }
.cert-seal circle { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 4; }
.cert-seal text { font-family: var(--font-mono); font-size: 14px; fill: var(--muted); }
.cert.is-placeholder { border-top-style: dashed; }
.cert-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- FAQ ---------- */
.faq summary { font-weight: 700; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem); }
.faq summary::after { color: var(--accent-text); font-family: var(--font-mono); }

/* ---------- contact ---------- */
.contact-band .brief { background: transparent; border-color: color-mix(in srgb, var(--on-ink) 22%, transparent); align-items: start; }
@media (min-width: 900px) { .contact-band .brief { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
.contact-band .kv > div { border-color: color-mix(in srgb, var(--on-ink) 16%, transparent); }
.contact-band .kv dt { color: var(--on-ink-muted); }
.lead-form { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .fld-wide { grid-column: 1 / -1; } }
.fld { display: grid; gap: 6px; font-size: var(--fs-small); color: var(--on-ink-muted); }
.fld input, .fld select, .fld textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 1rem; color: var(--on-ink);
  background: color-mix(in srgb, var(--on-ink) 6%, transparent); border: 0; border-bottom: 1.5px solid color-mix(in srgb, var(--on-ink) 45%, transparent); border-radius: 0;
}
.fld select option { color: #111111; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-bottom-color: var(--accent); background: color-mix(in srgb, var(--on-ink) 10%, transparent); }
.fld [aria-invalid="true"] { border-bottom-color: var(--accent); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-small); color: var(--on-ink-muted); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent-fill); flex: none; }
.req { color: var(--accent); }
.form-req { color: var(--on-ink-muted); }
.form-submit { justify-self: start; min-width: 220px; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status.is-ok { color: var(--on-ink); }
.form-status.is-err { color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 32px; margin-bottom: 32px; border-bottom: 2px solid var(--ink); }
.footer-tagline { font-family: var(--font-display); font-stretch: 72%; font-weight: 820; text-transform: uppercase; font-size: clamp(1.6rem, 1.1rem + 2vw, 3rem); line-height: 0.95; max-width: 18ch; }
.footer-cols h2 { font-family: var(--font-mono); font-weight: 600; }
.footnote { margin-top: 40px; max-width: 90ch; font-size: var(--fs-micro); color: var(--muted); }
.footer-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-strong); }
