/* Simple Insulin & Diabetes Care Guide — local stylesheet
   Calm, plain-language masterpiece edition. Navy-led palette. */
:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --ink: #16242f;
  --ink-soft: #41525f;
  --muted: #6b7d8b;

  /* Calm palette */
  --navy: #244b73;
  --navy-dark: #1b3a5b;
  --navy-soft: #eaf1f8;        /* very light blue tint */
  --lightblue: #d4e3f4;
  --mint: #eafdf8;             /* teal-mint */
  --mint-deep: #cfe6df;
  --teal: #0f7d6b;             /* retained accent for a little life */
  --teal-dark: #0a5a4d;
  --cream: #f1ddc9;
  --cream-soft: #faf2e9;
  --slate: #7e93a0;

  --line: #e3ebf2;
  --line-soft: #eef3f8;

  /* component roles */
  --brand: var(--navy);
  --brand-dark: var(--navy-dark);
  --brand-soft: var(--navy-soft);
  --accent: var(--teal);
  --accent-soft: var(--mint);
  --warn: #b4541a;
  --warn-soft: #fdf1e7;
  --danger: #c0392b;
  --danger-soft: #fdeceb;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(16,40,60,.05), 0 10px 30px rgba(16,40,60,.07);
  --shadow-sm: 0 1px 2px rgba(16,40,60,.04), 0 5px 16px rgba(16,40,60,.05);
  --maxw: 1120px;
  --measure: 68ch;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.65;
  font-size: 18px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.22; color: var(--ink); font-weight: 700; }
h2 { font-size: clamp(25px, 3.4vw, 33px); margin: 0 0 .5em; letter-spacing: -.4px; }
h3 { font-size: clamp(18px, 2.4vw, 21px); margin: 0 0 .4em; }
p { margin: 0 0 1.05em; }
ul, ol { color: var(--ink-soft); padding-left: 1.25em; }
li { margin-bottom: .45em; }
strong { color: var(--ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 60px 0; }
.section--tight { padding: 42px 0; }
/* Anchor-scroll offset: sticky header is ~66px; offset section + band anchors so a
   "jump to" target heading never hides beneath the sticky header. */
.section[id], .band-section[id] { scroll-margin-top: 84px; }
/* Constrain prose to a comfortable reading measure */
.reading { max-width: var(--measure); }

/* Skip link */
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100; }
.skip:focus { left: 0; }

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; color: var(--ink); font-size: 18px; letter-spacing: -.2px; }
.brand:hover { text-decoration: none; }
.brand .mark { flex: none; }
.brand small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: .3px; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 15px; padding: 8px 13px; border-radius: 9px; }
.nav-links a:hover { background: var(--navy-soft); color: var(--navy-dark); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; cursor: pointer; color: var(--ink); }

/* ============ DISCLAIMER BAR (slimmed) ============ */
.disclaimer-bar { background: var(--cream-soft); border-bottom: 1px solid var(--cream); color: #6a3710; font-size: 13.5px; }
.disclaimer-bar .wrap { display: flex; align-items: center; gap: 9px; padding-top: 9px; padding-bottom: 9px; }
.disclaimer-bar svg { flex: none; color: var(--warn); }
.disclaimer-bar strong { color: #5d3210; }
.disclaimer-bar a { color: #7a3f12; text-decoration: underline; font-weight: 600; }

/* ============ HERO ============ */
.hero { position: relative; background:
    radial-gradient(1000px 560px at 90% -12%, var(--mint) 0%, rgba(234,253,248,0) 60%),
    radial-gradient(780px 440px at -5% 115%, var(--navy-soft) 0%, rgba(234,241,248,0) 58%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 52px; align-items: center; padding: 70px 0 62px; }
.hero h1 { font-size: clamp(32px, 5vw, 50px); letter-spacing: -1px; margin: 0 0 .4em; }
.hero .lead { font-size: clamp(17px, 2.1vw, 20px); color: var(--ink-soft); max-width: 40ch; line-height: 1.55; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--mint); color: var(--teal-dark); font-weight: 600; font-size: 13px; letter-spacing: .3px; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.how-to-use { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin: 24px 0 4px; box-shadow: var(--shadow-sm); }
.how-to-use svg { color: var(--navy); margin-top: 2px; }
.how-to-use p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }
.how-to-use strong { color: var(--navy-dark); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15.5px; padding: 13px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-dark); }
.btn-ghost { background: var(--surface); color: var(--navy-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }

.hero-art { position: relative; }
.hero-photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--surface); }
.hero-photo img { width: 100%; height: auto; }

/* ============ BIG PICTURE — 4 STEPS ============ */
.kick-eyebrow { display: inline-block; color: var(--teal-dark); background: var(--mint); font-weight: 700; font-size: 12.5px; letter-spacing: .5px; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.bigsteps { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.bigsteps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 24px; box-shadow: var(--shadow-sm); margin: 0; }
.bigsteps .bs-num { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--navy); color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 14px; }
.bigsteps h3 { font-size: 19px; margin: 0 0 .35em; color: var(--ink); }
.bigsteps p { margin: 0; font-size: 16px; }
.reassure { display: flex; align-items: center; gap: 12px; justify-content: center; text-align: center; max-width: 64ch; margin: 30px auto 0; font-size: 17px; color: var(--teal-dark); background: var(--mint); border: 1px solid var(--mint-deep); border-radius: 999px; padding: 16px 26px; }
.reassure svg { flex: none; color: var(--teal); }

/* ============ SOFT DIVIDER ============ */
.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent); margin: 4px 0; }

