/* Resources hub + category landing pages.
   Mirrors action.html / letter.html / index.html idiom: brand red,
   dark page-hero, Libre Baskerville + Source Sans 3, sticky tab-nav.
   No per-category color tinting — wayfinding via icons + titles only. */

:root {
  --font-heading: 'Libre Baskerville', 'Georgia', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --brand-red: #d81010;
  --bg: #fff;
  --bg-warm: #f7f5f2;
  --border: #e8e4df;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* ── Sticky tab nav ───────────────────────────────────────── */
.tab-nav {
  background: #fff;
  border-bottom: 2px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 100;
}
.tab-nav .inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 1.5rem;
}
.tab-nav__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  padding: 1rem 0;
  justify-self: start;
}
.tab-nav__tabs {
  display: flex;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
  justify-self: center;
}
.tab-nav__tabs a {
  display: block;
  padding: 1.1rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: #555;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.tab-nav__tabs a:hover { color: var(--brand-red); border-bottom-color: var(--brand-red); }
.tab-nav__tabs a.active { color: var(--brand-red); border-bottom-color: var(--brand-red); }
.tab-nav__counters {
  display: flex;
  gap: 0.5rem;
  justify-self: end;
}
.tab-nav__counter {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  transition: border-color 0.15s;
}
.tab-nav__counter:hover { border-color: var(--brand-red); }
.tab-nav__counter-number {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-red);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tab-nav__counter-label {
  font-size: 0.72rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
@media (max-width: 720px) {
  .tab-nav__counter-label { display: none; }
  .tab-nav__counters { gap: 0.35rem; }
  .tab-nav__counter { padding: 0.3rem 0.55rem; }
  .tab-nav__counter-number { font-size: 1.1rem; }
  .tab-nav__tabs a { padding: 1rem 0.75rem; font-size: 0.8rem; }
  .tab-nav__brand { font-size: 0.88rem; }
}

/* ── Page hero (dark) ─────────────────────────────────────── */
.page-hero {
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  padding: 3rem 1.5rem 2.75rem;
}
.page-hero__eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  margin: 0 0 0.7rem;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0 0 0.65rem;
  line-height: 1.15;
  color: #fff;
}
.page-hero__subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}
.page-hero__back {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
}
.page-hero__back a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-hero__back a:hover { color: #fff; }

/* ── Hub: card grid ───────────────────────────────────────── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.resource-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.resource-card:hover {
  border-color: var(--brand-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.resource-card--muted {
  background: #f5f5f5;
  border-style: dashed;
  opacity: 0.65;
}
.resource-card--muted:hover { opacity: 0.95; }
.resource-card__icon {
  font-size: 1.85rem;
  margin: 0 0 0.85rem;
  line-height: 1;
}
.resource-card__title {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  margin: 0 0 0.55rem;
  line-height: 1.3;
}
.resource-card__desc {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}
.resource-card__cta {
  color: var(--brand-red);
  font-weight: 700;
  font-size: 0.86rem;
  margin-top: auto;
}
.resource-grid__divider {
  grid-column: 1 / -1;
  border: 0;
  border-top: 1px dashed var(--border);
  margin: 1rem 0 0.5rem;
}
.resource-grid__divider-label {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #999;
  margin: 0;
}
@media (max-width: 900px) {
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .resource-grid { grid-template-columns: 1fr; gap: 1rem; }
  .resource-card { padding: 1.5rem 1.25rem; }
}

/* ── Doc list (category landing pages) ────────────────────── */
.doc-section {
  max-width: 880px;
  margin: 2.5rem auto;
  padding: 0 1.5rem 3rem;
}
.doc-section__intro {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.doc-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.doc-item:last-child { border-bottom: none; }
.doc-item__icon {
  font-size: 1.5rem;
  line-height: 1;
}
.doc-item__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  margin: 0 0 0.4rem;
}
.doc-item__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}
.doc-item__desc code {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}
.doc-item__link {
  background: #fff;
  color: var(--brand-red);
  border: 1px solid var(--brand-red);
  padding: 0.45rem 0.95rem;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  white-space: nowrap;
  align-self: start;
}
.doc-item__link:hover {
  background: var(--brand-red);
  color: #fff;
}
.doc-item__link--unavailable {
  color: #999;
  border-color: #ddd;
  pointer-events: none;
  font-style: italic;
  font-weight: normal;
  background: transparent;
}
@media (max-width: 600px) {
  .doc-item { grid-template-columns: auto 1fr; }
  .doc-item__link { grid-column: 1 / -1; justify-self: start; margin-top: 0.5rem; }
}

