/*
  approval.locker - landing styles.
  Family: secrypta / probix (obsidian base, Inter + JetBrains Mono).
  approval.locker uses an amber/gold (vault) accent instead of probix lime.
  Dark-first like the family; a working light palette is available via the
  header toggle (data-theme) or by OS preference. No build step, no network
  beyond Google Fonts. Dash policy: hyphen only, never en/em dash.
*/

/* ---- Theme tokens: dark is the base (family default) ---- */
:root {
  --bg: #0a0d0b;
  --surface: #121614;
  --surface-elevated: #161b18;

  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-hover: rgba(255, 255, 255, 0.30);

  --ink-primary: #f8fafc;
  --ink-secondary: #9ca3af;
  --ink-muted: #6b7280;
  --brand-ink: #ffffff;

  --accent: #f59e0b;            /* amber/gold (vault) - surfaces, dots, borders, button bg */
  --accent-hover: #fbbf24;
  --accent-text: #fbbf24;       /* amber - readable on dark */
  --accent-ink: #1a1206;        /* text on the amber button */
  --accent-soft-bg: rgba(245, 158, 11, 0.10);
  --accent-soft-border: rgba(245, 158, 11, 0.30);

  /* triage legitimate = green, kept distinct from brand amber + mutable orange */
  --ok-text: #86efac;
  --ok-bg: rgba(34, 197, 94, 0.10);
  --ok-border: rgba(34, 197, 94, 0.30);

  --warn-text: #fdba74;         /* mutable-risk = orange, split from brand amber */
  --warn-bg: rgba(249, 115, 22, 0.10);
  --warn-border: rgba(249, 115, 22, 0.30);

  --bad-text: #fca5a5;
  --bad-bg: rgba(248, 113, 113, 0.10);
  --bad-border: rgba(248, 113, 113, 0.30);

  --header-bg: rgba(10, 13, 11, 0.85);
  --glow-color: rgba(245, 158, 11, 0.08);
  --code-bg: var(--surface);
}

/* Light palette: applied when the user picks it, or by OS when not pinned dark. */
:root[data-theme="light"] {
  --bg: #f6f8f6;
  --surface: #ffffff;
  --surface-elevated: #ffffff;

  --border: rgba(10, 13, 11, 0.10);
  --border-strong: rgba(10, 13, 11, 0.18);
  --border-hover: rgba(10, 13, 11, 0.32);

  --ink-primary: #0a0d0b;
  --ink-secondary: #4b5563;
  --ink-muted: #6b7280;
  --brand-ink: #0a0d0b;

  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-text: #b45309;       /* amber-700 - readable on light */
  --accent-ink: #1a1206;
  --accent-soft-bg: rgba(180, 83, 9, 0.08);
  --accent-soft-border: rgba(180, 83, 9, 0.28);

  --ok-text: #15803d;
  --ok-bg: rgba(22, 163, 74, 0.10);
  --ok-border: rgba(22, 163, 74, 0.28);

  --warn-text: #c2410c;         /* orange-700, distinct from brand amber */
  --warn-bg: rgba(234, 88, 12, 0.14);
  --warn-border: rgba(194, 65, 12, 0.30);

  --bad-text: #b91c1c;
  --bad-bg: rgba(220, 38, 38, 0.08);
  --bad-border: rgba(220, 38, 38, 0.28);

  --header-bg: rgba(246, 248, 246, 0.85);
  --glow-color: rgba(245, 158, 11, 0.16);
  --code-bg: #f1f4f0;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f8f6;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --border: rgba(10, 13, 11, 0.10);
    --border-strong: rgba(10, 13, 11, 0.18);
    --border-hover: rgba(10, 13, 11, 0.32);
    --ink-primary: #0a0d0b;
    --ink-secondary: #4b5563;
    --ink-muted: #6b7280;
    --brand-ink: #0a0d0b;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-text: #b45309;
    --accent-ink: #1a1206;
    --accent-soft-bg: rgba(180, 83, 9, 0.08);
    --accent-soft-border: rgba(180, 83, 9, 0.28);
    --ok-text: #15803d;
    --ok-bg: rgba(22, 163, 74, 0.10);
    --ok-border: rgba(22, 163, 74, 0.28);
    --warn-text: #c2410c;
    --warn-bg: rgba(234, 88, 12, 0.14);
    --warn-border: rgba(194, 65, 12, 0.30);
    --bad-text: #b91c1c;
    --bad-bg: rgba(220, 38, 38, 0.08);
    --bad-border: rgba(220, 38, 38, 0.28);
    --header-bg: rgba(246, 248, 246, 0.85);
    --glow-color: rgba(245, 158, 11, 0.16);
    --code-bg: #f1f4f0;
  }
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}
h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 0.9em;
}
::selection { background-color: rgba(245, 158, 11, 0.20); color: var(--accent-text); }

