:root {
  color-scheme: dark;
  --bg: #08090a;
  --bg-deep: #050608;
  --surface: rgba(255, 255, 255, 0.032);
  --surface-raised: rgba(255, 255, 255, 0.052);
  --line: rgba(216, 227, 255, 0.1);
  --line-strong: rgba(216, 227, 255, 0.17);
  --text: #f5f7fa;
  --secondary: #c7ced9;
  --muted: #8893a3;
  --faint: #596372;
  --violet: #c084fc;
  --violet-bright: #d55df4;
  --blue: #3991ff;
  --risk: #ff4658;
  --risk-soft: rgba(255, 48, 70, 0.1);
  --secure: #39e694;
  --sans: "Inter", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

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

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv01", "ss03";
}

html.is-embedded body,
html.is-embedded body * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

html.is-embedded body input,
html.is-embedded body textarea,
html.is-embedded body [contenteditable="true"],
html.is-embedded body [contenteditable=""] {
  -webkit-user-select: text !important;
  user-select: text !important;
}

button, a, [tabindex] { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid rgba(192, 132, 252, 0.9);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.causal-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 49% 39%, rgba(52, 87, 172, 0.09), transparent 29%),
    radial-gradient(circle at 78% 35%, rgba(104, 20, 54, 0.055), transparent 25%),
    linear-gradient(180deg, #080a0d 0%, #07090c 42%, #05070a 100%);
}

.causal-page::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent, black 36%, transparent 86%);
}

.causal-atmosphere {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .35;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(115, 162, 255, .68) 0 1px, transparent 1.3px);
  background-size: 87px 83px;
  mask-image: radial-gradient(ellipse 43% 70% at 47% 51%, black, transparent 83%);
}

.causal-scene {
  width: min(1720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(32px, 4.2vh, 56px) clamp(28px, 3.5vw, 68px);
  display: grid;
  grid-template-columns: minmax(260px, .84fr) minmax(390px, 1.06fr) minmax(465px, 1.22fr);
  align-items: center;
  gap: clamp(28px, 2.8vw, 52px);
}

.intro-column,
.evidence-column { min-width: 0; }

.intro-column {
  align-self: center;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s ease, transform .45s ease;
}

.is-started .intro-column { opacity: 1; transform: translateY(0); }

.product-identity {
  display: block;
  margin-bottom: clamp(40px, 7vh, 68px);
}

.product-name {
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 1.45vw, 27px);
  font-weight: 590;
  letter-spacing: -.025em;
}

.product-tm {
  margin-left: .1em;
  color: #d6b7f3;
  font-size: .42em;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0;
  vertical-align: super;
}

.product-label {
  margin: 7px 0 0;
  color: #c77df2;
  font-size: clamp(13px, .98vw, 17px);
  font-weight: 500;
}

.preview-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-bottom: 14px;
  color: #aab5c4;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.preview-label i {
  width: 6px;
  height: 6px;
  border: 1px solid var(--violet);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(192,132,252,.65);
}

.intro-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(31px, 2.2vw, 43px);
  line-height: 1.18;
  font-weight: 510;
  letter-spacing: -.035em;
}

.intro-copy h1 em {
  color: transparent;
  background: linear-gradient(94deg, #d18aff 5%, #b46cff 48%, #e669b7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}

.intro-copy > p {
  max-width: 32ch;
  margin: 22px 0 0;
  color: var(--secondary);
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.72;
}

.accent-rule {
  display: block;
  width: 34px;
  height: 1px;
  margin: 24px 0 22px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  box-shadow: 16px 0 22px rgba(72, 130, 255, .35);
}

.capability-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 15px;
}

.capability-list li {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #d1d6de;
  font-size: clamp(13px, .9vw, 15px);
}

.capability-icon,
.trace-icon,
.diagnosis-icon,
.weakness-icon,
.explanation-icon,
.confirmation-icon,
.code-file-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.capability-icon { width: 25px; height: 25px; color: #9c83ff; }
.capability-icon svg { width: 100%; height: 100%; }

.analysis-summary {
  position: relative;
  overflow: hidden;
  margin-top: clamp(32px, 5vh, 52px);
  padding: 17px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(12,17,25,.18));
}

.analysis-summary::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 70px;
  right: -40px;
  bottom: -35px;
  background: rgba(69, 140, 255, .12);
  filter: blur(25px);
}

