/* Building Talks — shared styles
 * Service-tag + medical-case-file aesthetic.
 * Distinct from themathsays (which is publication/serif) and affiliate-ships (which is bright/orange).
 * No framework, no build step. */
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/anton.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --ink: #1a1a1a;
  --ink-soft: #333;
  --ink-mute: #6b6b6b;
  --ink-faint: #a3a3a3;
  --paper: #faf7f1;
  --paper-card: #ffffff;
  --slate: #2c3e50;
  --slate-soft: #34495e;
  --rule: #d9d4c8;
  --rule-soft: #ece8de;

  /* Diagnosis-state colors */
  --healthy: #166534;
  --healthy-bg: #e8f4ec;
  --caution: #b45309;
  --caution-bg: #fdf3d8;
  --danger: #991b1b;
  --danger-bg: #fcebe7;

  /* Building Doctor signature */
  --signal: #b45309;   /* amber signal — caution */
  --vital: #166534;    /* clean green — healthy diagnosis */
  --emergency: #991b1b;/* red — call for help now */

  --max: 760px;
  --max-narrow: 660px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "kern", "liga";
}

main, header, footer, nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

/* Top nav — service-tag minimal */
nav.site {
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  background: var(--paper);
}
nav.site .brand {
  font-family: "Anton", "Oswald", Impact, sans-serif;
  font-weight: 400;
  font-size: 26px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
  line-height: 1;
}
nav.site .brand em {
  font-style: normal;
  color: var(--signal);
  font-weight: 400;
}
nav.site .nav-links a {
  color: var(--ink-mute);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 500;
  display: inline-block;
  padding: 10px 0;
  min-height: 44px;
  box-sizing: border-box;
}
nav.site .nav-links a:hover { color: var(--ink); }

header {
  padding-top: 36px;
  padding-bottom: 14px;
}

.eyebrow {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 14px;
  font-weight: 700;
}
.eyebrow a {
  color: var(--signal);
  text-decoration: none;
}

h1 {
  font-family: "Anton", "Oswald", Impact, sans-serif;
  font-weight: 400;
  font-size: 46px;
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: 0.005em;
  color: var(--ink);
}

h2 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.2;
  margin: 44px 0 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h2.step {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
h2.step::before {
  content: attr(data-step);
  font-family: "Anton", "Oswald", Impact, sans-serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--slate);
  padding: 3px 10px 1px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}

h3 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 19px;
  margin: 26px 0 8px;
  color: var(--ink);
}

.lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-style: italic;
  border-left: 3px solid var(--signal);
  padding-left: 16px;
}

p { margin: 0 0 14px; }

ul, ol { margin: 0 0 18px; padding-left: 24px; }
li { margin-bottom: 8px; }

a {
  color: var(--slate);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
}
a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}

/* "Reviewed by Al" stamp — visible E-E-A-T signal */
.review-stamp {
  display: block;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--slate);
  padding: 14px 18px;
  margin: 18px 0 26px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.review-stamp strong {
  color: var(--ink);
  font-weight: 700;
}
.review-stamp .cred-row {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-mute);
}
.review-stamp .cred-row span:not(:last-child)::after {
  content: " · ";
  color: var(--rule);
}

/* Diagnosis callouts — the doctor's case-file blocks */
.callout {
  border-left: 4px solid var(--slate);
  background: var(--paper-card);
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
}
.callout.healthy { border-color: var(--vital); background: var(--healthy-bg); }
.callout.caution { border-color: var(--caution); background: var(--caution-bg); }
.callout.danger  { border-color: var(--emergency); background: var(--danger-bg); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }
.callout-label {
  display: inline-block;
  font-family: "Anton", "Oswald", Impact, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  padding: 1px 7px;
  margin-right: 8px;
  background: var(--slate);
  color: #fff;
  border-radius: 2px;
  vertical-align: 2px;
  text-transform: uppercase;
}
.callout.healthy .callout-label { background: var(--vital); }
.callout.caution .callout-label { background: var(--caution); }
.callout.danger .callout-label  { background: var(--emergency); }

/* The "Reading the vitals" decision tree on the pillar page */
.vitals {
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.vital-card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--slate);
  padding: 16px 18px;
}
.vital-card .sound {
  font-family: "Anton", "Oswald", Impact, sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--slate);
  margin: 0 0 4px;
  line-height: 1.1;
}
.vital-card .system {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0 0 8px;
}
.vital-card a {
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  display: block;
  padding: 14px 0;
  min-height: 44px;
  box-sizing: border-box;
  border-top: 1px solid var(--rule);
  font-size: 15px;
}
.vital-card a:first-of-type { border-top: none; margin-top: 4px; }
.vital-card a:hover { color: var(--signal); text-decoration: underline; }
@media (min-width: 720px) {
  .vitals { grid-template-columns: 1fr 1fr; }
}

