/* ==========================================================================
   FBAR Reference — Stylesheet
   Published by St Fin Corp
   Dependency-free. No external fonts, no third-party CSS, no trackers.
   --------------------------------------------------------------------------
   1. Design tokens
   2. Reset & base
   3. Layout primitives
   4. Header & navigation
   5. Hero & page headers
   6. Buttons & badges
   7. Cards
   8. Callouts
   9. Tables
  10. Article layout, TOC & prose helpers
  11. Steps, FAQ, glossary
  12. Forms
  13. Footer
  14. Cookie notice & back-to-top
  15. Ad slots
  16. Utilities
  17. Print
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --navy-900: #0b1f3a;
  --navy-800: #102c50;
  --navy-700: #16386a;
  --navy-600: #1d4685;
  --navy-100: #e8eef7;
  --navy-050: #f4f7fc;

  --accent-700: #8a5a00;
  --accent-600: #a86e05;
  --accent-500: #c98a12;
  --accent-100: #fdf3dd;

  --teal-700: #0f5f5c;
  --teal-100: #e2f2f1;

  --red-700: #8c2222;
  --red-100: #fbeaea;

  --green-700: #1c5c33;
  --green-100: #e6f3ea;

  /* Neutrals */
  --ink-900: #14181f;
  --ink-800: #232a35;
  --ink-700: #36404f;
  --ink-600: #4d596b;
  --ink-500: #6b7787;
  --ink-400: #939dab;
  --ink-300: #c3cad4;
  --ink-200: #e0e5ec;
  --ink-100: #eff2f6;
  --ink-050: #f7f9fb;
  --white: #ffffff;

  /* Semantic */
  --bg: var(--white);
  --bg-alt: var(--ink-050);
  --text: var(--ink-800);
  --text-muted: var(--ink-600);
  --heading: var(--navy-900);
  --link: var(--navy-700);
  --link-hover: var(--accent-700);
  --border: var(--ink-200);
  --border-strong: var(--ink-300);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --step-1: clamp(1.15rem, 1.1rem + 0.25vw, 1.3rem);
  --step-2: clamp(1.35rem, 1.25rem + 0.5vw, 1.65rem);
  --step-3: clamp(1.6rem, 1.4rem + 0.9vw, 2.15rem);
  --step-4: clamp(1.95rem, 1.6rem + 1.5vw, 2.9rem);

  /* Space & shape */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(11, 31, 58, .06), 0 1px 3px rgba(11, 31, 58, .07);
  --shadow: 0 2px 4px rgba(11, 31, 58, .05), 0 8px 24px rgba(11, 31, 58, .08);
  --shadow-lg: 0 4px 8px rgba(11, 31, 58, .06), 0 18px 48px rgba(11, 31, 58, .12);

  --wrap: 1180px;
  --measure: 74ch;
  --header-h: 68px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--heading);
  line-height: 1.22;
  margin: 0 0 var(--sp-4);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); margin-top: var(--sp-7); }
h3 { font-size: var(--step-2); margin-top: var(--sp-6); }
h4 { font-size: var(--step-1); margin-top: var(--sp-5); font-family: var(--font-sans); letter-spacing: 0; }

p { margin: 0 0 var(--sp-4); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-500);
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.35rem; }
li { margin-bottom: var(--sp-2); }
li > ul, li > ol { margin-top: var(--sp-2); }

strong { color: var(--ink-900); font-weight: 650; }

blockquote {
  margin: var(--sp-5) 0;
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid var(--navy-600);
  background: var(--navy-050);
  color: var(--ink-700);
  font-style: italic;
  border-radius: 0 var(--radius) var(--radius) 0;
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; font-style: normal; font-size: var(--step--1); color: var(--ink-500); margin-top: var(--sp-2); }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--ink-100);
  padding: .12em .38em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-7) 0; }

