/* DoomsdayPrepQuiz.com — field-manual editorial, not costume camo */
:root {
  --bg: #131511;
  --bg-elev: #1b1d18;
  --bg-card: #22251f;
  --bg-card-hover: #2a2e27;
  --line: rgba(236, 231, 219, 0.1);
  --line-strong: rgba(236, 231, 219, 0.18);
  --text: #ece7db;
  --text-muted: #a9a494;
  --text-dim: #7c786e;
  --brass: #c9a85c;
  --brass-deep: #8d7340;
  --brass-soft: rgba(201, 168, 92, 0.14);
  --brass-glow: rgba(201, 168, 92, 0.28);
  --good: #7d9a74;
  --good-soft: rgba(125, 154, 116, 0.16);
  --mid: #c9a85c;
  --weak: #c56a48;
  --weak-soft: rgba(197, 106, 72, 0.16);
  --focus: #e6d09a;
  --danger: #b5523a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", serif;
  --header-h: 4.25rem;
  --max: 72rem;
  --narrow: 42rem;
  --space: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(80rem 40rem at 10% -10%, rgba(201, 168, 92, 0.07), transparent 50%),
    radial-gradient(50rem 30rem at 100% 0%, rgba(125, 154, 116, 0.05), transparent 45%);
}

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

a {
  color: var(--brass);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--focus);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--brass);
  color: #16140e;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus {
  top: 0;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(19, 21, 17, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner,
.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding: 0.75rem 0 0.7rem;
    gap: 0.55rem;
  }

  .brand-text {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  .nav {
    gap: 1.1rem;
    font-size: 0.9rem;
  }

  .kbd-hint {
    display: none;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
}

.brand-text {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
  font-size: 0.92rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--brass);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--brass);
  color: #16140e;
}

.btn-primary:hover {
  background: #d8b96a;
  color: #16140e;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text);
}

.btn-buy {
  background: var(--brass-soft);
  color: var(--brass);
  border-color: rgba(201, 168, 92, 0.35);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

.btn-buy:hover {
  background: var(--brass);
  color: #16140e;
}

/* —— Main / hero —— */
main {
  position: relative;
  z-index: 1;
  flex: 1;
}

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

.hero-grid {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: var(--brass);
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.15rem, 6vw, 3.65rem);
  max-width: 18ch;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 38rem;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
}

.meta-line {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Category strip */
.cat-strip {
  border-block: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 1.35rem 0;
}

.cat-strip-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-kicker {
  margin: 0 0 0.45rem;
  color: var(--brass);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.section-intro {
  margin: 0 0 2rem;
  max-width: 36rem;
  color: var(--text-muted);
}

.steps {
  display: grid;
  gap: 1rem;
}

.step,
.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem;
}

.step-num {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--brass);
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.step h3,
.panel h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
}

.step p,
.panel p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.note {
  margin-top: 2rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--brass);
  background: var(--brass-soft);
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* —— Quiz —— */
.quiz-shell {
  width: min(44rem, calc(100% - 2rem));
  margin: 2rem auto 3.5rem;
}

.progress-block {
  margin-bottom: 1.4rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-cat {
  color: var(--brass);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.progress-track {
  height: 4px;
  background: var(--line-strong);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brass-deep), var(--brass));
  transition: width 0.25s ease;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem 1.3rem 1.3rem;
  box-shadow: var(--shadow);
}

