/* FOA Academy — design system. Tokens, base, components. */
:root {
  /* FOA palette — mockup-driven (2026-10-18): deep green primary, gold accents,
     cream sections. Token names follow the mockup's green identity. */
  --foa-pine: #0C3B2A;
  --foa-pine-deep: #072A1E;
  --foa-navy: #0B1F3A;
  --foa-green: #0F5B45;
  --foa-green-deep: #0B3D2C;
  --foa-gold: #C6A15B;
  --foa-gold-bright: #D9B978;
  --foa-cream: #F4EBDD;
  --foa-white-warm: #FCFBF8;
  --foa-white: #FFFFFF;
  --foa-text: #102033;
  --foa-muted: #667085;
  --foa-border: #E6E1D7;
  --foa-line: var(--foa-border);
  --foa-ink: var(--foa-text);
  --foa-radius: var(--foa-radius-md);
  --foa-success: #18794E;
  --foa-warning: #A66A00;
  --foa-danger: #B42318;
  /* Soft tints derived from the palette (backgrounds, borders on light surfaces). */
  --foa-pine-soft: #E6EFE9;
  --foa-green-soft: #E3F0E9;
  --foa-gold-soft: #F4EAD0;
  --foa-danger-soft: #F7E3E0;
  /* Secondary text on dark (pine) surfaces. */
  --foa-ink-on-dark: rgba(255, 255, 255, .82);
  --foa-radius-xs: 4px;
  --foa-radius-sm: 6px;
  --foa-radius-md: 10px;
  --foa-radius-lg: 14px;
  --foa-shadow-sm: 0 1px 2px rgba(7, 42, 31, .08);
  --foa-shadow-md: 0 6px 18px rgba(7, 42, 31, .10);
  --foa-shadow-lg: 0 12px 32px rgba(7, 42, 31, .16);
  /* Spacing scale. */
  --foa-space-1: .25rem;
  --foa-space-2: .5rem;
  --foa-space-3: .75rem;
  --foa-space-4: 1rem;
  --foa-space-5: 1.25rem;
  --foa-space-6: 1.5rem;
  --foa-space-7: 2rem;
  --foa-space-8: 3rem;
  --foa-container: 1140px;
  --foa-header-height: 72px;
  --foa-font: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", Arial, sans-serif;
  /* Display serif for brand headings (redesign v2, 2026-10-12): native stack,
     no webfont dependency. */
  --foa-serif: Georgia, Gelasio, "Liberation Serif", "Times New Roman", "Noto Serif", serif;
}

html { color-scheme: light; }
/* Guard against sub-pixel rounding spill (e.g. fractional flex widths in the
 * header) ever producing a horizontal scrollbar. */
html, body { overflow-x: clip; }

/* ---------- dark theme (day/night toggle) ----------
 * codewithnazia directive (AbdulAhad Sirohey, 2026-10-05): a day/night theme toggle.
 * html[data-theme="dark"] is set before first paint by the CSP-safe external
 * assets/js/theme-init.js, persisted in localStorage, defaulting to the OS
 * prefers-color-scheme. Strategy is variable remap: every surface/text/border
 * token gets a dark value, so public pages and all three portal shells
 * re-theme with zero markup changes. Surfaces that ARE the brand (pine bands,
 * gold CTAs, solid buttons, badges) stay pine/gold — dark mode inverts the
 * paper, not the identity.
 * --foa-white-warm is intentionally NOT remapped: its only uses are the
 * .crest and .footer-mark emblem medallions, which stay warm-white by design
 * so the official emblem always sits on its designed ground. The header
 * emblem gets the same treatment via .brand-mark below (the logo files have
 * white baked in — RGB, no alpha). */
