/* ============================================================
   Wegovy Pill UK — design system
   Warm apricot & cream, clinical-modern. Light mode only.
   Fonts: "Outfit" (display) + "Source Sans 3" (body).
   Identity: sunrise mark, pill-shaped nav, dark cocoa footer.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
ul[role="list"], ol[role="list"] { list-style: none; }

/* ---------- Tokens ---------- */
:root {
  /* surfaces */
  --cream: #fdf8ef;            /* page background */
  --cream-raised: #fffefb;     /* cards, callouts, tables */
  --cream-sunken: #f6ecd9;     /* wells, table heads */
  /* text */
  --ink: #33261a;              /* primary text — warm cocoa */
  --ink-soft: #64533f;         /* secondary text */
  --ink-faint: #98866e;        /* meta, captions */
  /* accent — apricot / amber */
  --amber: #b45309;            /* links + interactive (accessible on cream) */
  --amber-deep: #8d3f06;       /* hover / active */
  --apricot: #d1701f;          /* brand mark, decorative edges */
  --apricot-soft: #f0b483;     /* soft decorative */
  --apricot-wash: #fbecd8;     /* tinted backgrounds (info) */
  /* warning — terracotta */
  --terra: #b23c1c;
  --terra-deep: #892c10;
  --terra-wash: #fae3d9;
  /* lines */
  --line: #eee0c8;
  --line-strong: #dcc59f;
  /* footer */
  --cocoa: #2e2114;            /* dark warm footer */
  --cocoa-soft: #43331f;
  --cream-on-cocoa: #f3e7d3;
  --faint-on-cocoa: #c4ad8e;
  /* type + shape */
  --display: "Outfit", "Avenir Next", "Segoe UI", -apple-system, sans-serif;
  --body: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 720px;            /* article measure */
  --wide: 1100px;              /* topbar / footer / hero measure */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --shadow-soft: 0 1px 2px rgba(51, 38, 26, 0.05), 0 6px 20px rgba(51, 38, 26, 0.06);
}

/* ---------- Base ---------- */
body {
  font-family: var(--body);
  font-size: 1.0625rem;              /* 17px */
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
}

::selection { background: var(--apricot-wash); color: var(--amber-deep); }

a { color: var(--amber); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--amber-deep); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--apricot);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Topbar ---------- */
/* Signature: a slim apricot sunrise strip above a cream bar,
   with fully rounded "pill" nav links. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 248, 239, 0.94);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}
.topbar::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--apricot) 0%, var(--apricot-soft) 55%, var(--apricot-wash) 100%);
}
.topbar-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand .brand-mark { flex: 0 0 auto; border-radius: 9px; }
.brand em { font-style: normal; color: var(--apricot); }

.nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav a {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.nav a:hover { color: var(--amber-deep); background: var(--apricot-wash); }
.nav a[aria-current="page"] { color: #fff; background: var(--apricot); }

.nav-toggle {
  display: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink-soft);
  padding: 0.38rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--cream-raised);
}
.nav-toggle:hover { color: var(--amber-deep); border-color: var(--apricot); }

/* ---------- Page scaffold ---------- */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
.wrap.narrow { max-width: var(--measure); }

main { display: block; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 85% -160px, var(--apricot-wash) 0%, rgba(251, 236, 216, 0) 70%),
    var(--cream);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 3rem;
}
.hero.narrow .hero-inner { max-width: var(--measure); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber-deep);
  background: var(--apricot-wash);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  max-width: 22ch;
  text-wrap: balance;
  margin-bottom: 0.9rem;
}
.hero .hero-lede {
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 62ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--amber);
  border-radius: var(--radius-pill);
  padding: 0.62rem 1.35rem;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--amber-deep); color: #fff; }
.btn.ghost {
  color: var(--amber-deep);
  background: transparent;
  border: 1.5px solid var(--line-strong);
}
.btn.ghost:hover { border-color: var(--apricot); background: var(--apricot-wash); }

/* ---------- Article typography ---------- */
.article,
.article-body {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.article { padding-top: 3rem; padding-bottom: 4rem; }

.article h1,
.page-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.5vw, 2.55rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}
.article-body h2,
.article h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 2.6rem 0 0.9rem;
}
.article-body h3,
.article h3 {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 2rem 0 0.7rem;
}
.article-body p, .article p { margin-bottom: 1.15rem; }
.article-body ul, .article-body ol,
.article ul, .article ol { margin: 0 0 1.15rem 1.4rem; }
.article-body li, .article li { margin-bottom: 0.45rem; }
.article-body li::marker { color: var(--apricot); }
.article-body strong, .article strong { font-weight: 650; }

.article-meta,
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-faint);
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.lede {
  font-size: 1.19rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--apricot);
  color: var(--ink-soft);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

figure { margin: 1.75rem 0; }
figcaption { font-size: 0.85rem; color: var(--ink-faint); margin-top: 0.5rem; }

/* ---------- Data tables (informational only — never pricing) ---------- */
.table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream-raised);
}
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; background: var(--cream-raised); }
caption { text-align: left; font-size: 0.85rem; color: var(--ink-faint); padding: 0.6rem 0.95rem; caption-side: bottom; }
th, td { text-align: left; padding: 0.68rem 0.95rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--amber-deep);
  background: var(--cream-sunken);
}
tbody th[scope="row"] { font-weight: 650; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }

