/* ==========================================================================
   ArchRay Official Website v2 — Impeccable Architectural Studio Stylesheet
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.24s var(--ease-out), color 0.24s var(--ease-out);
}

/* ---- Typographic Discipline ---- */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink-strong);
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.04;
  text-wrap: balance;
}

html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2 {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Albert Sans', sans-serif;
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.22;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3.4rem, 5.8vw, 5.25rem);
}

html[lang="zh-CN"] h1 {
  font-size: clamp(2.35rem, 3.8vw, 3.35rem);
}

h2 {
  font-size: clamp(2.35rem, 4.2vw, 3.55rem);
}

html[lang="zh-CN"] h2 {
  font-size: clamp(1.85rem, 3.1vw, 2.65rem);
}

h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

p {
  margin: 0;
  max-width: 66ch;
  color: var(--ink-muted);
  text-wrap: pretty;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

a {
  color: inherit;
}

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

.wrap {
  width: min(1260px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---- Sticky Gallery Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in oklab, var(--bg-page) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.scroll-progress-bar {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--amber-border));
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  transition: transform 0.08s linear;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink-strong);
}

.brand-glyph {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: var(--ink-strong);
  color: var(--bg-page);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.16s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink-strong);
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-strong);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--line-strong); }
.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: 0 1px 2px oklch(0% 0 0 / 0.03);
}
.lang-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  flex: 0 0 auto;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: background 0.16s var(--ease-out), color 0.16s var(--ease-out);
}
.lang-option:hover { color: var(--ink-strong); }
.lang-option.is-active {
  background: var(--ink-strong);
  color: var(--bg-page);
}
.lang-option.is-active:hover { color: var(--bg-page); }
@media (max-width: 640px) {
  .lang-switch { padding: 2px; }
  .lang-option { min-width: 27px; padding: 4px 6px; font-size: 0.7rem; }
}
.pill-ctl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-strong);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px oklch(0% 0 0 / 0.03);
  transition: border-color 0.16s var(--ease-out), transform 0.16s var(--ease-out);
}

.pill-ctl:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.star-glyph {
  color: var(--amber);
}

/* ---- Editorial Section Cadence ---- */
.section-band {
  padding-top: 88px;
  padding-bottom: 88px;
}

.section-band + .section-band {
  border-top: 1px solid var(--line);
}

.hero-band {
  padding-top: 64px;
  padding-bottom: 72px;
}

.section-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.section-intro-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-intro-copy p {
  font-size: 1.04rem;
}

/* ---- Hero: Annotated Artifact Stage (Left) + Editorial Copy (Right) ---- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}

.hero-stage-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.artifact-frame-outer {
  position: relative;
  width: 100%;
  max-width: 580px;
  padding: 22px 18px 22px 44px;
  transform: translate3d(0, var(--hero-parallax, 0px), 0);
  transition: transform 0.18s var(--ease-out);
  will-change: transform;
}

.arc-badge {
  position: absolute;
  width: 72px;
  height: 72px;
  pointer-events: none;
  color: var(--ink-muted);
  z-index: 2;
}

.arc-badge.is-before {
  top: -8px;
  left: 16px;
}

.arc-badge.is-after {
  bottom: -8px;
  right: -4px;
}

/* Floating Amber Callout Pins on Left Margin (Impeccable signature) */
.callout-rail {
  position: absolute;
  left: 0;
  top: 58px;
  bottom: 52px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out);
}

