/* Yeti theme — mirrors the inline palette in index.html and pipelines/_email_theme.py.
   When the landing palette or fonts change, update here so satellite pages stay in sync. */
:root {
  --bg: oklch(0.17 0.02 250);
  --bg-2: oklch(0.21 0.022 250);
  --bg-3: oklch(0.25 0.022 250);
  --fg: oklch(0.96 0.005 85);
  --fg-dim: oklch(0.72 0.01 250);
  --fg-dimmer: oklch(0.52 0.015 250);
  --accent: oklch(0.82 0.16 165);
  --accent-dim: oklch(0.55 0.12 165);
  --danger: oklch(0.75 0.18 30);
  --line: oklch(0.3 0.015 250);
  --line-soft: oklch(0.24 0.015 250);

  /* Shim aliases — old var names map to new ones so legacy report HTML
     (rendered from _email_theme.py before rebrand) still looks consistent. */
  --bg-page: var(--bg);
  --bg-card: var(--bg-2);
  --bg-elevated: var(--bg-3);
  --bg-subtle: var(--bg-3);
  --ink-primary: var(--fg);
  --ink-body: var(--fg);
  --ink-muted: var(--fg-dim);
  --ink-faint: var(--fg-dimmer);
  --border: var(--line);
  --border-soft: var(--line-soft);
  --accent-ink: var(--accent);
  --accent-wash: color-mix(in oklch, var(--accent) 12%, transparent);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--accent); }
a.link:hover { text-decoration: underline; }

.mono { font-family: 'Geist Mono', ui-monospace, monospace; }
.serif { font-family: 'Instrument Serif', serif; font-weight: 400; }

/* Grain overlay — identical formula to landing */
.grain::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.08;
  mix-blend-mode: overlay;
}

.container { max-width: 1440px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }

/* ---------- NAV ---------- */
nav.site-nav {
  padding: 24px 48px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: flex; align-items: center; gap: 10px; }
.brand-mark .wordmark { font-family: 'Instrument Serif', serif; font-size: 22px; letter-spacing: 0.02em; }
.brand-logo {
  width: 28px; height: 28px; display: block; object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 14px color-mix(in oklch, var(--accent) 45%, transparent));
}
.nav-ver { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--fg-dimmer); letter-spacing: 0.15em; text-transform: uppercase; margin-left: 8px; }
.nav-links { display: flex; gap: 28px; font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.nav-links a:hover { color: var(--fg); }
.nav-cta-wrap { display: flex; align-items: center; gap: 12px; }
@media (max-width: 860px) {
  nav.site-nav { padding: 18px 20px; }
  .nav-links { display: none; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; font-family: 'Geist Mono', monospace;
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; border: none; transition: all 0.2s; background: transparent;
}
.btn-primary { background: var(--accent); color: oklch(0.15 0.03 165); }
.btn-primary:hover { background: oklch(0.88 0.16 165); transform: translate(-1px,-1px); box-shadow: 4px 4px 0 oklch(0.55 0.12 165); }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--fg); background: var(--bg-2); }
.btn-small { padding: 10px 16px; font-size: 11px; }

/* ---------- SECTION / PAGE ---------- */
.page { min-height: calc(100vh - 300px); padding: 120px 0 160px; }
.page-header {
  display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: end;
  border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-bottom: 56px;
}
.eyebrow { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 16px; }
.page-header h1 {
  font-family: 'Instrument Serif', serif; font-size: clamp(48px, 7vw, 96px);
  margin: 0; font-weight: 400; letter-spacing: -0.02em; line-height: 1;
}
.page-header h1 em { font-style: italic; color: var(--accent); }
.page-header .sub { color: var(--fg-dim); margin-top: 16px; font-size: 17px; max-width: 60ch; line-height: 1.55; }
@media (max-width: 860px) { .page-header { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- CHIP / PILL ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--line);
  font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--fg-dim);
  background: color-mix(in oklch, var(--bg-2) 70%, transparent);
  backdrop-filter: blur(6px);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ---------- FORM FRAME (contact / unsubscribe) ---------- */
