/* Shared NHS-style base used by landing, auth, dashboard, plan-move pages. */
@import url('/static/shared/import-result-viz.css?v=20260522-1');

:root {
  --nhsuk-text: #212b32;
  --nhsuk-link: #005eb8;
  --nhsuk-link-hover: #003087;
  --nhsuk-focus: #ffeb3b;
  --nhsuk-body-bg: #f0f4f5;
  --nhsuk-secondary-text: #4c6272;
  --nhsuk-border: #d8dde0;
  --nhsuk-card-shadow: 0 2px 8px rgba(33, 43, 50, 0.08);
  --nhsuk-success: #007f3b;
  --nhsuk-error: #d5281b;
  --nhsuk-panel: #fff;
  --nhsuk-warn: #ffb81c;
}

* {
  box-sizing: border-box;
}
body {
  font-family: Frutiger, 'Frutiger Linotype', Arial, sans-serif;
  background: var(--nhsuk-body-bg);
  color: var(--nhsuk-text);
  line-height: 1.5;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  color: var(--nhsuk-link);
}
a:hover {
  color: var(--nhsuk-link-hover);
}

/* Header — single bar height on every page that links app.css */
.nhsuk-header {
  background-color: #005eb8;
  padding: 0.625rem 0;
  flex-shrink: 0;
}
.nhsuk-header__container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
}
.nhsuk-header__service {
  display: flex;
  align-items: center;
}
.nhsuk-header__service-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
}
.nhsuk-header__service-logo:hover {
  color: #fff;
  text-decoration: underline;
}
.nhsuk-header__service-logo:focus {
  outline: 3px solid var(--nhsuk-focus);
  outline-offset: 2px;
}
.nhsuk-header__logo {
  flex-shrink: 0;
  height: 36px;
  width: 88px;
  fill: currentColor;
}
.nhsuk-header__service-logo--docpass {
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(20rem, 55vw);
}
.docpass-header-logo {
  display: block;
  width: auto;
  height: 2.75rem;
  max-height: 2.75rem;
  max-width: min(20rem, 55vw);
  object-fit: contain;
  object-position: left center;
}
.nhsuk-header__service-name {
  white-space: nowrap;
}