/* ============ PART LABEL ============ */
.part-label { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--navy); background: var(--navy-soft); padding: 7px 16px; border-radius: 999px; margin-bottom: 30px; }

/* ============ GUIDE SECTION (the core pattern) ============ */
.guide-section { scroll-margin-top: 84px; padding: 0 0 8px; max-width: 860px; }
.guide-section + .guide-section { margin-top: 52px; padding-top: 48px; border-top: 1px solid var(--line); }
.guide-section > h2 { font-size: clamp(24px, 3.2vw, 31px); color: var(--ink); margin-bottom: .5em; }
.guide-section p { max-width: var(--measure); }
.guide-section h3 { margin-top: 1.5em; color: var(--ink); }

/* The can't-miss SHORT ANSWER callout */
.short-answer { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; background: var(--mint); border: 1px solid var(--mint-deep); border-left: 4px solid var(--teal); border-radius: var(--radius-sm); padding: 18px 20px; margin: 4px 0 22px; }
.short-answer .sa-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--teal-dark); border: 1px solid var(--mint-deep); }
.short-answer p { margin: 0; font-size: 17px; color: #1d3f37; max-width: none; line-height: 1.55; }
.short-answer strong { color: var(--teal-dark); }
.short-answer em { font-style: normal; font-weight: 600; }
/* soft variant for sub-section short answers (light blue) */
.short-answer--soft { background: var(--navy-soft); border-color: var(--lightblue); border-left-color: var(--navy); margin: 10px 0 16px; }
.short-answer--soft .sa-icon { color: var(--navy-dark); border-color: var(--lightblue); }
.short-answer--soft p { color: var(--navy-dark); }
.short-answer--soft strong { color: var(--navy-dark); }

/* Plain definitions list (basal/bolus etc.) */
.plain-defs { list-style: none; padding: 0; margin: 0 0 1.05em; display: grid; gap: 10px; max-width: var(--measure); }
.plain-defs li { background: var(--navy-soft); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0; font-size: 16.5px; }
.plain-defs strong { color: var(--navy-dark); }
.plain-defs em { font-style: italic; color: var(--ink-soft); }

/* "Remember this" note */
.remember { display: grid; gap: 6px; background: var(--cream-soft); border: 1px solid var(--cream); border-radius: var(--radius-sm); padding: 18px 20px; margin: 22px 0; max-width: var(--measure); }
.remember .rm-label { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--warn); }
.remember p { margin: 0; color: #5d3a1e; font-size: 16.5px; }
.remember strong { color: #4a2f17; }

.more-link { font-size: 15.5px; color: var(--muted); }
.fineprint { font-size: 14px; color: var(--muted); margin-top: 14px; max-width: var(--measure); }

/* Section figures (rounded image) — fallback when not inside a media-section */
.section-figure { margin: 8px 0 22px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); background: var(--surface); max-width: 760px; }
.section-figure img { width: 100%; height: auto; }

/* ============ MEDIA SECTION — image BESIDE text, alternating sides ============
   Pairs a contained section image with the heading + short-answer + intro so the
   two read as one unit. Alternates image-left / image-right down the page to
   break the single-column monotony (and shortens the page). Stacks on mobile. */
.media-section { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); gap: 38px; align-items: start; margin: 6px 0 26px; }
.media-section .media-figure { margin: 0; align-self: start; position: sticky; top: 92px; }
.media-section .media-figure img { width: 100%; height: auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--surface); display: block; }
.media-section .media-copy { min-width: 0; }
.media-section .media-copy > :first-child { margin-top: 0; }
.media-section .media-copy > h2 { margin-top: 0; }
.media-section .media-copy p { max-width: 56ch; }
.media-section .media-copy .short-answer p { max-width: none; }
/* image on the right: copy first, figure second visually */
.media-section.media-right .media-figure { order: 2; }
.media-section.media-right .media-copy { order: 1; }
/* keep the contained image from getting too large on very wide screens */
.media-figure { max-width: 460px; }
.media-section.media-right .media-figure { justify-self: end; }