abbr[title] { text-decoration: underline dotted; cursor: help; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.wrap--narrow { max-width: 840px; }

@media (max-width: 560px) {
  .wrap { padding-inline: var(--sp-4); }
}

.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-6); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.section__head { max-width: 62ch; margin-bottom: var(--sp-6); }
.section__head h2 { margin-top: 0; }
.section__head p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy-900);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--navy-900);
  color: var(--navy-100);
  font-size: var(--step--1);
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding-block: var(--sp-2);
}
.topbar a { color: #fff; }
.topbar__note { margin: 0; opacity: .88; }
.topbar__links { display: flex; gap: var(--sp-4); list-style: none; margin: 0; padding: 0; }
.topbar__links li { margin: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--navy-900);
  min-width: 0;
}
.brand:hover { color: var(--navy-900); }
.brand__mark {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: -0.01em;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand__tag {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--ink-500);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The tagline is the first thing to go when the header runs out of room —
   the mark and the site name always stay legible. */
@media (max-width: 560px) {
  .brand__tag { display: none; }
  .brand__mark { width: 36px; height: 36px; flex-basis: 36px; font-size: .68rem; }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  background: var(--white);
  border: 1px solid var(--border-strong);
  color: var(--navy-900);
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle__bars { display: inline-block; width: 16px; height: 10px; position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after,
.nav-toggle__bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 4px; }
.nav-toggle__bars::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-4px) rotate(-45deg); }

.nav { display: flex; align-items: center; }
.nav__list { display: flex; align-items: center; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; position: relative; }
.nav__link {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  color: var(--ink-700);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 550;
  white-space: nowrap;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.nav__link:hover { background: var(--navy-050); color: var(--navy-800); }
.nav__link[aria-current="page"] {
  color: var(--navy-900);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent-500);
}

.has-sub > .nav__link::after {
  content: "";
  display: inline-block;
  width: .38em; height: .38em;
  margin-left: .45em;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.subnav {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 264px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2);
  list-style: none;
  margin: 0;
  display: none;
  z-index: 110;
}
.has-sub:hover > .subnav,
.has-sub:focus-within > .subnav,
.subnav.is-open { display: block; }
.subnav a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink-700);
  font-size: .92rem;
}
.subnav a:hover { background: var(--navy-050); color: var(--navy-800); }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: none;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: var(--sp-4) var(--sp-5) var(--sp-6);
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { padding: var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--border); font-size: 1rem; width: 100%; text-align: left; }
  .nav__link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent-500); }
  .has-sub > .nav__link::after { float: right; margin-top: .55em; }
  .subnav {
    position: static;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: var(--sp-1) 0 var(--sp-3) var(--sp-4);
    min-width: 0;
  }
}

/* --------------------------------------------------------------------------
   5. Hero & page headers
   -------------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 400px at 12% -10%, rgba(201, 138, 18, .16), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, #0d2547 100%);
  color: #e9eff8;
  padding-block: var(--sp-9) var(--sp-8);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-500), var(--teal-700) 55%, var(--navy-600));
}
.hero__grid {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; gap: var(--sp-6); } }

.hero h1 { color: #fff; margin-bottom: var(--sp-4); }
.hero__eyebrow {
  display: inline-block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
  color: var(--accent-500);
  border: 1px solid rgba(201, 138, 18, .45);
  background: rgba(201, 138, 18, .1);
  padding: .32rem .7rem;
  border-radius: 999px;
  margin-bottom: var(--sp-4);
}
.hero__lead { font-size: var(--step-1); color: #cfdbec; max-width: 58ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }

.hero-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}
.hero-card h2 {
  color: #fff;
  font-size: var(--step-1);
  margin: 0 0 var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.hero-card dl { margin: 0; display: grid; gap: var(--sp-3); }
.hero-card dt {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #9fb3ce;
  font-weight: 700;
}
.hero-card dd { margin: .15rem 0 0; color: #edf2f9; font-weight: 600; }
.hero-card__foot { margin: var(--sp-4) 0 0; font-size: var(--step--1); color: #9fb3ce; }

.page-head {
  background: linear-gradient(170deg, var(--navy-050), var(--white));
  border-bottom: 1px solid var(--border);
  padding-block: var(--sp-5) var(--sp-6);
}
.page-head h1 { margin-bottom: var(--sp-3); }
.page-head__lead { font-size: var(--step-1); color: var(--text-muted); max-width: var(--measure); margin-bottom: 0; }
.page-head__meta {
  margin-top: var(--sp-4);
  font-size: var(--step--1);
  color: var(--ink-500);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
}

/* --------------------------------------------------------------------------
   6. Buttons & badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font: inherit;
  font-weight: 650;
  font-size: .96rem;
  line-height: 1.2;
  padding: .78rem 1.35rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent-600); border-color: var(--accent-600); color: #fff; }
.btn--primary:hover { background: var(--accent-700); border-color: var(--accent-700); color: #fff; }
.btn--navy { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-900); color: #fff; }
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn--outline { background: var(--white); border-color: var(--border-strong); color: var(--navy-800); }
.btn--outline:hover { border-color: var(--navy-700); background: var(--navy-050); color: var(--navy-900); }
.btn--sm { padding: .5rem .9rem; font-size: .875rem; }
.btn--block { width: 100%; }

.badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .26rem .6rem;
  border-radius: 999px;
  background: var(--navy-100);
  color: var(--navy-800);
}
.badge--accent { background: var(--accent-100); color: var(--accent-700); }
.badge--teal { background: var(--teal-100); color: var(--teal-700); }
.badge--red { background: var(--red-100); color: var(--red-700); }
.badge--green { background: var(--green-100); color: var(--green-700); }

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card h3 { margin-top: 0; font-size: var(--step-1); }
.card p:last-child { margin-bottom: 0; }

a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--navy-600);
  color: inherit;
}
.card__kicker {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-700);
  display: block;
  margin-bottom: var(--sp-2);
}
.card__more { display: inline-block; margin-top: var(--sp-3); font-weight: 650; font-size: .92rem; color: var(--navy-700); }
.card__more::after { content: " \2192"; }

.card__num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}

.stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy-700);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
}
.stat__value {
  font-family: var(--font-serif);
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.1;
  display: block;
}
.stat__label { font-size: var(--step--1); color: var(--text-muted); margin: var(--sp-2) 0 0; }

/* --------------------------------------------------------------------------
   8. Callouts
   -------------------------------------------------------------------------- */
