@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap');

:root {
  --ink: #171714;
  --ink-soft: #5f5c55;
  --paper: #f4f0e7;
  --paper-deep: #eae3d6;
  --night: #10100f;
  --night-raised: #191916;
  --line: rgba(23, 23, 20, 0.16);
  --night-line: rgba(255, 255, 255, 0.12);
  --accent: #e56f2d;
  --accent-light: #fa8f4f;
  --green: #85ae82;
  --font-sans: 'Manrope', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'DM Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { font: inherit; }
::selection { color: var(--night); background: var(--accent-light); }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; color: white; background: var(--accent); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-header { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; border-bottom: 1px solid var(--night-line); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.brand svg { width: 25px; height: 25px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.site-header nav { display: flex; align-items: center; gap: 30px; }
.site-header nav a { color: inherit; text-decoration: none; font-size: 13px; font-weight: 600; }
.site-header nav a:hover { color: var(--accent-light); }

.landing-page { color: #f5f1e8; background: var(--night); }
.landing-header { max-width: 1480px; margin: auto; }
.hero { max-width: 1480px; min-height: 700px; margin: auto; padding: 86px 5vw 92px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(450px, 0.95fr); gap: 7vw; align-items: center; }
.hero-copy { max-width: 760px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: #c7c1b6; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; }
.eyebrow > span { display: block; width: 38px; height: 1px; background: var(--accent); }
.hero h1 { max-width: 850px; margin: 28px 0 24px; font: 600 clamp(56px, 6.2vw, 98px)/0.94 var(--font-serif); letter-spacing: -0.052em; }
.hero-copy > p { max-width: 670px; margin: 0; color: #b9b4aa; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.68; }
.hero-actions { display: flex; gap: 12px; margin-top: 38px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; border: 1px solid transparent; text-decoration: none; font-size: 13px; font-weight: 700; }
.button.primary { color: #171714; background: var(--accent); }
.button.primary:hover { background: var(--accent-light); }
.button.secondary { color: #f5f1e8; border-color: var(--night-line); background: rgba(255,255,255,0.035); }
.button.secondary:hover { border-color: rgba(255,255,255,0.3); }
.hero-note { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 28px; color: #858179; font: 400 11px/1 var(--font-mono); }
.hero-note span { position: relative; }
.hero-note span + span::before { content: ''; position: absolute; left: -12px; top: 4px; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
.terminal-card { overflow: hidden; border: 1px solid var(--night-line); background: #151513; box-shadow: 0 30px 90px rgba(0,0,0,0.32); transform: rotate(0.4deg); }
.terminal-bar { height: 47px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: #77736c; border-bottom: 1px solid var(--night-line); font: 400 10px/1 var(--font-mono); }
.terminal-bar > div { display: flex; gap: 6px; }
.terminal-bar i { width: 7px; height: 7px; border-radius: 50%; background: #393934; }
.terminal-card pre { min-height: 325px; margin: 0; padding: 30px 28px; overflow: auto; color: #e9e4da; font: 400 12px/1.9 var(--font-mono); }
.terminal-card code { font: inherit; }
.terminal-card .muted { color: #716e68; }
.terminal-card .green { color: #9cc397; }
.terminal-card .amber { color: #ef965e; }
.terminal-foot { height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 18px; color: #77736c; border-top: 1px solid var(--night-line); font: 400 10px/1 var(--font-mono); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(133,174,130,0.1); }

.signal-strip { max-width: 1480px; margin: auto; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); }
.signal-strip > div { min-height: 150px; padding: 32px 5vw 30px; display: flex; flex-direction: column; gap: 10px; }
.signal-strip > div + div { border-left: 1px solid var(--night-line); }
.signal-strip strong { font: 500 20px/1.2 var(--font-serif); }
.signal-strip span { max-width: 330px; color: #8d8981; font-size: 12px; line-height: 1.6; }

.workflow { max-width: 1480px; margin: auto; padding: 130px 5vw 150px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; align-items: end; padding-bottom: 55px; }
.section-heading > div { display: flex; gap: 20px; align-items: flex-start; }
.section-number { color: var(--accent); font: 500 10px/1 var(--font-mono); letter-spacing: 0.08em; }
.section-heading h2, .gate-copy h2, .docs-callout h2, .final-cta h2 { margin: -8px 0 0; font: 500 clamp(42px, 5vw, 72px)/1 var(--font-serif); letter-spacing: -0.035em; }
.section-heading > p { max-width: 550px; margin: 0; color: #8f8a80; font-size: 16px; line-height: 1.7; }
.workflow-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--night-line); }
.workflow-grid article { min-height: 360px; padding: 34px; display: flex; flex-direction: column; }
.workflow-grid article + article { border-left: 1px solid var(--night-line); }
.workflow-grid .step { color: var(--accent); font: 500 11px/1 var(--font-mono); }
.workflow-grid h3 { max-width: 280px; margin: 72px 0 18px; font: 500 28px/1.15 var(--font-serif); }
.workflow-grid p { max-width: 340px; margin: 0; color: #8f8a80; font-size: 13px; line-height: 1.7; }
.workflow-grid a { margin-top: auto; color: #ded9cf; text-decoration: none; font-size: 12px; font-weight: 700; }
.workflow-grid a:hover { color: var(--accent-light); }

.gate-section { color: var(--ink); background: var(--paper); padding: 140px max(5vw, calc((100vw - 1480px) / 2 + 5vw)); display: grid; grid-template-columns: 1fr 0.8fr; gap: 11vw; align-items: center; }
.gate-copy { max-width: 690px; }
.gate-copy h2 { margin: 20px 0 28px; }
.gate-copy > p { max-width: 620px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.gate-copy ul { margin: 32px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.gate-copy li { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.gate-copy li::before { content: '✓'; margin-right: 13px; color: var(--accent); font-family: var(--font-mono); }
.text-link { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; }
.text-link:hover { color: var(--accent); }
.verdict-card { max-width: 500px; padding: 30px; border: 1px solid var(--line); background: #ebe4d7; box-shadow: 18px 18px 0 #ddd4c5; font-family: var(--font-mono); }
.verdict-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; color: #6e6a63; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.verdict-title b { padding: 6px 9px; color: #416640; border: 1px solid rgba(65,102,64,.3); background: rgba(133,174,130,.16); font-size: 10px; }
.diff-line { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; color: #7a756d; font-size: 11px; }
.diff-line code { color: var(--ink); font-family: inherit; }
.verdict-rule { height: 1px; margin: 20px 0; background: var(--line); }
.verdict-card p { margin: 0 0 30px; color: var(--ink); font: 500 18px/1.5 var(--font-serif); }
.finding-count { display: flex; gap: 8px; }
.finding-count span { padding: 7px 9px; border: 1px solid var(--line); color: #6e6a63; font-size: 9px; }

.docs-callout { max-width: 1480px; margin: auto; padding: 140px 5vw; display: grid; grid-template-columns: .9fr 1.1fr; gap: 9vw; }
.docs-callout h2 { margin: 18px 0 24px; }
.docs-callout > div > p { max-width: 580px; color: #8f8a80; font-size: 15px; line-height: 1.75; }
.doc-links { border-top: 1px solid var(--night-line); }
.doc-links a { min-height: 92px; display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; align-items: center; border-bottom: 1px solid var(--night-line); text-decoration: none; }
.doc-links a:hover strong, .doc-links a:hover i { color: var(--accent-light); }
.doc-links span { color: #77736c; font: 400 10px/1 var(--font-mono); }
.doc-links strong { font: 500 21px/1 var(--font-serif); }
.doc-links i { color: var(--accent); font-style: normal; }
.final-cta { max-width: 1480px; margin: auto; padding: 100px 5vw; display: flex; align-items: end; justify-content: space-between; gap: 40px; border-top: 1px solid var(--night-line); }
.final-cta h2 { max-width: 820px; margin-top: 24px; }
.site-footer { max-width: 1480px; min-height: 110px; margin: auto; padding: 25px 5vw; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; border-top: 1px solid var(--night-line); color: #7e7a72; font-size: 11px; }
.site-footer > p { text-align: center; }
.site-footer nav { display: flex; justify-content: flex-end; gap: 22px; }
.site-footer a { text-decoration: none; }
.site-footer > p a:hover, .site-footer nav a:hover { color: var(--accent-light); }

/* Documentation */
.docs-page { min-height: 100vh; background: #f7f4ed; }
.docs-header { position: sticky; z-index: 20; top: 0; height: 67px; padding: 0 28px; color: #eee9df; background: rgba(16,16,15,.97); backdrop-filter: blur(14px); }
.docs-header .selected { color: var(--accent-light); }
.nav-toggle { display: none; padding: 8px 10px; color: #f5f1e8; border: 1px solid var(--night-line); background: transparent; font-size: 11px; }
.docs-frame { max-width: 1560px; min-height: calc(100vh - 67px); margin: auto; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.docs-sidebar { position: sticky; top: 67px; height: calc(100vh - 67px); overflow-y: auto; padding: 28px 26px 50px; border-right: 1px solid var(--line); background: #efebe2; }
.docs-filter { display: block; margin-bottom: 28px; }
.docs-filter input { width: 100%; height: 38px; padding: 0 12px 0 34px; color: var(--ink); border: 1px solid var(--line); border-radius: 0; outline: none; background-color: rgba(255,255,255,.36); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5' fill='none' stroke='%236b675f'/%3E%3Cpath d='m12.3 12.3 4 4' stroke='%236b675f'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px center; background-size: 14px; font-size: 11px; }
.docs-filter input:focus { border-color: var(--accent); }
.docs-sidebar nav section { margin-bottom: 26px; }
.docs-sidebar nav h2 { margin: 0 0 8px; color: #8e887d; font: 500 9px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; }
.docs-sidebar nav a { display: block; margin: 1px -8px; padding: 7px 9px; color: #514e48; text-decoration: none; font-size: 12px; line-height: 1.35; }
.docs-sidebar nav a:hover { color: var(--ink); background: rgba(255,255,255,.5); }
.docs-sidebar nav a.active { color: var(--ink); background: #e0d9cc; font-weight: 700; }
.filter-empty { color: var(--ink-soft); font-size: 11px; }
.docs-main { min-width: 0; padding: 42px clamp(30px, 7vw, 110px) 0; }
.breadcrumbs { max-width: 850px; margin: 0 auto 47px; display: flex; gap: 8px; color: #8d877c; font-size: 10px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.article-kicker { margin-bottom: 17px; color: var(--accent); font: 500 9px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; }
.prose { max-width: 850px; min-height: 620px; margin: auto; padding-bottom: 85px; color: #33312d; }
.prose > h1 { margin: 0 0 34px; color: var(--ink); font: 600 clamp(46px, 6vw, 70px)/.98 var(--font-serif); letter-spacing: -.04em; }
.prose > h1 + p { margin-top: 0; color: #55514a; font-size: 18px; line-height: 1.75; }
.prose h2 { scroll-margin-top: 90px; margin: 66px 0 21px; padding-top: 30px; border-top: 1px solid var(--line); color: var(--ink); font: 600 29px/1.15 var(--font-serif); letter-spacing: -.02em; }
.prose h3 { scroll-margin-top: 90px; margin: 38px 0 15px; color: var(--ink); font-size: 16px; line-height: 1.3; }
.prose h4 { margin: 28px 0 12px; color: var(--ink); font-size: 13px; }
.prose p { margin: 15px 0; font-size: 14px; line-height: 1.8; }
.prose ul, .prose ol { margin: 17px 0; padding-left: 25px; }
.prose li { margin: 8px 0; padding-left: 4px; font-size: 14px; line-height: 1.7; }
.prose li::marker { color: var(--accent); }
.prose a { color: #9b481e; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose code { padding: .16em .34em; color: #8b3d18; border: 1px solid rgba(155,72,30,.14); background: #efe7da; font: 400 .86em/1.45 var(--font-mono); overflow-wrap: anywhere; }
.prose pre { margin: 22px 0 26px; padding: 22px 24px; overflow-x: auto; border: 1px solid #282824; background: #171715; box-shadow: 8px 8px 0 #e6dfd2; }
.prose pre code { padding: 0; color: #e7e2d8; border: 0; background: none; font: 400 11px/1.8 var(--font-mono); overflow-wrap: normal; }
.prose blockquote { margin: 24px 0; padding: 4px 20px; color: #5a554d; border-left: 3px solid var(--accent); background: #eee8dc; }
.prose table { width: 100%; margin: 26px 0 32px; border-collapse: collapse; font-size: 12px; line-height: 1.55; }
.prose th { color: var(--ink); background: #e8e1d5; text-align: left; font-size: 11px; }
.prose th, .prose td { padding: 11px 13px; vertical-align: top; border: 1px solid var(--line); }
.prose td code { font-size: 10px; }
.prose strong { color: var(--ink); }
.page-turn { max-width: 850px; margin: 0 auto; padding: 35px 0 55px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--line); }
.page-turn a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.page-turn .next { text-align: right; }
.page-turn small { color: #938d82; font: 400 9px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.page-turn span { font: 500 17px/1.3 var(--font-serif); }
.page-turn a:hover span { color: var(--accent); }
.docs-footer { min-height: 80px; margin: 0 calc(clamp(30px, 7vw, 110px) * -1); padding: 25px clamp(30px, 7vw, 110px); display: flex; align-items: center; justify-content: space-between; color: #888278; border-top: 1px solid var(--line); font-size: 10px; }
.docs-footer a { text-decoration: none; }
.docs-footer a:hover { color: var(--accent); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 70px; }
  .terminal-card { max-width: 680px; transform: none; }
  .signal-strip { grid-template-columns: 1fr; }
  .signal-strip > div + div { border-left: 0; border-top: 1px solid var(--night-line); }
  .section-heading, .gate-section, .docs-callout { grid-template-columns: 1fr; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-grid article { min-height: 280px; }
  .workflow-grid article + article { border-left: 0; border-top: 1px solid var(--night-line); }
  .workflow-grid h3 { margin-top: 45px; }
  .verdict-card { width: 100%; }
  .docs-callout { gap: 50px; }
  .docs-frame { grid-template-columns: 240px minmax(0, 1fr); }
  .docs-sidebar { padding-inline: 18px; }
}

@media (max-width: 720px) {
  .site-header { height: 64px; padding-inline: 20px; }
  .landing-header nav a:first-child { display: none; }
  .landing-header nav { gap: 18px; }
  .hero { min-height: auto; padding: 62px 20px 72px; }
  .hero h1 { font-size: clamp(50px, 15vw, 72px); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .terminal-card pre { padding: 22px 18px; font-size: 10px; }
  .signal-strip > div { padding: 28px 20px; }
  .workflow, .docs-callout { padding: 90px 20px; }
  .section-heading { gap: 30px; }
  .section-heading h2, .gate-copy h2, .docs-callout h2, .final-cta h2 { font-size: 44px; }
  .workflow-grid article { padding: 28px; }
  .gate-section { padding: 90px 20px; }
  .verdict-card { padding: 22px; box-shadow: 8px 8px 0 #ddd4c5; }
  .doc-links a { grid-template-columns: 1fr auto; }
  .doc-links span { grid-column: 1 / -1; margin-bottom: -12px; }
  .final-cta { padding: 85px 20px; align-items: flex-start; flex-direction: column; }
  .site-footer { padding: 35px 20px; grid-template-columns: 1fr; gap: 22px; text-align: left; }
  .site-footer > p { text-align: left; }
  .site-footer nav { justify-content: flex-start; }
  .docs-header { top: 0; height: 60px; }
  .docs-header nav { display: none; }
  .nav-toggle { display: block; }
  .docs-frame { display: block; min-height: calc(100vh - 60px); }
  .docs-sidebar { position: fixed; z-index: 15; top: 60px; left: 0; width: min(84vw, 320px); height: calc(100vh - 60px); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 14px 0 40px rgba(0,0,0,.18); }
  .docs-sidebar.open { transform: none; }
  .docs-main { padding: 30px 20px 0; }
  .breadcrumbs { margin-bottom: 36px; }
  .prose > h1 { font-size: 47px; }
  .prose > h1 + p { font-size: 16px; }
  .prose h2 { margin-top: 48px; font-size: 26px; }
  .prose table { display: block; overflow-x: auto; white-space: normal; }
  .prose pre { margin-inline: -7px; padding-inline: 16px; box-shadow: 5px 5px 0 #e6dfd2; }
  .page-turn { grid-template-columns: 1fr; }
  .page-turn .next { text-align: left; }
  .docs-footer { margin-inline: -20px; padding-inline: 20px; gap: 15px; flex-direction: column; align-items: flex-start; }
}

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