.callout-pin {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.callout-chip {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--amber);
  color: var(--amber-ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 4px 12px oklch(0% 0 0 / 0.12);
  white-space: nowrap;
}

.callout-leader {
  width: 22px;
  height: 1.5px;
  background: var(--amber);
}

.compare-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.1;
  min-height: 330px;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.compare-layer {
  position: absolute;
  inset: 10px;
  border-radius: var(--r-sm);
  overflow: hidden;
}

.compare-layer svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Left of split = BEFORE (AI spaghetti); Right of split = AFTER (ArchRay 3D) */
.compare-before-pane {
  clip-path: inset(0 calc(100% - var(--split, 28%)) 0 0);
  z-index: 4;
}

.compare-card.is-animating .compare-before-pane,
.compare-card.is-animating .compare-after-pane {
  transition: clip-path 0.42s var(--ease-out);
}

.compare-after-pane {
  clip-path: inset(0 0 0 var(--split, 28%));
  z-index: 2;
  background: var(--surface);
}

.after-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.975) translateY(8px);
  pointer-events: none;
  transition: opacity 0.32s var(--ease-out), transform 0.36s var(--ease-out), visibility 0s linear 0.32s;
}

.after-scene.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  transition: opacity 0.32s var(--ease-out), transform 0.36s var(--ease-out), visibility 0s linear 0s;
}

.compare-seam {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: var(--split, 28%);
  width: 2.5px;
  background: var(--amber);
  z-index: 6;
  transform: translateX(-50%);
  cursor: ew-resize;
  transition: background-color 0.28s var(--ease-out);
}

.compare-card.is-animating .compare-seam {
  transition: left 0.42s var(--ease-out), background-color 0.28s var(--ease-out);
}

.compare-grip {
  position: absolute;
  top: 86%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 30px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 2px solid var(--amber);
  color: var(--ink-strong);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px oklch(0% 0 0 / 0.16);
  transition: border-color 0.28s var(--ease-out), transform 0.18s var(--ease-out);
}

.compare-card:hover .compare-grip {
  transform: translate(-50%, -50%) scale(1.05);
}

/* Tactile Machined Hardware Mode Switcher Beneath Artifact */
.hero-presets {
  justify-content: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-subtle);
}
.hero-presets .preset-btn {
  padding: 7px 14px;
}
.hero-switcher-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lens-caption {
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-align: center;
  min-height: 1.35em;
  transition: color 0.2s var(--ease-out);
}

/* Stage Parity Pill */
.stage-parity-badge {
  position: absolute;
  top: 4px;
  right: 26px;
  z-index: 9;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: oklch(14% 0.015 260 / 0.88);
  color: oklch(93% 0.01 250);
  border: 1px solid oklch(45% 0.08 250 / 0.45);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 4px 14px oklch(0% 0 0 / 0.16);
}

/* Hero Right Editorial Copy — Focused First-Principles Hero */
.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Compact hero assurance and proof line: one voice per row. */
.hero-assurance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
}
.hero-assurance .free-badge {
  align-self: center;
}
.hero-assurance .hero-cap-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.hero-assurance .cap-check {
  color: var(--emerald-text);
  font-weight: 700;
}
.hero-proof-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}
.hero-proof-line > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.hero-proof-line b {
  flex: 0 0 auto;
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-proof-line span span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-install-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  font-size: 0.88rem;
}
.hero-install-link span:last-child {
  color: var(--amber);
  font-weight: 700;
}
@media (max-width: 1080px) {
  .hero-proof-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .nav-github { display: none; }
  .brand-name { display: none; }
}

@media (max-width: 640px) {
  .hero-proof-line { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
  .hero-proof-line span span { white-space: normal; }
  .hero-assurance { gap: 7px 11px; font-size: 0.78rem; }
}
.hero-lead {
  font-size: 1.06rem;
  line-height: 1.72;
  color: var(--ink);
  max-width: 48ch;
}

.hero-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 0;
}

.hero-free-banner {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--r-pill);
  background: var(--emerald-soft);
  color: var(--emerald-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.free-badge {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--emerald);
  color: oklch(14% 0.02 168);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.hero-cap-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.hero-cap-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-strong);
}

.cap-check {
  color: var(--emerald-text);
  font-family: var(--font-sans);
  font-weight: 700;
}

.prompt-caret {
  color: var(--amber-on-dark);
  font-weight: 700;
  margin-right: 4px;
}

.hero-support {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 2px;
}

.hero-support-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.hero-support-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.hero-support-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  cursor: default;
  user-select: none;
}

.agent-logo {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2px;
}

