/* Public pages: the shared header/footer and the legal / contact pages (base_public.html).
   The landing is landing.css's, the auth cards auth.css's. The old landing classes
   (.land-hero, .land-com, …) went when the landing was ported as authored (2026-10-01):
   nothing wore them. */

/* ---- Shared sticky header: opaque, then .88 + a blur only where the browser can blur ---- */
.pub-header {
  position: sticky;
  top: 0;
  z-index: var(--z-chrome);
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  border-bottom: 1px solid var(--border);
  /* viewport-fit=cover (base.html): the bar runs under the notch, its content does not. */
  padding-top: env(safe-area-inset-top);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .pub-header {
    background: color-mix(in srgb, var(--canvas) 88%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .pub-header { background: var(--canvas); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.pub-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 max(clamp(18px, 4vw, 32px), env(safe-area-inset-right)) 0 max(clamp(18px, 4vw, 32px), env(safe-area-inset-left));
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

/* The lockup itself (mark, wordmark, beta tag) is defined once in components.css under
   .brand-lockup. The bottom margin lifts it so "beta v1.0", which hangs under the
   word, stays inside the bar. */
.pub-brand { flex: none; margin-bottom: 9px; }

/* A quiet link, 44px tall on touch (the text is 14px; the box is the target). */
.pub-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--hit-min);
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  transition: color var(--rz-instant-dur) var(--rz-instant);
}
@media (hover: hover) and (pointer: fine) {
  .pub-back:hover { color: var(--teal-hover); }
}

/* ---- Shared small footer (legal pages) ---- */
.pub-footer {
  border-top: 1px solid var(--border);
  padding: 22px clamp(18px, 4vw, 32px) calc(22px + env(safe-area-inset-bottom));
}
.pub-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.pub-footer-inner > span { font-size: 12.5px; color: var(--text-3); }
.pub-footer-links { display: flex; align-items: center; gap: var(--sp-2) 18px; flex-wrap: wrap; }
.pub-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit-min);
  font-size: 12.5px;
  color: var(--slate);
  transition: color var(--rz-instant-dur) var(--rz-instant);
}
@media (hover: hover) and (pointer: fine) {
  .pub-footer-links a:hover { color: var(--ink-warm); }
}
.pub-footer-links a.is-current { font-weight: 600; color: var(--ink-warm); }

/* The public pages read in the app's ink, not the base one. `base.css` sets the
   document to --ink (#0F2230, a cool navy) while the app's reading surfaces —
   the lesson above all — sit at --ink-warm (#1C1B19): warm near-black on warm
   cream. Everything under here inherits it, headings included (base.css sets
   h1-h3 to `color: inherit`). The secondary greys are deliberately left alone —
   --muted / --slate are already what the lesson subtitle wears. */
.pub-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink-warm);
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

/* ==================== Legal pages (and contact) ==================== */
.legal-main { flex: 1; padding: clamp(48px, 8vh, 80px) clamp(18px, 4vw, 32px) clamp(60px, 9vh, 100px); }

.legal-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 34px; }
.legal-inner--wide { max-width: 920px; gap: 36px; }

.legal-head { display: flex; flex-direction: column; gap: 14px; }
.legal-head h1 { font-size: clamp(34px, 5.5vw, 50px); line-height: 1.1; }
.legal-head .land-lede { max-width: 620px; font-size: 16px; }

/* The lede under a public page's title (contact). */
.land-lede {
  margin: 0;
  font-size: clamp(16px, 1.9vw, 18.5px);
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---- Phone ---- */
@media (max-width: 640px) {
  .pub-header-inner { gap: 12px; }
  .pub-back { font-size: 13px; }
}
