/* ═══ Readability + accessibility layer ═══
   Loaded last on every page so it wins the cascade over each page's inline
   styles. Holds the shared fixes from the 2026-11 design review: text size
   and face, contrast, tap targets, phone menu, reduced motion, cookie banner.
   Change shared rules here, not page by page. */

:root {
  /* Inner pages used #4d6b6f (3.4:1 on bg). This passes 4.5:1. */
  --muted: #688b8f;
  --text-face: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ─── Pointer: keep the system cursor; the dot is an addition ─── */
body { cursor: auto; }

/* ─── Reading text: proportional face, 17px ─── */
.hero-desc,
.stmt-text p,
.about-grid p,
.cta p,
.page-sub,
.apply-body,
.legal p, .legal ul, .legal li,
.legal-intro,
.post-body p, .post-body ul, .post-body ol, .post-body li,
.post-cta-body {
  font-family: var(--text-face);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
}

/* ─── Supporting text: 15px ─── */
.svc-desc,
.svcs-head-note,
.camps-head-note,
.about-focus-list li,
.blog-excerpt,
.post-excerpt,
.form-note,
.apply-fineprint,
.contact-block-body,
.f-sub {
  font-family: var(--text-face);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
}

/* ─── Labels, nav, buttons: 11px floor, calmer tracking ─── */
.nav-links a,
.nav-cta a,
.hero-tag,
.hero-tagline-label,
.rail-label,
.sec-label,
.svc-n,
.svc-pill,
.about-focus-label,
.blog-cat,
.post-cat,
.post-category,
.post-meta,
.page-eyebrow,
.page-meta,
.thanks-eyebrow,
.contact-block-head,
.cta-eyebrow,
.f-head,
.f-bottom span,
.filter-btn,
.btn-accent,
.btn-ghost {
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ─── Teal is for things you can click ─── */
.hero-tag,
.sec-label,
.about-focus-label,
.page-eyebrow,
.thanks-eyebrow,
.cta-eyebrow,
.f-head,
.blog-cat,
.post-cat,
.post-category {
  color: var(--text-dim);
}
.stmt-text h2 em,
.about-grid h2 em,
.page-lead em,
.thanks-lead em {
  color: var(--text);
}

/* ─── Tap targets: 44px ─── */
.f-list { gap: 0; }
.f-list a {
  display: inline-block;
  padding: 12px 0;
  font-size: 14px;
}
.filter-btn { min-height: 44px; }

/* ─── Headline hover: no dimming of the other lines ─── */
h1.is-ready:hover .line span { opacity: 1; }

/* ─── Marquees pause for keyboard focus, not just hover ─── */
.strip:focus-within .strip-track,
.camps-marquee:focus-within .marquee-track { animation-play-state: paused; }

/* ─── Intro plays once per browser session (flag set inline in index.html head) ─── */
html.intro-seen #intro { display: none; }
html.intro-seen nav,
html.intro-seen .hero *,
html.intro-seen .hero-rail,
html.intro-seen h1 .line span { animation-delay: 0s !important; }

/* ─── Phone menu ─── */
.nav-toggle { display: none; }

@media (max-width: 768px) {
  .nav-cta a { padding: 13px 16px; font-size: 11px; }
  .nav-logo { flex-shrink: 0; }
  .nav-logo img { height: 36px; max-height: none; width: auto; max-width: none; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    margin-left: auto; margin-right: 8px;
    background: transparent;
    border: 1px solid var(--border2, rgba(255,255,255,0.14));
    color: var(--text);
    cursor: pointer;
  }
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    display: block; position: relative;
    width: 18px; height: 1px; background: currentColor;
  }
  .nav-toggle span::before,
  .nav-toggle span::after { content: ''; position: absolute; left: 0; }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  nav.nav-open .nav-toggle span { background: transparent; }
  nav.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
  nav.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

  nav.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%; left: 0; right: 0;
    padding: 8px 20px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  nav.nav-open .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 13px;
  }

  /* Inner-page headlines fit a phone (contact scrolled sideways at 375px) */
  h1:not(.post-title):not(.hero h1) { font-size: clamp(48px, 14vw, 84px); }
}

/* ─── Reduced motion, every page ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Termly consent banner ───
   Termly hashes its classes per release; the t- prefixed classes are the
   stable hooks. Their rules load after ours, hence !important.
   Accept and Decline keep equal visual weight on purpose. */
#termly-code-snippet-support .t-consentPrompt {
  background: var(--bg2) !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: 'DM Mono', monospace !important;
  color: var(--text-dim) !important;
}
#termly-code-snippet-support .t-consentPrompt,
#termly-code-snippet-support .t-consentPrompt p,
#termly-code-snippet-support .t-consentPrompt div,
#termly-code-snippet-support .t-consentPrompt span {
  font-family: var(--text-face) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}
#termly-code-snippet-support .t-consentPrompt button span { font-size: inherit !important; }
#termly-code-snippet-support .t-consentPrompt a {
  color: var(--accent-hi) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--accent-lo) !important;
}
#termly-code-snippet-support .t-consentPrompt a:hover {
  border-bottom-color: var(--accent) !important;
}
#termly-code-snippet-support .t-preference-button,
#termly-code-snippet-support .t-declineButton,
#termly-code-snippet-support .t-acceptAllButton {
  background: transparent !important;
  border: 1px solid var(--border2) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font-family: 'DM Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 14px 26px !important;
  min-width: 132px !important;
  min-height: 44px !important;
  transition: border-color .2s, color .2s !important;
}
#termly-code-snippet-support .t-preference-button {
  color: var(--muted) !important;
}
#termly-code-snippet-support .t-preference-button:hover,
#termly-code-snippet-support .t-declineButton:hover,
#termly-code-snippet-support .t-acceptAllButton:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
#termly-code-snippet-support .t-preference-button:focus-visible,
#termly-code-snippet-support .t-declineButton:focus-visible,
#termly-code-snippet-support .t-acceptAllButton:focus-visible {
  outline: 2px solid var(--accent-hi) !important;
  outline-offset: 3px !important;
}

@media (max-width: 768px) {
  #termly-code-snippet-support .t-consentPrompt p,
  #termly-code-snippet-support .t-consentPrompt div,
  #termly-code-snippet-support .t-consentPrompt span { font-size: 13px !important; }
}

/* ─── Footer: compact ─── */
footer { padding-top: 56px; padding-bottom: 40px; }
.f-list { gap: 0; }
.f-list a { padding: 6px 0; }
@media (max-width: 768px) {
  footer { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; padding: 44px 20px 28px; }
  footer > div:first-child { grid-column: 1 / -1; }
  .f-list a { padding: 10px 0; font-size: 14px; }
  .f-bottom { padding-top: 16px; padding-bottom: 20px; }
}
