:root {
  --bg: #fbfaf6;
  --bg-alt: #f0efe6;
  --surface: #ffffff;
  --text: #14201b;
  --muted: #44524b;
  --brand: #0b3d2e;
  --brand-ink: #ffffff;
  --accent: #c6f36b;
  --accent-ink: #0b3d2e;
  --border: #d6d8cf;
  --focus: #1a56db;
  --radius: 14px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1613;
    --bg-alt: #151f1b;
    --surface: #1a2622;
    --text: #eef2ee;
    --muted: #b4c0b9;
    --brand: #c6f36b;
    --brand-ink: #0b3d2e;
    --border: #2d3b35;
    --focus: #8ab4ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: .2em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--brand); color: var(--brand-ink);
  padding: .7rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-size: 1.2rem; }
.brand-mark { width: 2rem; height: 2rem; }
.nav-list { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a { display: block; padding: .45rem .7rem; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav-list a:hover { color: var(--text); background: var(--bg-alt); }

/* Hero */
.hero { padding: clamp(4rem, 10vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero-inner { max-width: 52rem; }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); padding: .3rem .7rem; border-radius: 999px;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -.025em; margin-top: .4em; }
.accent { background: linear-gradient(transparent 62%, var(--accent) 62%); color: inherit; }
@media (prefers-color-scheme: dark) { .accent { background: none; color: var(--accent); } }
.lead { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--muted); max-width: 40rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.9rem; padding: .7rem 1.3rem; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 2px solid var(--brand); transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-alt); }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--muted); max-width: 44rem; font-size: 1.15rem; margin-bottom: 2.5rem; }

.two-col { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.1fr 1fr; align-items: start; } }

