:root {
  --ink: #131313;
  --paper: #f8f3ea;
  --paper-dark: #efe4d4;
  --accent: #b0422f;
  --accent-dark: #7f2b1d;
  --muted: #5a534b;
  --line: #d8cbb8;
  --shadow: rgba(18, 18, 18, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Source Sans 3", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

.background-texture {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at top, rgba(176, 66, 47, 0.08), transparent 45%),
    linear-gradient(135deg, rgba(19, 19, 19, 0.02) 0%, rgba(19, 19, 19, 0.08) 40%, transparent 80%);
  z-index: -1;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(248, 243, 234, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.masthead {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  text-align: center;
}

.brand-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
}

.brand-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  letter-spacing: 0.02em;
  margin: 8px 0 2px;
}

.brand-sub {
  font-family: "Source Serif 4", serif;
  font-size: 1rem;
  color: var(--muted);
}

.utility {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.lang-toggle {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.lang-toggle[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.hero-copy h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin: 12px 0 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--muted);
}

.lede {
  font-size: 1.1rem;
  max-width: 560px;
  color: var(--muted);
}

.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--muted);
}

.hero-card h3 {
  font-family: "Source Serif 4", serif;
  font-size: 1.3rem;
}

.card-foot {
  font-size: 0.85rem;
  color: var(--muted);
}

.section-head {
  display: grid;
  gap: 12px;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
}

.section-head h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
}

.section-head p {
  max-width: 700px;
  color: var(--muted);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.embed {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px;
  min-height: 220px;
}

.embed-placeholder {
  border: 1px dashed var(--line);
  padding: 28px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Source Serif 4", serif;
  color: var(--muted);
}

.media-cta p {
  margin-bottom: 16px;
  color: var(--muted);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.pillars-grid article {
  background: var(--paper-dark);
  padding: 24px;
  border: 1px solid var(--line);
}

.pillars-grid h3 {
  font-family: "Source Serif 4", serif;
  margin-bottom: 8px;
}

.mission {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 28px var(--shadow);
  padding: 32px;
}

.subscribe {
  background: var(--paper-dark);
  border: 1px solid var(--line);
  padding: 32px;
}

.subscribe-form {
  margin-top: 16px;
}

.subscribe-form label {
  font-size: 0.9rem;
  color: var(--muted);
}

.subscribe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 8px;
}

.subscribe-row input {
  flex: 1 1 240px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 1rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.subscribe-actions {
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 10px 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.text-link {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent-dark);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #111;
  color: #f3efe6;
  padding: 32px 24px;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.site-footer a {
  color: #f3efe6;
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: rgba(243, 239, 230, 0.6);
  margin-top: 12px;
}

@media (min-width: 900px) {
  .masthead {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .brand {
    text-align: left;
  }

  .utility {
    justify-content: flex-end;
  }
}

/* ─── ARTICLES SECTION ──────────────────────────────────────────────────────── */

.articles-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.article-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
  box-shadow: 0 12px 32px var(--shadow);
  transform: translateY(-2px);
}

.article-card-inner {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.article-category {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
}

.article-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.article-card-title {
  font-family: "Source Serif 4", serif;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--ink);
}

.article-card-summary {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.article-read-btn {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
}

/* ─── ARTICLE PAGE ──────────────────────────────────────────────────────────── */

/* Narrower column for reading. main keeps its side padding. */
.article-main {
  max-width: 720px;
  padding-top: 32px;
}

.reader-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.reader-close {
  font-size: 0.82rem;
}

.reader-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.reader-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.25;
  margin-bottom: 36px;
  color: var(--ink);
}

.reader-article-body {
  font-family: "Source Serif 4", serif;
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--ink);
}

.reader-article-body h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.reader-article-body p {
  margin-bottom: 1.4rem;
}

.reader-article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.reader-article-body em {
  font-style: italic;
}

.article-source {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem !important;
  color: var(--muted) !important;
  font-family: "Source Sans 3", sans-serif !important;
}

/* ─── COMING SOON SECTION ───────────────────────────────────────────────────── */

.coming-soon-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.teaser-card {
  border: 1px dashed var(--line);
  background: var(--paper-dark);
  position: relative;
  transition: border-color 0.2s ease;
}

.teaser-card:hover {
  border-color: var(--accent);
}

.teaser-inner {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.teaser-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.teaser-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2px 8px;
}

.teaser-title {
  font-family: "Source Serif 4", serif;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--ink);
  opacity: 0.85;
}

.teaser-hook {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
}

.teaser-lock {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.lock-icon {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.5;
}

.lock-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.6;
}

/* ─── BRAND LOGO ────────────────────────────────────────────────────────────── */

.brand-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: #111;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

/* Centered below 900px to match the centered kicker and language buttons */
@media (min-width: 900px) {
  .brand-identity {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-title {
    font-size: 2rem;
  }
}

/* ─── EXPLORE DATA PAGE ─────────────────────────────────────────────────────── */

.brand-home {
  color: inherit;
  text-decoration: none;
}

/* The data page title is a span, not the homepage h1, so it needs the h1 weight set explicitly */
.brand-home .brand-title {
  font-weight: 700;
}

.data-page {
  gap: 40px;
}

.data-page .section-head .text-link {
  justify-self: start;
}

.data-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.2;
}

.data-historical {
  font-size: 0.9rem;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  box-shadow: 0 12px 30px var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.chart-title {
  font-family: "Source Serif 4", serif;
  font-size: 1.4rem;
  line-height: 1.3;
}

.chart-sub {
  font-size: 0.9rem;
  color: var(--muted);
}

.chart-box {
  position: relative;
  height: 340px;
  margin: 12px 0 8px;
}

.chart-meta {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.chart-source strong,
.chart-notes-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink);
}

.chart-notes {
  display: grid;
  gap: 6px;
}

.chart-table summary {
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent-dark);
}

.chart-table-scroll {
  overflow-x: auto;
  margin-top: 10px;
}

.chart-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
  color: var(--ink);
}

.chart-table th,
.chart-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 10px;
  text-align: right;
  white-space: nowrap;
}

.chart-table th:first-child {
  text-align: left;
}

.chart-table thead th {
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 480px) {
  .data-page {
    padding-top: 32px;
  }

  .chart-card {
    padding: 20px 16px;
  }

  .chart-title {
    font-size: 1.2rem;
  }

  .chart-box {
    height: 300px;
  }
}

/* ─── SUBSCRIBE FORM STATUS ─────────────────────────────────────────────────── */

.form-honeypot {
  display: none;
}

.form-status {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 8px;
}

.form-status:empty {
  display: none;
}

.form-status[data-state="ok"] {
  color: var(--ink);
}

.form-status[data-state="error"] {
  color: var(--accent-dark);
}

/* Anchored sections land below the sticky header instead of under it */
section[id] {
  scroll-margin-top: 220px;
}

/* ─── ABOUT PAGE ────────────────────────────────────────────────────────────── */

.about-page {
  gap: 40px;
}

.about-page .section-head .text-link {
  justify-self: start;
}

.about-list {
  display: grid;
  gap: 10px;
  padding-left: 1.2em;
  max-width: 700px;
  color: var(--muted);
}

.about-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
}

.about-email {
  font-weight: 600;
  margin-top: 8px;
  word-break: break-word;
}

/* ─── READER: LISTS AND LINKS IN ARTICLE BODIES ─────────────────────────────── */

.reader-article-body ul {
  margin: 0 0 1.4rem;
  padding-left: 1.4em;
}

.reader-article-body li {
  margin-bottom: 0.7rem;
}

.reader-article-body a {
  color: var(--accent-dark);
}
