/* mabstag.org.uk — one stylesheet, no dependencies.
   Fonts are self-hosted in /fonts (Overpass variable + IBM Plex Mono), so the
   strict CSP stays 'self'-only and there is no third-party request.
   Visual language: campaign leaflet — paper sheet, ink rules, sign-red,
   worksite orange, mono annotations. Colours are tokens: a palette change
   is one block per scheme. */

@font-face {
  font-family: "Overpass";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/overpass-var.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-600.woff2") format("woff2");
}

:root {
  --sheet: #fafaf7;          /* paper */
  --sheet-2: #f4f2ec;        /* deeper paper for alt bands */
  --panel: #ffffff;          /* cards sit on white */
  --ink: #1e2a32;            /* near-black blue-grey */
  --text: #24313a;
  --faint: #54626d;
  --tarmac: #3d4750;
  --os-blue: #3a7ca5;        /* Ordnance-Survey-ish blue */
  --wye: #7fb2d0;
  --sign-red: #c0392b;       /* triangle-sign red */
  --sign-red-ink: #a92e21;   /* red dark enough for text on paper */
  --route-green: #1e7145;    /* primary-route green */
  --site: #e07b2a;           /* worksite orange */
  --site-ink: #b45d14;       /* orange dark enough for text on paper */
  --rule: #d8d6ce;           /* hairlines */
  --ask-bg: #eff5ee;         /* pale green panel */
  --flag-bg: #fdf6e9;        /* pale amber panel */
  --strip-bg: #1e2a32;       /* top banner */
  --strip-fg: #edebe4;
  --strip-hi: #f2b270;
  --shadow: var(--ink);      /* hard offset shadows */

  --shell: 1080px;           /* header, footer, wide content */
  --prose: 66ch;             /* readable measure for body text */
}

@media (prefers-color-scheme: dark) {
  :root {
    --sheet: #131b21;
    --sheet-2: #18222a;
    --panel: #1c2731;
    --ink: #e8e6df;          /* borders/headings flip to paper */
    --text: #dfe4e8;
    --faint: #9aa8b3;
    --tarmac: #8d99a3;
    --os-blue: #6fa9cc;
    --wye: #4f7f9d;
    --sign-red: #d95b4b;
    --sign-red-ink: #e58274;
    --route-green: #4aa877;
    --site: #e88b44;
    --site-ink: #eda05f;
    --rule: #2e3b45;
    --ask-bg: #16251c;
    --flag-bg: #26200f;
    --strip-bg: #0c1215;
    --strip-fg: #e8e6df;
    --strip-hi: #f2b270;
    --shadow: #000000;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--sheet);
  color: var(--text);
  font: 400 clamp(16px, 0.96rem + 0.15vw, 17.5px)/1.6 "Overpass", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

.wrap {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

/* Readable measure for running text inside a wide shell. */
.prose > p,
.prose > ul,
.prose > ol:not(.ask),
.prose > h2,
.prose > h3,
.prose > .lede { max-width: var(--prose); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 12px; top: 12px; z-index: 60;
  padding: 10px 14px;
  background: var(--ink); color: var(--sheet);
}

:focus-visible { outline: 2px solid var(--os-blue); outline-offset: 2px; }

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

strong { font-weight: 700; }

/* ============ meeting strip ============ */

.strip {
  display: block;
  background: var(--strip-bg);
  color: var(--strip-fg);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
  padding: 9px 12px;
}
.strip b { color: var(--strip-hi); font-weight: 600; }
.strip:hover b { text-decoration: underline; }

/* ============ header + nav ============ */

header.site {
  border-bottom: 2px solid var(--ink);
  background: var(--sheet);
  position: sticky;
  top: 0;
  z-index: 50;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 auto;
  padding-block: 8px;
}
.brand .full {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
  max-width: 24ch; /* breaks as "Madley & Bridge Sollers / Traffic Action Group" */
  line-height: 1.35;
}

/* Toggle is revealed only when JS is running (html.js), so with JS off the
   nav below stays visible and usable rather than being sealed behind a
   button that cannot work. */
.navtoggle {
  display: none;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 7px 12px;
  cursor: pointer;
}
.navtoggle .bars { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
.navtoggle .bars::before,
.navtoggle .bars::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor;
}
.navtoggle .bars::before { top: -5px; }
.navtoggle .bars::after { top: 5px; }
.navtoggle[aria-expanded="true"] .bars { background: transparent; }
.navtoggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.navtoggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

nav.primary ul {
  display: flex;
  gap: clamp(12px, 2.2vw, 24px);
  list-style: none;
  margin: 0;
  padding: 0;
}
nav.primary a {
  display: block;
  padding: 6px 0;
  color: var(--faint);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 3px solid transparent;
}
nav.primary a:hover { color: var(--ink); }
nav.primary a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sign-red); }

@media (max-width: 800px) {
  html.js .navtoggle { display: inline-flex; }
  html.js nav.primary {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--sheet);
    border-bottom: 2px solid var(--ink);
    box-shadow: 0 10px 24px rgb(0 0 0 / 0.14);
    padding: 6px clamp(16px, 4vw, 32px) 14px;
  }
  html.js nav.primary.open { display: block; }
  nav.primary ul { flex-direction: column; gap: 0; }
  nav.primary a {
    padding: 13px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--rule);
  }
  nav.primary li:last-child a { border-bottom: none; }
  nav.primary a[aria-current="page"] { border-bottom-color: var(--rule); color: var(--sign-red-ink); }
  header.site .wrap { position: relative; }
}

