:root {
  color-scheme: light dark;
  --paper: #f4f6f2;
  --surface: #fbfcfa;
  --surface-2: #edf1ed;
  --ink: #111612;
  --muted: #5d665f;
  --line: #cbd2cc;
  --line-strong: #8f9991;
  --green: #168a57;
  --green-soft: #d9eee2;
  --red: #c7463b;
  --red-soft: #f2dedb;
  --blue: #315eb5;
  --code: "DM Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    linear-gradient(to right, color-mix(in srgb, var(--line) 34%, transparent) 1px, transparent 1px) center top / 80px 100%,
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { color: inherit; }
.site-header, main, footer { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }

.site-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-top: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.brand {
  min-height: 57px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  font: 600 14px/1 var(--sans);
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark { width: 23px; height: 23px; position: relative; display: inline-block; transform: rotate(-8deg); }
.brand-mark i { position: absolute; display: block; border: 1.5px solid currentColor; border-radius: 99px; background: var(--paper); }
.brand-mark i:nth-child(1) { width: 8px; height: 20px; left: 1px; top: 1px; }
.brand-mark i:nth-child(2) { width: 8px; height: 16px; left: 8px; top: 4px; background: var(--green-soft); }
.brand-mark i:nth-child(3) { width: 7px; height: 11px; left: 15px; top: 8px; }
nav { min-height: 57px; display: flex; align-items: stretch; margin-left: auto; font: 500 11px/1 var(--code); }
nav a { display: flex; align-items: center; padding: 0 18px; border-left: 1px solid var(--line); text-decoration: none; }
.nav-cta { background: var(--ink); color: var(--paper); }

.hero {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  min-height: 460px;
  border-inline: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-copy { padding: 78px 6.5% 70px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
h1, h2 { margin: 0; font-family: var(--sans); font-weight: 650; letter-spacing: -.055em; }
h1 { font-size: clamp(48px, 5.7vw, 78px); line-height: .94; }
h2 { font-size: clamp(26px, 3.2vw, 43px); line-height: 1.02; }
.hero-copy > p { max-width: 440px; margin: 26px 0 30px; color: var(--muted); font-size: 16px; }
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--ink);
  font: 600 11px/1 var(--code);
  text-decoration: none;
}
.button-primary { background: var(--ink); color: var(--paper); }
.button svg { width: 16px; fill: currentColor; }
.button:hover, .nav-cta:hover { background: var(--green); border-color: var(--green); color: #fff; }
.button:focus-visible, nav a:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 32%, transparent); outline-offset: 3px; }

.call-example { display: flex; min-width: 0; flex-direction: column; justify-content: center; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 86%, transparent); }
.code-bar {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 500 10px/1 var(--code);
  text-transform: uppercase;
  letter-spacing: .06em;
}
pre { margin: 0; overflow: auto; font: 400 12px/1.85 var(--code); tab-size: 2; }
.call-example pre {
  flex: 1;
  padding: clamp(64px, 8vw, 104px) clamp(24px, 5vw, 72px);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.token-call { color: var(--green); font-weight: 500; }
.token-key { color: var(--blue); }
.token-string { color: var(--green); }
.token-mark { color: #956019; }

.protocol { border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.protocol-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 30px; padding: 32px 36px; border-bottom: 1px solid var(--line); }
.protocol-heading > p { margin: 0; color: var(--muted); font: 400 11px/1.5 var(--code); }
.review-system {
  display: grid;
  grid-template-columns: minmax(190px, .9fr) 64px minmax(220px, .88fr) 64px minmax(220px, 1fr);
  align-items: stretch;
  padding: 36px;
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}
.system-inputs, .system-output { display: grid; gap: 10px; }
.system-node { min-width: 0; border: 1px solid var(--line-strong); background: var(--surface); }
.system-node > div:first-child, .core-head { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font: 500 8px/1 var(--code); letter-spacing: .07em; }
.system-node > strong { display: block; padding: 13px 12px 2px; font-size: 13px; letter-spacing: -.015em; }
.system-node > code { display: block; padding: 2px 12px 13px; color: var(--muted); font: 400 9px/1.4 var(--code); }
.diff-stat { color: var(--red); }
.system-route { position: relative; display: grid; place-items: center; color: var(--line-strong); }
.system-route::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid currentColor; }
.system-route span { position: relative; z-index: 2; margin-left: auto; transform: translateX(3px); font: 20px/1 var(--code); }
.route-in i { position: absolute; left: 0; width: 50%; border-top: 1px solid currentColor; }
.route-in i:first-child { top: 17%; transform: skewY(24deg); transform-origin: left; }
.route-in i:nth-child(2) { top: 50%; }
.route-in i:nth-child(3) { bottom: 17%; transform: skewY(-24deg); transform-origin: left; }
.review-core { display: flex; flex-direction: column; border-color: var(--green); background: color-mix(in srgb, var(--green-soft) 45%, var(--surface)); }
.core-head { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, var(--line)); }
.classification-grid { width: min(140px, 62%); aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 24px auto 14px; }
.classification-grid i { border: 1px solid var(--green); border-radius: 50%; background: color-mix(in srgb, var(--green) 13%, var(--surface)); }
.classification-grid .failed {
  position: relative;
  border-color: var(--red);
  border-radius: 50% 50% 50% 12%;
  background: repeating-linear-gradient(135deg, var(--red-soft) 0 4px, color-mix(in srgb, var(--red) 25%, var(--surface)) 4px 7px);
}
.classification-grid .failed::before, .classification-grid .failed::after { content: ""; position: absolute; width: 48%; height: 1.5px; left: 26%; top: 49%; background: var(--red); }
.classification-grid .failed::before { transform: rotate(45deg); }
.classification-grid .failed::after { transform: rotate(-45deg); }
.review-core > strong, .review-core > code { text-align: center; }
.review-core > code { margin-top: auto; }
.system-output { grid-template-rows: 1fr auto; }
.finding-node { border-color: var(--red); }
.finding-node .severity { color: var(--red); }
.finding-node > p { margin: 9px 12px 13px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); font: 400 9px/1.4 var(--code); }
.pass-node { display: flex; align-items: center; gap: 10px; padding: 11px; border-color: var(--green); }
.pass-node > div:first-child { display: initial; padding: 0; border: 0; }
.pass-node strong, .pass-node code { display: block; padding: 0; }
.pass-mark { width: 24px; height: 24px; display: grid; flex: 0 0 24px; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font: 500 12px/1 var(--code); }

