:root {
  --night: #0e181d;      /* sky over the parking lot */
  --cab: #16242b;        /* panel surfaces */
  --line: #2b3d45;
  --text: #e4e8e6;
  --muted: #9fb0b4;
  --sodium: #f2a93b;     /* headlight amber, used for action */
  --sodium-ink: #1d1406;
  --neon: #e05a47;       /* the red sign, used only for the crisis line */
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sodium); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sodium); outline-offset: 3px; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1; margin: 0; letter-spacing: 0.005em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h3 { font-size: 1.45rem; font-weight: 700; }
p { margin: 0 0 1em; }

/* Crisis bar */
.crisis {
  background: #0a1216;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
  padding: 9px 16px;
}
.crisis strong { color: var(--text); font-weight: 600; }
.crisis a { color: var(--neon); font-weight: 600; }

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
}
.hero picture, .hero picture img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 60% 62%; height: 100% !important;
  z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(14,24,29,.92) 0%, rgba(14,24,29,.6) 45%, rgba(14,24,29,.05) 75%),
    linear-gradient(0deg, var(--night) 0%, rgba(14,24,29,0) 40%);
}
.hero-inner { padding: 120px 0 72px; }
.hero h1 {
  font-size: clamp(3.8rem, 13vw, 9.5rem);
  font-weight: 800;
  line-height: .86;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  max-width: 8ch;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.hero h1 .vs {
  display: block;
  font-size: .38em;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  margin: .12em 0 .08em;
}
.hero .sub {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 500;
  margin: 22px 0 6px;
}
.hero .tag { color: var(--muted); font-style: italic; margin-bottom: 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  font: 700 1.2rem/1 var(--display); letter-spacing: .02em;
  border-radius: 4px; border: 2px solid var(--sodium);
  text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-primary { background: var(--sodium); color: var(--sodium-ink); }
.btn-primary:hover { background: #ffbd57; border-color: #ffbd57; }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(228,232,230,.45); }
.btn-ghost:hover { border-color: var(--text); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Sections */
section { padding: 88px 0; }

/* Toolkit */
.toolkit { border-top: 1px solid var(--line); }
.toolkit-grid { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .toolkit-grid { grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: start; } }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 52ch; margin-top: 18px; }
.contents { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.contents li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.contents b { font-weight: 600; color: var(--text); }
.contents span { color: var(--muted); font-size: .98rem; }

.signup {
  background: var(--cab);
  border: 1px solid var(--line);
  border-top: 4px solid var(--sodium);
  border-radius: 6px;
  padding: 32px 28px;
}
@media (min-width: 900px) { .signup { position: sticky; top: 24px; } }
.signup h3 { font-size: 1.9rem; margin-bottom: 10px; }
.signup p { color: var(--muted); }
.signup label { display: block; font-weight: 600; margin: 22px 0 8px; }
.signup input[type=email] {
  width: 100%; min-height: 54px; padding: 0 16px;
  font: 500 1.1rem var(--body); color: var(--text);
  background: var(--night); border: 2px solid var(--line); border-radius: 4px;
}
.signup input[type=email]:focus { border-color: var(--sodium); outline: none; }
.signup input[aria-invalid=true] { border-color: var(--neon); }
.signup .btn { width: 100%; margin-top: 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: .92rem; margin: 16px 0 0; }
.msg { margin-top: 14px; font-weight: 500; }
.msg.error { color: #ff8f7f; }
.done h3 { color: var(--sodium); }
.done ol { padding-left: 1.2em; color: var(--text); margin: 0 0 18px; }
.done li { margin-bottom: 6px; }
.share { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.share p { margin-bottom: 12px; }

/* Book */
.book { background: #0b1418; }
.book-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .book-grid { grid-template-columns: .85fr 1.15fr; gap: 72px; align-items: center; } }
.book figure { margin: 0; border-radius: 6px; overflow: hidden; }
.book figure img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% 45%; width: 100%; }
.book .body p { max-width: 60ch; }
.book .body p:first-of-type { font-size: 1.25rem; color: var(--text); }
.covers { margin: 28px 0 0; padding: 0; list-style: none; columns: 2 220px; column-gap: 32px; color: var(--muted); }
.covers li { break-inside: avoid; padding: 6px 0 6px 18px; position: relative; }
.covers li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 8px; height: 2px; background: var(--sodium); }

/* Author */
.author-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .author-grid { grid-template-columns: 1.2fr .8fr; gap: 72px; align-items: center; } }
.author .body p { max-width: 58ch; color: var(--muted); }
.author .body p:first-of-type { color: var(--text); font-size: 1.2rem; }
.author figure { margin: 0; max-width: 360px; justify-self: end; }
.author figure img { border-radius: 6px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.author figcaption { color: var(--muted); font-size: .9rem; margin-top: 10px; }

/* Help */
.help { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0b1418; padding: 56px 0; }
.help-inner { display: grid; gap: 20px; align-items: center; }
@media (min-width: 800px) { .help-inner { grid-template-columns: 1fr auto; gap: 40px; } }
.help h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.help p { color: var(--muted); margin: 10px 0 0; max-width: 60ch; }
.help .btn { border-color: var(--neon); background: var(--neon); color: #fff; }
.help .btn:hover { background: #ee6d5a; border-color: #ee6d5a; }

footer { padding: 48px 0 64px; color: var(--muted); font-size: .95rem; }
footer .legal { max-width: 70ch; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 18px; }
footer nav a { color: var(--text); }

/* Inner pages (/toolkit, /discord) */
.topbar { border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font: 800 1.5rem/1 var(--display); text-transform: uppercase; color: var(--text); text-decoration: none; letter-spacing: .01em; }
.brand span { color: var(--muted); font-weight: 500; font-size: .7em; }
.topbar nav { display: flex; gap: 20px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.topbar nav a:hover, .topbar nav a[aria-current=page] { color: var(--text); }
.page-head { padding: 72px 0 8px; }
.page-head h1 { font-size: clamp(2.8rem, 8vw, 5.2rem); font-weight: 800; text-transform: uppercase; line-height: .92; max-width: 14ch; }
.page-head .lede { margin-top: 20px; }
.toolkit.inner { border-top: 0; padding-top: 40px; }

/* Discord */
.discord-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .discord-grid { grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: start; } }
.rules { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); counter-reset: rule; }
.rules li { padding: 18px 0 18px 44px; border-bottom: 1px solid var(--line); position: relative; counter-increment: rule; }
.rules li::before { content: counter(rule); position: absolute; left: 0; top: 14px; font: 700 1.6rem/1 var(--display); color: var(--sodium); }
.rules b { display: block; font-weight: 600; }
.rules span { color: var(--muted); font-size: .98rem; }
.join { background: var(--cab); border: 1px solid var(--line); border-top: 4px solid var(--sodium); border-radius: 6px; padding: 32px 28px; }
@media (min-width: 900px) { .join { position: sticky; top: 24px; } }
.join h2 { font-size: 1.9rem; margin-bottom: 10px; }
.join p { color: var(--muted); }
.join .btn { width: 100%; margin-top: 8px; }
.join .alt { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .95rem; }

[hidden] { display: none !important; }
/* On phones, put the action (signup / join) before the long lists on inner pages */
@media (max-width: 899px) {
  .toolkit.inner .signup, .discord-grid .join { order: -1; }
  .toolkit.inner .toolkit-grid, .discord-grid { display: flex; flex-direction: column; }
}

/* Buy the book */
.buy { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.buy h3 { font-size: 1.9rem; margin-bottom: 16px; }
.buy-options { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.buy-option {
  display: grid; gap: 4px; padding: 18px 20px;
  background: var(--cab); border: 2px solid var(--line); border-radius: 6px;
  color: var(--text); text-decoration: none; transition: border-color .15s;
}
.buy-option:hover { border-color: var(--sodium); }
.buy-option b { font: 700 1.4rem/1.1 var(--display); color: var(--sodium); }
.buy-option span { color: var(--muted); font-size: .98rem; }
.buy-soon { color: var(--text); }
.buy .fine { color: var(--muted); }

/* Phones: tighter hero and section spacing */
@media (max-width: 699px) {
  .hero { min-height: min(68svh, 600px); }
  .hero picture img { object-position: 65% 80%; }
  .hero::after {
    background:
      linear-gradient(0deg, var(--night) 0%, rgba(14,24,29,.75) 38%, rgba(14,24,29,0) 70%);
  }
  .hero-inner { padding: 0 0 36px; }
  .hero h1 { font-size: clamp(3.4rem, 17vw, 5rem); }
  .hero .sub { margin-top: 16px; font-size: 1.3rem; }
  .hero .tag { margin-bottom: 22px; }
  .hero .actions .btn { flex: 1 1 100%; }

  section { padding: 48px 0; }
  .help { padding: 40px 0; }
  .toolkit-grid, .book-grid, .author-grid, .discord-grid { gap: 32px; }
  .lede { font-size: 1.1rem; margin-top: 14px; }
  .contents { margin-top: 20px; }
  .signup, .join { padding: 26px 20px; }

  .book figure img { aspect-ratio: 4 / 3; object-position: 40% 55%; }
  .book .body h2 + p { margin-top: 16px !important; }
  .buy { margin-top: 28px; padding-top: 24px; }

  .author figure { justify-self: start; max-width: 260px; }
  .author .body h2 + p { margin-top: 16px !important; }

  .page-head { padding: 36px 0 0; }
  .toolkit.inner { padding-top: 28px; }
  footer { padding: 36px 0 44px; }
}
