/* Safe & Sane — static rebuild styles.
   Derived from the live site's design tokens. No frameworks, no trackers. */

:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --primary: #cc0000;
  --muted: #f0f0f0;
  --muted-foreground: #666666;
  --border: #e0e0e0;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --width-content: 64rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* ---------- layout ---------- */
.container { max-width: var(--width-content); margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; height: 4rem; align-items: center; justify-content: space-between; }
.brand img { max-height: 3rem; width: auto; max-width: 180px; object-fit: contain; }
.main-nav { display: none; align-items: center; gap: 2rem; }
.main-nav a {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted-foreground); text-decoration: none; transition: color 0.2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--foreground); }
@media (min-width: 768px) { .main-nav { display: flex; } }

/* ---------- mobile menu ---------- */
.menu-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 2.5rem; height: 2.5rem; background: none; border: 0; cursor: pointer; padding: 0; }
.menu-toggle span { display: block; width: 1.5rem; height: 2px; background: var(--foreground); transition: transform .2s ease, opacity .2s ease; }
@media (min-width: 768px) { .menu-toggle { display: none; } }
@media (max-width: 767px) {
  /* .site-header keeps position: sticky from base styles (sticky is a positioned
     element, so it already anchors the absolute menu panel below) */
  .site-header.menu-open .main-nav { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--background); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 0.5rem 0; z-index: 50; }
  .site-header.menu-open .main-nav a { padding: 0.9rem 1.5rem; font-size: 0.85rem; }
  .site-header.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero { padding: 5rem 0 4rem; }
@media (min-width: 768px) { .hero { padding: 7rem 0 6rem; } }
.hero-logo { max-height: 14rem; width: auto; max-width: 340px; margin-bottom: 3.5rem; }
.hero-quote {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 3rem); line-height: 1.2; letter-spacing: -0.01em;
  max-width: 48rem; margin-bottom: 2rem;
}
.hero-sub { font-size: 1.125rem; color: var(--muted-foreground); }
.hero-dark { background: var(--foreground); color: #fff; }
.hero-dark .hero-sub { color: rgba(255,255,255,0.7); }
.hero-version { font-family: var(--font-mono); font-size: 0.875rem; color: rgba(255,255,255,0.4); margin: 1.5rem 0 2.5rem; }

/* ---------- dividers ---------- */
.divider { display: flex; align-items: center; gap: 1rem; margin: 4rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.divider-dot { width: 0.375rem; height: 0.375rem; border-radius: 9999px; background: var(--primary); flex: none; }
@media (min-width: 768px) { .divider { margin: 5rem 0; } }

/* ---------- sections ---------- */
.section { padding-bottom: 4rem; }
@media (min-width: 768px) { .section { padding-bottom: 6rem; } }
.eyebrow {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--primary); margin-bottom: 1.25rem; font-weight: 500;
}
.section h2, .h2 {
  font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.01em;
  font-size: 1.5rem; line-height: 1.25; margin-bottom: 2rem; max-width: 42rem;
}
@media (min-width: 768px) { .section h2, .h2 { font-size: 1.875rem; } }
.lead { font-size: 1.0625rem; line-height: 1.75; max-width: 42rem; margin-bottom: 1.25rem; }
.lead.muted { color: var(--muted-foreground); }
.prose-narrow { max-width: 42rem; display: flex; flex-direction: column; gap: 1.25rem; }
.prose-narrow p { font-size: 1.0625rem; line-height: 1.75; }

/* ---------- pillars / cards ---------- */
.pillars { display: grid; grid-template-columns: 1fr; gap: 2rem; margin: 2.5rem 0; }
@media (min-width: 768px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar-bar { width: 1.25rem; height: 0.125rem; background: var(--primary); margin-bottom: 1rem; }
.pillar h3 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.pillar p { font-size: 0.875rem; line-height: 1.7; color: var(--muted-foreground); }
.callout { border-left: 2px solid var(--border); padding-left: 1.25rem; max-width: 42rem; margin-top: 2.5rem; }
.callout p { font-size: 0.875rem; line-height: 1.7; color: var(--muted-foreground); }
.support-strip { text-align: center; font-size: 0.875rem; line-height: 1.7; color: var(--muted-foreground); padding: 2.5rem 0 3rem; border-top: 1px solid var(--border); margin-top: 3rem; }
.support-strip a { font-weight: 700; color: var(--primary); }

/* ---------- numbered lists ---------- */
.steps { list-style: none; max-width: 42rem; }
.steps li { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: none; }
.step-num {
  flex: none; width: 2rem; height: 2rem; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--primary);
}
.step-body strong { display: block; font-size: 0.8125rem; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.step-body p { font-size: 0.9375rem; color: var(--muted-foreground); line-height: 1.7; }
.checks { list-style: none; display: grid; grid-template-columns: 1fr; gap: 0.75rem; max-width: 42rem; margin: 1.5rem 0; }
@media (min-width: 768px) { .checks { grid-template-columns: 1fr 1fr; } }
.checks li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: #fff; border: 1px solid rgba(0,0,0,0.08); padding: 0.75rem 1rem; font-size: 0.875rem;
}
.checks li::before {
  content: ""; flex: none; width: 1rem; height: 1rem; margin-top: 0.2rem;
  border: 1px solid rgba(0,0,0,0.25);
}
.dash-list { list-style: none; max-width: 42rem; }
.dash-list li { padding-left: 1.25rem; position: relative; margin-bottom: 0.75rem; font-size: 0.9375rem; line-height: 1.7; }
.dash-list li::before { content: "—"; position: absolute; left: 0; color: var(--muted-foreground); }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 42rem; margin: 1rem 0; }
.tag-list span { font-size: 0.75rem; border: 1px solid var(--border); padding: 0.375rem 0.75rem; color: var(--muted-foreground); }

