:root {
  --bg: #eef2f5;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #5d6875;
  --border: #d9dfe3;
  --nhs-blue: #005eb8;
  --nhs-blue-dark: #004b95;
  --nhs-green: #007f3b;
  --nhs-green-dark: #005f2c;
  --max: 54rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--nhs-blue);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

a:hover,
a:focus {
  color: #003d78;
}

.shell {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

.nhs-ribbon {
  background: var(--nhs-blue);
  color: #fff;
  border-bottom: 4px solid var(--nhs-blue-dark);
}

.ribbon-content {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ribbon-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.practice-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.1;
}

.nhs-logo {
  height: 2.1rem;
  width: auto;
}

.cqc-top-badge {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0.24rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  text-decoration: none;
}

.cqc-top-image {
  height: 2.1rem;
  width: auto;
  display: block;
}

.page {
  padding: 1rem 0 2rem;
}

.hero {
  margin-bottom: 0.75rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
  padding: 1.1rem 0.95rem 1rem;
  text-align: center;
}

.hero-logo {
  width: 3.1rem;
  height: 3.1rem;
  object-fit: contain;
  margin-bottom: 0.3rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  margin: 0.35rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 22rem;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 0.3rem;
  border: 2px solid var(--nhs-green-dark);
  background: var(--nhs-green);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #026f34;
  color: #fff;
  transform: translateY(-1px);
}

.hero-card .btn-primary {
  margin-top: 0.6rem;
}

.meta {
  margin: 0.6rem auto 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  max-width: 26rem;
}

.hero-trustline {
  margin: 0.28rem auto 0;
  color: #44515f;
  font-size: 0.74rem;
  line-height: 1.35;
  max-width: 26rem;
}

.hero-trustline strong {
  color: #0b6b2e;
  font-weight: 700;
}

.content {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.85rem 0.88rem;
}

.content-card h2 {
  margin: 0 0 0.55rem;
  font-size: 0.96rem;
}

.content-card p {
  margin: 0.36rem 0 0;
  color: #374151;
  font-size: 0.83rem;
  line-height: 1.5;
}

.content-card.compact p {
  font-size: 0.96rem;
}

.bottom-cta {
  display: flex;
  justify-content: center;
  margin-top: 0.15rem;
}

.site-footer {
  padding: 0 0 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  font-size: 0.84rem;
}

.footer-links a {
  color: #44515f;
}

@media (min-width: 900px) {
  .shell {
    width: min(100% - 3rem, var(--max));
  }

  .hero-card {
    padding: 1.3rem 1.3rem 1.2rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .meta {
    font-size: 0.9rem;
  }

  .content {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }

  .bottom-cta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .ribbon-content {
    height: auto;
    min-height: 3.9rem;
    padding-block: 0.75rem;
  }

  .practice-name {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .nhs-logo {
    height: 2rem;
  }

  .ribbon-actions {
    gap: 0.28rem;
  }

  .cqc-top-badge {
    border-radius: 0.2rem;
  }

  .cqc-top-image {
    height: 2rem;
  }

  .page {
    padding-top: 0.95rem;
  }

  h1 {
    font-size: 1.95rem;
  }

  .btn-primary {
    width: 100%;
    min-height: 2.7rem;
    font-size: 0.98rem;
    padding: 0.6rem 0.9rem;
  }

  .hero-card .btn-primary {
    margin-top: 0.6rem;
  }

  .hero-trustline {
    margin-top: 0.3rem;
    font-size: 0.69rem;
  }

  .content-card h2 {
    font-size: 0.98rem;
  }

  .content-card p {
    font-size: 0.82rem;
    line-height: 1.45;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 1.75rem;
  }
}