html[data-theme="dark"] {
  color-scheme: dark;
  --foa-white: #0A1410;          /* page background */
  --foa-cream: #0D1812;         /* alt sections, hover washes */
  --foa-text: #E9EEF6;
  --foa-ink: var(--foa-text);
  --foa-muted: #A6B1C4;
  --foa-border: #2A3D33;
  --foa-line: var(--foa-border);
  --foa-pine-soft: #12291E;
  --foa-green-soft: #0D2B20;
  --foa-gold-soft: #2C230E;
  --foa-danger-soft: #3A1410;
  --foa-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --foa-shadow-md: 0 6px 18px rgba(0, 0, 0, .45);
  --foa-shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
}
/* Pine-ink text on light surfaces → light ink on dark surfaces. */
html[data-theme="dark"] h1, html[data-theme="dark"] h2,
html[data-theme="dark"] h3, html[data-theme="dark"] h4 { color: var(--foa-text); }
html[data-theme="dark"] a:not(.btn) { color: #A9D4BC; }
/* Header emblem medallion (dark only): the logo files are RGB with white
   baked in, so on the dark header the emblem keeps its designed light
   ground — same language as the footer lockup and hero crest. */
html[data-theme="dark"] .brand-mark {
  background: var(--foa-white-warm); border: 1px solid rgba(201, 154, 46, .55);
  border-radius: var(--foa-radius-sm); padding: .2rem;
}
html[data-theme="dark"] .nav-toggle span { background: var(--foa-text); }
html[data-theme="dark"] .mainnav a[aria-current="page"] { color: var(--foa-text); }
html[data-theme="dark"] .btn-ghost { background: var(--foa-pine-soft); color: var(--foa-text); border-color: var(--foa-border); }
html[data-theme="dark"] .btn-ghost:hover { background: var(--foa-border); }
html[data-theme="dark"] .stat-num, html[data-theme="dark"] .fee-big,
html[data-theme="dark"] .stat-grid .num, html[data-theme="dark"] .result-score { color: var(--foa-text); }
html[data-theme="dark"] table.data th { color: var(--foa-text); }
html[data-theme="dark"] .opt:hover, html[data-theme="dark"] .opt.chosen { border-color: #A9D4BC; }
html[data-theme="dark"] .ticks li::before { color: #3ECF8E; }
html[data-theme="dark"] .form-msg.error { color: #F28B7D; }
html[data-theme="dark"] .form-msg.ok { color: #3ECF8E; }
html[data-theme="dark"] .error-box { color: #F28B7D; }
html[data-theme="dark"] .danger-zone { border-color: #F28B7D; }
html[data-theme="dark"] .danger-zone h2 { color: #F28B7D; }
html[data-theme="dark"] input:focus, html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus { border-color: #A9D4BC; }
html[data-theme="dark"] .goal-bar { background: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .note-viewer .note-body h2,
html[data-theme="dark"] .note-viewer .note-body h3,
html[data-theme="dark"] .note-viewer .note-body h4 { color: var(--foa-text); }
html[data-theme="dark"] .note-watermark span { color: #fff; }
/* Empty/404/403 illustrations use navy line-work on light surfaces — gold
   line-work on dark surfaces (CSS beats SVG presentation attributes). */
html[data-theme="dark"] .ill-empty [stroke="#0C3B2A"],
html[data-theme="dark"] .ill-err [stroke="#0C3B2A"] { stroke: #D9B978; }
html[data-theme="dark"] .ill-err [fill="#0C3B2A"] { fill: #D9B978; }
/* Office documents always print light, whatever the screen theme. */
@media print {
  html[data-theme="dark"] {
    color-scheme: light;
    --foa-white: #FFFFFF; --foa-cream: #F6F1E7; --foa-text: #102033;
    --foa-ink: var(--foa-text); --foa-muted: #667085; --foa-border: #E6E1D7;
    --foa-line: var(--foa-border); --foa-pine-soft: #E9EDF2;
    --foa-green-soft: #E3F0E9; --foa-gold-soft: #F4EAD0; --foa-danger-soft: #F7E3E0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--foa-font); color: var(--foa-text);
  background: var(--foa-white); line-height: 1.6; font-size: 16px;
}
h1, h2, h3, h4 { line-height: 1.25; color: var(--foa-pine); margin: 0 0 .5em; }
/* Redesign v2: brand headings speak in serif; body and UI stay sans. */
h1, h2, .page-h1, .sec-title { font-family: var(--foa-serif); letter-spacing: .01em; }
p { margin: 0 0 1em; }
a { color: var(--foa-pine); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--foa-container); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--foa-muted); }
.small { font-size: .875rem; }
.mt { margin-top: 1.5rem; }
.lead { font-size: 1.125rem; color: var(--foa-muted); }

.skip {
  position: absolute; left: -999px; top: 0; background: var(--foa-pine);
  color: var(--foa-white); padding: .5rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--foa-gold); outline-offset: 2px; }
/* The .btn display rules (and others) override the UA `hidden` style; restore
   the attribute's contract globally so JS-toggled elements stay hidden. */
[hidden] { display: none !important; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--foa-border); background: var(--foa-white); position: sticky; top: 0; z-index: 50; box-shadow: inset 0 -2px 0 var(--foa-gold); }
/* ---------- top utility bar (mockup) ---------- */
.topbar { background: var(--foa-pine-deep); color: rgba(255,255,255,.88); font-size: .76rem; }
.topbar-in { max-width: 1600px; margin: 0 auto; padding: .4rem 2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar-links { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.topbar-links a { color: var(--foa-gold-bright); text-decoration: none; font-weight: 600; }
.topbar-links a:hover { color: #fff; text-decoration: underline; }
.topbar-links span { opacity: .4; }
.topbar-tag { font-style: italic; opacity: .75; }
@media (max-width: 640px) { .topbar-tag { display: none; } .topbar-in { padding: .4rem 1.25rem; } }
.header-in { display: flex; align-items: center; gap: 1.5rem; padding: .55rem 2rem; max-width: 1600px; margin: 0 auto; }
/* Logo-only brand: the logo image carries the full wordmark, no duplicate text. */
.brand-mark-only .brand-mark img { display: block; height: 64px; width: auto; }
@media (max-width: 640px) {
  .brand-mark-only .brand-mark img { height: 48px; }
}
/* Academy name beside the logo (user order 2026-10-21) */
.brand-word {
  font-family: var(--foa-serif);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--foa-pine);
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand .brand-mark img { display: block; height: 64px; width: auto; }
@media (max-width: 640px) {
  .brand .brand-mark img { height: 48px; }
  .brand-word { font-size: 1rem; white-space: normal; }
}
@media (max-width: 640px) {
  .header-in { padding: .55rem 1.25rem; }
}
/* Brand lockup (v2.0): the official emblem seated beside a typeset wordmark.
   The emblem file itself is never altered — the lockup is the designed container. */
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; flex-shrink: 0; }
.brand-mark { display: block; line-height: 0; flex-shrink: 0; }
.brand-mark img { display: block; width: 76px; height: auto; }
.brand:hover .brand-mark img { transform: scale(1.03); }
.brand-mark img { transition: transform .25s ease; }
.mainnav { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.mainnav ul { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; }
.mainnav a { text-decoration: none; padding: .45rem .3rem; border-radius: var(--foa-radius-sm); font-size: .8rem; white-space: nowrap; }
.mainnav a:hover { background: var(--foa-cream); }
.mainnav a[aria-current="page"] { font-weight: 700; color: var(--foa-pine); }
.nav-cta { display: flex; gap: .5rem; margin-left: .5rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--foa-border); border-radius: var(--foa-radius-sm); padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--foa-pine); margin: 4px 0; }

/* ---------- day/night theme toggle ----------
 * codewithnazia directive (AbdulAhad Sirohey, 2026-10-05): a glossy pill toggle with
 * an animated sky scene inside — day (blue sky, sun, clouds) ⇄ night (dark
 * sky, moon, stars). Pure CSS; state comes from html[data-theme] (set before
 * first paint by theme-init.js). Hidden for no-JS clients via .js scoping so
 * nobody gets a dead control. transform/opacity only; the global
 * prefers-reduced-motion rule makes the swap instant for reduced-motion users. */
.theme-toggle { display: none; }
.js .theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
}
.tt-pill {
  position: relative; display: block; width: 78px; height: 40px; border-radius: 999px;
  overflow: hidden; border: 1px solid rgba(201, 154, 46, .6);
  box-shadow: inset 0 2px 4px rgba(7, 42, 31, .25);
}
.tt-day, .tt-night { position: absolute; inset: 0; transition: opacity .45s ease; }
.tt-day { background: linear-gradient(180deg, #5EA9E8 0%, #BEE2FA 100%); }
.tt-night { background: linear-gradient(180deg, #0A1322 0%, #1D3050 100%); opacity: 0; }
html[data-theme="dark"] .tt-day { opacity: 0; }
html[data-theme="dark"] .tt-night { opacity: 1; }
/* Gloss: a static sheen, not motion — the "glossy" is a gradient. */
.tt-pill::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, 0) 46%);
}
/* The knob is the sun/moon itself, sliding across the sky. */
.tt-knob {
  position: absolute; top: 2px; left: 3px; width: 34px; height: 34px; border-radius: 50%;
  transition: transform .45s cubic-bezier(.3, 1.25, .4, 1);
}
html[data-theme="dark"] .tt-knob { transform: translateX(38px); }
.tt-sun, .tt-moon { position: absolute; inset: 0; border-radius: 50%; transition: opacity .3s ease; }
.tt-sun {
  background: radial-gradient(circle at 35% 35%, #F6D47C 0%, #E4B93F 55%, #C6A15B 100%);
  box-shadow: 0 0 8px rgba(246, 212, 124, .9);
}
.tt-moon {
  background:
    radial-gradient(circle at 68% 62%, #B9C4D6 0 2px, transparent 3px),
    radial-gradient(circle at 42% 38%, #B9C4D6 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 36% 30%, #FBFCFE 0%, #DCE4F0 70%, #C4CFE2 100%);
  box-shadow: 0 0 8px rgba(220, 228, 240, .7);
  opacity: 0;
}
html[data-theme="dark"] .tt-sun { opacity: 0; }
html[data-theme="dark"] .tt-moon { opacity: 1; }
/* Stars: one dot, many box-shadows; twinkle in night mode only. */
.tt-stars {
  position: absolute; left: 9px; top: 10px; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: 0; transition: opacity .45s ease;
  box-shadow: 7px -4px 0 #fff, 15px 4px 0 rgba(255, 255, 255, .9), 24px -3px 0 #fff,
              32px 6px 0 rgba(255, 255, 255, .75), 12px 12px 0 rgba(255, 255, 255, .7),
              38px -5px 0 rgba(255, 255, 255, .6);
}
html[data-theme="dark"] .tt-stars { opacity: 1; animation: tt-twinkle 2.6s ease-in-out infinite; }
@keyframes tt-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
/* Clouds drift across the day sky; they fade out as night falls. */
.tt-cloud {
  position: absolute; width: 22px; height: 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .95); transition: opacity .45s ease;
}
.tt-cloud::before, .tt-cloud::after {
  content: ""; position: absolute; border-radius: 50%; background: inherit;
}
.tt-cloud::before { width: 10px; height: 10px; top: -5px; left: 4px; }
.tt-cloud::after { width: 8px; height: 8px; top: -4px; left: 12px; }
.tt-c1 { top: 9px; left: 34px; animation: tt-drift 6s ease-in-out infinite alternate; }
.tt-c2 { top: 24px; left: 40px; width: 17px; height: 8px; animation: tt-drift 8s ease-in-out infinite alternate-reverse; }
@keyframes tt-drift { from { transform: translateX(-3px); } to { transform: translateX(7px); } }
html[data-theme="dark"] .tt-cloud { opacity: 0; animation: none; }

/* ---------- buttons / badges ---------- */
.btn {
  display: inline-block; background: var(--foa-pine); color: var(--foa-white); border: 1px solid var(--foa-pine);
  /* Redesign v2 (AbdulAhad Sirohey): wider horizontally, shorter vertically. */
  padding: .55rem 2.2rem; border-radius: var(--foa-radius-sm); text-decoration: none;
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: transform .16s ease, box-shadow .22s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--foa-pine-deep); box-shadow: var(--foa-shadow-md); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: var(--foa-shadow-sm); }
.btn-ghost { background: var(--foa-white); color: var(--foa-pine); }
.btn-ghost:hover { background: var(--foa-cream); }
.btn-sm { padding: .4rem 1.4rem; font-size: .875rem; }
.btn-danger { background: var(--foa-danger); border-color: var(--foa-danger); }
.btn-danger:hover { background: #8A1D15; }
/* Gold call-to-action (e.g. the persistent "Practice Test" nav CTA).
   Navy-deep text on gold passes 4.5:1 (§74); white on this gold does not. */
.btn-gold { background: var(--foa-gold); border-color: var(--foa-gold); color: var(--foa-pine-deep); }
.btn-gold:hover { background: var(--foa-gold); filter: brightness(.93); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.link { font-weight: 600; }
.badge {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  background: var(--foa-pine); color: var(--foa-white); border-radius: 999px; padding: .2rem .7rem; margin-bottom: .5rem;
}
.badge-gold { background: var(--foa-gold); color: var(--foa-pine-deep); }
.badge-student { background: var(--foa-green); }
.badge-ok { background: var(--foa-success); }
.badge-bad { background: var(--foa-danger); }

/* Count pill for actionable nav items (e.g. new callback requests). */
.nav-badge {
  display: inline-block; min-width: 1.4em; text-align: center;
  font-size: .72rem; font-weight: 700; line-height: 1.6;
  background: var(--foa-gold); color: var(--foa-pine-deep);
  border-radius: 999px; padding: 0 .45em; margin-left: .4em; vertical-align: .1em;
}

/* Admin nav group labels (7-UX-laws audit 2026-10-04, Hick's law): chunk ~20
   sections into 5 labeled groups. Muted small-caps; not clickable. */
.portal-nav .nav-group { padding: .9rem .75rem .3rem; }
.portal-nav .nav-group span {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
}

/* ---------- sections / cards ---------- */
.section { padding: var(--foa-space-8) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.card {
  background: var(--foa-white); border: 1px solid var(--foa-border); border-radius: var(--foa-radius-md);
  padding: var(--foa-space-6); box-shadow: var(--foa-shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--foa-shadow-md); }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: var(--foa-space-7); align-items: center; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(60rem 30rem at 85% 20%, rgba(201, 154, 46, .14), transparent 60%),
    linear-gradient(135deg, var(--foa-pine-deep) 0%, var(--foa-pine) 100%);
  color: var(--foa-white); padding: 4rem 0; overflow: hidden;
}
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--foa-space-8); align-items: center; }
.hero h1 { color: var(--foa-white); font-size: 2.5rem; margin: .25em 0; }
.hero .lead { color: var(--foa-ink-on-dark); }
/* Custom illustration layer behind the crest: compass rose + rising steps,
   hand-built SVG (app/illustrations.php), decorative only. */
.hero-ill {
  position: absolute; width: min(150%, 480px); height: auto;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  opacity: .9; pointer-events: none;
}
.kicker { color: var(--foa-gold); font-weight: 700; letter-spacing: .14em; font-size: .875rem; text-transform: uppercase; margin: 0 0 .5rem; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.hero-cta .btn-ghost { background: transparent; color: var(--foa-white); border-color: rgba(255,255,255,.5); }
.hero-cta .btn-ghost:hover { background: rgba(255,255,255,.12); }
.stats-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--foa-space-5); padding: 2.25rem 1rem; }
.stat { text-align: center; }
.stats-band .stat-num { display: block; font-size: 3rem; font-weight: 800; color: var(--foa-gold-bright); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stats-band .stat-label { color: var(--foa-ink-on-dark); font-size: .875rem; letter-spacing: .02em; }

/* ---------- stats ---------- */
.stat-num { display: block; font-size: 3rem; font-weight: 800; color: var(--foa-pine); }
.stat-label { color: var(--foa-muted); }

/* ---------- forms ---------- */
.form-card { max-width: 560px; margin: 0 auto; }
label { display: block; font-weight: 600; margin-bottom: 1rem; font-size: .875rem; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
input[type="number"], input[type="date"], input[type="datetime-local"], input[type="url"],
select, textarea {
  display: block; width: 100%; margin-top: .5rem; padding: .6rem .7rem;
  border: 1px solid var(--foa-border); border-radius: var(--foa-radius-sm);
  font: inherit; background: var(--foa-white); color: var(--foa-text);
}
/* Six-decisions form audit: focus ring is one solid accent, always visible. */
input:focus, select:focus, textarea:focus { border-color: var(--foa-pine); outline: 2px solid var(--foa-gold); outline-offset: 0; }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin-top: .2rem; }
.hint { display: block; font-weight: 400; color: var(--foa-muted); font-size: .875rem; margin-top: .5rem; }
/* Six-decisions form audit: 32px of air before the primary action
   (16px label gap + 16px here); every gap stays on the 8px scale. */
.form-card button[type="submit"],
#request-form button[type="submit"], #recover-form button[type="submit"] { margin-top: 1rem; }
.form-msg { min-height: 1.5em; font-weight: 600; }
.form-msg.error { color: var(--foa-danger); }
.form-msg.ok { color: var(--foa-success); }
/* Admin image field: current-photo preview. */
.img-preview { display: block; width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--foa-gold); margin: .5rem 0; }
/* Optional-field disclosure (choice-overload: defer non-essential decisions). */
.opt-fields { margin-bottom: 1rem; }
.opt-fields summary { cursor: pointer; color: var(--foa-muted); font-size: .875rem; font-weight: 600; }
.opt-fields .grid-2 { margin-top: .75rem; }
.flash { border-radius: var(--foa-radius-sm); padding: .8rem 1rem; margin: 1rem 0; border: 1px solid; }

/* ---------- auth blade transition ----------
 * Login ⇄ Signup state swap: one skewed deep-navy blade (thin gold edges)
 * sweeps across the card. At the halfway point it covers the card completely
 * and the two real forms trade places underneath — the cut is never visible.
 * transform/opacity only; no fades, no rotations. Replaces the decorative
 * 700ms .reveal that used to sit on auth screens: purposeful motion instead
 * of decoration. prefers-reduced-motion gets an instant, blade-free swap
 * (handled in assets/js/auth.js; the blade is display:none here as backup). */
.js .auth-card { position: relative; overflow: hidden; display: grid; max-width: 560px; margin: 0 auto; }
.auth-card { padding: 2.25rem 2rem; }
/* Forms never lift on hover — only content cards do. */
.auth-card:hover { transform: none; }
.auth-form { grid-area: 1 / 1; min-width: 0; }
.js .auth-form.is-inactive { position: absolute; inset: 0; visibility: hidden; }
.auth-form h1 { font-size: 1.65rem; margin-bottom: .4rem; }
.auth-form label { margin-bottom: 1.15rem; font-size: .9rem; }
.auth-form input { padding: .78rem .9rem; font-size: 1rem; border-radius: var(--foa-radius-md);
  transition: border-color .18s ease, box-shadow .18s ease; }
.auth-form input:focus { box-shadow: 0 0 0 3px rgba(201,168,106,.28); }
.auth-form button[type="submit"] { width: 100%; padding: .85rem; font-size: 1.05rem; margin-top: 1.25rem; }
.auth-swap { text-align: center; margin-top: 1.4rem; font-size: .93rem; }
.auth-blade {
  position: absolute; top: -10%; left: -70%; height: 120%; width: 240%;
  background: var(--foa-pine-deep);
  transform: translateX(-105%) skewX(-14deg);
  visibility: hidden; pointer-events: none; z-index: 5;
}
.auth-blade::before, .auth-blade::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 3px; background: var(--foa-gold);
}
.auth-blade::before { left: 0; }
.auth-blade::after { right: 0; }
/* CSP-safe sweep states (no inline styles; style-src 'self' blocks CSSOM). */
.auth-blade.is-start-l { transform: translateX(-105%) skewX(-14deg); visibility: visible; }
.auth-blade.is-start-r { transform: translateX(105%) skewX(-14deg); visibility: visible; }
.auth-blade.is-run-l { transform: translateX(105%) skewX(-14deg); visibility: visible; transition: transform 640ms cubic-bezier(.65,0,.35,1); }
.auth-blade.is-run-r { transform: translateX(-105%) skewX(-14deg); visibility: visible; transition: transform 640ms cubic-bezier(.65,0,.35,1); }
.auth-swap { text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .auth-blade { display: none; }
  #test-timer.critical { animation: none; }
}

/* ---------- vault password meter ----------
 * _code_and_chill_ directive (AbdulAhad Sirohey, 2026-10-05): "Password meters are a
 * green bar — this one is a vault." Real entropy bits map to four lock tiers
 * on ONE scrubbed timeline: JS tweens the gold fill toward the live value,
 * so backspacing rewinds instead of replaying. Tier changes are class swaps
 * only — no keyframes, nothing to replay. transform/opacity only; the global
 * reduced-motion rule already makes the class swaps instant. Advisory only —
 * it never touches validation or policy. */
.vault-meter {
  margin-top: .75rem; padding: .8rem .9rem .7rem;
  border: 1px solid var(--foa-border); border-radius: var(--foa-radius-sm);
  background: var(--foa-white);
}
.vault-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.vault-title { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--foa-muted); }
.vault-bits { font-size: .85rem; font-weight: 700; color: var(--foa-pine); font-variant-numeric: tabular-nums; white-space: nowrap; }
html[data-theme="dark"] .vault-bits { color: var(--foa-gold-bright); }
.vault-rail { position: relative; margin-top: .5rem; min-height: 44px; }
.vault-locks { list-style: none; margin: 0; padding: 0; position: absolute; top: 0; left: 0; right: 0; height: 26px; }
.vault-tier {
  position: absolute; top: 0; width: 26px; height: 26px; margin-left: -13px;
  color: var(--foa-muted); opacity: .5;
  transition: color .25s ease, opacity .25s ease;
}
.vault-tier.pos-first { margin-left: 0; }
.vault-tier.pos-last { margin-left: -26px; }
/* CSP-safe tier positions (style-src 'self' blocks style attributes). */
.vault-tier.pos-0 { left: 0; }
.vault-tier.pos-38 { left: 37.5%; }
.vault-tier.pos-63 { left: 62.5%; }
.vault-tier.pos-100 { left: 100%; }
.vault-tier svg { width: 26px; height: 26px; display: block; }
/* Defensive: no unstyled SVG inside the vault meter may exceed 26px. */
.vault-meter svg { max-width: 26px; max-height: 26px; }
.vault-tier.is-passed { color: var(--foa-text); opacity: .9; }
.vault-tier.is-active { color: var(--foa-gold); opacity: 1; }
.vault-track { position: relative; height: 8px; margin-top: 32px; border-radius: 99px; background: var(--foa-pine-soft); overflow: hidden; }
.vault-fill {
  position: absolute; inset: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--foa-pine), var(--foa-gold));
  transform: scaleX(0); transform-origin: left center;
}
/* CSP-safe stepped fill (style-src 'self' blocks inline styles). */
.vault-fill.vf-0 { transform: scaleX(0); } .vault-fill.vf-1 { transform: scaleX(.05); }
.vault-fill.vf-2 { transform: scaleX(.1); } .vault-fill.vf-3 { transform: scaleX(.15); }
.vault-fill.vf-4 { transform: scaleX(.2); } .vault-fill.vf-5 { transform: scaleX(.25); }
.vault-fill.vf-6 { transform: scaleX(.3); } .vault-fill.vf-7 { transform: scaleX(.35); }
.vault-fill.vf-8 { transform: scaleX(.4); } .vault-fill.vf-9 { transform: scaleX(.45); }
.vault-fill.vf-10 { transform: scaleX(.5); } .vault-fill.vf-11 { transform: scaleX(.55); }
.vault-fill.vf-12 { transform: scaleX(.6); } .vault-fill.vf-13 { transform: scaleX(.65); }
.vault-fill.vf-14 { transform: scaleX(.7); } .vault-fill.vf-15 { transform: scaleX(.75); }
.vault-fill.vf-16 { transform: scaleX(.8); } .vault-fill.vf-17 { transform: scaleX(.85); }
.vault-fill.vf-18 { transform: scaleX(.9); } .vault-fill.vf-19 { transform: scaleX(.95); }
.vault-fill.vf-20 { transform: scaleX(1); }
/* Passkey button sits below the submit button — give it breathing room. */
#passkey-login { margin-top: .75rem; }
.vault-tierline { margin: .55rem 0 0; font-size: .95rem; }
.vault-tierline strong { color: var(--foa-pine); }
html[data-theme="dark"] .vault-tierline strong { color: var(--foa-gold-bright); }
.vault-crack { margin: .15rem 0 0; font-size: .85rem; color: var(--foa-muted); font-variant-numeric: tabular-nums; }
.vault-note { margin: .5rem 0 0; font-size: .75rem; color: var(--foa-muted); }

/* ---------- lists ---------- */
.ticks { list-style: none; padding: 0; }
.ticks li { padding-left: 1.75rem; position: relative; margin-bottom: .6rem; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--foa-green); font-weight: 800; }
.steps { padding-left: 1.25rem; }
.steps li { margin-bottom: .6rem; }
.crumbs { font-size: .875rem; color: var(--foa-muted); margin: 1rem 0 .5rem; }
.crumbs a { color: var(--foa-muted); }
.page-h1 { font-size: 2rem; margin: .25rem 0 1rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--foa-border); border-radius: var(--foa-radius-md); background: var(--foa-white); }
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th, table.data td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--foa-border); }
table.data th { background: var(--foa-cream); color: var(--foa-pine); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- portal ---------- */
.portal { display: grid; grid-template-columns: 230px 1fr; gap: 1.5rem; padding: 2rem 1rem; align-items: start; }
.portal-nav { background: var(--foa-pine); border-radius: var(--foa-radius-md); padding: 1rem; position: sticky; top: 90px; }
.portal-hello { color: var(--foa-white); font-size: .875rem; padding: 0 .5rem; }
.portal-nav ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.portal-nav a { display: block; color: var(--foa-ink-on-dark); text-decoration: none; padding: .55rem .75rem; border-radius: var(--foa-radius-sm); font-size: .875rem; }
.portal-nav a:hover { background: rgba(255,255,255,.1); }
.portal-nav a[aria-current="page"] { background: var(--foa-gold); color: var(--foa-pine-deep); font-weight: 700; }
.portal-main { min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--foa-space-4); margin-bottom: var(--foa-space-6); }
.stat-grid .card { padding: var(--foa-space-4) var(--foa-space-5); }
.stat-grid .num { font-size: 1.75rem; font-weight: 800; color: var(--foa-pine); }

/* Goal-gradient bar on My Progress (7-UX-laws audit 2026-10-04): "X of Y
   tests complete" toward the defined Level-1 goal. */
.goal-card { margin-bottom: var(--foa-space-6); }
.goal-card h2 { margin-bottom: .25rem; }
.goal-bar { height: .6rem; background: rgba(7,42,31,.12); border-radius: 999px; overflow: hidden; margin-top: .6rem; }
.goal-bar > span { display: block; height: 100%; background: var(--foa-gold); border-radius: 999px; }

/* Clickable course cards: short intro on the card, full info on click. */
.course-card { position: relative; transition: transform .16s ease, box-shadow .22s ease; }
.course-card:hover { transform: translateY(-2px); box-shadow: var(--foa-shadow-md); }
.course-card .stretched-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.test-bar .muted { color: var(--foa-ink-on-dark); }
#test-timer { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--foa-navy); }
#test-timer.low { color: #b7791f; }
#test-timer.critical { color: #c0392b; animation: timer-pulse 1s ease-in-out infinite; }
@keyframes timer-pulse { 50% { opacity: .55; } }
.test-nav .btn { min-width: 9rem; padding: .7rem 1.4rem; }
.test-nav .btn:disabled { opacity: .4; cursor: not-allowed; }
.opt { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--foa-border); border-radius: var(--foa-radius-sm); padding: .55rem .75rem; margin-bottom: .4rem; cursor: pointer; font-weight: 400; transition: border-color .18s ease, background .18s ease; }
.opt:hover { border-color: var(--foa-pine); background: var(--foa-cream); }
.opt input { margin-top: .3rem; }
.opt.chosen { border-color: var(--foa-pine); background: var(--foa-pine-soft); }
.result-hero { text-align: center; padding: 2rem; }
.result-score { font-size: 3rem; font-weight: 800; color: var(--foa-pine); }
.review-q { margin-bottom: 1rem; }
.review-opts { list-style: none; padding: 0; }
.review-opts li { padding: .4rem .7rem; border: 1px solid var(--foa-border); border-radius: var(--foa-radius-sm); margin-bottom: .3rem; }
.opt-correct { background: var(--foa-green-soft); border-color: var(--foa-success); }
.opt-chosen-wrong { background: var(--foa-danger-soft); border-color: var(--foa-danger); }
.review-q.q-correct { border-left: 4px solid var(--foa-success); }
.review-q.q-wrong { border-left: 4px solid var(--foa-danger); }
.cta-enroll { background: var(--foa-pine); color: #fff; text-align: center; padding: 2rem; margin-top: 1.5rem; }
.cta-enroll h2 { color: var(--foa-gold); }
.cta-enroll p { color: rgba(255,255,255,.85); }
.opt-wrong { background: var(--foa-danger-soft); border-color: var(--foa-danger); }

/* ---------- modal / toast ---------- */
/* Admin panel overlay (assets/js/admin.js openModal). Single modal pattern. */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4, 26, 18, .55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
/* Monospace for ID-card numbers and CSV headers. */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875rem; }
/* Inline search forms in admin section headers. */
.inline-form { display: inline-flex; gap: .5rem; align-items: center; }
.inline-form input[type="search"] { margin-top: 0; width: auto; min-width: 220px; }
/* §100 pagination bar for admin list sections. */
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.25rem 0; }
.inline-form input[type="search"] { margin-top: 0; width: auto; min-width: 220px; }
/* Action-button cells in admin tables. */
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { margin-left: .35rem; }
.modal { background: var(--foa-white); border-radius: var(--foa-radius-lg); max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; padding: var(--foa-space-6); box-shadow: var(--foa-shadow-md); }
.modal h2 { margin-top: 0; }
#toasts { position: fixed; bottom: 1rem; right: 1rem; z-index: 300; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: var(--foa-pine); color: var(--foa-white); padding: .7rem 1rem; border-radius: var(--foa-radius-sm); box-shadow: var(--foa-shadow-md); max-width: 320px; }
.toast.error { background: var(--foa-danger); }
.toast.ok { background: var(--foa-green); }

/* ---------- states ---------- */
.empty { border: 1px dashed var(--foa-border); border-radius: var(--foa-radius-md); padding: 2rem; text-align: center; color: var(--foa-muted); background: var(--foa-cream); }
.empty .ill-empty { width: 72px; height: auto; margin: 0 auto .75rem; display: block; }
.empty p { margin: 0; }
.ill-err { width: 140px; height: auto; margin: 0 auto 1.25rem; display: block; }
.loading { padding: 2rem; text-align: center; color: var(--foa-muted); }
.error-box { border: 1px solid var(--foa-danger); background: var(--foa-danger-soft); color: var(--foa-danger); border-radius: var(--foa-radius-sm); padding: 1rem; }

/* ---------- faculty / misc ---------- */
/* Proper faculty introduction cards. */
.faculty-grid { align-items: stretch; }
.faculty-card { text-align: center; padding: 2rem 1.5rem; display: flex; flex-direction: column; align-items: center; }
.faculty-card:hover { transform: translateY(-3px); }
.faculty-photo { width: 128px; height: 128px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--foa-gold); box-shadow: var(--foa-shadow-md); margin-bottom: 1rem; }
.faculty-avatar { width: 128px; height: 128px; border-radius: 50%; background: var(--foa-pine); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 800;
  border: 3px solid var(--foa-gold); box-shadow: var(--foa-shadow-md); margin-bottom: 1rem; }
