/* breakdown-cover.net — single stylesheet, no framework, no web fonts. */

:root {
  --bg:        #f6f7f8;
  --surface:   #ffffff;
  --border:    #d9dee3;
  --text:      #1b232c;
  --muted:     #5a6673;
  --link:      #0a5ca8;
  --link-hover:#083f74;
  --accent:    #b25a00;      /* hi-vis amber, darkened for contrast on light */
  --masthead:  #1c6cba;      /* motoring blue */
  --masthead-t:#ffffff;
  --masthead-s:#d3e5f7;      /* secondary text on the masthead */
  --navbar:    #14538f;
  --shadow:    0 1px 2px rgba(16,24,32,.06), 0 4px 12px rgba(16,24,32,.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #11161b;
    --surface:   #19212a;
    --border:    #2c3945;
    --text:      #e6ecf2;
    --muted:     #9fb0be;
    --link:      #79b8f3;
    --link-hover:#a9d2f8;
    --accent:    #f0a03c;
    --masthead:  #14497c;
    --masthead-t:#f1f7fd;
    --masthead-s:#bcd4ec;
    --navbar:    #0f3862;
    --shadow:    none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

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

/* ------------------------------------------------------------------ header */
.masthead { background: var(--masthead); color: var(--masthead-t); }

.masthead-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding: .9rem 0;
}
/* The logo is a transparent GIF of dark text, drawn for a white background.
   It sits on a white plate so it stays legible on the blue masthead. */
.brand {
  display: inline-flex; align-items: center;
  background: #fff; border-radius: 6px; padding: .45rem .7rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.brand img { display: block; width: auto; height: 46px; }

.tagline {
  margin: 0; color: var(--masthead-s); font-size: .82rem;
  letter-spacing: .09em; text-transform: uppercase;
}

.mainnav { background: var(--navbar); border-top: 3px solid var(--accent); }
.mainnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
}
.mainnav a {
  display: block; padding: .8rem 1rem;
  color: #dce8f6; text-decoration: none; font-weight: 600; font-size: .95rem;
}
.mainnav a:hover,
.mainnav a:focus-visible { background: rgba(255,255,255,.09); color: #fff; }
.mainnav a[aria-current] { box-shadow: inset 0 -3px 0 var(--accent); color: #fff; }

/* ------------------------------------------------------------- breadcrumbs */
.crumbs { border-bottom: 1px solid var(--border); background: var(--surface); }
.crumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: .4rem;
  margin: 0; padding: .55rem 0; font-size: .85rem; color: var(--muted);
}
.crumbs li + li::before { content: "›"; margin-right: .4rem; color: var(--muted); }

/* -------------------------------------------------------------------- main */
main { padding: 2rem 0 2.5rem; }

/* The reading column is narrower than the page furniture and centred, so prose
   is not stranded against the left edge on a wide screen. Card grids and the
   two-column hub blocks break back out to the full page width below. */
main .wrap { width: min(100% - 2.5rem, 42rem); }

main .cards,
main .cols,
/* the heading (and any standfirst) introducing a full-width block goes with it,
   so the block does not appear to start further left than its own title */
main h2:has(+ .cards),
main h2:has(+ .cols),
main h2:has(+ p + .cards),
main h2:has(+ p + .cols),
main h2:has(+ p + p + .cols),
main h2:has(+ .note + .cols),
main p:has(+ .cards),
main p:has(+ .cols),
main p:has(+ p + .cols),
main .note:has(+ .cols) {
  margin-inline: calc(50% - min(50vw - 1.25rem, 34rem));
}

h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 {
  margin: 0 0 1.4rem; font-size: clamp(1.7rem, 1.15rem + 2vw, 2.5rem);
  letter-spacing: -.015em;
}
h2 { margin: 2.2rem 0 .7rem; font-size: clamp(1.25rem, 1.05rem + .7vw, 1.55rem); }
h3 { margin: 1.6rem 0 .5rem; font-size: 1.1rem; }

main ul, main ol { padding-left: 1.2rem; }
main ul.cards { padding-left: 0; }
main li { margin: .3rem 0; }

blockquote {
  margin: 1.5rem 0; padding: .2rem 0 .2rem 1.1rem;
  border-left: 3px solid var(--accent); color: var(--muted); font-style: italic;
}

figure { margin: 1.6rem 0; }
figure img, .lead-img {
  border-radius: 6px; border: 1px solid var(--border); box-shadow: var(--shadow);
}
figcaption { margin-top: .45rem; font-size: .85rem; color: var(--muted); }

.lede { font-size: 1.08rem; color: var(--text); }

.reviewed {
  margin: -.9rem 0 1.5rem; font-size: .8rem; color: var(--muted);
  letter-spacing: .02em;
}

/* source citation line under a stat or claim */
.src { font-size: .85rem; color: var(--muted); }

/* two-column prose used on the hub pages */
.cols {
  display: grid; gap: 0 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}
.cols > div > :first-child { margin-top: 0; }

/* -------------------------------------------------------------------- cards */
.cards {
  list-style: none; margin: 1.2rem 0 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 1rem 1.1rem; box-shadow: var(--shadow);
}
.card > a {
  font-weight: 600; font-size: 1.02rem; text-decoration: none;
  display: inline-block; margin-bottom: .3rem;
}
.card > a:hover { text-decoration: underline; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; max-width: none; }
.card img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 5px; margin-bottom: .7rem; border: 1px solid var(--border);
}

/* callout box for policy summaries */
.note {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: 6px;
  padding: .9rem 1.1rem; margin: 1.5rem 0;
}
.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- related */
.related { border-top: 1px solid var(--border); background: var(--bg); padding: 1.8rem 0; }
.related h2 { margin: 0; font-size: 1.15rem; }

/* ------------------------------------------------------------------ footer */
.sitefoot {
  background: var(--masthead); color: var(--masthead-s);
  border-top: 3px solid var(--accent); padding: 1.6rem 0 2rem; margin-top: 0;
}
.sitefoot ul {
  list-style: none; margin: 0 0 .9rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .3rem 1.2rem;
}
.sitefoot a { color: #e7eff8; text-decoration: none; font-size: .92rem; }
.sitefoot a:hover { text-decoration: underline; }
.small { margin: .35rem 0; font-size: .82rem; }
.disclaimer { color: var(--masthead-s); max-width: 70ch; opacity: .85; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