/* ── Privacy / staging banner ─────────────────────────────── */
.privacy-warning {
  background: #fff8e1;
  border-left: 4px solid var(--brand-red);
  padding: 1rem 1.25rem;
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
  border-radius: 3px;
  color: var(--text);
}
.privacy-warning strong { color: var(--brand-red); }
.privacy-warning code {
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

/* ─────────────────────────────────────────────────────────────
   Editorial hub — used by /resources.html only.
   Single-column typographic layout with hero, section labels,
   and a featured Coverage block followed by clean lists.
   ───────────────────────────────────────────────────────────── */

.hub-hero {
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
}
.hub-hero__inner {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}
.hub-hero__eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #FFD6A0;
  margin: 0 0 1rem;
}
.hub-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  margin: 0 0 0.6rem;
  line-height: 1.1;
  color: #fff;
}
.hub-hero__subtitle {
  font-size: 1.1rem;
  line-height: 1.55;
  color: #ccc;
  margin: 0 auto;
  max-width: 580px;
  font-style: italic;
}

.hub-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 4rem;
}
.hub-section {
  margin: 0 0 3.25rem;
}
.hub-section:last-of-type { margin-bottom: 0; }
.hub-section__heading {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-red);
  margin: 0 0 1.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

/* ── The Coverage feature (THE BIGGEST CONCERN) ──────────── */
.hub-feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}
.hub-feature__icon {
  font-size: 2.6rem;
  line-height: 1;
  margin-top: 0.35rem;
}
.hub-feature__title {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 0.85rem;
  line-height: 1.15;
}
.hub-feature__title a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.hub-feature__title a:hover { border-bottom-color: var(--brand-red); }
.hub-feature__desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 1.1rem;
}
.hub-feature__desc + .hub-feature__desc { margin-top: -0.4rem; }
.hub-feature__cta {
  color: var(--brand-red);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.98rem;
}
.hub-feature__cta:hover { text-decoration: underline; }

/* ── Lists for other sections ─────────────────────────────── */
.hub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hub-list__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.hub-list__item:last-child { border-bottom: none; }
.hub-list__icon {
  font-size: 1.5rem;
  line-height: 1;
}
.hub-list__title {
  font-family: var(--font-heading);
  font-size: 1.06rem;
  font-weight: 700;
  margin: 0 0 0.18rem;
  line-height: 1.3;
}
.hub-list__title a {
  color: var(--text);
  text-decoration: none;
}
.hub-list__title a:hover { color: var(--brand-red); }
.hub-list__desc {
  font-size: 0.91rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.hub-list__cta {
  color: var(--brand-red);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}
.hub-list__cta:hover { text-decoration: underline; }

.hub-section--staging { opacity: 0.65; }
.hub-section--staging .hub-section__heading { color: #888; }

/* "Coming soon" banner — only rendered when body has .is-prod (set by inline
   script in resources.html based on hostname). On .pages.dev preview the
   resources hub still shows full working links to every category. */
.coming-soon-banner {
  display: none;
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-warm);
  border: 1px dashed var(--border);
  border-radius: 4px;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--text);
}
.is-prod .coming-soon-banner { display: block; }
.is-prod .hub-section--coming-soon .hub-list__title a,
.is-prod .hub-section--coming-soon .hub-list__title a:hover {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
  pointer-events: none;
  cursor: default;
}
.is-prod .hub-section--coming-soon .hub-list__cta { display: none; }
.is-prod .hub-section--staging { display: none; }

@media (max-width: 600px) {
  .hub-feature {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .hub-feature__icon { font-size: 2.2rem; }
  .hub-list__item { grid-template-columns: auto 1fr; }
  .hub-list__cta {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 0.3rem;
  }
}

/* ── Inline visual evidence (image pair + bullets) ─────────── */
.evidence-section {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem 1.5rem 1.25rem;
  margin: 0 0 1.5rem;
}
.evidence-section__heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
  line-height: 1.25;
}
.evidence-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0 0 1.25rem;
}
.evidence-pair figure {
  margin: 0;
}
.evidence-pair img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 3px;
  display: block;
  background: #fff;
}
.evidence-pair figcaption {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0.45rem 0 0;
  font-style: italic;
}
.evidence-bullets {
  margin: 0;
  padding-left: 1.4rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}
.evidence-bullets li {
  margin-bottom: 0.6rem;
}
.evidence-bullets li:last-child {
  margin-bottom: 0;
}
.evidence-pair--single {
  grid-template-columns: minmax(0, 1008px);
  justify-content: center;
}
body.coverage-page .doc-section { max-width: 1230px; }
.evidence-triptych {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin: 0 0 1.25rem;
}
.evidence-triptych figure { margin: 0; }
.evidence-triptych img {
  width: 100%;
  height: 308px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 3px;
  display: block;
  background: #fff;
}
@media (max-width: 720px) {
  .evidence-pair { grid-template-columns: 1fr; }
  .evidence-triptych { grid-template-columns: 1fr; }
  .evidence-triptych img { height: auto; }
}

/* ── Footer ───────────────────────────────────────────────── */
.simple-footer {
  background: var(--bg-warm);
  border-top: 1px solid #ddd;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: #777;
}
.simple-footer a { color: #555; }
