/* FDE Council: single stylesheet.
   Order: tokens -> reset/base -> layout -> components -> utilities -> media queries. */

/* ---------- Tokens ---------- */
:root {
  --navy-900: #0D1D3E;
  --navy-950: #011433;
  --navy-800: #132B57;
  --teal-500: #1AB1AA;
  --teal-300: #5FD4CC;
  --teal-700: #0D7A75;
  --teal-50: #E8F6F5;
  --white: #FFFFFF;
  --ink: #0D1D3E;
  --muted: #4A5B73;
  --muted-on-dark: #B8C2D3;
  --bg: #F5F7FA;
  --line: #E3E8EF;
  --field-border: #6B7A90;
  --error: #B42318;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-900: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  --fs-800: clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem);
  --fs-700: 1.25rem;
  --fs-500: 1.125rem;
  --fs-400: 1rem;
  --fs-300: 0.875rem;
  --fs-200: 0.8125rem;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --r-sm: 6px; --r-md: 12px; --r-lg: 20px;
  --shadow: 0 10px 30px rgba(13, 29, 62, .08);
  --header-h: 64px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0 0 var(--s-4); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-900); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-800); }
h3 { font-size: var(--fs-700); }
p, ul, ol { margin: 0 0 var(--s-4); }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: var(--s-2); }
a { color: var(--teal-700); text-underline-offset: 0.18em; }
a:hover { color: var(--navy-900); }
strong { font-weight: 650; }
code, .mono { font-family: var(--font-mono); }
:focus-visible { outline: 3px solid var(--teal-700); outline-offset: 2px; }
.on-dark :focus-visible { outline-color: var(--teal-500); }

/* ---------- Layout ---------- */
.container { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.container--prose { max-width: 760px; }
.prose { max-width: 68ch; }
.section { padding-block: var(--s-8); }
.section--alt { background: var(--bg); }
.section--tint { background: var(--teal-50); }
.section--tight { padding-block: var(--s-7); }
.section-head { max-width: 68ch; margin-bottom: var(--s-6); }
.grid { display: grid; gap: var(--s-5); }
.stack > * + * { margin-top: var(--s-5); }
.split { display: grid; gap: var(--s-7); }

/* ---------- Dark surfaces ---------- */
.on-dark { background: var(--navy-900); color: var(--white); }
.on-dark a { color: var(--teal-300); }
.on-dark a:hover { color: var(--white); }
.on-dark .lead, .on-dark .muted { color: var(--muted-on-dark); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--teal-500); color: var(--navy-900); font-weight: 600;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); text-decoration: none;
}
.skip-link:focus { top: var(--s-3); color: var(--navy-900); outline: 3px solid var(--white); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy-900); color: var(--white); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3);
  min-height: var(--header-h); position: relative;
}
.brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--white); text-decoration: none; margin-right: auto; padding-block: var(--s-2); }
.brand:hover { color: var(--white); }
.brand img { width: 30px; height: 30px; }
.brand-word { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.1; white-space: nowrap; }
.on-dark a.brand, .on-dark a.brand:hover { color: var(--white); }

.menu-toggle {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4);
  font: inherit; font-weight: 600; color: var(--white);
  background: transparent; border: 2px solid rgba(255, 255, 255, .4); border-radius: 8px; cursor: pointer;
}
.menu-toggle:hover { border-color: var(--teal-300); }
.menu-icon { width: 16px; height: 12px; }

.site-nav { flex-basis: 100%; order: 3; }
.site-nav ul { list-style: none; margin: 0; padding: 0 0 var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--white); text-decoration: none; font-weight: 500;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--teal-300); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--teal-500); }

/* With JS on narrow screens the nav becomes a toggled panel */
.js .site-nav { display: none; }
.js .site-nav.is-open {
  display: block; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--navy-900); border-top: 1px solid rgba(255, 255, 255, .15);
  box-shadow: 0 16px 30px rgba(1, 20, 51, .35);
}
.js .site-nav.is-open ul { flex-direction: column; padding: var(--s-3) 24px var(--s-5); gap: 0; }
.js .site-nav.is-open a { width: 100%; }

.header-join .long { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 10px 20px;
  font: inherit; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
  border-radius: 8px; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--teal-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--teal-300); color: var(--navy-900); }