.question-text {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.options {
  display: grid;
  gap: 0.6rem;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: flex-start;
  width: 100%;
  padding: 0.85rem 0.95rem;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option:hover {
  background: var(--bg-card-hover);
  border-color: var(--line-strong);
}

.option[aria-pressed="true"] {
  background: var(--brass-soft);
  border-color: var(--brass);
}

.option-key {
  flex: none;
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
}

.option[aria-pressed="true"] .option-key {
  border-color: var(--brass);
  color: var(--brass);
  background: rgba(201, 168, 92, 0.12);
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.kbd-hint {
  margin: 1rem 0 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* —— Results —— */
.results-shell {
  width: min(var(--max), calc(100% - 2rem));
  margin: 2rem auto 3.5rem;
}

.score-hero {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  margin-bottom: 2rem;
}

.score-ring-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.score-ring {
  width: 8.25rem;
  height: 8.25rem;
  flex: none;
}

.score-copy h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.tier {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--brass);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.score-copy p {
  margin: 0;
  color: var(--text-muted);
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.disclosure {
  margin: 0 0 2rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.disclosure strong {
  color: var(--text);
  font-weight: 600;
}

.cat-block {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.15rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.cat-block.is-weak {
  border-color: rgba(197, 106, 72, 0.4);
  background: linear-gradient(180deg, rgba(197, 106, 72, 0.07), var(--bg-elev) 8rem);
}

.cat-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-bottom: 0.45rem;
}

.cat-head h3 {
  margin: 0;
  font-size: 1.3rem;
}

.cat-score-label {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}

.badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--weak-soft);
  color: var(--weak);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.cat-blurb {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.bar {
  height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--mid);
}

.bar span.good {
  background: var(--good);
}

.bar span.mid {
  background: var(--mid);
}

.bar span.weak {
  background: var(--weak);
}

.products {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.product {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.05rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.product h4 {
  margin: 0 0 0.3rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.product p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.product-why {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Email capture */
.capture {
  margin: 2.5rem 0 1.5rem;
  padding: 1.4rem 1.25rem;
  border: 1px dashed rgba(201, 168, 92, 0.4);
  border-radius: var(--radius);
  background: var(--brass-soft);
}

.capture h2 {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
}

.todo-flag {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.15rem 0.45rem;
  background: #16140e;
  color: var(--brass);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
}

.capture p,
.form-status {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.capture-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.capture-form input[type="email"] {
  flex: 1 1 16rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.capture-form input[type="email"]::placeholder {
  color: var(--text-dim);
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status.is-success {
  color: #7d9a74;
}

.form-status.is-error {
  color: #c56a48;
}

.capture-form .btn[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}


/* Legal page */
.prose {
  width: min(42rem, calc(100% - 2rem));
  margin: 2.5rem auto 4rem;
}

.prose h1 {
  max-width: none;
  font-size: clamp(2rem, 5vw, 2.6rem);
}

.prose h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.4rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose ul {
  padding-left: 1.2rem;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 2rem 0 2.4rem;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer-inner {
  display: grid;
  gap: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}

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

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

.footer-legal {
  margin: 0;
  max-width: 48rem;
  line-height: 1.55;
}

/* Responsive */
@media (min-width: 700px) {
  .brand-text {
    font-size: 1.02rem;
  }

  .hero {
    padding: 5rem 0 3.25rem;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }

  .question-card {
    padding: 1.85rem 1.75rem 1.55rem;
  }

  .score-hero {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 2rem 2rem;
  }

  .products {
    grid-template-columns: 1fr 1fr;
  }

  .cat-block {
    padding: 1.45rem 1.45rem 1.55rem;
  }
}

.hero-aside {
  margin-top: 2rem;
  padding: 1.4rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.hero-aside h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.hero-aside ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-aside li + li {
  margin-top: 0.45rem;
}

@media (min-width: 980px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.9fr);
    gap: 3rem;
    align-items: end;
  }

  .hero-aside {
    margin-top: 0;
  }
}

.glance {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 2rem;
  padding: 0.75rem 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.glance-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.8rem;
  align-items: center;
  padding: 0.45rem 0.4rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.glance-row:hover {
  background: var(--bg-card);
  color: inherit;
}

.glance-name {
  font-size: 0.92rem;
}

.glance-row.is-weak .glance-name {
  font-weight: 600;
}

.glance-pct {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.glance-row .bar {
  grid-column: 1 / -1;
  height: 5px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