.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy-600);
  background: var(--navy-050);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-5) 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout__title {
  font-family: var(--font-sans);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--navy-800);
  margin: 0 0 var(--sp-2);
}
.callout--warn { border-left-color: var(--red-700); background: var(--red-100); }
.callout--warn .callout__title { color: var(--red-700); }
.callout--tip { border-left-color: var(--teal-700); background: var(--teal-100); }
.callout--tip .callout__title { color: var(--teal-700); }
.callout--note { border-left-color: var(--accent-600); background: var(--accent-100); }
.callout--note .callout__title { color: var(--accent-700); }

.disclaimer-box {
  background: var(--ink-050);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--step--1);
  color: var(--text-muted);
  margin: var(--sp-6) 0 0;
}
.disclaimer-box strong { color: var(--ink-800); }
.disclaimer-box > :last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   9. Tables
   -------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; margin: var(--sp-5) 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--white); }
caption {
  caption-side: top;
  text-align: left;
  font-size: var(--step--1);
  color: var(--text-muted);
  padding: var(--sp-3) var(--sp-4);
  background: var(--ink-050);
  border-bottom: 1px solid var(--border);
}
th, td { padding: .78rem var(--sp-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th {
  background: var(--navy-900);
  color: #fff;
  font-family: var(--font-sans);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
}
tbody tr:nth-child(even) { background: var(--ink-050); }
tbody tr:last-child td { border-bottom: 0; }
th[scope="row"] { font-weight: 650; color: var(--navy-900); }

/* --------------------------------------------------------------------------
   10. Article layout, TOC & prose helpers
   -------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--sp-7);
  align-items: start;
  padding-block: var(--sp-7);
}
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; gap: var(--sp-6); } }

.prose { max-width: var(--measure); min-width: 0; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose h2 { padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }

.prose ul.checks, .prose ul.crosses { list-style: none; padding-left: 0; }
.prose ul.checks li, .prose ul.crosses li { position: relative; padding-left: 1.7rem; }
.prose ul.checks li::before {
  content: "";
  position: absolute; left: .1rem; top: .55em;
  width: .72rem; height: .38rem;
  border-left: 2px solid var(--green-700);
  border-bottom: 2px solid var(--green-700);
  transform: rotate(-45deg);
}
.prose ul.crosses li::before {
  content: "\00d7";
  position: absolute; left: .25rem; top: -.05em;
  color: var(--red-700); font-weight: 700; font-size: 1.15em;
}

.sidebar { position: sticky; top: calc(var(--header-h) + var(--sp-5)); display: grid; gap: var(--sp-5); min-width: 0; }
@media (max-width: 980px) { .sidebar { position: static; } }

.toc { background: var(--ink-050); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-4); }
.toc__title {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 var(--sp-3);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc a {
  display: block;
  padding: .38rem 0 .38rem 1.7rem;
  font-size: .9rem;
  text-decoration: none;
  color: var(--ink-700);
  border-left: 2px solid transparent;
  position: relative;
}
.toc a::before {
  content: counter(toc) ".";
  position: absolute; left: .5rem;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
}
.toc a:hover { color: var(--navy-800); }
.toc a.is-active { color: var(--navy-900); font-weight: 650; border-left-color: var(--accent-500); background: var(--white); }

.aside-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  background: var(--white);
  font-size: .93rem;
}
.aside-box h3 { margin: 0 0 var(--sp-3); font-size: var(--step-1); }
.aside-box ul { padding-left: 1.1rem; margin-bottom: 0; }
.aside-box p:last-child { margin-bottom: 0; }
.aside-box--deep { background: var(--navy-900); border-color: var(--navy-900); color: #d9e3f1; }
.aside-box--deep h3 { color: #fff; }
.aside-box--deep a { color: #ffd98a; }

.breadcrumb { font-size: var(--step--1); color: var(--ink-500); padding-block: var(--sp-3); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; }
.breadcrumb li { margin: 0; display: flex; align-items: center; gap: var(--sp-2); }
.breadcrumb li + li::before { content: "/"; color: var(--ink-300); }
.breadcrumb a { color: var(--ink-600); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy-700); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink-800); font-weight: 600; }

/* --------------------------------------------------------------------------
   11. Steps, FAQ, glossary
   -------------------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: var(--sp-5) 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--sp-5) 3.4rem;
  margin: 0 0 0 1.05rem;
  border-left: 2px solid var(--border);
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -1.1rem; top: -.2rem;
  width: 2.15rem; height: 2.15rem;
  background: var(--navy-800);
  color: #fff;
  border: 3px solid var(--white);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: .95rem;
}
.steps h3 { margin: 0 0 var(--sp-2); font-size: var(--step-1); }
.steps > li > :last-child { margin-bottom: 0; }

.faq { margin: var(--sp-5) 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--border); background: var(--white); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer;
  padding: var(--sp-4) 3rem var(--sp-4) var(--sp-4);
  font-weight: 650;
  color: var(--navy-900);
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: var(--sp-4); top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent-600);
  line-height: 1;
}
.faq details[open] summary { background: var(--navy-050); }
.faq details[open] summary::after { content: "\2013"; }
.faq__body { padding: var(--sp-4) var(--sp-5) var(--sp-4) var(--sp-4); border-top: 1px solid var(--border); }
.faq__body > :last-child { margin-bottom: 0; }

.glossary { margin: var(--sp-5) 0; }
.glossary dt {
  font-weight: 700;
  color: var(--navy-900);
  font-family: var(--font-serif);
  font-size: var(--step-1);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.glossary dt:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.glossary dd { margin: var(--sp-2) 0 0; }

.letter-nav { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-6); list-style: none; padding: 0; }
.letter-nav li { margin: 0; }
.letter-nav a {
  display: grid; place-items: center;
  min-width: 2.1rem; height: 2.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 650;
  text-decoration: none;
  color: var(--navy-800);
  background: var(--white);
}
.letter-nav a:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

/* --------------------------------------------------------------------------
   12. Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--sp-4); }
.field { display: grid; gap: var(--sp-2); }
.field label { font-weight: 650; font-size: .93rem; color: var(--ink-800); }
.field .hint { font-size: var(--step--1); color: var(--ink-500); }
.req { color: var(--red-700); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  font: inherit;
  font-size: .97rem;
  width: 100%;
  padding: .68rem .8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-900);
}
textarea { min-height: 160px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-600); }
.field--error input, .field--error textarea, .field--error select { border-color: var(--red-700); background: #fffafa; }
.error-msg { color: var(--red-700); font-size: var(--step--1); font-weight: 600; }
.error-msg[hidden] { display: none; }
.checkbox { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: .93rem; }
.checkbox input { margin-top: .32rem; width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.form-status {
  border-radius: var(--radius);
  padding: var(--sp-4);
  font-size: .95rem;
  border: 1px solid var(--green-700);
  background: var(--green-100);
  color: var(--green-700);
}
.form-status[hidden] { display: none; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: #b9c7db;
  padding-block: var(--sp-8) var(--sp-5);
  font-size: .94rem;
  margin-top: var(--sp-8);
}
.site-footer a { color: #dce5f2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(148px, 1fr));
  gap: var(--sp-6);
}
@media (max-width: 880px) { .footer__grid { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); } }
.footer__title {
  font-family: var(--font-sans);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: #8fa4c1;
  font-weight: 700;
  margin: 0 0 var(--sp-4);
}
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li { margin-bottom: var(--sp-2); }
.footer__brand .brand__mark { background: rgba(255, 255, 255, .12); }
.footer__brand .brand__name { color: #fff; }
.footer__brand .brand__tag { color: #8fa4c1; }
.footer__about { margin: var(--sp-4) 0 0; max-width: 44ch; color: #a9bad3; }
address.footer__addr { font-style: normal; margin-top: var(--sp-4); line-height: 1.6; color: #a9bad3; }
.footer__legal {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, .13);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  justify-content: space-between;
  align-items: center;
  font-size: var(--step--1);
  color: #8fa4c1;
}
.footer__legal p { margin: 0; }
.footer__legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-4); margin: 0; padding: 0; }
.footer__legal li { margin: 0; }
.footer__note { margin-top: var(--sp-4); font-size: var(--step--1); color: #8296b3; line-height: 1.6; max-width: 100ch; }

/* --------------------------------------------------------------------------
   14. Cookie notice & back-to-top
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  z-index: 300;
  inset: auto var(--sp-4) var(--sp-4) var(--sp-4);
  max-width: 580px;
  margin-inline: auto;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-5);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: var(--step-1); margin: 0 0 var(--sp-2); }
.cookie-banner p { font-size: .9rem; color: var(--text-muted); }
.cookie-banner p:last-of-type { margin-bottom: 0; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }

.to-top {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  z-index: 90;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--navy-800);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 1.1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--navy-800); color: #fff; }

/* --------------------------------------------------------------------------
   15. Ad slots — reserved space keeps layout stable when units load
   -------------------------------------------------------------------------- */
.ad-slot {
  margin: var(--sp-6) auto;
  max-width: 970px;
  min-height: 100px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--ink-050);
  color: var(--ink-400);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--sp-3);
}
.ad-slot--rail { max-width: 300px; min-height: 250px; margin: 0; }

