/*
 * Design tokens.
 *
 * Before this file the stylesheet carried 115 distinct hex colours, 62 font
 * sizes, 11 border radii and 12 shadows — values that had accreted across
 * successive design passes rather than being chosen. Everything below is the
 * system those values collapse into.
 *
 * Every ink and brand colour here is verified to at least 4.5:1 against
 * surface-0, surface-1 and surface-2, so body text passes WCAG AA on any
 * light surface in the design.
 */
:root {
  /* ---- Surfaces, light to dark ---------------------------------------- */
  --surface-0: #ffffff;
  --surface-1: #f5f9fb;
  --surface-2: #e8f1f4;
  --surface-3: #d8e5e9;
  --surface-dark: #123a54;
  --surface-darker: #0b2437;
  --surface-darkest: #06192a;

  /* ---- Ink ------------------------------------------------------------- */
  --ink-900: #0b2437; /* display headings          15.0:1 on surface-1 */
  --ink-700: #17364f; /* body and subheadings      11.8:1 */
  --ink-500: #4a6273; /* secondary and captions     6.0:1 */
  --ink-inverse: #ffffff;
  --ink-inverse-soft: rgba(255, 255, 255, 0.74);

  /* ---- Brand ----------------------------------------------------------- */
  --brand-700: #0a4b5a; /* pressed / hover           9.2:1 */
  --brand-600: #0d6072; /* primary actions           6.8:1 */
  --brand-500: #0c6877; /* brand text, eyebrows      6.1:1 */
  --brand-100: #e4eff2; /* tinted fills */
  --brand-050: #f0f7f9;

  /* ---- Accent ---------------------------------------------------------- */
  --accent-600: #9c5c33; /* was #cf9c77, which failed at 2.3:1  5.0:1 */
  --accent-100: #f3e7dd;

  /* ---- Borders --------------------------------------------------------- */
  --border-subtle: #e6eef1;
  --border: #d3e1e6;
  --border-strong: #bdd2da;
  --border-inverse: rgba(255, 255, 255, 0.18);

  /* ---- Type scale ------------------------------------------------------ */
  --fs-2xs: 0.6875rem; /* 11px — eyebrows, meta */
  --fs-xs: 0.75rem; /* 12px */
  --fs-sm: 0.8125rem; /* 13px */
  --fs-base: 0.875rem; /* 14px */
  --fs-md: 0.9375rem; /* 15px — body */
  --fs-lg: 1rem; /* 16px */
  --fs-xl: 1.125rem; /* 18px */
  --fs-2xl: 1.3125rem; /* 21px */
  --fs-3xl: 1.5rem; /* 24px */
  /* Fluid display scale. Each is linear in viewport width and strictly
     increasing, so a heading never shrinks as the screen grows. */
  --fs-display-3: clamp(1.5rem, 1.3rem + 0.9vw, 2.25rem);
  --fs-display-2: clamp(2.1rem, 1.77rem + 1.48vw, 3.25rem);
  --fs-display-1: clamp(2.625rem, 2.23rem + 1.77vw, 4rem);

  /* ---- Radii ----------------------------------------------------------- */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
  --r-circle: 50%;

  /* ---- Elevation ------------------------------------------------------- */
  --sh-1: 0 1px 2px rgba(11, 36, 55, 0.06), 0 2px 8px rgba(11, 36, 55, 0.04);
  --sh-2: 0 4px 12px rgba(11, 36, 55, 0.08), 0 12px 28px rgba(11, 36, 55, 0.06);
  --sh-3: 0 12px 30px rgba(11, 36, 55, 0.1), 0 28px 64px rgba(11, 36, 55, 0.09);

  /* ---- Motion ---------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur-fast: 0.16s;
  --dur: 0.24s;

  /* ---- Focus ----------------------------------------------------------- */
  --focus-ring: 0 0 0 3px var(--surface-0), 0 0 0 5.5px var(--brand-600);

  /* Minimum comfortable hit area (WCAG 2.2 target size). */
  --tap: 44px;
}

/*
 * Semantic extensions.
 *
 * `--brand-bright` is the only brand step legible on the dark surfaces, and
 * the danger ramp carries the urgent-care callout. The greens still scattered
 * through the base layer (#17332e, #9aab96, #bfcfaa …) are leftovers from an
 * abandoned palette that the clinical blue superseded; they are mapped here
 * rather than left to shadow the real colours.
 */
:root {
  --brand-bright: #4fc3cf; /* on dark surfaces only */
  --danger-700: #6b2029;
  --danger-600: #8a3940;
  --danger-100: #f3c7aa; /* light text on a danger surface */
  --danger-050: #f9eeeb; /* pale danger surface */
}