.btn-ink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border-radius: 8px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  border: 1px solid var(--cta-bg);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s var(--ease-out), transform 0.16s var(--ease-out);
}

.btn-ink:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

.btn-ink .arrow-amber {
  color: var(--amber);
  font-family: var(--font-sans);
  font-weight: 700;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 8px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-strong);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px oklch(0% 0 0 / 0.03);
  transition: transform 0.16s var(--ease-out), border-color 0.16s var(--ease-out), background-color 0.16s var(--ease-out);
}

.btn-outline:hover {
  transform: translateY(-1px);
  border-color: var(--ink-strong);
  background: var(--bg-subtle);
}

.btn-outline .arrow-down {
  font-family: var(--font-sans);
  font-weight: 700;
}

.link-plain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-strong);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.16s var(--ease-out);
}

.link-plain:hover {
  border-color: var(--ink-strong);
}

/* Compatible AI Coding Hosts Icon Strip */
.agent-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 6px;
}

.agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink-strong);
  box-shadow: 0 1px 2px oklch(0% 0 0 / 0.03);
}

.agent-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---- Proof Strip (Compact 4-Metric Ribbon) ---- */
.proof-ribbon {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.proof-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.proof-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.proof-kpi {
  font-family: var(--font-display);
  font-size: 2.05rem;
  font-weight: 300;
  line-height: 1;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.proof-kpi > span {
  white-space: nowrap;
}

.proof-kpi-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--bg-subtle);
  color: var(--ink-muted);
}

.proof-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.proof-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
}

/* ---- Section 2: Pain-Point Detector Bento Mosaic (Breathing Dual-State Switch) ---- */
@keyframes detectorBreatheAmber {
  0%, 100% {
    box-shadow: 0 0 0 0 oklch(81% 0.175 82 / 0.45), 0 6px 20px oklch(81% 0.175 82 / 0.14);
  }
  50% {
    box-shadow: 0 0 0 7px oklch(81% 0.175 82 / 0), 0 8px 26px oklch(81% 0.175 82 / 0.34);
  }
}

@keyframes detectorBreatheEmerald {
  0%, 100% {
    box-shadow: 0 0 0 0 oklch(68% 0.15 168 / 0.45), 0 6px 20px oklch(68% 0.15 168 / 0.14);
  }
  50% {
    box-shadow: 0 0 0 7px oklch(68% 0.15 168 / 0), 0 8px 26px oklch(68% 0.15 168 / 0.34);
  }
}

.detector-switch-pod {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1.5px solid var(--amber-border);
  animation: detectorBreatheAmber 2.4s ease-in-out infinite;
  transition: border-color 0.22s var(--ease-out), background-color 0.22s var(--ease-out);
}

.detector-switch-pod[data-state="after"] {
  border-color: var(--emerald);
  animation: detectorBreatheEmerald 2.4s ease-in-out infinite;
}

.pod-side {
  border: 0;
  background: transparent;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.18s var(--ease-out), background-color 0.18s var(--ease-out);
}

.pod-side.is-active {
  color: var(--ink-strong);
  font-weight: 700;
  background: var(--bg-subtle);
}

.detector-switch-pod[data-state="after"] .pod-side.is-after.is-active {
  color: var(--emerald-text);
  background: var(--emerald-soft);
}

.switch-track {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: var(--r-pill);
  background: var(--amber);
  border: 1px solid var(--amber-border);
  padding: 3px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.switch-track[aria-checked="true"] {
  background: var(--emerald);
  border-color: var(--emerald);
}

.switch-thumb {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 6px oklch(0% 0 0 / 0.2);
  transform: translateX(0);
  transition: transform 0.22s var(--ease-out);
}

.switch-track[aria-checked="true"] .switch-thumb {
  transform: translateX(24px);
}

.switch-thumb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-border);
}

.switch-track[aria-checked="true"] .switch-thumb-dot {
  background: var(--emerald);
}

