﻿:root {
  --paper: #f6f3ec;
  --paper-2: #efeadd;
  --ink: #14110d;
  --ink-soft: #2a2620;
  --gray: #6b655c;
  --gray-2: #8e8678;
  --rule: #d9d3c5;
  --rule-strong: #b9b1a0;
  --navy: #1a2a47;
  --serif: "Fraunces", "Times New Roman", Times, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
[data-theme="dark"] {
  --paper: #14110d; --paper-2: #1c1814;
  --ink: #f0ece2; --ink-soft: #d8d2c5;
  --gray: #9a9285; --gray-2: #756d62;
  --rule: #2e2a23; --rule-strong: #3d382f;
  --navy: #a8b8d8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--sans); background: var(--paper); color: var(--ink);
  font-size: 16px; line-height: 1.5;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--navy); }
img { display: block; max-width: 100%; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 32px; }

/* ── Topbar ── */
.topbar {
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; color: var(--gray); text-transform: uppercase;
}
.topbar-inner {
  display: flex; justify-content: center; align-items: center;
  height: 36px; gap: 16px;
}

/* ── Masthead ── */
header.masthead {
  background: var(--paper); border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}
.masthead-inner {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 22px 0 18px; gap: 16px;
}
.mast-meta {
  font-family: var(--mono); font-size: 11px; color: var(--gray);
  text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.6;
}
.logo {
  font-family: var(--serif); font-weight: 700; font-size: 52px;
  letter-spacing: -0.025em; text-align: center; line-height: 1;
  font-variation-settings: "opsz" 144;
}
.logo .dot { color: var(--gray-2); font-weight: 400; }

/* ── Primary Nav ── */
nav.primary {
  border-bottom: 1px solid var(--rule); border-top: 1px solid var(--rule);
  background: var(--paper);
}
.primary-inner { display: flex; justify-content: center; gap: 0; }
.primary a {
  display: inline-block; padding: 14px 22px;
  font-family: var(--sans); font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
  color: var(--ink); position: relative; transition: color .2s;
}
.primary a:hover { color: var(--navy); }
.primary a.active::after {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: 0;
  height: 2px; background: var(--ink);
}

/* ── Kicker & section heads ── */
.kicker {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--navy); font-weight: 500;
}
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 2px solid var(--ink);
  padding: 18px 0 22px; margin-top: 56px; margin-bottom: 28px;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: 30px; letter-spacing: -0.015em;
  font-variation-settings: "opsz" 60;
}
.section-head .sub {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray);
}

/* ── Image placeholder ── */
.ph {
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,.03) 14px 15px);
  background-color: var(--paper-2);
  position: relative; overflow: hidden;
}
[data-theme="dark"] .ph {
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.04) 14px 15px);
}
.ph::after {
  content: attr(data-label);
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray);
  text-align: center; padding: 6px 10px;
  border: 1px solid var(--rule-strong); background: var(--paper);
  white-space: nowrap; max-width: 80%;
}
.ph.has-image { background-image: none; }
.ph.has-image::after { display: none; }
.ph.has-image img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* ── Byline ── */
.byline {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray);
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}

/* ── Hero ── */
.hero {
  display: grid; grid-template-columns: 2.1fr 1fr;
  gap: 40px; padding-top: 36px; padding-bottom: 44px;
  border-bottom: 1px solid var(--rule);
}
.hero-main .ph { aspect-ratio: 16/10; margin-bottom: 22px; }
.hero-main .kicker { display: block; margin-bottom: 12px; }
.hero-main h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(38px, 4.2vw, 60px); line-height: 1.04;
  letter-spacing: -0.022em; margin-bottom: 18px;
  text-wrap: pretty; font-variation-settings: "opsz" 144;
}
.hero-main .summary {
  font-size: 17px; line-height: 1.55; color: var(--ink-soft);
  max-width: 62ch; margin-bottom: 18px;
}
.hero-side {
  border-left: 1px solid var(--rule); padding-left: 32px;
  display: flex; flex-direction: column;
}
.hero-side .side-head {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray);
  padding-bottom: 14px; border-bottom: 1px solid var(--ink); margin-bottom: 22px;
}
.side-story { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.side-story:last-child { border-bottom: none; }
.side-story:first-child { padding-top: 0; }
.side-story .kicker { display: block; margin-bottom: 8px; }
.side-story h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 21px; line-height: 1.18;
  letter-spacing: -0.012em; margin-bottom: 10px;
  font-variation-settings: "opsz" 60;
}
.side-story p { font-size: 14px; line-height: 1.5; color: var(--gray); margin-bottom: 10px; }

