:root {
  color-scheme: light dark;
  --mint: #70f5bd;
  --mint-strong: #25c98b;
  --ink: #101412;
  --paper: #f4f4ed;
  --surface: #e9eae2;
  --muted: #5d655f;
  --line: #bbc0b9;
  --danger: #a32121;
  --max: 1240px;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --radius: .35rem;
}

:root[data-theme="dark"] {
  --ink: #edf5ef;
  --paper: #0d110f;
  --surface: #171d19;
  --muted: #a8b3ac;
  --line: #354039;
  --mint-strong: #70f5bd;
  --danger: #ff9a9a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #edf5ef;
    --paper: #0d110f;
    --surface: #171d19;
    --muted: #a8b3ac;
    --line: #354039;
    --mint-strong: #70f5bd;
    --danger: #ff9a9a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .15em; }
button, input, textarea { font: inherit; }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--mint); color: #101412; }
:focus-visible { outline: 3px solid var(--mint-strong); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .7rem 1rem; background: var(--mint); color: #101412; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.shell { width: min(100% - (2 * var(--gutter)), var(--max)); margin-inline: auto; }
.mono, .eyebrow, .chip, .section-number, .nav, .flow-step, label, .button { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }
.site-header { border-bottom: 1px solid var(--line); }
.nav { min-height: 4.75rem; display: flex; align-items: center; gap: 1rem; font-size: .75rem; }
.brand { margin-right: auto; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.nav-links, .nav-tools { display: flex; align-items: center; gap: clamp(.7rem, 2vw, 1.4rem); }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: .14em; }
.theme-toggle { display: inline-flex; gap: .45rem; align-items: center; min-height: 2.75rem; padding: .45rem .7rem; border: 1px solid var(--line); background: transparent; cursor: pointer; text-transform: uppercase; }
.theme-dot { width: .65rem; height: .65rem; border: 1px solid currentColor; border-radius: 50%; background: var(--mint); }
.hero { min-height: min(820px, calc(100svh - 4.75rem)); display: grid; align-content: space-between; padding-block: clamp(2rem, 6vw, 5rem); border-bottom: 1px solid var(--line); }
.hero-top { display: flex; justify-content: space-between; gap: 1rem; }
.eyebrow, .section-number { margin: 0; font-size: .72rem; font-weight: 700; }
.chip { display: inline-flex; align-items: center; min-height: 2rem; padding: .2rem .6rem; border: 1px solid var(--ink); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.chip::before { content: ""; width: .5rem; height: .5rem; margin-right: .5rem; border-radius: 50%; background: var(--mint-strong); }
h1 { max-width: 12ch; margin: clamp(3rem, 9vw, 7rem) 0 1.5rem; font-size: clamp(3rem, 9.2vw, 8.5rem); line-height: .88; letter-spacing: -.075em; text-wrap: balance; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, .55fr); align-items: end; gap: 2rem; }
.lead { max-width: 42rem; margin: 0; font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.35; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 3.2rem; padding: .7rem 1rem; border: 1px solid var(--ink); font-size: .76rem; font-weight: 800; text-decoration: none; }
.button-primary { background: var(--mint); color: #101412; }
.button:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(8rem, .3fr) 1fr; gap: 2rem; margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.section h2, .page-hero h1 { margin: 0; max-width: 15ch; font-size: clamp(2.25rem, 5.5vw, 5.2rem); line-height: .96; letter-spacing: -.055em; text-wrap: balance; }
.section-intro { max-width: 49rem; margin: 1.5rem 0 0; font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.flow { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0; padding: 0; border: 1px solid var(--line); }
.flow li { position: relative; display: flex; align-items: flex-end; min-height: 10rem; padding: 1rem; border-right: 1px solid var(--line); font-size: .7rem; font-weight: 800; }
.flow li:last-child { border: 0; }
.flow li:not(:last-child)::after { content: "→"; position: absolute; z-index: 1; top: 1rem; right: -.6rem; width: 1.2rem; text-align: center; background: var(--paper); font-size: 1rem; }
.flow-index { position: absolute; top: .9rem; left: 1rem; color: var(--muted); }
.materials { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.material { min-height: 22rem; padding: 1.2rem; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--mint) 32%, transparent) 0 4%, transparent 4.5%); }
.material:last-child { border-right: 0; }
.material h3 { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); letter-spacing: -.04em; }
.material p { max-width: 25rem; margin: 0; color: var(--muted); }
.workflow { counter-reset: agent; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.workflow article { counter-increment: agent; min-height: 15rem; padding: 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.workflow article:first-child { border-left: 1px solid var(--line); }
.workflow article::before { content: "0" counter(agent); display: block; margin-bottom: 4rem; font-family: ui-monospace, monospace; color: var(--muted); }
.workflow h3 { margin: 0; font-size: 1rem; text-transform: uppercase; }
.workflow .approval { background: var(--mint); color: #101412; border-color: #101412; }
.approval .chip { margin-top: 1.2rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 7rem); }
.split p:first-child { margin-top: 0; font-size: clamp(1.35rem, 2.5vw, 2.1rem); line-height: 1.25; letter-spacing: -.025em; }
.status-grid { display: grid; grid-template-columns: .65fr 1fr; gap: clamp(2rem, 7vw, 7rem); }
.status-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.status-list li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.cta { background: var(--mint); color: #101412; }
.cta .section-head { margin-bottom: 0; }
.cta h2 { max-width: 18ch; }
.cta .button { margin-top: 2rem; background: #101412; color: #f4f4ed; border-color: #101412; }
.site-footer { padding-block: 2.5rem; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; font-size: .8rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.footer-note { max-width: 36rem; margin: 1.5rem 0 0; color: var(--muted); }
.page-hero { padding-block: clamp(3.5rem, 8vw, 7rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-top: clamp(2rem, 5vw, 4rem); max-width: 16ch; }
.page-lead { max-width: 50rem; margin: 2rem 0 0; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.prose { max-width: 52rem; }
.prose h2 { margin: 3rem 0 1rem; font-size: clamp(1.6rem, 3vw, 2.5rem); }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); }
.contact-layout { display: grid; grid-template-columns: .75fr 1fr; gap: clamp(3rem, 8vw, 8rem); }
.contact-form { display: grid; gap: 1.2rem; }
.field { display: grid; gap: .4rem; }
label { font-size: .75rem; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 0; padding: .8rem; background: var(--paper); color: var(--ink); }
textarea { min-height: 12rem; resize: vertical; }
input:focus, textarea:focus { border-color: var(--mint-strong); outline: 2px solid var(--mint-strong); outline-offset: 1px; }
.optional { color: var(--muted); font-weight: 400; }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px, 1px, 1px, 1px) !important; white-space: nowrap !important; }
.form-status { min-height: 3rem; margin: 0; padding: .7rem 0; }
.form-status[data-state="error"] { color: var(--danger); }
.form-status[data-state="pending"] { color: var(--muted); }
.contact-form button:disabled { opacity: .55; cursor: wait; }
.error-code { display: block; margin-bottom: 1rem; font-size: clamp(4rem, 14vw, 12rem); line-height: .8; letter-spacing: -.08em; }

@media (max-width: 800px) {
  .nav { flex-wrap: wrap; padding-block: .8rem; }
  .brand { width: calc(100% - 8rem); }
  .nav-links { order: 3; width: 100%; justify-content: space-between; padding-top: .65rem; border-top: 1px solid var(--line); }
  .hero { min-height: auto; }
  .hero-copy, .section-head, .status-grid, .contact-layout { grid-template-columns: 1fr; }
  .hero-copy { align-items: start; }
  h1 { margin-top: 4rem; }
  .flow { grid-template-columns: 1fr; }
  .flow li { min-height: 5rem; border-right: 0; border-bottom: 1px solid var(--line); padding-left: 4rem; align-items: center; }
  .flow li:not(:last-child)::after { content: "↓"; top: auto; right: 1rem; bottom: -.7rem; background: var(--paper); }
  .flow-index { top: 50%; transform: translateY(-50%); }
  .workflow { grid-template-columns: 1fr; }
  .workflow article, .workflow article:first-child { display: grid; grid-template-columns: 3rem 1fr; min-height: auto; border-left: 1px solid var(--line); padding-block: 1.5rem; }
  .workflow article::before { margin: 0; }
  .approval .chip { grid-column: 2; width: max-content; }
}

@media (max-width: 560px) {
  .nav-tools .lang-full, .theme-label-prefix { display: none; }
  .materials, .split { grid-template-columns: 1fr; }
  .material { min-height: 15rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .material:last-child { border-bottom: 0; }
  .footer-grid { flex-direction: column; }
}

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