/* =====================================================================
   Dangerous with AI — shared site system (v1, audit-preview)
   One header, one hero, one footer. Loaded after styles.css on every
   inner page. Tokens come from styles.css (:root): --ember #ff5a00,
   --ember-bright #ff7a1a, --ink #080808, --paper, --paper-dim, --steel.
   ===================================================================== */

/* ---------- 1. Header / nav (5 items + 2 actions) ---------- */
.nav-v2 { gap: clamp(18px, 2.4vw, 36px); }
.nav-v2 .nav-group { position: relative; }
.nav-v2 .nav-top { display: inline-flex; align-items: center; gap: 7px; padding-block: 12px; }
.nav-v2 .nav-group > .nav-top::before {
  order: 2; width: 5px; height: 5px; content: "";
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg); opacity: .6;
}
.nav-v2 .nav-top::after { bottom: 4px !important; }
.nav-v2 [data-current] > .nav-top, .nav-v2 .nav-top[data-current] { color: var(--paper); }
.nav-v2 [data-current] > .nav-top::after, .nav-v2 .nav-top[data-current]::after { transform: scaleX(1) !important; transform-origin: left !important; }

.nav-v2 .nav-panel {
  position: absolute; top: 100%; left: -22px; z-index: 5;
  display: grid; min-width: 290px; padding: 10px;
  background: rgba(12, 12, 11, .97); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms var(--ease), visibility 160ms;
}
.nav-v2 .nav-group:hover .nav-panel,
.nav-v2 .nav-group:focus-within .nav-panel { visibility: visible; opacity: 1; transform: none; }
.nav-v2 .nav-panel a {
  display: grid; gap: 3px; padding: 11px 12px;
  color: var(--paper); font-size: 13px; font-weight: 650; letter-spacing: .02em;
  transition: background-color 140ms ease;
}
.nav-v2 .nav-panel a::after { display: none; }
.nav-v2 .nav-panel a:hover { background: rgba(255, 90, 0, .08); }
.nav-v2 .nav-panel a:hover small { color: var(--ember-bright); }
.nav-v2 .nav-panel small { color: var(--steel); font-size: 12px; font-weight: 400; letter-spacing: 0; }

.nav-v2 .nav-actions { display: flex; align-items: center; gap: 10px; margin-left: clamp(4px, 1vw, 14px); }
.nav-v2 .nav-book {
  padding: 10px 16px; color: var(--ink) !important; background: var(--ember);
  border: 1px solid var(--ember); font-weight: 800; letter-spacing: .06em;
}
.nav-v2 .nav-book:hover { background: var(--ember-bright); border-color: var(--ember-bright); }
.nav-v2 .nav-book::after { display: none; }

@media (min-width: 861px) and (max-width: 1199px) {
  .nav-v2 { gap: 18px; }
  .nav-v2 .nav-book, .nav-v2 .nav-cta { padding: 9px 12px; }
}

@media (max-width: 860px) {
  .nav-v2 { justify-content: flex-start; gap: 0; padding: 96px 24px 40px; overflow-y: auto; }
  .nav-v2 .nav-group, .nav-v2 > .nav-top { width: 100%; border-bottom: 1px solid var(--line); }
  .nav-v2 .nav-top { padding-block: 16px 10px; font-size: 30px !important; }
  .nav-v2 > .nav-top { padding-bottom: 16px; }
  .nav-v2 .nav-group > .nav-top::before { display: none; }
  .nav-v2 .nav-top::after { display: none; }
  .nav-v2 .nav-panel {
    position: static; display: flex; flex-wrap: wrap; gap: 4px 18px; min-width: 0; padding: 0 0 16px;
    background: none; border: 0; box-shadow: none; visibility: inherit; opacity: 1; transform: none;
  }
  .nav-v2 .nav-panel a { padding: 4px 0; font-family: inherit !important; font-size: 14px !important; letter-spacing: .02em !important; color: var(--paper-dim); }
  .nav-v2 .nav-panel a:hover { background: none; }
  .nav-v2 .nav-panel small { display: none; }
  .nav-v2 .nav-actions { flex-wrap: wrap; margin: 26px 0 0; }
  .nav-v2 .nav-book, .nav-v2 .nav-cta { margin: 0; padding: 13px 18px; font-family: inherit !important; font-size: 13px !important; letter-spacing: .06em !important; }
}

