/* base.css: reputationintelligence.io, the site for the book.
   The page wears the book: Barlow Condensed for display and eyebrows, Poppins
   for body, Source Serif 4 for the deck and the pull quotes, exactly as the
   cover uses them. The verdict rule (heavy red-to-gold over a gold hairline)
   is the one object carried from the cover into every page, and the cover
   lockup and the closing door are ink panels in both color schemes, the way a
   book stays a book whatever desk it is lying on.
   Colors and the light/dark switch live in tokens.css. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.68;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---- the verdict rule, from the cover ---- */
.verdict { margin: 18px 0 22px; }
.verdict .heavy { display: block; height: 3px; background: linear-gradient(90deg, var(--cover-red), var(--cover-gold)); }
.verdict .hair { display: block; height: 1px; background: var(--accent); margin-top: 3px; }

/* ---- header ---- */
.site-header { padding: 34px 0 20px; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-direction: column; gap: 20px; }
.masthead { display: flex; flex-direction: column; gap: 10px; }
.wordmark {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.4px;
  font-size: 34px;
  margin: 0;
  text-decoration: none;
  color: var(--ink);
  display: inline-block;
}
.wordmark span { display: block; }
.eyebrow-line {
  margin: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-nav a {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 14.5px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--action); }

/* ---- the cover lockup (home) ---- */
.lockup {
  background: var(--cover-ink);
  color: var(--cover-paper);
  margin: 34px 0 26px;
  padding: 14px;
}
.lockup-frame {
  border: 1px solid rgba(200, 169, 81, 0.62);
  padding: 46px 30px 40px;
  text-align: center;
}
.lockup-eyebrow {
  margin: 0 0 26px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--cover-gold);
}
/* Metric stand-in for Barlow Condensed Bold while the webfont loads (or is blocked): Arial scaled down so the
   lockup title occupies about the same width and never widens the page. */
@font-face { font-family: 'Barlow Condensed Fallback'; font-weight: 700; src: local('Arial Bold'), local('Arial'), local('Helvetica'), local('Liberation Sans'); size-adjust: 66%; }
.lockup-title {
  font-family: 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(44px, 12vw, 92px);
  line-height: 0.92;
  letter-spacing: 0.012em;
  color: #F7F4EC;
  margin: 0;
}
.lockup-title span { display: block; }
.lockup-title { overflow-wrap: anywhere; } /* fallback-font safety net: a wide stand-in face wraps instead of scrolling */
.lockup .verdict { margin: 18px 0 28px; }
.lockup .verdict .hair { background: var(--cover-gold); }
.lockup-deck {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(242, 239, 231, 0.9);
  max-width: 44ch;
  margin: 0 auto;
}
.seal { margin: 34px 0 30px; font-size: 0; }
.seal i {
  display: inline-block; width: 11px; height: 11px;
  background: var(--cover-gold); transform: rotate(45deg); margin: 0 13px;
}
.seal i:nth-child(2) { width: 15px; height: 15px; background: var(--cover-red); margin-bottom: -2px; }
.lockup-byline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cover-gold);
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(200, 169, 81, 0.62);
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}
.lockup-pub {
  margin: 12px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 239, 231, 0.56);
  font-family: 'Barlow Condensed', sans-serif;
}
.hero-tagline {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px;
  line-height: 1.5;
  margin: 0 0 30px;
  color: var(--ink);
}

/* ---- chapter grammar (every inner page) ---- */
.page-head { margin: 34px 0 6px; }
.kicker {
  margin: 0 0 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.kicker .chapter-ref { color: var(--muted); letter-spacing: 0.18em; }
.kicker .chapter-ref::before { content: '\00b7'; margin: 0 8px 0 2px; color: var(--line); }
h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: clamp(34px, 7vw, 50px);
  line-height: 1.02;
  margin: 0;
}
.deck {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 8px;
}
h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 23px;
  margin: 46px 0 12px;
  padding-top: 14px;
  border-top: 3px solid var(--accent);
}
h3 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 18px; margin: 28px 0 8px; }
p { margin: 0 0 16px; }
a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--action); }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
strong { font-weight: 600; }

