:root {
  color-scheme: light;
  --bg: #a8c7eb;
  --bg-deep: #93b7df;
  --panel: rgba(235, 245, 255, .56);
  --panel-2: rgba(214, 232, 249, .7);
  --line: rgba(7, 16, 15, .14);
  --line-bright: rgba(7, 16, 15, .26);
  --text: #07100f;
  --muted: #31475d;
  --faint: #597087;
  --mint: #123e60;
  --mint-strong: #0a2c49;
  --amber: #784c12;
  --red: #8b3038;
  --blue: #174d73;
  --shadow: 0 24px 70px rgba(40, 76, 111, .14);
  --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  font-family: var(--font-apple);
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(232, 244, 255, .38), transparent 32rem),
    radial-gradient(circle at 82% 36%, rgba(123, 165, 210, .2), transparent 34rem),
    var(--bg);
}

.hero-scroll {
  position: relative;
  z-index: 30;
  height: 190svh;
  color: #07100f;
  background: #a8c7eb;
}
.hero-sticky {
  --left-shift: 0vw;
  --right-shift: 0vw;
  --hand-scale: 1;
  --title-opacity: 0;
  --title-y: 28px;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 48%, rgba(230, 245, 255, .08), transparent 34%),
    #a8c7eb;
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.hero-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  background: #a8c7eb;
  will-change: transform;
}
.hero-half-left {
  left: 0;
  transform: translate3d(var(--left-shift), 0, 0);
}
.hero-half-right {
  right: 0;
  transform: translate3d(var(--right-shift), 0, 0);
}
.hero-hand {
  position: absolute;
  top: 0;
  width: 200%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  user-select: none;
}
.hero-hand-left {
  left: 0;
  transform: scale(var(--hand-scale));
  transform-origin: left center;
}
.hero-hand-right {
  right: 0;
  transform: scale(var(--hand-scale));
  transform-origin: right center;
}
.hero-reveal {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
  opacity: var(--title-opacity);
  transform: translate3d(0, var(--title-y), 0);
  will-change: opacity, transform;
}
.hero-kicker {
  margin: 0;
  font: 800 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero-kicker { margin-bottom: 18px; color: rgba(7, 16, 15, .58); }
.hero-reveal h1 {
  margin: 0;
  color: #07100f;
  font-size: clamp(58px, 8vw, 112px);
  line-height: .88;
  letter-spacing: -.07em;
  font-weight: 720;
  text-wrap: balance;
}
.hero-tagline {
  max-width: 34rem;
  margin: 26px 0 0;
  color: rgba(7, 16, 15, .78);
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.45;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.hero-enter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 11px 16px;
  color: #dbeaf8;
  border: 1px solid #07100f;
  border-radius: 999px;
  background: #07100f;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(40, 76, 111, .2);
}
.hero-enter:hover { color: #07100f; background: rgba(235, 245, 255, .86); }
.hero-enter:active { transform: scale(.98); }

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(7, 16, 15, .38);
  outline-offset: 3px;
}

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 99; transform: translateY(-150%); padding: 10px 14px; color: #dbeaf8; background: var(--text); border-radius: 9px; font-weight: 750; }
.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(168, 199, 235, .86);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; color: var(--text); text-decoration: none; }
.brand-mark { display: block; width: 34px; height: 34px; border-radius: 9px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: -.01em; }
.brand small { margin-top: 2px; color: var(--faint); font-size: 10px; }
.topbar-context { display: flex; align-items: center; gap: 10px; color: var(--muted); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .09em; text-transform: uppercase; }
.topbar-context i { width: 20px; height: 1px; background: var(--faint); }
.runtime { justify-self: end; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.runtime-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.runtime.ready .runtime-dot { background: var(--mint-strong); }
.runtime.error .runtime-dot { background: var(--red); }

main { width: calc(100% - 48px); max-width: 1280px; margin: 0 auto; padding: 96px 0 72px; }
.intro { display: grid; gap: 28px; max-width: 900px; margin-bottom: 56px; }
.workspace-title { margin: 0; max-width: 800px; font-size: clamp(48px, 6.6vw, 86px); line-height: .94; letter-spacing: -.065em; font-weight: 740; }
.workspace-title span { color: var(--mint-strong); }
h2 { margin: 0; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.12; letter-spacing: -.035em; }
.intro-copy { margin: 0; max-width: 64ch; color: var(--muted); font-size: 17px; line-height: 1.65; text-wrap: pretty; }
.intro-copy em { color: var(--text); font-style: normal; }

.flow { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 0 18px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: rgba(235, 245, 255, .28); overflow: hidden; }
.flow li { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; padding: 14px 16px; color: var(--faint); border-right: 1px solid var(--line); font-size: 12px; font-weight: 650; letter-spacing: -.01em; }
.flow li:last-child { border-right: 0; }
.flow li.active { color: var(--text); background: rgba(235, 245, 255, .66); }
.flow li.active::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 2px; background: var(--text); }