.nhsuk-topnav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #fff;
  font-size: 0.9375rem;
}
.nhsuk-topnav a,
.nhsuk-topnav button {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition:
    background-color 0.12s ease,
    transform 0.06s ease,
    box-shadow 0.06s ease;
}
.nhsuk-topnav a:hover,
.nhsuk-topnav button:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}
.nhsuk-topnav a:active,
.nhsuk-topnav button:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}
.nhsuk-topnav a:focus,
.nhsuk-topnav button:focus {
  outline: 3px solid var(--nhsuk-focus);
  outline-offset: 2px;
}
.nhsuk-topnav .nhsuk-topnav__email {
  font-weight: 600;
  white-space: nowrap;
}
.nhsuk-topnav__account {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.nhsuk-topnav__account-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.nhsuk-topnav__verify-wrap,
.nhsuk-topnav__alerts-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nhsuk-topnav__name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(14rem, 42vw);
}
.nhsuk-topnav__messages-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nhsuk-topnav__messages {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.55rem !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  line-height: 0;
}
.nhsuk-topnav__messages:hover {
  background: rgba(255, 255, 255, 0.12);
}
.nhsuk-topnav__messages--unread {
  border-color: #fff !important;
  background: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 0 0 2px rgba(213, 40, 27, 0.55);
}
.nhsuk-topnav__messages--unread .nhsuk-topnav__envelope,
.nhsuk-topnav__messages--unread .nhsuk-topnav__bell {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}
.nhsuk-topnav__bell {
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.nhsuk-topnav__bell-dot {
  display: none;
}
.nhsuk-topnav__messages--unread .nhsuk-topnav__bell-dot {
  display: block;
}
.nhsuk-topnav__messages--new {
  animation: nav-msg-attn 0.55s ease 3;
}
@keyframes nav-msg-attn {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.14); }
}
.nhsuk-topnav__envelope {
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.nhsuk-topnav__envelope-dot {
  display: none;
}
.nhsuk-topnav__messages--unread .nhsuk-topnav__envelope-dot {
  display: block;
}
.nhsuk-topnav__msg-preview {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 200;
  width: min(20rem, 92vw);
  background: #fff;
  color: var(--nhsuk-text);
  border: 1px solid var(--nhsuk-border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  text-align: left;
  pointer-events: auto;
}
/* Invisible bridge so moving from icon to panel does not drop hover */
.nhsuk-topnav__msg-preview::before {
  content: '';
  position: absolute;
  top: -0.55rem;
  left: 0;
  right: 0;
  height: 0.55rem;
}
.nhsuk-topnav__msg-preview[hidden] {
  display: none !important;
}
.nhsuk-topnav__msg-preview-head {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--nhsuk-secondary-text);
  border-bottom: 1px solid var(--nhsuk-border);
  background: var(--nhsuk-panel);
}
.nhsuk-topnav__msg-preview-body {
  max-height: 14rem;
  overflow-y: auto;
}
.nhsuk-topnav__msg-preview-section {
  border-bottom: 1px solid var(--nhsuk-border);
}
.nhsuk-topnav__msg-preview-section:last-child {
  border-bottom: none;
}
.nhsuk-topnav__msg-preview-subhead {
  margin: 0;
  padding: 0.45rem 0.85rem 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nhsuk-secondary-text);
  background: #fafbfc;
}
.nhsuk-topnav__msg-preview-section .nhsuk-topnav__msg-preview-empty {
  padding-top: 0.5rem;
  padding-bottom: 0.65rem;
}
.nhsuk-topnav__msg-preview-feet {
  border-top: 1px solid var(--nhsuk-border);
}
.nhsuk-topnav__msg-preview-feet .nhsuk-topnav__msg-preview-foot + .nhsuk-topnav__msg-preview-foot {
  border-top: 1px solid var(--nhsuk-border);
}
.nhsuk-topnav__msg-preview-item {
  display: block;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--nhsuk-border);
  text-decoration: none;
  color: inherit;
}
.nhsuk-topnav__msg-preview-item:last-child {
  border-bottom: none;
}
.nhsuk-topnav__msg-preview-item:hover,
.nhsuk-topnav__msg-preview-item:focus {
  background: #e8f4fb;
  outline: none;
}
.nhsuk-topnav__msg-preview-item--unread {
  background: #f8fafb;
}
.nhsuk-topnav__msg-preview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--nhsuk-text);
}
.nhsuk-topnav__msg-preview-unread {
  flex-shrink: 0;
  min-width: 1.1rem;
  padding: 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  color: #fff;
  background: #d5281b;
  border-radius: 999px;
}
.nhsuk-topnav__msg-preview-snippet {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--nhsuk-secondary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nhsuk-topnav__msg-preview-time {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--nhsuk-secondary-text);
}
.nhsuk-topnav__msg-preview-empty,
.nhsuk-topnav__msg-preview-loading {
  margin: 0;
  padding: 0.85rem;
  font-size: 0.875rem;
  color: var(--nhsuk-secondary-text);
}
.nhsuk-topnav__msg-preview-foot {
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  color: var(--nhsuk-link);
  text-decoration: none;
  border-top: 1px solid var(--nhsuk-border);
  background: var(--nhsuk-panel);
}
.nhsuk-topnav__msg-preview-foot:hover {
  background: #e8f4fb;
  text-decoration: underline;
}
.nhsuk-topnav__msg-badge {
  position: absolute;
  top: -0.4rem;
  right: -0.45rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  color: #fff;
  background: #d5281b;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #005eb8;
}

/* Ensure [hidden] is always respected even when child rules set display */
[hidden] {
  display: none !important;
}

/* Header hamburger menu */
.nhsuk-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nhsuk-menu__panel {
  display: none; /* hidden by default; JS removes [hidden] to show */
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 12.5rem;
  background: #fff;
  border: 1px solid var(--nhsuk-border);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(33, 43, 50, 0.22);
  padding: 0.35rem;
  z-index: 60;
}
.nhsuk-menu__panel:not([hidden]) {
  display: block;
}
.nhsuk-menu__panel a,
.nhsuk-menu__panel button {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  color: var(--nhsuk-link);
  background: transparent;
  border: none;
  padding: 0.6rem 0.7rem;
  border-radius: 4px;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
}
.nhsuk-menu__panel a:hover,
.nhsuk-menu__panel button:hover {
  background: rgba(0, 94, 184, 0.08);
}
.nhsuk-menu__panel a:focus,
.nhsuk-menu__panel button:focus {
  outline: 3px solid var(--nhsuk-focus);
  outline-offset: 1px;
}

/* Main */
.nhsuk-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1 1 auto;
  width: 100%;
}
.nhsuk-page-heading {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--nhsuk-text);
  letter-spacing: -0.02em;
}
.nhsuk-lead {
  font-size: 1.1875rem;
  color: var(--nhsuk-secondary-text);
  margin: 0 0 1.5rem 0;
  max-width: 42em;
}
.nhsuk-body-s {
  font-size: 0.9375rem;
  color: var(--nhsuk-secondary-text);
}
.nhsuk-muted {
  color: var(--nhsuk-secondary-text);
}

