:root {
  --paper: #fbfaf5;
  --panel: #ffffff;
  --ink: #18231f;
  --muted: #5d6a66;
  --line: #d9ded8;
  --teal: #0c6f68;
  --teal-dark: #084d49;
  --mint: #e2f2eb;
  --clay: #a84f3e;
  --gold: #e0b64f;
  --sky: #dfeaf4;
  --blue: #325f8a;
  --red: #9f332a;
  --green: #25724a;
  --amber: #b7791f;
  --shadow: 0 18px 42px rgba(24, 35, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: var(--teal-dark);
  text-underline-offset: 0.18em;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--teal);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 0.78rem;
  height: 2.35rem;
  justify-content: center;
  letter-spacing: 0;
  width: 2.35rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  min-width: 0;
}

.site-nav a {
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  padding: 0.5rem 0.7rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--mint);
  color: var(--teal-dark);
}

main {
  overflow: hidden;
}

.hero-section {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
  min-height: calc(86vh - 74px);
  padding: clamp(1.6rem, 3vw, 2.8rem) clamp(1rem, 5vw, 4rem);
}

.hero-copy {
  align-self: center;
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0 0 0.8rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.04;
  margin: 0;
}

h1 {
  font-size: clamp(2.35rem, 5.4vw, 4.45rem);
  max-width: 820px;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  color: var(--muted);
  margin: 0;
}

.hero-text {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  margin-top: 1rem;
  max-width: 650px;
}

.hero-actions,
.button-row,
.answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.button {
  align-items: center;
  border: 2px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.button-primary {
  background: var(--teal);
  color: #fff;
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.button-dark {
  background: var(--ink);
  color: #fff;
}

.hero-visual {
  align-self: center;
  margin: 0;
}

.hero-visual img {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.notice-band,
.benefit-band,
.data-section,
.page-section,
.link-panel,
.page-hero,
.warning-panel,
.check-tool {
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 4rem);
}

.notice-band,
.benefit-band {
  align-items: start;
  background: var(--mint);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
}

.notice-band p,
.benefit-band p {
  font-size: 1.1rem;
}

.page-section {
  background: var(--paper);
}

.section-heading {
  margin-bottom: 1.6rem;
  max-width: 780px;
}

.section-heading p:last-child {
  margin-top: 0.7rem;
}

.step-grid,
.route-grid,
.resource-grid,
.check-grid,
.data-grid,
.money-flow,
.regional-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-card,
.resource-card,
.route-card,
.check-card,
.data-card,
.faq-card,
.note-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
}

.step-card h3,
.resource-card h3,
.route-card h3,
.check-card h3,
.data-card h3,
.note-card h3 {
  margin-bottom: 0.55rem;
}

.step-number,
.resource-meta,
.status-pill {
  background: var(--sky);
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 900;
  margin-bottom: 0.9rem;
  padding: 0.25rem 0.55rem;
}

.status-pill.warning {
  background: #f7e6d8;
  color: var(--clay);
}

.compact-list {
  gap: 0.6rem;
}

.step-card a,
.resource-card {
  font-weight: 800;
}

.data-section {
  background: #f2eee5;
}

.figure-callout {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.5rem 0;
}

.figure-callout > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
}

.big-stat {
  color: var(--teal-dark);
  display: block;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.7rem;
  overflow-wrap: anywhere;
}

.big-list {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.big-list li {
  background: rgba(255, 255, 255, 0.72);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  padding: 0.9rem 1rem;
}

.quote-panel,
.warning-panel {
  background: var(--ink);
  color: #fff;
}

.quote-panel {
  border-radius: 8px;
  max-width: 920px;
  padding: clamp(1.4rem, 4vw, 2.5rem);
}

.quote-panel p,
.warning-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.warning-panel h2 {
  color: #fff;
  margin-bottom: 0.8rem;
}

.page-hero {
  background: var(--paper);
  max-width: 1000px;
}

.page-hero p:last-child {
  font-size: 1.15rem;
  margin-top: 1rem;
  max-width: 740px;
}

.link-panel {
  background: #fff;
}

.link-panel.major {
  background: var(--mint);
}

.link-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.link-grid a,
.source-link {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  padding: 0.9rem 1rem;
  text-decoration: none;
}

.link-grid a:hover,
.source-link:hover {
  border-color: var(--teal);
}

.resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-card {
  color: var(--ink);
  display: block;
  text-decoration: none;
}

.resource-card p {
  font-weight: 500;
}

.source-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 1rem;
}

