@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:wght@500;600;700&display=swap');

:root {
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --ink: #181a1f;
  --ink-soft: #383c44;
  --muted: #6b7280;
  --line: #e8e5df;
  --bg: #faf9f6;
  --card: #ffffff;

  --navy: #0f1b2d;
  --navy-soft: #1c3050;
  --navy-line: rgba(255, 255, 255, 0.14);

  --accent: #a3271f;
  --accent-soft: #7d1f19;
  --accent-bg: #fdecea;
  --accent-line: #f3c9c5;

  --good: #1f7a4d;
  --good-bg: #e9f6ee;
  --good-line: #bfe3cd;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(15, 27, 45, 0.07);
  --shadow-md: 0 8px 24px rgba(15, 27, 45, 0.09);
  --shadow-lg: 0 20px 48px rgba(15, 27, 45, 0.16);

  --link: #1c3050;
  --link-hover: #7d1f19;

  font-size: 16px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f0ede6;
    --ink-soft: #c8c5ba;
    --muted: #a0a8b0;
    --line: #3d3a33;
    --bg: #1a1815;
    --card: #2a2723;

    --navy: #0f1b2d;
    --navy-soft: #1c3050;
    --navy-line: rgba(255, 255, 255, 0.14);

    --accent: #ffaa99;
    --accent-soft: #ffb3a3;
    --accent-bg: #3d2620;
    --accent-line: #6b4033;

    --good: #7dd1a0;
    --good-bg: #1a4d35;
    --good-line: #2d6b4d;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5);

    --link: #8fb4e8;
    --link-hover: #ffaa99;
  }
}

html[data-theme="dark"] {
  --ink: #f0ede6;
  --ink-soft: #c8c5ba;
  --muted: #a0a8b0;
  --line: #3d3a33;
  --bg: #1a1815;
  --card: #2a2723;

  --navy: #0f1b2d;
  --navy-soft: #1c3050;
  --navy-line: rgba(255, 255, 255, 0.14);

  --accent: #ffaa99;
  --accent-soft: #ffb3a3;
  --accent-bg: #3d2620;
  --accent-line: #6b4033;

  --good: #7dd1a0;
  --good-bg: #1a4d35;
  --good-line: #2d6b4d;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5);

  --link: #8fb4e8;
  --link-hover: #ffaa99;
}

html[data-theme="light"] {
  --ink: #181a1f;
  --ink-soft: #383c44;
  --muted: #6b7280;
  --line: #e8e5df;
  --bg: #faf9f6;
  --card: #ffffff;

  --navy: #0f1b2d;
  --navy-soft: #1c3050;
  --navy-line: rgba(255, 255, 255, 0.14);

  --accent: #a3271f;
  --accent-soft: #7d1f19;
  --accent-bg: #fdecea;
  --accent-line: #f3c9c5;

  --good: #1f7a4d;
  --good-bg: #e9f6ee;
  --good-line: #bfe3cd;

  --shadow-sm: 0 1px 3px rgba(15, 27, 45, 0.07);
  --shadow-md: 0 8px 24px rgba(15, 27, 45, 0.09);
  --shadow-lg: 0 20px 48px rgba(15, 27, 45, 0.16);

  --link: #1c3050;
  --link-hover: #7d1f19;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--muted);
  background-color: var(--card);
}

/* Header */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 249, 246, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

html[data-theme="dark"] header.site-header {
  background: rgba(26, 24, 21, 0.95);
}

header.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 12px rgba(15, 27, 45, 0.05);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

nav.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Hero */

.hero {
  background: radial-gradient(120% 160% at 15% 0%, var(--navy-soft) 0%, var(--navy) 60%);
  color: #fff;
  padding: 56px 0 48px;
}

.hero .container > * + * {
  margin-top: 16px;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #f0b8b3;
  margin: 0;
}

.hero h1 {
  font-size: 2.1rem;
  color: #fff;
  margin: 0;
  max-width: 20ch;
}

.hero .lede {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 62ch;
}

/* Sections */

main section {
  margin: 44px 0;
}

h2 {
  font-size: 1.4rem;
  margin: 0 0 4px;
}

.lede {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 65ch;
}

/* Stat cards */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.icon-badge svg {
  width: 20px;
  height: 20px;
}

.icon-badge--accent {
  background: var(--accent-bg);
  color: var(--accent);
}

.icon-badge--navy {
  background: #eef1f6;
  color: #1c3050;
}

