:root {
  --asphalt: #121417; --surface: #1C1F24; --line: #2A2E35; --white: #F4F4F2; --body: #D4D6DA; --muted: #A3A7AE;
  --amber: #F5A524; --amber-hi: #FFC14D; --indigo: #4F46E5; --indigo-bg: #1E1B4B; --indigo-line: #3730A3;
  --indigo-text: #C7D2FE; --teal: #2DD4BF; --accent: var(--amber);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif; --sans: Inter, system-ui, sans-serif;
  --radius: 16px; --wrap: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--asphalt); color: var(--white); font: 16px/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 13px; padding-bottom: 24px; }
.amber { color: var(--amber); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 9; background: var(--amber); color: var(--asphalt); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* brand */
.logo { display: inline-flex; flex-direction: column; gap: 4px; }
.logo-word, .sub-logo { font: 800 32px/1 var(--display); letter-spacing: -0.005em; }
.sub-logo { font-size: 22px; }
.dashes { display: inline-flex; gap: 5px; }
.dashes i { width: 13px; height: 3px; background: var(--accent); }
.dashes-lg { gap: 8px; margin: 14px 0 6px; }
.dashes-lg i { width: 26px; height: 6px; }

/* header */
.masthead { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--asphalt); z-index: 50; isolation: isolate; box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .8); }
.masthead-row { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.nav { display: flex; gap: 22px; flex: 1; overflow-x: auto; scrollbar-width: none; font-size: 15px; }
.nav a { color: var(--muted); white-space: nowrap; padding: 6px 0; }
.nav a:hover, .nav a[aria-current] { color: var(--white); }
.masthead-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 860px) {
  .masthead-row { flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
  .nav { order: 3; flex-basis: 100%; gap: 18px; }
  .masthead-actions { margin-left: auto; }
  .hide-sm { display: none !important; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); font: 600 15px var(--sans); color: var(--white); background: transparent; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn-amber { background: var(--amber); border-color: var(--amber); color: var(--asphalt); }
.btn-amber:hover { background: var(--amber-hi); }
.btn-indigo { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn-teal { background: var(--teal); border-color: var(--teal); color: var(--asphalt); }
.btn-block { width: 100%; }
.text-link { color: var(--amber); font-weight: 600; }
.text-link.teal { color: var(--teal); }

/* UKCP live strip */
.live-strip { display: block; background: var(--indigo-bg); border-bottom: 1px solid var(--indigo-line); }
.live-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
.live-label { color: var(--indigo-text); text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; }
.live-counts { display: flex; gap: 16px; font: 700 20px var(--display); }
.r { color: #FCA5A5; } .a { color: #FCD34D; } .g { color: #86EFAC; }
.live-latest { color: var(--indigo-text); }
.live-cta { margin-left: auto; color: var(--indigo-text); font-weight: 600; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-top: 18px; padding-bottom: 4px; }
.chips-wrap { flex-wrap: wrap; overflow: visible; padding-left: 0; padding-right: 0; }
.chip { white-space: nowrap; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.chip:hover { border-color: var(--muted); }
.chip-on { background: var(--amber); border-color: var(--amber); color: var(--asphalt); font-weight: 600; }
.chip-on-teal { background: var(--teal); border-color: var(--teal); color: var(--asphalt); font-weight: 600; }

/* layout */
.layout { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 24px; padding-bottom: 56px; }
.main-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.side-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px 20px; }
.rows { display: flex; flex-direction: column; }

/* meta + tags */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.tag { color: var(--accent); font-weight: 600; }

/* thumbs */
.thumb { aspect-ratio: 1200 / 630; border-radius: 14px; overflow: hidden; background: var(--line); position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb picture { display: contents; }
.thumb-fallback { position: absolute; inset: auto 0 0 0; padding: 14px 16px; font: 800 26px/1 var(--display); color: var(--accent); text-transform: uppercase; border-bottom: 6px solid var(--accent); }
.thumb-lead { border-radius: 0; aspect-ratio: 1200 / 630; }
.thumb-sm { width: 96px; aspect-ratio: 1; flex-shrink: 0; border-radius: 12px; }
.thumb-sm .thumb-fallback { font-size: 11px; padding: 6px; border-bottom-width: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* lead */
.lead { background: var(--surface); border-radius: 20px; overflow: hidden; }
.lead-body { padding: 22px 26px 28px; display: flex; flex-direction: column; gap: 12px; }
.lead-title, .story-title, .page-title { font: 700 clamp(32px, 5vw, 50px)/1.02 var(--display); margin: 0; }
.lead-link:hover .lead-title, .card-link:hover .card-title, .row-link:hover .row-title { color: var(--amber-hi); }
.standfirst { font-size: 18px; line-height: 1.55; color: var(--body); margin: 0; }

/* cards + rows */
.card-link { display: flex; flex-direction: column; gap: 12px; }
.card-body { display: flex; flex-direction: column; gap: 6px; }
.card-title { font: 700 23px/1.15 var(--display); margin: 0; }
.row-link { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.row-title { font: 700 20px/1.2 var(--display); margin: 6px 0 0; }

/* side panels */
.ukcp-card { background: var(--indigo-bg); border: 1px solid var(--indigo-line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.ukcp-card p { margin: 0; }
.ukcp-title { font: 700 24px var(--display); color: var(--indigo-text); }
.panel { background: var(--surface); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.panel p { margin: 0; }
.panel-outline { background: transparent; border: 1px solid var(--line); }
.panel-title, .section-title { font: 700 24px var(--display); margin: 0; }
.most-read { margin: 0; padding: 0; list-style: none; counter-reset: mr; display: flex; flex-direction: column; gap: 12px; }
.most-read li { counter-increment: mr; display: flex; gap: 12px; line-height: 1.4; font-size: 15px; }
.most-read li::before { content: counter(mr); font: 800 28px/1 var(--display); color: var(--amber); min-width: 18px; }
.ad-slot { height: 250px; border: 1px dashed var(--line); border-radius: 18px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }

/* story */
.story { padding-top: 32px; }
.story-head { max-width: 820px; display: flex; flex-direction: column; gap: 10px; }
.byline { font-size: 14px; margin: 4px 0 0; }
.story-img { margin: 26px 0 0; border-radius: 18px; overflow: hidden; max-width: 980px; }
.story-grid { display: flex; flex-wrap: wrap; gap: 40px; padding: 28px 0 40px; }
.prose { flex: 999 1 520px; min-width: 0; max-width: 720px; font-size: 18px; line-height: 1.7; color: var(--body); }
.prose h2 { font: 700 30px/1.1 var(--display); color: var(--white); margin: 32px 0 8px; }
.prose a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--white); }
.source { font-size: 15px; }
.prose .share a { text-decoration: none; color: var(--white); }
.share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 28px; font-size: 14px; }
.related { padding-bottom: 56px; }
.related .grid { margin-top: 16px; }

/* page heads */
.page-head { padding: 32px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; padding: 36px 0 56px; }
.empty { padding: 48px 0 72px; display: flex; flex-direction: column; gap: 14px; }

/* search */
.search-form { display: flex; gap: 8px; margin: 12px 0 16px; }
.search-form input { flex: 1; min-width: 0; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--white); padding: 0 14px; font: 16px var(--sans); }

/* training */
.trainers { display: flex; flex-direction: column; gap: 12px; padding: 18px 0; }
.trainer { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid transparent; }
.trainer:hover { border-color: var(--line); }
.trainer-featured { border: 1.5px solid var(--teal); }
.featured-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal); font-weight: 600; }
.trainer-name { font: 700 22px/1.15 var(--display); }
.list-cta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border: 1px dashed var(--line); border-radius: 14px; margin-bottom: 56px; }
.contact-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 56px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding-top: 32px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px 64px; padding-bottom: 24px; }
.footer-grid > div:first-child { flex: 1 1 280px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--muted); }
.footer-links a:hover { color: var(--white); }

/* phones: compact story rows, UKCP card straight after the lead */
.mobile-only { display: none; }
@media (max-width: 640px) {
  .mobile-only { display: block; }
  .desktop-only { display: none; }
  .grid { grid-template-columns: 1fr; gap: 0; }
  .card-link { flex-direction: row; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .card .thumb { width: 96px; aspect-ratio: 1; flex-shrink: 0; border-radius: 12px; }
  .card .thumb-fallback { font-size: 11px; padding: 6px; border-bottom-width: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card-title { font-size: 20px; }
  .lead-body { padding: 18px 18px 22px; }
  .layout { gap: 24px; padding-top: 16px; }
  .main-col { gap: 20px; }
}
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 8; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0 0 10px; color: var(--body); font-size: 14px; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---- share options (story pages) ---- */
.byline-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.byline-row .byline { margin: 0; }
.shr { margin-top: 36px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.shr-h { margin: 0 0 14px; font: 700 22px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--white); }
.shr-row { display: flex; flex-wrap: wrap; gap: 8px; }
.shr-b { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--asphalt); color: var(--white); font: 600 15px var(--sans); text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s; }
.prose .shr-b { color: var(--white); text-decoration: none; }
.shr-b svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shr-b svg .f { fill: currentColor; stroke: none; }
.shr-b:hover { border-color: var(--muted); }
.shr-b:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.shr-native { background: var(--amber); border-color: var(--amber); color: var(--asphalt); }
.prose .shr-native { color: var(--asphalt); }
.shr-wa svg { color: #25D366; } .shr-fb svg { color: #1877F2; } .shr-tg svg { color: #29A9EB; }
.shr-copy.ok { border-color: var(--teal); color: var(--teal); }
.shr-msg { min-height: 0; margin: 10px 0 0; font-size: 14px; color: var(--teal); }
/* compact row beside the byline: icons only */
.shr-compact { margin: 0; padding: 0; border: 0; background: none; display: flex; align-items: center; gap: 10px; }
.shr-compact .shr-b { padding: 0; width: 44px; justify-content: center; border-radius: 50%; }
.shr-compact .shr-b span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shr-compact .shr-msg { margin: 0; min-height: 0; }
/* phones: the full block becomes a tidy 3-up grid */
.shr-row > * { min-width: 0; }
.shr-b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .shr:not(.shr-compact) { padding: 16px; }
  .shr-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shr:not(.shr-compact) .shr-b { justify-content: center; padding: 0 10px; font-size: 15px; width: 100%; }
  .shr:not(.shr-compact) .shr-native { grid-column: 1 / -1; min-height: 52px; font-size: 16px; }
  .shr-compact .shr-row { display: flex; flex-wrap: wrap; }
}

/* ---- time-limited stories (closures, abnormal loads) after they've ended ---- */
.ev-banner { display: flex; gap: 12px; align-items: baseline; margin: 0 0 22px; padding: 14px 18px; border-radius: 12px;
  background: rgba(245, 165, 36, .10); border: 1px solid rgba(245, 165, 36, .45); color: var(--white); font-size: 16px; line-height: 1.45; }
.ev-banner b { flex: none; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--amber); }
.ev-banner a { color: var(--amber); }
.ev-reopened { background: rgba(45, 212, 191, .10); border-color: rgba(45, 212, 191, .45); }
.ev-reopened b { color: var(--teal); }
.ev-tag { margin-left: 8px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* ---- follow us (Facebook / YouTube) ---- */
.follow { margin-top: 20px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.follow-h { font: 700 24px/1.05 var(--display); color: var(--white); text-transform: uppercase; letter-spacing: .02em; }
.follow p { margin: 8px 0 14px; color: var(--body); font-size: 15px; line-height: 1.45; }
.follow-row { display: grid; gap: 8px; }
.fbbtn { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: 12px; background: #1877F2; color: #fff; text-decoration: none; }
.fbbtn:hover { background: #2d86f5; }
.fbbtn svg { width: 24px; height: 24px; fill: #fff; flex: none; }
.fbbtn span { display: flex; flex-direction: column; line-height: 1.2; }
.fbbtn b { font: 700 16px var(--sans); }
.fbbtn small { font-size: 13px; opacity: .85; }
.follow-yt { display: inline-block; margin-top: 12px; color: var(--muted); font-size: 14px; text-decoration: none; }
.follow-yt:hover { color: var(--white); }
.social-icons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.social-icons a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--white); text-decoration: none; font-size: 14px; }
.social-icons a:hover { border-color: var(--muted); }
.social-icons svg { width: 18px; height: 18px; fill: currentColor; }
.social-icons a:nth-child(-n+2) svg { fill: #1877F2; }
.social-icons a:last-child svg { fill: #FF0033; }

/* ---- Keep On Training ticker (home) ---- */
.ticker { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.ticker-label { flex: none; font: 800 15px/1 var(--display); letter-spacing: .04em; color: var(--white); text-decoration: none; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ticker-label span { color: #2DD4BF; }
.ticker-viewport { flex: 1; min-width: 0; overflow: hidden; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker 120s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; list-style: none; margin: 0; padding: 0; }
.ticker-list a { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 22px 10px 0; color: var(--body); text-decoration: none; white-space: nowrap; font-size: 14px; }
.ticker-list a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2DD4BF; margin: 0 4px 0 22px; align-self: center; }
.ticker-list a:hover strong { color: #2DD4BF; }
.ticker-list strong { color: var(--white); font-weight: 600; }
.ticker-list span { color: var(--muted); }
.ticker-list em { font-style: normal; font-size: 12px; color: #2DD4BF; border: 1px solid rgba(45, 212, 191, .35); border-radius: 999px; padding: 1px 8px; }
.ticker-star { color: var(--amber, #F5A524); font-weight: 400; }
.ticker-cta { flex: none; font-size: 13px; font-weight: 600; color: #2DD4BF; text-decoration: none; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 700px) { .ticker-cta { display: none; } .ticker-label { font-size: 13px; padding: 8px 9px; } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } .ticker-viewport { overflow-x: auto; } }

/* ---- previous / next story ---- */
.story-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
.story-nav-link { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--white); }
.story-nav-link:hover { border-color: var(--muted); }
.story-nav-link strong { font-weight: 600; line-height: 1.35; }
.story-nav-next { text-align: right; }
@media (max-width: 640px) { .story-nav { grid-template-columns: 1fr; } .story-nav-next { text-align: left; } }
