/* Evidence Press — site styles */
:root {
  --paper: #faf7f2;
  --card: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e0d8;
  --accent: #134e4a;
  --accent-2: #0f766e;
  --accent-bright: #2dd4bf;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --dark: #151a1e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.06rem; line-height: 1.65;
}
.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.5rem; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; padding-top: .7rem; padding-bottom: .7rem; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--accent); text-decoration: none; letter-spacing: .01em; display: flex; align-items: center; gap: .55rem; }
.brand-mark { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 8px; background: var(--accent); color: #fbbf24; font-size: 1rem; }
.site-head nav { display: flex; gap: 1.1rem; font-family: var(--sans); font-size: .88rem; }
.site-head nav { flex-wrap: wrap; row-gap: .2rem; }
.site-head nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.site-head nav a:hover { color: var(--accent); text-decoration: underline; }

/* hero */
.hero { position: relative; color: #f0fdfa; overflow: hidden; background: var(--accent); }
.hero-art { position: absolute; inset: 0; }
.hero-art svg { width: 100%; height: 100%; }
.hero-inner { position: relative; padding-top: 3.4rem; padding-bottom: 3.2rem; max-width: 74rem; }
.hero h1 { font-size: 2.9rem; margin: 0 0 .6rem; line-height: 1.1; }
.hero .standfirst { font-size: 1.2rem; color: #ccfbf1; max-width: 44rem; margin: 0; }

/* index cards */
.listhead { margin: 2rem 0 1rem; }
#filter {
  width: 100%; max-width: 32rem; padding: .6rem .9rem; font-family: var(--sans); font-size: .95rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
.cards { display: grid; gap: 1.4rem; margin: 1rem 0 3.5rem; grid-template-columns: 1fr; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: box-shadow .15s ease, transform .15s ease; display: flex; flex-direction: column; }
.card:hover { box-shadow: 0 6px 24px rgba(28, 25, 23, .1); transform: translateY(-2px); }
.card-art { display: block; aspect-ratio: 3 / 1; overflow: hidden; background: var(--dark); }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-inner { padding: 1rem 1.3rem 1.1rem; }
.card h2 { margin: .2rem 0 .4rem; font-size: 1.3rem; line-height: 1.25; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover { color: var(--accent); text-decoration: underline; }
.card p { margin: .3rem 0; font-size: .98rem; }
.card-date { font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.card-links { font-family: var(--sans); font-size: .85rem; display: flex; gap: 1rem; margin-top: .6rem; flex-wrap: wrap; }
.has-audio { color: var(--muted); }

@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards .card:first-child { grid-column: 1 / -1; }
  .cards .card:first-child .card-art { aspect-ratio: 6 / 1; }
}

/* release pages */
.release { padding: 2.2rem 0 3rem; }
.cover { border-radius: 14px; overflow: hidden; margin-bottom: 1.6rem; background: var(--dark); }
.cover img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.kicker { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .4rem; }
.release h1 { font-size: 2.25rem; line-height: 1.18; margin: 0 0 .6rem; max-width: 56rem; }
.release .standfirst { font-size: 1.18rem; color: var(--muted); margin: .25rem 0 1.2rem; max-width: 52rem; }
.release h2 { font-size: 1.42rem; margin: 2.3rem 0 .6rem; border-bottom: 1px solid var(--line); padding-bottom: .25rem; }
.release h3 { font-size: 1.13rem; margin: 1.6rem 0 .4rem; }

.release-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) {
  .release-grid { grid-template-columns: minmax(0, 1fr) 19rem; }
  .factbox { position: sticky; top: 4.2rem; }
}
.body { max-width: 50rem; min-width: 0; }
.prose { max-width: 50rem; margin: 0 auto; }
.prose h1 { font-size: 2rem; }

/* listen bar */
.briefings { display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; margin: 0 0 1.6rem; }
.briefings .listen { margin: 0; }
.listen { display: flex; align-items: center; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1.1rem; margin: 0 0 1.6rem; max-width: 32rem; }
.play { width: 2.9rem; height: 2.9rem; border-radius: 50%; border: none; background: var(--accent); color: #fff; font-size: 1rem; cursor: pointer; flex: none; }
.play:hover { background: var(--accent-2); }
.listen-meta { font-family: var(--sans); font-size: .85rem; color: var(--muted); display: flex; flex-direction: column; gap: .1rem; }
.listen-meta strong { color: var(--ink); font-size: .95rem; }

/* factbox */
.factbox { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; font-family: var(--sans); font-size: .86rem; }
.btn-pdf { display: block; text-align: center; background: var(--accent); color: #fff !important; text-decoration: none; font-weight: 600; font-size: .95rem; padding: .7rem 1rem; border-radius: 9px; margin-bottom: 1rem; }
.btn-pdf:hover { background: var(--accent-2); }
.factbox dl { display: grid; grid-template-columns: 1fr; gap: .55rem; margin: 0; }
.factbox dt { font-weight: 700; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
.factbox dd { margin: 0 0 .2rem; overflow-wrap: anywhere; }

blockquote { margin: 1.2rem 0; padding: .6rem 1.1rem; border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 8px 8px 0; font-style: italic; }
blockquote p { margin: .3rem 0; }
pre { background: #292524; color: #fafaf9; padding: 1rem 1.2rem; border-radius: 8px; overflow-x: auto; font-size: .85rem; line-height: 1.5; }
code { font-family: var(--mono); font-size: .92em; }
p code, li code { background: #efe9e1; padding: .08em .35em; border-radius: 4px; overflow-wrap: anywhere; }
pre code { background: none; padding: 0; }

.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; background: var(--card); }
th, td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; vertical-align: top; }
th { background: #f3efe8; font-family: var(--sans); font-size: .82rem; }

.math { overflow-x: auto; padding: .3rem 0; }

.article-figure { margin: 1.5rem 0 1.9rem; }
.article-figure img {
  width: 100%; height: auto; border: 1px solid #28383c; border-radius: 12px;
  background: var(--dark);
}
.article-figure figcaption {
  margin-top: .5rem; color: var(--muted); font-family: var(--sans);
  font-size: .84rem; line-height: 1.45;
}

.followups, .verify, .related, .cite, .media-section { margin-top: 1.5rem; }
.note { font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.verify p { background: var(--amber-bg); border: 1px solid #fcd34d; border-radius: 8px; padding: .8rem 1rem; font-size: .95rem; }

.media { margin: 1rem 0; }
.media audio, .media video { width: 100%; border-radius: 8px; }
.media figcaption { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.media .video-embed { aspect-ratio: 16 / 9; width: 100%; }
.media .video-embed iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; display: block; }
a.play { display: flex; align-items: center; justify-content: center; text-decoration: none; color: #fff !important; }

/* cite */
.cite-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.cite-row { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.cite-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.cite-row span { font-size: .95rem; }
.bib { background: #f6f2ec; color: var(--ink); border: 1px solid var(--line); margin: .6rem 0 0; flex: 1; }
.copy { font-family: var(--sans); font-size: .78rem; font-weight: 600; border: 1px solid var(--line); background: var(--paper); color: var(--muted); border-radius: 7px; padding: .3rem .7rem; cursor: pointer; flex: none; }
.copy:hover { color: var(--accent); border-color: var(--accent-2); }
.cite-card details { margin-top: .6rem; font-family: var(--sans); font-size: .85rem; }
.cite-card summary { cursor: pointer; color: var(--muted); }

/* footer */
.site-foot { border-top: 3px double var(--line); background: var(--card); margin-top: 2rem; }
.site-foot .wrap { padding: 1.4rem 1.5rem 2rem; font-family: var(--sans); font-size: .82rem; color: var(--muted); }

/* standalone pages that carry a cover and standfirst */
.prose .cover { margin-bottom: 1.5rem; }
.prose .kicker { margin-bottom: .35rem; }
.prose .standfirst { font-size: 1.16rem; color: var(--muted); margin: .25rem 0 1.5rem; }
.standalone-audio {
  margin: 0 0 1.4rem; padding: 1rem 1.1rem; border: 1px solid #99f6e4;
  border-left: 5px solid var(--accent-2); border-radius: 12px;
  background: linear-gradient(135deg, #f0fdfa 0%, var(--card) 72%);
  font-family: var(--sans);
}
.standalone-audio-copy { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .7rem; }
.standalone-audio-copy strong { color: var(--ink); font-size: 1rem; }
.standalone-audio-copy span, .audio-links { color: var(--muted); font-size: .84rem; }
.standalone-audio audio { display: block; width: 100%; max-width: 40rem; }
.audio-links { margin: .55rem 0 0; }
.audio-transcript { margin-top: .65rem; color: var(--muted); font-size: .86rem; }
.audio-transcript summary { cursor: pointer; color: var(--accent-2); font-weight: 600; }
.audio-transcript div { margin-top: .7rem; padding-top: .4rem; border-top: 1px solid var(--line); }
.audio-transcript p { margin: .55rem 0; }
.page-resources {
  margin: 0 0 1.6rem; padding: 1rem 1.1rem 1.1rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.prose .page-resources h2 { margin: 0 0 .8rem; padding: 0; border: 0; font-size: 1.1rem; }
.page-resource-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.page-resource { display: flex; flex-direction: column; min-width: 0; font-family: var(--sans); }
.page-resource strong { color: var(--muted); font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; }
.page-resource a, .pending-link { overflow-wrap: anywhere; font-size: .92rem; }
.page-resource small { margin-top: .12rem; color: var(--muted); line-height: 1.35; }
.standalone-factbox h2 {
  margin: 0 0 .9rem; padding: 0 0 .45rem; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 1.12rem;
}
.standalone-factbox .fact-detail {
  display: block; margin-top: .18rem; color: var(--muted); font-size: .76rem; line-height: 1.4;
}
.standalone-release .media-section { margin-top: 2.2rem; }
@media (min-width: 680px) { .page-resource-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-head nav { gap: .72rem; font-size: .8rem; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

.reviews {
  margin-top: 2.5rem;
}

.review-card {
  border: 1px solid var(--line, #d6e4e1);
  border-radius: 0.6rem;
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  background: var(--paper, #fbfdfc);
}

.review-card h3 {
  margin: 0 0 0.35rem;
}

.review-meta {
  color: var(--muted, #526b68);
  font-size: 0.9rem;
}

.inline-img { display: inline-block; height: 1.6em; width: auto; vertical-align: -0.42em; margin: 0 .1em 0 0; }
td .inline-img { height: 1.9em; vertical-align: middle; }

/* Plain-English companion essay (drop-down near the top of a page body) */
.companion-essay { margin: 0 0 1.8rem; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--accent-2); border-radius: 12px; }
.companion-essay summary { cursor: pointer; padding: .85rem 1.15rem; font-weight: 600; color: var(--accent-2); }
.companion-essay summary:hover { color: var(--accent); }
.companion-essay .companion-note { display: block; font-family: var(--sans); font-size: .84rem; font-weight: 400; color: var(--muted); margin-top: .2rem; }
.companion-essay[open] summary { border-bottom: 1px solid var(--line); }
.companion-body { padding: .1rem 1.3rem 1.1rem; }

/* Standing-programme band on the index page */
.programme-band { margin-top: 1.7rem; }
.programme-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.programme-card { display: block; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--accent-2); border-radius: 12px; padding: 1rem 1.2rem .75rem; color: var(--ink); text-decoration: none; }
.programme-card h3 { font-family: var(--serif); font-size: 1.18rem; margin: .15rem 0 .4rem; color: var(--accent); }
.programme-card:hover h3 { text-decoration: underline; }
.programme-card > p { margin: 0 0 .45rem; font-size: .93rem; }
.programme-card .card-links { margin-top: .45rem; }


/* ------------------------------------------------------------ accessibility */
/* Keyboard focus must be visible: WCAG 2.2 makes this a Level AA requirement,
   and the browser default outline is removed by nothing here, so this only
   strengthens and standardises it. :focus-visible keeps the ring off mouse
   clicks; the :focus fallback covers browsers without :focus-visible. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 3px;
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) {
  outline: none;
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}
/* On the dark cover the teal ring has too little contrast against the ground. */
.release-cover :where(a, button):focus-visible,
.site-foot :where(a, button):focus-visible {
  outline-color: var(--accent-bright);
}

/* Filter status, clear control and the empty state. */
.filter-clear {
  margin-left: .6rem; padding: .55rem .9rem; font-family: var(--sans); font-size: .9rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--accent-2); cursor: pointer;
}
.filter-clear:hover { color: var(--accent); border-color: var(--accent-2); }
.filter-status {
  margin: .6rem 0 0; font-family: var(--sans); font-size: .88rem; color: var(--muted);
}

/* Respect a stated preference for reduced motion: no smooth scrolling, no
   card movement, no transitions. Animation is never load-bearing here. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card { transition: none; }
  .card:hover { transform: none; }
}

/* Correction notices. Prominent enough that a reader cannot miss one, quiet
   enough that it does not read as a retraction of the whole release. */
.corrections {
  margin: 1.6rem 0 0; padding: 1rem 1.2rem;
  background: var(--amber-bg); border: 1px solid var(--amber); border-radius: 10px;
}
.corrections h2 {
  margin: 0 0 .5rem; font-family: var(--sans); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--amber);
}
.corrections ul { margin: 0; padding: 0; list-style: none; }
.corrections li + li { margin-top: 1rem; border-top: 1px solid var(--amber); padding-top: 1rem; }
.corrections p { margin: 0 0 .4rem; font-size: .96rem; }
.correction-meta {
  font-family: var(--sans); font-size: .78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.correction-detail { color: var(--muted); font-size: .92rem; }

/* Assurance summary on catalogue cards. */
.card-assurance {
  font-family: var(--sans); font-size: .78rem; color: var(--muted);
  margin: .5rem 0 0; letter-spacing: .01em;
}