/* Buttons */
@keyframes nhsuk-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.nhsuk-button {
  background: #007f3b;
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    transform 0.08s ease,
    box-shadow 0.08s ease,
    opacity 0.15s ease;
}
.nhsuk-button:hover {
  background: #00662f;
  color: #fff;
}
.nhsuk-button:focus {
  outline: 3px solid var(--nhsuk-focus);
  outline-offset: 2px;
}
.nhsuk-button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.22);
}
.nhsuk-button[disabled],
.nhsuk-button[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}
.nhsuk-button[disabled]:active,
.nhsuk-button[aria-disabled='true']:active {
  transform: none;
  box-shadow: none;
}
.nhsuk-button.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
  padding-left: 2.35rem;
}
.nhsuk-button.is-loading::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 50%;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: -0.475rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nhsuk-btn-spin 0.65s linear infinite;
}
.nhsuk-button--secondary.is-loading::before {
  border-color: rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
}
.nhsuk-button--ghost.is-loading::before {
  border-color: rgba(0, 94, 184, 0.35);
  border-top-color: var(--nhsuk-link);
}
.nhsuk-button--secondary {
  background: var(--nhsuk-link);
}
.nhsuk-button--secondary:hover {
  background: var(--nhsuk-link-hover);
}
.nhsuk-button--secondary:active:not(:disabled) {
  background: #004070;
}
.nhsuk-button--ghost {
  background: transparent;
  color: var(--nhsuk-link);
  border: 2px solid var(--nhsuk-link);
}
.nhsuk-button--ghost:hover {
  background: rgba(0, 94, 184, 0.08);
  color: var(--nhsuk-link-hover);
}
.nhsuk-button--ghost:active:not(:disabled) {
  background: rgba(0, 94, 184, 0.18);
  box-shadow: inset 0 2px 4px rgba(0, 42, 92, 0.12);
}

/* Forms */
.nhsuk-form-group {
  margin-bottom: 1rem;
}
.nhsuk-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 1.0625rem;
}
.nhsuk-input {
  width: 100%;
  max-width: 28rem;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--nhsuk-border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
.nhsuk-input:focus {
  outline: 3px solid var(--nhsuk-focus);
  outline-offset: 0;
  border-color: var(--nhsuk-text);
}
.nhsuk-error-msg {
  color: var(--nhsuk-error);
  font-weight: 600;
  margin: 0.5rem 0 0;
}
.nhsuk-success-msg {
  color: var(--nhsuk-success);
  font-weight: 600;
  margin: 0.5rem 0 0;
}

/* Card / panel */
.nhsuk-card {
  background: var(--nhsuk-panel);
  border: 1px solid var(--nhsuk-border);
  border-radius: 4px;
  box-shadow: var(--nhsuk-card-shadow);
  padding: 1.5rem;
}
.nhsuk-card--accent {
  border-left: 4px solid var(--nhsuk-link);
}
.nhsuk-card h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 700;
}
.nhsuk-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

/* Action card grid */
.nhs-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 0;
}
.nhs-action-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--nhsuk-panel);
  border: 1px solid var(--nhsuk-border);
  border-left: 4px solid var(--nhsuk-link);
  border-radius: 4px;
  padding: 1.25rem 1.35rem 1.35rem;
  text-decoration: none;
  color: var(--nhsuk-text);
  box-shadow: var(--nhsuk-card-shadow);
  min-height: 140px;
}
.nhs-action-card:hover,
.nhs-action-card:focus {
  border-color: var(--nhsuk-link);
  box-shadow: 0 4px 16px rgba(0, 94, 184, 0.2);
  outline: none;
}
.nhs-action-card .nhs-action-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--nhsuk-link);
}
.nhs-action-card .nhs-action-desc {
  font-size: 0.9375rem;
  color: var(--nhsuk-secondary-text);
  line-height: 1.45;
}
.nhs-action-card .nhs-action-cta {
  margin-top: auto;
  font-weight: 600;
  color: var(--nhsuk-link);
}
.nhs-action-title.nhs-action-title--inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.nhs-inbox-pending-badge {
  display: inline-block;
  min-width: 1.35rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  background: var(--nhsuk-link);
  border-radius: 999px;
}
.nhs-inbox-pending-badge[data-empty="1"] {
  background: #768692;
}

/* Stat cards */
.nhs-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
}
.nhs-stat {
  background: var(--nhsuk-panel);
  border: 1px solid var(--nhsuk-border);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--nhsuk-card-shadow);
}
.nhs-stat__num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.nhs-stat__label {
  font-size: 0.9375rem;
  color: var(--nhsuk-secondary-text);
}
.nhs-stat--ok .nhs-stat__num {
  color: var(--nhsuk-success);
}
.nhs-stat--warn .nhs-stat__num {
  color: #996a00;
}
.nhs-stat--bad .nhs-stat__num {
  color: var(--nhsuk-error);
}

