/* ============================================================================
   STV News — Archive article stylesheet
   Shared, unchanged, across every archived page. Root-relative: /archive.css
   Vanilla CSS. No build step. Re-theme the whole archive from :root below.
   ========================================================================== */

/* --- Self-hosting note --------------------------------------------------- */
/* Inter is loaded via <link> in the HTML head (Google Fonts) for convenience.
   For true long-term permanence, self-host: drop Inter's woff2 files at
   /fonts/ and replace the head <link> with @font-face rules pointing there.
   Either way, --font-sans falls back to the system stack so the page never
   breaks if Inter fails to load. */

/* ============================================================================
   1. Design tokens — edit here to re-theme the entire archive
   ========================================================================== */
:root {
  /* Type ------------------------------------------------------------------ */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --text-xs:   0.8rem;
  --text-sm:   0.9rem;
  --text-base: clamp(1.1rem, 1.02rem + 0.3vw, 1.2rem);
  --text-lg:   clamp(1.25rem, 1.1rem + 0.6vw, 1.4rem);
  --text-xl:   clamp(1.5rem, 1.25rem + 1vw, 1.8rem);
  --text-2xl:  clamp(1.9rem, 1.5rem + 1.6vw, 2.3rem);
  --text-3xl:  clamp(2.2rem, 1.6rem + 3vw, 3.4rem);

  --leading-tight: 1.15;
  --leading-snug:  1.35;
  --leading-body:  1.65;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;

  /* Spacing scale --------------------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Measure / widths ------------------------------------------------------ */
  --measure: 46rem;         /* body reading column                           */
  --measure-wide: 56rem;    /* archived notice alignment                     */
  --shell: 1200px;          /* masthead and footer                           */
  --gutter: clamp(1.25rem, 5vw, 3rem);

  /* Colour — near-white ground, dark ink, one solid brand blue ------------ */
  --brand:        #02a1df;
  --brand-strong: #0284b8;
  --brand-ink:    #06617f;

  --paper:        #ffffff;
  --surface:      #ffffff;
  --ink:          #1a1a1a;
  --ink-muted:    #5c5c5c;
  --ink-faint:    #86868a;
  --rule:         #e2e2e4;
  --rule-strong:  #cfcfd2;

  --notice-bg:     #eef1f5;
  --notice-border: #dde1e8;

  --focus: #02a1df;
  --selection-bg: #d3eefb;

  --ease: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:        #3fc3f0;
    --brand-strong: #6ad0f2;
    --brand-ink:    #bfeaf9;

    --paper:        #17181a;
    --surface:      #1d1f23;
    --ink:          #e8e6e1;
    --ink-muted:    #b0ada6;
    --ink-faint:    #86837d;
    --rule:         #2c2e33;
    --rule-strong:  #3a3d43;

    --notice-bg:     #1e2024;
    --notice-border: #2c2e33;

    --focus: #3fc3f0;
    --selection-bg: #223140;
  }
}

/* ============================================================================
   2. Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
}

::selection { background: var(--selection-bg); }
img, svg { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4, p, ul, ol, blockquote, figure { margin: 0; }

a {
  color: var(--brand-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s var(--ease);
}
a:hover { color: var(--brand-strong); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  transform: translateY(-160%);
  z-index: 50;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

.wrap {
  width: 100%;
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================================
   3. Masthead
   ========================================================================== */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.masthead__inner { max-width: var(--shell); }
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}
.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
}
.masthead__logo { height: 30px; width: auto; }
.masthead__word {
  font-size: 1.4rem;
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.masthead__word .accent { color: var(--brand); }
.masthead__home {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--ink);
  white-space: nowrap;
}
.masthead__home:hover { color: var(--brand-ink); }
.masthead__home svg { width: 14px; height: 14px; }

/* ============================================================================
   4. Archived notice — slim, always-visible, never mistaken for current news
   ========================================================================== */
