/* Olyptic: site styles */

/* Self-hosted fonts (SIL Open Font License; see assets/fonts/LICENSE-*.txt) */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --paper: #F6F4EF;
  --stone: #ECE8E0;
  --pebble: #D3CCC0;
  --input-border: #A89F91;
  --slate: #1C2430;
  --granite: #4A5562;
  --moss: #2F6B4F;
  --moss-dark: #1F4A36;
  --moss-light: #E3EDE6;
  --moss-on-dark: #7FC09C;
  --ochre-text: #8A5F18;
  --ember: #B4462F;
  --ember-text: #8E3320;
  --ember-tint: #FBF1EE;
  --white: #FFFFFF;
  --on-dark: #E6E9EE;
  --on-dark-muted: #C9CED6;

  --serif: "Source Serif 4", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius: 12px;
  --radius-sm: 10px;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
@media (max-width: 640px) { body { font-size: 16px; } }

img, svg { display: block; max-width: 100%; }
a { color: var(--moss); text-underline-offset: 3px; }
a:hover { color: var(--moss-dark); }
:focus-visible { outline: 3px solid var(--moss); outline-offset: 2px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--moss-on-dark); }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--slate); color: var(--paper); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: var(--paper); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }
.section { padding: 120px 0; }
@media (max-width: 760px) { .section { padding: 80px 0; } }
.band { background: var(--stone); border-top: 1px solid var(--pebble); border-bottom: 1px solid var(--pebble); }
.dark { background: var(--slate); color: var(--paper); }

/* Type */
.eyebrow {
  margin: 0 0 12px; font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--moss);
}
.dark .eyebrow { color: var(--moss-on-dark); }
.h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(36px, 5vw, 58px); line-height: 1.06; letter-spacing: -0.02em;
}
.h1-sub { font-size: clamp(34px, 4.4vw, 50px); line-height: 1.08; }
.h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(30px, 3.6vw, 42px); line-height: 1.15; letter-spacing: -0.01em;
}
.h3 { font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1.25; }
.h4 { font-size: 18px; font-weight: 600; line-height: 1.35; }
.lead { margin-top: 20px; color: var(--granite); font-size: 18px; max-width: 680px; }
.muted { color: var(--granite); }
.small { font-size: 14px; }
.statement { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.35; max-width: 860px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-primary { background: var(--moss); color: var(--paper); }
.btn-primary:hover { background: var(--moss-dark); color: var(--paper); }
.btn-secondary { border-color: var(--slate); color: var(--slate); }
.btn-secondary:hover { background: var(--stone); color: var(--slate); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--pebble); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--slate); }
.logo:hover { color: var(--slate); }
.logo span { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.on-dark .logo, .on-dark .logo:hover { color: var(--paper); }
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--slate); text-decoration: none; }
.nav-links a:hover { color: var(--moss); text-decoration: underline; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-talk { font-size: 15px; font-weight: 500; }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--pebble); border-radius: var(--radius-sm);
  background: var(--paper); cursor: pointer; color: var(--slate);
}
.mobile-nav { display: none; border-top: 1px solid var(--pebble); padding: 8px 24px 20px; }
.mobile-nav a { display: block; padding: 12px 0; font-size: 18px; font-weight: 500; color: var(--slate); text-decoration: none; border-bottom: 1px solid var(--stone); }
.mobile-nav a:last-child { border-bottom: 0; color: var(--moss); }
.mobile-nav.is-open { display: block; }
.logo span, .btn { white-space: nowrap; }
@media (max-width: 900px) {
  .nav-links, .nav-talk { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .nav-actions .btn { display: none; }
}

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--stone); }
.hero-contours { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.8; pointer-events: none; }
.hero .container { position: relative; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 104px; }
.hero-copy { flex: 1 1 460px; min-width: 0; }
.hero-copy .lead { font-size: 19px; max-width: 560px; margin-top: 24px; }
.trust-line { margin-top: 28px; font-size: 14px; color: var(--granite); }
.hero-visual { flex: 1 1 420px; min-width: 0; max-width: 520px; }
@media (max-width: 760px) { .hero .container { padding-top: 56px; padding-bottom: 72px; gap: 40px; } }