.detector-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0 14px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.detector-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.detector-count { color: var(--ink-strong); }
.detector-dots { display: inline-flex; gap: 5px; }
.detector-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
  opacity: 0.55;
  transition: background-color 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}
.detector-dots i.is-done { background: var(--emerald); opacity: 1; }
.detector-control .detector-switch-pod { animation: none; }
.specimen-mosaic.is-resolved .specimen-cell {
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--emerald) 24%, transparent);
}
.specimen-mosaic.is-resolved .specimen-tag {
  background: var(--emerald-soft);
  color: var(--emerald-text);
}
.specimen-mosaic.is-resolved .specimen-code { color: var(--emerald-text); }
@media (max-width: 640px) {
  .detector-control { align-items: flex-start; flex-direction: column; }
}
.specimen-mosaic {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  grid-template-rows: auto auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.specimen-cell {
  position: relative;
  padding: 32px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.specimen-cell.span-tall {
  grid-row: span 2;
  background: var(--tint-sand);
}

.specimen-cell.tone-grid {
  background-color: var(--tint-blueprint);
}

.specimen-graphic {
  width: 100%;
  padding: 6px 0;
}

.specimen-graphic svg {
  width: 100%;
  height: 168px;
  display: block;
}

.specimen-cell.tone-slate { background: var(--tint-slate); }
.specimen-cell.tone-cream { background: var(--tint-cream); }
.specimen-cell.tone-sage { background: var(--tint-sage); }

.specimen-cell:nth-child(3),
.specimen-cell:nth-child(5) {
  border-right: 0;
}

.specimen-cell:nth-child(1),
.specimen-cell:nth-child(4),
.specimen-cell:nth-child(5) {
  border-bottom: 0;
}

.specimen-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--amber);
  color: var(--amber-ink);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.specimen-mosaic.is-resolved {
  border-color: var(--emerald);
}

.specimen-mosaic.is-resolved .specimen-tag {
  background: var(--emerald-soft);
  color: var(--emerald-text);
}

.specimen-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 20px 22px;
  box-shadow: 0 2px 10px oklch(0% 0 0 / 0.03);
}

.specimen-title {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink-strong);
  margin-bottom: 7px;
  line-height: 1.38;
}

.specimen-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

.specimen-code {
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.specimen-mosaic.is-resolved .specimen-code {
  background: var(--emerald-soft);
  color: var(--emerald-text);
}

/* ---- Section 2: Command Composer & Tactile Hardware Console ---- */
.studio-console {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.command-composer {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.combo-preset-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.composer-output {
  display: grid;
  grid-template-columns: auto minmax(280px, 420px) minmax(0, 1fr);
  align-items: center;
  gap: 12px 16px;
}

.composer-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-strong);
  white-space: nowrap;
}

.composer-pill {
  padding: 11px 14px;
}

.combo-preset-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-right: 4px;
}

.combo-pill {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg-page);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.combo-pill:hover {
  border-color: var(--line-strong);
  background: var(--bg-subtle);
}

.combo-pill.is-combo {
  border-style: dashed;
}

.combo-pill.is-active {
  background: var(--ink-strong);
  color: var(--bg-page);
  border-color: var(--ink-strong);
  border-style: solid;
}

.console-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: stretch;
}

.spatial-preview-well {
  background: var(--bg-console);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  transition: transform 0.24s var(--ease-out);
  will-change: transform;
}

.well-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fader-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.fader-inline strong { font-family: var(--font-mono); }
.fader-inline input[type="range"] {
  width: 120px;
  accent-color: var(--emerald);
  cursor: pointer;
}

.iso-stack-svg {
  width: 100%;
  height: 270px;
  display: block;
}

.console-inspector {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 4px;
}

.inspector-layer-id {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  color: var(--ink-strong);
}

.terminal-pill {
  min-width: 0;
  background: var(--surface-terminal);
  color: var(--ink-on-dark);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.83rem;
}