/* ── Article grids ── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card { display: flex; flex-direction: column; gap: 10px; }
.card .ph { aspect-ratio: 16/9; }
.card .kicker { margin-top: 4px; }
.card h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 18px; line-height: 1.22; letter-spacing: -0.008em;
}
.card p { font-size: 13.5px; color: var(--gray); line-height: 1.5; }

/* ── Sponsor ── */
.sponsor {
  margin: 56px 0 0; border: 1px solid var(--rule);
  background: var(--paper-2); padding: 32px 36px;
  display: grid; grid-template-columns: 100px 1fr auto;
  gap: 28px; align-items: center;
}
.sponsor-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gray); border-right: 1px solid var(--rule-strong);
  padding-right: 24px; line-height: 1.5;
}
.sponsor-body h4 {
  font-family: var(--serif); font-weight: 500;
  font-size: 22px; line-height: 1.2; letter-spacing: -0.012em; margin-bottom: 6px;
}
.sponsor-body p { font-size: 14px; color: var(--gray); line-height: 1.5; }
.sponsor-cta {
  font-family: var(--sans); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  border: 1px solid var(--ink); padding: 12px 22px;
  color: var(--ink); white-space: nowrap;
  transition: background .2s, color .2s;
}
.sponsor-cta:hover { background: var(--ink); color: var(--paper); }

/* ── Footer ── */
footer {
  background: var(--paper); padding: 64px 0 32px;
  margin-top: 80px; border-top: 1px solid var(--rule);
}
.foot-top {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--rule);
}
.foot-brand .flogo {
  font-family: var(--serif); font-weight: 700; font-size: 32px;
  letter-spacing: -0.02em; margin-bottom: 14px;
  font-variation-settings: "opsz" 144;
}
.foot-brand p { font-size: 13px; color: var(--gray); line-height: 1.55; max-width: 36ch; }
.foot-col h5 {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--rule);
}
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 13px; color: var(--ink-soft); }
.foot-bottom {
  margin-top: 28px; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray);
}
.foot-social { display: flex; gap: 14px; }
.foot-social a {
  width: 32px; height: 32px; border: 1px solid var(--rule); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
}
.foot-social svg { width: 13px; height: 13px; }

/* ── Theme toggle ── */
.theme-toggle {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--paper); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.theme-toggle svg { width: 18px; height: 18px; }

/* ── Article page ── */
.article-meta {
  max-width: 760px; margin: 36px auto 0; padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.article-meta .kicker { display: block; margin-bottom: 16px; }
.article-meta h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(32px, 3.8vw, 54px); line-height: 1.06;
  letter-spacing: -0.022em; margin-bottom: 22px;
  text-wrap: pretty; font-variation-settings: "opsz" 144;
}
.article-lede {
  font-size: 19px; line-height: 1.55; color: var(--ink-soft);
  margin-bottom: 20px; font-family: var(--serif);
  font-variation-settings: "opsz" 60;
}
.article-image {
  aspect-ratio: 16/9; margin: 36px auto; max-height: 560px; max-width: 760px;
}
.article-body {
  max-width: 760px; margin: 0 auto;
  font-size: 17.5px; line-height: 1.72; color: var(--ink-soft);
}
.article-body p { margin-bottom: 1.5em; }
.article-body p:first-child::first-letter {
  font-family: var(--serif); font-weight: 700;
  font-size: 4em; line-height: .82; float: left;
  margin: .06em .12em 0 0; color: var(--ink);
  font-variation-settings: "opsz" 144;
}
.article-body blockquote {
  border-left: 3px solid var(--ink); padding-left: 22px;
  margin: 2em 0; font-family: var(--serif);
  font-size: 19px; line-height: 1.5; color: var(--ink);
  font-style: italic; font-variation-settings: "opsz" 60;
}
.article-signature {
  margin-top: 2.5em; padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray);
}

/* ── Pagination ── */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 4px; margin: 48px 0 16px; flex-wrap: wrap;
}
.pag-btn {
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--rule); background: transparent;
  color: var(--gray); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase;
  transition: border-color .15s, color .15s, background .15s;
}
.pag-btn:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.pag-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); cursor: default; }
.pag-btn:disabled { opacity: .3; cursor: default; }
.pag-sep { color: var(--gray-2); font-family: var(--mono); font-size: 11px; padding: 0 6px; line-height: 36px; }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--gray);
  padding: 24px 0 0;
}
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb span { color: var(--gray-2); }

/* ── Related cards ── */
.related-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0 32px;
}
.related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
  color: var(--ink);
  text-decoration: none;
}
.related-card:hover {
  border-color: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  color: var(--ink);
}
.related-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--paper-2);
}
.related-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.related-card-body h3 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-body time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: auto;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .masthead-inner { grid-template-columns: auto 1fr; }
  .mast-meta { display: none; }
  .logo { font-size: 32px; text-align: left; }
  .primary-inner { overflow-x: auto; justify-content: flex-start; }
  .primary a { padding: 12px 14px; font-size: 12px; white-space: nowrap; }
  .hero { grid-template-columns: 1fr; }
  .hero-side { border-left: none; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 24px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .sponsor { grid-template-columns: 1fr; gap: 16px; }
  .sponsor-label { border-right: none; border-bottom: 1px solid var(--rule-strong); padding: 0 0 16px; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .related-cards { grid-template-columns: 1fr; }
}