.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.card h3 { margin-bottom: .25em; }
.card p { margin: 0; color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.step p { margin: 0; color: var(--muted); }
.step-num {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: .9rem;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800;
}

/* Demo */
.demo { display: grid; gap: 1.5rem; }
.demo-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.demo-status { margin: 0; color: var(--muted); font-weight: 500; }
.btn-toggle { background: var(--brand); color: var(--brand-ink); }
.btn-toggle[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.browser { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; color: #1b1b1b; box-shadow: 0 20px 40px -24px rgba(0,0,0,.35); }
.browser-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; background: #ececec; }
.browser-bar > span { width: .7rem; height: .7rem; border-radius: 50%; background: #c9c9c9; }
.browser-url { margin-left: 1rem; flex: 1; background: #fff; border-radius: 6px; padding: .2rem .7rem; font-size: .85rem; color: #555; }
.browser-body { padding: clamp(1rem, 4vw, 2.5rem); }

.mock-page { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 640px) { .mock-page { grid-template-columns: 220px 1fr; } }
.mock-img { position: relative; background: #f3f3f3; border-radius: 10px; padding: 1.5rem; color: #d33; }
.mock-img svg { width: 100%; height: auto; display: block; }
.mock-alt {
  position: absolute; left: .5rem; right: .5rem; bottom: .5rem;
  font-family: var(--mono); font-size: .72rem; background: #0b3d2e; color: #c6f36b;
  padding: .25rem .4rem; border-radius: 6px; opacity: 0; transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
}
.mock-heading { font-size: 1.4rem; font-weight: 700; margin-bottom: .4rem; }
.mock-desc { transition: color .25s ease; }
.mock-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.mock-btn { display: inline-flex; align-items: center; gap: .4rem; background: #222; color: #fff; padding: .55rem .9rem; border-radius: 8px; }
.mock-btn-label { display: none; }
.mock-link { color: #3366cc; text-decoration: underline; }

/* original: barriers */
.browser[data-state="original"] .mock-desc { color: #b8b8b8; }
.browser[data-state="original"] .mock-heading { color: #c7c7c7; }

/* augmented: fixes */
.browser[data-state="augmented"] .mock-desc { color: #1b1b1b; }
.browser[data-state="augmented"] .mock-alt { opacity: 1; transform: none; }
.browser[data-state="augmented"] .mock-btn-label { display: inline; }
.browser[data-state="augmented"] .mock-link { font-size: 0; }
.browser[data-state="augmented"] .mock-link::after { content: attr(data-fixed); font-size: 1rem; }
.browser[data-state="augmented"] .mock-btn,
.browser[data-state="augmented"] .mock-link,
.browser[data-state="augmented"] .mock-desc { outline: 2px dashed #2f9e44; outline-offset: 4px; border-radius: 6px; }

.fix-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fix-list li { color: var(--muted); }
.fix-badge { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); background: var(--accent); padding: .1rem .5rem; border-radius: 6px; margin-right: .35rem; }

/* Paper */
.paper { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); max-width: 56rem; }
.paper-venue { font-size: .9rem; font-weight: 600; color: var(--muted); }
.paper-title { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
.paper-authors { font-weight: 600; margin-bottom: .2rem; }
.paper-meta { color: var(--muted); }
.copy-status { min-height: 1.5em; margin: .5rem 0 0; color: var(--muted); }
.bibtex summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
.bibtex pre { overflow-x: auto; background: var(--bg-alt); border-radius: 10px; padding: 1rem 1.2rem; font-size: .85rem; line-height: 1.5; }
.bibtex code { font-family: var(--mono); }

/* Team */
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.person { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.person h3 { margin: 0; }
.person p { margin: 0; color: var(--muted); }
.avatar { display: grid; place-items: center; flex: none; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }

/* Legal page */
.legal { padding: clamp(3rem, 8vw, 5rem) 0; max-width: 46rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; }

/* Interest list */
.nav-cta { background: var(--brand); color: var(--brand-ink) !important; }
.nav-cta:hover { background: var(--brand) !important; opacity: .9; }
.interest { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .interest { grid-template-columns: 1fr 1fr; align-items: start; } }
.interest-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; }
.optional { font-weight: 400; color: var(--muted); }
.field input[type="email"], .field input[type="text"], .field select {
  font: inherit; color: var(--text); background: var(--bg); min-height: 2.9rem;
  padding: .55rem .8rem; border: 2px solid var(--border); border-radius: 10px; width: 100%;
}
.field input:focus-visible, .field select:focus-visible { border-color: var(--focus); }
.field input[aria-invalid="true"] { border-color: #c0262d; }
.field.checkbox { grid-template-columns: auto 1fr; align-items: start; gap: .7rem; }
.field.checkbox input { width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--brand); }
.field.checkbox label { font-weight: 400; color: var(--muted); }
.field-error { margin: 0; color: #c0262d; font-weight: 600; font-size: .95rem; }
.field-error:empty, .form-status:empty { display: none; }
@media (prefers-color-scheme: dark) { .field-error { color: #ff8a8f; } }
.form-status { margin: 0; font-weight: 600; }
.form-status.success { color: var(--text); background: var(--accent); color: var(--accent-ink); padding: .7rem 1rem; border-radius: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.interest-form button[disabled] { opacity: .6; cursor: progress; }

/* Product / beta */
.hero-note { margin-top: 1rem; color: var(--muted); font-size: .95rem; }
.step h3:first-child { margin-top: 0; }
.beta h3 { margin-top: 1.5rem; }
.check-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.check-list li { position: relative; padding-left: 1.9rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b3d2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat;
}
fieldset.options { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }
fieldset.options legend { font-weight: 600; margin-bottom: .45rem; padding: 0; }
fieldset.options label { display: flex; align-items: center; gap: .6rem; font-weight: 400; cursor: pointer; }
fieldset.options input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); flex: none; }
.final-cta { text-align: center; }
.final-inner { display: grid; justify-items: center; gap: 1rem; }
.final-inner h2 { margin: 0; }

.lang-switch { font-weight: 700 !important; border: 2px solid var(--border); }