/* ---------- cycle diagram (text) ---------- */
.cycle { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; max-width: 42rem; margin: 1.5rem 0; }
.cycle span {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  border: 1px solid var(--border); padding: 0.5rem 0.75rem; background: #fff;
}
.cycle .cycle-arrow { border: none; background: none; color: var(--primary); font-size: 1rem; padding: 0.5rem 0.25rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--foreground); color: var(--foreground); background: transparent;
  transition: background 0.2s, color 0.2s; cursor: pointer;
}
.btn:hover { background: var(--foreground); color: var(--background); }
.btn-solid { background: var(--foreground); color: var(--background); }
.btn-solid:hover { background: var(--primary); border-color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { opacity: 0.9; background: var(--primary); }
.btn-light { border-color: rgba(255,255,255,0.3); color: #fff; }
.btn-light:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }
.btn[disabled], .btn-disabled {
  border: 2px solid var(--border); color: var(--muted-foreground); cursor: not-allowed; background: transparent;
}
.btn-disabled:hover { background: transparent; color: var(--muted-foreground); }

/* ---------- download table ---------- */
.dl-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 42rem; margin: 2rem 0; }
.dl-row {
  display: flex; align-items: center; gap: 1rem;
  border: 1px solid rgba(0,0,0,0.1); padding: 1rem 1.25rem; background: #fff;
}
.dl-row .dl-meta { flex: 1; min-width: 0; }
.dl-row .dl-name { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 600; margin-bottom: 0.125rem; overflow-wrap: anywhere; }
.dl-row .dl-desc { font-size: 0.75rem; color: rgba(0,0,0,0.45); line-height: 1.5; }
.dl-row .btn { flex: none; padding: 0.5rem 1rem; font-size: 0.7rem; min-height: 2.75rem; }
.hash-list { font-family: var(--font-mono); font-size: 0.68rem; line-height: 1.9; word-break: break-all; color: rgba(0,0,0,0.6); margin-top: 0.5rem; }
.hash-list strong { color: var(--foreground); }

/* ---------- install extras ---------- */
.fine { font-size: 0.75rem; color: var(--muted-foreground); line-height: 1.7; max-width: 42rem; }
.fine.italic { font-style: italic; }

/* ---------- dark band ---------- */
.band-dark { background: var(--foreground); color: #fff; padding: 4rem 0; }
@media (min-width: 768px) { .band-dark { padding: 5rem 0; } }
.band-dark .eyebrow { color: #fff; }
.band-dark h2 { color: #fff; }
.band-dark p { color: rgba(255,255,255,0.7); }

/* ---------- form ---------- */
.contact-form { max-width: 36rem; }
.hp-field { position: absolute; left: -9999px; }
.form-legend { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-foreground); margin-bottom: 1rem; }
.mode-toggle { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .mode-toggle { flex-direction: row; } }
.mode-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mode-toggle label {
  flex: 1; padding: 0.75rem 1rem; font-size: 0.875rem; border: 1px solid var(--border);
  color: var(--muted-foreground); cursor: pointer; transition: all 0.2s; text-align: left;
}
.mode-toggle label .dot { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 0.125rem; }
.mode-toggle input:checked + label { border-color: var(--foreground); color: var(--foreground); background: var(--muted); }
.mode-toggle input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 2px; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-foreground); margin-bottom: 0.5rem; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 1px solid var(--border);
  padding: 0.75rem 1rem; font-size: 1rem; font-family: var(--font-sans); color: var(--foreground);
  outline: none; transition: border-color 0.2s; border-radius: 0;
}
.field input:focus, .field textarea:focus { border-color: var(--foreground); }
.field textarea { resize: none; min-height: 10rem; }
/* hide name/email when anonymous mode selected */
#mode-anon:checked ~ .field-if-response { display: none; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--background); }
.footer-inner {
  display: flex; flex-direction: column; gap: 1rem;
  padding-top: 2.5rem; padding-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .footer-right { text-align: right; }
}
.footer-inner p, .footer-inner a { font-size: 0.75rem; color: var(--muted-foreground); }
.footer-inner a { text-decoration: none; transition: color 0.2s; }
.footer-inner a:hover { color: var(--foreground); }
.footer-tag { max-width: 24rem; margin-top: 0.5rem; }

/* ---------- misc ---------- */
.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;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
  border: 1px solid var(--border); padding: 0.375rem 0.75rem; margin-bottom: 1rem;
}
.badge .b-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: var(--primary); }
.infographic { width: 100%; height: auto; border: 1px solid var(--border); margin: 2rem 0; }
.mono { font-family: var(--font-mono); font-size: 0.8125rem; }
.mt-8 { margin-top: 2rem; }
