/* Parents’ Retreat 2026 — shared scaffolding.
   Each document page keeps its own typography and artwork; this file only
   carries the chrome that has to be consistent between them (the nav, focus
   states, print rules) and the tokens the themed pages draw on. */

:root {
  /* quiet-modern ground: near-white, near-black, one hairline weight */
  --paper: #fbfbfa;
  --paper-2: #f4f4f2;
  --ink: #0d0d0c;
  --ink-soft: #63625e;
  --ink-faint: #a1a09b;
  --hair: #e4e4e0;
  --accent: #3f7d52;

  --font-sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --chrome-bg: rgba(251, 251, 250, 0.86);
  --chrome-ink: #3d3c39;
  --chrome-hair: #e4e4e0;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  /* breathing room under the last line — the page footer used to provide it */
  --tail: clamp(3.5rem, 12vw, 6rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { max-width: 100%; display: block; }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; padding-bottom: var(--tail); }

/* ---------- Top bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--gutter);
  background: var(--chrome-bg);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--chrome-hair);
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.bar a {
  color: var(--chrome-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.1rem;
  transition: color 0.16s ease;
}
.bar a:hover { color: var(--ink); }

.bar .home {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bar .dl {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--chrome-hair);
  padding: 0.42rem 0.8rem;
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.bar .dl:hover { border-color: var(--ink); }
/* file size on the link — parents open these on mobile data */
.bar .dl .sz { color: var(--ink-faint); }

/* ---------- Accessibility ---------- */
:where(a, button):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 50;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .bar, .no-print { display: none !important; }
  body { background: #fff !important; }
  main { padding: 0 !important; }
  a[href]::after { content: ""; }
  p, li, blockquote { orphans: 3; widows: 3; }
  h1, h2, h3 { break-after: avoid-page; }
}