.on-dark a.btn-primary, .site-header a.btn-primary { color: var(--navy-900); }
.on-dark a.btn-primary:hover, .site-header a.btn-primary:hover { color: var(--navy-900); }
.btn-primary--light { background: var(--navy-900); color: var(--white); }
.btn-primary--light:hover { background: var(--navy-800); color: var(--white); }
.btn-secondary { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn-secondary:hover { background: var(--navy-900); color: var(--white); }
.on-dark .btn-secondary { color: var(--white); border-color: rgba(255, 255, 255, .4); }
.on-dark .btn-secondary:hover { background: transparent; color: var(--white); border-color: var(--teal-300); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.header-join { padding-inline: var(--s-4); }

/* ---------- Pills and eyebrows ---------- */
.pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 4px 12px; border-radius: 999px;
  font-size: var(--fs-200); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.5;
  background: var(--teal-50); color: var(--teal-700);
}
.pill::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--teal-500); }
.on-dark .pill { background: transparent; color: var(--teal-300); border: 1px solid rgba(255, 255, 255, .2); }
.pill-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.eyebrow {
  display: block; margin-bottom: var(--s-3);
  font-size: var(--fs-200); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal-700);
}
.on-dark .eyebrow { color: var(--teal-300); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy-900); padding-block: var(--s-8) var(--s-8); }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(1, 20, 51, 0) 40%, var(--navy-950) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 20ch; }
.hero .lead { max-width: 62ch; }
.hero-motif {
  position: absolute; z-index: 0; right: -120px; top: 50%; transform: translateY(-50%);
  width: 640px; max-width: none; opacity: .18;
}
.lead { font-size: var(--fs-500); color: var(--muted); }
.page-hero { background: var(--navy-900); padding-block: var(--s-7) var(--s-8); }
.page-hero h1 { max-width: 24ch; }
.page-hero .lead { max-width: 64ch; margin-bottom: 0; }
.page-hero .btn-row { margin-top: var(--s-6); }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-6); display: flex; flex-direction: column;
}
.card > :last-child { margin-bottom: 0; }
.card h3 { display: flex; align-items: baseline; gap: var(--s-3); }
.card h3::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--teal-500); transform: translateY(-1px); }
.card .pill { align-self: flex-start; margin-bottom: var(--s-4); }
.card p { color: var(--muted); }
.card .card-link { margin-top: auto; padding-top: var(--s-2); font-weight: 600; }
.card--feature { border: 2px solid var(--navy-900); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card--feature p, .card--feature li { color: var(--ink); }
.card ul { color: var(--ink); }

/* ---------- Callout ---------- */
.callout {
  border-left: 4px solid var(--teal-500); background: var(--bg);
  padding: var(--s-5) var(--s-6); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-block: var(--s-6);
}
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-size: var(--fs-700); font-weight: 700; margin-bottom: var(--s-3); }
.callout--strong { border: 1px solid var(--navy-900); border-left-width: 6px; border-left-color: var(--teal-500); background: var(--white); }
.section--alt .callout { background: var(--white); }

