/* ==========================================================================
   GREENWICH JOURNAL: Shared Design System
   Palette inspired by the Union Flag: deep navy, crimson red, paper white,
   with a gold meridian line as the house motif.
   ========================================================================== */

:root {
  --navy: #0b1f4b;
  --navy-deep: #071533;
  --navy-ink: #10295e;
  --red: #c8102e;
  --red-dark: #9c0c24;
  --paper: #f7f4ec;
  --paper-warm: #efe9db;
  --white: #ffffff;
  --ink: #1c2430;
  --ink-soft: #45505f;
  --gold: #b98a2f;
  --gold-soft: #d9b25f;
  --line: #d8d2c2;
  --sky: #e8edf6;
  --font-head: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-body: "Georgia", "Times New Roman", serif;
  --font-sans: "Inter", "Helvetica Neue", "Arial", sans-serif;
  --measure: 44rem;
  --radius: 4px;
  --shadow-card: 0 1px 2px rgba(11, 31, 75, 0.08), 0 8px 24px rgba(11, 31, 75, 0.10);
  --shadow-lift: 0 2px 4px rgba(11, 31, 75, 0.12), 0 14px 34px rgba(11, 31, 75, 0.16);
}

/* ---------- Reset and base ---------- */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

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

a { color: var(--navy-ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--red); text-decoration-color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 800;
}

p { margin: 0 0 1.1em; }

ul, ol { padding-left: 1.4em; }

blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 4px solid var(--red);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--navy);
}

blockquote cite {
  display: block;
  margin-top: 0.5em;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2em 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: var(--white);
  padding: 0.75em 1.25em;
  font-family: var(--font-sans);
  font-weight: 700;
  z-index: 1000;
}
.skip-link:focus { left: 0; color: var(--white); }

/* ---------- Top utility bar: date, GMT clock, accessibility ---------- */

.topbar {
  background: var(--navy-deep);
  color: #cdd6ea;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.topbar-inner {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0.45em 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em 1.25em;
}

.topbar .dateline { text-transform: uppercase; }

.topbar .gmt-clock {
  color: var(--gold-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.topbar .gmt-clock::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.5em;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(217, 178, 95, 0.9);
  vertical-align: baseline;
}

.accessibility-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35em;
}

.accessibility-tools .tool-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 0.25em;
  color: #9fb0d0;
}

.a11y-btn {
  appearance: none;
  border: 1px solid #33477c;
  background: #122a5c;
  color: #e6ecf8;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35em 0.6em;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.03em;
}

.a11y-btn:hover { background: var(--red); border-color: var(--red); }
.a11y-btn[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }

/* ---------- Masthead ---------- */

.masthead {
  background:
    linear-gradient(180deg, rgba(11, 31, 75, 0.97), rgba(7, 21, 51, 0.99)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  color: var(--white);
  border-bottom: 4px solid var(--red);
  position: relative;
}

.masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--gold);
}

.masthead-inner {
  max-width: 78rem;
  margin: 0 auto;
  padding: 1.6rem 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.brand-mark { flex: 0 0 auto; width: 64px; height: 64px; }

.brand-text { display: flex; flex-direction: column; }

.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  letter-spacing: 0.015em;
  line-height: 1;
  color: var(--white);
  text-decoration: none;
}

.brand-name:hover { color: var(--gold-soft); }

.brand-name .journal-word { color: var(--gold-soft); }

.brand-strap {
  margin-top: 0.45em;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #b9c6e2;
}

.masthead-est {
  margin-left: auto;
  text-align: right;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8fa1c6;
  line-height: 1.9;
  border-right: 2px solid var(--gold);
  padding-right: 0.9rem;
}

/* ---------- Primary navigation ---------- */

.mainnav {
  background: var(--navy);
  border-bottom: 1px solid #23386b;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(7, 21, 51, 0.35);
}

.mainnav-inner {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}

.mainnav-inner::-webkit-scrollbar { display: none; }

.mainnav a {
  color: #dbe3f4;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95em 0.9em;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.mainnav a:hover { color: var(--white); background: var(--navy-ink); border-bottom-color: var(--gold); }
.mainnav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--red); background: var(--navy-deep); }

/* ---------- Layout shells ---------- */

