/* Jacklers — site stylesheet
   Palette: midnight navy, warm white, deep rugby red (used sparingly).
   Type: Newsreader (headlines, editorial voice) + Hanken Grotesk (interface, body, data). */

:root {
  --midnight: #0A1120;
  --navy: #0F1A31;
  --line-dark: #26365A;
  --paper: #F6F3EE;
  --paper-deep: #ECE7DD;
  --rule: #D6D0C4;
  --ink: #0D1424;
  --ink-soft: #4A5568;
  --mist: #AAB4C8;
  --red: #A81F2B;
  --red-deep: #8A1822;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--paper); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--paper); color: var(--ink); padding: 0.75rem 1rem; border-radius: 2px;
}
.skip-link:focus { top: 1rem; }

.on-dark { background: var(--midnight); color: var(--paper); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line-dark); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.brand img { height: 2.75rem; width: auto; display: block; }
.nav ul { display: flex; align-items: center; gap: 0.25rem 1.35rem; flex-wrap: wrap; }
.nav a {
  display: inline-block; font-size: 0.9rem; font-weight: 500; text-decoration: none;
  color: var(--mist); padding: 0.5rem 0; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:hover { color: var(--paper); }
.nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--red); }
.nav .nav__cta a {
  background: var(--red); color: #fff; padding: 0.5rem 0.95rem; border: 0; border-radius: 2px;
}
.nav .nav__cta a:hover { background: var(--red-deep); }
.nav .nav__cta a[aria-current="page"] { box-shadow: 0 0 0 2px var(--paper) inset; }
.header-tools { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; color: var(--mist); border-radius: 2px;
}
.icon-btn:hover { color: var(--paper); }
.menu-btn {
  display: none; background: none; border: 1px solid var(--line-dark); color: var(--paper);
  padding: 0 1rem; height: 2.75rem; border-radius: 2px; cursor: pointer; font-weight: 500;
}