.terminal-pill code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.terminal-pill.install-command {
  align-items: flex-start;
}
.install-layout > * { min-width: 0; }
.terminal-pill.install-command code {
  width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.55;
}
.ledger-pane { min-width: 0; }
.install-card .terminal-pill {
  align-items: flex-start;
}
.install-card .terminal-pill code {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  overflow: visible;
  text-overflow: clip;
}
.install-verify {
  margin-top: -6px;
  color: var(--ink-faint);
  font-size: 0.74rem;
  line-height: 1.45;
}
.install-maint {
  margin-top: 2px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.install-maint summary {
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.install-maint summary:hover { color: var(--ink-strong); }
.install-maint .terminal-pill { margin-top: 10px; }
.cmd-highlight {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: oklch(81% 0.175 82 / 0.22);
  color: var(--amber-on-dark);
}

.copy-icon-btn {
  background: transparent;
  border: 1px solid var(--line-dark);
  color: var(--ink-on-dark-muted);
  border-radius: 6px;
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.16s var(--ease-out), border-color 0.16s var(--ease-out);
}

.copy-icon-btn:hover {
  color: var(--ink-on-dark);
  border-color: var(--ink-on-dark-muted);
}

.inspector-hint {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-badge {
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--amber);
  color: var(--amber-ink);
}

.role-badge.is-neutral {
  background: var(--bg-subtle);
  color: var(--ink-muted);
  font-weight: 600;
}

/* Console Mode Bar + Hardware Keycap Matrix */
.console-details {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-console);
}
.console-details > summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  color: var(--ink-strong);
  font-size: 0.86rem;
  font-weight: 600;
}
.console-details > summary::-webkit-details-marker { display: none; }
.console-details > summary::after {
  content: '+';
  margin-left: auto;
  color: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 1rem;
}
.console-details[open] > summary {
  border-bottom: 1px solid var(--line);
}
.console-details[open] > summary::after { content: '−'; }
.console-details > summary small {
  color: var(--ink-muted);
  font-size: 0.74rem;
  font-weight: 500;
}
.console-details .console-deck-wrap {
  padding: 16px 18px 18px;
}
.console-details .keycap-deck {
  border: 0;
  padding: 0;
  background: transparent;
}
.console-deck-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.console-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.console-mode-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-toggle-btn,
.mode-reset-btn {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-page);
  color: var(--ink-strong);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.mode-toggle-btn[aria-pressed="true"] {
  background: var(--emerald-soft);
  border-color: var(--emerald);
  color: var(--emerald-text);
}

.mode-reset-btn:hover,
.mode-toggle-btn:hover {
  border-color: var(--ink-strong);
}

.console-mode-hint {
  font-size: 0.81rem;
  color: var(--ink-muted);
}

.keycap-deck {
  background: var(--bg-console);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.deck-bank {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bank-label {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--line);
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bank-keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

.hw-keycap {
  position: relative;
  padding: 12px 12px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-keycap);
  color: var(--ink-strong);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.12s var(--ease-out), border-color 0.16s var(--ease-out);
}

.hw-keycap:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.hw-keycap.is-active {
  border-color: var(--emerald);
  box-shadow: 0 0 0 1px var(--emerald), var(--shadow-keycap);
}

.keycap-led {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.hw-keycap.is-active .keycap-led {
  background: var(--emerald);
  outline: 3px solid var(--emerald-soft);
}

.keycap-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.keycap-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-strong);
}

/* ---- Section 4: Split Studio Window ("ArchRay in Action") + Live Sandbox ---- */
.action-window {
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-window);
  overflow: hidden;
}

.window-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
}

.traffic-lights {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.traffic-lights i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
  display: inline-block;
}

.window-url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: var(--r-xs);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.window-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-btn {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.preset-btn:hover {
  color: var(--ink-strong);
  border-color: var(--line-strong);
}

.preset-btn.is-active {
  background: var(--ink-strong);
  color: var(--bg-page);
  border-color: var(--ink-strong);
}

.session-strip {
  background: var(--surface-terminal);
  color: var(--ink-on-dark);
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  font-size: 0.84rem;
}

.session-strip-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.session-strip-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.77rem;
  color: var(--ink-on-dark-muted);
}

