/* AFN components — every value is a token from tokens.css. Prefix: afn-. Mobile-first; breakpoints 480 / 768 / 1024 / 1280 (bp-* tokens). */

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--header-height); }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 26px; background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
.afn-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.afn-icon { flex: none; display: inline-block; vertical-align: middle; }
.afn-container { width: 100%; max-width: calc(var(--container-max) + 2 * var(--margin-sm)); margin-inline: auto; padding-inline: var(--margin-sm); }
@media (min-width: 768px) { .afn-container { max-width: calc(var(--container-max) + 2 * var(--margin-md)); padding-inline: var(--margin-md); } }
@media (min-width: 1024px) { .afn-container { max-width: calc(var(--container-max) + 2 * var(--margin-lg)); padding-inline: var(--margin-lg); } }

/* Shared focus ring: 2px solid, 2px offset, focus token (blue on light, gold on dark and on navy) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Inverse scope: any navy band. Remaps semantic tokens so children stay legible. */
.afn-inverse {
  --ink: var(--on-brand); --ink-muted: var(--on-brand-muted); --ink-subtle: var(--on-brand-muted);
  --surface-raised: var(--surface-brand-raised); --surface-sunken: var(--surface-brand);
  --line: var(--line-on-brand); --line-strong: var(--blue-500);
  --link: var(--sky-300); --link-hover: var(--white); --focus: var(--gold-400);
  --primary-ink: var(--red-300); --danger: var(--red-300); --success: var(--green-300); --warning: var(--gold-400); --info: var(--sky-300);
  --secondary: var(--sky-300); --secondary-hover: var(--ice-50); --on-secondary: var(--navy-900);
  --highlight: var(--gold-400);
  color: var(--on-brand);
}

/* ── Type helpers ─────────────────────────────────────── */