.rules-section { display: grid; grid-template-columns: .8fr 1.2fr; border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rules-copy { border-right: 1px solid var(--line); }
.rules-copy h2 { padding: 42px 36px; border-bottom: 1px solid var(--line); }
.rules-copy h2 code { font: 500 .76em/1 var(--code); color: var(--green); letter-spacing: -.04em; }
dl { margin: 0; }
dl > div { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
dl > div:last-child { border-bottom: 0; }
dt { color: var(--green); font: 500 9px/1.5 var(--code); }
dd { margin: 0; color: var(--muted); font: 400 11px/1.5 var(--code); }
.yaml-panel { min-width: 0; background: #111713; color: #d5ddd7; }
.yaml-panel .code-bar { border-color: #334039; color: #8f9c94; }
.yaml-panel button { border: 0; background: transparent; padding: 5px; font: inherit; cursor: pointer; text-transform: uppercase; }
.yaml-panel pre { min-height: 330px; padding: 40px clamp(22px, 5vw, 68px); color: #c4cec7; }
.yaml-panel .token-key { color: #8eafea; }
.yaml-panel .token-string { color: #78ce9c; }
.yaml-panel .token-mark { color: #d4a66a; }

.install-strip { min-height: 94px; display: flex; align-items: center; justify-content: flex-end; padding: 24px 30px; border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); }
footer { min-height: 86px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; border-inline: 1px solid var(--line); color: var(--muted); font: 400 9px/1.5 var(--code); }
footer .brand { border-right: 1px solid var(--line); }
footer p { margin: 0; padding: 0 22px; text-align: center; }
footer p:last-child { text-align: right; }

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d110e;
    --surface: #121713;
    --surface-2: #171d18;
    --ink: #e4eae5;
    --muted: #949f97;
    --line: #2c352f;
    --line-strong: #59665d;
    --green: #4bc184;
    --green-soft: #183b29;
    --red: #ef746a;
    --red-soft: #4a211e;
    --blue: #8eb1f5;
  }
  .yaml-panel { background: #080b09; }
  .nav-cta, .button-primary { color: #0d110e; }
  .token-mark { color: #d4a66a; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: 390px; }
  .call-example { min-height: 330px; border-left: 0; border-top: 1px solid var(--line); }
  .review-system { grid-template-columns: 1fr; padding: 24px; }
  .system-route { min-height: 40px; }
  .system-route::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1px solid currentColor; }
  .system-route span { margin: auto 0 0; transform: rotate(90deg) translateX(3px); }
  .route-in i { display: none; }
}

@media (max-width: 640px) {
  .site-header, main, footer { width: 100%; }
  nav a:not(.nav-cta) { display: none; }
  .hero-copy { min-height: 360px; padding: 58px 22px 50px; }
  h1 { font-size: 50px; }
  .call-example pre { padding: 30px 20px; font-size: 10px; }
  .protocol-heading { display: block; padding: 27px 20px; }
  .protocol-heading p { margin-top: 12px; }
  .review-system { padding: 18px; }
  .rules-section { grid-template-columns: 1fr; }
  .rules-copy { border-right: 0; border-bottom: 1px solid var(--line); }
  .rules-copy h2 { padding: 32px 20px; }
  .yaml-panel pre { min-height: 0; padding: 32px 18px; font-size: 10px; }
  footer { grid-template-columns: 1fr; padding-bottom: 20px; }
  footer .brand { border-right: 0; }
  footer p, footer p:last-child { padding: 9px 18px; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