.session-strip-right .ok {
  color: var(--emerald);
}

.slash-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: oklch(81% 0.175 82 / 0.2);
  color: var(--amber-on-dark);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.slash-sub {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: oklch(68% 0.15 168 / 0.18);
  color: oklch(78% 0.13 168);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.live-iframe-stage {
  position: relative;
  background: oklch(12% 0.015 265);
  min-height: 640px;
}

.demo-iframe {
  width: 100%;
  height: 640px;
  border: 0;
  display: block;
}

.iframe-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 22px;
  background: linear-gradient(to top, oklch(10% 0.01 260 / 0.48), transparent 34%);
  cursor: pointer;
  transition: opacity 0.2s var(--ease-out);
}

.iframe-veil.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.veil-pill {
  padding: 9px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--amber);
  background: var(--surface);
  color: var(--ink-strong);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

/* ---- Section 5: Real Engineering Proof ("Built Around Real Repositories") ---- */
.real-repo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.real-repo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.18s var(--ease-out), border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.real-repo-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.repo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.repo-name {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-strong);
}

.repo-tag {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--bg-subtle);
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.repo-tag.is-emerald {
  background: var(--emerald-soft);
  color: var(--emerald-text);
}

.repo-metrics {
  font-family: var(--font-mono);
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--emerald-text);
}