@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--midnight); border-bottom: 1px solid var(--line-dark);
    padding: 0.75rem var(--gutter) 1.5rem; max-height: calc(100vh - 4.25rem); overflow-y: auto;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { display: block; font-size: 1.15rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line-dark); min-height: 3rem; }
  .nav a[aria-current="page"] { border-bottom-color: var(--red); }
  .nav .nav__cta { margin-top: 1rem; }
  .nav .nav__cta a { text-align: center; border: 0; padding: 0.9rem 1rem; }
}

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero { min-height: min(88vh, 46rem); display: flex; align-items: center; }
.hero__pitch { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,17,32,0.94) 0%, rgba(10,17,32,0.78) 38%, rgba(10,17,32,0.2) 72%, rgba(10,17,32,0) 100%);
}
@media (max-width: 800px) {
  .hero::before { background: linear-gradient(180deg, rgba(10,17,32,0.92) 0%, rgba(10,17,32,0.72) 55%, rgba(10,17,32,0.25) 100%); }
}
.hero__score {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 1rem; font-size: 0.82rem; font-weight: 500;
  color: var(--mist); letter-spacing: 0.02em;
}
@media (max-width: 800px) { .hero__score { left: var(--gutter); right: auto; } }
.hero__pitch path { fill: none; stroke: var(--line-dark); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hero__pitch .is-halfway { stroke: var(--red); stroke-width: 2; }
.hero__pitch path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 2.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.hero__pitch path:nth-child(2) { animation-delay: 0.15s; }
.hero__pitch path:nth-child(3) { animation-delay: 0.3s; }
.hero__pitch path:nth-child(4) { animation-delay: 0.45s; }
.hero__pitch path:nth-child(5) { animation-delay: 0.6s; }
.hero__pitch path:nth-child(6) { animation-delay: 0.75s; }
.hero__pitch path:nth-child(7) { animation-delay: 0.9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__inner { position: relative; z-index: 2; width: 100%; padding-top: clamp(4rem, 12vw, 9rem); padding-bottom: clamp(4rem, 11vw, 8rem); }
.hero h1 { display: block; }
.hero__name {
  display: block; font-size: clamp(4.5rem, 17vw, 12rem); font-weight: 500; line-height: 0.9;
  letter-spacing: -0.03em; margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.hero__line {
  display: block; max-width: 22ch; font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--paper); line-height: 1.12; font-weight: 400;
}
.hero__support { max-width: 42ch; margin: 1.75rem 0 2rem; color: var(--mist); font-size: 1.15rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem;
  padding: 0.7rem 1.4rem; border: 0; border-radius: 2px; background: var(--red); color: #fff;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--red-deep); }
.btn--quiet { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn--quiet:hover { background: rgba(127, 127, 127, 0.15); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Page header band (inner pages) ---------- */
.page-head { border-bottom: 1px solid var(--line-dark); }
.page-head .wrap { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.page-head p { max-width: 46ch; margin: 1.25rem 0 0; color: var(--mist); font-size: 1.15rem; }

/* ---------- Blocks ---------- */
.block { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.block + .block { border-top: 1px solid var(--rule); }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.block__head h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); }
.block__head a { font-size: 0.95rem; font-weight: 600; color: var(--red); white-space: nowrap; }
.block__head p { margin: 0.4rem 0 0; color: var(--ink-soft); max-width: 52ch; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
@media (max-width: 800px) { .pair { grid-template-columns: 1fr; } }

.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem clamp(2rem, 5vw, 4.5rem); }
.panel { border-top: 2px solid var(--ink); padding-top: 1rem; }
.panel h2 { font-size: 1.6rem; }
@media (max-width: 800px) { .panels { grid-template-columns: 1fr; } }

/* ---------- Empty states ---------- */
.empty {
  display: flex; gap: 1.1rem; align-items: flex-start;
  padding: 1.6rem 0 1.9rem; border-top: 1px solid var(--rule); color: var(--ink);
}
.panel .empty { border-top: 0; padding-top: 1rem; }
.empty__icon { flex: none; width: 2.75rem; height: 2.75rem; color: var(--ink-soft); }
.empty__title { font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; margin: 0 0 0.3rem; }
.empty__text { margin: 0; color: var(--ink-soft); max-width: 48ch; }
.on-dark .empty { color: var(--paper); border-top-color: var(--line-dark); }
.on-dark .empty__text, .on-dark .empty__icon { color: var(--mist); }
.empty--wide { padding: 2.5rem 0 3rem; }
.empty--wide .empty__title { font-size: 1.75rem; }

/* ---------- Story cards (rendered from data) ---------- */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 2.25rem 2rem; }
@media (min-width: 900px) { .story-grid .story--lead { grid-column: span 2; } .story-grid .story--lead h3 { font-size: 2.2rem; } }
.story { border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.story__img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; background: var(--paper-deep); margin-bottom: 0.9rem; }
.story__section { font-size: 0.85rem; font-weight: 600; color: var(--red); margin: 0 0 0.35rem; }
.story h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.story h3 a { text-decoration: none; }
.story h3 a:hover { text-decoration: underline; }
.story__stand { color: var(--ink-soft); margin: 0 0 0.6rem; }
.story__meta { font-size: 0.875rem; color: var(--ink-soft); margin: 0; }

/* ---------- Filters, pager ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-end; margin-bottom: 1.5rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 11rem; }
.field label { font-size: 0.875rem; font-weight: 600; }
.field select, .field input[type="search"], .field input[type="text"] {
  min-height: 2.9rem; padding: 0.5rem 0.75rem; background: #fff; border: 1px solid var(--rule); border-radius: 2px;
}
.field select:disabled, .field input:disabled { background: var(--paper-deep); color: var(--ink-soft); cursor: not-allowed; }
.pager { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.pager[hidden] { display: none; }
.pager button {
  min-height: 2.9rem; padding: 0 1.1rem; background: transparent; border: 1px solid var(--ink); border-radius: 2px; cursor: pointer; font-weight: 600;
}
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }
.pager span { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Statistics ---------- */
.stat-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat-note { color: var(--ink-soft); max-width: 60ch; }
.table-scroll { overflow-x: auto; margin: 1rem 0 0; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; min-width: 34rem; font-size: 0.95rem; }
table.data th { text-align: left; font-weight: 600; padding: 0.7rem 0.75rem; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.data td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--rule); }
table.data td.is-empty { padding: 0; }
table.data td.is-empty .empty { border-top: 0; padding: 1.5rem 0.75rem; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1rem; }
.compare .slot { border: 1px dashed var(--ink-soft); border-radius: 2px; padding: 1.25rem; min-height: 9rem; }
.compare .slot .field { min-width: 0; }
@media (max-width: 600px) { .compare { grid-template-columns: 1fr; } }
.chart-frame { margin-top: 1rem; border: 1px solid var(--rule); background: #fff; padding: 1rem 1rem 0; }
.chart-frame svg { width: 100%; height: auto; color: var(--rule); }
.chart-frame .empty { border-top: 0; }

/* ---------- Lists, detail pages ---------- */
.plain-list { display: grid; gap: 0.5rem; margin: 1rem 0 0; padding-left: 1.1rem; list-style: disc; color: var(--ink-soft); }
.rows { border-top: 2px solid var(--ink); }
.row { display: grid; grid-template-columns: 8rem 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.row__score { font-weight: 600; white-space: nowrap; }
.row__meta { color: var(--ink-soft); font-size: 0.9rem; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; gap: 0.25rem; } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.card { border-top: 2px solid var(--ink); padding-top: 0.8rem; }
.card h3 { font-size: 1.35rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Article ---------- */
.article { max-width: 44rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); }
.article__section { font-size: 0.9rem; font-weight: 600; color: var(--red); margin-bottom: 0.75rem; }
.article h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); line-height: 1.05; margin-bottom: 1rem; }
.article__stand { font-family: var(--serif); font-size: 1.4rem; line-height: 1.35; color: var(--ink-soft); margin-bottom: 1.5rem; }
.article__meta { font-size: 0.925rem; color: var(--ink-soft); padding: 0.9rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 2rem; }
.article__hero { margin: 0 0 2rem; }
.article__hero img { width: 100%; }
.article figcaption { font-size: 0.875rem; color: var(--ink-soft); margin-top: 0.5rem; }
.article__body { font-family: var(--serif); font-size: 1.25rem; line-height: 1.7; }
.article__body h2 { font-size: 1.8rem; margin: 2.2rem 0 0.8rem; }
.article__body figure { margin: 2rem 0; }
.article__body blockquote {
  margin: 2.2rem 0; padding-left: 1.25rem; border-left: 3px solid var(--red);
  font-size: 1.6rem; line-height: 1.3; font-style: italic;
}
.article__body blockquote cite { display: block; margin-top: 0.6rem; font-size: 0.95rem; font-style: normal; font-family: var(--sans); color: var(--ink-soft); }
.article__stats { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; margin: 2rem 0; padding: 1.25rem 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.article__stats dt { font-size: 0.875rem; color: var(--ink-soft); }
.article__stats dd { margin: 0; font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.article__stats div { display: flex; flex-direction: column-reverse; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0 0; }
.tags li { border: 1px solid var(--rule); padding: 0.2rem 0.7rem; font-size: 0.9rem; border-radius: 2px; }
.share { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; align-items: center; }
.share .btn { min-height: 2.75rem; }
.share__msg { font-size: 0.9rem; color: var(--ink-soft); }
.article__related { margin-top: 3rem; }
.article__related h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.discussion { margin-top: 3rem; }
.discussion .empty { padding: 1.25rem 0; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--navy); color: var(--paper); border-top: 1px solid var(--line-dark); }
.newsletter .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); align-items: center; }
.newsletter h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 0.9rem; }
.newsletter p { color: var(--mist); margin: 0; max-width: 40ch; font-size: 1.1rem; }
@media (max-width: 800px) { .newsletter .wrap { grid-template-columns: 1fr; } }
.signup { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 14rem; min-height: 3rem; padding: 0.6rem 0.9rem; border: 1px solid var(--line-dark);
  background: var(--midnight); color: var(--paper); border-radius: 2px;
}
.signup input::placeholder { color: #7f8aa3; }
.signup__msg { flex-basis: 100%; min-height: 1.5rem; margin: 0.25rem 0 0; font-size: 0.95rem; color: var(--mist); }

/* ---------- Text pages ---------- */
.prose { max-width: 40rem; }
.prose h2 { font-size: 1.7rem; margin: 2.2rem 0 0.6rem; }
.prose p { color: var(--ink); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem clamp(2rem, 5vw, 4.5rem); }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 3rem; }
.footer-grid h2 { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; color: var(--paper); margin-bottom: 0.9rem; letter-spacing: 0; }
.footer-grid p, .footer-grid a { color: var(--mist); }
.footer-grid li a { display: inline-block; padding: 0.3rem 0; text-decoration: none; }
.footer-grid li a:hover { color: var(--paper); text-decoration: underline; }
.footer-brand { margin: 0 0 1rem; line-height: 0; }
.footer-brand img { height: 3.4rem; width: auto; display: block; }
.site-footer .signup input[type="email"] { background: var(--navy); }
.footer-base { border-top: 1px solid var(--line-dark); padding: 1.25rem 0 2rem; color: var(--mist); font-size: 0.875rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__pitch path { animation: none; stroke-dashoffset: 0; }
  * { transition: none !important; }
}