.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.source-panel { display: grid; grid-template-columns: 1.05fr 1fr auto; gap: 24px; align-items: end; padding: 28px; }
.source-copy p:last-child, .section-description { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .04em; }
select, input { width: 100%; min-width: 0; max-width: 100%; min-height: 48px; padding: 0 14px; color: var(--text); border: 1px solid var(--line-bright); border-radius: 10px; background: rgba(235, 245, 255, .52); transition: border-color .2s, background .2s, box-shadow .2s; }
select:hover, input:hover { border-color: rgba(7, 16, 15, .42); background: rgba(235, 245, 255, .72); }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 720; white-space: nowrap; transition: transform .2s cubic-bezier(.16, 1, .3, 1), background .2s, border-color .2s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.98); }
.button:disabled { cursor: wait; opacity: .58; transform: none; }
.button-primary { color: #dbeaf8; background: var(--text); }
.button-primary:hover { color: var(--text); background: rgba(235, 245, 255, .88); border-color: var(--text); }
.button-secondary { color: var(--text); border-color: var(--line-bright); background: rgba(235, 245, 255, .36); }
.button-secondary:hover { border-color: var(--text); background: rgba(235, 245, 255, .72); }
.asset-details { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; min-height: 22px; padding-top: 2px; color: var(--faint); font: 650 10px/1.3 ui-monospace, monospace; letter-spacing: .03em; }
.asset-details span { padding-right: 9px; border-right: 1px solid var(--line); }
.asset-details span:last-child { border-right: 0; }
.source-panel > * { min-width: 0; }

.overview { display: grid; grid-template-columns: .72fr 1.28fr; gap: 14px; margin-top: 14px; }
.score-panel, .reach-panel, section.panel, .change-panel { padding: 28px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-head.compact { margin-bottom: 16px; }
.severity-badge, .evidence-tag, .count-pill, .evidence-pill, .human-gate { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 10px; border: 1px solid var(--line-bright); border-radius: 999px; color: var(--muted); background: rgba(235, 245, 255, .34); font: 750 9px/1 ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
.severity-badge[data-level="critical"], .severity-badge[data-level="high"] { color: var(--red); border-color: rgba(139, 48, 56, .35); background: rgba(139, 48, 56, .08); }
.severity-badge[data-level="moderate"] { color: var(--amber); border-color: rgba(120, 76, 18, .35); }
.severity-badge[data-level="low"] { color: var(--mint-strong); }
.evidence-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-strong); }
.evidence-pill { color: var(--amber); border-color: rgba(120, 76, 18, .3); }
.human-gate { color: var(--blue); border-color: rgba(23, 77, 115, .3); }
.score-wrap { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 22px; }
.score { color: var(--text); font-size: clamp(56px, 7vw, 84px); line-height: .8; letter-spacing: -.075em; font-weight: 780; }
.score small { color: var(--faint); font-size: 16px; letter-spacing: 0; }
.score-wrap p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.metric { min-width: 0; padding: 12px 14px; border-right: 1px solid var(--line); }
.metric:nth-child(4n), .metric:last-child { border-right: 0; }
.metric b { display: block; margin-bottom: 7px; color: var(--text); font-size: 28px; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.metric span { display: block; color: var(--faint); font: 700 9px/1.35 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; }

section.panel, .change-panel { margin-top: 14px; }
.graph-shell { display: grid; grid-template-columns: minmax(180px, .45fr) 60px 1.55fr; align-items: center; min-height: 210px; }
.source-node { position: relative; padding: 20px; border: 1px solid var(--text); border-radius: 14px; background: rgba(235, 245, 255, .5); }
.source-node::before { content: "Source asset"; display: block; margin-bottom: 9px; color: var(--faint); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .04em; }
.source-node strong { display: block; overflow-wrap: anywhere; font-size: 15px; }
.source-node span { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.graph-connector { position: relative; height: 100%; min-height: 80px; }
.graph-connector::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line-bright); }
.graph-connector span { position: absolute; top: calc(50% - 3px); right: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
.consumer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.consumer-card { min-width: 0; padding: 16px; border: 1px solid transparent; border-radius: 12px; background: rgba(235, 245, 255, .34); transition: transform .22s cubic-bezier(.16,1,.3,1), border-color .22s, background .22s; }
.consumer-card:hover { transform: translateY(-2px); border-color: var(--line-bright); background: rgba(235, 245, 255, .62); }
.consumer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.type-label, .hop-label { color: var(--faint); font: 750 8px/1 ui-monospace, monospace; letter-spacing: .09em; text-transform: uppercase; }
.hop-label { color: var(--blue); }
.consumer-card strong { display: block; min-height: 34px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; }
.consumer-card p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.table-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(235, 245, 255, .22); }
.contract-header, .contract-row { display: grid; grid-template-columns: 1.05fr 1.25fr .55fr .55fr; gap: 14px; align-items: center; }
.contract-header { padding: 11px 14px; color: var(--faint); background: rgba(147, 183, 223, .28); font: 720 8px/1 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.contract-row { padding: 14px; border-top: 1px solid var(--line); }
.contract-row code { color: var(--text); font-size: 12px; font-weight: 700; }
.contract-row span { min-width: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.contract-row .confidence { width: max-content; padding: 5px 7px; border-radius: 999px; color: var(--amber); background: rgba(120, 76, 18, .08); font: 750 8px/1 ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }

.change-panel { background: rgba(224, 238, 252, .66); }
.change-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(235, 245, 255, .28); }
.analysis { margin-top: 18px; }
.analysis-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 12px; }
.result-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(235, 245, 255, .42); }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.result-heading h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.result-label { margin: 0 0 7px; color: var(--faint); font-size: 11px; font-weight: 650; letter-spacing: -.01em; }
.verdict-name { margin: 4px 0 6px; color: var(--text); font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.verdict-summary { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.affected-list { display: grid; gap: 7px; margin: 0 0 16px; padding: 0; list-style: none; }
.affected-list li { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.affected-list strong, .affected-list span { overflow-wrap: anywhere; }
.affected-list strong { font-size: 11px; }
.affected-list span { color: var(--muted); font-size: 9px; text-align: right; }
.coverage-warning { display: flex; gap: 9px; margin: 0; padding: 12px; color: var(--amber); border: 1px solid rgba(120, 76, 18, .24); border-radius: 10px; background: rgba(120, 76, 18, .06); font-size: 10px; line-height: 1.5; }
.code-tabs { display: flex; gap: 5px; margin-bottom: 10px; }
.code-tab { padding: 7px 10px; color: var(--faint); border: 1px solid transparent; border-radius: 8px; background: transparent; font: 750 9px/1 ui-monospace, monospace; letter-spacing: .04em; }
.code-tab.active { color: var(--text); border-color: var(--line-bright); background: rgba(235, 245, 255, .5); }
.code-panel { position: relative; }
.copy-button { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 6px 8px; color: #c2d7e9; border: 1px solid rgba(194, 215, 233, .24); border-radius: 7px; background: #102332; font: 700 8px/1 ui-monospace, monospace; text-transform: uppercase; }
pre { min-height: 178px; max-height: 310px; margin: 0; padding: 18px; overflow: auto; color: #d4e6f4; border: 1px solid rgba(7, 16, 15, .22); border-radius: 10px; background: #0b1b28; font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; tab-size: 2; }
.action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.review-note { margin: 2px 0 0; color: var(--faint); font-size: 9px; line-height: 1.45; }
.receipt { margin-top: 12px; padding: 14px; border: 1px solid var(--line-bright); border-radius: 10px; background: rgba(235, 245, 255, .45); }
.receipt.error { border-color: rgba(139, 48, 56, .3); background: rgba(139, 48, 56, .06); }
.receipt strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 12px; }
.receipt.error strong { color: var(--red); }
.receipt p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.file-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.file-list button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--blue); background: rgba(235, 245, 255, .4); cursor: pointer; }
.file-list button:hover { border-color: var(--line-bright); background: rgba(235, 245, 255, .72); }
.file-list button:disabled, .download-package:disabled { cursor: wait; opacity: .56; }
.file-list code { color: inherit; font-size: 8px; }
.download-package { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 190px; margin-top: 12px; padding: 10px 13px; border: 1px solid var(--text); border-radius: 9px; color: var(--bg); background: var(--text); font-size: 11px; font-weight: 750; cursor: pointer; }

.banner { margin-bottom: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.banner-error { color: var(--red); border-color: rgba(139, 48, 56, .34); background: rgba(139, 48, 56, .08); }
.loading { opacity: .58; pointer-events: none; }
.hidden { display: none !important; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 4px 0; color: var(--faint); font-size: 10px; }
footer p { margin: 0; }
footer strong { color: var(--muted); }

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-context { display: none; }
  .intro-copy { max-width: 720px; }
  .source-panel { grid-template-columns: 1fr 1fr; }
  .source-copy { grid-column: 1 / -1; }
  .source-panel .button { grid-column: 2; }
  .asset-details { grid-column: 1 / -1; }
  .overview, .analysis-layout { grid-template-columns: 1fr; }
  .consumer-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .change-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .hero-scroll { height: 165svh; }
  .hero-hand { width: 308%; }
  .hero-hand-left { left: -54%; }
  .hero-hand-right { right: -54%; }
  .hero-reveal h1 { font-size: clamp(48px, 15vw, 68px); }
  .hero-kicker { max-width: 260px; line-height: 1.55; }
  .hero-tagline { margin-top: 19px; }
  .hero-enter { margin-top: 24px; }
  .topbar { min-height: 60px; padding: 0 16px; }
  .runtime { font-size: 10px; }
  main { width: calc(100% - 24px); padding-top: 42px; }
  .workspace-title { font-size: clamp(40px, 12.5vw, 52px); }
  .runtime span:last-child { display: none; }
  .flow { grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; }
  .flow li { padding: 12px 4px; font-size: 9px; }
  .source-panel { grid-template-columns: 1fr; padding: 18px; }
  .source-panel .button, .asset-details { grid-column: 1; }
  .score-panel, .reach-panel, section.panel, .change-panel { padding: 18px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .score-wrap { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .graph-shell { grid-template-columns: 1fr; gap: 10px; }
  .graph-connector { display: none; }
  .consumer-grid { grid-template-columns: 1fr; }
  .contract-header { display: none; }
  .contract-row { grid-template-columns: 1fr 1fr; gap: 9px; }
  .change-form { grid-template-columns: 1fr; }
  .action-bar .button { width: 100%; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hero-scroll { height: 100svh; }
  .hero-sticky {
    --left-shift: -12vw;
    --right-shift: 12vw;
    --hand-scale: 1.04;
    --title-opacity: 1;
    --title-y: 0px;
  }
}

@media (max-width: 680px) and (prefers-reduced-motion: reduce) {
  .hero-sticky {
    --left-shift: -8vw;
    --right-shift: 8vw;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar { background: var(--bg); backdrop-filter: none; }
}