.repo-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.repo-evidence {
  display: block;
  padding: 7px 10px;
  border-radius: var(--r-xs);
  background: var(--bg-subtle);
  font-size: 0.75rem;
  color: var(--ink-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arch-ledger {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ledger-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ledger-pane {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mini-terminal {
  border-radius: var(--r-sm);
  background: var(--surface-terminal);
  color: var(--ink-on-dark);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-term-head {
  padding-bottom: 8px;
  color: var(--ink-on-dark-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line-dark);
}

.mini-term-body {
  line-height: 1.65;
  color: var(--ink-on-dark-muted);
}

.mini-doc {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-page);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-doc-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--ink-muted);
}

.mini-doc-body {
  line-height: 1.65;
  color: var(--ink);
}

/* ---- Section 6: Clean 2-Column Install ("Install ArchRay") ---- */
.install-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.install-steps {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.install-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 8px 24px oklch(0% 0 0 / 0.03);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink-strong);
  color: var(--bg-page);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.host-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.host-pill {
  padding: 6px 13px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
}

.host-pill:hover {
  color: var(--ink-strong);
  background: var(--bg-subtle);
}

.host-pill.is-active {
  background: var(--bg-subtle);
  color: var(--ink-strong);
  border-color: var(--line-strong);
}

.install-points {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 100%;
}
.install-points li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.install-points b {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
}
.install-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.install-meta-box {
  padding: 12px 14px;
  border-radius: var(--r-xs);
  background: var(--bg-page);
  border: 1px solid var(--line);
}

.install-meta-box dt {
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.install-meta-box dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-strong);
  word-break: break-word;
}

.install-maint-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding-top: 4px;
}

/* ---- Share dialog & header trigger ---- */
.share-ctl svg { color: var(--amber-border); }
body.share-open { overflow: hidden; }

.share-dialog {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 42px 100px -28px oklch(10% 0.01 260 / 0.4);
  overflow: hidden;
}
.share-dialog::backdrop {
  background: oklch(10% 0.01 260 / 0.56);
  backdrop-filter: blur(10px);
}
.share-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  max-height: min(88vh, 680px);
  overflow: auto;
}
.share-media {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 18px;
  background: var(--surface-terminal);
}
.share-media::before {
  content: '';
  position: absolute;
  inset: -24px;
  background-image: var(--share-card-bg);
  background-position: center;
  background-size: cover;
  filter: blur(30px) saturate(0.82) brightness(0.5);
  opacity: 0.72;
  transform: scale(1.12);
}
.share-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, oklch(8% 0.01 260 / 0.2), oklch(8% 0.01 260 / 0.45));
}
.share-media img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 13px;
  box-shadow: 0 18px 40px -18px oklch(0% 0 0 / 0.6);
}
.share-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 26px 20px;
  overflow: auto;
}
.share-close {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.share-close:hover { color: var(--ink-strong); border-color: var(--line-strong); }
.share-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--amber-text, #8b6f2f);
}
html[lang="en"] .share-dialog .share-copy h2 { font-size: 2rem; }
.share-dialog .share-copy h2 {
  max-width: 350px;
  margin: 10px 0 0;
  padding-right: 22px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 2.5vw, 2.25rem);
  white-space: pre-line;
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
}
.share-lede {
  max-width: 340px;
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 0.83rem;
  line-height: 1.55;
}
.share-demo-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-top: 12px;
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--amber-border);
  padding-bottom: 2px;
}
.share-demo-link span:last-child { color: var(--amber-text, #8b6f2f); transition: transform 0.16s var(--ease-out); }
.share-demo-link:hover span:last-child { transform: translateX(3px); }
.share-caption-box {
  margin-top: 17px;
  padding: 12px 13px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-subtle);
}
.share-caption-head,
.share-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.share-caption-hint { letter-spacing: 0.04em; text-transform: none; }
.share-caption-box p {
  max-height: 94px;
  margin: 8px 0 9px;
  overflow: auto;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.62;
}
.share-link-row {
  padding-top: 9px;
  border-top: 1px solid var(--line);
  letter-spacing: 0.04em;
  text-transform: none;
}
.share-link-row a { color: var(--ink-strong); text-decoration: none; }
.share-link-row a:hover { text-decoration: underline; text-underline-offset: 3px; }
.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 16px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-strong);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s var(--ease-out), background 0.16s var(--ease-out);
}
.share-btn:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.share-btn.primary {
  grid-column: 1 / -1;
  min-height: 42px;
  border-color: var(--cta-bg);
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-size: 0.78rem;
}
.share-btn.primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.share-btn svg { flex: 0 0 auto; }
.share-status {
  min-height: 1.25em;
  margin: 10px 0 0;
  color: var(--emerald-text);
  font-size: 0.72rem;
  line-height: 1.4;
}
@media (min-width: 1081px) and (max-width: 1240px) {
  .share-ctl { padding: 7px 10px; }
  .share-ctl .hide-xs { display: none; }
}
@media (max-width: 760px) {
  .share-dialog { width: calc(100vw - 20px); max-height: 92vh; }
  .share-panel { grid-template-columns: 1fr; max-height: 92vh; }
  .share-media { padding: 10px 10px 0; }
  .share-media img { border-radius: 10px; }
  .share-copy { padding: 20px 18px 16px; overflow: visible; }
  .share-dialog .share-copy h2 { max-width: none; font-size: 1.85rem; }
  .share-lede { max-width: none; }
  .share-caption-box p { max-height: 108px; }
  .share-close { top: 8px; right: 8px; }
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.faq-item {
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 0;
  color: var(--ink-strong);
  font-size: 0.9rem;
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  float: right;
  color: var(--ink-faint);
  font-family: var(--font-sans);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  margin: 0;
  padding: 0 0 15px;
  color: var(--ink-muted);
  font-size: 0.86rem;
  line-height: 1.65;
}
@media (max-width: 720px) {
  .faq-grid { grid-template-columns: 1fr; }
}
/* ---- Section 7: Privacy Policy & Obsidian Creator Calling Card ---- */
.trust-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 24px;
  align-items: stretch;
}

.policy-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  box-shadow: var(--shadow-card);
}

.privacy-flow-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-sm);
  background: var(--tint-sage);
  padding: 14px;
}

.policy-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.policy-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.91rem;
  color: var(--ink-muted);
}

.policy-list strong {
  color: var(--ink-strong);
  font-weight: 600;
}

/* Matte-Obsidian Creator & Contact Calling Card */
.contact-card {
  background: var(--surface-terminal);
  color: var(--ink-on-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-xl);
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-window);
}