/* ============ sections ============ */

main { display: block; }

.hero { padding-block: clamp(40px, 7vw, 72px); }
.hero.lead {
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(180deg, var(--sheet-2) 0%, var(--sheet) 100%);
}

.eyebrow {
  margin: 0 0 14px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--os-blue);
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--ink);
  max-width: 24ch;
}
h1 em { font-style: normal; color: var(--sign-red-ink); }
.hero .lede { margin: 0; color: var(--text); font-size: 1.07em; max-width: 58ch; }

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--ink);
}
h2 .no {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.6em;
  font-weight: 600;
  color: var(--site-ink);
  vertical-align: 0.35em;
  margin-right: 8px;
  letter-spacing: 0;
}
h3 { margin: 0 0 7px; font-size: 1.04rem; font-weight: 700; line-height: 1.3; color: var(--ink); }

.band { padding-block: clamp(36px, 5.5vw, 60px); }
.band.alt { background: var(--sheet-2); border-block: 1px solid var(--rule); }
.hero.lead + .band.alt { border-top: none; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: 0.45em; }
li:last-child { margin-bottom: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 28px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  background: var(--sign-red);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--shadow);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.btn.ghost { background: var(--sheet); color: var(--ink); }

/* ============ map figure ============
   The figure is a "printed map sheet": it keeps its paper background in both
   colour schemes so the fixed SVG colours always sit on the ground they were
   drawn for. */

.mapfig {
  margin: 26px 0 0;
  border: 2px solid #1e2a32;
  background: #fff;
  padding: 14px 10px 6px;
  overflow-x: auto;               /* on narrow screens the sheet scrolls */
  -webkit-overflow-scrolling: touch;
}
.mapfig svg { width: 100%; min-width: 640px; height: auto; display: block; }
.mapcap {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #54626d;
  padding: 8px 6px 6px;
  border-top: 1px solid #d8d6ce;
  margin-top: 10px;
}

/* ============ problems ============ */

.prob {
  border: 1px solid var(--rule);
  border-left: 5px solid var(--sign-red);
  background: var(--panel);
  padding: 16px 18px;
  margin-bottom: 14px;
  max-width: none;
}
.prob:last-child { margin-bottom: 0; }
.prob h3 { margin-bottom: 6px; }
.prob p { font-size: 0.95em; margin-bottom: 0; max-width: none; }

/* ============ figures / evidence ============ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.stat {
  margin: 0;
  padding: 16px 18px 14px;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-top: 6px solid var(--site);
}
.stat b {
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.95rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--ink);
}
.stat span { display: block; margin-top: 6px; font-size: 0.9rem; color: var(--text); }
.stat cite {
  display: block; margin-top: 9px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem; font-style: normal;
  color: var(--faint); letter-spacing: 0.02em;
}

/* Record cards: a claim pinned with its year. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 22px 16px;
  margin-top: 30px;
}
.card {
  padding: 18px 18px 14px;
  background: var(--panel);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  position: relative;
}
.card .yr {
  position: absolute;
  top: -13px;
  left: 14px;
  background: var(--site);
  border: 2px solid var(--ink);
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 12.5px;
  padding: 2px 10px;
}
.card h3 { margin: 4px 0 6px; font-size: 0.98rem; }
.card p { font-size: 0.92em; color: var(--text); margin-bottom: 0; }
.card .src,
.finding .src {
  display: block;
  margin-top: 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  color: var(--faint);
  border-top: 1px solid var(--rule);
  padding-top: 8px;
}

/* A finding: a claim with its source attached. */
.finding {
  padding: 18px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--panel);
  margin-bottom: 16px;
}
.finding:last-child { margin-bottom: 0; }
.finding > .ref {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--site-ink);
  margin-bottom: 6px;
}
.finding p { font-size: 0.96em; }
.finding p.src { margin-bottom: 0; }

