/* We Had Our Phil — stylesheet.
 *
 * Tokens and component classes are the Modernist design system, vendored from
 * the Modernist styles.css under design/we had our phil/_ds/ with two changes: Archivo is
 * self-hosted instead of imported from Google Fonts (the CSP allows no third
 * party), and only the components this site uses are kept. Page layout that
 * the design wrote as inline styles lives at the bottom, because the CSP
 * (style-src 'self') forbids inline styles. The record filter rules are
 * generated at build time into filters.css.
 */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);

  --color-neutral-100: #f8f4f4;
  --color-neutral-800: #444141;

  --color-accent-100: #fff2ef;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-accent-800: #7c1405;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-heading-weight: 800;
  --font-body: "Archivo", system-ui, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  --radius-md: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55; font-weight: 400;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h6 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }

.grayscale { filter: grayscale(1) contrast(1.08); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); color: var(--color-bg); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); color: var(--color-text); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
/* Labels stay flush left even when the button is wider than its label. */
.btn-lg { min-width: 200px; justify-content: flex-start; padding: 14px 18px; font-size: 16px; }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent-700); }

/* — segmented control (the record filter) — */
.seg {
  display: inline-flex; flex-wrap: wrap; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { background: var(--color-accent); color: var(--color-bg); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.seg-count { opacity: 0.6; }

/* ══════════════════════════════════════════════════════════════════════════
   Page layout (the design's inline styles, as classes)
   ══════════════════════════════════════════════════════════════════════ */

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.accent { color: var(--color-accent); }
h6.accent { color: var(--color-accent-700); margin: 0; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--color-text); color: var(--color-bg); padding: 8px 12px;
}
.skip-link:focus { left: 0; }

/* — banner + nav — */
.banner { background: var(--color-text); color: var(--color-bg); font-size: 13px; }
.banner-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; }
.banner a { color: var(--color-bg); font-weight: 600; }
.banner a:hover { color: var(--color-bg); text-decoration-thickness: 2px; }

.nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4);
  padding-top: 16px; padding-bottom: 16px;
  border-bottom: 2px solid var(--color-divider);
}
.nav-brand {
  display: flex; align-items: center; gap: 12px; margin-right: auto;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; color: inherit; text-decoration: none;
}
.nav-brand:hover { color: var(--color-accent); }
.brand-mark {
  background: var(--color-accent); color: var(--color-bg);
  padding: 4px 8px; font-size: 14px; letter-spacing: 0.04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-sub {
  font-size: 11px; font-weight: 400; letter-spacing: 0.06em;
  text-transform: uppercase; opacity: 0.6;
}
.nav-links { display: flex; gap: 24px; flex-wrap: wrap; }
.nav-links a { color: inherit; text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: var(--color-accent); }

/* — hero — */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px; padding: 56px 0 48px; border-bottom: 2px solid var(--color-divider);
}
.hero--solo { grid-template-columns: 1fr; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.hero h1 {
  font-size: clamp(56px, 9vw, 120px); line-height: 0.92; letter-spacing: -0.04em;
  margin: 0; text-wrap: balance;
}
.hero-lede { font-size: 20px; line-height: 1.45; max-width: 34ch; margin: 0; text-wrap: pretty; }
.photo { position: relative; aspect-ratio: 4 / 5; background: var(--color-surface); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.photo-todo { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0.5; }

/* — stats — */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  border-bottom: 2px solid var(--color-divider);
}
.stat {
  padding: 28px 24px 28px 0; margin-right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  border-right: 1px solid var(--color-divider);
}
.stat p { margin: 0; font-size: 15px; text-wrap: pretty; }
.stat a { font-size: 12px; }
.stat-value {
  font-family: var(--font-heading); font-weight: 800; font-size: 48px; line-height: 1;
  letter-spacing: -0.03em; color: var(--color-accent);
}

/* — quote + intro — */
.intro {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 40px; padding: 56px 0; border-bottom: 2px solid var(--color-divider);
}
blockquote { margin: 0; padding-top: 16px; border-top: 2px solid var(--color-text); }
blockquote p {
  font-family: var(--font-heading); font-weight: 800; font-size: 40px; line-height: 1.08;
  letter-spacing: -0.03em; margin: 0 0 16px; text-wrap: balance;
}
blockquote footer { font-size: 13px; }
.intro .accent + blockquote { margin-top: 12px; }
.intro-body { display: flex; flex-direction: column; gap: 4px; font-size: 17px; max-width: 62ch; }
.intro-body p { text-wrap: pretty; }

/* — the record — */
.record { padding: 56px 0 24px; }
.record-head {
  display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: flex-end; justify-content: space-between;
  padding-bottom: 24px; border-bottom: 2px solid var(--color-text);
}
.record-head h2 { font-size: 48px; letter-spacing: -0.03em; margin: 0; }

.entry {
  display: flex; flex-wrap: wrap; gap: 16px 32px; padding: 32px 0;
  border-bottom: 1px solid var(--color-divider);
}
.entry-meta { flex: 0 0 140px; display: flex; flex-direction: column; gap: 10px; }
.entry-year { font-family: var(--font-heading); font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -0.02em; }
.entry-topic { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }
.entry-main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.entry-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.entry-head h3 { margin: 0; font-size: 26px; text-wrap: balance; }
.entry-verdict { font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.entry-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  border-top: 2px solid var(--color-divider);
}
.entry-col { padding: 14px 24px 0 0; }
.entry-col--result { padding-right: 0; }
.entry-col p { margin: 0; text-wrap: pretty; }
.entry-col--result p { font-weight: 600; }
.entry-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; margin-bottom: 6px; }
.entry-col--result .entry-label { color: var(--color-accent-700); opacity: 1; }

