/* Weaver Metro proposal, public-sector style sheet
   Visual language inspired by the GOV.UK Design System (GDS) and departmental
   sites such as GOV.UK. This is an INDEPENDENT proposal: it deliberately
   avoids the Royal Arms / GOV.UK crown and any government branding. */

:root {
  --blue: #1d70b8;
  --blue-dark: #003078;
  --black: #0b0c0c;
  --white: #ffffff;
  --yellow: #fd0;
  --green: #00703c;
  --green-dark: #005a30;
  --red: #d4351c;
  --grey-1: #505a5f;   /* secondary text */
  --grey-2: #b1b4b6;   /* borders */
  --grey-3: #f3f2f1;   /* light background */
  --grey-4: #dee0e2;
  --purple: #4c2c92;
  --turquoise: #28a197;
  --brand: #0b0c0c;     /* masthead */
  --accent: #0b6e3f;    /* Weaver Metro accent (Weaver-style green) */
  --nav: #178a52;       /* primary navigation bar (lighter green) */
  --nav-hover: #0f7a48; /* navigation hover */
  --link-visited: #4c2c92;
  --focus-text: #0b0c0c;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-size: 19px;
  line-height: 1.31579;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.govuk-width-container { max-width: 1100px; margin: 0 15px; }
@media (min-width: 40.0625em) { .govuk-width-container { margin: 0 30px; } }
@media (min-width: 1160px) { .govuk-width-container { margin: 0 auto; } }

.main { padding: 30px 0 60px; display: block; }
@media (min-width: 40.0625em) { .main { padding: 40px 0 80px; } }

.grid { display: block; }
@media (min-width: 48.0625em) {
  .grid { display: flex; gap: 60px; align-items: flex-start; }
  .grid__side { flex: 0 0 260px; position: sticky; top: 20px; }
  .grid__main { flex: 1 1 auto; min-width: 0; max-width: 42em; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--yellow); color: var(--black);
  padding: 10px 15px; z-index: 100; font-weight: bold;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------- Masthead ---------- */
.masthead { background: var(--brand); border-bottom: 10px solid var(--accent); color: var(--white); }
.masthead__inner { display: flex; align-items: center; gap: 14px; padding: 10px 0; flex-wrap: wrap; }
.masthead__logo, .masthead__logo:visited { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.masthead__logo:focus { background: var(--yellow); box-shadow: 0 -2px var(--yellow), 0 4px var(--black); color: var(--black); outline: 3px solid transparent; }
.masthead__mark { flex: 0 0 auto; }
.masthead__wordmark { font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.masthead__tagline { font-size: 13px; color: #cdd1d4; font-weight: 400; margin-top: 3px; }
.masthead__spacer { flex: 1 1 auto; }
.masthead__meta { font-size: 14px; color: #cdd1d4; text-align: right; }
.masthead__meta strong { color: var(--white); }

/* ---------- Primary navigation ---------- */
.nav { background: var(--nav); border-bottom: 1px solid var(--accent); }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav__item { margin: 0; }
.nav__link, .nav__link:visited {
  display: block; color: var(--white); text-decoration: none;
  padding: 12px 18px; font-size: 16px; border-bottom: 4px solid transparent;
}
.nav__link:hover { background: var(--nav-hover); text-decoration: underline; }
.nav__link:focus { background: var(--yellow); color: var(--black); border-bottom-color: var(--black); outline: 3px solid transparent; }
.nav__link[aria-current="page"] { border-bottom-color: var(--white); font-weight: 700; }

/* ---------- Phase / disclaimer banner ---------- */
.phase-banner { border-bottom: 1px solid var(--grey-2); padding: 10px 0; }
.phase-banner__content { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 16px; }
.phase-tag {
  display: inline-block; background: var(--accent); color: var(--white);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px; white-space: nowrap;
}
.phase-banner__text { color: var(--grey-1); }
.phase-banner__text a { color: var(--blue); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 14px 0 0; font-size: 16px; }
.breadcrumbs__list { list-style: none; margin: 0; padding: 0; }
.breadcrumbs__item { display: inline-block; position: relative; margin-bottom: 5px; margin-left: 0.6em; padding-left: 0.6em; }
.breadcrumbs__item:first-child { margin-left: 0; padding-left: 0; }
.breadcrumbs__item:not(:first-child)::before {
  content: ""; position: absolute; top: .3em; left: -0.1em;
  width: 7px; height: 7px; border: solid var(--grey-1); border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
.breadcrumbs__item a, .breadcrumbs__item a:visited { color: var(--black); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 700; color: var(--black); margin-top: 0; }
.heading-xl { font-size: 2.5rem; line-height: 1.09; margin-bottom: 30px; }
.heading-l { font-size: 1.8rem; line-height: 1.1; margin: 40px 0 20px; }
.heading-m { font-size: 1.35rem; line-height: 1.2; margin: 30px 0 15px; }
.heading-s { font-size: 1.1rem; line-height: 1.25; margin: 25px 0 10px; }
@media (min-width: 40.0625em) {
  .heading-xl { font-size: 3rem; }
  .heading-l { font-size: 2.25rem; }
  .heading-m { font-size: 1.5rem; }
}
p { margin: 0 0 20px; }
.lead { font-size: 1.35rem; line-height: 1.4; }
.caption { color: var(--grey-1); font-size: 1.1rem; margin-bottom: 5px; display: block; }
.section-number { color: var(--grey-1); font-weight: 400; }

a { color: var(--blue); }
a:visited { color: var(--link-visited); }
a:hover { color: var(--blue-dark); text-decoration-thickness: 3px; }
a:focus { outline: 3px solid transparent; color: var(--focus-text); background: var(--yellow); box-shadow: 0 -2px var(--yellow), 0 4px var(--focus-text); text-decoration: none; }

ul, ol { margin: 0 0 20px; padding-left: 20px; }
li { margin-bottom: 8px; }

strong { font-weight: 700; }

/* ---------- Lists spaced ---------- */
.list-spaced li { margin-bottom: 14px; }

/* ---------- Inset text ---------- */
.inset { border-left: 10px solid var(--grey-2); padding: 12px 20px; margin: 25px 0; }
.inset > :last-child { margin-bottom: 0; }

/* ---------- Warning / notice ---------- */
.warning { display: flex; gap: 15px; align-items: flex-start; margin: 25px 0; }
.warning__icon {
  flex: 0 0 35px; width: 35px; height: 35px; border-radius: 50%;
  background: var(--black); color: var(--white); text-align: center;
  font-weight: 700; font-size: 26px; line-height: 33px; border: 3px solid var(--black);
}
.warning__text { font-weight: 700; }

/* ---------- Blue call-to-action panel ---------- */
.panel { background: var(--blue); color: var(--white); padding: 30px; margin: 30px 0; }
.panel h1, .panel h2, .panel h3, .panel h4 { color: var(--white); }
.panel a { color: var(--white); }
.panel > :last-child { margin-bottom: 0; }

/* ---------- Notification banner ---------- */
.notice { border: 5px solid var(--blue); margin: 25px 0; }
.notice__header { background: var(--blue); color: var(--white); padding: 8px 20px; font-weight: 700; }
.notice__body { padding: 20px; }
.notice__body > :last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 20px 0 30px; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
caption { text-align: left; font-weight: 700; margin-bottom: 12px; font-size: 1.1rem; }
th, td { text-align: left; padding: 11px 20px 11px 0; border-bottom: 1px solid var(--grey-2); vertical-align: top; }
thead th { border-bottom: 2px solid var(--black); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child.total-row td, tr.total-row td { border-top: 2px solid var(--black); font-weight: 700; }
tr.total-row td { border-bottom: 2px solid var(--black); }
.table-note { font-size: 0.95rem; color: var(--grey-1); margin-top: -10px; }

/* ---------- Key figure cards ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 30px 0; }
@media (min-width: 40.0625em) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .cards--4 { grid-template-columns: repeat(4, 1fr); } }
.card { border: 1px solid var(--grey-2); border-top: 5px solid var(--accent); padding: 20px; background: var(--white); }
.card__value { font-size: 2.2rem; font-weight: 700; line-height: 1; margin: 0 0 8px; }
.card__label { color: var(--grey-1); font-size: 1rem; margin: 0; }

/* ---------- Stat inline ---------- */
[data-fig] { font-variant-numeric: tabular-nums; }

/* ---------- Contents / side nav ---------- */
.contents { border-top: 2px solid var(--black); padding-top: 15px; font-size: 1rem; }
.contents__title { font-size: 1rem; text-transform: uppercase; letter-spacing: .03em; color: var(--grey-1); margin: 0 0 10px; }
.contents__list { list-style: none; margin: 0; padding: 0; }
.contents__list li { margin-bottom: 0; border-bottom: 1px solid var(--grey-4); }
.contents__list a { display: block; padding: 10px 0; text-decoration: none; }
.contents__list a:hover { text-decoration: underline; }
.contents__list a[aria-current="page"] { font-weight: 700; box-shadow: inset 4px 0 var(--accent); padding-left: 12px; color: var(--black); }

/* ---------- Numbered contents (on overview pages) ---------- */
.toc { border-top: 2px solid var(--black); }
.toc a { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--grey-4); text-decoration: none; }
.toc a:hover { background: var(--grey-3); text-decoration: underline; }
.toc .toc__num { color: var(--grey-1); flex: 0 0 auto; }

/* ---------- Buttons ---------- */
.button {
  display: inline-block; font-size: 1.1rem; font-weight: 400; padding: 10px 16px;
  background: var(--green); color: var(--white); border: none; border-radius: 0;
  box-shadow: 0 2px 0 var(--green-dark); text-decoration: none; cursor: pointer;
}
.button:visited { color: var(--white); }
.button:hover { background: var(--green-dark); color: var(--white); }
.button:focus { background: var(--yellow); color: var(--black); box-shadow: 0 2px 0 var(--black); outline: 3px solid transparent; }
.button--secondary { background: var(--grey-3); color: var(--black); box-shadow: 0 2px 0 #929191; }
.button--secondary:visited { color: var(--black); }
.button--secondary:hover { background: #dbdad9; color: var(--black); }
.button--start { font-weight: 700; font-size: 1.2rem; }
.button__arrow { margin-left: 8px; }

/* ---------- Tags ---------- */
.tag { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; color: var(--blue-dark); background: #d2e2f1; border-radius: 2px; }
.tag--green { color: var(--green-dark); background: #cce2d8; }
.tag--grey { color: var(--grey-1); background: var(--grey-3); }
.tag--red { color: #942514; background: #f6d7d2; }
.tag--yellow { color: #594d00; background: #fff7bf; }

/* ---------- Details / accordion ---------- */
details { margin: 20px 0; }
summary { color: var(--blue); cursor: pointer; font-size: 1rem; }
summary:hover { color: var(--blue-dark); }
summary:focus { outline: 3px solid transparent; color: var(--focus-text); background: var(--yellow); box-shadow: 0 -2px var(--yellow), 0 4px var(--focus-text); }
details > div { border-left: 5px solid var(--grey-2); padding: 15px 20px; margin-top: 10px; }

/* ---------- Version bar ---------- */
.version-bar { background: var(--grey-3); border-bottom: 1px solid var(--grey-2); font-size: 15px; }
.version-bar__inner { display: flex; align-items: center; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.version-bar__label { color: var(--grey-1); }
.version-bar select { font-size: 15px; padding: 4px 8px; border: 2px solid var(--black); background: var(--white); font-family: inherit; }
.version-bar__note { color: var(--grey-1); }
.version-bar__spacer { flex: 1 1 auto; }
.version-bar__hist { color: var(--blue); text-decoration: underline; }
.version-bar--archived { background: #fff7bf; border-color: #ffdd00; }

/* ---------- Maps ---------- */
.map-frame { border: 1px solid var(--grey-2); width: 100%; height: 520px; display: block; }
.map-card > .table-note { margin-top: 18px; }
.map-card { margin: 30px 0; }
.map-card__actions { margin-top: 10px; }

/* ---------- Route legend ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 15px 0 25px; padding: 0; list-style: none; font-size: 1rem; }
.legend li { display: flex; align-items: center; gap: 8px; margin: 0; }
.legend .swatch { width: 26px; height: 6px; border-radius: 3px; display: inline-block; }

/* ---------- Figures explorer ---------- */
.fig-search { padding: 10px 12px; font-size: 1rem; border: 2px solid var(--black); width: 100%; max-width: 420px; font-family: inherit; margin-bottom: 20px; }
.fig-group { margin-bottom: 35px; }
.fig-path { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.85rem; color: var(--purple); white-space: nowrap; }
.copy-btn { font-size: 0.8rem; padding: 2px 8px; border: 1px solid var(--grey-2); background: var(--grey-3); cursor: pointer; border-radius: 2px; }
.copy-btn:hover { background: var(--grey-4); }

/* ---------- Footer ---------- */
.footer { border-top: 10px solid var(--accent); background: var(--grey-3); padding: 40px 0 30px; margin-top: 40px; font-size: 1rem; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 40.0625em) { .footer__grid { grid-template-columns: 2fr 1fr; } }
.footer h2 { font-size: 1.1rem; }
.footer ul { list-style: none; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer__meta { border-top: 1px solid var(--grey-2); margin-top: 30px; padding-top: 20px; color: var(--grey-1); font-size: 0.95rem; }

/* ---------- Utilities ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-secondary { color: var(--grey-1); }
hr { border: none; border-top: 1px solid var(--grey-2); margin: 40px 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