/* ---------- Accordion ---------- */
.accordion { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.accordion + .accordion { margin-top: var(--s-3); }
.accordion summary {
  display: flex; align-items: baseline; gap: var(--s-4);
  padding: var(--s-5); min-height: 44px; cursor: pointer; list-style: none;
  font-weight: 650; font-size: 1.0625rem; line-height: 1.35;
  border-radius: var(--r-md);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+"; margin-left: auto; flex: none;
  font-family: var(--font-mono); font-size: 1.25rem; line-height: 1; color: var(--teal-700);
}
.accordion[open] summary::after { content: "\2212"; }
.accordion summary:hover { background: var(--bg); }
.accordion .num { font-family: var(--font-mono); color: var(--teal-700); font-weight: 600; flex: none; min-width: 1.5em; }
.accordion-body { padding: 0 var(--s-5) var(--s-5); }
.accordion-body > :last-child { margin-bottom: 0; }
.definition { font-style: italic; color: var(--muted); max-width: 68ch; }
.competencies { list-style: none; padding: 0; margin: 0 0 var(--s-4); }
.competencies li { display: grid; grid-template-columns: 3em 1fr; gap: var(--s-2); padding-block: var(--s-2); border-top: 1px solid var(--line); margin: 0; }
.competencies .cid { font-family: var(--font-mono); font-weight: 600; color: var(--teal-700); }
.faq .accordion summary { font-size: 1rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
th { font-weight: 650; background: var(--bg); }
td:first-child { font-weight: 600; white-space: nowrap; }

/* ---------- Lists ---------- */
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 1.5em; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; background: var(--teal-500); }
.numbered { padding-left: 1.5em; }
.numbered li::marker { color: var(--teal-700); font-weight: 700; }
.dot-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.dot-list li { margin: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: var(--fs-300); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; display: grid; gap: var(--s-4); }
.timeline li { margin: 0; padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.timeline .when { display: block; font-family: var(--font-mono); font-weight: 600; color: var(--teal-700); margin-bottom: var(--s-1); }

/* ---------- Board / seats ---------- */
.board-card { border-radius: var(--r-lg); padding: var(--s-6); display: grid; gap: var(--s-6); }
.board-card h2 { margin-bottom: var(--s-3); }
.seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.seat {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border: 1px dashed rgba(255, 255, 255, .25); border-radius: var(--r-sm);
  color: var(--muted-on-dark); font-size: var(--fs-300); text-align: center; padding: var(--s-2);
}

/* ---------- Downloads / edition card ---------- */
.edition { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); background: var(--white); box-shadow: var(--shadow); }
.edition-meta { font-family: var(--font-mono); font-size: var(--fs-300); color: var(--muted); }
.archive { list-style: none; padding: 0; }
.archive li { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: baseline; padding-block: var(--s-3); border-top: 1px solid var(--line); margin: 0; }
.archive li:last-child { border-bottom: 1px solid var(--line); }
.archive .edition-name { font-weight: 600; min-width: 14ch; }

/* ---------- Forms ---------- */
.form { max-width: 640px; }
.form-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); box-shadow: var(--shadow); }
.field { margin-bottom: var(--s-5); }
.field > label, .field legend { display: block; font-weight: 600; margin-bottom: var(--s-2); }
.req { font-weight: 400; font-size: var(--fs-300); color: var(--muted); }
.hint { font-size: var(--fs-300); color: var(--muted); margin: calc(var(--s-1) * -1) 0 var(--s-2); }
input[type="text"], input[type="email"], input[type="url"], select, textarea {
  display: block; width: 100%; min-height: 44px;
  padding: 10px 12px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--field-border); border-radius: var(--r-sm);
}
textarea { min-height: 140px; resize: vertical; }
select { appearance: auto; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--error); }
.field-error { color: var(--error); font-size: var(--fs-300); font-weight: 600; margin: var(--s-2) 0 0; }
.check { display: flex; gap: var(--s-3); align-items: flex-start; }
.check input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--navy-900); }
.check label { font-weight: 400; margin: 0; }
.check input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.form-inline { display: grid; gap: var(--s-4); }
.form-note { font-size: var(--fs-300); color: var(--muted); }
.form-status { margin-top: var(--s-4); padding: var(--s-4); border-radius: var(--r-sm); background: var(--bg); border-left: 4px solid var(--teal-500); }
.form-status:empty { margin: 0; padding: 0; border: 0; background: none; }
.form-status.is-error { border-left-color: var(--error); }
.form-success { padding: var(--s-5); border-radius: var(--r-md); background: var(--teal-50); border-left: 4px solid var(--teal-500); font-weight: 600; }
.form-success:focus { outline: 3px solid var(--teal-700); outline-offset: 2px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--white); padding-block: var(--s-8) var(--s-6); }
.footer-grid { display: grid; gap: var(--s-7); }
.footer-brand p { color: var(--muted-on-dark); max-width: 36ch; margin-top: var(--s-4); }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-6) var(--s-5); }
.footer-heading { font-size: var(--fs-200); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-300); margin-bottom: var(--s-3); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 0; }
.footer-cols a { display: inline-flex; align-items: center; min-height: 32px; color: var(--white); text-decoration: none; }
.footer-cols a:hover { color: var(--teal-300); text-decoration: underline; }
.fine-print { margin: var(--s-7) 0 0; padding-top: var(--s-5); border-top: 1px solid rgba(255, 255, 255, .12); font-size: var(--fs-300); color: var(--muted-on-dark); }

/* ---------- 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;
}
.muted { color: var(--muted); }
.h3-size { font-size: var(--fs-700); }
h1 .small { font-size: 0.4em; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.small { font-size: var(--fs-300); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.center { text-align: center; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  a, .btn, .menu-toggle, .site-nav a, .accordion summary { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
}

/* ---------- Media queries ---------- */
@media (max-width: 399px) {
  .brand-word { font-size: 0.8125rem; }
  .brand-word span { display: block; }
  .menu-toggle, .header-join { padding-inline: var(--s-3); }
  .menu-icon { display: none; }
  .brand { gap: var(--s-2); }
  .brand img { width: 26px; height: 26px; }
  .header-inner { gap: var(--s-2); }
}

@media (min-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(4, 1fr); }
  .form-inline { grid-template-columns: 1fr; }
  .seats--wide { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 860px) {
  .section { padding-block: var(--s-9); }
  .section--tight { padding-block: var(--s-8); }
  .hero { padding-block: var(--s-9) calc(var(--s-9) + var(--s-6)); }
  .hero-motif { opacity: .35; right: -40px; width: 680px; }
  .page-hero { padding-block: var(--s-8) var(--s-9); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 5fr 7fr; align-items: start; }
  .split--even { grid-template-columns: 1fr 1fr; }
  .board-card { grid-template-columns: 1.1fr 1fr; align-items: center; padding: var(--s-8); }
  .footer-grid { grid-template-columns: 1fr 2fr; }
  .timeline { grid-template-columns: repeat(3, 1fr); }

  .menu-toggle { display: none; }
  .site-nav, .js .site-nav { display: block; flex-basis: auto; order: 0; }
  .site-nav ul { padding: 0; gap: 0 var(--s-5); }
  .header-inner { flex-wrap: nowrap; gap: var(--s-5); }
}

@media (min-width: 1120px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .header-join .short { display: none; }
  .header-join .long { display: inline; }
}