.sources { font-size: 13px; }
.sources summary { font-weight: 600; display: inline-flex; gap: 6px; list-style: none; }
.sources .plus { color: var(--color-accent-700); }
.sources[open] .plus { display: none; }
.sources ul { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* — closing banner — */
.closing { background: var(--color-accent); color: var(--color-bg); margin-top: 32px; }
.closing-inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 40px; align-items: end; padding-top: 72px; padding-bottom: 72px;
}
.closing h2 { font-size: clamp(56px, 10vw, 140px); line-height: 0.9; letter-spacing: -0.045em; margin: 0; }
.closing-copy { display: flex; flex-direction: column; gap: 16px; max-width: 40ch; }
.closing-copy p { font-size: 20px; line-height: 1.4; margin: 0; }
.closing .btn-lg { min-width: 220px; }
.btn-light { background: var(--color-bg); color: var(--color-text); }
.btn-light:hover { background: var(--color-neutral-100); color: var(--color-text); }
.btn-outline-light { border-color: var(--color-bg); color: var(--color-bg); }
.btn-outline-light:hover { background: color-mix(in srgb, var(--color-bg) 15%, transparent); color: var(--color-bg); }
.closing :focus-visible { outline-color: var(--color-bg); }

/* — footer — */
.site-footer { padding-top: 48px; padding-bottom: 64px; font-size: 14px; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 32px;
}
.footer-disclaimer { grid-column: span 2; min-width: 0; }
.footer-disclaimer h4 { margin: 0 0 8px; }
.footer-disclaimer p { max-width: 60ch; margin: 0; text-wrap: pretty; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links h6 { margin: 0 0 4px; }
.footer-credits { font-size: 12px; margin: 32px 0 0; opacity: 0.7; }
.footer-bottom {
  border-top: 2px solid var(--color-divider); margin-top: 16px; padding-top: 16px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  font-size: 12px; opacity: 0.7;
}

@media (max-width: 600px) {
  .footer-disclaimer { grid-column: auto; }
  .stat { margin-right: 0; border-right: 0; border-bottom: 1px solid var(--color-divider); }
  blockquote p { font-size: 32px; }
  .record-head h2 { font-size: 40px; }
}
