/* ==========================================================================
   Bimwright v2 — Full Interactive Architecture & Smooth Motion System
   ========================================================================== */

:root {
  --v2-ground: #f4f7fb;
  --v2-navy: #0e3e7e;
  --v2-deep: #0a2a55;
  --v2-green: #3f7a22;
  --v2-lime: #6aae3f;
  --v2-sky: #2ea3dc;
  --v2-amber: #d99100;
  --v2-red: #c62828;
  --v2-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Global scroll progress bar under fixed navbar */
.scroll-progress {
  position: fixed;
  top: var(--nav);
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}
.scroll-progress__bar {
  width: 100%;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--v2-navy) 0%, var(--v2-sky) 65%, var(--v2-lime) 100%);
  will-change: transform;
}

/* Frosted navbar with seamless logo blend */
.nav {
  background: rgba(244, 247, 251, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 8%, transparent);
  transition: background 240ms var(--ease);
}
.nav.is-scrolled { background: rgba(255, 255, 255, 0.92); }
.nav .nav__logo img { height: 34px; width: auto; mix-blend-mode: multiply; }
@media (max-width: 639px) { .nav .nav__logo img { height: 26px; } }

/* Shared eyebrow & reveal */
.v2-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-navy);
  font-weight: 500;
}
.ground-inverse .v2-eyebrow { color: #8fd1f4; }

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 620ms var(--v2-spring), transform 620ms var(--v2-spring);
}
[data-reveal].is-in { opacity: 1; transform: translate3d(0, 0, 0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Override system.css fixed-screen height on custom v2 sections */
main > section.v2-auto {
  position: relative;
  height: auto;
  min-height: 0;
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
main > section.v2-auto > .wrap {
  height: auto;
  display: block;
}
@media (max-width: 1023px) {
  main > section.v2-auto { padding: 64px 0; }
}

/* ==========================================================================
   1. HERO — Seamless ground + scroll-linked parallax depth
   ========================================================================== */
main > section.hero--v2 {
  position: relative;
  background: var(--v2-ground);
  height: auto;
  min-height: 100svh;
  padding: calc(var(--nav) + 32px) 0 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero--v2 .hero-v2__stage {
  position: absolute;
  inset: var(--nav) 0 0 0;
  max-width: 1520px;
  margin-inline: auto;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.hero--v2 .hero-v2__stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  transform: translateX(2%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero--v2 .hero-v2__stage img { animation: v2-hero-settle 920ms var(--v2-spring) both; }
}
@keyframes v2-hero-settle {
  from { opacity: 0; transform: translate3d(2%, 16px, 0) scale(0.985); }
  to   { opacity: 1; transform: translate3d(2%, 0, 0) scale(1); }
}
.hero--v2 > .wrap { position: relative; z-index: 2; height: auto; display: block; }
.hero--v2 .hero__text { max-width: 470px; will-change: transform; }
.hero--v2 h1 { font-size: clamp(38px, 3.2vw + 14px, 60px); line-height: 1.03; letter-spacing: var(--display-tracking-xl); }
.hero--v2 .hero__lead { max-width: 40ch; color: var(--ink); }
.hero--v2 .hero-v2__float {
  position: absolute;
  right: var(--gut);
  top: calc(var(--nav) + 28px);
  z-index: 3;
  width: 282px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px -18px rgba(15, 27, 45, 0.16);
  display: grid;
  gap: 4px;
  will-change: transform;
}
.hero--v2 .hero-v2__float .ly-live::before { animation: none; background: var(--v2-green); }

.hero-v2__cue {
  position: absolute;
  left: var(--gut);
  bottom: 24px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.hero-v2__cue.is-hidden { opacity: 0; transform: translateY(6px); pointer-events: none; }
.hero-v2__cue svg { width: 14px; height: 14px; animation: v2-bob 2.2s ease-in-out infinite; }
@keyframes v2-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .hero-v2__cue svg { animation: none; } }

.hero--v2 .hero-v2__mobile-art { display: none; }

@media (max-width: 1023px) {
  main > section.hero--v2 { min-height: 0; padding: calc(var(--nav) + 32px) 0 40px; display: block; }
  .hero--v2 .hero-v2__stage, .hero--v2 .hero-v2__float, .hero-v2__cue { display: none; }
  .hero--v2 .hero__text { max-width: 60ch; }
  .hero--v2 .hero-v2__mobile-art {
    display: block;
    margin-top: var(--s-6);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--v2-ground);
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
  }
  .hero--v2 .hero-v2__mobile-art img { width: 100%; height: 100%; object-fit: cover; object-position: 92% 52%; }
}

/* ==========================================================================
   2. SECTION 1: From idea to agent — Scroll-Scrubbed Clip-Path Wipe
   ========================================================================== */
main > section.story-v2 {
  position: relative;
  height: auto;
  min-height: 0;
  padding: 0;
  background: var(--v2-ground);
  border-top: 1px solid var(--line);
}
.story-v2__track { position: relative; height: 340svh; }
.story-v2__sticky {
  position: sticky;
  top: var(--nav);
  height: calc(100svh - var(--nav));
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.story-v2__grid {
  width: min(100% - 2 * var(--gut), var(--container));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 52px);
  align-items: center;
  height: min(660px, calc(100% - 48px));
}
.story-v2__grid > * { min-width: 0; }
.story-v2__left { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.story-v2__head { display: grid; gap: 8px; }
.story-v2__head h2 { font-size: clamp(28px, 2.1vw + 12px, 42px); line-height: 1.08; }

.story-v2__rail-wrap { position: relative; padding-left: 20px; }
.story-v2__rail {
  position: absolute;
  left: 0; top: 6px; bottom: 6px; width: 2px;
  background: color-mix(in oklab, var(--ink) 12%, transparent);
  border-radius: 2px;
  overflow: hidden;
}
.story-v2__rail-fill {
  width: 100%; height: 100%;
  transform-origin: 50% 0;
  transform: scaleY(0.08);
  background: linear-gradient(180deg, var(--v2-navy) 0%, var(--v2-sky) 65%, var(--v2-green) 100%);
  will-change: transform;
}
.story-v2__list { display: grid; gap: 4px; }
.story-v2__item {
  width: 100%; text-align: left; background: transparent;
  border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 10px 14px; cursor: pointer; display: grid;
  transition: background 240ms var(--v2-spring), border-color 240ms var(--v2-spring);
}
.story-v2__item:hover { background: rgba(255, 255, 255, 0.55); }
.story-v2__item[aria-current="step"] {
  background: rgba(255, 255, 255, 0.94);
  border-color: color-mix(in oklab, var(--v2-navy) 20%, transparent);
  box-shadow: 0 8px 24px -16px rgba(15, 27, 45, 0.14);
}
.story-v2__item-head { display: flex; align-items: center; gap: 10px; }
.story-v2__num { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.story-v2__item[aria-current="step"] .story-v2__num { color: var(--v2-navy); font-weight: 600; }
.story-v2__title { font-size: 16px; font-weight: 500; color: var(--muted); }
.story-v2__item[aria-current="step"] .story-v2__title { color: var(--ink); }
.story-v2__tag { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); opacity: 0; transition: opacity 200ms var(--ease); }
.story-v2__item[aria-current="step"] .story-v2__tag { opacity: 1; }
.story-v2__body-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 340ms var(--v2-spring); }
.story-v2__item[aria-current="step"] .story-v2__body-wrap { grid-template-rows: 1fr; }
.story-v2__body { overflow: hidden; }
.story-v2__body p { padding-top: 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }

.story-v2__stage {
  position: relative;
  width: 100%; height: 100%; max-height: 610px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--v2-ground);
  border: 1px solid color-mix(in oklab, var(--ink) 9%, transparent);
  box-shadow: 0 18px 46px -30px rgba(15, 27, 45, 0.18);
}
.story-v2__layer { position: absolute; inset: 0; overflow: hidden; will-change: clip-path, opacity; }
.story-v2__layer img {
  position: absolute; top: 0; right: 0;
  width: 158%; height: 100%; max-width: none;
  object-fit: contain; object-position: right center;
}
.story-v2__scanline {
  position: absolute; top: 0; bottom: 0; left: 0; width: 2px;
  background: linear-gradient(180deg, transparent 0%, var(--v2-sky) 20%, var(--v2-navy) 50%, var(--v2-sky) 80%, transparent 100%);
  box-shadow: 0 0 14px 2px rgba(46, 163, 220, 0.45);
  opacity: 0; z-index: 12; pointer-events: none; will-change: transform, opacity;
}
.story-v2__stage-hud {
  position: absolute; left: 16px; bottom: 16px; z-index: 15;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  border: 1px solid var(--line); font-size: 13px; color: var(--ink);
}
.story-v2__hud-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--v2-navy); }
.story-v2__hud-num { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

@media (max-width: 1023px) {
  .story-v2__track { height: auto; }
  .story-v2__sticky { position: relative; top: 0; height: auto; padding: 64px 0; }
  .story-v2__grid { grid-template-columns: minmax(0, 1fr); height: auto; gap: 20px; }
  .story-v2__stage { order: -1; aspect-ratio: 4 / 3; height: auto; max-height: none; }
  .story-v2__layer img { width: 156%; object-fit: cover; object-position: 96% 50%; }
}

/* ==========================================================================
   3. SECTION 2: One plant, four gateways — Scroll-Driven (Explode -> dwg -> rvt -> ipt -> nwd)
   ========================================================================== */
main > section.gw-scroll {
  position: relative;
  height: auto;
  min-height: 0;
  padding: 0;
  background: #ffffff;
  border-top: 1px solid var(--line);
}
.gw-scroll__track { position: relative; height: 360svh; }
.gw-scroll__sticky {
  position: sticky;
  top: var(--nav);
  height: calc(100svh - var(--nav));
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.gw-scroll__inner {
  width: min(100% - 2 * var(--gut), var(--container));
  margin-inline: auto;
  display: grid;
  gap: 20px;
  height: min(720px, calc(100% - 40px));
  grid-template-rows: auto minmax(0, 1fr);
}
.gw-scroll__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}
.gw-scroll__head-text { display: grid; gap: 6px; max-width: 580px; }
.gw-scroll__head h2 { font-size: clamp(28px, 2.1vw + 12px, 42px); line-height: 1.08; }
.gw-scroll__pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--v2-ground);
  border: 1px solid var(--line);
  flex-wrap: wrap;
}
.gw-scroll__pill {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 220ms var(--v2-spring), color 220ms var(--v2-spring);
}
.gw-scroll__pill:hover { color: var(--ink); }
.gw-scroll__pill[aria-pressed="true"] { background: var(--v2-navy); color: #ffffff; }

.gw-v2__body {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: clamp(20px, 2.8vw, 40px);
  align-items: stretch;
  min-height: 0;
}
.gw-v2__body > * { min-width: 0; }
.gw-v2__cards { display: grid; gap: 8px; align-content: center; }
.gw-v2__card {
  width: 100%; text-align: left; padding: 13px 16px;
  border-radius: var(--r-md); background: #ffffff;
  border: 1px solid var(--line); cursor: pointer; display: grid; gap: 5px;
  transition: border-color 240ms var(--v2-spring), background 240ms var(--v2-spring), box-shadow 240ms var(--v2-spring);
}
.gw-v2__card:hover {
  border-color: color-mix(in oklab, var(--v2-navy) 28%, transparent);
  background: color-mix(in oklab, var(--v2-ground) 55%, #ffffff);
}
.gw-v2__card[aria-current="step"] {
  background: var(--v2-ground);
  border-color: color-mix(in oklab, var(--v2-navy) 38%, transparent);
  box-shadow: 0 10px 26px -18px rgba(14, 62, 126, 0.28);
}
.gw-v2__card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gw-v2__name { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--ink); }
.gw-v2__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gw-v2__meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.gw-v2__desc { font-size: 13.5px; line-height: 1.48; color: var(--muted); }
.gw-v2__extra { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 320ms var(--v2-spring); }
.gw-v2__card[aria-current="step"] .gw-v2__extra { grid-template-rows: 1fr; }
.gw-v2__extra-in { overflow: hidden; display: grid; gap: 7px; }
.gw-v2__code {
  margin-top: 5px; padding: 6px 10px; border-radius: 6px;
  background: #ffffff; border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--v2-navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gw-v2__card-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gw-v2__repo { font-size: 13px; font-weight: 500; color: var(--v2-navy); text-decoration: underline; text-underline-offset: 3px; }
.gw-v2__peek {
  border: 1px solid color-mix(in oklab, var(--v2-green) 35%, transparent);
  background: #eef6ea;
  color: #285614;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.gw-v2__peek[aria-pressed="true"] { background: var(--v2-green); color: #ffffff; }

.gw-v2__stage {
  position: relative;
  min-width: 0; max-width: 100%; height: 100%; min-height: 440px;
  border-radius: var(--r-lg);
  background: var(--v2-ground);
  border: 1px solid var(--line);
  overflow: hidden;
  --mx: 0px; --my: 0px;
}
.gw-v2__layer {
  position: absolute; inset: 0;
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.985);
  transition: opacity 460ms var(--v2-spring), transform 640ms var(--v2-spring), filter 440ms var(--v2-spring);
  pointer-events: none; will-change: transform, opacity;
}
.gw-v2__layer img {
  position: absolute; top: 0; right: 0;
  width: 158%; height: 100%; max-width: none;
  object-fit: contain; object-position: right center;
}
.gw-v2__layer.is-on { opacity: 1; transform: translate3d(calc(var(--mx) * 0.4), calc(var(--my) * 0.4), 0) scale(1); }
.gw-v2__layer.is-ghost { opacity: 0.16; transform: translate3d(0, 0, 0) scale(1); }
.gw-v2__layer.is-context { opacity: 0.26; transform: translate3d(0, 0, 0) scale(1); }

/* Explode 2.5D default initial state */
.gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="m2"],
.gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="exploded"] { opacity: 0; }
.gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="dwg"] {
  opacity: 0.9; transform: translate3d(calc(var(--mx) * 0.2), calc(66px + var(--my) * 0.2), 0) scale(0.84);
}
.gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="rvt"] {
  opacity: 0.96; transform: translate3d(calc(var(--mx) * 0.45), calc(22px + var(--my) * 0.45), 0) scale(0.84);
  filter: drop-shadow(0 16px 18px rgba(15, 27, 45, 0.08));
}
.gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="ipt"] {
  opacity: 1; transform: translate3d(calc(var(--mx) * 0.75), calc(-24px + var(--my) * 0.75), 0) scale(0.84);
  filter: drop-shadow(0 18px 20px rgba(15, 27, 45, 0.12));
}
.gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="nwd"] {
  opacity: 1; transform: translate3d(calc(var(--mx) * 1.05), calc(-68px + var(--my) * 1.05), 0) scale(0.84);
}