/* Hero (landing) — grows with the viewport so short pages are not a band of empty body colour */
.nhs-hero {
  flex: 1 1 auto;
  background: linear-gradient(180deg, #ffffff 0%, #eef3f5 55%, var(--nhsuk-body-bg) 100%);
  border-bottom: 1px solid var(--nhsuk-border);
  padding: 2.5rem 0;
}
.nhs-hero__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 760px) {
  .nhs-hero__inner {
    grid-template-columns: 1fr;
  }
}
.nhs-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--nhsuk-text);
}
.nhs-hero p.lead {
  font-size: 1.1875rem;
  color: var(--nhsuk-secondary-text);
  margin: 0 0 1.75rem;
  max-width: 36em;
}
.nhs-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.nhs-hero__steps {
  background: #fff;
  border: 1px solid var(--nhsuk-border);
  border-left: 4px solid var(--nhsuk-link);
  border-radius: 4px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--nhsuk-card-shadow);
}
.nhs-hero__steps h2 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nhsuk-link);
}
.nhs-hero__steps ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9375rem;
  color: var(--nhsuk-secondary-text);
}
.nhs-hero__steps li {
  margin: 0.25rem 0;
}

/* Auth two-column */
.nhs-auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 720px) {
  .nhs-auth-grid {
    grid-template-columns: 1fr;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Onboarding nudge bar ─────────────────────────────────────────────── */
.onb-nudge {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  background: #ccecf8;
  border: 1px solid #41b6e6;
  border-left: 4px solid #005eb8;
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  box-shadow: 0 2px 6px rgba(0, 94, 184, 0.08);
}
.onb-nudge__body {
  flex: 1;
  min-width: 0;
}
.onb-nudge__step {
  font-weight: 700;
  color: #005eb8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.onb-nudge__msg {
  color: var(--nhsuk-text);
  line-height: 1.45;
}
.onb-nudge__cta {
  display: inline-block;
  margin-left: 0.75rem;
  white-space: nowrap;
  font-weight: 600;
  color: #005eb8;
}
.onb-nudge__dismiss {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: -0.15rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--nhsuk-secondary-text);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}
.onb-nudge__dismiss:hover {
  color: var(--nhsuk-text);
  background: rgba(255, 255, 255, 0.65);
}

/* Mobile — keep header actions (Menu, icons) on screen */
@media (max-width: 640px) {
  .nhsuk-header {
    padding: 0.5rem 0;
  }
  .nhsuk-header__container {
    padding: 0 0.75rem;
    gap: 0.45rem;
    min-width: 0;
  }
  .nhsuk-header__service {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 38%;
  }
  .nhsuk-header__service-logo--docpass {
    max-width: 100%;
  }
  .docpass-header-logo {
    height: 2.25rem;
    max-height: 2.25rem;
    max-width: 100%;
  }
  .nhsuk-topnav {
    flex: 0 0 auto;
    gap: 0.3rem;
    min-width: 0;
  }
  .nhsuk-topnav__account {
    gap: 0.35rem;
    min-width: 0;
  }
  .nhsuk-topnav__name,
  .nhsuk-topnav .nhsuk-topnav__email {
    display: none;
  }
  .nhsuk-topnav__account-tools {
    gap: 0.25rem;
  }
  .nhsuk-topnav a,
  .nhsuk-topnav button {
    padding: 0.32rem 0.5rem;
    font-size: 0.8125rem;
  }
  .nhsuk-topnav__messages {
    padding: 0.28rem 0.42rem !important;
  }
  .nhsuk-topnav__envelope,
  .nhsuk-topnav__bell {
    width: 20px;
    height: 20px;
  }
  /* Message/verify previews: anchor to viewport so wide panel is not clipped left */
  .nhsuk-header {
    overflow: visible;
  }
  .nhsuk-topnav__messages-wrap .nhsuk-topnav__msg-preview,
  .nhsuk-topnav__verify-wrap .nhsuk-topnav__msg-preview,
  .nhsuk-topnav__alerts-wrap .nhsuk-topnav__msg-preview {
    position: fixed;
    z-index: 300;
    top: calc(0.5rem + 3.25rem + 0.45rem);
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    max-width: none;
  }
  .nhsuk-menu {
    flex-shrink: 0;
  }
  .nhsuk-main {
    padding: 1.5rem 1rem;
  }
  .nhsuk-page-heading {
    font-size: 1.75rem;
  }
}

/* Scrollable tab bars on narrow viewports */
@media (max-width: 640px) {
  .nhsuk-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .nhsuk-tabs::-webkit-scrollbar {
    display: none;
  }
  .nhsuk-tabs button {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .hr-segment {
    display: inline-flex;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hr-segment::-webkit-scrollbar {
    display: none;
  }
  .hr-segment button {
    flex-shrink: 0;
    white-space: nowrap;
  }
}