/* ---------- 2. Shared inner-page hero (the Radar standard) ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--header-height) + 96px) 0 72px;
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 85% 20%, rgba(255, 90, 0, .18), transparent 55%), linear-gradient(120deg, #080808, #0f0c09);
}
.page-hero .binary-field { z-index: -1; opacity: .16; }
.page-hero .section-kicker { margin: 0; }
.page-hero-grid {
  display: grid; grid-template-columns: 1fr .62fr; grid-template-rows: minmax(191px, auto) auto;
  column-gap: 70px; align-items: center; margin-top: 22px;
}
.page-hero h1 {
  grid-column: 1; grid-row: 1; margin: 0;
  font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: clamp(40px, 7vw, 72px); line-height: 1.05; letter-spacing: -.03em;
}
.page-hero h1 em { color: var(--ember-bright); font-style: italic; font-weight: 400; }
.page-hero-side { grid-column: 2; grid-row: 1; }
.page-hero-lede { margin: 0; max-width: 520px; color: var(--paper-dim); font-size: 17px; line-height: 1.65; }
.page-hero-lede strong { color: var(--ember-bright); font-weight: 600; }
.page-hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 22px 0 0;
  color: var(--steel); font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.page-hero-meta strong { color: var(--paper); font-weight: 500; }
.page-hero-pills { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 44px; }
.page-hero-pills a {
  display: inline-flex; align-items: center; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--paper-dim); font-size: 13px;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
.page-hero-pills a:hover { border-color: var(--ember); color: var(--ember-bright); }
.page-hero-pills a.is-primary { border-color: var(--ember); color: var(--ember-bright); }
@media (max-width: 1000px) {
  .page-hero { padding: calc(var(--header-height) + 56px) 0 56px; }
  .page-hero-grid { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 28px; }
  .page-hero-side { grid-column: 1; grid-row: 2; }
  .page-hero-pills { grid-row: 3; margin-top: 8px; }
}

/* ---------- 3. Type scale on inner pages ---------- */
/* Editorial h2 (long-form pages) — one size, not seven */
.reading-copy h2 { font-size: clamp(32px, 4.5vw, 56px); line-height: 1.04; letter-spacing: -.035em; }

/* ---------- 4. Book band: foreword + Living Edition + Get the book ---------- */
.book-band { margin: 56px 0 8px; padding: clamp(26px, 4vw, 44px); color: var(--paper); background: radial-gradient(ellipse at 90% 10%, rgba(255, 90, 0, .22), transparent 55%), var(--ink); }
.book-band h2 { color: var(--paper); }
.book-band .bb-kicker { margin: 0 0 14px; color: var(--ember-bright); font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.book-band h2 { margin: 0 0 12px !important; font-size: clamp(28px, 3.4vw, 40px) !important; }
.book-band p { margin: 0 0 10px; color: var(--paper-dim); }
.book-band .bb-foreword { color: var(--paper); }
.book-band .bb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }
.book-band .bb-soon { color: var(--steel); font-size: 13px; }
.living-line { color: var(--paper) !important; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-style: italic; }

/* ---------- 5. Footer (one footer, four columns) ---------- */
.footer-v2 { padding-block: 64px 34px; }
.fv2-top { display: grid; grid-template-columns: 1.1fr 1.6fr; gap: 56px; }
.fv2-tag { margin: 16px 0 0; color: var(--paper-dim); font-size: 13px; }
.fv2-credit { margin: 16px 0 0; color: var(--steel); font-size: 12px; line-height: 1.6; }
.fv2-living { margin: 18px 0 0; max-width: 420px; color: var(--paper-dim); font-family: Georgia, "Times New Roman", serif; font-size: 15px; font-style: italic; line-height: 1.45; }
.fv2-living span { display: block; margin-bottom: 6px; color: var(--ember-bright); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; font-style: normal; letter-spacing: .14em; text-transform: uppercase; }
.fv2-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.fv2-cols h2 { margin: 0 0 14px; color: var(--steel); font-family: inherit; font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.fv2-cols a { display: block; padding: 5px 0; color: var(--paper-dim); font-size: 13px; }
.fv2-cols a:hover { color: var(--paper); }
.fv2-bottom { display: flex; flex-direction: row-reverse; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .07); }
.fv2-bottom p { margin: 0; color: var(--steel); font-size: 11px; }
.footer-v2 .copyright { padding: 0; border: 0; }
@media (max-width: 860px) {
  .fv2-top { grid-template-columns: 1fr; gap: 40px; }
  .fv2-cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
}
@media (max-width: 860px) {
  .nav-v2 { background: var(--ink) !important; }
  .nav-v2 [data-current] > .nav-top, .nav-v2 .nav-top[data-current] { color: var(--ember-bright); }
}
/* leave room for the fixed "Want Antonio to follow up?" widget */
.footer-v2 { padding-bottom: 96px; }