.source-link.compact {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.7rem 0.85rem;
}

.handbook-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-grid {
  align-items: stretch;
}

.contact-list,
.tag-list {
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
}

.contact-list li,
.tag-list li {
  padding-left: 0.1rem;
}

.light-panel {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.light-panel p {
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.money-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.money-flow article,
.region-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
}

.money-flow article h3,
.region-card h3 {
  margin-bottom: 0.55rem;
}

.four-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.map-section {
  background: #edf3ef;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 4rem);
}

.map-layout {
  align-items: stretch;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 0.55fr);
}

.uk-map {
  background:
    radial-gradient(circle at 50% 18%, rgba(12, 111, 104, 0.22), transparent 18%),
    radial-gradient(circle at 58% 40%, rgba(50, 95, 138, 0.20), transparent 24%),
    radial-gradient(circle at 44% 65%, rgba(168, 79, 62, 0.18), transparent 26%),
    #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.uk-map::before {
  background: linear-gradient(155deg, rgba(12, 111, 104, 0.18), rgba(224, 182, 79, 0.14));
  border: 1px solid rgba(12, 111, 104, 0.25);
  border-radius: 46% 38% 42% 48%;
  content: "";
  height: 82%;
  left: 23%;
  position: absolute;
  top: 8%;
  transform: rotate(-7deg);
  width: 46%;
}

.region-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--amber);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 35, 31, 0.12);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.15;
  max-width: 10rem;
  padding: 0.55rem 0.65rem;
  position: absolute;
  z-index: 1;
}

.region-chip small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.north-west { left: 18%; top: 17%; }
.north-east { right: 14%; top: 12%; }
.yorkshire { right: 18%; top: 27%; }
.midlands { left: 38%; top: 42%; border-left-color: var(--green); }
.wales { left: 12%; top: 48%; }
.east { right: 12%; top: 46%; }
.thames { right: 25%; bottom: 29%; border-left-color: var(--red); }
.south { right: 14%; bottom: 16%; }
.south-west { left: 16%; bottom: 11%; }
.wessex { left: 42%; bottom: 16%; }

.map-key {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.4rem;
}

.map-key h3 {
  margin-bottom: 0.7rem;
}

.map-key .button {
  margin-top: 1rem;
}

.key-dot {
  border-radius: 999px;
  display: inline-block;
  height: 0.75rem;
  margin-right: 0.35rem;
  width: 0.75rem;
}

.key-good { background: var(--green); }
.key-watch { background: var(--amber); }
.key-poor { background: var(--red); }

.regional-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.region-card {
  display: grid;
  gap: 0.55rem;
}

.region-card.risk-high {
  border-top: 5px solid var(--red);
}

.region-card.risk-watch {
  border-top: 5px solid var(--amber);
}

.region-card.risk-good {
  border-top: 5px solid var(--green);
}

.region-card.risk-neutral {
  border-top: 5px solid var(--blue);
}

.meter-bar {
  background: var(--paper);
  border-radius: 999px;
  height: 0.8rem;
  margin-top: 0.45rem;
  overflow: hidden;
  position: relative;
}

.meter-bar::before {
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: var(--bar);
}