/* ============ FULL-BLEED BAND SECTIONS — chapter breaks that signal importance ====
   Break out of the white flow with a soft navy or mint full-width band. They
   alternate with white sections to create chapters and let the reader breathe. */
.band-section { position: relative; padding: 56px 0; margin: 8px 0; }
.band-section.band-mint { background: linear-gradient(180deg, var(--mint) 0%, #f3fdfa 100%); border-top: 1px solid var(--mint-deep); border-bottom: 1px solid var(--mint-deep); }
.band-section.band-navy { background:
    radial-gradient(900px 480px at 88% -20%, rgba(255,255,255,.06), rgba(255,255,255,0) 60%),
    linear-gradient(165deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: #e9f1fb; }
.band-section.band-soft { background: linear-gradient(180deg, var(--navy-soft) 0%, #f4f8fd 100%); border-top: 1px solid var(--lightblue); border-bottom: 1px solid var(--lightblue); }
.band-section .part-label { margin-bottom: 22px; }
/* navy band recolours the headings, text and chapter label so it reads on dark */
.band-section.band-navy h2, .band-section.band-navy h3 { color: #fff; }
.band-section.band-navy p { color: #cfe0f2; }
.band-section.band-navy .part-label { color: #cfe0f2; background: rgba(255,255,255,.12); }
.band-section.band-navy .reading { max-width: var(--measure); }

/* ============ PULL-QUOTE — a calm line between heavy sections ============ */
.pullquote { max-width: 720px; margin: 30px auto; text-align: center; padding: 6px 18px; }
.pullquote p { font-size: clamp(20px, 2.6vw, 25px); line-height: 1.4; color: var(--navy-dark); font-weight: 600; letter-spacing: -.3px; margin: 0; max-width: none; }
.pullquote .pq-mark { display: block; width: 38px; height: 4px; border-radius: 999px; background: var(--teal); margin: 0 auto 16px; }
.pullquote cite { display: block; margin-top: 12px; font-style: normal; font-weight: 600; font-size: 14px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.band-section.band-navy .pullquote p { color: #fff; }
.band-section.band-navy .pullquote cite { color: #9fc0e4; }
.band-section.band-navy .pullquote .pq-mark { background: #8be0cf; }

/* bigsteps inside a band: cards keep their white surface and read as chapters */
.band-mint .bigsteps li, .band-soft .bigsteps li { background: var(--surface); }

/* ============ CARDS GRID ============ */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: transform .14s ease, box-shadow .14s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p { max-width: none; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0 0 0; }
.card ul li { font-size: 15.5px; }
.card--type { border-top: 4px solid var(--navy); }
.card-tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--navy-dark); background: var(--navy-soft); padding: 4px 11px; border-radius: 999px; margin-bottom: 12px; }
.card--type:nth-child(2) .card-tag { color: var(--teal-dark); background: var(--mint); }
.card--type:nth-child(3) .card-tag { color: var(--warn); background: var(--warn-soft); }

/* ============ TABLES (rounded zebra, mobile card reflow) ============ */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); margin: 6px 0 4px; -webkit-overflow-scrolling: touch; }
.tbl-wrap:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
table.info { width: 100%; border-collapse: collapse; min-width: 560px; }
table.info th, table.info td { text-align: left; padding: 13px 17px; border-bottom: 1px solid var(--line); font-size: 15.5px; vertical-align: top; }
table.info thead th { background: var(--navy-soft); color: var(--navy-dark); font-size: 13px; text-transform: uppercase; letter-spacing: .4px; position: sticky; top: 0; }
table.info tbody tr:nth-child(even) td { background: var(--line-soft); }
table.info tbody tr:last-child td { border-bottom: none; }
table.info td:first-child { font-weight: 600; color: var(--ink); }
table.info.compact th, table.info.compact td { padding: 11px 14px; font-size: 14.5px; }
table.info td .brands { display: inline-block; font-size: 12px; font-weight: 600; margin-top: 5px; padding: 2px 9px; border-radius: 999px; }
.brands--meal { background: var(--mint); color: var(--teal-dark); }
.brands--base { background: var(--navy-soft); color: var(--navy-dark); }
.brands--both { background: var(--cream-soft); color: #7a4a1c; }
table.info caption { caption-side: bottom; text-align: left; font-size: 13.5px; color: var(--muted); padding: 13px 16px; line-height: 1.55; background: var(--surface); border-top: 1px solid var(--line); }
table.info caption strong { color: var(--ink-soft); }
.tbl-min-720 { min-width: 240px; }
.tbl-min-640 { min-width: 200px; }

/* ============ CALLOUTS / NOTES ============ */
.callout { background: var(--navy-soft); border: 1px solid var(--lightblue); border-radius: var(--radius-sm); padding: 20px 24px; margin: 1.5em 0; max-width: var(--measure); }
.callout h3 { margin: 0 0 .4em; color: var(--navy-dark); }
.callout p { margin: 0; color: var(--navy-dark); max-width: none; }
.callout strong { color: var(--navy-dark); }
.callout--how { background: var(--navy-soft); border-color: var(--lightblue); }

.note-warn { background: var(--warn-soft); border: 1px solid var(--cream); border-left: 4px solid var(--warn); border-radius: var(--radius-sm); padding: 18px 22px; margin: 1.5em 0; max-width: var(--measure); }
.note-warn p { margin: 0; color: #6a3710; max-width: none; }
.note-warn strong { color: #4a2f17; }

/* ============ DUO PANELS ============ */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 6px 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.panel h3 { margin-top: 0; }
.panel p { max-width: none; margin-bottom: 0; }
.panel ul { margin: 0; }

/* Safety duo (low vs high) */
.safety-duo .panel { border-top: none; }
.panel.is-low { border-top: 5px solid var(--navy); background: linear-gradient(180deg, var(--navy-soft), var(--surface) 22%); }
.panel.is-high { border-top: 5px solid var(--warn); background: linear-gradient(180deg, var(--warn-soft), var(--surface) 22%); }
.panel h3 .tag { margin-right: 6px; }
.panel .threshold { font-size: 15.5px; margin: 0 0 14px; }
.panel .signs-label { font-weight: 700; color: var(--ink); margin: 0 0 .4em; font-size: 14.5px; text-transform: uppercase; letter-spacing: .3px; }
.panel .signs { margin: 0; padding-left: 1.2em; }
.panel .signs li { margin-bottom: .5em; font-size: 15.5px; }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.tag.low { background: var(--navy); color: #fff; }
.tag.high { background: var(--warn); color: #fff; }

/* Pros/cons list */
.pc { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 9px; }
.pc li { display: grid; grid-template-columns: 20px 1fr; gap: 9px; margin: 0; font-size: 15px; color: var(--ink-soft); }
.pc .pro { color: var(--teal); font-weight: 700; }
.pc .con { color: var(--warn); font-weight: 700; }

/* ============ DEFINITION / KEY-VALUE (storage) ============ */
.deflist { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); margin: 8px 0; max-width: 860px; }
.deflist > div { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.deflist > div:nth-child(even) { background: var(--line-soft); }
.deflist > div:last-child { border-bottom: none; }
.deflist dt { font-weight: 700; color: var(--ink); margin: 0; }
.deflist dd { margin: 0; color: var(--ink-soft); font-size: 15.5px; max-width: none; }

/* ============ RULE OF 15 (steps) ============ */
.r15 { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 0; padding: 0; }
.r15 .s { background: var(--navy-soft); border: 1px solid var(--lightblue); border-radius: var(--radius-sm); padding: 18px 16px; margin: 0; position: relative; }
.r15 .s b { display: block; color: var(--navy); font-size: 13px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.r15 .s p { margin: 0; font-size: 14.5px; color: var(--navy-dark); max-width: none; }

/* ============ EMERGENCY BOX (red, distinct) ============ */
.emergency { background: var(--danger-soft); border: 1px solid #f1c4bf; border-left: 5px solid var(--danger); border-radius: var(--radius); padding: 22px 24px; margin: 26px 0 0; box-shadow: 0 6px 22px rgba(192,57,43,.08); }
.emergency-title { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: clamp(17px, 2.4vw, 20px); color: #8e271d; margin-bottom: 16px; }
.emergency-title svg { flex: none; color: var(--danger); }
.emergency-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.emergency .ec { background: #fff; border: 1px solid #f1c4bf; border-radius: var(--radius-sm); padding: 16px 18px; }
.emergency .ec h4 { color: #8e271d; margin: 0 0 .4em; font-size: 16px; }
.emergency .ec p { margin: 0; color: #7d251c; font-size: 15px; max-width: none; }
.emergency .ec strong { color: #6a1f17; }
.emergency-when { margin: 0; color: #7d251c; font-size: 16px; max-width: none; background: #fff; border: 1px solid #f1c4bf; border-radius: var(--radius-sm); padding: 16px 18px; }
.emergency-when strong { color: #6a1f17; }

/* ============ STEPS (getting it safely) ============ */
.steps { display: grid; gap: 16px; margin: 8px 0; }
.step { display: grid; grid-template-columns: 46px 1fr; gap: 18px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.step .num { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.step h3 { margin: 0 0 .25em; }
.step p { margin-bottom: 0; max-width: none; }

/* ============ CTA BAND ============ */
.band { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: #eaf2fb; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow); margin-top: 30px; }
.band-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.band h2 { color: #fff; margin-bottom: .4em; }
.band p { color: #cfe0f2; max-width: none; }
.band .btn-primary { background: #fff; color: var(--navy-dark); }
.band .btn-primary:hover { background: var(--mint); }
.band .hero-cta { margin-top: 18px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.check-list li { display: grid; grid-template-columns: 26px 1fr; gap: 11px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0; color: #eaf2fb; font-size: 15px; }
.check-list .v { color: #8be0cf; font-weight: 700; }

/* ============ REFERENCE BLOCKS (collapsible) ============ */
.guide-section--ref { max-width: 980px; }
.guide-section--ref + .guide-section--ref { margin-top: 16px; padding-top: 0; border-top: none; }
.ref-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 14px; overflow: hidden; }
.ref-block > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.ref-block > summary::-webkit-details-marker { display: none; }
.ref-block > summary::after { content: "+"; font-size: 26px; line-height: 1; color: var(--navy); font-weight: 400; align-self: center; }
.ref-block[open] > summary::after { content: "\2013"; }
.ref-block[open] > summary { border-bottom: 1px solid var(--line); }
.ref-block .rb-title { font-size: 19px; font-weight: 700; color: var(--ink); }
.ref-block .rb-meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ref-block .rb-body { padding: 22px 24px 24px; }
.ref-block .rb-intro { color: var(--ink-soft); max-width: var(--measure); }
.ref-block .rb-more, .ref-block .rb-body > .fineprint { margin-top: 18px; }

/* Glossary */
.glossary { columns: 2; column-gap: 40px; }
.glossary dl { margin: 0; }
.glossary div { break-inside: avoid; margin-bottom: 16px; }
.glossary dt { font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.glossary dd { margin: 0; color: var(--ink-soft); font-size: 15px; max-width: none; }

/* FAQ */
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16.5px; color: var(--ink); padding: 16px 0; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 23px; color: var(--navy); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .answer { padding: 14px 0 18px; }
.faq .answer p { margin-bottom: 0; max-width: none; font-size: 16px; }

/* Source references grid */
.ref-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; list-style: none; padding: 0; margin: 18px 0 0; }
.ref-grid li { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14.5px; color: var(--ink-soft); }
.ref-grid b { color: var(--ink); display: block; margin-bottom: 2px; }

/* Full disclaimer (reframed, prominent) */
.full-disclaimer { background: var(--cream-soft); border: 1px solid var(--cream); border-left: 5px solid var(--warn); border-radius: var(--radius); padding: 22px 26px; margin-top: 16px; }
.full-disclaimer .fd-title { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #7a3f12; font-size: 18px; margin-bottom: .5em; }
.full-disclaimer .fd-title svg { flex: none; color: var(--warn); }
.full-disclaimer p { margin: 0; color: #5d3a1e; max-width: none; }
.full-disclaimer strong { color: #4a2f17; }

/* "More detail" inline disclosure (diagnostic thresholds) */
.more-detail { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); margin: 18px 0; max-width: 860px; }
.more-detail > summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--navy-dark); padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.more-detail > summary::-webkit-details-marker { display: none; }
.more-detail > summary::after { content: "+"; font-size: 22px; color: var(--navy); line-height: 1; }
.more-detail[open] > summary::after { content: "\2013"; }
.more-detail[open] > summary { border-bottom: 1px solid var(--line); }
.more-detail .md-body { padding: 16px 18px 18px; }
.more-detail .md-body > p { max-width: var(--measure); }

/* ============ FOOTER ============ */
.site-footer { background: #15252f; color: #aec2cd; padding: 54px 0 28px; margin-top: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; margin-bottom: 34px; }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 16px; }
.site-footer a { color: #aec2cd; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand small { color: var(--slate); }
.footer-brand p { color: #91a6b2; font-size: 15px; max-width: 42ch; }
.footer-disclaimer { font-size: 13.5px; color: var(--slate); border-top: 1px solid #223540; padding-top: 22px; }
.footer-disclaimer p { color: var(--slate); max-width: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--slate); margin-top: 22px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; padding: 46px 0 50px; }
  .hero-art { order: -1; max-width: 520px; }
  .hero .lead { max-width: none; }
  .bigsteps { grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: 1fr; gap: 26px; }
  .emergency-cards { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  /* Media sections stack: image above text, full width, no sticky */
  .media-section { grid-template-columns: 1fr; gap: 18px; }
  .media-section .media-figure { position: static; top: auto; max-width: 560px; }
  .media-section.media-right .media-figure { order: 0; justify-self: stretch; }
  .media-section.media-right .media-copy { order: 0; }
  .media-section .media-copy p { max-width: var(--measure); }
  .band-section { padding: 44px 0; }
}
@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .nav-links { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 18px 16px; box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .22s ease; }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 8px; border-radius: 8px; font-size: 16px; }
  .nav-toggle { display: inline-flex; }
  .r15 { grid-template-columns: 1fr 1fr; }
  .glossary { columns: 1; }
  .ref-grid { grid-template-columns: 1fr; }
  .deflist > div { grid-template-columns: 1fr; gap: 4px; }
  .band { padding: 30px 26px; }

  /* TABLES → card reflow on small screens */
  .tbl-wrap { overflow: visible; border: none; background: none; box-shadow: none; }
  table.info { min-width: 0; border-collapse: separate; border-spacing: 0; }
  table.info 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.info tr { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); margin-bottom: 12px; padding: 6px 4px; }
  table.info tbody tr:nth-child(even) td { background: transparent; }
  table.info td { display: grid; grid-template-columns: 42% 1fr; gap: 12px; align-items: baseline; border: none; border-bottom: 1px solid var(--line-soft); padding: 10px 16px; font-size: 15px; }
  table.info tr td:last-child { border-bottom: none; }
  table.info td:first-child { font-size: 16px; }
  table.info td::before { content: attr(data-label); font-weight: 700; color: var(--navy-dark); font-size: 12.5px; text-transform: uppercase; letter-spacing: .3px; }
  table.info td:first-child::before { content: attr(data-label); }
  table.info td .brands { grid-column: 2; }
  table.info caption { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-top: 2px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .section { padding: 46px 0; }
  .section--tight { padding: 36px 0; }
  .band-section { padding: 38px 0; }
  .pullquote { margin: 22px auto; padding: 4px 4px; }
  .media-section { margin-bottom: 18px; }
  .brand small { display: none; }
  .r15 { grid-template-columns: 1fr; }
  .reassure { border-radius: var(--radius); flex-direction: column; gap: 8px; padding: 16px 20px; }
  .short-answer { grid-template-columns: 1fr; }
  .short-answer .sa-icon { display: none; }
  .ref-block > summary { flex-direction: column; gap: 4px; align-items: flex-start; }
  .ref-block > summary::after { position: absolute; right: 24px; }
  .ref-block { position: relative; }
  table.info td { grid-template-columns: 1fr; gap: 2px; }
  table.info td::before { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