/* ---------- Callouts ---------- */
/* Info — apricot wash */
.callout {
  background: var(--apricot-wash);
  border: 1px solid rgba(209, 112, 31, 0.28);
  border-left: 4px solid var(--apricot);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin: 1.75rem 0;
  font-size: 0.975rem;
}
.callout > :last-child { margin-bottom: 0; }
.callout-title {
  display: block;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--amber-deep);
  margin-bottom: 0.4rem;
}
/* Warning — terracotta */
.callout.warning {
  background: var(--terra-wash);
  border-color: rgba(178, 60, 28, 0.35);
  border-left-color: var(--terra);
}
.callout.warning .callout-title { color: var(--terra-deep); }

/* ---------- FAQ accordion (details/summary) ---------- */
.faq { margin: 1.75rem 0; }
.faq-item {
  background: var(--cream-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  transition: border-color 0.15s ease;
}
.faq-item[open] { border-color: var(--apricot-soft); box-shadow: var(--shadow-soft); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.2rem;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--apricot);
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:hover { color: var(--amber-deep); }
.faq-item .faq-answer { padding: 0 1.2rem 1.05rem; color: var(--ink-soft); font-size: 0.975rem; }
.faq-item .faq-answer > :last-child { margin-bottom: 0; }

/* ---------- References ---------- */
.refs {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.refs h2, .refs h3 {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
  margin: 0 0 0.8rem;
}
.refs ol { margin: 0 0 0 1.3rem; }
.refs li { margin-bottom: 0.5rem; line-height: 1.55; }
.refs li::marker { color: var(--apricot); font-weight: 650; }
.refs a { word-break: break-word; color: var(--amber); }

/* ---------- Cards (blog listing / related guides) ---------- */
.listing-head { padding: 3rem 0 0.5rem; }
.listing-head .page-title { margin-bottom: 0.6rem; }
.listing-head .listing-intro { color: var(--ink-soft); max-width: 60ch; }

.guide-cards {
  display: grid;
  gap: 1.1rem;
  padding: 1.75rem 0 3.5rem;
}
@media (min-width: 720px) {
  .guide-cards.cols { grid-template-columns: repeat(2, 1fr); }
}
.guide-card {
  display: block;
  background: var(--cream-raised);
  border: 1px solid var(--line);
  border-top: 3px solid var(--apricot-soft);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.guide-card:hover {
  color: var(--ink);
  border-color: var(--apricot);
  border-top-color: var(--apricot);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}
.guide-card .guide-card-meta {
  display: block;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}
.guide-card h2, .guide-card h3 {
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 650;
  line-height: 1.3;
  margin: 0 0 0.45rem;
  color: var(--ink);
}
.guide-card:hover h2, .guide-card:hover h3 { color: var(--amber-deep); }
.guide-card p { font-size: 0.94rem; color: var(--ink-soft); margin: 0; }

/* Empty state (blog before first post) */
.empty-state {
  text-align: center;
  background: var(--cream-raised);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  margin: 1.75rem 0 3.5rem;
}
.empty-state .empty-mark { margin: 0 auto 1rem; opacity: 0.9; }
.empty-state h2 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 650;
  margin-bottom: 0.5rem;
}
.empty-state p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 1.4rem; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-family: var(--display);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}
.breadcrumbs a { color: var(--ink-faint); text-decoration: none; }
.breadcrumbs a:hover { color: var(--amber-deep); text-decoration: underline; }

/* ---------- Footer (dark cocoa — site signature) ---------- */
.footer {
  background: var(--cocoa);
  color: var(--cream-on-cocoa);
  margin-top: 3.5rem;
  font-size: 0.875rem;
  border-top: 4px solid var(--apricot);
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.75rem 1.25rem 2.25rem;
}
.footer-disclaimer {
  max-width: 80ch;
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--faint-on-cocoa);
}
.footer-disclaimer strong { color: var(--cream-on-cocoa); }
.footer a { color: var(--apricot-soft); }
.footer a:hover { color: #fff; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 1.75rem 0 1.1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--cocoa-soft);
}
.footer-nav a {
  font-family: var(--display);
  font-weight: 500;
  color: var(--cream-on-cocoa);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--apricot-soft); text-decoration: underline; }
.footer-meta { font-size: 0.8rem; color: var(--faint-on-cocoa); }

/* ---------- 404 page ---------- */
.error-page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5rem 1.25rem 5.5rem;
  text-align: center;
}
.error-page .error-code {
  font-family: var(--display);
  font-size: clamp(4.5rem, 14vw, 7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--apricot);
  margin-bottom: 0.4rem;
}
.error-page h1 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 650;
  margin-bottom: 0.8rem;
}
.error-page p { color: var(--ink-soft); max-width: 52ch; margin: 0 auto 1.8rem; }
.error-page .error-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(51, 38, 26, 0.1);
    padding: 0.75rem 1.25rem 1rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.7rem 0.9rem; font-size: 1rem; border-radius: var(--radius-sm); }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .article { padding-top: 2rem; padding-bottom: 3rem; }
  .hero-inner { padding: 2.5rem 1.25rem 2.25rem; }
  .guide-card { padding: 1.15rem 1.2rem; }
  .empty-state { padding: 2.25rem 1.2rem; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .nav-toggle, .skip-link, .footer-nav, .hero-actions { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article, .article-body { max-width: 100%; padding: 0; }
  a { color: #000; text-decoration: none; }
  .article-body a[href^="http"]::after,
  .article a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #444; }
  .callout, .faq-item, .guide-card { border: 1px solid #999; background: #fff; box-shadow: none; }
  .footer { background: #fff; color: #000; border-top: 1px solid #999; }
  .footer-disclaimer, .footer-meta { color: #333; }
}