/* Trace card */
.trace-card { background: var(--white); border: 1px solid var(--pebble); border-radius: var(--radius); overflow: hidden; }
.trace-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 14px 18px; border-bottom: 1px solid var(--stone); font-size: 13px; }
.trace-head strong { font-weight: 600; }
.mono { font-family: var(--mono); }
.trace-steps { list-style: none; margin: 0; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.trace-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--stone); border-radius: var(--radius-sm); }
.trace-step .num { font-family: var(--mono); font-size: 12px; color: var(--granite); padding-top: 2px; }
.trace-step .title { font-size: 15px; font-weight: 500; }
.trace-step .call { font-family: var(--mono); font-size: 12px; color: var(--granite); overflow-wrap: anywhere; }
.trace-step.is-fail { border: 1.5px solid var(--ember); background: var(--ember-tint); }
.trace-step.is-fail .num { color: var(--ember-text); }
.trace-step.is-fail .call-main { font-family: var(--mono); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.trace-step .fail-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.trace-step .fail-row a { font-size: 13px; font-weight: 600; color: var(--ember-text); }
.caption { margin-top: 10px; font-size: 13px; color: var(--granite); }
.dark .caption { color: var(--on-dark-muted); }

/* Verdict & severity chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.chip svg { width: 12px; height: 12px; }
.chip-fail { background: var(--ember); color: var(--white); }
.chip-pass { background: var(--moss); color: var(--white); }
.chip-review { background: var(--ochre-text); color: var(--white); }
.chip-low { background: var(--moss-light); color: var(--moss-dark); }

/* Cards & grids */
.grid { display: grid; gap: 20px; margin-top: 48px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-why { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { border-radius: var(--radius); padding: 28px; }
.card-stone { background: var(--stone); }
.card-line { border: 1px solid var(--pebble); background: var(--paper); }
.card .icon { width: 28px; height: 28px; color: var(--moss); margin-bottom: 16px; }
.card .h3 { margin-bottom: 8px; }
.card .h4 { margin-bottom: 8px; }
.card p { color: var(--granite); }
.card-quote { background: var(--slate); color: var(--paper); display: flex; align-items: flex-end; }
.card-quote p { color: var(--paper); font-family: var(--serif); font-size: 27px; line-height: 1.3; }
.tag { display: inline-block; margin-top: 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--granite); }

/* How it works */
.steps-wrap { position: relative; margin-top: 56px; }
.steps-line { position: absolute; left: 0; right: 0; top: 21px; border-top: 2px dotted #8FAE9B; }
.steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px; }
.step-node {
  width: 44px; height: 44px; border-radius: 50%; background: var(--stone); border: 1.5px solid var(--moss);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--moss);
}
.step h3 { margin: 18px 0 6px; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.step p { font-size: 15px; color: var(--granite); }
@media (max-width: 1000px) {
  .steps-line { top: 0; bottom: 0; left: 21px; right: auto; border-top: 0; border-left: 2px dotted #8FAE9B; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step { display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; }
  .step h3 { margin: 6px 0 4px; }
  .step p { grid-column: 2; }
  .step h3 { grid-column: 2; grid-row: 1; }
  .step .step-node { grid-row: 1 / span 2; }
}

/* Product showcase */
.tablist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tab {
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--paper); border: 1px solid #5B6676;
}
.tab[aria-selected="true"] { background: var(--paper); color: var(--slate); border-color: var(--paper); }
.no-js .tablist { display: none; }
.showcase { margin-top: 24px; background: var(--paper); color: var(--slate); border-radius: var(--radius); overflow: hidden; }
.showcase-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--pebble); font-size: 13px; color: var(--granite); }
.showcase-head strong { color: var(--slate); }
.panel { padding: 24px; }
.no-js .panel + .panel { border-top: 1px solid var(--pebble); }
.panel-title-nojs { display: none; }
.no-js .panel-title-nojs { display: block; margin-bottom: 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--granite); }
.split { display: flex; flex-wrap: wrap; gap: 24px; }
.timeline { flex: 2 1 420px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 13px; }
.timeline li { display: flex; gap: 14px; padding: 10px 14px; background: var(--white); border: 1px solid var(--stone); border-radius: 8px; }
.timeline li span:first-child { color: var(--granite); flex: 0 0 auto; }
.timeline li span:last-child { overflow-wrap: anywhere; }
.timeline li.is-fail { background: var(--ember-tint); border: 1.5px solid var(--ember); }
.timeline li.is-fail span:first-child { color: var(--ember-text); }
.timeline li.is-fail span:last-child { font-weight: 500; }
.rule-card { flex: 1 1 280px; min-width: 0; background: var(--white); border: 1px solid var(--pebble); border-radius: var(--radius-sm); padding: 20px; }
.rule-card h3 { margin: 14px 0 6px; font-size: 17px; }
.rule-card .rule { font-family: var(--mono); font-size: 12px; color: var(--granite); overflow-wrap: anywhere; }
.rule-card p:last-child { margin-top: 14px; font-size: 14px; color: var(--granite); }
.risk-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.risk-head h3 { font-family: var(--serif); font-size: 24px; }
.risk-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.risk { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding: 14px 16px; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius-sm); }
.risk .name { flex: 1 1 220px; font-weight: 500; }
.risk .refs { font-size: 13px; color: var(--granite); }
.risk .fix { flex-basis: 100%; font-size: 14px; color: var(--granite); }
.risk a { font-size: 13px; font-weight: 600; }
.ba-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.ba { background: var(--white); border: 1px solid var(--pebble); border-radius: var(--radius-sm); padding: 20px; }
.ba .label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--granite); }
.ba .call { margin: 10px 0 14px; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.pr { background: var(--white); border: 1px solid var(--pebble); border-radius: var(--radius-sm); }
.pr-head { padding: 14px 18px; border-bottom: 1px solid var(--stone); font-size: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; }
.check + .check { border-top: 1px solid var(--stone); }
.check .dot { flex: 0 0 auto; display: inline-flex; padding: 3px; border-radius: 50%; color: var(--white); }
.check .dot svg { width: 14px; height: 14px; }
.check .dot.fail { background: var(--ember); }
.check .dot.pass { background: var(--moss); }
.check strong { display: block; }
.check span.sub { font-size: 14px; color: var(--granite); }

/* Frameworks */
.chips { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 16px; border: 1px solid var(--pebble); border-radius: 999px; font-size: 15px; font-weight: 500; }

/* Open source */
.os .container { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.os-copy { flex: 1 1 380px; min-width: 0; }
.os-code { flex: 1 1 440px; min-width: 0; }
.code {
  margin: 0; background: var(--slate); color: var(--on-dark); border-radius: var(--radius);
  padding: 24px; font-family: var(--mono); font-size: 14px; line-height: 1.75; overflow-x: auto;
}
.code .ln { color: #8792A2; user-select: none; display: inline-block; width: 2em; }
.code .k { color: var(--moss-on-dark); }

/* Design partners */
.partner { background: var(--moss-light); border-top: 1px solid #C5D8CB; border-bottom: 1px solid #C5D8CB; }
.partner .container { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.partner-copy { flex: 1 1 420px; min-width: 0; }
.partner-copy .lead { color: #33403A; }
.partner-eyebrow { color: var(--moss-dark); }
.partner-box { flex: 1 1 380px; min-width: 0; background: var(--paper); border: 1px solid #C5D8CB; border-radius: var(--radius); padding: 28px; }
.partner-box ul { margin: 14px 0 24px; padding-left: 20px; color: var(--granite); }
.partner-box li + li { margin-top: 6px; }

/* FAQ */
.faq { border-top: 1px solid var(--pebble); margin-top: 32px; }
.faq details { border-bottom: 1px solid var(--pebble); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 16px 0; font-size: 18px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 20px; font-weight: 400; color: var(--moss); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 20px; color: var(--granite); }

/* Footer */
.site-footer { background: var(--slate); color: var(--on-dark); }
.site-footer .container { padding-top: 72px; padding-bottom: 40px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.footer-brand { flex: 1 1 280px; min-width: 0; }
.footer-brand p { margin-top: 14px; color: var(--on-dark-muted); font-size: 15px; }
.footer-brand a { color: var(--moss-on-dark); }
.footer-nav { flex: 2 1 480px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 32px; font-size: 15px; }
.footer-nav h2 { margin-bottom: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: var(--on-dark); text-decoration: none; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; }
.footer-legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid #333E4D; font-size: 13px; color: #A9B1BC; }

/* Sub-pages */
.page-hero { padding: 88px 0 56px; }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.steps-list li { display: flex; gap: 16px; }
.steps-list .step-node { flex: 0 0 36px; width: 36px; height: 36px; font-size: 13px; background: var(--paper); }
.steps-list h3 { font-size: 17px; margin-bottom: 4px; }
.steps-list p { color: var(--granite); font-size: 16px; }
.founder { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.founder-photo {
  flex: 0 0 220px; height: 260px; border-radius: var(--radius); background: var(--stone);
  border: 1px dashed var(--input-border); display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--granite);
}
.founder-copy { flex: 1 1 420px; min-width: 0; }
.founder-copy p + p { margin-top: 16px; }
.cta-band { background: var(--moss-light); border-top: 1px solid #C5D8CB; text-align: center; padding: 72px 0; }

/* Scroll reveal (only when JS runs and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---- Hero trace animation ---- */
.trace-status { font-size: 12px; font-weight: 600; color: var(--ember-text); display: inline-flex; align-items: center; gap: 6px; }
.trace-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); }
.trace-card.is-running .trace-status { color: var(--granite); }
.trace-card.is-running .trace-status::before { background: var(--moss); animation: kl-pulse 1s ease-in-out infinite; }
@keyframes kl-pulse { 50% { opacity: 0.3; } }
.trace-step { transition: opacity 0.45s ease, transform 0.45s ease; }
.trace-step.is-pending { opacity: 0; transform: translateY(8px); }
.trace-card { box-shadow: 0 1px 2px rgba(28, 36, 48, 0.04), 0 12px 32px -12px rgba(28, 36, 48, 0.18); }
.caption-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.replay { min-height: 32px; padding: 0 12px; border: 1px solid var(--pebble); border-radius: 999px; background: var(--paper); font: inherit; font-size: 13px; font-weight: 600; color: var(--slate); cursor: pointer; }
.replay:hover { background: var(--stone); }

/* ---- Facts strip ---- */
.facts { background: var(--paper); }
.facts-list { list-style: none; margin: 0 auto; padding-top: 28px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.facts-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--granite); line-height: 1.5; }
.facts-list strong { color: var(--slate); font-weight: 600; display: block; }
.facts-list svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--moss); margin-top: 2px; }
@media (max-width: 1000px) { .facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .facts-list { grid-template-columns: 1fr; gap: 16px; } }

/* ---- Old way vs new way ---- */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 64px; }
.compare-col { border-radius: var(--radius); padding: 32px; }
.compare-old { background: var(--stone); }
.compare-new { background: var(--slate); color: var(--paper); }
.compare-label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--granite); margin-bottom: 10px; }
.compare-new .compare-label { color: var(--moss-on-dark); }
.compare-col ul { list-style: none; margin: 24px 0 0; padding: 0; }
.compare-col li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--pebble); }
.compare-new li { border-top-color: #333E4D; color: var(--on-dark); }
.compare-old li { color: var(--granite); }
.mark { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; line-height: 1; margin-top: 1px; }
.mark-x { border: 1px solid var(--input-border); color: var(--granite); font-size: 15px; }
.mark-ok { background: #5FA37F; color: var(--slate); }
.mark-ok svg { width: 13px; height: 13px; }

/* ---- Architecture diagram ---- */
.arch { margin: 72px 0 0; padding: 40px 32px; background: var(--paper); border: 1px solid var(--pebble); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; }
.arch figcaption { text-align: center; max-width: 620px; margin-bottom: 36px; }
.arch figcaption p { margin-top: 8px; font-size: 16px; }
.arch-top { display: flex; align-items: stretch; justify-content: center; width: 100%; }
.arch-box { flex: 1 1 0; max-width: 260px; min-width: 0; border: 1px solid var(--pebble); background: var(--white); border-radius: var(--radius-sm); padding: 16px 18px; text-align: center; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.arch-box strong { font-size: 16px; }
.arch-box span { font-size: 14px; color: var(--granite); line-height: 1.45; }
.arch-accent { border: 2px solid var(--moss); background: var(--moss-light); }
.arch-link { flex: 0 0 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--granite); }
.arch-link svg { width: 72px; height: 18px; }
.arch-link span { font-family: var(--mono); font-size: 12px; }
.arch-down { color: var(--granite); }
.arch-down svg { width: 16px; height: 40px; margin: 6px 0; }
.arch-mid { flex: none; width: 100%; max-width: 360px; }
.arch-outputs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 640px; }
.arch-outputs li { border: 1px solid var(--pebble); border-radius: var(--radius-sm); background: var(--stone); padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.arch-outputs strong { font-size: 15px; }
.arch-outputs span { font-size: 13px; color: var(--granite); }
@media (max-width: 860px) {
  .arch { padding: 32px 20px; }
  .arch-top { flex-direction: column; align-items: center; }
  .arch-box { max-width: 360px; width: 100%; flex: none; }
  .arch-link { flex: none; flex-direction: row; gap: 4px; padding: 20px 0; }
  .arch-link svg { transform: rotate(90deg); width: 44px; }
  .arch-outputs { grid-template-columns: 1fr; max-width: 360px; }
}

/* ---- Contour-line accents ---- */
.contours { position: relative; isolation: isolate; overflow: hidden; }
.contours::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 900px; height: 900px; right: -300px; top: -320px;
  background: var(--contour, #D3CCC0); opacity: 0.7;
  -webkit-mask: url("/assets/contours.svg") center / contain no-repeat;
  mask: url("/assets/contours.svg") center / contain no-repeat;
}
.contours-alt::before {
  -webkit-mask-image: url("/assets/contours-2.svg");
  mask-image: url("/assets/contours-2.svg");
}
.contours-bl::before { right: auto; top: auto; left: -340px; bottom: -380px; }
.contours-br::before { top: auto; bottom: -360px; }
.contours-dark { --contour: #4A5870; }
.contours-moss { --contour: #B7CDBE; }
.band.contours { --contour: #CFC7B9; }
@media (max-width: 760px) { .contours::before { width: 620px; height: 620px; right: -280px; top: -260px; } .contours-bl::before { left: -300px; bottom: -320px; right: auto; top: auto; } }

/* ---- Hero contours: breathing, drift and pointer response ---- */
.hero-rings, .hero-flow { transform-box: fill-box; transform-origin: center; }
.hero-rings path, .hero-flow path { transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), stroke 0.4s ease; }
.hero.is-hovering .hero-rings path { stroke: #BDB2A1; }
.hero.is-hovering .hero-rings path:first-child { stroke: #8FB59D; }
@media (prefers-reduced-motion: no-preference) {
  .hero-rings { animation: kl-breathe 5s ease-in-out infinite alternate; }
  .hero-rings path { animation: kl-glow 2.4s ease-in-out infinite alternate; }
  .hero-rings path:nth-child(2) { animation-delay: -0.6s; }
  .hero-rings path:nth-child(3) { animation-delay: -1.2s; }
  .hero-rings path:nth-child(4) { animation-delay: -1.8s; }
  .hero-flow { animation: kl-drift 7s ease-in-out infinite alternate; }
  .hero-flow path:nth-child(2) { animation: kl-sway 5s ease-in-out infinite alternate; }
}
@keyframes kl-breathe { from { transform: scale(0.95) rotate(-3deg); } to { transform: scale(1.1) rotate(6deg); } }
@keyframes kl-glow { from { stroke-opacity: 0.25; } to { stroke-opacity: 1; } }
@keyframes kl-drift { from { transform: translate(0, 0); } to { transform: translate(-180px, -18px); } }
@keyframes kl-sway { from { translate: 0 0; } to { translate: 60px 14px; } }

/* ---- Mobile refinements ---- */
@media (max-width: 760px) {
  /* Place the hero rings behind the trace card instead of off-screen */
  .hero-contours { left: auto; top: auto; right: -200px; bottom: 24px; width: 1100px; height: 490px; opacity: 0.6; }
  .code { font-size: 12.5px; padding: 20px 18px; }
  .footer-nav ul { gap: 0; }
  .footer-nav a { display: inline-block; padding: 10px 0; }
  .tablist { gap: 6px; }
  .tab { flex: 1 1 calc(50% - 6px); padding: 0 12px; }
}
@media (min-width: 761px) {
  .footer-nav a { display: inline-block; padding: 3px 0; }
}
@media (max-width: 760px) { .footer-brand p a { display: inline-block; padding: 10px 0; } }

/* ---- Section contour accents: slow float plus pointer response ---- */
.contours::before { translate: var(--px, 0px) var(--py, 0px); transition: translate 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.4s ease; }
.contours.is-hovering::before { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .contours::before { animation: kl-float 8s ease-in-out infinite alternate; }
  .contours-alt::before { animation-duration: 10s; animation-direction: alternate-reverse; }
}
@keyframes kl-float { from { rotate: -4deg; scale: 0.96; } to { rotate: 5deg; scale: 1.06; } }

/* ---- Word-by-word headline reveal ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.wi { display: inline-block; transform: translateY(105%); opacity: 0; transition: transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.75s ease; transition-delay: calc(var(--i) * 55ms); }
.is-split-in .wi { transform: none; opacity: 1; }

/* ---- How it works: line draws itself as you scroll ---- */
.steps-progress { position: absolute; left: 0; top: -2px; width: 100%; height: 2px; background: var(--moss); transform-origin: left center; transform: scaleX(var(--p, 0)); }
.step-node { transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease; }
.step.is-lit .step-node { background: var(--moss); color: var(--paper); box-shadow: 0 0 0 6px rgba(47, 107, 79, 0.12); }
@media (max-width: 1000px) {
  .steps-progress { top: 0; left: -2px; width: 2px; height: 100%; transform-origin: center top; transform: scaleY(var(--p, 0)); }
}

/* ---- Film grain on dark surfaces ---- */
.grain { position: relative; isolation: isolate; overflow: hidden; }
.grain::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.09; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Use cases: expanding sector tabs ---- */
.sectors { display: flex; flex-direction: column; gap: 12px; margin-top: 48px; }
.sector { background: var(--stone); border-radius: var(--radius); overflow: hidden; transition: background 0.4s ease, color 0.4s ease; }
.sector-tab { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 16px; padding: 16px 22px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sector-num { font-family: var(--mono); font-size: 13px; color: var(--moss); }
.sector-name { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; }
.sector-body { padding: 0 22px 24px; }
.sector-body .h3 { display: none; }
.sector-body p { color: var(--granite); max-width: 560px; }
.sector-eg { margin: 18px 0 0; display: grid; gap: 4px 0; }
.sector-eg dt { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--granite); margin-top: 10px; }
.sector-eg dd { margin: 0; }
.sector-eg dd.mono { font-size: 14px; }
.js .sector:not(.is-active) .sector-body { display: none; }
.js .sector.is-active { background: var(--slate); color: var(--paper); }
.js .sector.is-active .sector-num { color: var(--moss-on-dark); }
.js .sector.is-active .sector-body p, .js .sector.is-active .sector-eg dt, .js .sector.is-active .tag { color: var(--on-dark-muted); }

@media (min-width: 1024px) {
  .js .sectors { flex-direction: row; height: 440px; }
  .js .sector { flex: 0 0 92px; display: flex; transition: flex 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.4s ease, color 0.4s ease; }
  .js .sector.is-active { flex: 1 1 auto; }
  .js .sector-tab { flex: 0 0 92px; width: 92px; height: 100%; flex-direction: column; justify-content: space-between; align-items: center; padding: 22px 0; }
  .js .sector-name { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 24px; white-space: nowrap; }
  .js .sector:not(.is-active):hover { background: #E3DED4; }
  .js .sector .sector-body { display: flex !important; flex-direction: column; justify-content: flex-end; flex: 0 0 auto; width: 560px; padding: 36px 40px 36px 8px; opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0s linear 0.35s; }
  .js .sector.is-active .sector-body { opacity: 1; visibility: visible; transition: opacity 0.5s ease 0.25s, visibility 0s; }
  .js .sector.is-active .sector-name { visibility: hidden; }
  .js .sector-body .h3 { display: block; font-size: 32px; margin-bottom: 14px; }
}

/* ---- Flowing lines (moved from the hero into the problem section) ---- */
.flow-section { position: relative; isolation: isolate; overflow: hidden; }
.flow-art { position: absolute; z-index: -1; left: 0; top: -40px; width: 100%; height: 220px; pointer-events: none; opacity: 0.9; }
.flow-lines path { transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), stroke 0.4s ease; }
.flow-section.is-hovering .flow-lines path { stroke: #BDB2A1; }
@media (prefers-reduced-motion: no-preference) {
  .flow-lines path:nth-child(1) { animation: kl-flow-a 7s ease-in-out infinite alternate; }
  .flow-lines path:nth-child(2) { animation: kl-flow-b 5.5s ease-in-out infinite alternate; }
}
@keyframes kl-flow-a { from { translate: 0 0; } to { translate: -160px 10px; } }
@keyframes kl-flow-b { from { translate: 0 0; } to { translate: 120px -8px; } }

/* ---- Section contours as real lines (each ring moves on its own) ---- */
.contour-art { position: absolute; z-index: -1; pointer-events: none; width: 900px; height: 900px; right: -300px; top: -320px; color: var(--contour, #D3CCC0); opacity: 0.8; }
.contours-bl > .contour-art { right: auto; top: auto; left: -340px; bottom: -380px; }
.contours-br > .contour-art { top: auto; bottom: -360px; }
.contour-art g { transform-box: fill-box; transform-origin: center; }
.contour-art path { stroke: currentColor; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.contours.has-art::before { display: none; }
.contours.is-hovering > .contour-art { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .contour-art g { animation: kl-float 9s ease-in-out infinite alternate; }
  .contours-alt > .contour-art g { animation-duration: 11s; animation-direction: alternate-reverse; }
  .contour-art path { animation: kl-glow 3s ease-in-out infinite alternate; }
}
@media (max-width: 760px) {
  .contour-art { width: 620px; height: 620px; right: -280px; top: -260px; }
  .contours-bl > .contour-art { left: -300px; bottom: -320px; right: auto; top: auto; }
  .contours-br > .contour-art { top: auto; bottom: -300px; }
}

/* ---- Use cases: calmer hover ---- */
@media (min-width: 1024px) {
  .js .sector { transition: flex 0.8s cubic-bezier(0.65, 0, 0.35, 1), background 0.6s ease, color 0.6s ease; }
  .js .sector .sector-body { transition: opacity 0.2s ease, visibility 0s linear 0.2s; }
  .js .sector.is-active .sector-body { transition: opacity 0.5s ease 0.45s, visibility 0s; }
  .js .sector-name { transition: opacity 0.3s ease; }
  .js .sector:not(.is-active):hover { background: #E6E1D7; }
}

/* ---- Use cases: genuinely smooth switching ----
   Animating flex-basis to "auto" can't be interpolated, so cards snapped.
   Keep every card's basis at 92px and animate only flex-grow instead. */
@media (min-width: 1024px) {
  .js .sector { flex: 0.0001 1 92px; transition: flex-grow 0.85s cubic-bezier(0.65, 0, 0.35, 1), background-color 0.7s ease, color 0.7s ease; }
  .js .sector.is-active { flex: 1 1 92px; }
  .js .sector .sector-name { visibility: visible; opacity: 1; transition: opacity 0.35s ease 0.3s; }
  .js .sector.is-active .sector-name { visibility: visible; opacity: 0; transition: opacity 0.2s ease; }
  .js .sector .sector-body { transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s; }
  .js .sector.is-active .sector-body { transform: none; transition: opacity 0.45s ease 0.4s, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s, visibility 0s; }
}

/* =====================================================================
   POLISH PASS: one design system for spacing, radius and type
   ===================================================================== */
:root {
  /* spacing scale (4/8 base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 120px;
  /* radius: outer containers, and inner = outer minus padding (floored at a small value) */
  --r-outer: 12px; --r-inner: 6px; --r-control: 10px; --r-pill: 999px;
  /* UI outlines that must reach 3:1 */
  --line-ui: #847C6E;
  --line-ui-dark: #7A8596;
  --granite: #444E5A;
}

/* Typography: balanced headlines, no widows in paragraphs, tabular figures where numbers line up */
h1, h2, h3, .statement { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.h1 { max-width: 15ch; }
.h2 { max-width: 22ch; }
.h2-sm { font-size: clamp(24px, 2.6vw, 30px); max-width: 30ch; }
.step-node, .num, .num-pill, .timeline, .risk-head span, .app-side-sum, .check .sub, .trace-head { font-variant-numeric: tabular-nums; }
.accent { color: var(--moss); }
.lead-follow { margin-top: var(--s-3); }
.note { margin-top: var(--s-5); }
.figure { margin: 0; }
.grow { flex: 1; min-width: 0; }
.rule-top { border-top: 1px solid var(--pebble); }
.section-tight { padding-bottom: var(--s-5); }

/* Mono only for code, tool calls and IDs */
.step-node { font-family: var(--sans); font-weight: 600; font-size: 14px; }
.arch-link span { font-family: var(--sans); font-size: 12.5px; }
.rule-text { font-weight: 500; }
.evidence-link { font-size: 13px; font-weight: 600; color: var(--ember-text); text-decoration: underline; text-underline-offset: 3px; }

/* Grouping: heading -> lead -> content */
.h2 + .lead { margin-top: var(--s-4); }
.grid { margin-top: var(--s-7); }
.statement { margin-top: var(--s-9); }
.compare { margin-top: var(--s-6); }
.steps-wrap { margin-top: var(--s-7); }
.card .icon { margin-bottom: var(--s-5); }
.card .h3, .card .h4 { margin-bottom: var(--s-2); }

/* Inner radius = outer radius minus padding */
.trace-step, .timeline li, .rule-card, .risk, .ba, .pr, .arch-box, .arch-outputs li, .app-runs li { border-radius: var(--r-inner); }
.trace-card, .app, .card, .compare-col, .sector, .partner-box, .arch, .code { border-radius: var(--r-outer); }

/* Remove embellishments */
.step.is-lit .step-node { box-shadow: none; }
.trace-card { box-shadow: 0 1px 2px rgba(28, 36, 48, 0.06); }

/* Contrast for UI outlines (3:1) */
.tab { border-color: var(--line-ui-dark); }
.steps-line { border-top-color: #7E9C89; }
.steps-line { border-left-color: #7E9C89; }
input, select, textarea { border-color: var(--line-ui) !important; }

/* Bigger, clearer calls to action */
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-arrow { width: 18px; height: 18px; transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn { transition: background 0.2s ease, transform 0.1s ease; }
.cta-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-4); }
.copy-btn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-3); border: 1px solid var(--line-ui); border-radius: var(--r-control); background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--slate); cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn:hover { background: var(--white); }
.copy-btn.is-done { border-color: var(--moss); color: var(--moss); }
.copy-btn.is-done svg { animation: kl-pop 0.35s ease; }
@keyframes kl-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.btn.is-opening { opacity: 0.85; }
.btn.is-opening .btn-arrow { animation: kl-nudge 0.6s ease-in-out infinite alternate; }
@keyframes kl-nudge { to { transform: translateX(5px); } }

/* Consistent icon sizes */
.card .icon { width: 28px; height: 28px; }
.fact-icon { flex: 0 0 22px; width: 22px; height: 22px; color: var(--moss); margin-top: 1px; }
.chip svg { width: 12px; height: 12px; }
.mark svg { width: 12px; height: 12px; }
.mark-x { color: var(--granite); }

/* Product window: show it as the product, not a floating card */
.app { margin-top: var(--s-5); background: var(--paper); color: var(--slate); overflow: hidden; }
.app-bar { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--pebble); background: var(--stone); font-size: 13px; }
.app-dots { display: inline-flex; gap: 6px; }
.app-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--pebble); }
.app-crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); color: var(--granite); min-width: 0; }
.app-crumbs > * + *::before { content: "/"; margin-right: var(--s-2); color: var(--line-ui); }
.app-crumbs strong { color: var(--slate); }
.app-body { display: flex; min-height: 420px; }
.app-side { flex: 0 0 260px; border-right: 1px solid var(--pebble); padding: var(--s-4); background: #F1EEE7; }
.app-side-title { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; margin-bottom: var(--s-3); }
.num-pill { font-size: 12px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--stone); color: var(--granite); }
.app-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.app-runs li { display: flex; align-items: center; gap: var(--s-2); padding: 8px 10px; font-size: 13px; }
.app-runs li.is-current { background: var(--white); box-shadow: inset 0 0 0 1px var(--pebble); }
.app-runs .id { font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--white); }
.v svg { width: 11px; height: 11px; }
.v-fail { background: var(--ember); } .v-pass { background: var(--moss); } .v-review { background: var(--ochre-text); }
.app-side-sum { display: flex; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--pebble); font-size: 12px; color: var(--granite); }
.app .showcase { flex: 1; min-width: 0; margin: 0; border-radius: 0; background: transparent; }
@media (max-width: 900px) { .app-side { display: none; } .app-body { min-height: 0; } }

/* Use-case tabs without numbers: centre the vertical title */
@media (min-width: 1024px) { .js .sector-tab { justify-content: flex-end; } }

/* FAQ: chevron that turns, answer that fades in */
.faq summary::after { content: none; }
.faq summary .chev { flex: 0 0 20px; width: 20px; height: 20px; color: var(--moss); transition: transform 0.25s ease; }
.faq details[open] summary .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) { .faq details[open] p { animation: kl-fade 0.3s ease; } }
@keyframes kl-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Product tabs: panel cross-fades on change */
@media (prefers-reduced-motion: no-preference) { .panel:not([hidden]) { animation: kl-fade 0.3s ease; } }

/* Loading states: pending trace steps show as skeletons, contour art fades in once loaded */
.trace-step.is-pending { opacity: 1; transform: none; position: relative; }
.trace-step.is-pending > * { visibility: hidden; }
.trace-step.is-pending::after { content: ""; position: absolute; inset: 12px 14px; border-radius: 4px; background: linear-gradient(90deg, var(--stone) 0%, #F4F1EB 50%, var(--stone) 100%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) { .trace-step.is-pending::after { animation: kl-shimmer 1.2s linear infinite; } }
@keyframes kl-shimmer { to { background-position: -200% 0; } }
.contour-art { animation: kl-in 0.8s ease both; }
@keyframes kl-in { from { opacity: 0; } }

/* Fixes after review */
.faq summary::after, .faq details[open] summary::after { content: none !important; display: none; }
/* Enlarge the main feature: the hero trace */
.hero-copy { flex: 1 1 440px; }
.hero-visual { flex: 1 1 500px; max-width: 600px; }
.trace-steps { padding: 20px; gap: 12px; }
.trace-step { padding: 14px 16px; }
.trace-step .title { font-size: 16px; }
.trace-step .call { font-size: 13px; }
.trace-step.is-fail .call-main { font-size: 15px; }
.trace-head { padding: 16px 20px; font-size: 14px; }
.trust-line { text-wrap: balance; }