.gw-v2__legend {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  z-index: 10; display: grid; gap: 24px;
  opacity: 0; pointer-events: none; transition: opacity 320ms var(--ease);
}
.gw-v2__stage[data-step="explode"] .gw-v2__legend { opacity: 1; }
.gw-v2__legend-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--ink);
}
.gw-v2__stage-foot {
  position: absolute; right: 16px; bottom: 16px; max-width: calc(100% - 32px);
  z-index: 10; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  border: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 1023px) {
  .gw-scroll__track { height: auto; }
  .gw-scroll__sticky { position: relative; top: 0; height: auto; padding: 64px 0; }
  .gw-scroll__inner { height: auto; grid-template-rows: auto auto; }
  .gw-v2__body { grid-template-columns: minmax(0, 1fr); }
  .gw-v2__stage { order: -1; min-height: 290px; aspect-ratio: 4 / 3; height: auto; }
  .gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="dwg"] { transform: translate3d(0, 38px, 0) scale(0.82); }
  .gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="rvt"] { transform: translate3d(0, 12px, 0) scale(0.82); }
  .gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="ipt"] { transform: translate3d(0, -14px, 0) scale(0.82); }
  .gw-v2__stage[data-step="explode"] .gw-v2__layer[data-gw="nwd"] { transform: translate3d(0, -40px, 0) scale(0.82); }
  .gw-v2__legend { display: none; }
}