.page-wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding: 1.75rem 1rem 3rem;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 2.25rem;
  align-items: start;
}

/* ---------- Section headings ---------- */

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  border-bottom: 3px double var(--line);
  padding-bottom: 0.45rem;
  margin: 2.25rem 0 1.25rem;
}

.section-heading:first-child { margin-top: 0; }

.section-heading h2 {
  font-size: 1.55rem;
  margin: 0;
  text-transform: none;
}

.section-heading .kicker-rule {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  align-self: center;
}

.section-heading .more-link {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Kicker labels */
.kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5em;
}

.kicker::before { content: "▸ "; color: var(--gold); }

/* ---------- Hero (homepage lead story) ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.hero-media { position: relative; min-height: 100%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-body { padding: 1.6rem 1.75rem 1.5rem; display: flex; flex-direction: column; }

.hero-body h1, .hero-body h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 0.4em;
}

.hero-body h1 a, .hero-body h2 a { color: inherit; text-decoration: none; }
.hero-body h1 a:hover, .hero-body h2 a:hover { color: var(--red); }

.hero-standfirst {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin-bottom: 1em;
}

.byline {
  margin-top: auto;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 0.8em;
}

.byline strong { color: var(--navy); text-transform: uppercase; letter-spacing: 0.08em; }
.byline time { color: var(--red); font-weight: 600; }

/* ---------- Card grids ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card-media img { transform: scale(1.04); }

.card-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }

.card-title {
  font-size: 1.12rem;
  margin-bottom: 0.35em;
  line-height: 1.25;
}

.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--red); }

.card-standfirst {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 0.9em;
}

.card-meta {
  margin-top: auto;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-top: 1px dotted var(--line);
  padding-top: 0.6em;
}

.card-meta time { color: var(--red); font-weight: 600; }

/* Horizontal list cards for section pages */
.story-list { display: flex; flex-direction: column; gap: 1.35rem; }

.story-row {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.story-row:hover { box-shadow: var(--shadow-lift); }

.story-row .card-media { aspect-ratio: auto; height: 100%; min-height: 10rem; }
.story-row .card-body { padding: 1.15rem 1.35rem; }
.story-row .card-title { font-size: 1.3rem; }

/* ---------- Sidebar ---------- */

.sidebar { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 4.5rem; }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.25rem;
  box-shadow: var(--shadow-card);
}

.panel.panel-red { border-top-color: var(--red); }
.panel.panel-gold { border-top-color: var(--gold); }

.panel h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--line);
}

.panel ul { list-style: none; margin: 0; padding: 0; }

.panel li {
  padding: 0.55em 0;
  border-bottom: 1px dotted var(--line);
  font-size: 0.92rem;
}

.panel li:last-child { border-bottom: 0; }

.panel li a { text-decoration: none; font-weight: 600; color: var(--navy); }
.panel li a:hover { color: var(--red); }

.panel li .panel-date {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.2em;
}

.panel p { font-size: 0.92rem; }

.market-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.market-strip .quote { display: flex; gap: 0.45em; align-items: baseline; }
.market-strip .sym { font-weight: 800; color: var(--navy); }
.market-strip .val { font-variant-numeric: tabular-nums; }
.market-strip .up { color: #1a7a4a; font-weight: 700; }
.market-strip .down { color: var(--red); font-weight: 700; }

/* Meridian clock panel */
.meridian-panel {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #dfe6f5;
  border: 1px solid #23386b;
  border-top: 4px solid var(--gold);
}

.meridian-panel h3 { color: var(--gold-soft); border-bottom-color: #2c4176; }

.meridian-panel .big-clock {
  font-family: var(--font-sans);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.meridian-panel p { color: #aebbdb; font-size: 0.85rem; margin-bottom: 0.4em; }

/* ---------- Article page ---------- */

.article-hero { margin-bottom: 1.75rem; }

.article-hero img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--red);
  box-shadow: var(--shadow-card);
}

.article-head { max-width: var(--measure); margin: 0 auto 1.5rem; }

.article-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin-bottom: 0.35em;
}

.article-standfirst {
  font-size: 1.18rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 1em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.4em;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  border-top: 3px double var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.7em 0;
}

.article-meta .author { font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.07em; }
.article-meta time { color: var(--red); font-weight: 700; }

.reading-time::before { content: "· "; color: var(--gold); }

.article-body { max-width: var(--measure); margin: 0 auto; font-size: 1.09rem; }

.article-body > p:first-of-type::first-letter {
  font-family: var(--font-head);
  font-size: 3.4em;
  font-weight: 900;
  line-height: 0.85;
  float: left;
  padding: 0.06em 0.12em 0 0;
  color: var(--red);
}

.article-body h2 {
  font-size: 1.45rem;
  margin-top: 1.6em;
  padding-top: 0.5em;
  border-top: 1px solid var(--line);
}

.article-body figure { margin: 1.75em 0; }

.article-body figcaption {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--gold);
  padding-left: 0.75em;
  margin-top: 0.6em;
}

