/* ==========================================================
   pages.css — navigation, footer links, and content pages
   (guides, about, contact, privacy, terms). Loaded after
   styles.css and reuses its color tokens.
   ========================================================== */

/* ---------- top bar: brand link + nav ---------- */
a.brand { color: var(--ink); text-decoration: none; }
.topbar-nav { display: flex; align-items: center; gap: 4px; }
.topbar-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.86rem; font-weight: 600;
  padding: 7px 10px; border-radius: 999px;
}
.topbar-nav a:hover { color: var(--ink); background: var(--bg-sunken); }
.topbar-nav a[aria-current="page"] { color: var(--ink); background: var(--teal-tint); }
@media (max-width: 560px) {
  .topbar-cta { display: none; }
  .topbar-nav a { padding: 7px 8px; font-size: 0.82rem; }
}
/* the tagline gets squeezed once the nav is present; show it only on wide screens */
.topbar-tag { display: none; }
@media (min-width: 1040px) { .topbar-tag { display: block; } }

/* ---------- footer ---------- */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink-soft); font-size: 0.82rem; text-decoration: none; }
.footer-links a:hover { color: var(--teal-dark); text-decoration: underline; }
.footer-bottom { width: 100%; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }

/* ---------- guide cards (homepage + guides index) ---------- */
.guide-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .guide-grid { grid-template-columns: repeat(3, 1fr); } }
.guide-card {
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
  color: inherit; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease;
}
.guide-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.guide-card h3 { font-size: 1.02rem; color: var(--ink); }
.guide-card p { font-size: 0.87rem; }
.guide-card .case-tag { color: var(--teal-dark); }
.guide-card .read-more { margin-top: auto; font-size: 0.84rem; font-weight: 650; color: var(--teal-dark); }
.section-more { margin-top: 22px; }
a.btn { text-decoration: none; }

/* ---------- article / content pages ---------- */
.page { padding-block: 40px 24px; }
.crumbs { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); margin-bottom: 18px; }
.crumbs a { color: var(--ink-faint); text-decoration: none; }
.crumbs a:hover { color: var(--teal-dark); }
.page-head { max-width: 760px; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.page-lede { margin-top: 14px; font-size: 1.1rem; }
.page-meta { margin-top: 14px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); }

.prose { max-width: 740px; }
.prose > * + * { margin-top: 1.05em; }
.prose p, .prose li { font-size: 1.02rem; line-height: 1.72; color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.prose h2 { font-size: clamp(1.3rem, 2.6vw, 1.65rem); margin-top: 2em; }
.prose h3 { font-size: 1.12rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 650; background: var(--bg-sunken); }
.callout {
  background: var(--teal-tint); border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent);
  border-radius: var(--radius); padding: 16px 18px;
}
.callout p { color: var(--ink); font-size: 0.95rem; }
.callout.warn { background: var(--coral-tint); border-color: color-mix(in srgb, var(--coral) 35%, transparent); }
.cta-box {
  margin-top: 2.2em; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
}
.cta-box p { color: var(--ink); font-weight: 600; margin: 0; }
.cta-box .btn { text-decoration: none; }
.related { max-width: 740px; margin-top: 40px; }
.related h2 { font-size: 1.15rem; margin-bottom: 14px; }
.related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.related a { font-weight: 600; text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* contact */
.contact-card {
  max-width: 740px; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.contact-card .contact-email { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600; word-break: break-all; }