:root {
  --navy: var(--ink-700);
  --navy-deep: var(--ink-900);
  --teal: var(--brand-600);
  --teal-pale: var(--surface-2);
  --paper: var(--surface-0);
  --ground: var(--surface-1);
  --line: var(--border);
  --text: var(--ink-700);
  --muted: var(--ink-500);
  --alert: var(--danger-700);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ground);
  color: var(--text);
  font-family: "Source Sans 3", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--fs-lg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--teal);
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 3px solid rgba(13, 96, 114, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: -100px;
  left: 12px;
  padding: 9px 14px;
  background: var(--surface-0);
  color: #000;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(100% - 36px, 1080px);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface-0);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  line-height: 0;
}

.brand img {
  width: 185px;
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-actions > a:first-child {
  display: none;
  color: var(--navy);
  font-size: var(--fs-base);
  font-weight: 700;
  text-decoration: none;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--teal);
  border-radius: var(--r-xs);
  background: var(--teal);
  color: var(--surface-0);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
}

.breadcrumb {
  padding: 18px 0;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 7px;
  color: var(--ink-500);
}

.article-hero {
  padding: 36px 0 46px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-0);
}

.eyebrow {
  display: block;
  margin-bottom: 13px;
  color: var(--teal);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--navy);
  font-family: "IBM Plex Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-wrap: balance;
}

h1 {
  max-width: 860px;
  margin-bottom: 20px;
  font-size: var(--fs-display-1);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.standfirst {
  max-width: 740px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: var(--fs-xl);
  line-height: 1.65;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  margin: 0;
  color: var(--ink-500);
  font-size: var(--fs-xs);
}

.article-layout {
  display: grid;
  gap: 30px;
  padding-block: 36px 68px;
}

.article-body {
  min-width: 0;
}

.article-body h2 {
  margin: 42px 0 14px;
  font-size: var(--fs-display-3);
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.article-body h3 {
  margin: 27px 0 9px;
  font-size: var(--fs-2xl);
  line-height: 1.3;
}

.article-body p,
.article-body li {
  color: var(--ink-500);
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
}

.article-body li + li {
  margin-top: 8px;
}

.safety-box,
.note-box,
.answer-box {
  margin: 0 0 30px;
  padding: 20px;
  border-left: 4px solid var(--teal);
  background: var(--teal-pale);
}

.safety-box {
  border-left-color: var(--alert);
  background: var(--danger-050);
}

.safety-box strong,
.note-box strong,
.answer-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.safety-box p,
.note-box p,
.answer-box p {
  margin: 0;
}

.safety-box p {
  color: var(--ink-700);
}

.answer-box {
  margin-top: 25px;
  border-left-color: var(--ink-500);
  background: var(--surface-0);
}

.contents {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface-0);
}

.contents h2 {
  margin: 0 0 12px;
  font-size: var(--fs-lg);
}

.contents ol {
  padding-left: 20px;
  margin: 0;
}

.contents li + li {
  margin-top: 5px;
}

.contents a {
  font-size: var(--fs-base);
  font-weight: 650;
}

.checklist {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding: 14px 15px 14px 43px;
  border: 1px solid var(--line);
  background: var(--surface-0);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  top: 14px;
  left: 15px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-pale);
  color: var(--teal);
  font-size: var(--fs-xs);
  font-weight: 800;
}

.table-scroll {
  max-width: 100%;
  margin: 24px 0 32px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface-0);
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  color: var(--ink-500);
  font-size: var(--fs-base);
  line-height: 1.55;
}

.comparison-table th,
.comparison-table td {
  padding: 15px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.comparison-table th:last-child,
.comparison-table td:last-child {
  border-right: 0;
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
  border-bottom: 0;
}

.comparison-table thead th {
  background: var(--navy);
  color: var(--surface-0);
  font-family: "IBM Plex Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--fs-sm);
}

.comparison-table tbody th {
  width: 26%;
  background: var(--teal-pale);
  color: var(--navy);
  font-weight: 700;
}

.source-list {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface-0);
}

.source-list h2 {
  margin-top: 0;
}

.source-list li {
  overflow-wrap: anywhere;
}

.article-aside {
  align-self: start;
  padding: 23px;
  border: 1px solid var(--line);
  background: var(--surface-0);
}

.article-aside h2 {
  margin-bottom: 10px;
  font-size: var(--fs-xl);
}

.article-aside p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: 1.6;
}

.article-aside .button {
  width: 100%;
}

.article-aside hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-aside a:not(.button) {
  display: block;
  margin-top: 9px;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.site-footer {
  padding: 38px 0;
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  display: grid;
  gap: 18px;
}

.site-footer p {
  max-width: 720px;
  margin: 0;
  font-size: var(--fs-xs);
  line-height: 1.6;
}

.site-footer a {
  color: var(--surface-0);
}

@media (min-width: 680px) {
  .header-actions > a:first-child {
    display: inline;
  }

  .article-hero {
    padding: 58px 0 66px;
  }

  .article-layout {
    padding-block: 54px 90px;
  }
}

@media (min-width: 920px) {
  .container {
    width: min(100% - 72px, 1080px);
  }

  .brand img {
    width: 220px;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 70px;
  }

  .article-aside {
    position: sticky;
    top: 26px;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