.faculty-card .badge { margin-bottom: .6rem; }
.faculty-card h3 { margin: 0 0 .3rem; font-size: 1.25rem; }
.fee { font-size: 1rem; }
.fee-big { font-size: 2rem; font-weight: 800; color: var(--foa-pine); }
.fee-card { background: var(--foa-cream); }
.map-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--foa-radius-md); border: 1px solid var(--foa-border); margin: 1rem 0; }
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--foa-pine-deep); color: var(--foa-ink-on-dark); margin-top: 2rem; }
/* Footer lockup (v2.0): emblem seated in a warm-white medallion beside the wordmark. */
.footer-lockup { display: flex; align-items: center; gap: .9rem; margin: 0 0 .75rem; }
.footer-mark { display: block; line-height: 0; background: var(--foa-white-warm); border: 1px solid rgba(201, 154, 46, .55); border-radius: var(--foa-radius-md); padding: .3rem; }
.footer-mark img { display: block; width: 56px; height: auto; border-radius: var(--foa-radius-xs); }
.footer-word { display: flex; flex-direction: column; line-height: 1.3; }
.footer-brand { font-family: var(--foa-font); font-size: 1.125rem; font-weight: 700; color: var(--foa-white); margin: 0; }
.site-footer h3 { color: var(--foa-white); font-size: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--foa-ink-on-dark); text-decoration: none; }
.footer-links a:hover { color: var(--foa-white); text-decoration: underline; }
/* Footer legibility (2026-10-09): plain <a> tags default to navy ink, which
   is invisible on the navy footer ground, and .muted is tuned for light
   surfaces. Pin both to the on-dark ink inside the footer. */
