/* Self-hosted fonts — latin + latin-ext only */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('/fonts/playfair-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('/fonts/playfair-normal-latin.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700 900;
  font-display: swap;
  src: url('/fonts/playfair-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700 900;
  font-display: swap;
  src: url('/fonts/playfair-italic-latin.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/spacemono-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/spacemono-normal-latin.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Space Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/spacemono-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/spacemono-italic-latin.woff2') format('woff2');
  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;
}

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

.skip-link { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { position:fixed; left:1rem; top:1rem; width:auto; height:auto; padding:.5rem 1rem; background:var(--ink); color:#fff; font-size:.9rem; z-index:9999; border-radius:2px; text-decoration:none; }

:root {
  --ink: #111;
  --paper: #f5f2eb;
  --rule: #111;
  --muted: #777;
  --accent: #c8392b;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  padding: 0 0 6rem;
  overflow-x: hidden;
}

/* ── MASTHEAD ── */
.masthead {
  border-bottom: 3px solid var(--ink);
  padding: 1.2rem 2rem .8rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

a.masthead-brand {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}

a.masthead-brand span { color: var(--accent); }

.masthead-meta {
  font-family: 'Space Mono', monospace;
  font-size: .65rem;
  color: var(--muted);
  text-align: right;
  line-height: 1.6;
}

/* ── LANG STRIP ── */
.lang-strip {
  border-bottom: 1px solid var(--ink);
  padding: .4rem 2rem;
  display: flex;
  gap: 0;
}

a.lang-btn {
  background: none;
  border: none;
  font-family: 'Space Mono', monospace;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--muted);
  padding: 0 .8rem 0 0;
  text-decoration: none;
  transition: color .15s;
}

a.lang-btn.active { color: var(--ink); font-style: italic; }
a.lang-btn:hover { color: var(--ink); }

/* ── LAYOUT ── */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HEADLINE ── */
.headline-block {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--ink);
}

.kicker {
  font-family: 'Space Mono', monospace;
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}

.headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.03em;
}

.headline em {
  font-style: italic;
  color: var(--accent);
}

.subhead {
  font-size: .9rem;
  color: var(--muted);
  margin-top: 1rem;
  font-weight: 300;
  max-width: 420px;
  line-height: 1.6;
}

/* ── FORM GRID ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--ink);
}

.form-col {
  padding: 2rem 0;
}

.form-col:first-child {
  padding-right: 2.5rem;
  border-right: 1px solid var(--ink);
}

.form-col:last-child {
  padding-left: 2.5rem;
}

.field-label {
  font-family: 'Space Mono', monospace;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}

.date-row {
  display: flex;
  align-items: baseline;
  gap: .5rem;
}

.date-row span {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #ccc;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid var(--ink);
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  width: 3.2ch;
  padding: .1rem 0 .2rem;
  text-align: center;
  transition: border-color .15s;
  outline: none;
}

input[type="number"]:focus { border-color: var(--accent); }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type="number"]#year,
input[type="number"]#y1,
input[type="number"]#y2,
input[type="number"]#rYear { width: 5ch; }
input[type="number"]::placeholder { color: #ccc; }

/* select (date-calculator op row) */
select {
  background: none;
  border: none;
  border-bottom: 2px solid var(--ink);
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  padding: .1rem .2rem .2rem;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

select:focus { border-color: var(--accent); }

.op-row {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  flex-wrap: wrap;
}

#opAmount {
  width: 4ch;
}

/* Ref toggle */
.ref-toggle-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.4rem;
  font-size: .8rem;
  color: var(--muted);
  cursor: pointer;
}

.ref-toggle-row input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px; height: 14px;
  cursor: pointer;
}

.ref-fields { margin-top: 1.2rem; display: none; }
.ref-fields.show { display: block; }