/* ==========================================================================
   4. SECTION 3: Agent Reports Inside Revit — 3D Viewport (Left) + Report UI (Right)
   ========================================================================== */
main > section.reports-v2 {
  background: var(--v2-ground);
}
.reports-v2__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 28px;
}
.reports-v2__head-text { display: grid; gap: 8px; max-width: 600px; }
.reports-v2__workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.reports-v2__workbench > * { min-width: 0; }

/* Left: Interactive Revit 3D Viewport */
.rvt-vp {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 42px -28px rgba(15, 27, 45, 0.2);
  overflow: hidden;
  min-height: 540px;
}
.rvt-vp__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafd;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.rvt-vp__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rvt-vp__badge {
  padding: 2px 7px;
  border-radius: 4px;
  background: #e6eef8;
  color: var(--v2-navy);
  font-size: 11px;
  font-weight: 600;
}
.rvt-vp__tools { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.rvt-vp__tool {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.rvt-vp__tool:hover, .rvt-vp__tool[aria-pressed="true"] {
  background: var(--v2-navy);
  color: #ffffff;
  border-color: var(--v2-navy);
}

.rvt-vp__canvas {
  position: relative;
  flex: 1 1 auto;
  background: #eef4fa;
  overflow: hidden;
  min-height: 410px;
}
.rvt-vp__scene {
  position: absolute;
  inset: 0;
  transform: scale(1) translate3d(0, 0, 0);
  transform-origin: 50% 50%;
  transition: transform 560ms var(--v2-spring);
  will-change: transform;
}
.rvt-vp__scene img {
  position: absolute;
  top: 0; right: 0;
  width: 158%; height: 100%; max-width: none;
  object-fit: cover;
  object-position: 92% 52%;
  opacity: 0;
  transition: opacity 320ms var(--ease);
}
.rvt-vp__scene img.is-on { opacity: 1; }
.rvt-vp__canvas.is-isolated .rvt-vp__scene img.is-on { filter: saturate(0.25) brightness(1.06); }

/* Interactive 3D Element Selection Pins (counter-scaled so badges stay crisp at any zoom) */
.rvt-pin {
  position: absolute;
  transform: translate(-50%, -50%) scale(calc(1 / var(--vp-scale, 1)));
  z-index: 6;
  border: 2px solid #ffffff;
  background: var(--v2-navy);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(14, 62, 126, 0.32);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms var(--ease), transform 280ms var(--v2-spring), background 200ms var(--ease);
  white-space: nowrap;
}
.rvt-pin.is-visible { opacity: 0.92; pointer-events: auto; }
.rvt-pin.is-selected {
  opacity: 1;
  background: var(--v2-green);
  transform: translate(-50%, -50%) scale(calc(1.08 / var(--vp-scale, 1)));
  box-shadow: 0 0 0 6px rgba(106, 174, 63, 0.28), 0 8px 20px rgba(15, 27, 45, 0.25);
  z-index: 8;
}
.rvt-pin--warn.is-selected, .rvt-pin--warn.is-visible { background: var(--v2-amber); }
.rvt-pin--fail.is-selected, .rvt-pin--fail.is-visible { background: var(--v2-red); }
.rvt-pin__pulse {
  width: 6px; height: 6px; border-radius: 50%; background: #ffffff; flex: none;
}

.rvt-vp__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: #f8fafd;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}
.rvt-vp__sel { color: var(--v2-navy); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Right: Interactive Agent Report Panel */
.rvt-rep {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 42px -28px rgba(15, 27, 45, 0.2);
  overflow: hidden;
  min-height: 540px;
}
.rvt-rep__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: #f8fafd;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.rvt-rep__brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.rvt-rep__brand svg { width: 15px; height: 15px; color: var(--v2-navy); }
.rvt-rep__brand b { color: var(--v2-navy); } .rvt-rep__brand i { font-style: normal; color: var(--v2-green); font-weight: 600; }
.rvt-rep__seg {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  font-size: 11.5px;
}
.rvt-rep__seg button {
  border: 0; background: #ffffff; color: var(--muted); padding: 4px 10px; cursor: pointer;
}
.rvt-rep__seg button[aria-pressed="true"] { background: var(--v2-navy); color: #ffffff; }

/* Compact clickable report list strip */
.rvt-rep__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  background: #f9fbfd;
  border-bottom: 1px solid var(--line);
}
.rvt-rep__tab {
  text-align: left;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 3px 8px;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.rvt-rep__tab:hover { border-color: color-mix(in oklab, var(--v2-sky) 60%, transparent); }
.rvt-rep__tab[aria-current="true"] { border-color: var(--v2-sky); background: #eaf4fb; }
.rvt-rep__tab-title {
  font-size: 12.5px; font-weight: 500; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.rvt-rep__tab-meta { grid-column: 2; font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

.rvt-rep__body {
  padding: 16px 20px;
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  transition: opacity 200ms var(--v2-spring), transform 200ms var(--v2-spring);
}
.rvt-rep__body.is-swapping { opacity: 0; transform: translateY(5px); }
.rvt-rep__h { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.rvt-rep__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--line); }

.rvt-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-weight: 500; font-size: 12px; background: #e8f3e1; color: #2b5e14; }
.rvt-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3f7a22; }
.rvt-chip--fail { background: #fdecea; color: #9c1f1f; }
.rvt-chip--fail::before { background: #c62828; }
.rvt-chip--part { background: #fef5e7; color: #8c5300; }
.rvt-chip--part::before { background: #b26a00; }

/* Clickable revit: element links inside report */
.rvt-link {
  border: 0;
  background: #eaf4fb;
  color: #0b5399;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.rvt-link:hover, .rvt-link.is-active { background: var(--v2-navy); color: #ffffff; text-decoration: none; }
.rvt-link__cnt {
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 0 5px; border-radius: 999px; background: rgba(14, 62, 126, 0.12);
}
.rvt-link:hover .rvt-link__cnt, .rvt-link.is-active .rvt-link__cnt { background: rgba(255, 255, 255, 0.22); }

.rvt-rep__body h4 { font-size: 14px; font-weight: 600; margin: 2px 0 0; }
.rvt-rep__body ul { padding-left: 18px; list-style: disc; display: grid; gap: 3px; }
.rvt-rep__tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rvt-rep__tbl th, .rvt-rep__tbl td { padding: 5px 9px; border: 1px solid var(--line); text-align: left; }
.rvt-rep__tbl th { background: var(--v2-ground); font-weight: 500; }
.rvt-rep__evidence {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 12.5px;
}
.rvt-rep__evidence summary {
  cursor: pointer; font-weight: 500; color: var(--v2-navy); user-select: none;
}
.rvt-rep__evidence-list {
  margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px;
}
.rvt-rep__call {
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 8px; border-radius: 5px;
  background: var(--v2-ground); border: 1px solid var(--line); color: var(--ink);
  text-decoration: none;
}
.rvt-rep__call:hover { border-color: var(--v2-navy); color: var(--v2-navy); }
.rvt-rep__foot {
  padding: 9px 16px;
  background: #f8fafd;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 1023px) {
  .reports-v2__workbench { grid-template-columns: minmax(0, 1fr); }
  .rvt-vp { min-height: 360px; }
  .rvt-vp__canvas { min-height: 280px; aspect-ratio: 4 / 3; }
  .rvt-rep { min-height: 0; }
  .rvt-rep__list { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   5. SECTION 4: Command History & Checkpoints (#history)
   ========================================================================== */
main > section.history-v2 { background: #ffffff; }
.history-v2__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 24px;
}
.history-v2__head-text { display: grid; gap: 8px; max-width: 600px; }
.history-v2__filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.hist-pill {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.hist-pill:hover { color: var(--ink); border-color: var(--line-strong); }
.hist-pill[aria-pressed="true"] { background: var(--v2-navy); color: #ffffff; border-color: var(--v2-navy); }

.history-v2__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 38px -28px rgba(15, 27, 45, 0.18);
}
.history-v2__panel > * { min-width: 0; }
.hist-list {
  display: grid;
  align-content: start;
  border-right: 1px solid var(--line);
  max-height: 460px;
  overflow-y: auto;
}
.hist-row {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 12px 16px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  transition: background 160ms var(--ease);
}
.hist-row:last-child { border-bottom: 0; }
.hist-row:hover { background: #f8fafd; }
.hist-row[aria-current="true"] { background: #eaf4fb; box-shadow: inset 3px 0 0 var(--v2-navy); }
.hist-row[hidden] { display: none !important; }
.hist-row__time { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.hist-row__tool { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-row__sub { grid-column: 2; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-row__badges { display: inline-flex; align-items: center; gap: 6px; grid-row: 1 / span 2; grid-column: 3; }
.hist-gw { font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border-radius: 4px; background: var(--v2-ground); color: var(--v2-navy); font-weight: 500; }
.hist-kind { font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #e8f3e1; color: #2b5e14; }
.hist-kind--read { background: #edf2f7; color: #475569; }
.hist-kind--chk { background: #e6eef8; color: #0e3e7e; }

.hist-inspector {
  background: #0f1b2d;
  color: #e6edf7;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.hist-ins__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.hist-ins__id { color: #8fd1f4; font-weight: 600; }
.hist-ins__dur { color: #94a3b8; font-size: 11.5px; }
.hist-ins__lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; margin-bottom: 4px; }
.hist-ins__pre {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #e2ecf8;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hist-ins__foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.hist-ins__btn {
  border: 1px solid rgba(143, 209, 244, 0.4);
  background: rgba(46, 163, 220, 0.15);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.hist-ins__btn:hover { background: rgba(46, 163, 220, 0.3); }
.hist-ins__msg { font-size: 11.5px; color: #8dc63f; }

@media (max-width: 1023px) {
  .history-v2__panel { grid-template-columns: minmax(0, 1fr); }
  .hist-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 300px; }
  .hist-row { grid-template-columns: 56px minmax(0, 1fr); }
  .hist-row__badges { grid-column: 2; grid-row: auto; margin-top: 4px; }
}

/* ==========================================================================
   6. SECTION 5: Product Demos Showcase (#demos — dark navy band, extensible)
   ========================================================================== */
main > section.demos-v2 {
  background: var(--p-inv-bg);
  color: var(--p-inv-ink);
  overflow: hidden;
}
main > section.demos-v2 > .layer {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.22; pointer-events: none;
}
main > section.demos-v2 > .wrap { position: relative; z-index: 2; }
.demos-v2__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 32px;
}
.demos-v2__head-text { display: grid; gap: 8px; max-width: 600px; }
.demos-v2__head p { color: var(--p-inv-muted); }

/* Featured real Inventor drawing card */
.demo-featured {
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px;
  margin-bottom: 20px;
}
.demo-featured__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.demo-featured__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-featured__title h3 { font-size: 20px; color: #ffffff; }
.demo-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(46, 163, 220, 0.2);
  color: #9dd8f7;
  border: 1px solid rgba(46, 163, 220, 0.35);
}
.demo-pill--soon {
  background: rgba(255, 255, 255, 0.08);
  color: #b4c0d0;
  border-color: rgba(255, 255, 255, 0.16);
}
.demo-featured__sheet {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #efece4;
  aspect-ratio: 16 / 9;
  max-height: 500px;
  width: 100%;
}
.demo-featured__sheet > img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%;
  transform: scale(1.02); transition: transform 800ms var(--v2-spring);
}
.demo-featured.is-in .demo-featured__sheet > img { transform: scale(1); }

/* Callout pins on real drawing */
.sheet-pin { position: absolute; z-index: 4; transform: translate(-50%, -50%); }
.sheet-pin__btn {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #ffffff;
  background: var(--v2-navy); color: #ffffff; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(10, 42, 85, 0.35);
  transition: transform 200ms var(--v2-spring), background 200ms var(--ease);
}
.sheet-pin__btn:hover, .sheet-pin__btn:focus-visible { transform: scale(1.12); background: var(--v2-sky); }
.sheet-pin__tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: 240px; padding: 8px 12px; border-radius: 8px;
  background: rgba(15, 27, 45, 0.94); color: #ffffff; font-size: 12px; line-height: 1.4;
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease), transform 200ms var(--v2-spring);
}
.sheet-pin:hover .sheet-pin__tip, .sheet-pin:focus-within .sheet-pin__tip { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 639px) { .sheet-pin { display: none; } }

/* Extensible 3-column Demo Cards Grid */
.demos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.demo-card {
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 220ms var(--ease), background 220ms var(--ease), transform 240ms var(--v2-spring);
}
.demo-card:hover {
  border-color: rgba(143, 209, 244, 0.38);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}
.demo-card__media {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(244, 247, 251, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  position: relative;
}
.demo-card__media--filled { border-style: solid; background: var(--v2-ground); }
.demo-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: 86% 52%; }
.demo-card__placeholder {
  text-align: center;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8fa3bc;
  display: grid;
  gap: 6px;
}
.demo-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.demo-card h4 { font-size: 16px; color: #ffffff; font-weight: 500; }
.demo-card p { font-size: 13.5px; line-height: 1.5; color: var(--p-inv-muted); }
.demo-card__link { margin-top: auto; font-size: 13px; color: #8fd1f4; text-decoration: underline; text-underline-offset: 3px; align-self: start; }

@media (max-width: 1023px) {
  .demos-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   7. SECTION 6: Installation (4 tabs: Copy prompt / PowerShell / cmd / GitHub)
   ========================================================================== */
.install-prompt-box {
  justify-self: stretch;
  margin: 0;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font: 400 13.5px/1.55 var(--font-text);
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.gh-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.gh-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--v2-navy);
  transition: border-color 180ms var(--ease);
}
.gh-link:hover { border-color: var(--v2-navy); }

/* ==========================================================================
   8. SECTION 7: FAQ (Pending redesign — compact, cleanly after Install)
   ========================================================================== */
main > section.faq-pending {
  background: var(--v2-ground);
}
.faq-pending__tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  background: #fef5e7; border: 1px solid #f0d7a8;
  color: #8c5300; font-family: var(--font-mono); font-size: 11px;
  justify-self: start;
}
.faq-pending__grid {
  display: grid;
  grid-template-columns: minmax(260px, 4fr) minmax(0, 8fr);
  gap: 32px;
  align-items: start;
}
.faq-pending__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
}
.faq-pending__item { display: grid; gap: 6px; align-content: start; }
.faq-pending__item h3 { font-size: 17px; line-height: 1.3; font-weight: 500; }
.faq-pending__item p { font-size: 14px; line-height: 1.55; color: var(--muted); }
@media (max-width: 1023px) {
  .faq-pending__grid, .faq-pending__list { grid-template-columns: minmax(0, 1fr); }
}
