:root {
  color-scheme: light;
  --ink: oklch(0.19 0.025 248);
  --ink-soft: oklch(0.31 0.035 248);
  --muted: oklch(0.43 0.032 248);
  --subtle: oklch(0.96 0.008 248);
  --surface: oklch(1 0 0);
  --surface-cool: oklch(0.985 0.006 225);
  --line: oklch(0.88 0.018 238);
  --brand: oklch(0.58 0.118 185);
  --brand-dark: oklch(0.38 0.095 185);
  --accent: oklch(0.55 0.18 258);
  --caution: oklch(0.69 0.16 72);
  --safe-bg: oklch(0.95 0.036 185);
  --raw-bg: oklch(0.96 0.035 72);
  --mono-bg: oklch(0.18 0.026 248);
  --radius: 10px;
  --max: 1180px;
  --z-sticky: 20;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, oklch(0.95 0.035 185 / 0.7), transparent 28rem),
    linear-gradient(180deg, oklch(0.98 0.006 230), #ffffff 42rem);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

code,
pre {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 0 max(20px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid oklch(0.88 0.018 238 / 0.72);
  background: oklch(0.99 0.004 230 / 0.88);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.footer-links,
.hero-actions,
.download-actions,
.hero-proof,
.device-topbar,
.device-footer,
.panel-title,
.terminal-header {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--brand-dark);
}

.header-cta {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 720;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(oklch(0.25 0.02 248 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.25 0.02 248 / 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
  gap: clamp(34px, 6vw, 72px);
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(58px, 8vw, 104px) 0 clamp(46px, 7vw, 84px);
  align-items: center;
}

.hero-copy {
  max-width: 660px;
}

.project-line {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--safe-bg);
  color: var(--brand-dark);
  font-weight: 760;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.lede {
  max-width: 650px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.62;
}

.hero-actions,
.download-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 780;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.button:hover,
.copy-button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.copy-button:focus-visible,
.nav-links a:focus-visible,
.footer-links a:focus-visible,
a.header-cta:focus-visible,
a.brand:focus-visible {
  outline: 3px solid oklch(0.66 0.13 185 / 0.9);
  outline-offset: 3px;
}

.button.primary {
  background: var(--ink);
  color: #ffffff;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button.text-button {
  padding-inline: 6px;
  background: transparent;
  color: var(--brand-dark);
}

.command-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: min(100%, 650px);
  margin-top: 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(1 0 0 / 0.78);
}

.command-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 720;
  white-space: nowrap;
}

.command-card code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.92rem;
}

.copy-button {
  min-width: 104px;
  border-color: var(--line);
  background: var(--surface-cool);
  color: var(--ink);
}

.hero-proof {
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
  font-weight: 680;
}

.hero-proof li {
  position: relative;
  padding-left: 18px;
}

.hero-proof li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.paste-device {
  overflow: hidden;
  border-radius: 18px;
  background: var(--mono-bg);
  color: #e5edf6;
  box-shadow: 0 18px 8px oklch(0.16 0.02 248 / 0.12);
  animation: deviceIn 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.device-topbar,
.device-footer {
  gap: 9px;
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid oklch(0.35 0.03 248 / 0.9);
}

.device-topbar strong {
  margin-left: 6px;
  font-size: 0.9rem;
}

.traffic {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.traffic.red {
  background: oklch(0.63 0.2 25);
}

.traffic.yellow {
  background: oklch(0.78 0.16 76);
}

.traffic.green {
  background: oklch(0.73 0.17 148);
}

.live-state {
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: oklch(0.34 0.09 185);
  color: oklch(0.91 0.06 185);
  font-size: 0.78rem;
  font-weight: 780;
}

.paste-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}

.rail-panel,
.decision-panel {
  border-radius: 12px;
}

.rail-panel {
  overflow: hidden;
  background: oklch(0.23 0.026 248);
}

.raw-panel {
  border: 1px solid oklch(0.62 0.16 72 / 0.62);
}

.safe-panel {
  border: 1px solid oklch(0.65 0.12 185 / 0.72);
}

.panel-title {
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid oklch(0.39 0.035 248);
  color: oklch(0.75 0.035 248);
  font-size: 0.82rem;
}

.panel-title strong {
  color: #ffffff;
}

.rail-panel pre,
.terminal-card pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
}

.rail-panel pre {
  padding: 16px 14px 18px;
  font-size: clamp(0.78rem, 1.2vw, 0.93rem);
  line-height: 1.75;
}

.raw-panel code {
  color: oklch(0.88 0.07 72);
}

.safe-panel code {
  color: oklch(0.86 0.08 185);
}

.decision-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: oklch(0.24 0.04 185);
}

.decision-ring {
  display: grid;
  place-items: center;
  width: 116px;
  min-height: 86px;
  border: 1px solid oklch(0.68 0.13 185);
  border-radius: 999px;
  text-align: center;
}

.decision-ring span {
  color: oklch(0.78 0.05 185);
  font-size: 0.78rem;
}

.decision-ring strong {
  max-width: 90px;
  color: #ffffff;
  font-size: 0.88rem;
}

.decision-panel p {
  margin: 0;
  color: oklch(0.82 0.045 185);
  line-height: 1.55;
}