/* Tables (used in differential-diagnosis blocks) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 15px;
  background: var(--paper-card);
  border: 1px solid var(--rule);
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
th {
  background: var(--slate);
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Numbered treatment-plan steps */
.steps { list-style: none; padding: 0; margin: 18px 0 26px; counter-reset: s; }
.steps li {
  counter-increment: s;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 14px 16px 14px 54px;
  position: relative;
  margin-bottom: 10px;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  background: var(--slate);
  color: #fff;
  font-family: "Anton", "Oswald", Impact, sans-serif;
  font-size: 18px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

/* Affiliate CTAs */
.cta-block {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 18px 20px;
  margin: 24px 0;
  border-radius: 4px;
}
.cta-block-label {
  display: inline-block;
  font-family: "Anton", "Oswald", Impact, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  background: var(--signal);
  color: #fff;
  border-radius: 2px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.cta-block.emergency .cta-block-label { background: var(--emergency); }
.cta-block ul { margin: 8px 0 0; padding-left: 20px; }
.cta-block li { font-size: 15px; }
.cta-block a[data-offer] {
  font-weight: 600;
  color: var(--ink);
}

/* Tier-3 product anchors — flagged so Tier-3 pages can route here */
a[data-product], a[data-tool] {
  font-weight: 600;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
}
a[data-product]:hover, a[data-tool]:hover {
  color: var(--signal);
}

/* FAQ */
.faq {
  border-top: 2px solid var(--ink);
  margin-top: 36px;
  padding-top: 8px;
}
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}
.faq summary {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  outline: none;
  list-style: none;
  position: relative;
  padding-right: 28px;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-mute);
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { margin-bottom: 8px; }
.faq details p { font-size: 16px; color: var(--ink-soft); margin-top: 6px; }

/* Related diagnoses (cross-link block) */
.related {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 18px 20px;
  margin: 28px 0;
  border-radius: 4px;
}
.related h3 { margin-top: 0; }
.related ul { margin-bottom: 0; }
.related ul li { padding: 6px 0; line-height: 1.5; }
.related ul li a { display: inline-block; padding: 6px 0; min-height: 44px; box-sizing: border-box; }

/* Spoke list (homepage / pillar) */
.spoke-list { list-style: none; padding: 0; margin: 20px 0; }
.spoke-list li {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 16px 18px;
  margin-bottom: 10px;
  border-radius: 4px;
}
.spoke-list a {
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}
.spoke-list a:hover { color: var(--signal); }
.spoke-list .meta {
  font-size: 13px;
  color: var(--ink-mute);
}
.spoke-list .badge {
  display: inline-block;
  font-family: "Anton", "Oswald", Impact, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 1px 7px;
  margin-left: 8px;
  background: var(--vital);
  color: #fff;
  border-radius: 2px;
  vertical-align: middle;
  text-transform: uppercase;
}
.spoke-list .badge.urgent { background: var(--emergency); }

/* Footer */
footer {
  margin-top: 60px;
  padding-top: 26px;
  padding-bottom: 50px;
  border-top: 2px solid var(--ink);
  font-size: 13px;
  color: var(--ink-mute);
}
footer p { margin-bottom: 10px; }
footer .disclosure {
  font-size: 12px;
  background: var(--paper-card);
  padding: 12px 16px;
  border-left: 3px solid var(--rule);
  margin-bottom: 16px;
  line-height: 1.5;
}
footer .disclosure strong { color: var(--ink); }
footer a { color: var(--ink-soft); display: inline-block; padding: 6px 4px; }

/* Cookie consent (renders only if GA4 is on) */
.consent-banner {
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  max-width: 680px;
  margin: 0 auto;
  background: var(--ink);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  z-index: 9999;
}
.consent-banner p { margin: 0; flex: 1 1 240px; }
.consent-banner button {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border: 1px solid #555;
  background: transparent;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.consent-banner button.primary { background: var(--signal); border-color: var(--signal); }

/* Print */
@media print {
  body { background: #fff; font-size: 11pt; }
  nav.site, .cta-block, .consent-banner, footer .disclosure { display: none !important; }
  h1 { font-size: 24pt; }
  h2 { font-size: 14pt; page-break-after: avoid; }
  .callout, .steps li, table { page-break-inside: avoid; }
}

/* Small screens */
@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 36px; }
  h2 { font-size: 21px; }
  h2.step::before { font-size: 12px; padding: 2px 7px; }
  .lede { font-size: 18px; }
  main, header, footer, nav { padding: 0 16px; }
  nav.site .brand { font-size: 22px; }
  nav.site .nav-links a { margin-left: 12px; font-size: 13px; }
}
