/* Pushing the Boat Out — News section (front page and story pages).
   Same look as cyberindex.org (the Cyber Risk Barometer): IBM Plex Sans, pale grey page
   with white panels, brick-red accent, a simple masthead with a bottom rule, and the same tokens
   for dark mode. Dark mode follows the system setting; the sun/moon button (js/theme.js) sets
   data-theme on <html> to override it. The share cards stay dark. */
:root {
  --bg: #f3f5f8; --surface: #ffffff; --ink: #0f1a2a; --ink-2: #465163; --muted: #6e7889; --rule: #dce1e9;
  --accent: #c2391a; --accent-hover: #9e2d13; --link: #2a78d6;
  --display: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
:root[data-theme="dark"] { --bg: #0d131c; --surface: #141c28; --ink: #e7ecf3; --ink-2: #aeb8c7; --muted: #808b9c; --rule: #263142; --accent: #f0714f; --accent-hover: #f58a6d; --link: #6aa8f0; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 64px; }
.wrap.wide { max-width: 1080px; }
.eyebrow { font: 500 .74rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.draft { color: var(--accent); font-weight: 700; }

/* ---------- masthead (as the holding page) ---------- */
.mast { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-block: 20px; border-bottom: 1px solid var(--rule); }
.mast b { font-family: var(--display); font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.mast-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.mast-nav a { color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.mast-nav a:hover { color: var(--ink); text-decoration: underline; }
.mast-nav a.on { color: var(--ink); }
.mast-nav .eyebrow { margin-left: 6px; }
.wrap:not(.wide) .mast-nav .eyebrow { display: none; }
@media (max-width: 760px) { .mast-nav .eyebrow { display: none; } .mast-nav { gap: 6px 14px; } }

/* ---------- front page ---------- */
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; margin-top: 48px; }
.hero h1 span { color: var(--accent); }
.hero .lede { font-size: 1.12rem; color: var(--ink-2); margin: 18px 0 0; max-width: 62ch; }
.front { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 36px; }
@media (max-width: 860px) { .front { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; }
.card h2 { font-size: 1.25rem; font-weight: 700; padding: 20px 20px 6px; }
.side { display: grid; gap: 20px; }
.side .sub-box { margin: 0; }
.side ul { margin: 0; padding: 4px 20px 18px; list-style: none; display: grid; gap: 10px; }
.side li a { display: block; color: var(--ink-2); line-height: 1.4; }
.side li a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.side li b { display: block; color: var(--ink); font-weight: 600; }
.side p { padding: 0 20px 18px; color: var(--ink-2); font-size: .95rem; }

/* featured carousel: each slide is the story's share card, which already carries the headline and
   standfirst, so under it there is only the tag, the date and the ‹ › controls. */
.feature { position: relative; display: grid; overflow: hidden; border-radius: 14px; background: var(--surface); border: 1px solid var(--rule); }
.slide { grid-area: 1 / 1; display: flex; flex-direction: column; opacity: 0; transition: opacity .5s; pointer-events: none; }
.slide.on { opacity: 1; z-index: 1; pointer-events: auto; }
.slide { padding: 26px 24px 64px; gap: 12px; }
.slide h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.slide p { color: var(--ink-2); font-size: 1.05rem; max-width: 60ch; }
.slide .go { color: var(--accent); font-weight: 600; margin-top: auto; }
.slide:hover h2 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.ctrl { position: absolute; right: 16px; bottom: 10px; z-index: 3; display: flex; gap: 8px; }
.ctrl button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); font: inherit; font-size: 20px; cursor: pointer; }
.ctrl button:hover { border-color: var(--accent); color: var(--accent); }
.count { position: absolute; right: 114px; bottom: 20px; z-index: 3; font-size: .82rem; font-weight: 600; color: var(--muted); }
.feature:not(:has(.ctrl)) .slide { padding-bottom: 26px; }
@media (max-width: 760px) { .slide { padding: 20px 18px 64px; } .ctrl { right: 12px; } .count { right: 110px; } }

/* latest stories, numbered */
.latest { margin-top: 20px; }
.latest ol { list-style: none; margin: 0; padding: 4px 12px 12px; }
.latest li + li { border-top: 1px solid var(--rule); }
.latest li a { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding: 12px 8px; border-radius: 10px; }
.latest li a:hover { background: var(--bg); }
.latest .n { width: 24px; height: 24px; margin-top: 1px; border-radius: 6px; background: var(--accent); color: #fff; font: 700 .8rem/24px var(--body); text-align: center; }
.latest .t { font-weight: 600; font-size: .95rem; line-height: 1.35; }
.latest .d { color: var(--muted); font-size: .8rem; margin-top: 2px; }

/* ---------- tiles ---------- */
.tile { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); transition: border-color .15s; }
.tile:hover { border-color: var(--accent); }
.tile .t { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.tile .d { color: var(--ink-2); font-size: .9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tile:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.band { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--rule); }
.band h2 { font: 500 .74rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr; } }

/* ---------- subscribe box (as the holding page) ---------- */
.sub-box { margin: 44px 0 8px; padding: 22px 20px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); }
.sub-box h2 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 700; padding: 0; }
.sub-box p { margin: 0 0 14px; color: var(--ink-2); padding: 0; }
.sub-form { display: flex; flex-wrap: wrap; gap: 10px; }
.sub-form input[type=email] { flex: 1 1 200px; min-width: 0; font: inherit; font-size: .95rem; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); }
.sub-form button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.sub-form button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.sub-form button[disabled] { opacity: .6; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sub-note { font-size: .76rem; color: var(--muted); margin-top: 10px; }
.sub-msg { font-size: .88rem; margin-top: 10px; min-height: 1.2em; }

/* ---------- footer (as the holding page) ---------- */
footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: .82rem; color: var(--muted); display: grid; gap: 6px; }
footer a { text-decoration: underline; text-underline-offset: 2px; }
footer .social { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 6px; }
footer .social a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 600; text-decoration: none; }
footer .social a:hover { border-color: var(--accent); color: var(--accent); }
footer .social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- story page ---------- */
.story .crumbs { color: var(--muted); font-size: .88rem; margin-top: 28px; }
.story .crumbs a:hover { color: var(--ink); text-decoration: underline; }
.story h1 { font-size: clamp(2rem, 5.4vw, 3rem); font-weight: 800; margin-top: 14px; }
.story .dek { color: var(--ink-2); font-size: 1.15rem; line-height: 1.45; margin-top: 16px; }
.story .meta { color: var(--muted); font-size: .88rem; margin-top: 14px; }
.story .hero { margin: 26px 0 8px; border-radius: 14px; border: 1px solid var(--rule); }
.prose { font-size: 1.05rem; line-height: 1.7; margin-top: 24px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.45rem; line-height: 1.25; margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5em; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 12px; border: 1px solid var(--rule); margin: 1.4em 0; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--ink); }
.prose li + li { margin-top: .4em; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 18px; margin-left: 0; color: var(--ink-2); }
.prose pre { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: .88rem; line-height: 1.5; }
.prose code { font-size: .9em; font-family: var(--mono); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.prose th { font: 500 .72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.prose em { color: var(--ink-2); }

/* Provenance caption under every picture, chart and table (same wording as the report and GovKPIs). */
.chart-caption { font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--muted); letter-spacing: .02em; margin: 8px 0 0 !important; }
.prose img + .chart-caption { margin-top: -12px !important; margin-bottom: 1.6em !important; }
.story .hero + .chart-caption { margin-top: 2px !important; margin-bottom: 1.6em !important; }
.prose table + .chart-caption, .prose pre + .chart-caption { margin-top: 8px !important; }
/* Pictures are <picture>s (portrait version on phones); keep the image rules working through the wrapper. */
.prose picture, .story picture { display: block; }
.prose picture img { margin: 1.4em 0; }
.prose picture + .chart-caption { margin-top: -12px !important; margin-bottom: 1.6em !important; }
.story picture + .chart-caption { margin-top: 2px !important; margin-bottom: 1.6em !important; }
@media (max-width: 640px) { .prose img, .story .hero { border-radius: 10px; } }

/* ---------- blog of the week card (front page side column) ---------- */
.blog-card li a .eyebrow { display: block; margin-bottom: 4px; }
.blog-card li a b { margin-bottom: 2px; }

/* ---------- round the world races (/races/) ---------- */
.race-updated { margin-top: 14px; }
.hero .lede a { color: var(--link); }
.race-year { font-size: 1.6rem; font-weight: 800; margin: 40px 0 12px; color: var(--ink); }
.race-year:first-child { margin-top: 28px; }
.race { display: grid; grid-template-columns: 190px 1fr; gap: 22px; padding: 22px 0; border-top: 1px solid var(--rule); }
.races .race:last-child { border-bottom: 1px solid var(--rule); }
.race-when { font-family: var(--mono); font-size: .85rem; line-height: 1.45; color: var(--ink-2); }
.race-date { font-weight: 600; color: var(--ink); }
.prov { font-weight: 400; color: var(--muted); font-size: .75rem; }
.badge { display: inline-block; margin-top: 10px; padding: 1px 9px; border-radius: 999px; font: 500 .66rem/1.7 var(--mono); text-transform: uppercase; letter-spacing: .1em; border: 1px solid var(--rule); color: var(--muted); }
.badge.racing { background: var(--accent); border-color: var(--accent); color: #fff; }
.badge.window { border-color: var(--accent); color: var(--accent); }
.badge.upcoming { color: var(--ink-2); border-color: var(--ink-2); }
.race-body h3 { font-size: 1.3rem; font-weight: 700; }
.race-body h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.race-body .eyebrow { margin-top: 5px; }
.race-body p { margin-top: 10px; color: var(--ink-2); }
.race-body p b { color: var(--ink); font-weight: 600; }
.race-finish { font-size: .9rem; }
.race-finish a { color: var(--link); }
.race.finished .race-body h3, .race.finished .race-body p { color: var(--muted); }
.race.finished .race-body p b { color: var(--ink-2); }
.race.finished .race-format, .race.finished .race-course { display: none; }
.race-about { color: var(--ink-2); max-width: 62ch; }
.race-about a { color: var(--link); }
@media (max-width: 640px) { .race { grid-template-columns: 1fr; gap: 10px; padding: 18px 0; } .badge { margin-top: 6px; } .race-year { font-size: 1.35rem; } }

/* weather and tides landing page (/weather/) */
.app-cta { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 22px; }
.app-btn { display: inline-block; background: var(--accent); color: #fff; font-weight: 600; padding: 12px 22px; border-radius: 10px; text-decoration: none; }
.app-btn:hover { filter: brightness(.92); }
.app-cta .eyebrow { margin: 0; }
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 18px; }
.howto .card { padding: 18px 20px; }
.howto .card h3 { font-size: 1.05rem; margin: 0 0 8px; }
.howto .card ol { padding-left: 1.2em; margin: 0; color: var(--ink); line-height: 1.55; }
.howto .card li + li { margin-top: .35em; }

/* ---------- UK & Ireland section pages ---------- */
.section-page { max-width: none; }
.map-embed { margin-top: 26px; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--surface); }
.map-embed iframe { display: block; width: 100%; height: min(72vh, 720px); border: 0; }
.map-links { margin: 14px 0 8px; color: var(--ink-2); }
.map-links a { color: var(--link); font-weight: 600; }
@media (max-width: 640px) { .map-embed { border-radius: 10px; } .map-embed iframe { height: 70vh; } }

/* ---------- Golden Globe Race tracker (/golden-globe-race/) ---------- */
.hero .crumbs { color: var(--muted); font-size: .88rem; margin-top: 28px; }
.hero .crumbs a:hover { color: var(--ink); text-decoration: underline; }
.hero .crumbs + h1 { margin-top: 14px; }
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.stat { padding: 16px 18px 18px; display: grid; gap: 4px; align-content: start; }
.stat b { font-family: var(--display); font-size: 1.6rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.stat b a:hover { text-decoration: underline; text-underline-offset: 3px; }
.stat span:last-child { color: var(--ink-2); font-size: .88rem; line-height: 1.4; }
@media (max-width: 860px) { .glance { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .glance { grid-template-columns: 1fr; } }
.notice { margin-top: 24px; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 10px; color: var(--ink-2); font-size: .92rem; }
.notice a { color: var(--link); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; }
table.ggr { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 780px; }
table.ggr th, table.ggr td { padding: 10px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
table.ggr th { border-top: 0; font: 500 .68rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-top: 14px; vertical-align: bottom; }
table.ggr th .sub, table.ggr td .sub { display: block; text-transform: none; letter-spacing: 0; font: 400 .78rem/1.3 var(--body); color: var(--muted); }
table.ggr .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ggr td.pos { font-family: var(--mono); font-weight: 600; color: var(--ink-2); }
table.ggr td.who b { font-weight: 600; }
table.ggr td.who a:hover { text-decoration: underline; text-underline-offset: 3px; }
table.ggr td .badge { margin: 0 0 0 6px; vertical-align: middle; }
table.ggr td.muted, table.ggr tr.retired td { color: var(--muted); }
table.ggr tr.retired td.who b { color: var(--ink-2); }
table.ggr td.prog { min-width: 140px; white-space: nowrap; }
.bar { display: inline-block; width: 80px; height: 6px; margin-right: 8px; border-radius: 4px; background: var(--rule); vertical-align: middle; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
tr.retired .bar i { background: var(--muted); }
.pct { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--ink-2); vertical-align: middle; }
.ggr-note { margin-top: 14px; color: var(--ink-2); font-size: .92rem; max-width: 76ch; }
.ggr-note a, .ggr-about a { color: var(--link); }
.ggr-note b { color: var(--ink); font-weight: 600; }
.ggr-feed { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.ggr-feed .card h3 { font-size: 1.1rem; font-weight: 700; padding: 18px 20px 4px; }
.ggr-feed ul { margin: 0; padding: 6px 20px 18px; list-style: none; display: grid; gap: 12px; }
.ggr-feed p { padding: 6px 20px 18px; color: var(--ink-2); }
.ggr-feed li a { display: block; color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
.ggr-feed li a:hover { color: var(--ink); }
.ggr-feed li a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.ggr-feed li a .eyebrow { display: block; margin-bottom: 3px; }
.ggr-feed li a b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 760px) { .ggr-feed { grid-template-columns: 1fr; } }
.ggr-about { color: var(--ink-2); max-width: 72ch; }
.ggr-about p + p { margin-top: 12px; }
.ggr-links { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ggr-links a { color: var(--link); font-weight: 600; }
