:root {
  --bg: #f7f7f5;
  --bg-raised: #ffffff;
  --text: #16181d;
  --text-muted: #52565f;
  --border: #dcdfe4;
  --accent: #0f6e5e;
  --accent-contrast: #ffffff;
  --warn-bg: #fff4e5;
  --warn-border: #e8b168;
  --warn-text: #6b4300;
  --code-bg: #eef0f2;
  --link: #0f6e5e;
  --focus: #1a8f79;
  --max-width: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141a;
    --bg-raised: #1a1d24;
    --text: #eef0f3;
    --text-muted: #a3a9b5;
    --border: #2b2f39;
    --accent: #3ac9ab;
    --accent-contrast: #0a1512;
    --warn-bg: #3a2c12;
    --warn-border: #8a6524;
    --warn-text: #f2cd8f;
    --code-bg: #1f232b;
    --link: #3ac9ab;
    --focus: #55e0c1;
  }
}

:root[data-theme="dark"] {
  --bg: #12141a;
  --bg-raised: #1a1d24;
  --text: #eef0f3;
  --text-muted: #a3a9b5;
  --border: #2b2f39;
  --accent: #3ac9ab;
  --accent-contrast: #0a1512;
  --warn-bg: #3a2c12;
  --warn-border: #8a6524;
  --warn-text: #f2cd8f;
  --code-bg: #1f232b;
  --link: #3ac9ab;
  --focus: #55e0c1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--link);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header / nav */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid var(--warn-border);
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 1.4rem;
  height: 2px;
  background: var(--text);
  position: relative;
  content: "";
}

.nav-toggle-label span::before {
  top: -0.4rem;
}

.nav-toggle-label span::after {
  top: 0.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a.cta {
  color: var(--accent-contrast);
  background: var(--accent);
  padding: 0.45rem 0.9rem;
  border-radius: 0.4rem;
}

@media (max-width: 46rem) {
  .nav-toggle-label {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .nav-bar {
    flex-wrap: wrap;
  }
}

/* Hero */

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0.75rem 0 1rem;
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 44rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.98rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn:focus-visible,
a:focus-visible,
.nav-toggle-label:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Sections */

section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--border);
}

section h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-top: 0;
}

.section-lede {
  color: var(--text-muted);
  max-width: 46rem;
  margin-top: -0.5rem;
}

/* Conflict story */

.conflict-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
}

@media (max-width: 56rem) {
  .conflict-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 30rem) {
  .conflict-grid {
    grid-template-columns: 1fr;
  }
}

.conflict-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 1.1rem;
}

.conflict-card .source {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.conflict-card .claim {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0.4rem 0;
}

.conflict-card .detail {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.verdict {
  margin-top: 1.75rem;
  padding: 1.1rem 1.25rem;
  border-radius: 0.6rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
}

.verdict strong {
  color: var(--accent);
}

/* Reality chain */

.chain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
  align-items: center;
}

.chain-step {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.chain-step.gap {
  border-style: dashed;
  color: var(--text-muted);
  font-weight: 500;
}

.chain-arrow {
  color: var(--text-muted);
}

/* Distinguish */

.distinguish-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.distinguish-list li {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem 1.2rem;
}

.distinguish-list .not {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 600;
}

.distinguish-list .is {
  display: block;
  margin-top: 0.35rem;
  font-weight: 500;
}

/* CTA cards */

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.cta-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cta-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.cta-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.early-access-note {
  font-size: 0.78rem;
  color: var(--warn-text);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 0.4rem;
  padding: 0.3rem 0.5rem;
  display: inline-block;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-muted);
}

/* Simple pages: demo / pilot / privacy */

.page-hero {
  padding: 3rem 0 1.5rem;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0.5rem 0 1rem;
}

.callout {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  max-width: 32rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.form-field input,
.form-field textarea {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
}

.form-field textarea {
  resize: vertical;
  min-height: 6rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 32rem;
}

/* Consent banner (ADR-0016 D9, HORO-525) -- minimal, non-blocking of
   content, appears only once a GA4 Measurement ID is configured. */

.consent-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 50;
  max-width: 40rem;
  margin: 0 auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.consent-banner-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1 1 16rem;
}

.consent-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.consent-banner-actions .btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}