.frame { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }
@media (max-width: 960px) { .frame { grid-template-columns: 1fr; gap: 48px; } }

.frame-left h2 {
  font-family: 'Instrument Serif', serif; font-size: clamp(40px, 5vw, 68px);
  margin: 0; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05;
}
.frame-left p { color: var(--fg-dim); font-size: 16px; line-height: 1.6; margin-top: 28px; max-width: 46ch; }
.frame-left .mail-card {
  margin-top: 40px; border: 1px solid var(--line); padding: 20px; display: flex; gap: 16px; align-items: center;
}
.frame-left .mail-card .icon {
  width: 44px; height: 44px; border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0;
}
.frame-left .mail-card .label { font-size: 14px; }
.frame-left .mail-card .addr { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--fg-dim); margin-top: 4px; }

/* Signal-style form (same DNA as landing) */
.yform {
  border: 1px solid var(--line); background: var(--bg-2); padding: 32px; position: relative;
}
.yform .bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; border-bottom: 1px solid var(--line); padding-bottom: 14px;
  font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--fg-dimmer); letter-spacing: 0.1em;
}
.yform .bar .live { color: var(--accent); }
.yform .row { margin-bottom: 20px; }
.yform label {
  display: block;
  font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--fg-dimmer);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px;
}
.yform label .arrow { color: var(--accent); margin-right: 4px; }
.yform input, .yform textarea, .yform select {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid var(--line); color: var(--fg);
  font-family: 'Geist Mono', monospace; font-size: 14px;
  padding: 10px 0; outline: none; resize: none;
}
.yform textarea { min-height: 120px; resize: vertical; }
.yform input:focus, .yform textarea:focus, .yform select:focus { border-bottom-color: var(--accent); }
.yform select { appearance: none; color: var(--fg-dim); }
.yform .small { font-size: 12px; color: var(--fg-dimmer); margin: 8px 0 20px; font-family: 'Geist Mono', monospace; }
.yform .actions { display: flex; gap: 12px; margin-top: 24px; }

/* Honeypot — keep offscreen, not display:none so bots that check DOM don't flag */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Notice banners — hidden by default; only shown when JS toggles visibility via inline style. */
.notice {
  padding: 14px 16px; border: 1px solid transparent; margin-bottom: 20px;
  font-family: 'Geist Mono', monospace; font-size: 12px; display: none; letter-spacing: 0.03em;
}
.notice.ok { border-color: var(--accent); color: var(--accent); background: color-mix(in oklch, var(--accent) 6%, transparent); }
.notice.err { border-color: var(--danger); color: var(--danger); background: color-mix(in oklch, var(--danger) 6%, transparent); }

/* ---------- PROSE (privacy page) ---------- */
.prose { max-width: 760px; color: var(--fg); }
.prose h1 {
  font-family: 'Instrument Serif', serif; font-size: clamp(44px, 6vw, 72px);
  margin: 0 0 12px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05;
}
.prose .meta { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--fg-dimmer); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 32px; }
.prose h2 {
  font-family: 'Instrument Serif', serif; font-size: 28px; margin: 44px 0 12px; font-weight: 400; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 14px;
}
.prose h2::before { content: '◆'; color: var(--accent); font-size: 13px; }
.prose p, .prose li { color: var(--fg); font-size: 15.5px; line-height: 1.68; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 22px; margin: 8px 0 16px; }
.prose ul li { margin: 6px 0; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }
.prose .divider { height: 1px; background: var(--line-soft); margin: 36px 0; }
.prose .small { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--fg-dimmer); letter-spacing: 0.05em; }

