/* ============================================================================
   Provenance — shared design system
   Source of truth: "Graph Glass.dc.html" / "News Glass.dc.html" (light glass spec).
   Tokens, base reset, nav, footer, buttons, form controls, chips, utilities.
   Page-specific layout lives in each page's own <style>; everything shared
   lives here so the four routes stay coherent.
   ========================================================================== */

:root {
  /* ── Surfaces ──────────────────────────────────────────────────────── */
  --pv-bg:        #EDF1F7;   /* page base */
  --pv-bg-2:      #F2F6FB;   /* alternating section */
  --pv-bg-3:      #E7EDF6;   /* deepest gradient stop */
  --pv-surface:   rgba(255,255,255,0.70);   /* cards / inputs */
  --pv-surface-2: rgba(255,255,255,0.82);   /* raised panels */
  --pv-card-top:  rgba(255,255,255,0.80);   /* board-card gradient top */
  --pv-card-bot:  rgba(255,255,255,0.62);   /* board-card gradient bottom */
  --pv-hero-glow: #F7F9FC;   /* hero radial-gradient top stop (shared across pages) */
  --pv-board-glow:#F7F9FC;   /* evidence-board radial top stop */

  /* ── Ink ───────────────────────────────────────────────────────────── */
  --pv-ink:       #1B2430;
  --pv-ink-78:    #2E3949;
  --pv-ink-72:    #414D61;
  --pv-ink-70:    #414D61;
  --pv-ink-65:    #5a6578;
  --pv-ink-62:    #5a6578;
  --pv-ink-60:    #5a6578;
  --pv-ink-55:    #69758a;
  --pv-ink-50:    #69758a;
  --pv-ink-45:    #69758a;
  --pv-ink-40:    #69758a;
  --pv-ink-34:    #9AA6B8;
  --pv-ink-16:    rgba(27,36,48,0.28);
  --pv-ink-10:    rgba(27,36,48,0.09);
  --pv-on-light:  #FFFFFF;   /* text on solid-ink buttons */

  /* ── Accents ───────────────────────────────────────────────────────── */
  --pv-accent:    #4083FF;   /* signature blue */
  --pv-accent-glow: rgba(64,131,255,0.5);
  --pv-gold:      #A5711F;   /* amber, text-grade on light */
  --pv-gold-hi:   #E8A33D;   /* amber, chromatic (dots, fills, borders) */
  --pv-gold-text: #1B2430;
  --pv-green:     #57C893;
  --pv-green-2:   #128566;   /* green, text/stroke-grade on light */
  --pv-blue:      #4083FF;

  /* ── Lines ─────────────────────────────────────────────────────────── */
  --pv-line:      rgba(27,36,48,0.06);   /* section dividers */
  --pv-line-2:    rgba(27,36,48,0.08);   /* inner rules */
  --pv-line-3:    rgba(27,36,48,0.12);   /* card borders / inputs */

  /* ── Type ──────────────────────────────────────────────────────────── */
  --pv-serif: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pv-sans:  'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pv-mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ── Layout ────────────────────────────────────────────────────────── */
  --pv-maxw:  1180px;
  --pv-gutter: 40px;
  --pv-nav-h: 63px;

  --pv-shadow-card: 0 14px 38px rgba(27,36,48,0.07);
  --pv-shadow-panel: 0 24px 60px rgba(27,36,48,0.10);
}

/* ── Reset / base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(165deg, #F7F9FC 0%, #EDF1F7 45%, #E7EDF6 100%) fixed var(--pv-bg);
  color: var(--pv-ink);
  font-family: var(--pv-sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
::selection { background: rgba(64,131,255,0.18); color: #1B2430; }
:focus-visible { outline: 2px solid var(--pv-accent); outline-offset: 2px; }

/* honor reduced-motion for every keyframe/transition we author */
@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;
  }
}

/* ── Keyframes ───────────────────────────────────────────────────────── */
@keyframes provFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes pvPulse {
  0%,100% { box-shadow: 0 0 9px 1px var(--pv-accent-glow); }
  50%     { box-shadow: 0 0 4px 0 rgba(64,131,255,0.35); }
}
@keyframes pvSpin { to { transform: rotate(360deg); } }

/* ── Layout helpers ──────────────────────────────────────────────────── */
.pv-container { max-width: var(--pv-maxw); margin: 0 auto; padding-left: var(--pv-gutter); padding-right: var(--pv-gutter); }
.pv-section { padding: 120px var(--pv-gutter); }
.pv-section--lg { padding: 130px var(--pv-gutter); }
.pv-divider-top { border-top: 1px solid var(--pv-line); }

/* ── Type utilities ──────────────────────────────────────────────────── */
.pv-serif { font-family: var(--pv-serif); font-weight: 600; letter-spacing: -0.02em; }
.pv-mono  { font-family: var(--pv-mono); }
.pv-italic { font-style: italic; }
.pv-accent { color: var(--pv-accent); }
.pv-gold   { color: var(--pv-gold); }