.meter-bar span {
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-tool {
  background: var(--mint);
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
}

.check-form,
.result-box,
.checklist,
.timeline {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
}

.check-form {
  display: grid;
  gap: 1rem;
}

label {
  color: var(--ink);
  display: grid;
  font-weight: 800;
  gap: 0.35rem;
}

input,
select {
  border: 1px solid #c9d0ca;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 2.8rem;
  padding: 0.65rem 0.75rem;
  width: 100%;
}

.field-help {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.result-box {
  align-self: start;
}

.result-box strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.result-box ul {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.result-metrics {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.result-metrics span {
  background: var(--paper);
  border-radius: 8px;
  padding: 0.7rem;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

table {
  background: #fff;
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

caption {
  font-weight: 900;
  padding: 1rem;
  text-align: left;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--mint);
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr);
}

.timeline-item span {
  align-items: center;
  background: var(--clay);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-card summary {
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 900;
}

.faq-answer {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.site-footer {
  align-items: start;
  background: #111916;
  color: #fff;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 2rem clamp(1rem, 5vw, 4rem);
}

.site-footer p {
  color: rgba(255, 255, 255, 0.76);
  max-width: 660px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.footer-links a,
.donate-link {
  color: #fff;
}

@media (max-width: 980px) {
  .site-header,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav,
  .footer-links {
    justify-content: flex-start;
  }

  .hero-section,
  .notice-band,
  .benefit-band,
  .check-tool {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .step-grid,
  .route-grid,
  .resource-grid,
  .check-grid,
  .data-grid,
  .money-flow,
  .regional-grid,
  .figure-callout,
  .link-grid,
  .two-column,
  .three-column,
  .handbook-grid,
  .four-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 0.7rem;
    padding: 0.7rem 1rem 0.55rem;
    position: sticky;
  }

  .brand {
    font-size: 0.96rem;
    gap: 0.55rem;
    white-space: nowrap;
  }

  .brand-mark {
    font-size: 0.7rem;
    height: 2rem;
    width: 2rem;
  }

  .site-nav {
    flex-wrap: nowrap;
    gap: 0.45rem;
    justify-content: flex-start;
    margin-inline: -1rem;
    overflow-x: auto;
    padding: 0 1rem 0.2rem;
    scroll-padding-inline: 1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    flex: 0 0 auto;
    font-size: 0.9rem;
    min-height: 2.35rem;
    padding: 0.55rem 0.75rem;
    white-space: nowrap;
  }

  .hero-section {
    gap: 1.35rem;
    padding: 1.55rem 1.25rem 2rem;
  }

  .hero-visual img {
    aspect-ratio: 16 / 10;
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(1.75rem, 9vw, 2.45rem);
  }

  h3 {
    font-size: 1.12rem;
  }

  p {
    font-size: 1rem;
  }

  .hero-text,
  .page-hero p:last-child,
  .notice-band p,
  .benefit-band p {
    font-size: 1rem;
  }

  .hero-actions,
  .button-row,
  .answer-actions {
    gap: 0.6rem;
  }

  .button {
    min-height: 3rem;
    padding: 0.8rem 0.95rem;
  }

  .button-row .button,
  .answer-actions .button {
    width: 100%;
  }

  .notice-band,
  .benefit-band,
  .data-section,
  .page-section,
  .link-panel,
  .page-hero,
  .warning-panel,
  .check-tool,
  .map-section {
    padding: 1.75rem 1.25rem;
  }

  .section-heading {
    margin-bottom: 1.15rem;
  }

  .eyebrow,
  .section-kicker {
    font-size: 0.72rem;
    margin-bottom: 0.65rem;
  }

  .step-card,
  .resource-card,
  .route-card,
  .check-card,
  .data-card,
  .faq-card,
  .note-card,
  .check-form,
  .result-box,
  .checklist,
  .timeline {
    padding: 1rem;
  }

  input,
  select {
    font-size: 1rem;
    min-height: 3rem;
  }

  .result-box strong {
    font-size: 1.45rem;
  }

  .timeline-item {
    gap: 0.7rem;
  }

  .timeline-item span {
    height: 2rem;
    width: 2rem;
  }

  .big-list li {
    padding: 0.8rem 0.9rem;
  }

  .site-footer {
    padding: 1.5rem 1.25rem;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .step-grid,
  .route-grid,
  .resource-grid,
  .check-grid,
  .data-grid,
  .money-flow,
  .regional-grid,
  .figure-callout,
  .link-grid,
  .two-column,
  .three-column,
  .handbook-grid,
  .four-stats,
  .result-metrics {
    grid-template-columns: 1fr;
  }

  .uk-map {
    display: grid;
    gap: 0.65rem;
    min-height: auto;
    padding: 1rem;
  }

  .uk-map::before {
    display: none;
  }

  .region-chip {
    max-width: none;
    position: static;
  }
}