.archived {
  background: var(--notice-bg);
  border-bottom: 1px solid var(--notice-border);
}
.archived__inner {
  padding-block: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-muted);
    text-align: center;
}
.archived__inner strong { color: var(--ink); font-weight: var(--weight-semi); }
.archived__cta {
  font-weight: var(--weight-semi);
  color: var(--brand-ink);
  white-space: nowrap;
}
.archived__cta:hover { color: var(--brand-strong); }

/* ============================================================================
   5. Article
   ========================================================================== */
.article { padding-block: var(--space-7) var(--space-9); }
.article__header { max-width: var(--measure); margin-inline: auto; }

.article__headline {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.article__dek {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--ink-muted);
  margin-top: var(--space-4);
  text-wrap: pretty;
}

.article__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-5);
  padding-block: var(--space-4);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: var(--text-sm);
}
/* A guest byline can run to several names. Let it take the row and wrap,
   rather than squeezing the section label or overflowing the rule. */
.article__byline-meta {
  flex: 1 1 16rem;
  min-width: 0;
  line-height: var(--leading-snug);
}
.article__author {
  font-weight: var(--weight-semi);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.article__byline time { display: block; color: var(--ink-muted); }
.article__section {
  flex: 0 1 auto;
  font-weight: var(--weight-medium);
  color: var(--ink-muted);
}
.article__section a { color: var(--brand-ink); font-weight: var(--weight-semi); }

/* --- Body flow ---------------------------------------------------------- */
.article__body { max-width: var(--measure); margin-inline: auto; margin-top: var(--space-6); }
.article__body > * + * { margin-top: var(--space-5); }
.article__body p { text-wrap: pretty; }

/* Bodies open with a bold standfirst paragraph and use bold freely inside.
   The browser default of 700 is heavier than the rest of the page needs. */
.article__body strong,
.article__body b {
  font-weight: var(--weight-semi);
}

.article__body h2 {
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  font-weight: var(--weight-semi);
  letter-spacing: -0.01em;
  margin-top: var(--space-7);
}
.article__body h3 {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  font-weight: var(--weight-semi);
  margin-top: var(--space-6);
}

.article__body ul, .article__body ol { padding-left: var(--space-5); }
.article__body li + li { margin-top: var(--space-2); }

.article__body blockquote {
  border-left: 3px solid var(--rule-strong);
  padding-left: var(--space-5);
  margin-inline: 0;
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  font-style: normal;
}
.article__body blockquote p { font-weight: var(--weight-medium); }
.article__body blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--ink-muted);
}

.article__body figure { margin-block: var(--space-6); }
.article__body figure img { width: 100%; }
.article__body figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  line-height: var(--leading-snug);
}

.article__body hr { border: 0; border-top: 1px solid var(--rule); margin-block: var(--space-7); }

/* Stands in for an embed the archive does not carry. The link outlives the
   embed, which is the point of it on a page meant to sit here for years. */
.article__embed {
  border-left: 3px solid var(--brand);
  background: var(--notice-bg);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
}
.article__embed a {
  font-weight: var(--weight-semi);
  text-decoration: none;
}
.article__embed a:hover { text-decoration: underline; }
.article__embed a::before { content: "\25B6\FE0E"; margin-right: var(--space-2); }