.analysis-summary > p {
  margin: 0 0 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.analysis-summary > p span { color: var(--faint); font-size: 9px; font-family: var(--mono); }

.analysis-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.analysis-metrics > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.analysis-metrics strong { display: block; color: var(--violet); font-family: var(--mono); font-size: clamp(23px, 1.7vw, 31px); font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.analysis-metrics > div:last-child strong { color: var(--secure); }
.analysis-metrics strong span { font-size: .52em; }
.analysis-metrics small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }

.confidence-track { height: 6px; margin-top: 15px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.055); }
.confidence-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a744ff, #3a9cff 48%, #45eca0); box-shadow: 0 0 13px rgba(69,163,255,.58); transition: width .8s cubic-bezier(.2,.8,.2,1) .25s; }
.is-complete .confidence-track i { width: 96%; }

.trace-column {
  position: relative;
  align-self: stretch;
  min-width: 0;
  min-height: 790px;
  padding: 8px 0 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.trace-field {
  position: absolute;
  z-index: -1;
  inset: 0 -29%;
  width: 158%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.orbit {
  fill: none;
  stroke: url(#causalOrbit);
  stroke-width: 1;
  opacity: .38;
  vector-effect: non-scaling-stroke;
}

.orbit-two { opacity: .28; stroke-dasharray: 2 7; }
.orbit-three { opacity: .2; }

.orbit-signal {
  fill: none;
  stroke: #46a0ff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: .7 99.3;
  stroke-dashoffset: 100;
  opacity: 0;
  filter: url(#smallGlow);
  vector-effect: non-scaling-stroke;
}

.is-running .orbit-signal,
.is-complete .orbit-signal { opacity: .9; animation: orbitTravel 5.8s linear infinite; }
.orbit-signal-two { stroke: #b965ff; animation-delay: -2.4s !important; animation-duration: 7.2s !important; }

.spine-glow,
.spine-line {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.spine-glow { stroke: url(#causalSpine); stroke-width: 7; opacity: .22; filter: url(#smallGlow); }
.spine-line { stroke: url(#causalSpine); stroke-width: 1.2; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: .9; }
.is-running .spine-line, .is-complete .spine-line { animation: drawSpine 2.05s cubic-bezier(.2,.7,.2,1) .28s forwards; }

.spine-pulse { fill: #fff; stroke: #b56cff; stroke-width: 2; opacity: 0; filter: url(#smallGlow); }
.is-running .spine-pulse { opacity: 1; animation: spineTravel 2.08s cubic-bezier(.2,.65,.3,1) .3s forwards; }
.is-complete .spine-pulse { opacity: 0; }

.impact-plane { opacity: .14; transition: opacity .38s ease 2.15s; }
.is-complete .impact-plane { opacity: 1; }
.impact-beam { stroke: #ff5364; stroke-width: 2; filter: url(#smallGlow); }
.impact-core { fill: url(#causalImpact); filter: url(#smallGlow); transform-origin: 280px 802px; animation: impactCore 3.8s ease-in-out 2.2s infinite; }
.impact-ring { fill: none; stroke: rgba(255, 69, 87, .95); stroke-width: 1.15; transform-origin: 280px 802px; }
.ring-two { opacity: .54; }
.ring-three { opacity: .26; }
.is-complete .ring-one { animation: impactRipple 3.8s ease-out 2.2s infinite; }
.is-complete .ring-two { animation: impactRipple 3.8s ease-out 2.55s infinite; }
.perspective-grid { fill: none; stroke: rgba(239,55,75,.28); stroke-width: .7; vector-effect: non-scaling-stroke; }

.trace-card {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 58px), 430px);
  margin-inline: auto;
  border: 1px solid rgba(216, 227, 255, .125);
  border-radius: 11px;
  background: linear-gradient(105deg, rgba(18,22,31,.95), rgba(8,12,17,.89));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.trace-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b4b91;
  border: 2px solid #10141c;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(192,132,252,.25);
  z-index: -1;
}

.packet-card {
  min-height: 74px;
  padding: 12px 13px;
  display: grid;
  grid-template-columns: 38px minmax(164px, 1fr) auto;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-items: center;
  column-gap: 8px;
  opacity: 0;
  transform: translateY(-8px);
}

.is-started .packet-card { opacity: 1; transform: translateY(0); transition: opacity .35s ease .25s, transform .35s ease .25s, border-color .25s ease, box-shadow .25s ease; }
.packet-card.is-active, .packet-card:hover, .packet-card:focus-visible { border-color: rgba(192,132,252,.44); box-shadow: 0 0 26px rgba(145,81,255,.09), inset 0 1px rgba(255,255,255,.04); }

.packet-icon,
.trace-step-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--violet);
  background: linear-gradient(135deg, rgba(132,68,239,.19), rgba(25,35,68,.18));
  box-shadow: inset 0 0 18px rgba(160, 74, 255, .05);
}

.packet-icon svg, .trace-step-icon svg { display: block; width: 21px; height: 21px; }
.packet-card > .packet-icon { grid-row: 1 / 3; }
.packet-copy { grid-row: 1 / 3; align-self: center; min-width: 0; }
.packet-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e7eaf0; font-size: 14px; font-weight: 520; line-height: 1.25; }
.packet-copy small { display: block; margin-top: 5px; overflow: visible; white-space: nowrap; color: var(--muted); font-family: var(--mono); font-size: 9.25px; line-height: 1.3; }
.packet-protocol { grid-column: 3; grid-row: 1; align-self: end; color: #cc77f2; font-family: var(--mono); font-size: 10px; line-height: 1.3; white-space: nowrap; }
.packet-card .state-label { grid-column: 3; grid-row: 2; align-self: start; font-size: 7px; letter-spacing: .035em; line-height: 1.3; }

.state-label {
  grid-column: 2 / 4;
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.state-label i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.is-active .state-label { color: #cf85ff; }

.trace-list {
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.trace-step {
  min-height: 74px;
  padding: 9px 13px;
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) 78px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  opacity: .42;
}

.trace-step::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 24px rgba(64,137,255,.12);
  transition: opacity .25s ease;
}

.trace-step-icon { grid-row: 1 / 3; }
.trace-step-copy { min-width: 0; align-self: end; }
.trace-step-label { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.trace-step-index { color: #79859b; font-family: var(--mono); font-size: 10.5px; }
.trace-step-label strong { color: #eef1f6; font-size: 14.5px; font-weight: 520; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trace-step-value { display: block; margin-top: 4px; color: #b5becb; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.trace-confidence { grid-column: 3; grid-row: 1 / 3; align-self: center; text-align: right; }
.trace-confidence small { display: block; margin-bottom: 3px; color: var(--faint); font-size: 8.5px; text-transform: uppercase; letter-spacing: .04em; }
.trace-confidence strong { color: var(--secure); font-family: var(--mono); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.trace-step .state-label { grid-column: 2; justify-self: start; margin-top: 5px; align-self: start; }

.trace-step.is-active {
  opacity: 1;
  border-color: rgba(66,145,255,.34);
  background: linear-gradient(100deg, rgba(25,31,45,.97), rgba(9,13,20,.91));
}
.trace-step.is-active::after, .trace-step:hover::after, .trace-step:focus-visible::after { opacity: 1; }
.trace-step.is-confirmed { opacity: 1; }
.trace-step.is-confirmed .state-label { color: #61d7ff; }
.trace-step.is-confirmed .trace-step-icon { color: #bd77ff; }

.trace-step.is-root {
  opacity: 1;
  border-color: rgba(255,70,88,.74);
  background: linear-gradient(105deg, rgba(52,14,24,.96), rgba(23,10,16,.94));
  box-shadow: 0 0 22px rgba(255,45,68,.16), inset 0 0 24px rgba(255,46,66,.035);
}
.trace-step.is-root .trace-step-icon { color: var(--risk); background: rgba(255,45,68,.08); }
.trace-step.is-root .trace-step-value { color: #ff8993; }
.trace-step.is-root .state-label { color: var(--risk); }

html.is-scroll-driven .trace-step {
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(.975);
  transition:
    opacity .42s ease,
    transform .58s cubic-bezier(.16, 1, .3, 1),
    border-color .25s ease,
    background .25s ease,
    box-shadow .25s ease;
}

html.is-scroll-driven .trace-step.is-active,
html.is-scroll-driven .trace-step.is-confirmed,
html.is-scroll-driven .trace-step.is-root {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

html.is-scroll-driven .spine-line,
html.is-scroll-driven .spine-pulse { animation: none !important; }
html.is-scroll-driven .spine-line { transition: stroke-dashoffset .12s linear; }
html.is-scroll-driven .spine-pulse { transition: opacity .18s ease; }

.trace-column.is-inspecting .trace-card:not(.is-inspected) { opacity: .48; }
.trace-card.is-inspected { opacity: 1 !important; border-color: rgba(192,132,252,.55); }

.root-impact {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 10px;
  width: min(390px, 96%);
  height: 185px;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .35s ease;
}

.is-complete .root-impact { opacity: 1; }

.root-impact-beam {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  width: 2px;
  height: 92px;
  background: linear-gradient(to bottom, rgba(255,65,83,.1), #ff4054 72%, #fff 100%);
  box-shadow: 0 0 5px #ff4054, 0 0 16px rgba(255,49,70,.75);
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
}

.is-complete .root-impact-beam { animation: resolveBeam .42s cubic-bezier(.18,.75,.25,1) .05s forwards; }

.root-impact-core {
  position: absolute;
  z-index: 3;
  top: 86px;
  left: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px #fff, 0 0 12px #ff3046, 0 0 30px rgba(255,36,61,.9);
  transform: translateX(-50%) scale(0);
}

.is-complete .root-impact-core { animation: resolveCore .38s cubic-bezier(.2,.9,.25,1.3) .35s forwards, rootCoreBreath 3.8s ease-in-out 1s infinite; }

.root-impact-ring {
  position: absolute;
  z-index: 2;
  top: 91px;
  left: 50%;
  border: 1px solid rgba(255,55,75,.78);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.root-impact-ring.is-near { width: 70px; height: 20px; }
.root-impact-ring.is-mid { width: 142px; height: 42px; border-color: rgba(255,55,75,.46); }
.root-impact-ring.is-far { width: 230px; height: 68px; border-color: rgba(255,55,75,.24); }
.is-complete .root-impact-ring.is-near { animation: resolveRing .62s ease-out .38s forwards; }
.is-complete .root-impact-ring.is-mid { animation: resolveRing .72s ease-out .46s forwards; }
.is-complete .root-impact-ring.is-far { animation: resolveRing .82s ease-out .54s forwards; }

.root-impact-grid {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -55px;
  width: 330px;
  height: 135px;
  opacity: .36;
  transform: translateX(-50%) perspective(180px) rotateX(62deg);
  transform-origin: center top;
  background-image: linear-gradient(rgba(255,53,74,.23) 1px, transparent 1px), linear-gradient(90deg, rgba(255,53,74,.2) 1px, transparent 1px);
  background-size: 22px 18px;
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 72%);
}

.evidence-column {
  align-self: center;
  display: grid;
  gap: 11px;
}

.evidence-reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}
.evidence-reveal.is-visible { opacity: 1; transform: translateY(0); }

.diagnosis-header {
  position: relative;
  min-height: 73px;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-left: 1px solid rgba(255,70,88,.45);
  background: linear-gradient(90deg, rgba(77,15,25,.15), transparent 82%);
}
.diagnosis-header::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 1px; background: var(--risk); box-shadow: 0 0 17px rgba(255,70,88,.8); }
.diagnosis-icon { width: 40px; height: 40px; color: var(--risk); }
.diagnosis-icon svg { width: 34px; height: 34px; }
.diagnosis-header h2 { margin: 0; color: #ff5869; font-size: clamp(16px, 1.17vw, 20px); font-weight: 510; letter-spacing: -.015em; text-transform: capitalize; }
.diagnosis-header p { margin: 6px 0 0; color: var(--secondary); font-size: 11px; }

.verified-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f07883;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.verified-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--risk); box-shadow: 0 0 8px var(--risk); }

.code-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(7, 10, 14, .88);
}
.code-panel > header {
  min-height: 55px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}
.code-panel > header > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.code-file-icon { width: 19px; height: 19px; color: #929eb0; }
.code-file-icon svg { width: 100%; height: 100%; }
.code-panel h3 { margin: 0; color: #e8ebf0; font-family: var(--mono); font-size: 12px; font-weight: 500; }
.code-panel > header > span { color: #808b9a; font-size: 9px; white-space: nowrap; }
.code-panel > header strong { color: var(--risk); font-family: var(--mono); font-size: 11px; font-weight: 500; }

.code-panel pre {
  margin: 0;
  padding: 12px 0;
  overflow-x: auto;
  color: #bbc5d4;
  font-family: var(--mono);
  font-size: clamp(9px, .69vw, 11px);
  line-height: 2.05;
  scrollbar-width: thin;
  scrollbar-color: rgba(192,132,252,.35) transparent;
}
.code-panel code { display: block; min-width: 445px; font-size: 0; line-height: 0; }
.code-row { position: relative; display: grid; grid-template-columns: 54px minmax(max-content, 1fr) 26px; align-items: center; min-height: 23px; font-size: clamp(9px, .69vw, 11px); line-height: 1.4; }
.line-no { padding-right: 13px; color: #596474; text-align: right; user-select: none; border-right: 1px solid rgba(255,255,255,.055); margin-right: 18px; }
.code-row b { color: #bd82e8; font-weight: 500; }
.code-row i { color: #e5b66e; font-style: normal; }
.code-row.is-vulnerable { color: #ff9aa3; background: linear-gradient(90deg, rgba(255,50,69,.17), rgba(255,50,69,.08)); box-shadow: inset 2px 0 var(--risk); }
.code-row.is-vulnerable .line-no { color: #ff5968; }
.code-row.is-vulnerable em { align-self: center; justify-self: center; width: 14px; height: 14px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--risk); color: #1b0508; font-family: var(--sans); font-size: 10px; line-height: 1; font-weight: 600; font-style: normal; }

.code-panel > footer {
  min-height: 35px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.055);
  color: #657182;
  font-family: var(--mono);
  font-size: 8px;
}
.code-panel > footer span:first-child { display: inline-flex; align-items: center; gap: 6px; color: #9c84c0; }
.code-panel > footer i { width: 5px; height: 5px; border-radius: 50%; background: var(--violet); }

.weakness-panel,
.explanation-panel,
.confirmation-panel {
  border-radius: 11px;
}

.weakness-panel {
  min-height: 78px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(255,70,88,.34);
  background: linear-gradient(105deg, rgba(56,11,20,.31), rgba(24,9,14,.54));
}
.weakness-icon { width: 37px; height: 37px; color: var(--risk); }
.weakness-icon svg { width: 100%; height: 100%; }
.weakness-panel h3, .explanation-panel h3, .confirmation-panel h3 { margin: 0; font-size: 13px; font-weight: 510; }
.weakness-panel h3 { color: #ff6675; }
.weakness-panel p { margin: 5px 0 0; color: #e3e7ed; font-size: 12px; }
.risk-label { padding: 6px 10px; border: 1px solid rgba(255,70,88,.28); border-radius: 99px; background: rgba(255,70,88,.08); color: #ff6a79; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }

.explanation-panel {
  min-height: 139px;
  padding: 18px 18px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(18,22,31,.69), rgba(9,12,17,.5));
}
.explanation-icon { width: 35px; height: 35px; color: #a969ff; }
.explanation-icon svg { width: 100%; height: 100%; }
.explanation-panel h3 { color: #e4e7ed; }
.explanation-panel h3 span { margin-left: 5px; color: #b17fe9; font-family: var(--mono); font-size: 8px; font-weight: 500; text-transform: uppercase; }
.explanation-panel p { max-width: 52ch; margin: 13px 0 0; color: #bfc6d1; font-size: clamp(11px, .78vw, 13px); line-height: 1.7; }
.explanation-panel p em { color: #cf85ee; font-style: normal; }

.confirmation-panel {
  min-height: 76px;
  padding: 11px 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(57,230,148,.42);
  background: linear-gradient(105deg, rgba(13,48,34,.25), rgba(7,21,17,.33));
}
.confirmation-icon { width: 38px; height: 38px; color: var(--secure); }
.confirmation-icon svg { width: 100%; height: 100%; }
.confirmation-panel h3 { color: var(--secure); }
.confirmation-panel p { margin: 5px 0 0; color: #aeb8c4; font-size: 10px; }
.confirmation-check { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(57,230,148,.08); color: var(--secure); font-family: var(--mono); font-size: 12px; }

.noscript-note {
  position: fixed;
  z-index: 30;
  left: 12px;
  right: 12px;
  bottom: 12px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255,178,80,.4);
  border-radius: 8px;
  background: #171108;
  color: #f2c27c;
  font: 12px/1.5 var(--sans);
  text-align: center;
}

@keyframes drawSpine { to { stroke-dashoffset: 0; } }
@keyframes spineTravel { 0% { transform: translateY(0); } 100% { transform: translateY(680px); opacity: 0; } }
@keyframes orbitTravel { to { stroke-dashoffset: 0; } }
@keyframes impactRipple { 0%, 70%, 100% { transform: scale(.75); opacity: 0; } 8% { opacity: .8; } 40% { transform: scale(1.16); opacity: 0; } }
@keyframes impactCore { 0%, 100% { transform: scale(.88); opacity: .82; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes resolveBeam { to { transform: translateX(-50%) scaleY(1); } }
@keyframes resolveCore { to { transform: translateX(-50%) scale(1); } }
@keyframes resolveRing { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.55); } 45% { opacity: .95; } 100% { opacity: .58; transform: translate(-50%, -50%) scale(1); } }
@keyframes rootCoreBreath { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }

.is-paused .orbit-signal,
.is-paused .spine-pulse,
.is-paused .impact-ring { animation-play-state: paused !important; }

@media (min-width: 1081px) and (max-height: 920px) {
  .causal-scene { min-height: 100vh; padding-block: 18px; }
  .product-identity { margin-bottom: 22px; }
  .preview-label { margin-bottom: 9px; }
  .intro-copy h1 { font-size: clamp(29px, 2.08vw, 37px); }
  .intro-copy > p { margin-top: 15px; font-size: 13px; line-height: 1.58; }
  .accent-rule { margin-block: 17px 16px; }
  .capability-list { gap: 10px; }
  .capability-icon { width: 22px; height: 22px; }
  .analysis-summary { margin-top: 21px; padding: 13px 15px 14px; }
  .analysis-summary > p { margin-bottom: 10px; }
  .analysis-metrics small { margin-top: 5px; }
  .confidence-track { margin-top: 11px; }

  .trace-column { min-height: 718px; }
  .packet-card { min-height: 60px; padding-block: 8px; }
  .packet-icon, .trace-step-icon { width: 35px; height: 35px; }
  .packet-icon svg, .trace-step-icon svg { width: 20px; height: 20px; }
  .trace-list { margin-top: 8px; gap: 5px; }
  .trace-step { min-height: 61px; padding-block: 6px; }
  .trace-step-value { margin-top: 3px; }
  .trace-step .state-label { margin-top: 3px; }
  .root-impact { bottom: 2px; height: 154px; }
  .root-impact-beam { height: 72px; }
  .root-impact-core { top: 67px; }
  .root-impact-ring { top: 72px; }

  .evidence-column { gap: 8px; }
  .diagnosis-header { min-height: 58px; padding-block: 6px; }
  .diagnosis-icon { width: 34px; height: 34px; }
  .diagnosis-icon svg { width: 29px; height: 29px; }
  .diagnosis-header p { margin-top: 3px; }
  .code-panel > header { min-height: 43px; }
  .code-panel pre { padding-block: 7px; line-height: 1.65; }
  .code-row { min-height: 20px; line-height: 1.35; }
  .code-panel > footer { min-height: 29px; }
  .weakness-panel { min-height: 61px; padding-block: 8px; }
  .weakness-icon { width: 31px; height: 31px; }
  .explanation-panel { min-height: 104px; padding-block: 13px; }
  .explanation-icon { width: 30px; height: 30px; }
  .explanation-panel p { margin-top: 8px; line-height: 1.55; }
  .confirmation-panel { min-height: 60px; padding-block: 7px; }
  .confirmation-icon { width: 32px; height: 32px; }
}

@media (max-width: 1320px) {
  .causal-scene {
    padding-inline: 24px;
    grid-template-columns: minmax(235px, .8fr) minmax(350px, 1.05fr) minmax(410px, 1.18fr);
    gap: 24px;
  }
  .trace-card { width: min(calc(100% - 44px), 420px); }
  .product-identity { margin-bottom: 38px; }
  .analysis-summary { margin-top: 30px; }
}

@media (max-width: 1080px) {
  .causal-page { overflow: visible; }
  .causal-scene {
    min-height: 0;
    padding: 48px 34px 64px;
    grid-template-columns: minmax(250px, .75fr) minmax(400px, 1.25fr);
    align-items: start;
    gap: 42px;
  }
  .intro-column { position: sticky; top: 32px; align-self: start; }
  .evidence-column { grid-column: 1 / -1; width: min(720px, 100%); justify-self: end; margin-top: 4px; }
  .trace-column { min-height: 790px; }
  .explanation-panel p { max-width: 64ch; }
}

/* The homepage header leaves less vertical room than the canonical page.
   Render the same wide composition at a measured scale on shorter laptops so
   the source evidence and confirmation remain visible in one product slide. */
@media (min-width: 821px) and (max-height: 820px) {
  html.is-embedded body { overflow: hidden; }
  html.is-embedded .causal-page {
    width: 111.112%;
    min-height: 111.112vh;
    transform: scale(.9);
    transform-origin: 0 0;
  }
  html.is-embedded .causal-scene { min-height: 111.112vh; }
}

@media (min-width: 821px) and (max-height: 700px) {
  html.is-embedded .causal-page {
    width: 128.206%;
    min-height: 128.206vh;
    transform: scale(.78);
  }
  html.is-embedded .causal-scene { min-height: 128.206vh; }
}

@media (max-width: 820px) {
  html.is-embedded,
  html.is-embedded body,
  html.is-embedded .causal-page,
  html.is-embedded .causal-scene { min-height: 0; }
  .causal-page { overflow-x: clip; overflow-y: visible; }
  .causal-scene { padding: 34px 18px 52px; display: flex; flex-direction: column; gap: 34px; }
  .intro-column { position: static; width: 100%; }
  .product-identity { margin-bottom: 36px; }
  .intro-copy > p { max-width: 39ch; }
  .capability-list { grid-template-columns: 1fr 1fr; gap: 14px 20px; }
  .capability-list li { align-items: flex-start; font-size: 12px; }
  .analysis-summary { order: 5; margin-top: 30px; }
  .trace-column { order: 2; width: 100%; min-height: 780px; padding-top: 0; }
  .analysis-summary { display: none; }
  .trace-column::after {
    content: "Analysis complete · 2.73s · confidence 96%";
    width: calc(100% - 18px);
    margin: 24px auto 0;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #b8c0cc;
    background: rgba(255,255,255,.025);
    font: 10px var(--mono);
    text-align: center;
  }
  .trace-field { inset-inline: 0; width: 100%; }
  .orbit-grid { display: none; }
  .trace-card { width: calc(100% - 10px); }
  .packet-card { min-height: 76px; }
  .root-impact { bottom: 18px; height: 160px; }
  .evidence-column { order: 3; width: 100%; gap: 10px; margin-top: 0; }
  .evidence-column .diagnosis-header { order: 0; }
  .code-panel { order: 1; }
  .weakness-panel { order: 2; }
  .explanation-panel { order: 3; }
  .confirmation-panel { order: 4; }
  .code-panel pre { font-size: 9px; }
}

@media (max-width: 480px) {
  .causal-scene { padding-inline: 14px; }
  .product-name { font-size: 19px; }
  .product-label { font-size: 12px; }
  .intro-copy h1 { font-size: 34px; }
  .capability-list { grid-template-columns: 1fr; }
  .trace-column { min-height: 806px; }
  .trace-card { width: 100%; }
  .packet-card { grid-template-columns: 38px minmax(0, 1fr); }
  .packet-copy { grid-row: 1; align-self: end; }
  .packet-protocol { display: none; }
  .packet-card .state-label { grid-column: 2; grid-row: 2; justify-self: start; }
  .trace-step { grid-template-columns: 39px minmax(0, 1fr) 62px; padding-inline: 10px; column-gap: 9px; }
  .trace-step-icon { width: 36px; height: 36px; }
  .trace-step-label { gap: 5px; }
  .trace-step-label strong { font-size: 13.5px; }
  .trace-step-value { font-size: 10.5px; }
  .trace-confidence strong { font-size: 16px; }
  .diagnosis-header { grid-template-columns: 39px minmax(0,1fr); padding-inline: 12px; }
  .verified-status { grid-column: 2; }
  .weakness-panel { grid-template-columns: 38px minmax(0, 1fr); padding-inline: 12px; }
  .risk-label { grid-column: 2; width: max-content; }
  .explanation-panel { grid-template-columns: 36px minmax(0,1fr); padding-inline: 13px; }
  .confirmation-panel { grid-template-columns: 38px minmax(0,1fr); padding-inline: 12px; }
  .confirmation-check { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .orbit-signal, .spine-pulse { display: none; }
  .spine-line { stroke-dashoffset: 0; }
  .impact-plane { opacity: 1; }
}
