:root {
  --nhs-blue: #005eb8;
  --nhs-dark-blue: #003087;
  --nhs-bright-blue: #0072ce;
  --nhs-green: #007f3b;
  --nhs-red: #da291c;
  --nhs-yellow: #ffeb3b;
  --nhs-pale-grey: #f0f4f5;
  --nhs-mid-grey: #768692;
  --nhs-dark-grey: #425563;
  --nhs-black: #212b32;
  --nhs-white: #ffffff;
  --border: #d8dde0;
  --focus: #ffeb3b;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--nhs-black);
  background: var(--nhs-white);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 19px;
  line-height: 1.5;
}

a {
  color: var(--nhs-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--nhs-dark-blue);
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 4px solid var(--focus);
  outline-offset: 0;
  box-shadow: 0 0 0 4px var(--nhs-black);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11em;
  margin-bottom: 24px;
  font-size: 56px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 24px;
  font-size: 32px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.25;
}

.container {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 10;
  padding: 8px 12px;
  color: var(--nhs-black);
  background: var(--focus);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  color: var(--nhs-white);
  background: var(--nhs-blue);
}

.header-inner {
  display: flex;
  min-height: 86px;
  align-items: center;
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  width: 102px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 3px solid var(--nhs-white);
  color: var(--nhs-white);
  background: var(--nhs-white);
  background: transparent;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.brand-mark:hover {
  color: var(--nhs-white);
}

.service-name {
  display: grid;
  gap: 2px;
  font-size: 24px;
  font-weight: 700;
}

.service-subtitle {
  font-size: 16px;
  font-weight: 400;
}

.menu-button {
  display: none;
  min-height: 44px;
  margin-left: auto;
  border: 2px solid var(--nhs-white);
  padding: 8px 14px;
  color: var(--nhs-white);
  background: transparent;
  font: inherit;
  font-weight: 700;
}

.primary-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  background: var(--nhs-dark-blue);
}

.nav-inner {
  display: flex;
  gap: 36px;
}

.nav-inner a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: var(--nhs-white);
  font-weight: 700;
  text-decoration: none;
}

.nav-inner a:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.hero-band {
  padding: 56px 0;
  background: var(--nhs-pale-grey);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}

.lead {
  max-width: 36em;
  margin-bottom: 20px;
  font-size: 24px;
  line-height: 1.35;
}

.phase-tag {
  display: inline-block;
  margin-bottom: 20px;
  padding: 4px 8px;
  color: var(--nhs-white);
  background: var(--nhs-dark-grey);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  border: 0;
  border-bottom: 4px solid #00401e;
  padding: 10px 22px;
  color: var(--nhs-white);
  background: var(--nhs-green);
  box-shadow: none;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.notice {
  max-width: 680px;
  margin-bottom: 32px;
  border-left: 8px solid var(--nhs-dark-blue);
  padding: 16px 20px;
  background: var(--nhs-white);
}

.notice strong {
  display: block;
  margin-bottom: 4px;
}

.button:hover {
  color: var(--nhs-white);
  background: #006b31;
}

.button:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.status-panel {
  border-top: 8px solid var(--nhs-blue);
  padding: 24px;
  background: var(--nhs-white);
}

.summary-list {
  margin: 24px 0 0;
}

.summary-list div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

.summary-list dt {
  font-weight: 700;
}

.summary-list dd {
  margin: 0;
}

.task-section,
.form-section {
  padding: 56px 0;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.task-card {
  border: 1px solid var(--border);
  border-top: 6px solid var(--nhs-blue);
  padding: 24px;
  background: var(--nhs-white);
}

.task-card p {
  margin-bottom: 0;
}

.information-band {
  padding: 48px 0;
  background: var(--nhs-pale-grey);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}

.warning-callout {
  border: 4px solid var(--nhs-red);
  padding: 20px;
  background: var(--nhs-white);
}

.warning-callout h3 {
  color: var(--nhs-red);
}

.pathway-list {
  max-width: 720px;
  margin: 0;
  padding-left: 28px;
}

.pathway-list li {
  margin-bottom: 16px;
}

.stats-section {
  padding: 56px 0 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.metric-card {
  border: 1px solid var(--border);
  border-left: 8px solid var(--nhs-blue);
  padding: 24px;
  background: var(--nhs-white);
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--nhs-dark-grey);
  font-size: 16px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.1;
}

.metric-card p {
  margin-bottom: 0;
}

.form-intro {
  max-width: 700px;
}

.care-form {
  max-width: 720px;
}

.error-summary {
  margin-bottom: 32px;
  border: 4px solid var(--nhs-red);
  padding: 20px;
}

.error-summary h3 {
  margin-bottom: 12px;
}

.error-summary ul {
  margin-bottom: 0;
  padding-left: 24px;
}

.form-group {
  margin-bottom: 32px;
  border: 0;
  padding: 0;
}

.form-group.has-error {
  border-left: 5px solid var(--nhs-red);
  padding-left: 16px;
}

.label,
legend.label {
  display: block;
  margin-bottom: 8px;
  color: var(--nhs-black);
  font-size: 24px;
  font-weight: 700;
}

.hint {
  margin-bottom: 12px;
  color: var(--nhs-dark-grey);
}

.error-message {
  margin-bottom: 12px;
  color: var(--nhs-red);
  font-weight: 700;
}

.input,
.textarea {
  width: 100%;
  max-width: 520px;
  border: 2px solid var(--nhs-black);
  border-radius: 0;
  padding: 8px;
  color: var(--nhs-black);
  background: var(--nhs-white);
  font: inherit;
}

.textarea {
  max-width: 640px;
  resize: vertical;
}

.input-small {
  width: 76px;
}

.input-year {
  width: 108px;
}

.date-input {
  display: flex;
  gap: 20px;
  align-items: end;
}

.date-input label {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
}

.radios {
  display: grid;
  gap: 14px;
}

.radios label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
}

.radios input {
  width: 32px;
  height: 32px;
  margin: 0;
}

.confirmation {
  margin-top: 24px;
  border-left: 8px solid var(--nhs-green);
  padding: 20px 24px;
  background: #e9f5ee;
}

.confirmation p {
  margin-bottom: 0;
}

.site-footer {
  padding: 40px 0;
  color: var(--nhs-white);
  background: var(--nhs-dark-grey);
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.site-footer h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.site-footer p {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--nhs-white);
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

  .header-inner {
    min-height: 74px;
    gap: 14px;
  }

  .service-name {
    font-size: 19px;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
  }

  .primary-nav {
    display: none;
  }

  .primary-nav.is-open {
    display: block;
  }

  .nav-inner {
    display: grid;
    gap: 0;
  }

  .nav-inner a {
    border-top: 1px solid rgba(255, 255, 255, 0.28);
  }

  .hero-band,
  .task-section,
  .form-section {
    padding: 36px 0;
  }

  .hero-layout,
  .two-column,
  .task-grid,
  .metric-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .lead {
    font-size: 20px;
  }

  .status-panel,
  .task-card,
  .warning-callout {
    padding: 20px;
  }

  .summary-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .date-input {
    gap: 14px;
  }

  .footer-layout {
    display: grid;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 24px, var(--max-width));
  }

  .brand-mark {
    width: 82px;
    height: 36px;
    font-size: 25px;
  }

  .service-name {
    max-width: 9em;
  }

  h1 {
    font-size: 36px;
  }

  .date-input {
    flex-wrap: wrap;
  }
}