.fact-box {
  background: var(--sky);
  border: 1px solid #c6d2e8;
  border-left: 5px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.75em 0;
}

.fact-box h2, .fact-box h3 {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}

.fact-box ul { margin: 0; }
.fact-box li { margin-bottom: 0.4em; font-size: 0.95rem; }

.pull-quote {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  color: var(--navy);
  text-align: center;
  border-top: 3px double var(--gold);
  border-bottom: 3px double var(--gold);
  padding: 0.9em 1em;
  margin: 1.6em 0;
  line-height: 1.35;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.5em; margin: 2em 0 1em; }

.tags a {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4em 0.95em;
}

.tags a:hover { background: var(--red); border-color: var(--red); color: var(--white); }

.related-box {
  max-width: var(--measure);
  margin: 2.5em auto 0;
  border-top: 3px double var(--line);
  padding-top: 1.5em;
}

.related-box h2 { font-size: 1.3rem; margin-bottom: 0.8em; }

.related-box ul { list-style: none; padding: 0; margin: 0; }

.related-box li {
  padding: 0.6em 0;
  border-bottom: 1px dotted var(--line);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
}

.related-box li a { text-decoration: none; color: var(--navy); }
.related-box li a:hover { color: var(--red); }

.related-box li time {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Breadcrumbs */
.breadcrumbs {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--ink-soft);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  padding: 0;
  margin: 0;
}

.breadcrumbs li::after { content: "›"; margin-left: 0.4em; color: var(--gold); font-weight: 700; }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { text-decoration: none; color: var(--navy-ink); font-weight: 600; }

/* ---------- Section front ---------- */

.section-front-head {
  border-bottom: 4px solid var(--navy);
  padding-bottom: 0.9rem;
  margin-bottom: 1.75rem;
}

.section-front-head h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin-bottom: 0.15em; }

.section-front-head .section-dek {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 46rem;
  margin: 0;
}

/* ---------- Static / legal pages ---------- */

.prose { max-width: var(--measure); }

.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }

.prose h2 {
  font-size: 1.35rem;
  margin-top: 1.7em;
  padding-top: 0.55em;
  border-top: 1px solid var(--line);
}

.prose h3 { font-size: 1.1rem; margin-top: 1.4em; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  margin: 1.4em 0;
}

.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 0.55em 0.7em;
  text-align: left;
  vertical-align: top;
}

.prose th { background: var(--navy); color: var(--white); font-weight: 700; }
.prose tr:nth-child(even) td { background: var(--white); }

.updated-note {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: var(--paper-warm);
  display: inline-block;
  padding: 0.5em 0.9em;
  border-radius: 3px;
  margin-bottom: 1.5em;
}

/* Contact form */
.form-grid { display: grid; gap: 1rem; max-width: 34rem; }

.form-grid label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  display: block;
  margin-bottom: 0.35em;
}

.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  font: inherit;
  padding: 0.65em 0.8em;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
}

.form-grid textarea { min-height: 9rem; resize: vertical; }

.btn {
  display: inline-block;
  appearance: none;
  border: 0;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85em 1.8em;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--navy); color: var(--white); }

/* ---------- Footer ---------- */