/* Button */
.calc-btn {
  margin-top: 1.6rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .75rem 2rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.calc-btn:hover { background: var(--accent); }

/* Tip column */
.tip-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.example-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.example-list li {
  font-size: .8rem;
  color: var(--muted);
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  line-height: 1.4;
  cursor: pointer;
  transition: color .15s;
}

.example-list li:hover { color: var(--ink); }

/* Auto-info column (week-number, what-day, christmas) */
.auto-info {
  padding: 1.5rem 0;
}

.auto-info p {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ── RESULTS ── */
.results-section {
  display: none;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--ink);
  animation: fadeIn .4s ease;
}

.results-section.show,
.results-section.auto-show { display: block; }

.results-header {
  font-family: 'Space Mono', monospace;
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.age-display {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.age-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--ink);
}

.age-suffix {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-style: italic;
  color: var(--muted);
  padding-bottom: .5rem;
}

/* Live precise age / countdown */
.precise-age {
  font-family: 'Space Mono', monospace;
  font-size: clamp(.75rem, 2vw, 1rem);
  color: var(--muted);
  margin: -.8rem 0 1.8rem;
  letter-spacing: .04em;
  min-height: 1.4em;
}

/* Result date display (date-calc) */
.result-date {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.result-date-sub {
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-bottom: 2rem;
}

.stats-strip.cols-3 { grid-template-columns: repeat(3, 1fr); }

.stat-item {
  padding: 1.2rem 0;
  border-right: 1px solid var(--ink);
}

.stat-item:last-child { border-right: none; }
.stat-item:not(:first-child) { padding-left: 1.2rem; }

.stat-num {
  font-family: 'Space Mono', monospace;
  font-size: clamp(.95rem, 2.5vw, 1.25rem);
  color: var(--ink);
  line-height: 1;
}

.stat-lbl {
  font-size: .7rem;
  color: var(--muted);
  margin-top: .3rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Fun facts row */
.facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid #ddd;
}

.fact-item {
  flex: 1 1 auto;
  min-width: 160px;
  padding: 1rem 1.2rem 1rem 0;
  border-right: 1px solid #ddd;
  margin-right: -1px;
}

.fact-item:last-child { border-right: none; }

.fact-key {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .25rem;
}

.fact-val {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

/* Birthday / info banner */
.bday-banner {
  margin-top: 1.5rem;
  border-left: 3px solid var(--accent);
  padding: .6rem 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink);
}

/* Error */
.error-line {
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  color: var(--accent);
  margin-top: 1rem;
  display: none;
}
.error-line.show { display: block; }

/* ── TOOL NAV ── */
.tool-nav {
  padding: 1.4rem 0 1rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.nav-group {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  align-items: start;
}

.nav-cat {
  font-family: 'Space Mono', monospace;
  font-size: .58rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding: .25rem .9rem 0 0;
  border-right: 1px solid #d5d1c8;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .1rem;
  padding-left: .6rem;
}

.nav-links a {
  font-size: .82rem;
  text-decoration: none;
  color: var(--ink);
  padding: .18rem .5rem;
  border-radius: 2px;
  transition: background .12s, color .12s;
  white-space: nowrap;
}

.nav-links a:hover { background: var(--ink); color: var(--paper); }
.nav-links a[aria-current="page"] { background: var(--accent); color: #fff; font-weight: 500; }

.nav-sep {
  color: #c8c4bb;
  font-size: .72rem;
  user-select: none;
  padding: 0 .05rem;
}

@media (max-width: 520px) {
  .nav-group { grid-template-columns: 1fr; }
  .nav-cat { text-align: left; border-right: none; border-bottom: 1px solid #d5d1c8; padding: 0 0 .2rem; margin-bottom: .2rem; }
  .nav-links { padding-left: 0; }
}

/* ── WORLD WHEN BORN ── */
.world-when {
  margin: 2rem 0 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 1.6rem 0 1.2rem;
}

.world-when-title {
  font-family: 'Space Mono', monospace;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.4rem;
}

.world-row {
  display: grid;
  grid-template-columns: 2rem 4.5rem 1fr;
  align-items: baseline;
  gap: .2rem .5rem;
  margin-bottom: .75rem;
  line-height: 1.5;
}

.world-icon { text-align: center; font-size: 1rem; }

.world-lbl {
  font-family: 'Space Mono', monospace;
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .15rem;
}

.world-val {
  font-family: 'Playfair Display', serif;
  font-size: .95rem;
  color: var(--ink);
}

/* Events row: rendered as a vertical list (one event per line) when there
   are many entries. Without this the row was a 5000-char wall of text. */
.world-events-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--ink);
}
.world-events-list li {
  position: relative;
  padding: .35rem 0 .4rem 1rem;
  border-bottom: 1px dotted #d4cabb;
}
.world-events-list li:last-child { border-bottom: none; }
.world-events-list li::before {
  content: '·';
  position: absolute;
  left: .15rem;
  top: .25rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
}

/* "Ver más eventos del año" toggle — keeps the highlights tight by default
   while the full chronicle stays in the HTML for SEO and curious readers. */
.world-events-more {
  margin-top: .9rem;
  border-top: 1px dotted #d4cabb;
  padding-top: .7rem;
}
.world-events-more > summary {
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: .25rem 0;
  list-style: none;
  user-select: none;
  transition: color .15s;
}
.world-events-more > summary::-webkit-details-marker { display: none; }
.world-events-more > summary::before {
  content: '+';
  display: inline-block;
  margin-right: .5em;
  font-weight: 700;
}
.world-events-more[open] > summary::before { content: '−'; }
.world-events-more > summary:hover { color: #1a1410; }
.world-events-more[open] > .world-events-list { margin-top: .5rem; }

@media (max-width: 480px) {
  .world-row { grid-template-columns: 1.6rem 3.8rem 1fr; }
  .world-val { font-size: .88rem; }
  .world-events-list { font-size: .82rem; }
  .world-events-list li { padding: .3rem 0 .35rem .85rem; }
}

/* ── SEO BLOCK ── */
.seo-block {
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  border-bottom: 1px solid var(--ink);
}

.seo-block h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .75rem;
  line-height: 1.2;
}

.seo-block p {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.75;
}

/* Per-year ES editorial features — continues the Gazette aesthetic
   from the headline block. Each section reads as a column in a
   newspaper, not a UI chrome block. */
.np-feature-wrap {
  margin: 2.5rem 0 1rem;
}
.np-feature-banner {
  text-align: center;
  margin: 0 0 2rem;
}
.np-feature-banner-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .25rem 0;
  color: var(--ink, #111);
}
.np-feature {
  margin: 0 0 2.5rem;
  padding: 0;
}
.np-feature-kicker {
  font-family: 'Space Mono', monospace;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .35rem;
}
.np-feature-h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 .5rem;
  color: var(--ink, #111);
}
.np-feature-rule {
  border-top: 1px solid #ccc;
  width: 60px;
  margin: 0 0 1.1rem;
}
.np-feature-lead {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #1a1a1a;
  margin: 0 0 1.2rem;
}
.np-dropcap {
  float: left;
  font-family: 'Playfair Display', serif;
  font-size: 3.4rem;
  line-height: .85;
  font-weight: 900;
  margin: .15rem .5rem -.1rem 0;
  color: var(--accent);
}
.np-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  column-count: 2;
  column-gap: 2.2rem;
}
.np-feature-list li {
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  line-height: 1.7;
  color: #222;
  margin: 0 0 .9rem;
  padding-left: .9rem;
  border-left: 2px solid var(--accent);
  break-inside: avoid;
}
.np-feature-list li strong { color: #111; font-weight: 700; }
.np-feature-list li em { font-style: italic; }
.np-feature-body {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #1a1a1a;
  margin: 0 0 1rem;
}
.np-feature-signoff {
  font-family: 'Space Mono', monospace;
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1rem;
  text-align: right;
}
@media (max-width: 720px) {
  .np-feature-list { column-count: 1; }
  .np-feature-h2 { font-size: 1.4rem; }
  .np-dropcap { font-size: 2.8rem; }
}

/* FAQ */
.faq-block {
  padding: 2rem 0;
  border-bottom: 1px solid var(--ink);
}

.faq-block h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.faq-item {
  border-top: 1px solid #ddd;
  padding: 1rem 0;
}

.faq-item h3 {
  font-family: 'Space Mono', monospace;
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .05em;
  margin-bottom: .5rem;
  color: var(--ink);
}

.faq-item p {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ── SOURCE BLOCK ── */
.source-block {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .6rem 0 1rem;
  border-top: 1px solid #ddd;
}

.source-lbl {
  font-family: 'Space Mono', monospace;
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.source-block a {
  font-size: .8rem;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: #ccc;
  transition: color .15s;
}

.source-block a:hover { color: var(--accent); }

/* ── TOOL CATALOG (homepage) ── */
.tool-catalog {
  padding: 2rem 0;
  border-bottom: 1px solid var(--ink);
}

.tool-category {
  margin-bottom: 2rem;
}

.tool-category:last-child {
  margin-bottom: 0;
}

.tool-cat-label {
  font-family: 'Space Mono', monospace;
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .8rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid #ddd;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .8rem 1rem;
  border: 1px solid #ddd;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, background .15s;
  background: transparent;
}

.tool-card:hover {
  border-color: var(--ink);
  background: #fff;
}

.tool-card-name {
  font-family: 'Playfair Display', serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.tool-card-desc {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 300;
}

@media (max-width: 640px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .tool-grid { grid-template-columns: 1fr; }
}

/* ── FOOTER ── */
footer {
  padding: 2.5rem 0 0;
  font-family: 'Space Mono', monospace;
  font-size: .6rem;
  color: var(--muted);
  letter-spacing: .05em;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-bottom: 1.8rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}
.footer-col strong {
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .5rem;
}
.footer-col a {
  display: block;
  font-size: .72rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.7;
}
.footer-col a:hover { text-decoration: underline; }
.footer-copy {
  font-size: .6rem;
  color: var(--muted);
  padding-bottom: 1rem;
}
.footer-copy a { color: inherit; text-decoration: underline; }

/* ── NEWSPAPER FRONT PAGE (born-in pages) ── */
.np-front {
  padding-bottom: 0;
  text-align: center;
}

.np-gazette-hdr {
  margin-bottom: 1rem;
}

.np-rule-top {
  border-top: 4px solid var(--ink);
  margin-bottom: .45rem;
}

.np-gazette-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 4.5vw, 2.2rem);
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .1rem 0;
}

.np-rule-double {
  border-top: 3px double var(--ink);
  margin: .35rem 0;
}

.np-edition {
  font-family: 'Space Mono', monospace;
  font-size: .58rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .25rem 0;
}

.np-gazette-hdr {
  position: relative;
}

.np-nav-link {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Space Mono', monospace;
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  opacity: .55;
  transition: opacity .2s;
  white-space: nowrap;
}

.np-nav-prev { left: 0; }
.np-nav-next { right: 0; }
.np-nav-link:hover { opacity: 1; }

.np-rule-bottom {
  border-top: 1px solid var(--ink);
  margin-top: 0;
}

.np-front .kicker {
  margin: .8rem 0 .2rem;
}

.np-front .headline {
  font-size: clamp(2rem, 9vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: .2rem 0 1.2rem;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  width: 100%;
}

.np-front .subhead {
  font-style: italic;
  max-width: 50ch;
  margin: .5rem auto 1rem;
}

/* Year photo — newspaper front page */
.np-photo-wrap {
  margin: 0 0 1.2rem;
  width: 100%;
}

.np-photo-frame {
  position: relative;
  overflow: hidden;
}

/* Halftone ink overlay — newspaper print effect (image only, not caption) */
.np-photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,.35) 1px, transparent 1px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity .4s ease;
}

.np-photo-frame:hover::after {
  opacity: 0;
}

.np-photo {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--ink);
  filter: grayscale(1) contrast(1.05) brightness(1.05);
  transition: filter .4s ease;
}

.np-photo-frame:hover .np-photo {
  filter: grayscale(0) contrast(1) brightness(1);
}

.np-photo-caption {
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  line-height: 1.5;
  color: #5a4e3f;
  padding: .5rem .1rem .55rem;
  letter-spacing: .015em;
  border-bottom: 1px dotted #c5b9a3;
}

.np-photo-caption .np-photo-yr {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--accent);
  font-size: .88rem;
  margin-right: .15em;
}


/* Two-column layout: age left, world events right */
.np-results {
  padding: 0;
  border-bottom: 1px solid var(--ink);
}

.np-two-col {
  display: grid;
  grid-template-columns: 1fr 2fr;
}

.np-age-col {
  padding: 2rem 1.5rem 2rem 0;
  border-right: 1px solid var(--ink);
}

.np-age-col .age-display {
  flex-direction: column;
  gap: .2rem;
  align-items: flex-start;
}

.np-age-col .hero-or {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: .18em;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 2.5;
}

.np-world-col {
  padding: 2rem 0 2rem 1.5rem;
}

.np-world-col .world-when {
  border: none;
  margin: 0;
  padding: 0;
}

.np-world-col .world-when-title {
  text-align: left;
  margin-bottom: 1.2rem;
  font-size: .65rem;
  letter-spacing: .22em;
}

/* Column rules between world-rows — newspaper style */
.np-world-col .world-row {
  padding-bottom: .6rem;
  margin-bottom: .6rem;
  border-bottom: 1px solid rgba(0,0,0,.12);
}

.np-world-col .world-row:last-child {
  border-bottom: none;
}

@media (max-width: 620px) {
  .np-two-col {
    grid-template-columns: 1fr;
  }
  .np-age-col {
    border-right: none;
    border-bottom: 1px solid var(--ink);
    padding: 1.5rem 0;
  }
  .np-world-col {
    padding: 1.5rem 0;
  }
  .np-front .headline {
    font-size: clamp(1.8rem, 9vw, 4rem);
  }
}

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .masthead { padding: 1rem; }
  .page { padding: 0 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-col:first-child { border-right: none; padding-right: 0; border-bottom: 1px solid var(--ink); }
  .form-col:last-child { padding-left: 0; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-right: 1px solid var(--ink); }
  .seo-block { grid-template-columns: 1fr; gap: 1.5rem; }
  input[type="number"] { font-size: 1.5rem; }
  .nav-links { display: flex; flex-wrap: wrap; gap: .3rem; padding-left: 0; }
  .nav-links a { white-space: normal; }
  .nav-sep { display: none; }
  .lang-strip { flex-wrap: wrap; }
  .fact-item { min-width: 120px; }
  .world-row { grid-template-columns: 1.4rem 3.5rem 1fr; font-size: .85rem; }
}

/* ── ARTICLE LAYOUT ─────────────────────────────────────── */
.article-main { max-width: 740px; margin: 0 auto; padding: 0 1rem 3rem; }
.article-intro { font-size: 1.1rem; color: #555; margin: .5rem 0 2rem; line-height: 1.6; }
.article-main h2 { font-size: 1.4rem; margin: 2rem 0 .6rem; color: #1a1a1a; }
.article-body { line-height: 1.75; color: #333; }
.article-body p { margin: 0 0 1rem; }
.article-body ol, .article-body ul { margin: 0 0 1rem 1.5rem; line-height: 1.75; }
.article-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.article-table-wrap table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.article-table-wrap th { background: #f5f0eb; padding: .5rem .8rem; text-align: left; border-bottom: 2px solid #ddd; }
.article-table-wrap td { padding: .45rem .8rem; border-bottom: 1px solid #eee; }
.article-faq { margin-top: 2.5rem; }
.article-faq h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.article-faq details { border-bottom: 1px solid #eee; padding: .7rem 0; }
.article-faq summary { cursor: pointer; font-weight: 600; font-size: 1rem; list-style: none; }
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq details p { margin: .5rem 0 0; color: #444; line-height: 1.7; }
.article-related { margin: 2rem 0 1rem; font-size: .9rem; color: #666; }
.article-related a { color: #c8392b; text-decoration: none; }
.article-related a:hover { text-decoration: underline; }
.article-cta { margin: 2rem 0; }
.cta-btn { display: inline-block; background: #c8392b; color: #fff; padding: .7rem 1.4rem; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 1rem; }
.cta-btn:hover { background: #a93226; }

.related-articles {
  margin: 2rem 0 1rem;
  padding: 1.25rem 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #2563eb;
}
.related-articles-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 0 0 0.75rem;
}
.related-articles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.related-articles-list a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9rem;
}
.related-articles-list a:hover {
  text-decoration: underline;
}

/* Browse-by-year section (homepage) + hub-page decade/year grids.
   Moved out of build.js HUB_CSS so the homepage browse cards style correctly
   too (they used to fall back to unstyled UL because HUB_CSS was only injected
   on hub pages). */
.browse-by-year { margin: 2.2rem 0 1.5rem; }
.browse-by-year h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: .9rem;
  color: #1a1410;
}
.browse-by-year-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}
.browse-by-year-list a {
  display: block;
  padding: 1.1rem 1.25rem;
  border: 1px solid #d4cabb;
  background: #fdfbf6;
  text-decoration: none;
  color: #1a1410;
  transition: border-color .15s ease, background .15s ease;
}
.browse-by-year-list a:hover {
  border-color: var(--accent);
  background: #fbf7ed;
}
.browse-by-year-list strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: .35rem;
  color: #1a1410;
}
.browse-by-year-list span {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: .78rem;
  color: #6b5e4d;
  letter-spacing: .015em;
}
@media (max-width: 600px) {
  .browse-by-year-list { grid-template-columns: 1fr; gap: .7rem; }
  .browse-by-year-list a { padding: .9rem 1rem; }
}

.hub-decades { display: flex; flex-direction: column; gap: 1.4rem; margin: .8rem 0; }
.hub-decade-row {
  display: flex; flex-direction: column; gap: .4rem;
  border-top: 1px solid #d4cabb; padding-top: .8rem;
}
.hub-decade-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 600; color: #1a1410;
}
.hub-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: .4rem;
}
.hub-year {
  display: inline-block;
  padding: .42rem .55rem;
  border: 1px solid #d4cabb;
  background: #fdfbf6;
  text-decoration: none;
  color: #1a1410;
  font-family: 'Space Mono', monospace;
  font-size: .85rem;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.hub-year:hover { border-color: var(--accent); background: #fbf7ed; }

.see-all-link { margin: 1.2rem 0; font-family: 'Space Mono', monospace; font-size: .9rem; }
.see-all-link a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