/* ---------- 6. Hero standard v2: the numbered-card hero (AP's pick) ----------
   Card left (label / big number / caption), big headline, lede underneath,
   then meta + pill row. Used on every inner page. */
.reading-hero .reading-hero-lede {
  max-width: 770px; margin: 34px 0 0;
  color: var(--paper-dim); font-size: clamp(18px, 2vw, 24px); line-height: 1.55;
}
.reading-hero .reading-hero-lede strong { color: var(--ember-bright); font-weight: 600; }
.reading-hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 26px 0 0;
  color: var(--steel); font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.reading-hero-meta strong { color: var(--paper); font-weight: 500; }
.reading-hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.reading-hero-pills a {
  display: inline-flex; align-items: center; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--paper-dim); font-size: 13px;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
.reading-hero-pills a:hover, .reading-hero-pills a.is-primary { border-color: var(--ember); color: var(--ember-bright); }
.reading-hero .reading-hero-index { align-self: center; }

/* ---------- 7. Page-specific pieces of the v2 standard ---------- */
/* Tool pages: card shows "Power · Risk" as a pair */
.reading-hero-index .num-pair { font-size: 68px; white-space: nowrap; }
.reading-hero-index .num-pair i { margin: 0 .06em; color: var(--ember-bright); font-style: normal; }
.radar-detail-body { padding: 56px 0 8px; }
.radar-detail-body .radar-answer-box { margin-top: 0; }
/* For-AI page body sits under the hero now */
.radar-ai-page.radar-ai-body { padding: 48px 0 72px; }
/* About: portrait moves next to the short biography */
.about-portrait { margin: 0; border-bottom: 1px solid var(--line); }
.about-portrait img { display: block; width: 100%; height: auto; }
/* Reader Kit: "what's inside" + cover sits below the hero */
.reader-kit-hero.rk-after-hero { min-height: 0; padding: 80px 0 96px; }
/* Vault gate button = the site's primary button */
.vault-gate button { color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
/* Inner pages that are not "reading pages" keep the hero text light */
.reading-hero { color: var(--paper); }
/* Long headlines: same face, one step smaller so they stay on 2–3 lines */
.reading-hero-copy h1.is-long { font-size: clamp(44px, 6vw, 84px); line-height: .95; letter-spacing: -.05em; }
@media (max-width: 700px) { .reading-hero-copy h1.is-long br { display: none; } }

/* Chapter One: epigraph, footnote marker, color figures */
.chapter-epigraph p{font-family:Georgia,"Times New Roman",serif;font-size:clamp(17px,1.7vw,20px);color:var(--paper);margin:0 0 .5em}
.chapter-epigraph p strong{display:block;margin-bottom:2px;color:var(--ember-bright);font-family:Inter,ui-sans-serif,system-ui,sans-serif;font-size:10px;letter-spacing:.15em;text-transform:uppercase}
.chapter-footnote-ref{color:var(--ember-dark,#c94400);font-weight:700;text-decoration:none;vertical-align:super;font-size:.65em;line-height:0}
.chapter-figure a{display:block}
.chapter-figure img{filter:none}
.chapter-source-note + .chapter-source-note{margin-top:14px}

/* Privacy choice. Same face for Accept and Decline. No second color on one button. */
.consent-bar {
  position: fixed;
  z-index: 90;
  left: 16px;
  right: 112px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  max-width: 880px;
  padding: 16px 18px;
  background: #080808;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.consent-bar[hidden] { display: none !important; }
.consent-kicker {
  margin: 0;
  color: var(--ember-bright);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.consent-bar p { margin: 0; flex: 1 1 240px; color: var(--paper); font-size: 15px; line-height: 1.45; }
.consent-bar a { color: var(--ember-bright); text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.consent-actions button {
  min-width: 112px;
  min-height: 44px;
  padding: 10px 18px;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  font: 600 14px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.consent-actions button:hover { border-color: var(--ember); color: var(--ember-bright); }
.consent-actions button:focus-visible,
.consent-dismiss:focus-visible,
.copyright .consent-settings:focus-visible,
.copyright a:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}
.consent-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.consent-dismiss[hidden] { display: none !important; }
.consent-bar--strict {
  left: 0;
  right: 0;
  bottom: 0;
  max-width: none;
  padding: 22px 120px 22px clamp(18px, 4vw, 40px);
}
.consent-bar--strict p { font-size: 17px; }
.consent-bar--notice {
  left: 16px;
  right: auto;
  width: min(460px, calc(100vw - 32px));
  bottom: 16px;
  padding: 12px 40px 12px 14px;
}
.consent-bar--notice p { font-size: 13.5px; }
.consent-bar--reopen {
  left: 50%;
  right: auto;
  width: min(720px, calc(100vw - 32px));
  bottom: 16px;
  transform: translateX(-50%);
}
/* The bar is fixed and does not reserve layout space, so it cannot shift the page. */
.copyright a,
.copyright .consent-settings {
  margin-left: 12px;
  color: var(--steel);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.copyright a:hover,
.copyright .consent-settings:hover { color: var(--paper); }
/* Privacy: same dark long-form measure as other inner pages, without the numbered card. */
.privacy-hero {
  min-height: 0;
  padding: calc(var(--header-height) + 72px) 0 64px;
}
.privacy-hero .reading-hero-inner {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.privacy-body { background: var(--ink); color: var(--paper); }
.privacy-copy { max-width: 820px; }
.privacy-copy h2 {
  margin: 1.6em 0 0.45em;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.04;
  letter-spacing: -.035em;
}
.privacy-copy section:first-child h2 { margin-top: 0; }
.privacy-copy p,
.privacy-copy li {
  color: var(--paper-dim);
  font-size: 17px;
  line-height: 1.65;
}
.privacy-copy p { margin: 0 0 0.9em; }
.privacy-copy ul { margin: 0 0 0.9em; padding-left: 1.15em; }
.privacy-copy li { margin: 0.35em 0; }
.privacy-copy a {
  color: var(--ember-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.privacy-copy button[data-consent-settings] {
  padding: 0;
  background: none;
  border: 0;
  color: var(--ember-bright);
  font: inherit;
  font-size: 17px;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.privacy-copy button[data-consent-settings]:hover { color: var(--paper); }
.privacy-copy button[data-consent-settings]:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}
@media (max-width: 720px) {
  .consent-bar,
  .consent-bar--strict,
  .consent-bar--notice,
  .consent-bar--reopen {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    transform: none;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .consent-actions { width: 100%; }
  .consent-actions button { flex: 1 1 0; }
}
@media (prefers-reduced-motion: reduce) {
  .consent-bar { transition: none; }
}

/* Homepage only. styles.css hides .js .reveal until script.js adds
   is-visible, then fades it in over 750ms. On a phone the book cover
   sits just under the fold and is a bigger paint than the headline, so
   that fade makes the cover a late LCP. The hero paints in its final
   state; sections further down still fade. */
.js .hero .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* The cover starts just under a phone fold, but Chrome still counts the
   full image as LCP and it outranks the headline. Skip painting it until
   it is actually on screen. Width stays on the element; the block size
   matches the 2:3 cover plus the edition note so the skip does not shift. */
@media (max-width: 600px) {
  .hero .cover-stage {
    content-visibility: auto;
    contain-intrinsic-block-size: auto calc(min(82vw, 350px) * 1.5 + 48px);
  }
}
@media (max-width: 860px) and (min-width: 601px) {
  .hero .cover-stage {
    content-visibility: auto;
    contain-intrinsic-block-size: auto calc(min(78vw, 430px) * 1.5 + 48px);
  }
}
