/* base.css: affirmationsearch.com, the reference for the term.
   A sibling of reputationintelligence.io, not a copy. The same hand: Barlow
   Condensed for display and eyebrows, Poppins for body, Source Serif 4 for the
   deck and pull quotes, the same verdict rule (heavy red-to-gold over a gold
   hairline), the same 760px measure and section rhythm. Its own objects: the
   word mark sets "Search" inside a field with a caret, and the home page opens
   on the book's jacket (white, thin red frame) holding a search field with a
   company's name already in it.
   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;
  overflow-wrap: break-word;
}

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

/* ---- the verdict rule, shared with the sister site ---- */
.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: 30px 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-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.wordmark .wm-top { display: block; }
/* "Search" sits in a field: a thin gold box with a red caret after the word */
.wordmark .wm-field {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  padding: 3px 9px 2px 8px;
  line-height: 0.95;
}
.wordmark .wm-field i {
  display: inline-block;
  width: 2px;
  height: 0.78em;
  margin-left: 6px;
  background: var(--action);
}
.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 home hero: the field, set on the 6J jacket ---- */
.field-hero {
  background: var(--jacket-ground);
  color: var(--jacket-ink);
  margin: 34px 0 26px;
  padding: 14px;
  box-shadow: 0 1px 0 rgba(10, 10, 10, 0.06), 0 22px 44px -30px rgba(10, 10, 10, 0.45);
}
.field-frame {
  border: 1.5px solid var(--jacket-frame);
  padding: 40px 34px 36px;
}
.field-eyebrow {
  margin: 0 0 24px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--jacket-red);
}
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--jacket-frame);
  background: var(--jacket-ground);
  padding: 13px 18px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  line-height: 1.3;
  color: var(--jacket-ink);
  max-width: 560px;
}
.field-glyph {
  flex: 0 0 auto;
  width: 15px; height: 15px;
  border: 2px solid var(--jacket-red);
  border-radius: 50%;
  position: relative;
  margin-right: 4px;
}
.field-glyph::after {
  content: '';
  position: absolute;
  width: 7px; height: 2px;
  background: var(--jacket-red);
  right: -7px; bottom: -3px;
  transform: rotate(45deg);
}
.query .qname {
  font-weight: 400;
  color: var(--accent-text);
  border-bottom: 2px solid var(--accent);
}
.field-hero .query .qname { color: var(--jacket-red); border-bottom-color: var(--jacket-red); }
.caret {
  display: inline-block;
  width: 2px; height: 1.05em;
  background: var(--cover-red);
  margin-left: 4px;
  vertical-align: -0.18em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.field-ghosts {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 560px;
  border: 1px solid var(--jacket-hair);
  border-top: 0;
}
.field-ghosts li {
  margin: 0;
  padding: 8px 18px 8px 49px;
  border-top: 1px dotted var(--jacket-hair);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  color: var(--jacket-muted);
}
.field-ghosts li:first-child { border-top: 0; }
.field-ghosts .qname { color: var(--jacket-red); border-bottom-width: 1px; }
.field-note {
  margin: 14px 0 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--jacket-muted);
}
.field-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(46px, 12vw, 96px);
  line-height: 0.9;
  letter-spacing: 0.012em;
  color: var(--jacket-ink);
  margin: 38px 0 0;
}
.field-title span { display: block; }
.field-hero .verdict { margin: 18px 0 24px; }
.field-hero .verdict .hair { background: #A8863B; }
.field-def {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 24px;
  line-height: 1.4;
  color: var(--jacket-ink);
  margin: 0 0 12px;
  max-width: 34ch;
}
.field-sub {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: #3a3a3a;
  margin: 0 0 26px;
  max-width: 44ch;
}
.field-byline {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--jacket-frame);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--jacket-red);
  max-width: 300px;
}

/* ---- page 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);
}
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; }

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-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  line-height: 1.45;
  padding: 20px 22px;
  border: 1px solid var(--ink);
  border-left: 4px solid var(--accent);
  margin: 24px 0;
  background: var(--card);
}
.definition p { margin: 0; }

.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-sub { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; }
.standing-note { font-size: 13.5px; color: var(--muted); margin: 0; }
.standing-note a { color: var(--muted); }

/* ---- the questions, typed ---- */
.question-list { list-style: none; padding: 0; margin: 0; counter-reset: q; }
.question-list li {
  counter-increment: q;
  position: relative;
  margin: 0;
  padding: 16px 0 14px 46px;
  border-bottom: 1px dotted var(--line);
}
.question-list li::before {
  content: counter(q, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.question-list .q {
  display: inline-block;
  margin: 0 0 8px;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  background: var(--card);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.35;
}
.question-list .qname { font-weight: 600; color: var(--accent-text); }
.question-list li > p:last-child { margin-bottom: 0; }
.question-list.compact li { padding: 10px 0 8px 46px; }
.question-list.compact li::before { top: 13px; }
.question-list.compact .q { margin: 0; }

.stage-list { padding-left: 24px; }
.stage-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 a:hover { border-bottom-color: var(--action); }
.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; table-layout: fixed; }
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);
}
th:first-child, td:first-child { width: 24%; }

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

/* ---- the next 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;
  line-height: 1.35;
  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); }
/* The door stays an ink panel, as it does on reputationintelligence.io. Its one
   button is the book site's action: red is the one place used as a fill, and
   white on #D40301 is 5.4:1, so it does not swap with the scheme. */
.door a.button {
  color: #fff;
  background: #D40301;
  border-color: #D40301;
}
.door a.button:hover { background: #A80201; border-color: #A80201; color: #fff; }
.door a.button:focus-visible { outline: 3px solid var(--cover-gold); outline-offset: 3px; }

.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; }
  .field-hero { padding: 10px; }
  .field-frame { padding: 28px 16px 26px; }
  .field { font-size: 18px; padding: 11px 12px; gap: 9px; }
  .field-ghosts li { font-size: 14.5px; padding-left: 12px; }
  .field-def { font-size: 20px; }
  .field-sub { font-size: 16.5px; }
  .definition { font-size: 19px; padding: 16px 18px; }
  .deck { font-size: 18px; }
  blockquote { font-size: 19px; }
  .question-list .q { font-size: 16.5px; }
  table { font-size: 13.5px; }
  th, td { padding: 8px 6px; }
}