.afn-section-heading { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-8); }
@media (min-width: 768px) {
  .afn-section-heading { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

/* ── Pathways motif (forward-pointing ribbons) ──────── */
.afn-pathways { display: block; width: 100%; height: 100%; overflow: hidden; }
.afn-pathways__lead { stop-color: var(--pathway-lead); }
.afn-pathways__body { stop-color: var(--pathway-body); }
.afn-pathways__fold { stop-color: var(--pathway-fold); }
.afn-pathways__accent { stop-color: var(--pathway-accent); }
.afn-pathways.is-animated .afn-pathways__band { animation: afn-forward var(--duration-enter) var(--ease-standard) both; }
@keyframes afn-forward { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .afn-pathways.is-animated .afn-pathways__band { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ── Logo ─────────────────────────────────────────────── */
.afn-logo { width: auto; max-width: 100%; object-fit: contain; }
.afn-logo-link { display: inline-flex; flex: none; border-radius: var(--radius-sm); }
.afn-logo-link .afn-logo { max-width: none; }

/* ── Spinner & skeleton ───────────────────────────────── */
@keyframes afn-spin { to { transform: rotate(360deg); } }
@keyframes afn-shimmer { 50% { opacity: 0.5; } }

/* ── Button ───────────────────────────────────────────── */
.afn-btn {
  --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: var(--primary); --btn-bg-h: var(--primary-hover); --btn-bd-h: var(--primary-hover); --btn-bg-a: var(--primary-active);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--target-min); padding: 0 var(--space-6); border-radius: var(--radius-pill);
  border: 1.5px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast), color var(--duration-fast), transform var(--duration-fast);
}
.afn-btn .afn-btn__end { transition: transform var(--duration-base) var(--ease-standard); }
.afn-btn:hover { background: var(--btn-bg-h); border-color: var(--btn-bd-h); }
.afn-btn:hover .afn-btn__end { transform: translateX(3px); }
.afn-btn:active { background: var(--btn-bg-a); border-color: var(--btn-bg-a); transform: translateY(1px); }
.afn-btn--lg { min-height: 52px; padding: 0 var(--space-8); font-size: 16px; }
.afn-btn--secondary { --btn-bg: var(--secondary); --btn-bd: var(--secondary); --btn-fg: var(--on-secondary); --btn-bg-h: var(--secondary-hover); --btn-bd-h: var(--secondary-hover); --btn-bg-a: var(--secondary-hover); }
.afn-btn--accent { --btn-bg: var(--accent); --btn-bd: var(--accent); --btn-fg: var(--on-accent); --btn-bg-h: var(--accent-hover); --btn-bd-h: var(--accent-hover); --btn-bg-a: var(--accent-hover); }
.afn-btn--outline { --btn-bg: transparent; --btn-bd: var(--primary-ink); --btn-fg: var(--primary-ink); --btn-bg-h: var(--danger-soft); --btn-bd-h: var(--primary-ink); --btn-bg-a: var(--danger-soft); }
.afn-inverse .afn-btn--outline { --btn-bg-h: var(--surface-brand-raised); --btn-bg-a: var(--surface-brand-raised); }
.afn-btn--inverse { --btn-bg: transparent; --btn-bd: var(--on-brand-muted); --btn-fg: var(--on-brand); --btn-bg-h: var(--surface-brand-raised); --btn-bd-h: var(--on-brand); --btn-bg-a: var(--surface-brand-raised); }
.afn-btn:disabled { --btn-bg: var(--disabled); --btn-bd: var(--disabled); --btn-fg: var(--on-disabled); background: var(--disabled); border-color: var(--disabled); color: var(--on-disabled); cursor: not-allowed; transform: none; }
.afn-btn:disabled .afn-btn__end { transform: none; }
.afn-btn--outline:disabled, .afn-btn--inverse:disabled { background: transparent; border-color: var(--line); }

/* ── Icon button, link, chip ──────────────────────────── */
.afn-icon-btn { display: inline-grid; place-items: center; width: var(--target-min); height: var(--target-min); border-radius: var(--radius-pill); border: 1.5px solid transparent; background: transparent; color: var(--ink); cursor: pointer; transition: background-color var(--duration-fast); }
.afn-icon-btn:hover { background: var(--surface-sunken); }
.afn-icon-btn:active { background: var(--line); }
.afn-icon-btn--inverse { color: var(--on-brand); border-color: var(--line-on-brand); }
.afn-icon-btn--inverse:hover { background: var(--surface-brand-raised); }
.afn-icon-btn:disabled { color: var(--on-disabled); cursor: not-allowed; background: transparent; }

.afn-link { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--link); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; border-radius: var(--radius-xs); transition: color var(--duration-fast); }
.afn-link:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
.afn-link--arrow { text-decoration: none; font-size: 14px; }
.afn-link--arrow .afn-icon { transition: transform var(--duration-base) var(--ease-standard); }
.afn-link--arrow:hover span { text-decoration: underline; text-underline-offset: 0.2em; }
.afn-link--arrow:hover .afn-icon { transform: translateX(3px); }
.afn-chip__count { font-weight: 500; font-size: 12px; opacity: 0.85; }

/* ── Forms ────────────────────────────────────────────── */
.afn-field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.afn-field__label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); padding: 0; }
.afn-field__req { color: var(--primary-ink); }
.afn-field__opt { font-weight: 400; color: var(--ink-muted); }
.afn-select-wrap { position: relative; display: flex; align-items: center; }
.afn-input {
  width: 100%; min-height: 48px; padding: 0 var(--space-4); border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: var(--surface-raised); color: var(--ink);
  font: 400 16px/24px var(--font-sans); transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.afn-input::placeholder { color: var(--ink-subtle); opacity: 1; }
.afn-input:hover { border-color: var(--ink-muted); }
.afn-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
.afn-input[aria-invalid="true"] { border-color: var(--danger); }
.afn-input:disabled { background: var(--disabled); border-color: var(--line); color: var(--on-disabled); cursor: not-allowed; }
.afn-textarea { padding: var(--space-3) var(--space-4); min-height: 120px; resize: vertical; }
.afn-select { appearance: none; padding-right: 44px; cursor: pointer; }

/* ── Badge & alert ────────────────────────────────────── */
.afn-badge { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 24px; padding: 0 var(--space-2); border-radius: var(--radius-xs); font: 600 12px/16px var(--font-sans); letter-spacing: 0.02em; background: var(--surface-sunken); color: var(--ink); white-space: nowrap; }
.afn-badge__dot { width: 6px; height: 6px; border-radius: var(--radius-pill); background: currentColor; }
.afn-badge--success { background: var(--success-soft); color: var(--success); }
.afn-inverse .afn-badge { background: var(--surface-brand-raised); }

.afn-alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius-md); background: var(--info-soft); color: var(--ink); }
.afn-alert--danger { background: var(--danger-soft); }
.afn-alert__title { margin: 0; font-weight: 600; font-size: 16px; line-height: 24px; }
.afn-inverse .afn-alert { background: var(--surface-brand-raised); }