/* --------------------------------------------------------------------------
   16. Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.lead { font-size: var(--step-1); color: var(--text-muted); }
.small { font-size: var(--step--1); }
.muted { color: var(--text-muted); }
.center-narrow { max-width: 780px; margin-inline: auto; }

.cta-band {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: #dfe8f4;
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }
.cta-band h2 { color: #fff; margin: 0 0 var(--sp-2); font-size: var(--step-2); }
.cta-band p { margin: 0; color: #bccbe0; }

.pill-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; padding: 0; margin: var(--sp-4) 0; }
.pill-row li { margin: 0; }
.pill-row a, .pill-row span {
  display: inline-block;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: var(--navy-050);
  border: 1px solid var(--navy-100);
  font-size: .86rem;
  text-decoration: none;
  color: var(--navy-800);
}
.pill-row a:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

.next-prev {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}
.next-prev a { display: block; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; background: var(--white); }
.next-prev a:hover { border-color: var(--navy-600); background: var(--navy-050); }
.next-prev span {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-500);
  font-weight: 700;
  margin-bottom: .3rem;
}
.next-prev strong { color: var(--navy-800); font-weight: 650; }

/* --------------------------------------------------------------------------
   17. Print
   -------------------------------------------------------------------------- */
@media print {
  .topbar, .site-header, .site-footer, .to-top, .cookie-banner,
  .sidebar, .ad-slot, .next-prev, .hero__actions { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .layout { grid-template-columns: 1fr; padding-block: 0; }
  a { color: #000; text-decoration: underline; }
  .prose { max-width: none; }
  h2, h3 { page-break-after: avoid; }
  table, blockquote, .callout { page-break-inside: avoid; }
}