.site-footer a { color: var(--foa-ink-on-dark); }
.site-footer a:hover { color: #FFFFFF; }
.site-footer .muted { color: var(--foa-ink-on-dark); }
/* Dark-mode primary buttons (2026-10-09): --foa-white remaps to the dark page
   background, so .btn rendered dark text on dark navy. Lift the ground and
   pin true-white text so buttons read as buttons. */
html[data-theme="dark"] .btn { color: #FFFFFF; background: #23415F; border-color: #23415F; }
html[data-theme="dark"] .btn:hover { background: #2C4F75; border-color: #2C4F75; }
/* Redesign v2: gold CTAs are brand surfaces — they stay gold in dark mode
   (the dark-mode strategy: "dark mode inverts the paper, not the identity"). */
html[data-theme="dark"] .btn-gold { background: var(--foa-gold); border-color: var(--foa-gold); color: #0C3B2A; }
html[data-theme="dark"] .btn-gold:hover { filter: brightness(.94); background: var(--foa-gold); }
/* Text-on-navy audit (2026-10-09): --foa-white remaps to the dark page ground,
   so every light-on-navy text usage below went dark-on-dark. Pin true white. */
html[data-theme="dark"] .skip,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .hero, html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .hero-cta .btn-ghost,
html[data-theme="dark"] .portal-hello,
html[data-theme="dark"] .test-bar,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .faculty-avatar,
html[data-theme="dark"] .footer-brand, html[data-theme="dark"] .site-footer h3,
html[data-theme="dark"] .test-palette button.answered { color: #FFFFFF; }
.footer-base { border-top: 1px solid rgba(255,255,255,.15); padding: 1rem; font-size: .875rem; display: flex; justify-content: space-between; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  /* The 8-item nav + CTAs need ~1180px in one row.
     Below that, the header breathes in two rows instead of clipping. */
  .header-in { flex-wrap: wrap; row-gap: .4rem; }
  .mainnav { margin-left: 0; width: 100%; flex-wrap: wrap; row-gap: .4rem; }
  .mainnav ul { flex-wrap: wrap; }
  .nav-cta { flex-wrap: wrap; }
  .nav-cta > *, .logout-form { flex-shrink: 0; }
}
@media (max-width: 900px) {
  /* Photographic homepage: tablet gets 2-col grids, stacked hero. */
  .ph-hero-in { flex-direction: column; align-items: flex-start; min-height: 0; padding: 3.5rem 0 2.5rem; }
  .ph-script { text-align: left; }
  .ph-feats { grid-template-columns: repeat(2, 1fr); transform: none; }
  .ph-hero { padding-bottom: 2rem; }
  .ph-feat:nth-child(3) { border-left: none; }
  .ph-feat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.1); }
  .ph-courses { padding-top: 2.5rem; }
  .ph-course-grid { grid-template-columns: repeat(2, 1fr); }
  .ph-duo-grid { grid-template-columns: 1fr; }
  .ph-faculty-grid { grid-template-columns: repeat(2, 1fr); }
  .ph-faculty-grid-home { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .portal { grid-template-columns: 1fr; }
  .portal-nav { position: static; }
  .portal-nav ul { display: flex; flex-wrap: wrap; gap: .25rem; }
  .portal-nav .nav-group { flex-basis: 100%; padding: .7rem .75rem .1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .hero-in { grid-template-columns: 1fr; gap: var(--foa-space-6); }
  .crest { max-width: 260px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .header-in { flex-wrap: wrap; }
  .nav-toggle { display: block; margin-left: auto; }
  .mainnav { width: 100%; flex-direction: column; align-items: stretch; max-height: 0; overflow: hidden; transition: max-height .35s ease; }
  .mainnav.open { max-height: 80vh; overflow-y: auto; }
  .mainnav ul { flex-direction: column; }
  .nav-cta { margin: .5rem 0; }
  .section { padding: 2rem 0; }
  .test-bar { top: 60px; flex-wrap: wrap; }
  .stats-in { grid-template-columns: 1fr; gap: var(--foa-space-4); padding: 1.75rem 1rem; }
  .brand-mark img { width: 60px; }
  .brand-name { font-size: 1.05rem; }
  .brand-tag { font-size: .68rem; letter-spacing: .12em; }
}

/* ---------- motion (v2.0) ----------
   Restrained, institutional motion: fade-and-rise reveals, animated counters,
   animated nav underlines, state-swap and feedback motion. Transform/opacity
   only — no layout shift. Everything lives under
   `prefers-reduced-motion: no-preference` so reduced-motion users and no-JS
   clients always see final content. Decorative loops are deliberately absent:
   every animation below answers a user action or an in-flight state. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Scroll reveal: JS adds .in via IntersectionObserver (assets/js/site.js).
     Hidden state is scoped to .js (added by site.js) so no-JS clients
     always see final content. Subtle: fade + 24px rise, 450ms ease-out —
     inside the 180–450ms brand window. */
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .45s ease, transform .45s cubic-bezier(.16, .8, .24, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal[data-delay="1"] { transition-delay: .06s; }
  .js .reveal[data-delay="2"] { transition-delay: .12s; }
  .js .reveal[data-delay="3"] { transition-delay: .18s; }
  .js .reveal[data-delay="4"] { transition-delay: .24s; }
  .js .reveal[data-delay="5"] { transition-delay: .3s; }

  @keyframes foa-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

  /* (Crest float removed 2026-10-05: infinite ambient loop with no user
     action behind it — decorative motion the anti-overbuilding pass
     deliberately keeps off this site.) */

  /* Nav underline sweep. */
  .mainnav ul a { position: relative; }
  .mainnav ul a::after {
    content: ""; position: absolute; left: .5rem; right: .5rem; bottom: .1rem; height: 2px;
    background: var(--foa-gold); transform: scaleX(0); transform-origin: left;
    transition: transform .28s ease;
  }
  .mainnav ul a:hover::after, .mainnav ul a[aria-current="page"]::after { transform: scaleX(1); }

  /* Modal + toast entrances. */
  .modal-backdrop { animation: foa-fade .2s ease; }
  .modal { animation: foa-pop .28s cubic-bezier(.2, .7, .3, 1.15); }
  @keyframes foa-fade { from { opacity: 0; } }
  @keyframes foa-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
  .toast { animation: foa-toast-in .3s cubic-bezier(.2, .7, .3, 1.2); }
  @keyframes foa-toast-in { from { opacity: 0; transform: translateX(24px); } }

  /* Branded loading sweep: the portal shells (student/admin/teacher) render
     a .loading status while their JS boots. The gold bar sweeping across
     says "working" — transform-only, and it vanishes with the element. */
  .loading { position: relative; overflow: hidden; }
  .loading::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--foa-gold), transparent);
    transform: translateX(-100%);
    animation: foa-load-sweep 1.1s ease-in-out infinite;
  }
  @keyframes foa-load-sweep { to { transform: translateX(100%); } }

  /* Submit busy state: toggled by JS next to `disabled` while a request is
     in flight (e.g. the callback form). A calm opacity pulse — the button
     never moves, so it can't be misread as a layout shift. */
  .btn.is-busy { cursor: wait; pointer-events: none; animation: foa-busy .9s ease-in-out infinite; }
  @keyframes foa-busy { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

  /* Gold CTA sheen: the single most important action on a page earns one
     restrained sweep on hover — a Von Restorff reinforcement, transform-only. */
  .btn-gold { position: relative; overflow: hidden; }
  .btn-gold::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: 0;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: translateX(-160%) skewX(-18deg); pointer-events: none;
    transition: transform .45s ease;
  }
  .btn-gold:hover::after { transform: translateX(320%) skewX(-18deg); }

  /* Mobile nav: animated open + hamburger-to-X. */
  .nav-toggle span { transition: transform .25s ease, opacity .2s ease; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- logout form (POST-only) ---------- */
.logout-form { display: inline; margin: 0; }
/* Inline export forms inside section headers (no inline styles — CSP). */
.form-inline { display: inline; margin: 0; }
/* Vertical stack with consistent rhythm (replaces inline margins — CSP). */
.stack > * + * { margin-top: 1.25rem; }
.portal-logout {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--foa-ink-on-dark); padding: .55rem .75rem; border-radius: var(--foa-radius-sm);
  font-size: .875rem; cursor: pointer; font-family: inherit;
}
.portal-logout:hover { background: rgba(255,255,255,.1); }

/* ---- Phase 4 (Operations) ---- */
/* Installment due highlighting (§4 fee reminders). */
.inst-overdue { border-left: 3px solid var(--foa-danger); padding-left: .5rem; }
.inst-soon { border-left: 3px solid var(--foa-gold); padding-left: .5rem; }
/* Bulk-action bar under admin tables. */
.bulk-bar { display: flex; align-items: center; gap: .5rem; margin: .75rem 0; }

/* ---- Welcome gift + starter pack ---- */
.gift-hero { border-left: 4px solid var(--foa-gold); margin-bottom: var(--foa-space-6); }
.pack-list { margin: .5rem 0 1.25rem 1.25rem; }
.pack-list li { margin-bottom: .35rem; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--foa-pine); margin: 0; }

/* ---- Protected lecture-note viewer ----
   Notes render server-side from the database; no file or download link
   exists. Selection and context menu are disabled as a deterrent; the
   watermark tiles the viewer's identity across the content. Screenshots
   cannot be technically prevented — the watermark makes them traceable. */
.note-viewer {
  position: relative; overflow: hidden;
  background: var(--foa-white); border: 1px solid var(--foa-line);
  border-radius: var(--foa-radius); padding: var(--foa-space-6);
  margin-top: var(--foa-space-4);
  -webkit-user-select: none; user-select: none;
}
.note-viewer .note-body { position: relative; z-index: 1; }
.note-viewer .note-body h2, .note-viewer .note-body h3, .note-viewer .note-body h4 { color: var(--foa-pine); }
.note-viewer .note-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.note-viewer .note-body th, .note-viewer .note-body td { border: 1px solid var(--foa-line); padding: .5rem .75rem; text-align: left; }
.note-viewer .note-body th { background: var(--foa-cream); }
.note-watermark {
  position: absolute; inset: -50%; z-index: 0; pointer-events: none;
  display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around;
  gap: 4rem; transform: rotate(-24deg); opacity: .07;
}
.note-watermark span { white-space: nowrap; font-size: 1.1rem; font-weight: 700; color: var(--foa-pine); }

/* Notes must not be printable: printing is a sharing vector. */
@media print {
  .note-viewer .note-body { display: none !important; }
  .note-viewer::after {
    content: "Lecture notes cannot be printed. Please read them in the protected viewer.";
    display: block; padding: 2rem; font-weight: 700;
  }
}

/* ---- Sticky WhatsApp CTA (report gap #5) ---- */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 90;
  width: 3.25rem; height: 3.25rem; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
.wa-float svg { width: 1.7rem; height: 1.7rem; fill: #fff; }
.wa-float:hover { background: #1fb857; }
/* NOTE (7-UX-laws audit 2026-10-04, Von Restorff): the float button no longer
   pulses. One perpetually-animating element competes with the primary CTA on
   every page — if everything screams, nothing does. The button stays; the
   nudge is gone. */

/* ---- Question palette (report gap #27) ---- */
.test-palette {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: 1rem; padding: .75rem;
  background: var(--foa-cream); border: 1px solid var(--foa-line);
  border-radius: var(--foa-radius-md);
}
.test-palette button {
  min-width: 2.25rem; height: 2.25rem; padding: 0 .4rem;
  border: 1px solid var(--foa-line); border-radius: var(--foa-radius-sm);
  background: var(--foa-white); color: var(--foa-ink);
  font-weight: 700; font-size: .875rem; cursor: pointer; font-family: inherit;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.test-palette button.answered {
  background: var(--foa-pine); border-color: var(--foa-pine); color: var(--foa-white);
}
.test-palette button:hover { border-color: var(--foa-gold); }
.test-palette button:focus-visible { outline: 2px solid var(--foa-gold); outline-offset: 2px; }

/* ---- Profile customization + delete-account (settings) ---- */
.avatar-fallback { width: 72px; height: 72px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--foa-pine); color: #fff; font-size: 1.75rem; font-weight: 700; }
.danger-zone { border: 1px solid var(--foa-danger); }
.danger-zone h2 { color: var(--foa-danger); }
.danger-zone ul { margin: .5rem 0 1rem 1.25rem; }

/* Announcement/urgency bar above the header. */
.announce { background: var(--foa-pine); color: #fff; font-size: .9rem; }
.announce-in { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: .55rem 1rem; text-align: center; }
.announce a { color: var(--foa-gold); font-weight: 600; text-decoration: none; }
.announce a:hover { text-decoration: underline; }
.announce-x { background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; font-size: .85rem; padding: .25rem .5rem; }
.announce-x:hover { opacity: 1; }

/* ================================================================
   REDESIGN v2 (2026-10-12, AbdulAhad Sirohey's mockups).
   Light-mode brand system: the FOA identity screams — navy/gold, serif
   display headings, logo lockups — on every public surface.
   All surfaces use existing tokens, so html[data-theme="dark"] remaps
   automatically; brand surfaces (navy bands, gold CTAs) are identical
   in both modes, exactly like the existing .hero. Ponytail: no new deps,
   no webfonts, inline SVG icons only (never emoji).
   ================================================================ */

/* ---------- brand hero ---------- */
.mk-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(50rem 26rem at 88% 8%, rgba(198, 161, 91, .22), transparent 62%),
    radial-gradient(40rem 30rem at 8% 95%, rgba(15, 91, 69, .35), transparent 60%),
    linear-gradient(120deg, #04170F 0%, #0C3B2A 55%, #10402E 100%);
}
.mk-hero h1 .gold { color: var(--foa-gold-bright); }
.btn-gold { background: var(--foa-gold); border-color: var(--foa-gold); color: #0C3B2A; }
.btn-gold:hover { background: var(--foa-gold); filter: brightness(.94); color: #0C3B2A; }
/* Outline button: navy on light header, white on dark header. The old
   .btn-outline-w (white-on-white) was invisible in light mode. */
.btn-outline { background: transparent; border-color: var(--foa-pine); color: var(--foa-pine); }
.btn-outline:hover { background: var(--foa-pine); border-color: var(--foa-pine); color: #fff; }
html[data-theme="dark"] .btn-outline { border-color: rgba(255, 255, 255, .55); color: #fff; }
html[data-theme="dark"] .btn-outline:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

/* ---------- program cards ---------- */
.prog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.prog-card { background: var(--foa-white); border: 1px solid var(--foa-border); border-radius: var(--foa-radius-lg); overflow: hidden; box-shadow: var(--foa-shadow-sm); transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column; }
.prog-card:hover { transform: translateY(-4px); box-shadow: var(--foa-shadow-md); }

/* ---------- mission / vision / values ---------- */
.mvv { display: grid; gap: 1.6rem; margin-top: 1.5rem; }
.mvv-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--foa-gold-soft); display: flex; align-items: center; justify-content: center; }
.mvv-ico svg { width: 26px; height: 26px; stroke: var(--foa-gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; color: #fff; background: linear-gradient(115deg, #04170F 0%, #0C3B2A 60%, #14503A 100%); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(36rem 18rem at 85% 50%, rgba(198, 161, 91, .18), transparent 65%); pointer-events: none; }
.cta-in { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; padding: 3.5rem 1.25rem; max-width: var(--foa-container); margin: 0 auto; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .4rem; max-width: 16ch; }
.cta-band p { color: rgba(255, 255, 255, .75); margin-bottom: 1.25rem; }

/* ---------- FAQ accordion + contact ---------- */
.faq-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: start; }

/* ---------- header / footer brand voice (v2) ---------- */
/* The header stays white and sticky; the gold Enquire CTA is the loudest thing in it. */
.site-header .btn-gold { box-shadow: 0 2px 10px rgba(198, 161, 91, .35); }
/* Footer: brand column leads with the lockup; socials as gold-ringed icon buttons. */
.foot-social { display: flex; gap: .7rem; margin-top: 1rem; }
.foot-social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(198, 161, 91, .55); display: flex; align-items: center; justify-content: center; }
.foot-social a:hover { background: rgba(198, 161, 91, .18); }
.foot-social svg { width: 18px; height: 18px; fill: var(--foa-gold-bright); }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding: 3rem 1rem 2rem; }
.footer-cols h3 { color: #fff; font-size: 1rem; font-family: var(--foa-font); }
.foot-tag { color: rgba(255, 255, 255, .55); letter-spacing: .14em; font-size: .7rem; font-weight: 700; margin: .4rem 0 0; }

/* ---------- redesign responsive ---------- */
@media (max-width: 1024px) {
  .mk-feats { grid-template-columns: repeat(3, 1fr); row-gap: 1.5rem; }
  .mk-quote { position: static; margin: 1.5rem 0 2rem; max-width: none; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .prog-grid { grid-template-columns: 1fr 1fr; }
  .cta-in { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .mk-hero-in { padding-top: 3rem; }
  .mk-feats { grid-template-columns: 1fr 1fr; }
  .prog-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .sec-title::before, .sec-title::after { width: 28px; }
  .footer-cols { grid-template-columns: 1fr; }
  .mvv-row { grid-template-columns: 44px 1fr; }
}
.mk-hero h1 .gold { color:#F0CD7E; }
.mk-hero-cta .btn { min-height:48px; display:inline-flex; align-items:center; gap:.65rem; border-radius:7px; padding:.8rem 1.2rem; }
.mk-hero-cta .btn-gold { background:linear-gradient(135deg,#E8C778,#D5A63F); border-color:#E8C778; box-shadow:0 8px 24px rgba(201,154,46,.16); }
.practice-intro .muted { line-height:1.7; font-size:.95rem; }
.practice-intro .btn { margin-top:.3rem; }
@media (max-width:1050px) {
  .mk-hero-in { grid-template-columns:1fr .9fr; column-gap:1.5rem; padding-top:3.3rem; }
  .mk-hero-art { min-height:315px; }
  .art-crest { width:135px; }
  .mk-feats { gap:.8rem; }
  .practice-feature-grid { grid-template-columns:.8fr 1.2fr; }
  .practice-points { grid-column:1/-1; display:grid; grid-template-columns:1fr 2fr auto; align-items:center; gap:1rem; }
  .practice-point-head { border:0; padding:0; }
  .practice-points ul { grid-template-columns:repeat(2,minmax(0,1fr)); margin:.2rem 0; }
}
@media (max-width:700px) {
  .mk-hero-in { grid-template-columns:1fr; padding-top:2.7rem; }
  .mk-hero h1 { font-size:clamp(2.65rem,12vw,3.8rem); max-width:10ch; }
  .mk-hero-art { min-height:260px; margin:.3rem 0 0; }
  .art-crest { width:116px; top:.4rem; right:10%; }
  .art-note { padding:.6rem .7rem; }
  .art-note-top { top:22%; }
  .art-note-bottom { bottom:10%; }
  .art-note b { font-size:.73rem; }
  .art-note small { font-size:.62rem; }
  .art-caption { bottom:0; }
  .mk-feats { grid-template-columns:1fr 1fr; margin-top:.7rem; padding:1.2rem 0; row-gap:1rem; }
  .mk-feat { grid-template-columns:25px 1fr; gap:.5rem; }
  .mk-feat svg { width:23px; height:23px; }
  .quick-access-grid { grid-template-columns:1fr 1fr; gap:.55rem; }
  .quick-card { min-height:78px; padding:.7rem; gap:.55rem; }
  .quick-icon { width:34px; height:34px; font-size:1.15rem; }
  .quick-card b { font-size:.8rem; }
  .quick-card small { font-size:.68rem; }
  .quick-arrow { font-size:.9rem; }
  .practice-feature-grid { grid-template-columns:1fr; gap:1.2rem; }
  .practice-preview { grid-template-columns:82px minmax(0,1fr); }
  .preview-sidebar { padding:.8rem .45rem; font-size:.68rem; }
  .preview-sidebar small { font-size:.58rem; }
  .preview-main { padding:.8rem .7rem; }
  .preview-top { font-size:.53rem; }
  .preview-main h3 { font-size:1rem; }
  .preview-question { font-size:.72rem; }
  .preview-option { font-size:.63rem; padding:.35rem; gap:.4rem; }
  .preview-bottom { font-size:.54rem; }
  .practice-points { display:block; padding:1rem; }
  .practice-point-head { padding-bottom:.8rem; border-bottom:1px solid rgba(201,154,46,.28); }
  .practice-points ul { grid-template-columns:1fr; gap:.55rem; }
}
@media (prefers-reduced-motion: reduce) {
  .quick-card { transition:none; }
  .quick-card:hover { transform:none; }
}

/* ============ Photographic homepage (mockup, 2026-10-12) ============ */
.ph-hero { position: relative; background: var(--foa-pine-deep); color: #fff; overflow: hidden; }
.ph-hero-bg { position: absolute; inset: 0; background: url('/assets/img/foa-hero-officers-v2.jpg') center 30%/cover no-repeat; }
.ph-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(4,26,18,.94) 20%, rgba(4,26,18,.55) 55%, rgba(4,26,18,.25) 100%); }
.ph-hero-in { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 5rem 0 3rem; min-height: 480px; }
.ph-hero-copy { max-width: 560px; }
.ph-kicker { color: var(--foa-gold-bright); letter-spacing: .28em; font-size: .78rem; font-weight: 700; margin: 0 0 1rem; }
.ph-hero h1 { font-family: var(--foa-serif); font-size: clamp(2.6rem, 5.5vw, 4.2rem); line-height: 1.05; color: #fff; margin: 0 0 1.2rem; font-weight: 700; }
.ph-hero h1 .gold { color: var(--foa-gold-bright); }
/* Mockup display serif for section headings. */
.ph-sec-head h2, .ph-duo h2, .ph-faculty h2, .page-hero h1, .cta-band h2 { font-family: var(--foa-serif); font-weight: 700; }
/* Serif display heading for inner-page sections (mockup). */
.serif-h { font-family: var(--foa-serif); font-weight: 700; color: var(--foa-pine); }
/* Alternating cream band for inner pages. */
.band-cream { background: var(--foa-cream); }
.ph-lede { color: var(--foa-ink-on-dark); font-size: 1.08rem; max-width: 480px; margin: 0 0 1.8rem; }
.ph-hero-cta { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.ph-play { display: inline-flex; align-items: center; gap: .7rem; color: #fff; font-weight: 600; }
.ph-play-icon { width: 52px; height: 52px; border: 1.5px solid rgba(255,255,255,.6); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; transition: background .2s; }
.ph-play:hover .ph-play-icon { background: rgba(255,255,255,.15); }
.ph-script { font-family: 'Segoe Script', 'Bradley Hand', cursive; font-size: 1.5rem; line-height: 1.5; color: #fff; text-align: right; opacity: .92; margin: 0; }
.ph-script span { border-bottom: 3px solid var(--foa-gold); }
/* Feature strip */
.ph-feats { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(4,26,18,.82); border: 1px solid rgba(255,255,255,.12); border-radius: var(--foa-radius-lg); backdrop-filter: blur(6px); margin: -1px 0 0; transform: translateY(50%); }
.ph-hero { padding-bottom: 70px; }
.ph-feat { display: flex; gap: .8rem; padding: 1.2rem 1rem; align-items: flex-start; }
.ph-feat + .ph-feat { border-left: 1px solid rgba(255,255,255,.1); }
.ph-feat svg { width: 30px; height: 30px; flex-shrink: 0; stroke: var(--foa-gold-bright); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ph-feat b { display: block; font-size: .86rem; color: #fff; }
.ph-feat span { font-size: .76rem; color: var(--foa-ink-on-dark); }
/* Courses */
.ph-courses { background: var(--foa-cream); padding-top: 110px; }
.ph-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.8rem; }
.ph-kicker-dark { color: #7A5F12; letter-spacing: .28em; font-size: .78rem; font-weight: 700; margin: 0 0 .6rem; }
.ph-sec-head h2, .ph-duo h2, .ph-faculty h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 .4rem; color: var(--foa-pine); }
.ph-link { color: var(--foa-pine); font-weight: 600; white-space: nowrap; }
.ph-link-sm { color: var(--foa-gold); font-weight: 600; font-size: .88rem; }
.ph-course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.ph-course-card { background: #fff; border-radius: var(--foa-radius-lg); overflow: hidden; box-shadow: var(--foa-shadow-sm); transition: transform .25s, box-shadow .25s; }
.ph-course-card:hover { transform: translateY(-4px); box-shadow: var(--foa-shadow-md); }
.ph-course-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.ph-course-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-course-icon { position: absolute; left: 1rem; bottom: -22px; width: 52px; height: 52px; background: var(--foa-gold-soft); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--foa-shadow-sm); }
.ph-course-icon svg { width: 24px; height: 24px; stroke: var(--foa-gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ph-course-body { padding: 1.8rem 1.2rem 1.2rem; }
.ph-course-body h3 { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--foa-pine); }
.ph-course-body p { margin: 0 0 .8rem; font-size: .88rem; }
/* Quiz + scholarships duo */
.ph-duo { background: var(--foa-cream); }
.ph-duo-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: stretch; }
.ph-quiz { position: relative; background: linear-gradient(135deg, var(--foa-pine-deep), var(--foa-pine)); color: #fff; border-radius: var(--foa-radius-lg); padding: 2.2rem; overflow: hidden; }
.ph-quiz h2 { color: #fff; }
.ph-quiz-sub { color: var(--foa-ink-on-dark); margin: 0 0 1.2rem; }
.ph-ticks { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.ph-ticks li { padding: .3rem 0 .3rem 1.8rem; position: relative; color: var(--foa-ink-on-dark); font-size: .92rem; }
.ph-ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--foa-gold-bright); font-weight: 700; }
.ph-badge { position: absolute; top: 1.2rem; right: 1.2rem; font-size: .75rem; color: var(--foa-gold-bright); }
.ph-phone { position: absolute; right: -30px; bottom: -40px; width: 210px; transform: rotate(6deg); opacity: .95; }
.ph-phone-screen { background: #fff; border-radius: 22px; padding: 1rem .9rem; color: var(--foa-text); box-shadow: var(--foa-shadow-lg); border: 6px solid #1a1a1a; }
.ph-phone-top { text-align: right; font-size: .72rem; color: var(--foa-muted); margin-bottom: .5rem; }
.ph-phone-q { font-size: .72rem; font-weight: 600; margin: 0 0 .6rem; }
.ph-phone-opt { font-size: .68rem; background: var(--foa-cream); border-radius: 6px; padding: .35rem .5rem; margin-bottom: .3rem; }
.ph-phone-right { background: var(--foa-green-soft); border: 1px solid var(--foa-success); }
.ph-schol { position: relative; border-radius: var(--foa-radius-lg); overflow: hidden; min-height: 320px; display: flex; }
.ph-schol-bg { position: absolute; inset: 0; background: url('/assets/img/foa-scholarship-mosque.jpg') center/cover no-repeat; }
.ph-schol-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, rgba(4,26,18,.25), rgba(4,26,18,.78)); }
.ph-schol-in { position: relative; margin-top: auto; padding: 2rem; color: #fff; }
.ph-schol-in h2 { color: #fff; font-size: 1.5rem; }
.ph-schol-in p { color: var(--foa-ink-on-dark); font-size: .92rem; }
.ph-cap { font-style: normal; }
/* Faculty */
/* Faculty page (mockup 1001297442): page-scoped variants. */
.ph-hero-bg--mosque { background-image: url('/assets/img/foa-scholarship-mosque.jpg'); background-position: center 42%; }
/* Outline pill variant of the play link — mockup "Watch Faculty Message". */
.ph-play.pill { border: 1.5px solid rgba(255,255,255,.55); border-radius: 999px; padding: .55rem 1.4rem .55rem .7rem; text-decoration: none; }
.ph-play.pill .ph-play-icon { width: 34px; height: 34px; border: none; font-size: .7rem; background: rgba(255,255,255,.14); }
.ph-play.pill:hover { border-color: var(--foa-gold); color: var(--foa-gold-bright); }
.ph-play.pill:hover .ph-play-icon { background: rgba(198,161,91,.25); }
/* CTA band over the books photograph (mockup), faculty page only. */
.cta-band--photo { background: var(--foa-pine-deep); }
.cta-band--photo::before { background: linear-gradient(100deg, rgba(4,26,18,.95) 8%, rgba(4,26,18,.68) 52%, rgba(4,26,18,.30) 100%), url('/assets/img/foa-course-books.jpg') 72% 55%/cover no-repeat; }
.cta-band--photo h2 { max-width: none; }
/* Gold rule under the section heading, kept on one line (mockup). */
.ph-sec-head--ruled h2 { position: relative; padding-bottom: .6rem; white-space: nowrap; }
.ph-sec-head--ruled h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3.4rem; height: 4px; border-radius: 2px; background: var(--foa-gold); }
@media (max-width: 640px) { .ph-sec-head--ruled h2 { white-space: normal; } }
/* Badge overlapping the photo's bottom-left corner (mockup), faculty page only. */
.faculty-cards-sec .ph-faculty-body { padding-top: 0; }
.faculty-cards-sec .ph-faculty-card .badge-gold { position: relative; top: -1.5rem; margin: 0 0 -.9rem 1rem; }
.ph-faculty { background: var(--foa-white-warm); }
.ph-faculty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
/* Home: quote sits beside the three cards (mockup). */
.ph-faculty-grid-home { grid-template-columns: repeat(4, 1fr); }
.ph-faculty-grid-home .ph-faculty-quote { margin-top: 0; align-self: center; padding: 1.4rem 0 1.4rem 1.4rem; }
.ph-faculty-card { background: #fff; border-radius: var(--foa-radius-lg); overflow: hidden; box-shadow: var(--foa-shadow-sm); }
.ph-faculty-photo { aspect-ratio: 4/4.4; overflow: hidden; background: var(--foa-pine-soft); }
.ph-faculty-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-faculty-blank { aspect-ratio: 4/4.4; background: linear-gradient(150deg, var(--foa-pine-soft), var(--foa-cream)); display: flex; align-items: center; justify-content: center; }
.ph-faculty-blank span { width: 84px; height: 84px; border-radius: 50%; background: var(--foa-pine); color: var(--foa-gold-bright); font-size: 1.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ph-faculty-body { padding: 1.2rem; }
.ph-faculty-body h3 { margin: .5rem 0 .2rem; font-size: 1.05rem; }
.ph-faculty-quote { display: flex; gap: 1rem; align-items: flex-start; margin-top: 1.6rem; padding: 1.4rem; border-left: 3px solid var(--foa-gold); }
.ph-faculty-quote blockquote { margin: 0; font-family: var(--foa-serif); font-size: 1.35rem; font-style: italic; color: var(--foa-pine); line-height: 1.5; }
/* Stats strip (mockup) — honest figures only. */
.ph-stats { background: var(--foa-white); border-top: 1px solid var(--foa-border); border-bottom: 1px solid var(--foa-border); }
.ph-stats-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.6rem 0; }
.ph-stat { display: flex; gap: .9rem; align-items: center; }
.ph-stat svg { width: 56px; height: 56px; padding: 8px; box-sizing: border-box; flex-shrink: 0; stroke: var(--foa-gold); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; border: 1.5px solid var(--foa-gold); border-radius: 50%; }
.ph-stat b { display: block; font-size: 1.02rem; color: var(--foa-pine); }
.ph-stat span { font-size: .82rem; color: var(--foa-muted); }
@media (max-width: 900px) { .ph-stats-in { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ph-stats-in { grid-template-columns: 1fr; } }
/* Bottom CTA band (mockup). */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(115deg, #04170F 0%, #0C3B2A 60%, #14503A 100%); color: #fff; }
.cta-band-in { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 3.2rem 0; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .5rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: var(--foa-ink-on-dark); margin: 0; max-width: 520px; }
.cta-band-cta { display: flex; gap: .9rem; flex-wrap: wrap; }
.cta-band .btn-outline-w { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.cta-band .btn-outline-w:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
/* Photographic page hero (inner pages, mockup). */
.page-hero { position: relative; color: #fff; overflow: hidden; background: var(--foa-pine-deep); }
.page-hero-bg { position: absolute; inset: 0; background: var(--phb, none) center 35%/cover no-repeat; }
.page-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(4,26,18,.92) 15%, rgba(4,26,18,.55) 55%, rgba(4,26,18,.25) 100%); }
.page-hero-in { position: relative; padding: 4.5rem 0 3.5rem; max-width: 720px; }
.page-hero h1 { color: #fff; margin: 0 0 .6rem; font-size: clamp(2rem, 4.5vw, 3rem); }
.page-hero p { color: var(--foa-ink-on-dark); font-size: 1.08rem; margin: 0; }
.page-hero .crumbs, .page-hero .crumbs a { color: var(--foa-gold-bright); }
/* Tabs (mockup inner pages). */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.4rem; border-bottom: 2px solid var(--foa-border); }
.tab { background: none; border: none; padding: .7rem 1.1rem; font-weight: 600; color: var(--foa-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: .95rem; }
.tab:hover { color: var(--foa-pine); }
.tab.active { color: var(--foa-pine); border-bottom-color: var(--foa-gold); }
html[data-theme="dark"] .tab.active { color: var(--foa-text); }
/* Test list rows. */
.test-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.test-row h3 { margin: .4rem 0 .2rem; }
.stat-big { font-size: 2.4rem; font-weight: 800; color: var(--foa-pine); margin: 0; }
html[data-theme="dark"] .stat-big { color: var(--foa-text); }
.side-cta .muted { color: var(--foa-ink-on-dark); }
@media (max-width: 900px) { .courses-layout { grid-template-columns: 1fr; } .courses-side { position: static; } }
/* Auth splash (mockup login/register): dark photographic backdrop, card on top. */
.auth-splash { position: relative; padding: 4rem 0; background: linear-gradient(120deg, #04170F, #0C3B2A 60%, #14503A), url('/assets/img/foa-hero-officers-v2.jpg') center 30%/cover no-repeat; background-blend-mode: overlay; }
.auth-splash::before { content: ""; position: absolute; inset: 0; background: rgba(4,26,18,.72); }
.auth-splash > .container { position: relative; }
.auth-splash .auth-card { box-shadow: var(--foa-shadow-lg); }
.auth-splash .auth-swap, .auth-splash .auth-swap a { color: rgba(255,255,255,.85); }
/* Search page */
.search-form { display: flex; gap: .6rem; margin-bottom: 1rem; }
.search-form input[type="search"] { flex: 1; }
.search-results { display: grid; gap: .8rem; }
.nav-search { display: inline-flex; align-items: center; color: inherit; opacity: .8; }
.nav-search:hover { opacity: 1; }
.nav-search svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.btn-outline svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; vertical-align: -2px; margin-right: .3rem; }
/* Responsive */
@media (max-width: 1024px) {
  .ph-feats { grid-template-columns: repeat(3, 1fr); }
  .ph-feat:nth-child(4) { border-left: none; }
  .ph-course-grid { grid-template-columns: 1fr 1fr; }
  .ph-duo-grid { grid-template-columns: 1fr; }
  .ph-phone { display: none; }
  .ph-script { display: none; }
}
@media (max-width: 640px) {
  .ph-hero-in { padding: 3rem 0 2rem; min-height: 0; }
  .ph-feats { grid-template-columns: 1fr; transform: none; }
  .ph-hero { padding-bottom: 2rem; }
  .ph-feat + .ph-feat { border-left: none; border-top: 1px solid rgba(255,255,255,.1); }
  .ph-courses { padding-top: 2rem; }
  .ph-course-grid, .ph-faculty-grid, .ph-faculty-grid-home { grid-template-columns: 1fr; }
  .ph-faculty-grid-home .ph-faculty-quote { align-self: auto; padding: 1.4rem 0 1.4rem 1.4rem; }
  .ph-faculty-blank { aspect-ratio: 16/10; }
  .ph-sec-head { flex-direction: column; align-items: flex-start; }
  /* Quiz runner: stack timer bar, full-width nav buttons on phones. */
  .test-bar { flex-wrap: wrap; top: 60px; }
  .test-bar .btn-lg { margin-left: 0; width: 100%; }
  .test-timer-wrap { min-width: 0; padding: .3rem .8rem; }
  #test-timer { font-size: 1.5rem; }
  .test-nav { flex-direction: column; }
  .test-nav .btn { width: 100%; min-width: 0; }
}

/* CSP-safe replacements for former inline styles (audit 2026-10-14) */
.err-page { font-family: system-ui, sans-serif; text-align: center; padding: 4rem 1rem; color: #102033; }
.upper { text-transform: uppercase; }
.news-title { font-size: 1.05rem; margin: 0 0 .35rem; }
.news-meta { margin: 0; }
.news-note { margin-top: 1.25rem; }

/* ---------- About page components ---------- */
.crumbs { font-size: .85rem; color: var(--foa-ink-on-dark); margin: 0 0 .8rem; }
.crumbs a { color: var(--foa-ink-on-dark); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.lede { font-size: 1.1rem; color: var(--foa-navy); font-weight: 600; }
.mvv { display: grid; gap: 1rem; margin-top: 1.5rem; }
.mvv-card { display: flex; gap: 1rem; align-items: flex-start; }
.mvv-ico { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--foa-cream); display: inline-flex; align-items: center; justify-content: center; }
.mvv-ico svg { width: 22px; height: 22px; stroke: var(--foa-gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mvv-card h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.mvv-card p { margin: 0; font-size: .92rem; }
.who-photo { position: relative; border-radius: var(--foa-radius-lg); overflow: hidden; }
.who-photo img { display: block; width: 100%; height: 100%; object-fit: cover; min-height: 420px; }
.who-quote { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; margin: 0; background: rgba(7, 42, 30, .88); color: #fff; border-radius: var(--foa-radius-md); padding: 1rem 1.2rem; font-style: italic; backdrop-filter: blur(4px); }
.who-quote span { color: var(--foa-gold); font-size: 1.6rem; line-height: 0; }
.story-card { background: #fff; }
.stats-bar { background: linear-gradient(115deg, #04170F, #0C3B2A); color: #fff; padding: 2rem 0; }
.stats-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { display: flex; gap: .9rem; align-items: flex-start; padding-left: 1.5rem; border-left: 1px solid rgba(198, 161, 91, .3); }
.stat:first-child { border-left: none; padding-left: 0; }
.stat svg { width: 34px; height: 34px; flex-shrink: 0; stroke: var(--foa-gold); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stat b { display: block; font-size: 1.05rem; color: #fff; }
.stat span { font-size: .82rem; color: var(--foa-ink-on-dark); }
.leader-card { display: flex; gap: 1.5rem; align-items: flex-start; }
.leader-card blockquote { margin: 0; }
.leader-card blockquote p { font-size: 1.05rem; font-style: italic; line-height: 1.7; }
.leader-card footer { margin-top: 1rem; }
.leader-card footer b { display: block; }
.leader-card footer span { font-size: .88rem; color: var(--foa-muted); }
.faculty-avatar-lg { width: 120px; height: 120px; font-size: 2rem; flex-shrink: 0; }
.why-card h3 { margin-top: 0; }
.btn-outline-w2 { background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; }
.btn-outline-w2:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
/* CTA band with photographic backdrop (About page only; base .cta-band stays shared). */
.cta-band-books {
  background:
    linear-gradient(115deg,
      color-mix(in srgb, var(--foa-pine-deep) 94%, transparent) 0%,
      color-mix(in srgb, var(--foa-pine) 88%, transparent) 55%,
      color-mix(in srgb, var(--foa-green) 80%, transparent) 100%),
    url("/assets/img/foa-course-books.jpg") center 55% / cover no-repeat;
}
/* Story card: institutional icon + faint flag watermark. */
.story-card { position: relative; overflow: hidden; }
.story-card .story-ico { display: block; width: 56px; height: 56px; margin: 0 0 .9rem; color: var(--foa-pine); }
html[data-theme="dark"] .story-card .story-ico { color: var(--foa-gold); }
.story-card .story-ico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.story-card .story-ico .flag-fly { stroke: var(--foa-gold); fill: color-mix(in srgb, var(--foa-gold) 18%, transparent); }
.story-card .story-flag { position: absolute; right: -34px; bottom: -16px; width: 190px; opacity: .07; pointer-events: none; color: var(--foa-pine); }
.story-card h3, .story-card p { position: relative; }
/* Inline glyph inside buttons. */
.btn .btn-ico { width: 1.05em; height: 1.05em; vertical-align: -.18em; margin-right: .5em; fill: currentColor; }
@media (max-width: 900px) {
  .stats-in { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; padding-left: 0; }
  .leader-card { flex-direction: column; }
  .who-photo img { min-height: 300px; }
}
@media (max-width: 640px) {
  .stats-in { grid-template-columns: 1fr; }
  .stat { border-left: none; padding-left: 0; border-top: 1px solid rgba(198,161,91,.3); padding-top: 1rem; }
  .stat:first-child { border-top: none; padding-top: 0; }
}

/* ---------- Courses page ---------- */
.tabs { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.tab { background: #fff; border: 1px solid var(--foa-border); border-radius: var(--foa-radius-md); padding: .7rem 1.4rem; font-weight: 600; font-size: .92rem; cursor: pointer; color: var(--foa-navy); transition: all .18s ease; }
.tab:hover { border-color: var(--foa-pine); }
.tab.active { background: var(--foa-pine); border-color: var(--foa-pine); color: #fff; }
.ph-course-img { height: 180px; overflow: hidden; background: var(--foa-cream); }
.ph-course-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-course-body { padding: 1.4rem; }
.ph-course-body h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.ph-course-body .ticks { margin: 1rem 0; }
.course-meta { display: flex; gap: 2rem; margin: 1rem 0; font-size: .85rem; color: var(--foa-muted); }
.course-meta b { color: var(--foa-navy); font-size: .95rem; }
.trio { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1.2rem; }
.trio-hero { background: linear-gradient(135deg, #04170F, #0C3B2A); color: #fff; border: none; }
.trio-hero h3, .trio-hero .ph-kicker-dark { color: #fff; }
.trio-hero .ph-kicker-dark { color: var(--foa-gold); }
.trio-hero p { color: var(--foa-ink-on-dark); }
.quote-card { display: flex; flex-direction: column; justify-content: center; background: var(--foa-cream); border: none; }
.qmark { font-size: 3rem; color: var(--foa-gold); line-height: 1; }
.combo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.combo { text-align: center; padding: 1.2rem; }
.combo b { display: block; margin-bottom: .3rem; }
.combo-tag { color: var(--foa-pine); font-weight: 700; font-size: .85rem; }
@media (max-width: 900px) {
  .trio { grid-template-columns: 1fr; }
  .combo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .combo-grid { grid-template-columns: 1fr; }
}

/* ---------- Courses page: mockup refinements ---------- */
/* Hero feature strip: 4 columns on desktop (reference has 4 features);
   responsive rules below 1024px keep their stacked layouts. */
@media (min-width: 1025px) {
  .courses-page .ph-feats { grid-template-columns: repeat(4, 1fr); }
}
/* "Watch Course Overview" as outlined pill (reference). */
.courses-page .ph-play { border: 1.5px solid rgba(255,255,255,.55); border-radius: 999px; padding: .45rem 1.5rem .45rem .55rem; transition: background .2s, border-color .2s; }
.courses-page .ph-play:hover { border-color: var(--foa-white); background: rgba(255,255,255,.08); }
.courses-page .ph-play:hover .ph-play-icon { background: rgba(255,255,255,.15); }
/* Filter tabs: white bar container + icons (reference). */
.course-tabs { background: var(--foa-white); border: 1px solid var(--foa-border); border-radius: var(--foa-radius-lg); box-shadow: var(--foa-shadow-sm); padding: .6rem; }
.course-tabs .tab { border: none; border-radius: var(--foa-radius-md); display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 0; }
.course-tabs .tab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
/* Course card header crops. */
.ph-course-img .obj-globe { object-position: 22% 50%; }
/* Newspaper stack occupies the right ~45% of the globe photo: shift the frame
   left (wider than the container, negative margin) to isolate it. */
.ph-course-img .obj-news { width: 178%; max-width: none; height: 100%; object-fit: cover; margin-left: -74%; }
/* Card title row: label left, arrow right (reference). */
.ph-course-body { padding-top: 1.9rem; }
.ph-course-title { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.ph-course-title span:last-child { color: var(--foa-pine); }
/* Duration / fee meta icons. */
.meta-ico { width: 16px; height: 16px; stroke: var(--foa-gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; margin-right: .25rem; }
/* Navy button (reference "View Details") + full-width block. */
.btn-navy { background: var(--foa-navy); border-color: var(--foa-navy); color: var(--foa-white); }
.btn-navy:hover { background: var(--foa-pine-deep); border-color: var(--foa-pine-deep); color: var(--foa-white); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn svg.btn-ico { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; margin-left: .45rem; }
/* "From Basics to Excellence": Faisal Mosque photo backdrop (reference). */
.trio-hero { background: linear-gradient(100deg, rgba(7,42,30,.94) 22%, rgba(7,42,30,.62) 55%, rgba(7,42,30,.28)), url('/assets/img/foa-scholarship-mosque.jpg') center 30%/cover no-repeat; }
/* Why-choose list with gold icon circles (reference). */
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.05rem; }
.why-list li { display: flex; gap: .9rem; align-items: flex-start; }
.why-list b { display: block; color: var(--foa-pine); font-size: .95rem; }
/* Quote card: large mark, italic serif, gold accent (reference). */
.quote-card .qmark { font-size: 4.2rem; }
.quote-card p { font-style: italic; font-size: 1.12rem; line-height: 1.65; }
.quote-card p::after { content: ""; display: block; width: 76px; height: 3px; background: var(--foa-gold); border-radius: 2px; margin-top: 1rem; }
/* Subject combination cards: icon left, text left (reference). */
.combo { display: flex; gap: .9rem; align-items: center; text-align: left; padding: 1.1rem 1.2rem; }
.combo .mvv-ico { width: 46px; height: 46px; }
.combo b { font-size: .95rem; color: var(--foa-pine); }
@media (max-width: 640px) {
  .course-tabs { padding: .4rem; }
  .course-tabs .tab { padding: .6rem .9rem; font-size: .85rem; }
}

/* ---------- Practice tests page ---------- */
.subject-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.subject-card { display: flex; align-items: center; gap: .8rem; padding: 1rem; text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
.subject-card:hover { transform: translateY(-2px); box-shadow: var(--foa-shadow-md); }
.subject-ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--foa-cream); color: var(--foa-pine); font-weight: 800; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; }
.subject-card b { font-size: .92rem; }
.subject-go { margin-left: auto; color: var(--foa-muted); }
.test-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.test-row h3 { margin: .4rem 0 .3rem; }
.stat-big { font-size: 2.4rem; font-weight: 800; color: var(--foa-pine); margin: 0; }
@media (max-width: 900px) {
  .subject-grid { grid-template-columns: repeat(3, 1fr); }
  .test-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Scholarship page ---------- */
.sch-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.sch-card { text-align: left; }
.sch-card b { display: block; margin: .4rem 0; }
.sch-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--foa-cream); display: inline-flex; align-items: center; justify-content: center; }
.sch-ico svg { width: 22px; height: 22px; stroke: var(--foa-gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sch-big { font-size: 2rem; color: var(--foa-pine); }
.sch-fee { font-size: 1.4rem; color: var(--foa-gold-dark, #9a7b3f); font-weight: 800; margin: .2rem 0; }
.info-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; background: var(--foa-cream); border-radius: var(--foa-radius-lg); padding: 1.4rem; }
.info-item { display: flex; gap: .8rem; align-items: flex-start; }
.info-item svg { width: 30px; height: 30px; flex-shrink: 0; stroke: var(--foa-gold); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.info-item b { display: block; font-size: .92rem; }
.info-item span { font-size: .85rem; color: var(--foa-muted); }
.serif-h.light, .stats-bar .serif-h { color: #fff; }
.light-p { color: var(--foa-ink-on-dark); max-width: 32ch; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.why-item { display: flex; gap: .9rem; align-items: flex-start; }
.why-item svg { width: 34px; height: 34px; flex-shrink: 0; stroke: var(--foa-gold); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.why-item b { display: block; color: #fff; }
.why-item span { font-size: .85rem; color: var(--foa-ink-on-dark); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps li { display: flex; gap: 1rem; align-items: flex-start; }
.step-n { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--foa-gold); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.steps b { display: block; margin-bottom: .2rem; }
.steps p { margin: 0; font-size: .9rem; color: var(--foa-muted); }
.duo { display: grid; gap: 1.2rem; }
.interest-card { background: linear-gradient(135deg, #04170F, #0C3B2A); border: none; color: #fff; }
.interest-card h3 { color: #fff; margin-top: 0; }
.interest-card .muted { color: var(--foa-ink-on-dark); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: #fff; }
.field input { width: 100%; padding: .75rem .9rem; border-radius: var(--foa-radius-md); border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 1rem; }
.field input::placeholder { color: rgba(255,255,255,.45); }
.field input:focus { outline: 2px solid var(--foa-gold); border-color: var(--foa-gold); }
.form-err { color: #ff9d8a; font-size: .88rem; }
.form-ok { color: #8fd6a4; font-size: .88rem; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.faq-col { display: grid; gap: 1rem; align-content: start; }
@media (max-width: 900px) {
  .sch-cards { grid-template-columns: 1fr 1fr; }
  .info-strip { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sch-cards { grid-template-columns: 1fr; }
  .info-strip { grid-template-columns: 1fr; }
}

/* ---------- Faculty page ---------- */
.badge-gold { background: var(--foa-gold); color: var(--foa-pine-deep); }
.faculty-subjects-label { font-weight: 700; margin: 1rem 0 .3rem; font-size: .92rem; }
.ph-faculty-card .ticks { margin-top: .3rem; }
.expertise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.5rem; }
.expertise-card { display: flex; gap: .9rem; align-items: flex-start; }
.expertise-card b { display: block; margin-bottom: .2rem; }
.expertise-card p { margin: 0; }
@media (max-width: 900px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .expertise-grid { grid-template-columns: 1fr; }
}

/* ---------- Resources page ---------- */
.res-featured { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.res-img { height: 150px; overflow: hidden; background: var(--foa-cream); border-radius: var(--foa-radius-md) var(--foa-radius-md) 0 0; margin: -1.2rem -1.2rem 1rem; }
.res-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.res-body h3 { margin: 0 0 .4rem; font-size: 1rem; }
/* Featured cards: circular icon badge straddling the image bottom edge (mockup). */
.res-card { position: relative; }
.res-card-icon { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: -26px 0 .9rem 1.1rem; border-radius: 50%; background: var(--foa-gold-soft); border: 2px solid var(--foa-white); box-shadow: var(--foa-shadow-sm); }
.res-card-icon svg { width: 24px; height: 24px; stroke: var(--foa-pine); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Light feature strip over the hero (mockup: white card, pine text, gold icons). */
.ph-feats--light { background: var(--foa-white); border: 1px solid var(--foa-border); box-shadow: var(--foa-shadow-md); }
.ph-feats--light .ph-feat + .ph-feat { border-left-color: var(--foa-border); }
.ph-feats--light b { color: var(--foa-pine); }
.ph-feats--light span { color: var(--foa-muted); }
.ph-feats--light svg { stroke: var(--foa-gold); }
html[data-theme="dark"] .ph-feats--light { background: var(--foa-pine-deep); border-color: rgba(255,255,255,.12); }
html[data-theme="dark"] .ph-feats--light .ph-feat + .ph-feat { border-left-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .ph-feats--light b { color: var(--foa-text); }
html[data-theme="dark"] .ph-feats--light span { color: var(--foa-ink-on-dark); }
html[data-theme="dark"] .ph-feats--light svg { stroke: var(--foa-gold-bright); }
/* Subject section: search field (mockup) — submits to site search. */
.res-search { display: flex; align-items: center; gap: .6rem; background: var(--foa-white); border: 1px solid var(--foa-border); border-radius: var(--foa-radius-lg); padding: .65rem .95rem; width: min(340px, 100%); box-shadow: var(--foa-shadow-sm); flex-shrink: 0; }
.res-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: .92rem; color: var(--foa-text); width: 100%; }
.res-search svg { width: 18px; height: 18px; flex-shrink: 0; stroke: var(--foa-muted); fill: none; stroke-width: 2; stroke-linecap: round; }
/* Subject icon tiles (mockup: rounded-square gold tiles with pine line icons). */
.subject-ico { width: 48px; height: 48px; border-radius: var(--foa-radius-md); background: var(--foa-gold-soft); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.subject-ico svg { width: 24px; height: 24px; stroke: var(--foa-pine); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Guides duo: wider guides card with study-photo backdrop (mockup). */
.res-guides { border: none; overflow: hidden; background: linear-gradient(95deg, var(--foa-pine-deep) 0%, var(--foa-pine-deep) 50%, color-mix(in srgb, var(--foa-pine-deep) 55%, transparent) 80%, color-mix(in srgb, var(--foa-pine-deep) 30%, transparent) 100%), url("/assets/img/foa-course-essay.jpg") right center / cover no-repeat; }
.res-guides p { max-width: 32ch; }
/* CTA band with Faisal Mosque photo (mockup). */
.cta-band--mosque { background: linear-gradient(100deg, color-mix(in srgb, var(--foa-pine-deep) 95%, transparent) 0%, color-mix(in srgb, var(--foa-pine-deep) 88%, transparent) 55%, color-mix(in srgb, var(--foa-pine) 70%, transparent) 100%), url("/assets/img/foa-scholarship-mosque.jpg") center 30% / cover no-repeat; }
.cta-band--mosque .cta-band-cta { flex-direction: column; align-items: stretch; }
.cta-band--mosque .cta-band-cta .btn { text-align: center; }
.duo-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.duo-res { grid-template-columns: 1.55fr 1fr; }
@media (max-width: 640px) {
  .res-guides { background: linear-gradient(180deg, color-mix(in srgb, var(--foa-pine-deep) 96%, transparent) 0%, color-mix(in srgb, var(--foa-pine-deep) 85%, transparent) 100%), url("/assets/img/foa-course-essay.jpg") center / cover no-repeat; }
}
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.link-list li { display: flex; justify-content: space-between; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--foa-border); }
.link-list a { color: var(--foa-navy); text-decoration: none; font-weight: 600; }
.link-list a:hover { color: var(--foa-pine); }
@media (max-width: 900px) {
  .res-featured { grid-template-columns: repeat(2, 1fr); }
  .duo-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .res-featured { grid-template-columns: 1fr; }
}

/* ---------- Contact page ---------- */
.field-light { margin-bottom: 1rem; }
.field-light label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .35rem; }
.field-light .req { color: #c0392b; }
.field-light input, .field-light select, .field-light textarea { width: 100%; padding: .75rem .9rem; border-radius: var(--foa-radius-md); border: 1px solid var(--foa-border); background: #fff; font-size: 1rem; font-family: inherit; }
.field-light input:focus, .field-light select:focus, .field-light textarea:focus { outline: 2px solid var(--foa-pine); border-color: var(--foa-pine); }
.field-light textarea { resize: vertical; }
.btn-block { width: 100%; }
.btn-pine { background: var(--foa-pine); color: #fff; }
.btn-pine:hover { background: var(--foa-pine-deep); color: #fff; }
.touch-card { background: linear-gradient(135deg, #04170F, #0C3B2A); border: none; color: #fff; }
.touch-card h3 { color: #fff; margin-top: 0; }
.touch-card .muted { color: var(--foa-ink-on-dark); }
.touch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1rem; }
.touch-item { background: #fff; border-radius: var(--foa-radius-md); padding: 1rem; text-align: center; text-decoration: none; color: inherit; display: block; }
.touch-item b { display: block; margin: .4rem 0 .2rem; color: var(--foa-navy); }
.touch-item span { font-size: .85rem; font-weight: 600; color: var(--foa-navy); word-break: break-all; }
.touch-item small { display: block; font-size: .78rem; color: var(--foa-muted); margin-top: .3rem; }
.touch-ico { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.touch-ico svg { width: 22px; height: 22px; fill: #fff; }
.touch-ico.wa { background: #25d366; }
.touch-ico.call { background: #2563eb; }
.touch-ico.mail { background: #f59e0b; }
.touch-ico.pin { background: #ef4444; }
.map-wrap { border-radius: var(--foa-radius-md); overflow: hidden; margin-top: 1rem; }
.map-wrap iframe { width: 100%; height: 280px; border: 0; display: block; }
.loc-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.loc-meta b { display: block; font-size: .88rem; margin-bottom: .2rem; }
.loc-meta span { font-size: .82rem; color: var(--foa-muted); }
@media (max-width: 640px) {
  .touch-grid { grid-template-columns: 1fr; }
  .loc-meta { grid-template-columns: 1fr; }
}

/* ---------- Admissions page (mockup 2026-10-19) ---------- */
/* Hero: trust strip is a sibling section now, no overlap needed. */
.adm-hero { padding-bottom: 0; }
/* Trust strip: light band like the mockup (not the dark glass strip used on other pages). */
.adm-trust { background: var(--foa-white); border-bottom: 1px solid var(--foa-border); }
.adm-trust-in { display: grid; grid-template-columns: repeat(5, 1fr); }
.adm-trust .ph-feat { display: flex; gap: .8rem; align-items: flex-start; padding: 1.4rem 1rem; }
.adm-trust .ph-feat + .ph-feat { border-left: 1px solid var(--foa-border); }
.adm-trust .ph-feat svg { width: 30px; height: 30px; flex-shrink: 0; stroke: var(--foa-gold); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.adm-trust .ph-feat b { display: block; font-size: .86rem; color: var(--foa-pine); }
.adm-trust .ph-feat span { font-size: .76rem; color: var(--foa-muted); }
html[data-theme="dark"] .adm-trust .ph-feat b { color: var(--foa-text); }
/* Program: intro column + four cards in one row (mockup). */
.adm-prog { grid-template-columns: minmax(200px, 280px) 1fr; align-items: start; }
.adm-prog > div:first-child .btn { white-space: nowrap; }
.adm-prog .prog-grid { grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.adm-prog .prog-card { text-align: center; padding: 1.2rem 1rem 1.4rem; }
.adm-prog .prog-card .sch-ico { margin: 0 auto; }
.adm-prog .prog-card .ticks { text-align: left; }
.adm-prog .prog-card .btn-block { margin-top: auto; }
.prog-card h3 { margin: .6rem 0 .3rem; font-size: 1.05rem; }
.prog-fee { font-size: 1.3rem; font-weight: 800; color: var(--foa-pine); margin: .2rem 0 .6rem; }
.prog-fee small { font-size: .85rem; font-weight: 400; color: var(--foa-muted); display: block; }
.prog-card .ticks { margin: .6rem 0 1rem; }
.prog-featured { border: 2px solid var(--foa-gold); background: var(--foa-gold-soft); }
/* Why join: photo + overlapping quote card, bullets, mosque strip (mockup). */
.adm-why { background: var(--foa-white); }
.adm-why-grid { display: grid; grid-template-columns: 1.3fr 1fr .85fr; gap: var(--foa-space-7); align-items: stretch; }
.adm-why-photo { position: relative; border-radius: var(--foa-radius-lg); overflow: hidden; min-height: 340px; }
.adm-why-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adm-why-quote { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: var(--foa-pine-deep); padding: 1.6rem 1.8rem; max-width: 250px; border-radius: var(--foa-radius-lg) 0 0 var(--foa-radius-lg); }
.adm-why-quote .qmark { font-family: var(--foa-serif); font-size: 2.2rem; line-height: 1; color: var(--foa-gold); }
.adm-why-quote p { font-family: var(--foa-serif); font-size: 1.2rem; line-height: 1.45; margin: .5rem 0 0; color: #fff; }
.adm-why-mosque { border-radius: var(--foa-radius-lg); background: url('/assets/img/foa-scholarship-mosque.jpg') center/cover no-repeat; min-height: 340px; }
.adm-why-copy h3 { margin-bottom: 1rem; }
.adm-why-copy .ticks li::before { color: var(--foa-gold); }
/* How to join: gold circular step icons (mockup). */
.adm-step-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--foa-gold); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.adm-step-ico svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.adm-step-ico.wa svg { fill: #fff; stroke: none; }
.join-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.5rem; }
.join-step { display: flex; gap: .8rem; align-items: flex-start; position: relative; }
.join-step b { display: block; font-size: .85rem; color: var(--foa-gold-dark, #9a7b3f); }
.join-step p { margin: .2rem 0 0; font-weight: 600; }
.join-arrow { position: absolute; right: -.9rem; top: 1rem; color: var(--foa-muted); }
.join-step:last-child .join-arrow { display: none; }
/* CTA band: mosque photo background, buttons stacked on the right (mockup). */
.cta-band.adm-cta { background: url('/assets/img/foa-scholarship-mosque.jpg') center 40%/cover no-repeat; }
.cta-band.adm-cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(4,26,18,.95) 25%, rgba(4,26,18,.62) 60%, rgba(4,26,18,.4)); }
.adm-cta-in { position: relative; }
.adm-cta-btns { flex-direction: column; align-items: stretch; }
@media (max-width: 1200px) {
  .adm-prog .prog-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-why-grid { grid-template-columns: 1fr 1fr; }
  .adm-why-mosque { display: none; }
}
@media (max-width: 900px) {
  .adm-prog { grid-template-columns: 1fr; }
  .adm-trust-in { grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
  .adm-trust .ph-feat + .ph-feat { border-left: none; }
  .adm-why-grid { grid-template-columns: 1fr; }
  .adm-why-mosque { display: block; }
  .adm-why-photo, .adm-why-mosque { min-height: 240px; }
  .join-steps { grid-template-columns: repeat(2, 1fr); }
  .join-arrow { display: none; }
  .adm-cta-btns { flex-direction: row; }
}
@media (max-width: 640px) {
  .adm-prog .prog-grid { grid-template-columns: 1fr; }
  .adm-trust-in { grid-template-columns: 1fr; }
  .adm-trust .ph-feat + .ph-feat { border-left: none; border-top: 1px solid var(--foa-border); }
  .join-steps { grid-template-columns: 1fr; }
}

/* ---------- Login page ---------- */
/* NOTE: position:relative lifts the copy + login card above the absolute
   .ph-hero-bg image (painted later in DOM order). Without it the whole hero
   content is hidden behind the background photo. */
.auth-hero-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; position: relative; z-index: 1; padding: 4.5rem 0 3.5rem; }
.auth-feats { display: flex; gap: 1.5rem; margin-top: 1.5rem; flex-wrap: wrap; }
.auth-feat { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.auth-feat + .auth-feat { border-left: 1px solid rgba(255,255,255,.18); padding-left: 1.5rem; }
.auth-feat svg { width: 36px; height: 36px; stroke: var(--foa-gold); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-feat span { font-size: .82rem; color: var(--foa-ink-on-dark); line-height: 1.3; }
.auth-login-card { padding: 1.8rem; color: var(--foa-text); }
.auth-login-card .muted { color: var(--foa-muted); }
.auth-login-card h2 { margin: 0 0 .3rem; font-size: 1.3rem; color: var(--foa-pine); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: .8rem 0; font-size: .88rem; }
.auth-row .check { display: flex; align-items: center; gap: .4rem; }
.auth-swap { margin-top: 1rem; text-align: center; }
.auth-swap a { color: var(--foa-gold); font-weight: 700; }
/* Portal feature cards: 6 across on desktop, matching the mockup row. */
.portal-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.portal-card { display: flex; gap: .9rem; align-items: flex-start; }
.portal-card .sch-ico { flex-shrink: 0; }
.portal-card b { display: block; margin-bottom: .2rem; font-family: var(--foa-serif); color: var(--foa-pine); }
.portal-card p { margin: 0; }
/* Photographic "Learn. Practice. Improve." banner (mockup). */
.learn-banner { position: relative; overflow: hidden; background: var(--foa-pine-deep); border: none; padding: 3rem 2.5rem; }
.learn-banner::before { content: ""; position: absolute; inset: 0; background: url('/assets/img/foa-course-books.jpg') center 60%/cover no-repeat; }
.learn-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(4,26,18,.94) 25%, rgba(4,26,18,.58) 60%, rgba(4,26,18,.32) 100%); }
.learn-banner > * { position: relative; z-index: 1; }
.learn-banner .serif-h { color: #fff; }
/* Orange "i" badge on the FAQ heading (mockup). */
.info-ico { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--foa-gold); color: #fff; font-style: normal; font-weight: 700; font-size: 1.05rem; align-items: center; justify-content: center; margin-right: .5rem; vertical-align: middle; }
/* Bordered accordion rows (mockup: Important Information). Shared with faq.php. */
details.faq { background: var(--foa-white); border: 1px solid var(--foa-border); border-radius: var(--foa-radius-md); margin: 0 0 .7rem; }
details.faq summary { list-style: none; cursor: pointer; padding: .95rem 1.1rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: .8rem; color: var(--foa-ink); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "›"; color: var(--foa-gold); font-size: 1.35rem; line-height: 1; transform: rotate(90deg); transition: transform .2s; flex-shrink: 0; }
details.faq[open] summary::after { transform: rotate(-90deg); }
details.faq > p, details.faq > div { padding: 0 1.1rem 1rem; margin: 0; }
.join-cta-card { text-align: left; }
@media (max-width: 1200px) {
  .portal-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .auth-hero-in { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .portal-grid { grid-template-columns: 1fr; }
  .auth-feats { display: grid; grid-template-columns: 1fr 1fr; row-gap: 1.2rem; }
  .auth-feat + .auth-feat { border-left: none; padding-left: 0; }
}

/* ---------- Premium quiz interface ---------- */
.test-intro { max-width: 640px; margin: 3rem auto; text-align: center; padding: 2.5rem; }
.test-intro .btn { margin: 1rem 0; }
.test-intro .rules { text-align: left; margin-top: 1.5rem; }
.quiz-topbar { background: linear-gradient(115deg, #04170F, #0C3B2A); color: #fff; padding: .75rem 0; }
.quiz-topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.quiz-title-wrap { display: flex; gap: .9rem; align-items: center; }
.quiz-ico { width: 44px; height: 44px; border-radius: 12px; background: rgba(198,161,91,.18); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quiz-ico svg { width: 24px; height: 24px; stroke: var(--foa-gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quiz-topbar h2 { margin: 0; color: #fff; font-size: 1.15rem; }
.quiz-meta { margin: .15rem 0 0; font-size: .82rem; color: var(--foa-ink-on-dark); display: flex; gap: .6rem; }
.quiz-body { background: var(--foa-cream); padding: 1.4rem 0 2.4rem; min-height: 60vh; }
.quiz-card { background: #fffdf8; border: 1px solid #e8ddc8; border-radius: 18px; padding: 1.5rem 2.2rem; box-shadow: var(--foa-shadow-md); max-width: 860px; margin: 0 auto; }
.quiz-qhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.quiz-qpos { font-size: 1.25rem; margin: 0; color: var(--foa-navy); }
.quiz-qpos strong { color: var(--foa-gold-dark, #9a7b3f); font-size: 1.5rem; }
.quiz-qhead .muted { margin: .2rem 0 0; }
.quiz-timer { display: flex; gap: .7rem; align-items: center; }
.quiz-timer svg { width: 40px; height: 40px; stroke: var(--foa-gold); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.quiz-timer-label { display: block; font-size: .78rem; color: var(--foa-muted); }
.quiz-timer strong { font-size: 1.6rem; color: var(--foa-navy); font-variant-numeric: tabular-nums; }
.quiz-timer strong.low { color: #b7791f; }
.quiz-timer strong.critical { color: #c0392b; }
.quiz-progress { height: 8px; background: #eee5d3; border-radius: 99px; margin-top: .8rem; overflow: hidden; }
.quiz-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--foa-pine), #1a6b4f); border-radius: 99px; transition: width .3s ease; }
.quiz-progress-pct { text-align: right; margin: .3rem 0 0; }
.quiz-divider { display: flex; align-items: center; gap: .8rem; margin: .95rem 0; }
.quiz-divider span { flex: 1; height: 1px; background: #e8ddc8; }
.quiz-divider svg { width: 26px; height: 26px; stroke: var(--foa-gold); fill: none; stroke-width: 1.6; }
.quiz-stem { font-family: var(--foa-serif); font-size: 1.28rem; line-height: 1.5; color: var(--foa-navy); text-align: center; max-width: 640px; margin: 0 auto 1rem; }
.quiz-subject { text-align: center; }
.quiz-opts { display: grid; gap: .65rem; max-width: 680px; margin: 0 auto; }
.quiz-opt { display: flex; gap: 1rem; align-items: center; background: #fff; border: 1.5px solid #e8ddc8; border-radius: 14px; padding: .8rem 1.1rem; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.quiz-opt:hover { border-color: var(--foa-gold); }
.quiz-opt input { position: absolute; opacity: 0; pointer-events: none; }
.quiz-opt-key { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid #d8cba8; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--foa-navy); }
.quiz-opt-text { font-size: 1.02rem; }
.quiz-opt.chosen { border-color: var(--foa-pine); background: #f0f7f3; }
.quiz-opt.chosen .quiz-opt-key { background: var(--foa-pine); border-color: var(--foa-pine); color: #fff; }
.quiz-opt:focus-within { outline: 2px solid var(--foa-gold); outline-offset: 2px; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.4rem; max-width: 680px; margin-left: auto; margin-right: auto; }
#test-mark.marked { border-color: var(--foa-gold); color: var(--foa-gold-dark, #9a7b3f); font-weight: 700; }
.test-palette { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid #e8ddc8; max-width: 680px; margin-left: auto; margin-right: auto; }
.test-palette button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #d8cba8; background: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; color: var(--foa-navy); }
.test-palette button.answered { background: var(--foa-pine); border-color: var(--foa-pine); color: #fff; }
.test-palette button.marked { border-color: var(--foa-gold); border-width: 2px; }
.test-palette button.current { outline: 2px solid var(--foa-gold); outline-offset: 1px; }
.quiz-motto { text-align: center; margin-top: 2rem; font-size: .78rem; letter-spacing: .25em; color: var(--foa-muted); line-height: 1.8; }
@media (max-width: 640px) {
  .quiz-card { padding: 1.4rem 1.1rem; }
  .quiz-qhead { flex-direction: column; }
  .quiz-stem { font-size: 1.15rem; }
  .quiz-nav { flex-direction: column; }
  .quiz-nav .btn { width: 100%; }
}

/* ---------- Student portal shell ---------- */
.portal-shell { display: flex; min-height: 100vh; }
.portal-sidebar { width: 250px; flex-shrink: 0; background: linear-gradient(180deg, #04170F, #0C3B2A); color: #fff; padding: 1.2rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.portal-brand { display: block; text-decoration: none; margin: 0 auto 1.5rem; }
.portal-brand img { border-radius: 8px; display: block; }
.portal-sidebar nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.portal-sidebar nav a { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 10px; color: var(--foa-ink-on-dark); text-decoration: none; font-size: .92rem; }
.portal-sidebar nav a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.portal-sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.portal-sidebar nav a[aria-current="page"] { background: var(--foa-gold); color: #04170F; font-weight: 700; }
.portal-motto { margin-top: auto; font-size: .8rem; font-style: italic; color: var(--foa-ink-on-dark); line-height: 1.6; padding-top: 1.5rem; }
.portal-foot { margin-top: auto; }
.portal-foot img { width: 100%; height: 130px; object-fit: cover; border-radius: var(--foa-radius-md); display: block; }
.portal-foot .portal-motto { padding-top: .9rem; font-family: var(--foa-serif); font-size: .95rem; color: #fff; }
.portal-menu { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--foa-border); border-radius: var(--foa-radius-sm); background: var(--foa-white); cursor: pointer; flex-shrink: 0; }
.portal-menu svg { width: 22px; height: 22px; stroke: var(--foa-pine); fill: none; stroke-width: 2; stroke-linecap: round; }
.nav-scrim { display: none; }
.portal-chev { color: var(--foa-muted); display: inline-flex; }
.portal-chev svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.portal-bell.has-new::after { content: ""; position: absolute; top: 1px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--foa-danger); border: 2px solid var(--foa-white); }
.portal-body { flex: 1; min-width: 0; background: var(--foa-bg); }
.portal-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.5rem; background: #fff; border-bottom: 1px solid var(--foa-border); }
.portal-search { display: flex; align-items: center; gap: .6rem; flex: 1; max-width: 480px; background: var(--foa-bg); border-radius: 99px; padding: .55rem 1rem; }
.portal-search svg { width: 18px; height: 18px; stroke: var(--foa-muted); fill: none; stroke-width: 2; }
.portal-search input { border: none; background: none; flex: 1; font-size: .92rem; }
.portal-search input:focus { outline: none; }
.portal-user { display: flex; align-items: center; gap: .8rem; position: relative; }
.portal-userbtn { display: flex; align-items: center; gap: .8rem; background: none; border: 0; padding: .3rem .45rem; margin: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; border-radius: 12px; }
.portal-userbtn:hover { background: #f6f1e7; }
.portal-userbtn:focus-visible { outline: 2px solid var(--foa-gold); outline-offset: 2px; }
.portal-usermenu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: #fff; border: 1px solid var(--foa-border); border-radius: 14px; box-shadow: var(--foa-shadow-md); padding: .45rem; z-index: 60; }
.portal-usermenu a { display: block; padding: .6rem .8rem; border-radius: 9px; color: var(--foa-navy); text-decoration: none; font-weight: 600; font-size: .95rem; }
.portal-usermenu a:hover { background: #f6f1e7; }
.portal-usermenu-sep { height: 1px; background: var(--foa-border); margin: .4rem .2rem; }
.portal-usermenu .logout-form { margin: 0; }
.portal-usermenu-logout { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .6rem .8rem; border-radius: 9px; font: inherit; font-weight: 700; color: var(--foa-danger); cursor: pointer; }
.portal-usermenu-logout:hover { background: #fdf0ef; }
.portal-bell { position: relative; color: var(--foa-navy); }
.portal-bell svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.portal-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--foa-pine); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.portal-uname b { display: block; font-size: .9rem; }
.portal-uname small { font-size: .75rem; color: var(--foa-muted); }
.portal-main { padding: 1.5rem; max-width: 1200px; }

/* ---------- Dashboard ---------- */
.dash-banner { position: relative; overflow: hidden; background: var(--foa-pine-deep); color: #fff; border-radius: 18px; padding: 2.2rem 2.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.dash-banner::before { content: ""; position: absolute; inset: 0; background: url('/assets/img/foa-about-mosque.jpg') right 20% center/cover no-repeat; }
.dash-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(4,23,15,.97) 30%, rgba(7,42,30,.82) 55%, rgba(7,42,30,.25) 100%); }
.dash-banner > * { position: relative; z-index: 1; }
.dash-banner h1 { color: #fff; margin: .15rem 0 .4rem; font-size: 2rem; font-family: var(--foa-serif); }
.dash-hello { font-family: var(--foa-serif); font-size: 1.25rem; color: var(--foa-ink-on-dark); margin: 0; }
.dash-banner .dash-tag { color: var(--foa-ink-on-dark); margin: 0; }
.dash-script { font-family: var(--foa-serif); font-style: italic; text-align: right; color: var(--foa-gold-bright); line-height: 1.7; font-size: 1.05rem; border-bottom: 3px solid var(--foa-gold); padding-bottom: .8rem; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.dash-stat { display: flex; gap: .9rem; align-items: flex-start; }
.dash-stat-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--foa-pine); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-stat-ico svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dash-stat-label { font-size: .82rem; color: var(--foa-muted); }
.dash-stat b { display: block; font-size: 1.7rem; color: var(--foa-navy); margin: .15rem 0 .1rem; font-family: var(--foa-serif); }
.dash-stat .ph-link-sm { text-decoration: underline; text-underline-offset: 3px; }
/* Portal section heads: serif pine, like the mockup. */
.portal-main .sec-head { margin-bottom: 1rem; align-items: center; }
.portal-main .sec-head h2 { font-family: var(--foa-serif); color: var(--foa-pine); font-size: 1.25rem; margin: 0; }
.portal-main .sec-head .link { color: var(--foa-pine); font-size: .88rem; font-weight: 600; text-decoration: none; }
.portal-main .sec-head .link:hover { text-decoration: underline; }
/* Available tests (honest stand-in for the mockup's Upcoming Test). */
.avail-card { padding: .4rem 1.1rem; }
.avail-list { list-style: none; margin: 0; padding: 0; }
.avail-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--foa-border); }
.avail-list li:last-child { border-bottom: none; }
.avail-list b { display: block; color: var(--foa-navy); margin-bottom: .15rem; }
.avail-list p { margin: 0; }
/* Level-1 goal mini card. */
.dash-goal { text-align: left; }
.dash-goal-pct { font-family: var(--foa-serif); font-size: 2rem; color: var(--foa-pine); display: block; margin-bottom: .5rem; }
.dash-goal-bar { height: 10px; background: var(--foa-gold-soft); border-radius: 99px; overflow: hidden; margin: .4rem 0 .8rem; }
.dash-goal-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--foa-pine), var(--foa-green)); border-radius: 99px; }
.dash-goal p { margin: 0 0 .6rem; }
/* Your Progress: donut + subject bars (mockup). */
.dash-prog { display: flex; gap: 1.6rem; align-items: center; }
.prog-donut { flex-shrink: 0; }
.prog-donut svg { width: 140px; height: 140px; display: block; }
.donut-track { fill: none; stroke: var(--foa-gold-soft); stroke-width: 13; }
.donut-fill { fill: none; stroke: var(--foa-pine); stroke-width: 13; stroke-linecap: round; }
.donut-pct { font-family: var(--foa-serif); font-size: 21px; font-weight: 700; fill: var(--foa-pine); }
.donut-lbl { font-size: 11px; fill: var(--foa-muted); }
.prog-bars { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; gap: .65rem; }
.prog-bars li { display: flex; align-items: center; gap: .8rem; }
.pb-name { flex: 0 0 130px; font-size: .85rem; color: var(--foa-navy); }
.pb-bar { flex: 1; height: 9px; background: var(--foa-gold-soft); border-radius: 99px; overflow: hidden; }
.pb-bar span { display: block; height: 100%; background: var(--foa-pine); border-radius: 99px; }
.pb-pct { flex: 0 0 44px; text-align: right; font-size: .85rem; font-weight: 600; color: var(--foa-navy); font-variant-numeric: tabular-nums; }
/* Quick links (honest: real support pages only). */
.quick-card { display: grid; gap: .4rem; padding: .6rem 1.1rem; }
.quick-link { display: flex; align-items: center; gap: .9rem; padding: .7rem 0; text-decoration: none; color: var(--foa-navy); font-weight: 600; border-bottom: 1px solid var(--foa-border); }
.quick-link:last-child { border-bottom: none; }
.quick-link .dash-stat-ico { width: 42px; height: 42px; border-radius: 12px; }
.quick-link .dash-stat-ico svg { width: 22px; height: 22px; }
.quick-link:hover { color: var(--foa-pine); }
.dash-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.dash-qa { display: flex; gap: .8rem; align-items: center; text-decoration: none; color: inherit; }
.dash-qa > span:last-child { margin-left: auto; color: var(--foa-muted); }
.dash-qa b { display: block; margin-bottom: .15rem; }
.dash-qa p { margin: 0; }
.dash-duo { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; }
.dash-note { margin-bottom: .8rem; }
.dash-note h3 { margin: 0 0 .3rem; font-size: 1rem; }
@media (max-width: 1000px) {
  .portal-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; height: 100dvh; transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--foa-shadow-lg); }
  body.nav-open .portal-sidebar { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(4, 23, 15, .55); }
  .portal-menu { display: inline-flex; }
  .dash-stats, .dash-quick { grid-template-columns: repeat(2, 1fr); }
  .dash-duo { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dash-stats, .dash-quick { grid-template-columns: 1fr; }
  .dash-banner { flex-direction: column; align-items: flex-start; padding: 1.6rem; }
  .dash-banner::before { background-position: center 30%; }
  .dash-script { text-align: left; font-size: .95rem; }
  .dash-prog { flex-direction: column; align-items: stretch; }
  .pb-name { flex-basis: 110px; }
  .portal-topbar { flex-wrap: wrap; }
  .portal-search { order: 3; flex-basis: 100%; max-width: none; }
}

/* ---------- Part A: per-question timer ring ---------- */
.quiz-qtimer { position: relative; width: 64px; height: 64px; margin: 1.2rem auto 0; }
.quiz-qtimer svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.quiz-qtimer .qtrack { fill: none; stroke: #eee5d3; stroke-width: 3.5; }
.quiz-qtimer .qfill { fill: none; stroke: var(--foa-pine); stroke-width: 3.5; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.quiz-qtimer .qfill.low { stroke: #c0392b; }
.quiz-qtimer strong { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .95rem; color: var(--foa-navy); }

/* ---------- Student question-flagging (quality loop) ---------- */
.qflag-btn { margin-top: .6rem; }
.qflag-form { margin-top: .6rem; padding: .8rem; border: 1px dashed var(--foa-gold); border-radius: 8px; background: #fffdf8; }
.qflag-form select, .qflag-form textarea { width: 100%; margin-bottom: .5rem; padding: .45rem .6rem; border: 1px solid #d8cdb8; border-radius: 6px; font: inherit; }
.qflag-form textarea { resize: vertical; }

/* ---------- AI Quiz Factory console ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
.bar { display: inline-block; width: 100px; height: 8px; background: #eee5d3; border-radius: 4px; overflow: hidden; vertical-align: middle; }
.bar span { display: block; height: 100%; background: var(--foa-pine); }
.check { display: inline-block; margin: .4rem 1rem .4rem 0; }

/* ---------- Articles (2026-10-19) ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.filter-row a { padding: .3rem .8rem; border: 1px solid #d8cdb8; border-radius: 20px; font-size: .85rem; color: var(--foa-navy); text-decoration: none; }
.filter-row a.active, .filter-row a:hover { background: var(--foa-pine); color: #fff; border-color: var(--foa-pine); }
.article-body { font-size: 1.05rem; line-height: 1.75; }
.article-body h2 { margin-top: 1.8rem; }
.article-body h3 { margin-top: 1.4rem; }
.article-body ul, .article-body ol { margin-left: 1.2rem; }
.article-body blockquote { border-left: 3px solid var(--foa-gold); padding-left: 1rem; margin: 1.2rem 0; color: #555; }
.crumbs { font-size: .85rem; color: #777; margin-bottom: .6rem; }
.crumbs a { color: var(--foa-pine); }

/* ---------- The FOA Testing Engine band (test-series, 2026-10-19) ---------- */
.te-band { background: linear-gradient(135deg, var(--foa-pine-deep), var(--foa-pine) 60%); color: #fff; padding: 4rem 0; margin-top: 3rem; }
.te-band .ph-kicker-dark { color: var(--foa-gold); }
.te-band h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 .6rem; }
.te-lede { color: var(--foa-ink-on-dark); font-size: 1.02rem; max-width: 46rem; margin: 0; }
.te-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin: 2rem 0 2.2rem; }
.te-item { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--foa-radius-lg); padding: 1.35rem 1.25rem; }
.te-item svg { display: block; width: 32px; height: 32px; margin: 0 0 .8rem; stroke: var(--foa-gold-bright); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.te-item h3 { color: #fff; font-size: 1rem; margin: 0 0 .35rem; }
.te-item p { color: var(--foa-ink-on-dark); font-size: .87rem; line-height: 1.55; margin: 0; }
.te-note { text-align: center; padding: 1.8rem 1rem 0; }
@media (max-width: 900px) {
  .te-band { padding: 3rem 0; }
  .te-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact page (mockup 1001297444_27): page-scoped ----------
 * NOTE: the site CSP (style-src 'self') blocks inline <style> elements, so
 * contact-page overrides live here, scoped with .contact- prefixes.
 * Theme tokens only — no one-off values. */
.btn svg.btn-ico.ico-first { margin-left: 0; margin-right: .55rem; }
.contact-loc-ico { display: block; width: 30px; height: 30px; margin-bottom: .55rem; stroke: var(--foa-gold); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-loc-head .btn { white-space: nowrap; flex-shrink: 0; }
.contact-faqs details.faq summary { gap: .75rem; justify-content: flex-start; }
.contact-faqs details.faq summary::after { margin-left: auto; }
.contact-faqs details.faq summary::before { content: "Q"; flex-shrink: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--foa-gold); color: var(--foa-pine-deep); font-weight: 800; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; }
.contact-faqs details.faq > p { padding-left: 3.45rem; }
.touch-ico.tt { background: var(--foa-text); }
.contact-social li { gap: .8rem; }
.contact-social li > :first-child { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; }
.contact-social .touch-ico { width: 34px; height: 34px; }
.contact-social .touch-ico svg { width: 18px; height: 18px; }
.contact-social .touch-ico svg.ig-glyph { fill: none; }

/* ---------- Test-series: feature row, duo, sample trio (2026-10-19) ---------- */
.subj-search input { width: 280px; max-width: 100%; padding: .65rem 1rem .65rem 2.4rem; border: 1px solid var(--foa-border); border-radius: 999px; font-size: .88rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") .8rem center/16px no-repeat; }
.feat4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.feat4-hero { background: linear-gradient(135deg, var(--foa-gold), var(--foa-gold-bright)); border: none; }
.feat4-hero h3 { color: var(--foa-pine-deep); }
.feat4-hero p { color: rgba(7, 42, 30, .8); }
.feat4-hero .feat-ico { background: rgba(255, 255, 255, .4); }
.feat-ico { width: 46px; height: 46px; border-radius: 50%; background: var(--foa-gold-soft); display: inline-flex; align-items: center; justify-content: center; margin-bottom: .9rem; }
.feat-ico svg { width: 22px; height: 22px; stroke: var(--foa-gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat4-hero .feat-ico svg { stroke: var(--foa-pine-deep); }
.ts-duo { display: grid; grid-template-columns: 1.65fr 1fr; gap: 1.2rem; margin-top: 2.5rem; }
.progress-panel { background: linear-gradient(135deg, var(--foa-pine-deep), var(--foa-pine)); border-radius: var(--foa-radius-lg); padding: 2rem; color: #fff; display: flex; gap: 2rem; align-items: center; }
.progress-panel h3 { color: #fff; margin: 0 0 .4rem; }
.progress-panel p { color: var(--foa-ink-on-dark); }
.pp-copy { flex: 1.1; }
.pp-copy .btn { margin-top: 1rem; }
.pp-viz { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pp-donut { width: 130px; height: 130px; }
.pp-donut .pp-track { fill: none; stroke: rgba(255, 255, 255, .15); stroke-width: 10; }
.pp-donut .pp-fill { fill: none; stroke: var(--foa-gold-bright); stroke-width: 10; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; }
.pp-donut text { fill: #fff; font-size: 1.35rem; font-weight: 700; text-anchor: middle; }
.pp-cap { font-size: .8rem; color: var(--foa-ink-on-dark); margin: .5rem 0 0; }
.pp-bars { width: 100%; margin-top: .9rem; display: flex; flex-direction: column; gap: .4rem; }
.pp-bar-row { display: grid; grid-template-columns: 64px 1fr 44px; gap: .5rem; align-items: center; font-size: .75rem; color: var(--foa-ink-on-dark); }
.pp-bar-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.pp-bar span { display: block; height: 100%; background: var(--foa-gold-bright); border-radius: 4px; }
.pp-bar-row b { color: #fff; text-align: right; font-weight: 700; }
.pp-empty { color: var(--foa-ink-on-dark); font-size: .9rem; margin: 0; }
.daily-quiz { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: 2rem 1.5rem; }
.daily-quiz h3 { margin: 0; }
.daily-quiz p { margin: 0 0 .8rem; }
.trophy svg { width: 46px; height: 46px; stroke: var(--foa-gold); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sample-trio { display: grid; grid-template-columns: 1fr 1fr .92fr; gap: 1.2rem; margin-top: 1.2rem; }
.sq-title { font-size: 1.05rem; margin: 0 0 .6rem; }
.sq-stem { font-weight: 600; margin: 0 0 1rem; }
.sq-opt { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border: 1px solid var(--foa-border); border-radius: 10px; margin-bottom: .5rem; font-size: .9rem; }
.sq-opt.is-correct { border-color: var(--foa-pine); background: var(--foa-pine-soft); }
.sq-letter { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--foa-border); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.sq-opt.is-correct .sq-letter { background: var(--foa-pine); border-color: var(--foa-pine); color: #fff; }
.sq-tick { margin-left: auto; color: var(--foa-pine); font-weight: 800; }
.exp-answer { display: flex; align-items: center; gap: .5rem; font-size: 1.02rem; }
.exp-tick { width: 26px; height: 26px; border-radius: 50%; background: var(--foa-pine); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; flex-shrink: 0; }
.promo-card { position: relative; border-radius: var(--foa-radius-lg); overflow: hidden; min-height: 340px; border: none; }
.promo-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 42, 30, .15), rgba(7, 42, 30, .9)); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.6rem; }
.promo-quote { font-family: var(--foa-serif); color: #fff; font-size: 1.55rem; line-height: 1.3; margin: 0 0 1.1rem; }
.promo-logo { width: 76px; height: auto; }
@media (max-width: 1000px) {
  .feat4 { grid-template-columns: repeat(2, 1fr); }
  .ts-duo { grid-template-columns: 1fr; }
  .sample-trio { grid-template-columns: 1fr; }
  .promo-card { min-height: 280px; }
}
@media (max-width: 640px) {
  .feat4 { grid-template-columns: 1fr; }
  .progress-panel { flex-direction: column; text-align: center; }
  .subj-search { width: 100%; }
  .subj-search input { width: 100%; }
  .ph-sec-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- Quiz start screen: premium intro card (2026-10-19) ---------- */
.test-intro-card { text-align: center; }
.test-intro-card h1 { margin: .2rem 0 1rem; }
.quiz-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 0 0 1.1rem; }
.quiz-chips span { font-size: .78rem; font-weight: 600; color: var(--foa-pine); background: var(--foa-pine-soft); border: 1px solid var(--foa-border); padding: .32rem .75rem; border-radius: 999px; }
.test-intro-card .btn-lg { margin: .6rem 0 1rem; padding: .85rem 2.6rem; font-size: 1.02rem; }
.test-intro-card .rules { text-align: left; margin-top: 1.5rem; }
.test-intro-card .rules summary { cursor: pointer; font-weight: 600; }
@media (max-width: 640px) {
  .quiz-card { padding: 1.4rem 1.1rem; }
  .quiz-topbar-in { flex-wrap: wrap; }
}

/* ---------- Admin dashboard (reference rebuild 2026-10-21) ----------
 * The admin panel rides the student portal shell (.portal-shell /
 * .portal-sidebar / .portal-topbar); the rules below style only what the
 * admin adds on top: the topbar academy-name block, sidebar group captions,
 * and the dashboard home (banner eyebrow, stat cards, SVG chart panels,
 * quick actions, bottom row). Tokens only — no one-off colors beyond the
 * chart's soft-green line (#7FB69A), which has no token. Panels are .card
 * surfaces, so the dark theme remaps them via var(--foa-white) as usual. */

/* Topbar academy-name block (left of the search pill). */
.adm-brand-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex-shrink: 0; }
.adm-brand-name strong {
  font-size: .92rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--foa-pine); white-space: nowrap;
}
.adm-brand-name small {
  font-size: .62rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--foa-muted); white-space: nowrap;
}

/* Sidebar group captions (the sidebar is dark pine; the old .portal-nav
   group style targets the retired light nav and does not apply here). */
.portal-sidebar .adm-nav-group { padding: .85rem .9rem .3rem; }
.portal-sidebar .adm-nav-group span {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255, 255, 255, .5);
}
/* The admin nav is long (~22 items): let it scroll inside the fixed-height
   sidebar so the brand and the mosque footer stay put. */
.portal-sidebar.admin-nav nav { overflow-y: auto; min-height: 0; }
.portal-sidebar nav a .nav-badge { margin-left: auto; }
/* Bell count pill sits on the bell's corner, not inline. */
.portal-bell .nav-badge {
  position: absolute; top: -.45rem; right: -.6rem; margin-left: 0;
  font-size: .65rem; line-height: 1.5;
}

/* The dashboard is a wide data home; other admin sections share the shell
   and read fine at the same measure. */
#admin-main { max-width: 1480px; }

/* Banner eyebrow (the .dash-banner itself is shared with the student home). */
.adm-eyebrow {
  color: var(--foa-gold); font-size: .78rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; margin: 0 0 .35rem;
}

/* Stat cards. */
.adm-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.adm-stat { display: flex; gap: .85rem; align-items: flex-start; padding: 1.1rem 1.15rem; }
.adm-tile {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.adm-tile svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.adm-tile-pine { background: var(--foa-pine); }
.adm-tile-gold { background: var(--foa-gold); }
.adm-stat-body { min-width: 0; }
.adm-stat-label { display: block; font-size: .8rem; color: var(--foa-muted); }
.adm-stat .num {
  display: block; font-family: var(--foa-serif); font-size: 1.6rem; font-weight: 700;
  color: var(--foa-pine); line-height: 1.2; margin: .15rem 0;
}
html[data-theme="dark"] .adm-stat .num { color: var(--foa-text); }
.adm-delta { font-size: .8rem; margin: 0; }
.adm-delta.up { color: var(--foa-success); }
.adm-delta.down { color: var(--foa-danger); }
.adm-delta.flat { color: var(--foa-muted); }
.adm-sub { font-size: .8rem; color: var(--foa-muted); margin: 0; }
.adm-up { color: var(--foa-success); }
.adm-down { color: var(--foa-danger); }

/* Chart panels. */
.adm-charts { display: grid; grid-template-columns: 2fr 2fr 1.2fr; gap: 1.2rem; margin-bottom: 1.2rem; align-items: start; }
.adm-panel { padding: 1.25rem 1.35rem; }
.adm-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.adm-panel-head h2 { font-size: 1.08rem; margin: 0; }
.adm-panel-head .link { font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.adm-panel-head .link:hover { text-decoration: underline; }
.adm-chart svg { width: 100%; height: auto; display: block; }
.adm-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: .6rem; font-size: .8rem; color: var(--foa-muted); }
.adm-legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .4rem; }
.adm-dot-pine { background: var(--foa-pine); }
.adm-dot-soft { background: #7FB69A; }
.adm-rev-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1rem; }
.adm-rev-foot > div { background: var(--foa-cream); border-radius: var(--foa-radius-md); padding: .7rem .8rem; text-align: center; }
.adm-rev-foot b { display: block; font-family: var(--foa-serif); font-size: 1.05rem; color: var(--foa-pine); }
html[data-theme="dark"] .adm-rev-foot b { color: var(--foa-text); }
.adm-rev-foot b.adm-up { color: var(--foa-success); }
.adm-rev-foot b.adm-down { color: var(--foa-danger); }
.adm-rev-foot span { font-size: .78rem; color: var(--foa-muted); }
.adm-panel-foot { margin-top: .9rem; }
.adm-panel-foot .link { font-size: .88rem; font-weight: 600; text-decoration: none; }
.adm-panel-foot .link:hover { text-decoration: underline; }

/* System status rows. */
.adm-sysrow { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--foa-border); font-size: .9rem; }
.adm-sysrow:last-of-type { border-bottom: 0; }
.adm-sysrow .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.adm-sysrow .dot.ok { background: var(--foa-success); }
.adm-sysrow .dot.bad { background: var(--foa-danger); }
.adm-sys-detail { margin-left: auto; color: var(--foa-muted); font-size: .82rem; text-align: right; }

/* Quick actions. */
.adm-actions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.adm-action {
  display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem;
  text-decoration: none; color: var(--foa-text); font-weight: 600; font-size: .92rem;
}
.adm-action:hover { border-color: var(--foa-gold); }
.adm-action-ico {
  width: 38px; height: 38px; border-radius: 10px; background: var(--foa-pine); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.adm-action-ico svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Bottom row: registrations | activity | subjects. */
.adm-bottom { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.2rem; align-items: start; }
.adm-act { list-style: none; margin: 0; padding: 0; }
.adm-act-row { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem 0; border-bottom: 1px solid var(--foa-border); }
.adm-act-row:last-child { border-bottom: 0; }
.adm-act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--foa-gold); margin-top: .45rem; flex-shrink: 0; }
.adm-act-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-act-title { font-size: .9rem; font-weight: 600; }
.adm-act-time { font-size: .78rem; white-space: nowrap; }
.adm-subj { margin-bottom: .85rem; }
.adm-subj:last-child { margin-bottom: 0; }
.adm-subj-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; margin-bottom: .35rem; }
.adm-bar { height: 9px; background: var(--foa-gold-soft); border-radius: 99px; overflow: hidden; }
.adm-bar span { display: block; height: 100%; background: var(--foa-pine); border-radius: 99px; }

@media (max-width: 1250px) {
  .adm-stats { grid-template-columns: repeat(3, 1fr); }
  .adm-actions { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .adm-charts, .adm-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .adm-stats { grid-template-columns: repeat(2, 1fr); }
  .adm-brand-name small { display: none; }
}
@media (max-width: 560px) {
  .adm-stats { grid-template-columns: 1fr; }
  .adm-actions { grid-template-columns: repeat(2, 1fr); }
  .adm-brand-name strong { font-size: .8rem; white-space: normal; }
}

/* ---------- Page background plates + homepage alignment (2026-10-21) ---------- */
/* Clean image-only plates in assets/img/bg/, matched to his reference set.
   The shared .ph-hero-bg gradient overlay keeps headline legibility. */
.ph-hero-bg--home { background-image: url('/assets/img/bg/bg-home.jpg'); background-position: center 38%; }
.ph-hero-bg--about { background-image: url('/assets/img/bg/bg-about.jpg'); background-position: center 32%; }
.ph-hero-bg--courses { background-image: url('/assets/img/bg/bg-courses.jpg'); background-position: center 40%; }
.ph-hero-bg--practice { background-image: url('/assets/img/bg/bg-practice.jpg'); background-position: center 38%; }
.ph-hero-bg--faculty { background-image: url('/assets/img/bg/bg-faculty.jpg'); background-position: center 42%; }
.ph-hero-bg--scholarships { background-image: url('/assets/img/bg/bg-scholarships.jpg'); background-position: center 36%; }
.ph-hero-bg--resources { background-image: url('/assets/img/bg/bg-resources.jpg'); background-position: center 45%; }
.ph-hero-bg--contact { background-image: url('/assets/img/bg/bg-contact.jpg'); background-position: center 40%; }
.ph-hero-bg--join { background-image: url('/assets/img/bg/bg-join.jpg'); background-position: center 38%; }
.ph-hero-bg--login { background-image: url('/assets/img/bg/bg-login.jpg'); background-position: center 35%; }
/* Live-quiz backdrop: soft desk scene behind the question card. */
.quiz-body { background: linear-gradient(rgba(244,235,221,.93), rgba(244,235,221,.965)), url('/assets/img/bg/bg-quiz.jpg') center/cover no-repeat; }
/* Dashboard welcome banners (student + admin share .dash-banner). */
.dash-banner::before { background-image: url('/assets/img/bg/bg-dashboard.jpg'); }
/* Header per the full-frame homepage reference: gold-outlined login. */
.nav-cta .btn-outline { border-color: var(--foa-gold); color: var(--foa-navy); }
/* Utility bar: gold item icons + social slot. */
.topbar-links a { display: inline-flex; align-items: center; gap: .45rem; }
.topbar-links svg { width: 14px; height: 14px; stroke: var(--foa-gold); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.topbar-social { display: inline-flex; align-items: center; gap: .6rem; margin-left: .9rem; }
.topbar-social a { color: var(--foa-gold); display: inline-flex; }
.topbar-social svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar-social a:hover { color: #fff; }

/* ---------- Admin: students counts, fees sub-nav, expenses & P&L (2026-10-21) ---------- */
.adm-counts { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0 0 1rem; }
.adm-count { border: 1px solid var(--foa-border); border-radius: var(--foa-radius-md); padding: .7rem 1rem; min-width: 150px; display: flex; flex-direction: column; gap: .15rem; }
.adm-count b { font-size: 1.35rem; line-height: 1.1; color: var(--foa-text); }
.adm-count span { font-size: .8rem; color: var(--foa-muted); }
.adm-subnav { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 2px solid var(--foa-border); margin-bottom: 1rem; }
.adm-subnav-btn { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: .55rem .9rem; font: inherit; font-weight: 600; color: var(--foa-muted); cursor: pointer; }
.adm-subnav-btn:hover { color: var(--foa-text); }
.adm-subnav-btn[aria-current] { color: var(--foa-text); border-bottom-color: var(--foa-gold); }
.adm-pl-cards { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0 0 .6rem; }
.adm-pl-card { border: 1px solid var(--foa-border); border-radius: var(--foa-radius-md); padding: .8rem 1.1rem; min-width: 170px; display: flex; flex-direction: column; gap: .2rem; }
.adm-pl-card span { font-size: .8rem; color: var(--foa-muted); }
.adm-pl-card b { font-size: 1.25rem; color: var(--foa-text); }
.neg { color: var(--foa-danger); font-weight: 600; }
.adm-del-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .8rem 0; }
.adm-kept, .adm-wiped { border: 1px solid var(--foa-border); border-radius: var(--foa-radius-md); padding: .7rem .9rem; }
.adm-kept h3, .adm-wiped h3 { margin: 0 0 .35rem; font-size: .95rem; }
.adm-kept { border-top: 3px solid var(--foa-pine); }
.adm-wiped { border-top: 3px solid var(--foa-danger); }
@media (max-width: 560px) { .adm-del-cols { grid-template-columns: 1fr; } }