.icon-badge--good {
  background: var(--good-bg);
  color: var(--good);
}

/* Dark mode icon badges — all three variants */
@media (prefers-color-scheme: dark) {
  .icon-badge--navy  { background: #1e3a5f; color: #8fb4e8; }
  .icon-badge--accent { background: #3d2620; color: #ffaa99; }
  .icon-badge--good  { background: #1a4d35; color: #7dd1a0; }
}

html[data-theme="dark"] .icon-badge--navy   { background: #1e3a5f; color: #8fb4e8; }
html[data-theme="dark"] .icon-badge--accent { background: #3d2620; color: #ffaa99; }
html[data-theme="dark"] .icon-badge--good   { background: #1a4d35; color: #7dd1a0; }

html[data-theme="light"] .icon-badge--navy   { background: #eef1f6; color: #1c3050; }
html[data-theme="light"] .icon-badge--accent { background: var(--accent-bg); color: var(--accent); }
html[data-theme="light"] .icon-badge--good   { background: var(--good-bg); color: var(--good); }

.stat-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* Card / form */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.field .hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--card);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#email-request,
#admin-email-request {
  max-width: 400px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 3px rgba(28, 48, 80, 0.12);
  background: var(--card);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-field input {
  width: auto;
  margin-top: 4px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-gate {
  text-align: center;
  padding: 6px 0 10px;
}

.auth-copy {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 52ch;
  margin: 0 auto 18px;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.google-btn:hover:not(:disabled) {
  border-color: var(--muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.google-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--navy-soft);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

html[data-theme="dark"] .link-btn {
  color: #ffa366;
}

.link-btn:hover {
  color: var(--accent-soft);
}

html[data-theme="dark"] .link-btn:hover {
  color: #ffb380;
}

button.primary {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button.primary:hover:not(:disabled) {
  background: var(--navy-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.success-box {
  background: var(--good-bg);
  border: 1px solid var(--good-line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--good);
}

.success-box button.primary {
  background: var(--good);
  margin-top: 6px;
}

.success-box button.primary:hover {
  background: #185c3a;
}

/* Status pill */

.status-pill {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  margin: 0 0 18px;
}

.status-pill--pending {
  background: #fff6e0;
  color: #8a6d1a;
  border: 1px solid #f0dfa0;
}

.status-pill--approved {
  background: var(--good-bg);
  color: var(--good);
  border: 1px solid var(--good-line);
}

.status-pill--rejected {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}

/* Posts */

.post-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.post-date {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.post-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.post-body {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Resource / link list */

.link-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.link-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.link-list li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.link-list .icon-badge {
  margin: 0;
  flex: none;
  width: 38px;
  height: 38px;
}

.link-list .icon-badge svg {
  width: 18px;
  height: 18px;
}

.link-list a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.link-list a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
}

.link-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Timeline */

.timeline {
  margin-top: 8px;
}

.timeline .entry {
  display: flex;
  gap: 20px;
  position: relative;
}

.timeline .entry-marker {
  flex: none;
  width: 14px;
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline .entry-marker .line {
  position: absolute;
  top: 20px;
  bottom: -30px;
  width: 2px;
  background: var(--line);
}

.timeline .entry:last-child .entry-marker .line {
  display: none;
}

.timeline .entry-marker .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--navy);
  margin-top: 6px;
  box-shadow: 0 0 0 4px var(--bg);
  position: relative;
  z-index: 1;
}

.timeline .entry-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 30px;
}

.timeline .entry:last-child .entry-body {
  padding-bottom: 0;
}

.timeline .when {
  color: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.timeline .entry h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.timeline .entry p,
.timeline .entry ul {
  margin: 0 0 10px;
}

.timeline .entry p:last-child,
.timeline .entry ul:last-child {
  margin-bottom: 0;
}

/* Sources */

.sources ol {
  padding-left: 20px;
}

.sources li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  word-break: break-word;
}

/* Responsive */

@media (max-width: 640px) {
  .hero {
    padding: 44px 0 36px;
  }
  .hero h1 {
    font-size: 1.65rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card {
    padding: 16px 10px;
  }
  .stat-value {
    font-size: 1.2rem;
  }
  .stat-label {
    font-size: 0.7rem;
  }
  .icon-badge {
    width: 34px;
    height: 34px;
  }
  .icon-badge svg {
    width: 16px;
    height: 16px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  nav.site-nav a {
    margin-left: 0;
    margin-right: 16px;
  }
  .card {
    padding: 20px;
  }
}
