/* ============================================================
   Dr Compare — drcompare.co.uk
   Palette: navy #123047 · teal #168C8C · mint #45C2A0
            coral #F26B5E · soft grey #F5F7F8
   ============================================================ */
:root {
  --navy: #123047;
  --navy-dark: #0c2233;
  --teal: #168C8C;
  --teal-dark: #0f6b6b;
  --mint: #45C2A0;
  --mint-soft: #e2f5ef;
  --coral: #F26B5E;
  --coral-dark: #d95245;
  --bg: #F5F7F8;
  --white: #ffffff;
  --ink: #21313f;
  --ink-soft: #52626f;
  --line: #e2e8ec;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 14px rgba(18, 48, 71, 0.08);
  --shadow-lg: 0 10px 40px rgba(18, 48, 71, 0.16);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
/* Some elements we show/hide via the native [hidden] attribute also carry a
   class (e.g. .btn) that sets its own `display` — author rules like that
   otherwise beat the browser's built-in [hidden]{display:none}, so the
   element stays visible. This reasserts it everywhere, unconditionally. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; font-weight: 750; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: 1.15rem; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; background: var(--white); padding: 8px 14px; z-index: 200; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 3px 12px rgba(242, 107, 94, 0.35); }
.btn-coral:hover { background: var(--coral-dark); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.55); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-outline { background: var(--white); color: var(--navy); border: 2px solid var(--line); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-lg { font-size: 1.1rem; padding: 15px 34px; }
.btn-sm { font-size: 0.85rem; padding: 8px 18px; }
.btn-block { display: block; width: 100%; }

/* ---------- cookie consent banner ---------- */
.cookie-banner {
  background: var(--navy);
  color: #eaf1f0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.cookie-banner-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner-inner p { margin: 0; font-size: 0.9rem; line-height: 1.5; max-width: 760px; }
.cookie-banner-inner a { color: var(--mint); }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 640px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: left; }
  .cookie-banner-actions { justify-content: flex-end; }
}