/* the book's pull quotes */
blockquote {
  margin: 28px 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--accent);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink);
}
blockquote p { margin: 0 0 10px; }
blockquote p:last-child { margin-bottom: 0; }
blockquote cite {
  display: block;
  margin-top: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede { font-size: 18.5px; margin: 0 0 18px; }

/* ---- the definition ---- */
.definition {
  font-size: 18px;
  line-height: 1.55;
  padding: 20px 22px;
  border: 1px solid var(--ink);
  margin: 24px 0;
  background: var(--card);
}
.definition + .definition { margin-top: -10px; }

.standing-def {
  margin: 52px 0 0;
  padding: 20px 22px;
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background: var(--card);
  font-size: 15.5px;
  line-height: 1.6;
}
.standing-label {
  margin: 0 0 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.standing-def p { margin: 0 0 10px; }
.standing-note { font-size: 13.5px; color: var(--muted); margin: 0; }
.standing-note a { color: var(--muted); }

/* ---- the ordered argument, the pillars, the contents ---- */
.argument-list, .pillar-list { list-style: none; padding: 0; margin: 0; counter-reset: arg; }
.argument-list li, .pillar-list li {
  counter-increment: arg;
  border-bottom: 1px dotted var(--line);
  padding: 16px 0 16px 46px;
  margin: 0;
  position: relative;
}
.argument-list li::before, .pillar-list li::before {
  content: counter(arg, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 17px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.argument-list a, .pillar-list a {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 21px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.argument-list a:hover, .pillar-list a:hover, .term-list a:hover { border-bottom-color: var(--action); }
.argument-list .chapter-ref, .pillar-list .chapter-ref {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}
.argument-list p, .pillar-list p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.argument-list li.here { background: var(--card); }

.chapter-list { list-style: none; padding: 0; margin: 0; }
.chapter-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dotted var(--line);
  margin: 0;
}
.chapter-list .ch-no {
  flex: 0 0 104px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.chapter-list .ch-name { font-size: 16px; }

.stage-list, .ten-list { padding-left: 24px; }
.stage-list li, .ten-list li { margin: 9px 0; }

/* ---- glossary ---- */
.term-list { list-style: none; padding: 0; margin: 0; }
.term-list li { border-bottom: 1px dotted var(--line); padding: 14px 0; margin: 0; }
.term-list a {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.term-list p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.source-line {
  margin: 30px 0 0;
  padding-top: 14px;
  border-top: 1px dotted var(--line);
  font-size: 14.5px;
  color: var(--muted);
}
.source-line strong { color: var(--ink); }

/* ---- tables (the distinction pages) ---- */
table { border-collapse: collapse; width: 100%; margin: 18px 0 22px; font-size: 15px; }
th, td { border-bottom: 1px dotted var(--line); text-align: left; padding: 10px 10px; vertical-align: top; }
th {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  border-bottom: 2px solid var(--accent);
}

.faq-item { margin: 22px 0; padding-bottom: 18px; border-bottom: 1px dotted var(--line); }
.faq-item h3 { margin: 0 0 6px; }

/* ---- the next-chapter line and the door ---- */
.next-chapter {
  margin: 44px 0 0;
  padding-top: 16px;
  border-top: 1px dotted var(--line);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  color: var(--ink);
}
.next-chapter span {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-right: 10px;
}

.door {
  background: var(--cover-ink);
  color: var(--cover-paper);
  border: 1px solid rgba(200, 169, 81, 0.62);
  padding: 28px 26px 26px;
  margin: 40px 0 10px;
}
.door-kicker {
  margin: 0 0 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cover-gold);
}
.door p { color: rgba(242, 239, 231, 0.9); }
.door a.button {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 15px;
  border: 1px solid var(--cover-gold);
  padding: 11px 22px;
  text-decoration: none;
  color: var(--cover-gold);
  background: transparent;
}
.door a.button:hover { background: var(--cover-gold); color: var(--cover-ink); }
.door-note {
  margin: 14px 0 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 239, 231, 0.56);
}

.small { font-size: 13px; color: var(--muted); }

/* ---- footer ---- */
.site-footer {
  margin-top: 64px;
  padding: 34px 0 54px;
  border-top: 1px solid var(--line);
}
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-bottom: 26px; }
.footer-heading {
  margin: 0 0 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 0 0 6px; }
.footer-cols a { font-size: 13.5px; color: var(--muted); text-decoration: none; }
.footer-cols a:hover { color: var(--ink); }
.site-footer .steward { font-size: 13.5px; color: var(--muted); max-width: 64ch; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }
.site-footer .steward a { color: var(--ink); }

/* ---- 404 ---- */
.notfound { padding: 80px 0; }

@media (max-width: 620px) {
  .footer-cols { grid-template-columns: 1fr; gap: 20px; }
  .lockup { padding: 10px; }
  .lockup-frame { padding: 34px 18px 30px; }
  .lockup-deck { font-size: 16.5px; }
  .definition { font-size: 16.5px; padding: 16px 18px; }
  .deck, .hero-tagline { font-size: 18px; }
  blockquote { font-size: 19px; }
  .chapter-list li { display: block; }
  .chapter-list .ch-no { display: block; margin-bottom: 2px; }
}

/* ---- the action: red is the one place it is used as a fill ----
   White on #D40301 is 5.4:1 in both schemes, so the button does not swap tokens. */
.button-action, .door a.button.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: #D40301;
  border: 1px solid #D40301;
  border-radius: 0;
  cursor: pointer;
}
.button-action:hover, .door a.button.action:hover { background: #A80201; border-color: #A80201; color: #fff; }
.button-action:disabled { opacity: 0.6; cursor: progress; }
.door a.button { margin-right: 10px; }
.door a.button.action { margin-top: 8px; font-size: 15px; min-height: 44px; padding: 0 22px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.button-action:focus-visible, .door a.button:focus-visible { outline-color: var(--cover-gold); }

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0 0 34px; }
.hero-cta-note {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* nav: 44px tap targets, and Pre-order is the one filled item */
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-bottom: 0; border-bottom: 0; box-shadow: inset 0 -2px 0 transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: transparent; box-shadow: inset 0 -2px 0 var(--action); }
.site-nav a.nav-action { padding: 0 16px; color: #fff; background: #D40301; letter-spacing: 0.1em; box-shadow: none; }
.site-nav a.nav-action:hover, .site-nav a.nav-action[aria-current="page"] { background: #A80201; box-shadow: none; }
.site-nav { gap: 0 22px; align-items: center; }

/* the printed jacket: white ground, so it needs an edge on paper */
.book-cover { margin: 28px auto 34px; width: min(360px, 78vw); }
.book-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .book-cover img { border-color: #4a4436; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
}
:root[data-theme="dark"] .book-cover img { border-color: #4a4436; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }

/* ---- the pre-order form ---- */
.preorder { margin: 26px 0 30px; padding: 26px 22px 22px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.po-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.po-field { margin: 0 0 18px; }
.po-field label { display: block; margin: 0 0 6px; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; }
.po-field .req { color: var(--action); }
.po-field .opt { color: var(--muted); font-weight: 500; letter-spacing: 0.08em; }
.po-field input[type="text"], .po-field input[type="email"], .po-field input[type="tel"], .po-field input[type="number"], .po-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--muted);
  border-radius: 0;
}
.po-field textarea { min-height: 110px; resize: vertical; }
.po-field [aria-invalid="true"] { border-color: var(--action); box-shadow: inset 3px 0 0 var(--action); }
.po-help { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.po-error { margin: 6px 0 0; font-size: 14.5px; font-weight: 500; color: var(--action); }
.po-error[hidden] { display: none; }
.po-check { display: flex !important; gap: 14px; align-items: flex-start; min-height: 44px; margin: 0 !important; font-family: 'Poppins', sans-serif !important; font-weight: 400 !important; font-size: 15.5px !important; letter-spacing: 0 !important; text-transform: none !important; cursor: pointer; }
.po-check input { flex: 0 0 auto; width: 24px; height: 24px; margin: 3px 0 0; accent-color: #D40301; }
.po-hp input { font-size: 16px; }
.po-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.po-actions { margin-top: 6px; }
.po-status { min-height: 1.5em; margin: 14px 0 0; font-size: 15px; }
.po-status.is-error { color: var(--action); font-weight: 500; }
.po-status a { color: inherit; }
.po-noscript { margin: 12px 0 0; font-size: 15px; }
.po-done { padding: 4px 0; }
.po-done:focus { outline: none; }
.po-done h3 { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; font-size: 30px; margin: 0 0 10px; }
.po-done p { font-size: 17px; }

h1, h2 { text-wrap: balance; }
.deck, .lede, .hero-tagline { text-wrap: pretty; }

@media (max-width: 620px) {
  .po-row { grid-template-columns: 1fr; }
  .preorder { padding: 22px 16px 18px; }
  .site-nav { gap: 0 16px; }
  .site-nav a.nav-action { padding: 0 14px; }
  .door a.button { display: flex; width: 100%; justify-content: center; text-align: center; margin: 10px 0 0; }
  .door a.button.action { margin-top: 10px; }
}
