/* Shared homepage styling for guides, directories, and tool pages. */
.main-nav > a, .nav-drop > button { color: #fff; font-weight: 600; }
.page-updated { font-size: 13px; color: var(--ink-3); margin-top: 16px; }
:root {
  --surface-border: var(--black);
  --warm-wash: linear-gradient(180deg, #fbf9f5 0%, #f7f3eb 45%, var(--paper-2) 100%);
  --heading-size: clamp(28px, 3vw, 35px);
}

.section.tinted, .page-head, .related-section,
.page-head ~ .section, .reading-section.warm-section {
  background: var(--warm-wash);
}

.section-head h2, .prose h2, .related-section h2, .cta-band h2,
.tool-results h2, .category-collection h2 {
  font-family: var(--serif);
  font-size: var(--heading-size);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.025em;
}
.prose h2 { color: var(--ink); border: 0; padding-bottom: 0; margin-bottom: 20px; }
.prose h3 { font-size: clamp(21px, 2vw, 25px); }
.page-head h1 { font-weight: 600; letter-spacing: -.03em; font-size: clamp(34px, 4.2vw, 52px); }

.reading-section { margin-top: 44px; min-width: 0; }
.reading-section > * + * { margin-top: 1.15em; }
.reading-section > h2:first-child { margin-top: 0; }
.reading-section.warm-section {
  padding: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
}

.tool-card, .cat-card, .article-card, .aside-card, .author-box,
.an-card, .contact-card, .tool-shell, .tool-results, .markdown-preview,
.directory-search, .empty-state, .table-wrap, .table-scroll,
.article-hero-wrap, .spr-item {
  border: 1px solid var(--surface-border);
  box-shadow: none;
}
.callout { border-color: var(--surface-border); box-shadow: none; }
.callout.tip { border-left-color: var(--teal); }
.callout.note { border-left-color: var(--gold); }
.callout.warning { border-left-color: var(--err); }
.table-scroll { border-radius: var(--radius); }
.directory-search:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.filter-btn, .filter-chip, .contact-card input, .contact-card textarea { border-color: var(--surface-border); }
.filter-btn:hover, .filter-chip:hover { border-color: var(--accent); }
.filter-btn.active, .filter-chip.active { background: var(--black); border-color: var(--black); color: #fff; }
.tool-card:hover, .cat-card:hover, .article-card:hover, .an-card:hover {
  border-color: var(--surface-border);
  box-shadow: var(--shadow-sm);
}
.privacy-aside { background: var(--warm-wash); }

html[data-theme=dark] {
  --surface-border: #75818b;
  --warm-wash: linear-gradient(180deg, var(--paper), #292820);
}
html[data-theme=dark] .page-head,
html[data-theme=dark] .section.tinted,
html[data-theme=dark] .related-section { background: var(--warm-wash); }

@media (max-width: 640px) {
  :root { --heading-size: 28px; }
  .reading-section { margin-top: 34px; }
  .reading-section.warm-section { padding: 22px 16px; }
  .article-aside .aside-card { min-width: 0; flex-basis: 100%; }
  .author-box { padding: 20px 16px; gap: 12px; }
}
@media print {
  .reading-section.warm-section, .page-head, .related-section,
  .page-head ~ .section { background: none; }
  .reading-section.warm-section { padding: 0; border: 0; }
  .prose h2 { break-after: avoid; }
}