.site-footer {
  background:
    linear-gradient(180deg, rgba(7, 21, 51, 0.98), rgba(7, 21, 51, 1)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  color: #b9c6e2;
  border-top: 4px solid var(--red);
  margin-top: 3rem;
}

.footer-meridian {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-inner {
  max-width: 78rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 1.5rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand .brand-name { font-size: 1.6rem; }

.footer-brand p { font-size: 0.85rem; line-height: 1.7; margin-top: 0.8em; }

.footer-col h2, .footer-col h3 {
  color: var(--gold-soft);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.9em;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.5em; }

.footer-col a {
  color: #cdd6ea;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.footer-col a:hover { color: var(--gold-soft); text-decoration: underline; }

.footer-legal {
  max-width: 78rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 1.75rem;
  border-top: 1px solid #22376a;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.5em;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #8fa1c6;
}

.footer-legal nav { display: flex; flex-wrap: wrap; gap: 0.5em 1.25em; margin-left: auto; }
.footer-legal a { color: #aebbdb; text-decoration: none; }
.footer-legal a:hover { color: var(--gold-soft); }

/* ---------- Cookie consent banner ---------- */

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 46rem;
  margin: 0 auto;
  background: var(--navy-deep);
  color: #dfe6f5;
  border: 1px solid #2c4176;
  border-top: 4px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(7, 21, 51, 0.5);
  padding: 1.2rem 1.4rem;
  z-index: 900;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  display: none;
}

.cookie-banner.is-visible { display: block; }

.cookie-banner h2 {
  color: var(--gold-soft);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4em;
}

.cookie-banner p { margin-bottom: 0.9em; line-height: 1.55; }
.cookie-banner a { color: var(--gold-soft); }

.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.6em; }

.cookie-btn {
  appearance: none;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65em 1.3em;
  cursor: pointer;
  border: 1px solid transparent;
}

.cookie-accept { background: var(--red); color: var(--white); }
.cookie-accept:hover { background: var(--red-dark); }
.cookie-reject { background: transparent; color: #dfe6f5; border-color: #4a5f96; }
.cookie-reject:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.cookie-settings { background: transparent; color: #9fb0d0; border-color: transparent; text-decoration: underline; }

/* ---------- Accessibility modes (toggled on <body> by JS) ---------- */

body.font-large { font-size: 1.25rem; }
body.font-xlarge { font-size: 1.42rem; }

body.high-contrast {
  --paper: #ffffff;
  --paper-warm: #ffffff;
  --ink: #000000;
  --ink-soft: #1a1a1a;
  --navy: #001a57;
  --navy-ink: #001a57;
  --red: #b00020;
  --line: #5a5a5a;
  background-image: none;
}

body.high-contrast .card, body.high-contrast .panel, body.high-contrast .story-row, body.high-contrast .hero {
  border-color: #000000;
  box-shadow: none;
}

body.dyslexia-friendly {
  font-family: "Verdana", "Tahoma", sans-serif;
  letter-spacing: 0.04em;
  word-spacing: 0.12em;
  line-height: 1.9;
}

body.dyslexia-friendly h1, body.dyslexia-friendly h2, body.dyslexia-friendly h3, body.dyslexia-friendly h4 {
  font-family: "Verdana", "Tahoma", sans-serif;
  letter-spacing: 0.02em;
}

body.dyslexia-friendly .article-body > p:first-of-type::first-letter { float: none; font-size: inherit; padding: 0; }

body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* ---------- Utility ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.text-centre { text-align: center; }

.notice-strip {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  padding: 0.9rem 1.2rem;
  font-size: 0.92rem;
  margin: 1.5rem 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 62rem) {
  .two-col { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 9; }
  .story-row { grid-template-columns: 12rem minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  .masthead-inner { flex-wrap: wrap; }
  .masthead-est { display: none; }
  .brand-mark { width: 48px; height: 48px; }
  .story-row { grid-template-columns: 1fr; }
  .story-row .card-media { aspect-ratio: 16 / 9; min-height: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .topbar-inner { gap: 0.4em 0.8em; }
  .accessibility-tools { margin-left: 0; width: 100%; }
}

/* ---------- Print ---------- */

@media print {
  .topbar, .mainnav, .site-footer, .cookie-banner, .sidebar, .breadcrumbs { display: none; }
  body { background: #ffffff; font-size: 12pt; }
  .article-body { max-width: none; }
  a { color: #000000; text-decoration: none; }
}