/* ---------- FOOTER ---------- */
footer.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-grid .blurb { color: var(--fg-dim); font-size: 13px; margin-top: 16px; max-width: 32ch; line-height: 1.6; }
.footer-col .title {
  font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--fg-dimmer);
  letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 16px;
}
.footer-col a { display: block; font-size: 13px; color: var(--fg-dim); padding: 5px 0; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--fg-dimmer); letter-spacing: 0.1em;
}
.footer-bottom .status { display: flex; gap: 16px; }
.footer-bottom .status .on { color: var(--accent); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- WEEKLY REPORT chrome ---------- */
.masthead {
  max-width: 1080px; margin: 0 auto; padding: 72px 24px 36px;
}
.masthead .grid {
  display: flex; align-items: flex-start; gap: 36px; flex-wrap: wrap;
}
.masthead .issue-big {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(64px, 10vw, 112px);
  line-height: 0.95; letter-spacing: -0.02em; color: var(--fg);
  font-weight: 400;
}
.masthead .issue-sub { font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.15em; color: var(--fg-dimmer); text-transform: uppercase; margin-top: 6px; }
.masthead .thesis {
  font-family: 'Instrument Serif', serif; font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.22; letter-spacing: -0.01em; color: var(--fg); max-width: 22ch;
  font-weight: 400; margin: 0 0 18px;
}
.masthead .meta {
  display: flex; gap: 18px; flex-wrap: wrap; font-family: 'Geist Mono', monospace; font-size: 11px;
  color: var(--fg-dimmer); letter-spacing: 0.08em; text-transform: uppercase;
}
.masthead .meta strong { color: var(--fg); font-weight: 600; }
.masthead .divider {
  margin-top: 28px; height: 1px;
  background: linear-gradient(90deg, color-mix(in oklch, var(--accent) 30%, transparent), transparent);
}

.report-foot-section { max-width: 1080px; margin: 56px auto 0; padding: 0 24px; }
.report-foot-section details {
  border: 1px solid var(--line); background: var(--bg-2);
}
.report-foot-section summary {
  padding: 16px 20px; cursor: pointer; color: var(--fg-dim); font-family: 'Geist Mono', monospace;
  font-size: 12px; list-style: none; letter-spacing: 0.05em;
}
.report-foot-section summary .k { color: var(--accent); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; margin-right: 12px; }
.report-foot-section .method-body { padding: 6px 20px 20px; color: var(--fg); font-size: 14px; line-height: 1.6; }
.report-foot-section .sub-cta {
  margin-top: 36px; padding: 32px 28px; border: 1px solid var(--accent-dim);
  background: color-mix(in oklch, var(--accent) 5%, transparent); text-align: center;
}
.report-foot-section .sub-cta .eyebrow { margin-bottom: 10px; }
.report-foot-section .sub-cta .tag {
  font-family: 'Instrument Serif', serif; font-size: 24px; color: var(--fg); margin-bottom: 20px;
}

.report-mini-nav { max-width: 1080px; margin: 40px auto 0; padding: 24px; font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--fg-dim); }
.report-mini-nav a { color: var(--fg-dim); }
.report-mini-nav a:hover { color: var(--fg); }

/* ---------- ARCHIVE PAGES (/r/, /r/{app}/) ---------- */
.issue-card {
  display: block; padding: 22px 24px; border: 1px solid var(--line);
  background: var(--bg-2); text-decoration: none; margin-bottom: 14px;
  transition: all 0.15s;
}
.issue-card:hover { border-color: var(--accent); transform: translate(-1px,-1px); box-shadow: 4px 4px 0 color-mix(in oklch, var(--accent) 50%, transparent); }
.issue-card .top { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.issue-card .handle { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--accent); letter-spacing: 0.15em; text-transform: uppercase; }
.issue-card .title { font-family: 'Instrument Serif', serif; font-size: 22px; color: var(--fg); margin-top: 8px; letter-spacing: -0.01em; }
.issue-card .body { color: var(--fg-dim); font-size: 14.5px; line-height: 1.55; margin-top: 8px; }
.issue-card .meta-line { color: var(--fg-dimmer); font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.05em; margin-top: 10px; }