.device-footer {
  justify-content: space-between;
  border-top: 1px solid oklch(0.35 0.03 248 / 0.9);
  border-bottom: 0;
  color: oklch(0.75 0.035 248);
  font-size: 0.84rem;
}

.outcome-section,
.trust-section,
.targets-section,
.install-section,
.beforewire-section {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(70px, 9vw, 118px) 0;
}

.section-copy {
  max-width: 820px;
  margin-bottom: 34px;
}

.section-copy.compact {
  max-width: 760px;
}

.section-copy h2,
.beforewire-panel h2,
.doc-panel h1 {
  margin-bottom: 16px;
  font-size: clamp(1.95rem, 4.7vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-copy p,
.beforewire-panel p {
  max-width: 72ch;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.72;
}

.outcome-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.outcome-lane {
  min-height: 300px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.outcome-lane.trusted {
  background: linear-gradient(180deg, var(--raw-bg), #ffffff 70%);
}

.outcome-lane.ai-target {
  background: linear-gradient(180deg, var(--safe-bg), #ffffff 70%);
}

.lane-label {
  display: inline-flex;
  margin-bottom: 42px;
  color: var(--muted);
  font-weight: 760;
}

.outcome-lane h3 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  line-height: 1.05;
}

.outcome-lane p {
  color: var(--ink-soft);
  line-height: 1.68;
}

.outcome-lane code {
  display: block;
  margin-top: 22px;
  padding: 13px;
  border-radius: 8px;
  background: var(--mono-bg);
  color: #e5edf6;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.trust-section,
.install-section {
  width: 100%;
  max-width: none;
  padding-inline: max(24px, calc((100vw - var(--max)) / 2));
  background: var(--surface-cool);
  border-block: 1px solid var(--line);
}

.trust-ledger,
.target-matrix {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.ledger-row,
.target-row {
  display: grid;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.ledger-row:first-child,
.target-row:first-child {
  border-top: 0;
}

.ledger-row {
  grid-template-columns: minmax(170px, 0.35fr) minmax(0, 1fr);
}

.ledger-row strong,
.target-row strong {
  color: var(--ink);
}

.ledger-row span {
  color: var(--muted);
  line-height: 1.6;
}

.target-row {
  grid-template-columns: 160px repeat(5, minmax(0, 1fr));
}

.target-row span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-cool);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
}

.install-panel,
.beforewire-panel {
  border-radius: 16px;
  background: var(--surface);
}

.install-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  padding: clamp(24px, 4vw, 38px);
}

.install-panel .section-copy {
  margin-bottom: 0;
}

.download-actions {
  justify-content: flex-end;
}

.terminal-card {
  position: relative;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--mono-bg);
  color: #e5edf6;
}

.terminal-header {
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid oklch(0.35 0.03 248 / 0.9);
}

.terminal-header span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: oklch(0.52 0.035 248);
}

.terminal-header strong {
  margin-left: 8px;
  color: oklch(0.8 0.04 248);
  font-size: 0.85rem;
}

.terminal-card pre {
  padding: 20px;
  font-size: 0.98rem;
  line-height: 1.8;
}

.terminal-copy {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: #ffffff;
}

.beforewire-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
}

.beforewire-panel h2 {
  max-width: 760px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong {
  color: var(--ink);
}

.footer-links {
  gap: 18px;
  flex-wrap: wrap;
}

.doc-page {
  width: min(880px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.doc-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 36px;
}

.doc-panel h1 {
  max-width: 760px;
}

.doc-panel h2 {
  margin: 34px 0 12px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.doc-panel p,
.doc-panel li {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.doc-panel ul {
  padding-left: 22px;
}

.doc-panel a:not(.button) {
  color: var(--brand-dark);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes deviceIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1040px) {
  .site-header {
    padding-inline: 20px;
  }

  .nav-links {
    display: none;
  }

  .hero-inner,
  .install-panel {
    grid-template-columns: 1fr;
  }

  .download-actions {
    justify-content: flex-start;
  }

  .target-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .target-row span {
    justify-content: flex-start;
    padding-inline: 14px;
  }
}

@media (max-width: 760px) {
  .header-cta {
    display: none;
  }

  .hero-inner,
  .outcome-section,
  .targets-section,
  .beforewire-section,
  .site-footer {
    width: min(100% - 32px, var(--max));
  }

  h1 {
    font-size: clamp(2.45rem, 15vw, 4.4rem);
  }

  .hero-actions .button,
  .download-actions .button {
    width: 100%;
  }

  .command-card {
    grid-template-columns: 1fr;
  }

  .copy-button {
    width: 100%;
  }

  .decision-panel {
    grid-template-columns: 1fr;
  }

  .decision-ring {
    width: 100%;
    min-height: 74px;
    border-radius: 10px;
  }

  .device-footer,
  .outcome-board,
  .beforewire-panel,
  .site-footer {
    grid-template-columns: 1fr;
    align-items: flex-start;
    flex-direction: column;
  }

  .outcome-board {
    display: grid;
  }

  .ledger-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .terminal-copy {
    position: static;
    margin: 0 14px 14px;
  }

  .doc-page {
    width: min(100% - 32px, 880px);
  }

  .doc-panel {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