.article__lead-media { max-width: var(--measure-wide); margin: var(--space-6) auto 0; }
.article__lead-media img { width: 100%; }
.article__lead-media figcaption {
  max-width: var(--measure);
  margin: var(--space-2) auto 0;
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

/* ============================================================================
   6. Back-to-top (JS-enhanced, hidden by default; degrades to nothing)
   ========================================================================== */
.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.to-top[data-visible="true"] { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ============================================================================
   7. Footer — inverted, and dark in both colour schemes
   ========================================================================== */
.site-footer > .wrap { max-width: var(--shell); }

.site-footer {
  --footer-ink:      #d4d4d4;   /* neutral-300 */
  --footer-ink-dim:  #a3a3a3;   /* neutral-400 */
  --footer-rule:     #2e2e2e;
  background: #141414;
  color: var(--footer-ink);
  padding-block: var(--space-6);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

.site-footer a {
  color: var(--footer-ink);
  text-decoration: none;
}
.site-footer a:hover { color: var(--footer-ink-dim); }
.site-footer :focus-visible { outline-color: #fff; }

/* --- Navigation --------------------------------------------------------- */
.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__nav a { font-weight: var(--weight-medium); }

/* Reopens the preferences modal. Hidden until CookieConsent is running, so it
   is never a control that does nothing. */
.site-footer__prefs { display: none; }
.cc--ready .site-footer__prefs { display: block; }
.site-footer__prefs button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: var(--weight-medium);
  color: var(--footer-ink);
  cursor: pointer;
}
.site-footer__prefs button:hover { color: var(--footer-ink-dim); }

/* --- Copyright and social ----------------------------------------------- */
.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--footer-rule);
}

.site-footer__copy { margin: 0; }

.site-footer__social {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__social a {
  display: inline-flex;
  transition: color 0.15s var(--ease);
}
/* Explicit size: the global `svg { height: auto }` reset would collapse these. */
.site-footer__social svg {
  width: 24px;
  height: 24px;
  display: block;
}

@media (max-width: 34rem) {
  .site-footer__meta {
    justify-content: center;
    text-align: center;
    gap: var(--space-5);
  }
  .site-footer__copy { flex: 1 1 100%; }
  .site-footer__social {
    flex: 1 1 100%;
    justify-content: center;
    gap: var(--space-4);
  }
}

/* ============================================================================
   8. Print — a clean, faithful record on paper too
   ========================================================================== */
@media print {
  .to-top, .masthead__home, .site-footer__social { display: none; }
  .site-footer { background: #fff; color: #000; }
  body { background: #fff; color: #000; }
  .article { padding-block: 0; }
  a { color: #000; text-decoration: underline; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── Utilities: display ──────────────────────────────────────────────────── */

.block  { display: block; }
.hidden { display: none; }

/* ── Utilities: position ─────────────────────────────────────────────────── */

.relative { position: relative; }
.absolute { position: absolute; }

.bottom-0 { bottom: 0; }
.right-0  { right: 0; }

/* ── Utilities: sizing ───────────────────────────────────────────────────── */

.h-full { height: 100%; }
.w-full { width: 100%; }
.m-0    { margin: 0; }

/* ── Utilities: typography ───────────────────────────────────────────────── */

.text-xs  { font-size: 0.75rem;   line-height: 1rem; }
.text-sm  { font-size: 0.875rem;  line-height: 1.25rem; }

.text-white    { color: #fff; }
.text-gray-600 { color: #4b5563; }

.not-italic { font-style: normal; }

/* ── Utilities: backgrounds ──────────────────────────────────────────────── */

.bg-gray-50    { background-color: #f9fafb; }
.bg-black\/40  { background-color: rgba(0, 0, 0, 0.4); }

/* ── Utilities: spacing ──────────────────────────────────────────────────── */

.py-1 { padding-top: 0.25rem;  padding-bottom: 0.25rem; }
.px-2 { padding-left: 0.5rem;  padding-right: 0.5rem; }
.p-3  { padding: 0.75rem; }

/* ── Utilities: borders ──────────────────────────────────────────────────── */

.border-l-2    { border-left-width: 2px; border-left-style: solid; }
.border-sky-500 { border-left-color: #0ea5e9; }

/* ── Utilities: shadows ──────────────────────────────────────────────────── */

.shadow-xs { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

/* ── WordPress block: wp-block-image ─────────────────────────────────────── */

.wp-block-image {
    margin: 1.5rem 0;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── Site styles ─────────────────────────────────────────────────────────── */
/* Add design tokens, layout, and component styles here. */
