:root {
  --ink: #10243f;
  --muted: #5d6d7f;
  --line: #d8e2ea;
  --paper: #f3f7f8;
  --white: #ffffff;
  --teal: #12343b;
  --blue: #235ca8;
  --red: #bd3441;
  --gold: #b27b20;
  --shadow: 0 18px 48px rgba(16, 36, 63, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
button, input, select { font: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(14px, 3vw, 40px);
  min-height: 64px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--blue) 70%, var(--red));
  color: #fff;
  font-weight: 900;
}
.brand strong, .brand small { display: block; letter-spacing: 0; }
.brand strong { font-size: 0.98rem; line-height: 1.1; }
.brand small { color: var(--red); font-size: 0.68rem; font-weight: 900; }
.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 5px 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}
.top-nav a {
  padding: 5px 0;
  text-decoration: none;
}
.top-nav a:hover { color: var(--teal); }
.nav-primary {
  padding: 6px 10px !important;
  border-radius: 8px;
  background: var(--teal);
  color: #fff !important;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.78fr);
  gap: clamp(18px, 4vw, 50px);
  align-items: end;
  min-height: min(620px, calc(100vh - 64px));
  padding: clamp(34px, 7vw, 88px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(18,52,59,0.92), rgba(18,52,59,0.72) 48%, rgba(18,52,59,0.22)),
    radial-gradient(circle at 82% 18%, rgba(189,52,65,0.28), transparent 28%),
    linear-gradient(135deg, #12343b, #235ca8 55%, #f3f7f8);
  color: #fff;
}
.hero-copy {
  max-width: 860px;
  position: relative;
  z-index: 2;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero .eyebrow { color: #ffd4d8; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
  color: var(--teal);
  line-height: 1.08;
  letter-spacing: 0;
}
.hero h1 {
  max-width: 920px;
  color: #fff;
  font-size: clamp(2.35rem, 6vw, 5rem);
  overflow-wrap: normal;
}
h2 { font-size: clamp(1.65rem, 3vw, 2.7rem); }
h3 { font-size: 1rem; }
.lede {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}
.co-brand {
  color: #ffe0a8;
  font-weight: 800;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.hero-media {
  align-self: center;
  justify-self: end;
  width: min(100%, 560px);
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255,255,255,0.36);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.11);
  box-shadow: 0 28px 72px rgba(0,0,0,0.28);
}
.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.button, .reset-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 840;
  text-decoration: none;
  cursor: pointer;
}
.button.primary {
  border-color: #fff;
  background: #fff;
  color: var(--teal);
}
.button.secondary {
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.button.highlight {
  border-color: #ffe07a;
  background: #ffd94d;
  color: #412b00;
  box-shadow: 0 12px 28px rgba(79, 53, 0, 0.22);
}
.button.dark {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}
.button.secondary.dark {
  border-color: var(--line);
  background: #fff;
  color: var(--teal);
}
.map-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: clamp(26px, 4vw, 54px) clamp(18px, 5vw, 72px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.map-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}
.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.map-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 10px;
}
.map-field {
  display: grid;
  gap: 6px;
}
.map-field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.map-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.map-frame {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #e8f1f6;
  box-shadow: var(--shadow);
}
.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}
.section, .split-section {
  padding: clamp(30px, 5vw, 64px) clamp(18px, 5vw, 72px);
}
.section-heading {
  max-width: 860px;
  margin-bottom: 22px;
}
.add-practice-section {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.practice-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 980px;
}
.practice-form label {
  display: grid;
  gap: 6px;
}
.practice-form label span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.practice-form input,
.practice-form select,
.practice-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdfe;
  color: var(--ink);
}
.practice-form textarea {
  resize: vertical;
  line-height: 1.45;
}
.bot-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.field-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.document-checklist {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfe;
}
.document-checklist legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.document-checklist label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 0.95rem;
}
.document-checklist input {
  width: auto;
  min-height: 0;
}
.wide-field,
.practice-actions,
.practice-form .map-status {
  grid-column: 1 / -1;
}
.practice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.practice-preview {
  max-width: 980px;
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}
.practice-preview h3 {
  margin-bottom: 6px;
}
.practice-preview p {
  margin-bottom: 8px;
  color: var(--muted);
}
.profiles-section {
  background: #f8fbfc;
  border-top: 1px solid var(--line);
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-width: 1080px;
}
.profile-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.profile-card h3 {
  margin-bottom: 6px;
}
.profile-card p {
  margin: 0;
}
.profile-note {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}
.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 260px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.search-box, .filter-box {
  display: grid;
  gap: 6px;
}
.search-box span, .filter-box span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
input, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.stats {
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}
.condition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.condition-card, .question-grid article {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.condition-card h3 { margin-bottom: 5px; }
.condition-card p { margin-bottom: 0; }
.tag-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 8px;
  background: #e8f1f6;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 850;
}
.tag.warn {
  background: #fff1d8;
  color: #7a520d;
}
.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.links-row a, .link-panel a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}
.warning {
  padding: 10px 12px;
  border-left: 4px solid var(--red);
  background: #fff4f5;
}
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.7fr);
  gap: 24px;
  align-items: start;
  background: #fff;
  border-block: 1px solid var(--line);
}
.link-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.quiet { background: #f8fbfd; }
.question-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
footer {
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}
footer p { margin: 0; }
@media (max-width: 980px) {
  .condition-grid, .question-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .reset-filters { grid-column: 1 / -1; }
  .map-band { grid-template-columns: 1fr; }
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .hero-media {
    justify-self: start;
    width: min(100%, 520px);
    max-height: 250px;
  }
}
@media (max-width: 700px) {
  .site-header {
    align-items: flex-start;
    min-height: 0;
    padding: 8px 12px;
  }
  .brand-mark { width: 34px; height: 34px; }
  .brand strong { font-size: 0.86rem; }
  .brand small { font-size: 0.6rem; }
  .top-nav {
    max-width: 48vw;
    gap: 1px 8px;
    font-size: 0.72rem;
    line-height: 1.15;
  }
  .top-nav a { padding: 2px 0; }
  .nav-primary { padding: 4px 7px !important; }
  .hero {
    min-height: auto;
    padding: 38px 16px;
  }
  .hero h1 { font-size: 2.25rem; }
  .hero-media {
    width: 100%;
    max-height: 170px;
  }
  .toolbar, .split-section, .condition-grid, .question-grid {
    grid-template-columns: 1fr;
  }
  .practice-form {
    grid-template-columns: 1fr;
  }
  .map-fields {
    grid-template-columns: 1fr;
  }
  .map-band {
    padding: 24px 16px;
  }
  .map-frame,
  .map-frame iframe {
    min-height: 220px;
  }
}
@media print {
  body {
    background: #fff;
    color: #111;
  }
  .site-header,
  .hero,
  .map-band,
  #finder,
  #add-practice,
  #conditions,
  #questions,
  footer {
    display: none !important;
  }
  #patient-enquiry {
    padding: 0;
  }
  .section-heading {
    margin-bottom: 14px;
  }
  .section-heading p,
  .field-note,
  .map-status,
  .practice-preview p {
    color: #333;
  }
  .practice-form {
    max-width: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .practice-form input,
  .practice-form select,
  .practice-form textarea,
  .document-checklist {
    border-color: #777;
    background: #fff;
  }
  .practice-actions {
    display: none;
  }
}
