/* SimpleMed+ brand system, shared by the homepage and every inner page:
   tokens, buttons, navigation, footer and plan cards (moved out of home.css),
   plus the opt-in .smp-public treatment for public inner pages. */
:root {
  --smg-cream: var(--sm-page);
  --smg-cream-deep: var(--sm-section);
  --smg-card: var(--sm-surface);
  --smg-ink: #18251f;
  --smg-copy: #3d4b45;
  --smg-muted: #55635c;
  --smg-line: #d9d0c0;
  --smg-green: var(--sm-brand-deep);
  --smg-green-mid: var(--sm-brand-mid);
  --smg-green-soft: var(--sm-brand-accent);
  --smg-green-pale: #e3efe9;
  --smg-gold: #c59a3c;
  --smg-red: #a54b43;
  --smg-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --smg-sans: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.smg-wrap {
  width: min(calc(100% - clamp(2rem, 6vw, 8rem)), 96rem);
  margin-inline: auto;
}

.smg-nowrap { white-space: nowrap; }

.smg-skip {
  position: fixed;
  z-index: 200;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--smg-green);
  border-radius: 0.6rem;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}
.smg-skip:focus { transform: translateY(0); }

.smg-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.smg-eyebrow {
  margin: 0 0 0.7rem;
  color: var(--smg-green-mid);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.smg-section-head {
  max-width: 44rem;
  margin: 0 auto 2.4rem;
  text-align: center;
}
.smg-section-head h2,
.smg-final h2 {
  margin: 0;
  font-family: var(--smg-sans);
  font-size: clamp(2.15rem, 3.23vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.smg-section-head > p:last-child {
  max-width: 39rem;
  margin: 0.85rem auto 0;
  color: var(--smg-muted);
}

.smg-btn {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.smg-btn:hover { transform: translateY(-2px); }
.smg-btn--primary { color: #fff !important; background: var(--smg-green); box-shadow: 0 0.7rem 1.6rem rgba(15, 61, 46, 0.2); }
.smg-btn--primary:hover { background: var(--smg-green-mid); }
.smg-btn--ghost { color: var(--smg-green); background: rgba(255, 252, 246, 0.52); border-color: var(--smg-line); }
.smg-btn--large { min-height: 3.25rem; padding-inline: 1.35rem; font-size: 1rem; }
.smg-btn--small { min-height: 2.45rem; padding: 0.55rem 0.95rem; font-size: 0.875rem; }
.smg-text-link { display: inline-block; margin-top: .35rem; color: var(--smg-green); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }

/* Navigation */
.smg-nav {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.smg-brand { display: inline-flex; align-items: center; color: var(--smg-green); text-decoration: none; }
.smg-brand img { width: 8.7rem; height: auto; object-fit: contain; }

.smg-nav-links { display: flex; gap: 0.25rem 1.25rem; align-items: center; padding: 0; margin: 0; list-style: none; }
.smg-nav-links a { color: #405049; font-size: 0.875rem; font-weight: 650; text-decoration: none; }
.smg-nav-links a:hover,
.smg-nav-links a[aria-current="page"] { color: var(--smg-green); }
.smg-nav-links .smg-nav-cta { display: inline-flex; min-height: 2.65rem; align-items: center; padding: 0.55rem 1rem; color: #fff; background: var(--smg-green); border-radius: 999px; box-shadow: 0 0.6rem 1.4rem rgba(15, 61, 46, 0.19); }
.smg-nav-toggle { display: none; width: 2.75rem; height: 2.75rem; padding: 0.65rem; color: var(--smg-green); background: var(--smg-card); border: 1px solid var(--smg-line); border-radius: 0.65rem; }
.smg-nav-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; }

/* Inner-page header: the homepage nav on the top of the homepage hero gradient. */
.smg-site-header { font-family: var(--smg-sans); background: linear-gradient(180deg, #e9f0eb 0%, var(--smg-cream) 100%); }
.smg-site-header :focus-visible,
.smg-footer :focus-visible { outline: 3px solid #329070; outline-offset: 3px; }

/* Signed-in app header: the visitor header's container, type and colours; its links and
   Alpine behaviour are unchanged (fragments/header-tailwind.html). */
.smg-app-header .smp-topbar { min-height: 5rem; }
.smg-app-header .smp-topbar-logo { width: 8.7rem; height: auto; }
.smg-app-header nav :is(a, button).text-primary { color: #405049; font-size: 0.875rem; font-weight: 650; }
.smg-app-header :is(nav, #smp-mobile-menu) :is(a, button).text-primary:hover { color: var(--smg-green); }
.smg-app-header #smp-mobile-menu :is(a, button).text-primary { color: #304039; }
.smg-app-header nav .absolute.bg-white { background: var(--smg-card); border-color: var(--smg-line); border-radius: 0.75rem; box-shadow: 0 1rem 3rem rgba(28,42,34,0.14); }
.smg-app-header nav .absolute.bg-white :is(a, button):hover { background: var(--smg-green-pale); }
.smg-app-header #smp-mobile-menu { border-top: 1px solid var(--smg-line); }


/* Plan cards (homepage pricing block and /pricing) */
.smg-plan-grid { display: grid; max-width: 56rem; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.85rem; margin-inline: auto; }
.smg-plan { position: relative; display: flex; min-height: 0; flex-direction: column; padding: 1.7rem; background: var(--smg-card); border: 1px solid var(--smg-line); border-radius: 1.4rem; box-shadow: 0 0.8rem 2rem rgba(28,42,34,0.05); }
.smg-plan--premium { background: linear-gradient(180deg, #e9f3ee 0%, var(--smg-card) 45%); border: 1.5px solid var(--smg-green-soft); box-shadow: 0 1rem 2.5rem rgba(15,61,46,0.12); }
.smg-plan-tag { position: absolute; top: -0.75rem; right: 1.2rem; padding: 0.32rem 0.75rem; color: #fff; background: var(--smg-green); border-radius: 999px; font-size: 0.875rem; font-weight: 750; }
.smg-plan :is(h2, h3) { margin: 0; font-family: var(--smg-sans); font-size: 1.4rem; }
.smg-plan-price { margin: 0.45rem 0 0; font-family: var(--smg-serif); font-size: 2.3rem; line-height: 1; }
.smg-plan-price small { font-family: var(--smg-sans); font-size: 0.875rem; }
.smg-plan > small { color: var(--smg-muted); font-size: 0.875rem; }
.smg-plan ul { display: grid; gap: 0.7rem; padding: 0; margin: 1.5rem 0 1.8rem; color: #46564e; font-size: 0.875rem; list-style: none; }
.smg-plan li { position: relative; padding-left: 1.1rem; }
.smg-plan li::before { content: "✓"; position: absolute; left: 0; color: var(--smg-green-soft); font-weight: 800; }
.smg-plan .smg-btn { width: 100%; margin-top: auto; }

/* Footer (one partial: fragments/footer-tailwind.html) */
.smg-footer { padding: 3rem 0 1.4rem; color: #b7cec4; background: #08291f; border-top: 1px solid rgba(255,255,255,.1); font-family: var(--smg-sans); line-height: 1.55; }
.smg-footer-inner { display: grid; grid-template-columns: minmax(13rem,1.4fr) repeat(3,minmax(8.5rem,.8fr)) auto; gap: 1.75rem 2.2rem; align-items: start; }
.smg-footer-brand .smg-brand img { width: 8.4rem; filter: brightness(0) invert(1); }
.smg-footer-brand p { max-width: 16rem; margin: .65rem 0 0; color: #91aea2; font-size: 0.875rem; }
.smg-footer h2 { margin: 0 0 .65rem; color: #fff; font-size: 0.875rem; font-weight: 750; letter-spacing: .03em; }
.smg-footer nav ul { display: grid; gap: .42rem; padding: 0; margin: 0; list-style: none; }
.smg-footer nav a,
.smg-footer nav button { padding: 0; color: #bdd1c8; background: transparent; border: 0; font-size: 0.875rem; text-align: left; text-decoration: none; cursor: pointer; }
.smg-footer nav a:hover,
.smg-footer nav button:hover { color: #fff; text-decoration: underline; }
.smg-footer-connect > div { display: flex; gap: .45rem; }
.smg-footer-connect a { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; color: #d3e2dc; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 50%; transition: color 160ms ease, background 160ms ease, transform 160ms ease; }
.smg-footer-connect a:hover { color: #fff; background: rgba(255,255,255,.13); transform: translateY(-2px); }
.smg-footer-connect svg { width: 1.15rem; height: 1.15rem; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.smg-footer-legal { display: grid; gap: .55rem; padding-top: 1.4rem; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.11); text-align: center; }
.smg-footer-legal p { max-width: 68rem; margin: 0 auto; color: #78998b; font-size: 0.875rem; line-height: 1.55; }
.smg-footer-legal p:last-child { color: #a9c0b6; font-weight: 650; }

/* Public inner pages: homepage type, ink, cards and links. */
.smp-public { padding-bottom: clamp(2.5rem, 5vw, 4rem); color: var(--smg-ink); font-family: var(--smg-sans); line-height: 1.6; }
.smp-public :is(h1, h2, h3) { color: var(--smg-ink); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.smp-public h1 { font-size: clamp(2rem, 3.2vw, 2.75rem); letter-spacing: -0.035em; line-height: 1.08; }
.smp-public p { text-wrap: pretty; }
.smp-public .page-content { background: var(--smg-card); border: 1px solid var(--smg-line); border-radius: 1.4rem; box-shadow: 0 0.8rem 2rem rgba(28,42,34,0.05); }
.smp-public .smp-card { padding: 1.25rem 1.35rem; background: var(--smg-card); border: 1px solid var(--smg-line); border-radius: 1.1rem; }
.smp-public .smp-panel { padding: clamp(1.25rem, 3vw, 2rem); background: var(--smg-green-pale); border-radius: 1.4rem; }
.smp-public .smp-link,
.smp-public .smp-prose :is(p, li) > a:not([class]) { color: var(--smg-green); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.smp-public .smp-prose :is(ul, ol) { padding-left: 1.35rem; list-style-position: outside; }
.smp-public .smp-prose ul { list-style-type: disc; }
.smp-public .smp-prose ol { list-style-type: decimal; }
.smp-public .smp-prose li + li { margin-top: 0.5rem; }
.smp-public .smp-prose li::marker { color: var(--smg-green-soft); }
.smp-public input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { border-color: #cfc6b5; border-radius: 0.75rem; background: #fff; }
.smp-public .smp-nowrap { white-space: nowrap; }
.smp-arrow-card { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; text-decoration: none; transition: border-color 160ms ease, transform 160ms ease; }
.smp-arrow-card:hover { border-color: #a9bdb2; transform: translateY(-2px); }
.smp-arrow-card > span[aria-hidden] { color: var(--smg-green); font-weight: 800; }

/* /pricing */
.smp-pricing .smg-section-head { margin-bottom: 2rem; }
.smp-pricing-alerts:empty { display: none; }
.smp-pricing-alerts { max-width: 44rem; margin: 0 auto 1.5rem; }
.smp-pricing-terms { max-width: 56rem; margin: 1.25rem auto 0; }
.smp-pricing-showcase { margin-top: 2.5rem; }
.smp-pricing-showcase h2 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.smp-pricing-showcase ul { padding: 0; list-style: none; }

/* Subject and topic pages. An odd last subject spans the row (as OSCE does on the homepage). */
@media (min-width: 768px) {
  .smp-subject-grid > a:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
}
.smp-subject-head { display: grid; gap: 1rem; }
.smp-subject-title { display: flex; gap: 1rem; align-items: center; }
.smp-subject-title h1 { margin: 0; }
.smp-subject-title .smg-eyebrow { margin: 0 0 0.25rem; }
@media (min-width: 640px) {
  .smp-topic-preview { grid-template-columns: 2rem minmax(0,1fr); }
}
@media (min-width: 768px) {
  .smp-topic-hero { grid-template-columns: minmax(0,1fr) 19rem; align-items: start; }
  .smp-topic-split { grid-template-columns: 15rem minmax(0,1fr); }
}

/* FAQ, support and help centre */
.smp-faq-toc { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.smp-faq-toc a { padding: 0.4rem 0.85rem; color: var(--smg-green); background: var(--smg-green-pale); border-radius: 999px; font-size: 0.875rem; font-weight: 650; text-decoration: none; }
.smp-faq-toc a:hover { text-decoration: underline; }
.smp-public [id] { scroll-margin-top: 1.5rem; }
.smp-support-hero { padding: clamp(1.5rem, 4vw, 2.25rem); color: #fff; background: var(--smg-green); border-radius: 1.4rem; }
.smp-public .smp-support-hero h1 { color: #fff; }
.smp-support-hero p { color: #d8e9e2; }
@media (min-width: 768px) {
  .help-center__article-list { max-height: min(36rem, 70vh); overflow-y: auto; overscroll-behavior: contain; }
}

/* Never over an open navigation menu. */
html.smg-menu-open .sm-side-switch,
body:has(#smp-mobile-menu:not([x-cloak]):not([style*="none"])) .sm-side-switch { display: none !important; }

/* On public pages the cross-site badge overlapped content at phone widths; signed-in app
   pages and desktop keep it. */
@media (max-width: 767px) {
  body:has(.smp-public) .sm-side-switch { display: none !important; }
}

@media (max-width: 980px) {
  html.smg-menu-open,
  html.smg-menu-open body { overflow: hidden; overscroll-behavior: none; }
  .smg-nav-toggle {
    position: fixed;
    z-index: 1201;
    top: calc(env(safe-area-inset-top, 0px) + 0.7rem);
    right: calc(env(safe-area-inset-right, 0px) + 0.7rem);
    display: block;
    box-shadow: 0 .45rem 1.25rem rgba(15,61,46,.16);
  }
  .smg-nav-links { position: fixed; z-index: 1200; top: calc(env(safe-area-inset-top, 0px) + 4rem); right: calc(env(safe-area-inset-right, 0px) + 0.7rem); display: none; width: min(19rem, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 1.4rem)); max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 4.7rem); overflow-y: auto; gap: 0; align-items: stretch; padding: 0.6rem; background: var(--smg-card); border: 1px solid var(--smg-line); border-radius: 0.75rem; box-shadow: 0 1rem 3rem rgba(28,42,34,0.18); }
  .smg-nav-links.is-open { display: grid; }
  .smg-nav-links a { display: block; padding: 0.72rem; }
  .smg-nav-links .smg-nav-cta { justify-content: center; margin-top: 0.3rem; }
  .smg-footer-inner { grid-template-columns: 1.25fr repeat(2,1fr); }
}

@media (max-width: 760px) {
  .smg-wrap { width: min(calc(100% - 1.25rem), 80rem); }
  .smg-nav { min-height: 4.6rem; }
  .smg-brand img,
  .smg-app-header .smp-topbar-logo { width: 7.75rem; }
  .smg-plan-grid { grid-template-columns: 1fr; }
  .smg-plan { min-height: 0; }
  .smg-plan ul { font-size: 1rem; }
  .smg-footer-inner { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .smg-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 460px) {
  .smg-section-head h2,
  .smg-final h2 { font-size: 2rem; }
  .smg-footer-inner { grid-template-columns: 1fr; }
  .smg-footer-brand { grid-column: auto; }
}
/* "Written by UK doctors" links to the team on /about: subtle, still clearly a link */
.smp-team-link{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.smp-team-link:hover{text-decoration-thickness:2px}
.smp-team-link:focus-visible{outline:2px solid #329070;outline-offset:2px;border-radius:2px}
/* About page portraits and partner logos */
.smp-team li:has(details[open]){grid-column:1/-1}
.smp-team img{width:6rem;height:6rem;border-radius:50%;object-fit:cover}
.smp-past img{width:3.5rem;height:3.5rem;flex:none;border-radius:50%;object-fit:cover}
.smp-past img.smp-logo{border-radius:.5rem;object-fit:contain}