.wrap { max-width: 64rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

/* Ambient glow */
.glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 60% 55% at 22% 0%,
    var(--glow-color) 0%, transparent 72%);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark { width: 32px; height: 32px; display: block; }
.brand-lockup { display: flex; align-items: baseline; gap: 0.625rem; }
.brand-name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--brand-ink);
}
.brand-divider {
  width: 1px; height: 1rem;
  align-self: center;
  background-color: var(--border-strong);
}
.brand-descriptor {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--ink-primary); }
.nav a.nav-accent:hover { color: var(--accent-text); }

.theme-toggle {
  display: none;               /* revealed only with JS */
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 0.5rem;
  background-color: transparent;
  color: var(--ink-secondary);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--ink-primary); border-color: var(--border-hover); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:root.js .theme-toggle { display: inline-flex; }

/* ---- Sections ---- */
.section { position: relative; z-index: 1; padding-top: 5rem; padding-bottom: 5rem; }
.section.bordered { border-bottom: 1px solid var(--border); }
.hero { border-bottom: 1px solid var(--border); }

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-text);
}
.h1 {
  margin-top: 1rem;
  max-width: 48rem;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink-primary);
}
.subhead {
  margin-top: 1.5rem;
  max-width: 42rem;
  font-size: 1.125rem;
  color: var(--ink-secondary);
}
.lead {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 1rem;
  color: var(--ink-secondary);
}
.callout {
  margin-top: 1.5rem;
  max-width: 42rem;
  border-left: 2px solid var(--accent-soft-border);
  padding-left: 1rem;
  font-size: 0.95rem;
  color: var(--ink-secondary);
}
.callout strong { color: var(--ink-primary); font-weight: 600; }

.cta-row {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background-color: var(--accent-hover); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* interim until kit published: muted, non-interactive CTA while the repo is unpublished */
.btn-disabled {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--ink-muted);
  cursor: default;
}
.coming-soon {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.cta-caption {
  margin-top: 1rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.section-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.h2 {
  margin-top: 0.75rem;
  max-width: 42rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
}
.section-lead {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 1rem;
  color: var(--ink-secondary);
}

/* ---- Cards ---- */
.grid-2 {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  transition: border-color 0.2s ease;
}
.card:hover { border-color: var(--accent-soft-border); }
.card-kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-text);
}
.card-title {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}
.card-body {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--ink-secondary);
}

.list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.875rem; }
.list li, .bounds li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--ink-secondary);
}
.list code {
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.05rem 0.35rem;
  color: var(--ink-primary);
}
.dot {
  margin-top: 0.6rem;
  flex-shrink: 0;
  width: 0.375rem; height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--accent);
}

.chips { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-strong);
  color: var(--ink-secondary);
}
.chip-ok { color: var(--ok-text); background-color: var(--ok-bg); border-color: var(--ok-border); }
.chip-bad { color: var(--bad-text); background-color: var(--bad-bg); border-color: var(--bad-border); }
.chip-warn { color: var(--warn-text); background-color: var(--warn-bg); border-color: var(--warn-border); }
.chip-muted { color: var(--ink-muted); }

.bounds { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 0.875rem; }

/* ---- Footer ---- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.footer-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.footer-row a { color: var(--accent-text); }
.footer-row a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (min-width: 640px) {
  .section { padding-top: 7rem; padding-bottom: 7rem; }
  .section.bordered, .hero { padding-top: 6rem; padding-bottom: 6rem; }
  .h1 { font-size: 3rem; }
  .subhead { font-size: 1.25rem; }
  .h2 { font-size: 1.875rem; }
  .footer-row { flex-direction: row; align-items: center; }
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .brand-divider, .brand-descriptor { display: none; }
  .nav { gap: 1rem; }
  .nav a[href="#how-it-works"] { display: none; }
}