/* ── Breadcrumbs, tabs, pagination ────────────────────── */
.afn-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: 0; padding: 0; font-size: 14px; line-height: 20px; }
.afn-breadcrumbs li { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); }
.afn-breadcrumbs a { color: var(--link); text-underline-offset: 0.2em; border-radius: var(--radius-xs); display: inline-block; padding: 2px 0; }
.afn-breadcrumbs a:hover { color: var(--link-hover); }
.afn-breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ── Site header ──────────────────────────────────────── */
.afn-skip { position: absolute; left: var(--space-4); top: var(--space-3); clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; z-index: var(--z-toast); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.afn-skip:focus { clip-path: none; width: auto; height: auto; overflow: visible; outline: 2px solid var(--on-accent); outline-offset: 2px; }
.afn-header { position: relative; z-index: var(--z-sticky); background: var(--surface-raised); border-bottom: 1px solid var(--line); }
.afn-header__inner { display: flex; align-items: center; gap: var(--space-4); min-height: 64px; padding: var(--space-2) var(--margin-sm); max-width: calc(var(--container-max) + 2 * var(--margin-lg)); margin: 0 auto; }
@media (min-width: 1280px) {
  .afn-header__inner { min-height: var(--header-height); padding-inline: var(--margin-md); gap: var(--space-4); }
  .afn-header__burger { display: none !important; }
}
@media (min-width: 1440px) { .afn-header__inner { padding-inline: var(--margin-lg); } }

/* ── Cards ────────────────────────────────────────────── */
.afn-stretch { color: inherit; text-decoration: none; }
.afn-stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.afn-stretch:focus-visible { outline: none; }
.afn-stretch:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.afn-stretch:hover { text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }

/* ── Modal ────────────────────────────────────────────── */
@keyframes afn-fade { from { opacity: 0; } }
@keyframes afn-rise { from { opacity: 0; transform: translateY(16px); } }

/* ── Data table ───────────────────────────────────────── */

/* ── Accordion & tooltip ──────────────────────────────── */

/* ── Hero ─────────────────────────────────────────────── */
.afn-hero { position: relative; overflow: hidden; background: var(--surface-brand); padding: var(--space-12) 0 var(--space-16); }
.afn-hero__inner { position: relative; width: 100%; max-width: calc(var(--container-max) + 2 * var(--margin-lg)); margin: 0 auto; padding-inline: var(--margin-sm); }
.afn-hero__copy { max-width: 640px; }
.afn-hero__title { margin: var(--space-4) 0 0; font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 46px; letter-spacing: -0.01em; color: var(--on-brand); text-wrap: balance; }
.afn-hero__lede { margin: var(--space-5) 0 0; font-size: 18px; line-height: 28px; color: var(--on-brand-muted); max-width: 56ch; }
.afn-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
@media (max-width: 479px) { .afn-hero__actions .afn-btn { width: 100%; } }
@media (min-width: 768px) {
  .afn-hero { padding: var(--space-20) 0 var(--space-24); }
  .afn-hero__inner { padding-inline: var(--margin-md); }
  .afn-hero__title { font-size: 52px; line-height: 58px; }
  .afn-hero__lede { font-size: 20px; line-height: 30px; }
}
@media (min-width: 1024px) {
  .afn-hero { padding: var(--space-24) 0 calc(var(--space-24) + var(--space-12)); }
  .afn-hero__inner { padding-inline: var(--margin-lg); }
  .afn-hero__title { font-size: 64px; line-height: 68px; }
}

/* ── Quick nav strip ──────────────────────────────────── */

/* ── Home updates section ─────────────────────────────── */

/* ── CTA band ─────────────────────────────────────────── */

/* ── Footer ───────────────────────────────────────────── */
.afn-footer { background: var(--navy-950); padding-top: var(--space-16); }
.afn-footer__inner { display: grid; gap: var(--space-10); max-width: calc(var(--container-max) + 2 * var(--margin-lg)); margin: 0 auto; padding: 0 var(--margin-sm) var(--space-12); }
.afn-footer__tag { margin: var(--space-4) 0 0; max-width: 36ch; color: var(--on-brand-muted); font-size: 15px; line-height: 24px; }
.afn-footer__contact { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); font-style: normal; font-size: 14px; line-height: 22px; color: var(--on-brand-muted); }
.afn-footer__contact span { display: flex; gap: var(--space-2); align-items: flex-start; }
.afn-footer__contact .afn-icon { margin-top: 3px; color: var(--sky-300); }
.afn-footer a { color: var(--on-brand); text-decoration: none; border-radius: var(--radius-xs); }
.afn-footer a:hover { text-decoration: underline; text-underline-offset: 0.2em; color: var(--white); }
.afn-footer__heading { margin: 0 0 var(--space-4); font: 600 13px/16px var(--font-sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.afn-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.afn-footer__col a { display: inline-block; padding: var(--space-1) 0; font-size: 15px; line-height: 24px; }
.afn-footer__legal { display: flex; flex-direction: column; gap: var(--space-3); max-width: calc(var(--container-max) + 2 * var(--margin-lg)); margin: 0 auto; padding: var(--space-6) var(--margin-sm); border-top: 1px solid var(--line-on-brand); font-size: 13px; line-height: 20px; color: var(--on-brand-muted); }
.afn-footer__legal p { margin: 0; }
.afn-footer__legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-6); }
@media (min-width: 768px) { .afn-footer__inner { grid-template-columns: 1fr 1fr 1fr; padding-inline: var(--margin-md); } .afn-footer__brand { grid-column: 1 / -1; } .afn-footer__legal { flex-direction: row; justify-content: space-between; padding-inline: var(--margin-md); } }
@media (min-width: 1280px) { .afn-footer__inner { grid-template-columns: 2.2fr 1fr 1fr 1fr 2fr; padding-inline: var(--margin-lg); } .afn-footer__brand { grid-column: auto; } .afn-footer__legal { padding-inline: var(--margin-lg); } }

/* ── Preview scaffolding (cards in this system only) ──── */