/* Eyebrow / kicker label (mono, tracked, uppercase) */
.pv-eyebrow {
  font-family: var(--pv-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pv-ink-50);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.pv-eyebrow--accent { color: #2A5FD0; }
.pv-eyebrow .pv-livedot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pv-accent);
  box-shadow: 0 0 9px 1px var(--pv-accent-glow);
}

/* Status dot (green "nominal") */
.pv-statusdot { width: 6px; height: 6px; border-radius: 50%; background: var(--pv-green); box-shadow: 0 0 8px var(--pv-green); display: inline-block; }

/* Ticker chip */
.pv-ticker {
  font-family: var(--pv-mono);
  font-size: 11px;
  color: var(--pv-gold);
  border: 1px solid rgba(232,163,61,0.45);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* Generic mono chip (evidence-style) */
.pv-chip {
  font-family: var(--pv-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--pv-ink-50);
  border: 1px solid var(--pv-line-3);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.6);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.pv-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--pv-sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.pv-btn:active { transform: translateY(1px); }
.pv-btn--ink   { background: var(--pv-ink); color: var(--pv-on-light); box-shadow: 0 8px 22px rgba(27,36,48,0.2); }
.pv-btn--ink:hover   { background: #2E3B4E; transform: translateY(-1px); }
.pv-btn--gold  { background: var(--pv-gold-hi); color: #1B2430; }
.pv-btn--gold:hover  { background: #F0B45C; transform: translateY(-1px); }
.pv-btn--ghost { background: rgba(255,255,255,0.75); color: var(--pv-ink); border-color: rgba(27,36,48,0.09); font-weight: 500; }
.pv-btn--ghost:hover { border-color: #4083FF; color: #2A5FD0; background: rgba(255,255,255,0.9); }
.pv-btn--lg { padding: 15px 26px; }
.pv-btn--sm { padding: 10px 17px; font-size: 12.5px; border-radius: 999px; }
.pv-btn--block { width: 100%; justify-content: center; }
.pv-btn[disabled], .pv-btn.is-busy { opacity: 0.6; pointer-events: none; }

/* ── Form controls ───────────────────────────────────────────────────── */
.pv-field { display: flex; flex-direction: column; gap: 8px; }
.pv-label {
  font-family: var(--pv-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pv-ink-50);
}
.pv-input, .pv-textarea {
  background: var(--pv-surface);
  border: 1px solid var(--pv-line-3);
  border-radius: 9px;
  padding: 13px 15px;
  font-size: 14.5px;
  color: var(--pv-ink);
  font-family: inherit;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pv-input::placeholder, .pv-textarea::placeholder { color: var(--pv-ink-34); }
.pv-input:focus, .pv-textarea:focus {
  outline: none;
  border-color: var(--pv-accent);
  box-shadow: 0 0 0 3px rgba(64,131,255,0.16);
}
.pv-textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.pv-input--onpanel { background: var(--pv-bg-2); }
.pv-field.is-error .pv-input, .pv-field.is-error .pv-textarea { border-color: #E14D5A; }
.pv-form-error {
  font-family: var(--pv-mono); font-size: 11.5px; color: #C2374A;
  margin-top: 4px; min-height: 0;
}

/* ============================================================================
   NAV  (injected by provenance.js as <header class="pv-nav">)
   ========================================================================== */
.pv-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 44px;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.pv-nav.is-scrolled {
  background: rgba(247,249,252,0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  border-bottom-color: var(--pv-line);
}
.pv-nav__brand { display: flex; align-items: center; gap: 11px; }
.pv-wordmark { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; color: var(--pv-ink); }
.pv-nav__links { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--pv-ink-55); white-space: nowrap; }
.pv-nav__links a { position: relative; color: inherit; padding: 7px 14px; border-radius: 999px; transition: color .18s ease, background .18s ease, box-shadow .18s ease; }
.pv-nav__links a:hover { color: var(--pv-ink); background: rgba(27,36,48,0.05); }
.pv-nav__links a.is-active {
  color: var(--pv-ink); font-weight: 600;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 2px 8px rgba(27,36,48,0.07);
}
.pv-nav__actions { display: flex; align-items: center; gap: 18px; }
.pv-nav__signin { font-size: 13.5px; color: var(--pv-ink-62); white-space: nowrap; transition: color .18s ease; }
.pv-nav__signin:hover { color: var(--pv-ink); }

/* Burger (mobile only) */
.pv-nav__burger {
  display: none; width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--pv-line-3); align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}
.pv-nav__burger span { width: 16px; height: 1.5px; background: var(--pv-ink); transition: transform .2s ease, opacity .2s ease; }
.pv-nav.is-open .pv-nav__burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.pv-nav.is-open .pv-nav__burger span:nth-child(2) { opacity: 0; }
.pv-nav.is-open .pv-nav__burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile dropdown panel */
.pv-nav__mobile {
  display: none;
  position: fixed; top: var(--pv-nav-h); left: 0; right: 0; z-index: 199;
  background: rgba(247,249,252,0.95);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--pv-line);
  padding: 14px var(--pv-gutter) 22px;
  flex-direction: column; gap: 4px;
}
.pv-nav__mobile.is-open { display: flex; }
.pv-nav__mobile a { padding: 13px 4px; font-size: 16px; color: var(--pv-ink-78); border-bottom: 1px solid var(--pv-line-2); }
.pv-nav__mobile a:last-of-type { border-bottom: none; }
.pv-nav__mobile .pv-btn { margin-top: 14px; }

/* ============================================================================
   FOOTER  (injected by provenance.js as <footer class="pv-footer">)
   ========================================================================== */
.pv-footer { padding: 56px var(--pv-gutter) 44px; background: var(--pv-bg); border-top: 1px solid var(--pv-line); }
.pv-footer__inner { max-width: var(--pv-maxw); margin: 0 auto; }
.pv-footer__top { display: flex; justify-content: space-between; gap: 40px; align-items: flex-start; padding-bottom: 36px; border-bottom: 1px solid var(--pv-line); flex-wrap: wrap; }
.pv-footer__brand { max-width: 32ch; }
.pv-footer__brand .pv-nav__brand { margin-bottom: 16px; }
.pv-footer__tagline { font-size: 13.5px; color: var(--pv-ink-50); line-height: 1.6; }
.pv-footer__cols { display: flex; gap: 60px; }
.pv-footer__col { display: flex; flex-direction: column; gap: 11px; }
.pv-footer__col h4 { font-family: var(--pv-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pv-ink-40); font-weight: 400; margin-bottom: 4px; }
.pv-footer__col a { font-size: 13.5px; color: var(--pv-ink-62); transition: color .18s ease; }
.pv-footer__col a:hover { color: var(--pv-ink); }
.pv-footer__bottom { margin-top: 26px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--pv-mono); font-size: 11px; color: var(--pv-ink-40); }
.pv-footer__status { display: inline-flex; align-items: center; gap: 8px; }
.pv-footer__legal { margin-top: 22px; max-width: 96ch; font-size: 11px; line-height: 1.65; color: var(--pv-ink-45); }

/* ── Toast (auth feedback) ───────────────────────────────────────────── */
.pv-toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.pv-toast {
  font-family: var(--pv-mono); font-size: 12.5px; color: var(--pv-ink);
  background: rgba(255,255,255,0.96); border: 1px solid rgba(27,36,48,0.09);
  border-radius: 10px; padding: 12px 16px; box-shadow: var(--pv-shadow-card);
  display: inline-flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease;
  max-width: min(92vw, 420px);
}
.pv-toast.is-in { opacity: 1; transform: translateY(0); }
.pv-toast--err { border-color: rgba(225,77,90,0.6); }
.pv-toast--ok  { border-color: rgba(87,200,147,0.5); }
.pv-toast__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pv-toast--err .pv-toast__dot { background: #E14D5A; }
.pv-toast--ok  .pv-toast__dot { background: var(--pv-green); }

/* ── Sign-in modal (portal gate) ─────────────────────────────────────── */
.pv-modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(27,36,48,0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.pv-modal.is-open { opacity: 1; visibility: visible; }
.pv-modal__panel {
  width: min(440px, 100%);
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 16px;
  padding: 32px 30px 28px;
  box-shadow: var(--pv-shadow-panel);
  transform: translateY(10px) scale(0.98);
  transition: transform .22s ease;
}
.pv-modal.is-open .pv-modal__panel { transform: translateY(0) scale(1); }
.pv-modal__eyebrow {
  font-family: var(--pv-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--pv-ink-45);
}
.pv-modal__title {
  font-family: var(--pv-serif); font-size: 26px; font-weight: 600;
  margin-top: 8px; letter-spacing: -0.02em;
}
.pv-modal__lede { font-size: 14px; line-height: 1.55; color: var(--pv-ink-55); margin-top: 8px; }
.pv-modal__form { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.pv-modal__foot {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--pv-line-2);
  font-size: 13px; color: var(--pv-ink-50); line-height: 1.5;
}
.pv-modal__foot a { color: var(--pv-ink-78); text-decoration: underline; text-underline-offset: 2px; }
.pv-modal__foot a:hover { color: var(--pv-ink); }
.pv-modal__close {
  position: absolute; top: 18px; right: 18px;
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--pv-line-3); color: var(--pv-ink-62);
  display: grid; place-items: center; font-size: 18px; line-height: 1;
  transition: color .15s ease, border-color .15s ease;
}
.pv-modal__close:hover { color: var(--pv-ink); border-color: var(--pv-ink-34); }
.pv-modal__panel { position: relative; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  :root { --pv-gutter: 22px; }
  .pv-section, .pv-section--lg { padding-top: 90px; padding-bottom: 90px; }
}
@media (max-width: 760px) {
  .pv-footer__top { flex-direction: column; gap: 32px; }
  .pv-footer__cols { gap: 44px; }
}