blockquote {
  margin: 0 0 1em;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--sign-red);
  color: var(--ink);
  font-style: italic;
  font-weight: 600;
  max-width: var(--prose);
}
blockquote cite {
  display: block; margin-top: 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem; font-style: normal; font-weight: 400;
  color: var(--faint);
}

/* Wide content must scroll inside its own box — the page never scrolls
   sideways. */
.scroller {
  overflow-x: auto;
  margin: 22px 0 0;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.9rem; }
caption {
  text-align: left; padding: 12px 14px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--faint); border-bottom: 2px solid var(--ink);
}
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  font-weight: 700; background: var(--sheet-2); white-space: nowrap;
  border-bottom: 2px solid var(--ink);
}
td { font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }

/* The ask. */
.ask-box {
  background: var(--ask-bg);
  border: 2px solid var(--route-green);
  padding: 20px 22px;
  margin-top: 20px;
  max-width: none;
}
.ask-box h3 {
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--route-green);
  margin-bottom: 10px;
}
.ask-box p { max-width: none; }

.ask { counter-reset: ask; list-style: none; padding: 0; margin: 24px 0 0; max-width: none; }
.ask li {
  position: relative;
  padding: 16px 18px 16px 58px;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--panel);
  margin-bottom: 12px;
}
.ask li::before {
  counter-increment: ask;
  content: counter(ask);
  position: absolute; left: 16px; top: 16px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--route-green); color: #fff;
  border: 1.5px solid var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem; font-weight: 600;
}
.ask strong { display: block; margin-bottom: 3px; color: var(--ink); }
.ask span { color: var(--text); font-size: 0.94em; }

.note {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px dashed var(--faint);
  border-radius: 0;
  font-size: 0.94em;
  max-width: var(--prose);
}
.note.flag { background: var(--flag-bg); border: 1px solid var(--site-ink); }

/* ============ meeting panel ============
   Deliberately ink-on-ink in both schemes: it is the poster, not the page. */

.meet {
  background: #1e2a32;
  color: #edebe4;
  border: 2px solid #1e2a32;
  box-shadow: 6px 6px 0 var(--site);
  padding: 30px 26px;
  margin-top: 12px;
}
.meet .kicker {
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: #f2b270;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.meet h2 { color: #fff; margin: 10px 0 4px; }
.meet .when {
  display: flex; flex-wrap: wrap;
  gap: 8px 26px;
  margin: 14px 0 18px;
  font-size: 1.02rem; font-weight: 600;
}
.meet .when b { color: #f2b270; font-weight: 700; }
.meet a { color: #f2b270; text-decoration-color: #f2b270; }
.meet a:hover { color: #fff; }
.meet ul { list-style: none; margin: 0 0 18px; padding: 0; }
.meet li { padding-left: 22px; position: relative; margin-bottom: 9px; font-size: 0.95rem; color: #d7dce0; }
.meet li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 10px; height: 10px;
  background: var(--site); border: 1.5px solid #fff;
}
.meet li b { color: #fff; }
.meet .tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.84rem; color: #fff;
  border-top: 1px solid #46535d; padding-top: 14px; margin-bottom: 0;
  max-width: none;
}
.meet .tag b { color: #f2b270; }
.meet .btn { background: var(--sign-red); border-color: #fff; box-shadow: 3px 3px 0 #000; }

/* ============ footer ============ */

footer.site {
  border-top: 2px solid var(--ink);
  margin-top: clamp(40px, 7vw, 72px);
  background: var(--sheet-2);
}
footer.site .wrap { padding-block: 30px; }
.footnav { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 0 0 18px; padding: 0; }
.footnav a {
  color: var(--faint); text-decoration: none;
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.footnav a:hover { color: var(--ink); }
footer.site p {
  color: var(--faint);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.7;
  max-width: 90ch;
}

/* ============ placeholder marker ============
   Deliberately loud: unwritten copy must be impossible to publish by
   accident. Delete the class as each section is written, then this block. */

.todo {
  border-left: 3px solid var(--site-ink);
  background: var(--flag-bg);
  padding: 12px 16px;
}
.todo::before {
  content: "TO WRITE";
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7em; font-weight: 600; letter-spacing: 0.12em;
  color: var(--site-ink);
  margin-bottom: 4px;
}

@media print {
  .btn, .meet { box-shadow: none; }
  .strip, .navtoggle { display: none; }
}