/* ---------- header ---------- */
.site-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(18,48,71,0.03);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 70px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.logo-text { font-size: 1.35rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.logo-accent { color: var(--teal); }
.logo-text-light { color: #fff; font-size: 1.3rem; }
.logo-text-light .logo-accent { color: var(--mint); }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.main-nav a:hover { background: var(--mint-soft); color: var(--teal-dark); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { padding: 10px 18px; font-size: 0.92rem; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: var(--navy); margin: 4.5px 0; border-radius: 2px; transition: 0.2s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero (inner pages: dark) ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #14425f 55%, var(--teal-dark) 100%);
  color: #fff;
  padding: 64px 0 56px;
}
.hero h1 { color: #fff; margin: 0 0 14px; max-width: 640px; }
.hero p.lede { font-size: 1.15rem; max-width: 600px; margin: 0 0 26px; color: #dbe7ee; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; padding: 0; list-style: none; }
.hero-trust li { font-size: 0.92rem; color: #cfe0e9; display: flex; align-items: center; gap: 8px; }
.hero-trust li::before { content: "✓"; color: var(--mint); font-weight: 800; }
.hero-badge {
  display: inline-block; background: rgba(69,194,160,0.16); border: 1px solid rgba(69,194,160,0.5);
  color: var(--mint); font-size: 0.85rem; font-weight: 700; border-radius: 999px;
  padding: 5px 14px; margin-bottom: 18px;
}

/* ---------- hero (homepage: light, search-first) ---------- */
.hero-light {
  background: linear-gradient(160deg, #eef8f5 0%, var(--bg) 45%, #eaf3f6 100%);
  color: var(--ink);
  padding: 72px 0 76px;
  position: relative;
  overflow: hidden;
}
.hero-light::before, .hero-light::after {
  content: ""; position: absolute; border-radius: 50%; z-index: 0;
}
.hero-light::before { width: 340px; height: 340px; background: radial-gradient(circle, var(--mint-soft) 0%, transparent 72%); top: -120px; right: 8%; }
.hero-light::after { width: 260px; height: 260px; background: radial-gradient(circle, rgba(242,107,94,0.12) 0%, transparent 72%); bottom: -100px; right: 30%; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: center; position: relative; z-index: 1; }
.hero-light .hero-badge {
  background: var(--mint-soft); border: 1px solid #c7ebdd; color: var(--teal-dark);
}
.hero-copy h1 { color: var(--navy); margin: 0 0 16px; max-width: 560px; }
.hero-light .hero-copy p.lede { font-size: 1.12rem; max-width: 540px; margin: 0 0 24px; color: var(--ink-soft); }
.hero-copy .hero-trust li { color: var(--ink-soft); }
.hero-search-card {
  background: var(--white); border-radius: 22px; box-shadow: var(--shadow-lg);
  padding: 26px; border: 1px solid var(--line);
}
.search-tabs { display: flex; gap: 6px; background: var(--bg); border-radius: 999px; padding: 5px; margin-bottom: 20px; }
.search-tab {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 8px; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: 0.86rem; color: var(--ink-soft); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.search-tab.active { background: var(--navy); color: #fff; }
.home-search-form label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.home-search-form input {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--white); margin-bottom: 14px;
}
.home-search-form input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,140,140,0.15); }
.hero-search-note { font-size: 0.85rem; color: var(--ink-soft); text-align: center; margin: 14px 0 0; }
.hero-search-note a { font-weight: 600; }

/* ---------- pillar cards (homepage) ---------- */
.pillar-card { padding: 0; overflow: hidden; }
.pillar-card h3, .pillar-card p, .pillar-card .card-link { padding-left: 22px; padding-right: 22px; }
.pillar-card .card-link { padding-bottom: 22px; display: inline-block; }
.pillar-media {
  height: 110px; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; margin-bottom: 18px;
}
.pillar-media span { filter: drop-shadow(0 2px 6px rgba(18,48,71,0.15)); }
.pillar-media-1 { background: linear-gradient(135deg, #d7ecf5 0%, #a9d6e8 100%); }
.pillar-media-2 { background: linear-gradient(135deg, var(--mint-soft) 0%, #b7e8d6 100%); }
.pillar-media-3 { background: linear-gradient(135deg, #fdeae7 0%, #f7c8bf 100%); }
.pillar-media-4 { background: linear-gradient(135deg, #e7e9f5 0%, #c9cdec 100%); }

/* ---------- stats bar ---------- */
.stats-bar { background: var(--white); border-bottom: 1px solid var(--line); }
.stats-bar .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 26px; padding-bottom: 26px; }
.stat { text-align: center; }
.stat .num { display: block; font-size: 1.7rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.stat .lbl { font-size: 0.85rem; color: var(--ink-soft); }
.stat .num.coral { color: var(--coral); }
.stat .num.teal { color: var(--teal); }
.stats-note { font-size: 0.78rem; color: var(--ink-soft); text-align: center; padding-bottom: 14px; margin: 0; }

/* ---------- sections & cards ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--white); }
.section-head { max-width: 700px; margin-bottom: 34px; }
.section-head p { color: var(--ink-soft); }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card h3 { margin-top: 0; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a:hover { color: var(--teal); }
.card p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.card .card-link { font-weight: 700; font-size: 0.93rem; text-decoration: none; }
.card-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--mint-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 14px; }

.pill-list { display: flex; flex-wrap: wrap; gap: 9px; padding: 0; list-style: none; }
.pill-list a, .pill {
  display: inline-block; background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 15px; font-size: 0.88rem; font-weight: 600;
  color: var(--navy); text-decoration: none;
}
.pill-list a:hover { border-color: var(--teal); color: var(--teal-dark); }
.pill-mint { background: var(--mint-soft); border-color: var(--mint); color: var(--teal-dark); }

/* ---------- breadcrumbs / page head ---------- */
.page-head {
  background: linear-gradient(160deg, #eef8f5 0%, var(--bg) 55%, #eaf3f6 100%);
  color: var(--ink); padding: 40px 0 34px; border-bottom: 1px solid var(--line);
}
.page-head h1 { color: var(--navy); margin: 6px 0 10px; }
.page-head p.lede { color: var(--ink-soft); max-width: 720px; margin: 0; font-size: 1.05rem; }
.breadcrumbs { font-size: 0.83rem; color: var(--ink-soft); }
.breadcrumbs a { color: var(--teal-dark); text-decoration: none; }
.breadcrumbs a:hover { color: var(--navy); }

/* ---------- article layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; padding: 44px 0 56px; }
.prose h2 { margin-top: 38px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.side-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); position: sticky; top: 86px;
}
.side-card h3 { margin: 0 0 8px; }
.side-card p { font-size: 0.92rem; color: var(--ink-soft); }
.side-card .btn { margin-top: 6px; }
.side-links { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.side-links h3 { margin: 0 0 10px; font-size: 1rem; }
.side-links a { display: block; padding: 7px 0; font-size: 0.92rem; text-decoration: none; border-bottom: 1px solid var(--bg); }
.side-links a:last-child { border-bottom: 0; }

/* ---------- wait comparison ---------- */
.wait-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0; }
.wait-box { border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); background: var(--white); }
.wait-box.nhs { border-top: 5px solid var(--navy); }
.wait-box.private { border-top: 5px solid var(--mint); background: var(--mint-soft); border-color: #cdeae0; }
.wait-box .wait-label { font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.wait-box .wait-value { font-size: 1.9rem; font-weight: 800; color: var(--navy); margin: 6px 0 4px; letter-spacing: -0.02em; }
.wait-box.private .wait-value { color: var(--teal-dark); }
.wait-box p { margin: 4px 0 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- CTA banner (in-content) ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--teal) 0%, var(--mint) 120%);
  border-radius: var(--radius);
  color: #fff;
  padding: 30px 30px;
  margin: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.cta-banner h3 { color: #fff; margin: 0 0 6px; font-size: 1.25rem; }
.cta-banner p { margin: 0; color: #ecfbf5; font-size: 0.95rem; max-width: 520px; }
.cta-banner .btn { flex-shrink: 0; }

/* ---------- info/note boxes ---------- */
.note-box {
  background: var(--mint-soft); border-left: 4px solid var(--mint);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 22px 0; font-size: 0.95rem;
}
.note-box strong { color: var(--navy); }
.warn-box {
  background: #fdf1ef; border-left: 4px solid var(--coral);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 22px 0; font-size: 0.95rem;
}
/* markdown blockquotes (used for callouts/notes in CMS-authored articles) get
   the same treatment as .note-box, so writers don't need any HTML/CSS knowledge */
.prose blockquote {
  background: var(--mint-soft); border-left: 4px solid var(--mint);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 22px 0; font-size: 0.95rem;
}
.prose blockquote p { margin: 0; }
.prose blockquote strong { color: var(--navy); }

/* ---------- article images ---------- */
.article-hero {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius); margin: 0 0 30px; display: block;
}
.card-thumb {
  width: calc(100% + 48px); height: 160px; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0; margin: -24px -24px 16px; display: block;
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 26px 0; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
table.compare { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 640px; }
table.compare th, table.compare td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare thead th { background: var(--navy); color: #fff; font-weight: 700; position: sticky; top: 0; }
table.compare tbody tr:nth-child(even) { background: var(--bg); }
table.compare tbody tr:hover { background: var(--mint-soft); }
table.compare a { font-weight: 700; text-decoration: none; }

/* On narrow phones, stack every .compare table into label/value cards
   instead of relying on the min-width: 640px table forcing horizontal
   scroll. This is what actually stops the "have to side-scroll to read
   results" complaint on the dentist/GP/hospital/care-home lists — the
   table-wrap's overflow-x:auto only ever contained the scroll, it didn't
   remove the need for it. Row renderers add data-label="<header text>"
   to each <td> so the label can be shown via ::before. */
@media (max-width: 700px) {
  table.compare { min-width: 0; }
  table.compare thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  table.compare, table.compare tbody, table.compare tr, table.compare td { display: block; width: 100%; }
  table.compare tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.compare tr:last-child { border-bottom: 0; }
  table.compare td {
    border-bottom: 0; padding: 6px 16px 6px 44%; position: relative; min-height: 20px;
  }
  table.compare td[data-label]::before {
    content: attr(data-label); position: absolute; left: 16px; top: 6px; width: 38%;
    font-weight: 700; color: var(--navy); font-size: 0.8rem; padding-right: 8px;
  }
  table.compare td:not([data-label]) { padding-left: 16px; }
}

/* ---------- FAQ ---------- */
.faq { margin: 26px 0; }
.faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 20px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 15px 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 12px; font-size: 1.3rem; color: var(--teal); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); }

/* ---------- pre-footer CTA ---------- */
.pre-footer-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
  color: #fff; text-align: center; padding: 58px 0;
}
.pre-footer-cta h2 { color: #fff; margin: 0 0 12px; }
.pre-footer-cta p { max-width: 620px; margin: 0 auto 24px; color: #d5e5ec; }
.cta-reassure { display: block; margin-top: 14px; font-size: 0.85rem; color: #a8c8d6; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-dark); color: #b9cbd6; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; padding: 48px 20px 30px; }
.footer-brand .tagline { color: var(--mint); font-weight: 700; margin: 8px 0 10px; }
.footer-brand p { margin: 0 0 8px; }
.site-footer h3 { color: #fff; font-size: 0.95rem; margin: 0 0 12px; }
.site-footer nav a { display: block; color: #b9cbd6; text-decoration: none; padding: 4px 0; }
.site-footer nav a:hover { color: var(--mint); }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; padding-bottom: 30px; }
.footer-legal p { font-size: 0.78rem; color: #8ba4b3; margin: 0 0 10px; }

/* ---------- sticky mobile CTA ---------- */
.sticky-cta { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 14px 8px; background: rgba(255,255,255,0.96); border-top: 1px solid var(--line); z-index: 90; backdrop-filter: blur(6px); text-align: center; }
.sticky-cta-secondary {
  display: block; width: 100%; background: none; border: 0; padding: 7px 0 0;
  font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--coral-dark); cursor: pointer;
}

/* ---------- modal ---------- */
body.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(12, 34, 51, 0.62);
  display: flex; align-items: center; justify-content: center; z-index: 300; padding: 18px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--white); border-radius: var(--radius); max-width: 560px; width: 100%;
  max-height: 92vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute; top: 10px; right: 14px; background: none; border: 0;
  font-size: 1.9rem; color: var(--ink-soft); cursor: pointer; line-height: 1;
}
.modal-body { padding: 34px 34px 28px; }
.modal-body h2 { margin: 0 0 8px; font-size: 1.45rem; }
.modal-sub { color: var(--ink-soft); font-size: 0.93rem; margin: 0 0 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.form-field input, .form-field select {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.97rem; color: var(--ink); background: var(--white);
}
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,140,140,0.15); }
.form-consent { font-size: 0.76rem; color: var(--ink-soft); margin: 12px 0 0; }
.form-error { color: var(--coral-dark); font-weight: 600; font-size: 0.9rem; }
.modal-thanks { text-align: center; }
.thanks-icon {
  width: 64px; height: 64px; margin: 6px auto 16px; background: var(--mint-soft); color: var(--teal);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800;
}

/* ---------- ratings & review links ---------- */
.rating-badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  padding: 6px 14px; font-size: 0.85rem; font-weight: 800; border: 1.5px solid transparent;
}
.rating-outstanding { background: #e2f5ef; color: #0f6b4d; border-color: #a9e3cc; }
.rating-good { background: #e2f0f5; color: var(--teal-dark); border-color: #b7dce8; }
.rating-requiresimprovement { background: #fdf3e0; color: #9a6a12; border-color: #f3d99a; }
.rating-inadequate { background: #fdecea; color: var(--coral-dark); border-color: #f6c3bd; }
.rating-badge:not([class*="rating-outstanding"]):not([class*="rating-good"]):not([class*="rating-requiresimprovement"]):not([class*="rating-inadequate"]) { background: var(--bg); color: var(--ink-soft); border-color: var(--line); }
.rating-badge .rating-src { font-weight: 600; opacity: 0.75; font-size: 0.78rem; }
.review-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.review-link {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 7px 15px; font-size: 0.88rem; font-weight: 700;
  color: var(--navy); text-decoration: none; background: var(--white);
}
.review-link:hover { border-color: var(--teal); color: var(--teal-dark); }

.link-btn {
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--teal-dark); font-weight: 700; text-decoration: underline;
}
.link-btn:hover { color: var(--teal); }
.finder-more { text-align: center; margin: 16px 0 4px; }
.finder-more .link-btn {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 9px 18px; font-size: 0.9rem; text-decoration: none;
  background: var(--white);
}
.finder-more .link-btn:hover { border-color: var(--teal); color: var(--teal-dark); }

/* ---------- misc ---------- */
.az-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 8px; }
.az-nav a { display: inline-block; min-width: 34px; text-align: center; padding: 6px 8px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.az-nav a:hover { border-color: var(--teal); }
.az-letter { margin-top: 34px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.tag { display: inline-block; background: var(--mint-soft); border: 1px solid #c7ebdd; color: var(--teal-dark); border-radius: 999px; font-size: 0.78rem; font-weight: 700; padding: 4px 12px; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding-left: 28px; position: relative; margin-bottom: 9px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 800; }
.x-list { list-style: none; padding: 0; }
.x-list li { padding-left: 28px; position: relative; margin-bottom: 9px; }
.x-list li::before { content: "•"; position: absolute; left: 4px; color: var(--coral); font-weight: 800; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 18px; }
.steps li { position: relative; padding-left: 58px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 40px; height: 40px;
  background: var(--teal); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem;
}
.steps h3 { margin: 0 0 4px; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.source-note { font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side-card { position: static; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy h1, .hero-copy .lede { max-width: none; }
  .main-nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--white); flex-direction: column; padding: 12px 20px 18px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 10px; border-bottom: 1px solid var(--bg); }
  .nav-toggle { display: block; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-light { padding: 44px 0 60px; }
  .hero-search-card { padding: 20px; }
  .stats-bar .container { grid-template-columns: repeat(2, 1fr); gap: 18px 10px; }
  .wait-compare { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .header-actions .btn { display: none; }
  .sticky-cta { display: block; }
  /* On the postcode finder pages, the explainer paragraph pushes the
     search card below the fold on small screens -- hide it there so
     the form is visible without scrolling first. Breadcrumb and
     heading stay. */
  .finder-head .lede { display: none; }
  body { padding-bottom: 64px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .modal-body { padding: 26px 20px 22px; }
}