.creator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.creator-id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.creator-monogram {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--amber);
  color: var(--amber-ink);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.creator-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-on-dark);
  line-height: 1.2;
}

.creator-role {
  font-size: 0.82rem;
  color: var(--ink-on-dark-muted);
  margin-top: 3px;
}

.creator-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--surface-terminal-bar);
  border: 1px solid var(--line-dark);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-on-dark);
}

.creator-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-dark);
}

.contact-row:last-child {
  border-bottom: 0;
}

.contact-label-group {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  color: var(--ink-on-dark-muted);
}

.contact-val {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-on-dark);
  text-decoration: none;
}

.contact-val:hover {
  color: var(--amber-on-dark);
}

.contact-cta-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-amber-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--amber-ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: filter 0.16s var(--ease-out), transform 0.16s var(--ease-out);
}

.btn-amber-card:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--surface-terminal-bar);
  color: var(--ink-on-dark);
  border: 1px solid var(--line-dark);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.16s var(--ease-out), transform 0.16s var(--ease-out);
}

.btn-ghost-dark:hover {
  border-color: var(--ink-on-dark-muted);
  transform: translateY(-1px);
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  padding-bottom: 52px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.footer-links a:hover {
  color: var(--ink-strong);
}

/* ---- Scroll-Driven Immersion & Reduced Motion ---- */
.reveal-card {
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-card.will-reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.985);
}

.reveal-card.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* ---- Responsive Adaptation ---- */
@media (max-width: 1440px) and (min-width: 1241px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.86rem; }
}
@media (max-width: 1240px) {
  .nav-bar { position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 70;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow-window);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 10px 12px; border-radius: var(--r-xs); }
  .nav-links a:hover, .nav-links a.is-active { background: var(--bg-subtle); }
}
@media (max-width: 1080px) {
  .nav-bar { position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 70;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow-window);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 10px 12px; border-radius: var(--r-xs); }
  .nav-links a:hover, .nav-links a.is-active { background: var(--bg-subtle); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage-col { order: 2; }
  .hero-copy { order: 1; }
  .composer-output { grid-template-columns: 1fr; align-items: stretch; }
  .proof-ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.specimen-mosaic { grid-template-columns: 1fr; }
  .specimen-cell { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .specimen-cell:last-child { border-bottom: 0 !important; }
  .console-stage { grid-template-columns: 1fr; }
  .keycap-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .real-repo-grid { grid-template-columns: 1fr; }
  .action-split { grid-template-columns: 1fr; }
  .session-sidebar { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .ledger-top, .install-layout, .trust-contact-grid { grid-template-columns: 1fr; }
  .ledger-pane:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 360px) {
  .nav-github { display: none; }
  .brand-name { display: none; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .section-band { padding-top: 56px; padding-bottom: 56px; }
  .artifact-frame-outer { padding: 14px 4px 14px 4px; }
  .stage-parity-badge { top: -8px; right: 6px; }
  .callout-rail { display: none; }
  .arc-badge { display: none; }
  .proof-ribbon { grid-template-columns: 1fr; }
  .studio-console { padding: 20px 16px; }
  .spatial-preview-well { padding: 16px 12px; min-height: 290px; }
  .keycap-deck { grid-template-columns: 1fr; padding: 16px; }
  .real-repo-grid { grid-template-columns: 1fr; }
  .detector-switch-pod { border-radius: var(--r-md); padding: 10px 12px; gap: 8px; }
  .install-meta-grid, .contact-cta-group { grid-template-columns: 1fr; }
  .pill-ctl .hide-xs { display: none; }
  .nav-github span { display: none; }
  .nav-tools { gap: 6px; }
  .demo-iframe, .live-iframe-stage { height: 460px; min-height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .detector-switch-pod,
  .detector-switch-pod[data-state="after"],
  .switch-thumb-dot {
    animation: none !important;
  }
  .artifact-frame-outer,
  .spatial-preview-well,
  .reveal-card.will-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
