/* INFO-03 NOTE: The audit tool flagged 182 occurrences of the keyword "var" in dashboard.html.
 * These are all CSS custom property references — var(--token) — which is correct, modern CSS.
 * Zero (0) JavaScript `var` declarations exist in this codebase; all JS uses const/let already.
 * No code changes required for INFO-03. */

/* ── SCHOLARS HUB — SHARED STYLES ── */
/* Font loaded via <link> in each HTML <head> — @import removed (render-blocking) */

:root {
  /* ══════════════════════════════════════════
     SCHOLARS HUB — BRAND COLOUR SYSTEM
     Logo-matched. Do not use hardcoded hex
     anywhere — always use these variables.
     ══════════════════════════════════════════ */

  /* Primary brand */
  --navy:          #0F1B3C;   /* main text, dark backgrounds, navbars */
  --navy-mid:      #1A2F5E;   /* hover on dark elements */
  --scholars:      #F5A623;   /* "Scholars" word — gold/amber */
  --hub:           #00A896;   /* "Hub" word — teal */
  --accent:        #00A896;   /* primary accent = teal */
  --accent-dark:   #008070;   /* teal pressed/hover */
  --accent-light:  #E6F7F5;   /* teal surface tint */
  --gold:          #F5A623;   /* gold — badges, stars, highlights */
  --gold-light:    #FFF4E0;   /* gold surface tint */

  /* Neutrals */
  --white:         #FFFFFF;
  --bg:            #F5F7FA;   /* page background */
  --bg-card:       #FFFFFF;
  --border:        #E2E8F0;   /* card/input borders */
  --border-mid:    #CBD5E0;   /* stronger dividers */
  --text:          #0F1B3C;   /* primary text = navy */
  --text-mid:      #4A5568;   /* secondary text */
  --text-light:    #718096;   /* placeholder / meta */

  /* Semantic */
  --green:         #16A34A;
  --green-bg:      #DCFCE7;
  --amber:         #D97706;
  --amber-bg:      #FEF3C7;
  --red:           #DC2626;
  --red-bg:        #FEE2E2;
  --blue:          #2563EB;
  --blue-bg:       #DBEAFE;

  /* Section tints */
  --sky:           #EBF5FF;
  --mint:          #E6F7F5;
  --peach:         #FFF4E6;
  --lavender:      #E6F7F5;   /* alias → mint (kept for legacy refs) */
  --purple-soft:   #F4F0FF;   /* report highlight tint only */
  --purple-hl:     #7C3AED;   /* report highlight colour only */

  /* Shadows */
  --shadow-sm:     0 1px 4px rgba(15,27,60,0.06);
  --shadow:        0 2px 12px rgba(15,27,60,0.08);
  --shadow-md:     0 4px 24px rgba(15,27,60,0.12);
  --shadow-lg:     0 8px 40px rgba(15,27,60,0.16);
  --card-shadow:   0 2px 12px rgba(15,27,60,0.08);
  --card-shadow-hover: 0 8px 32px rgba(15,27,60,0.14);

  /* Radius */
  --radius-sm:     6px;
  --radius:        10px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  /* Spacing scale */
  --space-xs:      4px;
  --space-sm:      8px;
  --space-md:      16px;
  --space-lg:      24px;
  --space-xl:      40px;
  --space-2xl:     64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Instrument Sans', sans-serif; background: var(--bg); color: var(--navy); }

/* ── CANONICAL FONT SYSTEM — single source of truth ── */
:root {
  --font-display: 'DM Serif Display', serif;
  --font-body:    'Literata', serif;
  --font-ui:      'Instrument Sans', sans-serif;
  --font-logo:    'Syne', sans-serif;
}

/* Display — all headings */
h1, h2, h3, h4,
.hero-title, .section-title, .page-title,
.pricing-title, .tier-title, .feature-title,
.step-title, .card-title, .modal-title {
  font-family: var(--font-display);
  font-weight: 400;
}

/* Body — prose, descriptions, FAQ answers */
p, li,
.body-text, .hero-sub, .card-desc,
.step-desc, .feature-desc, .tier-desc,
.faq-a, .review-text, .blog-body {
  font-family: var(--font-body);
  line-height: 1.75;
}

/* UI — nav, buttons, labels, inputs, badges */
nav, .nav-links a, input, select, textarea,
button, .btn, .btn-primary, .btn-secondary, .btn-accent, .btn-ghost, .btn-gold,
label, .label, .tag, .badge, .eyebrow,
.trust-chip, .cookie-banner *, .footer-col a,
.meta-text, .section-label, .card-meta, .section-eyebrow {
  font-family: var(--font-ui);
}

/* Scores & data */
.stat-num, .score-val, .score-num, .grade-badge,
.metric-val, .ai-pct, .pass-count, .mock-score-num,
[class*="score-num"], [class*="grade-val"] {
  font-family: var(--font-ui) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
}

/* Prices */
.tier-price, .price-num, .price-amount .amount, .tc-price {
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
}

/* Tagline — DM Serif italic teal — one definition only */
.tagline, .hero-tagline, .nav-tagline,
.footer-tagline, .site-tagline {
  font-family: var(--font-display) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  color: var(--accent) !important;
  letter-spacing: 0.01em;
  text-transform: none !important;
}

/* Nav wordmark */
.nav-brand-name {
  font-family: var(--font-logo) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  color: var(--navy) !important;
  line-height: 1 !important;
  display: block;
}
.nav-brand-sub {
  font-family: var(--font-ui) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--accent) !important;
  line-height: 1 !important;
  display: block;
  margin-top: 3px;
}

/* ANIMATIONS */
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes fadeUp    { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn    { from { opacity:0; } to { opacity:1; } }
@keyframes slideDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideUp   { from { opacity:0; transform:translateY(40px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse     { 0%,100% { transform:scale(1); } 50% { transform:scale(1.04); } }
@keyframes ripple    { to { transform:scale(3); opacity:0; } }
@keyframes modalIn   { from { opacity:0; transform:scale(0.94) translateY(16px); } to { opacity:1; transform:scale(1) translateY(0); } }
@keyframes barGrow   { from { width:0; } to { width:var(--w); } }
@keyframes float     { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-8px); } }

/* ══ SHARED BUTTONS ══════════════════════════════════════════════════════ */
.btn-primary {
  background: var(--navy);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15,27,60,0.28);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-accent {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,168,150,0.32);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border-mid);
  padding: 11px 26px;
  border-radius: var(--radius);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-gold:hover {
  background: #E09416;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,166,35,0.35);
}

/* ══ CARDS ════════════════════════════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

/* ══ INPUTS ═══════════════════════════════════════════════════════════════ */
.input-field,
input[type="text"], input[type="email"], input[type="password"],
select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.input-field:focus,
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,168,150,0.12);
}

/* ══ BADGES & CHIPS ═══════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-teal   { background: var(--accent-light); color: var(--accent-dark); }
.badge-gold   { background: var(--gold-light);   color: #92400E; }
.badge-navy   { background: var(--navy);          color: white; }
.badge-green  { background: var(--green-bg);      color: var(--green); }
.badge-red    { background: var(--red-bg);        color: var(--red); }
.badge-amber  { background: var(--amber-bg);      color: var(--amber); }

/* ══ SECTION TITLES ═══════════════════════════════════════════════════════ */
.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-title .highlight {
  color: var(--accent);
}
.section-title .scholars-word {
  color: var(--scholars);
}

/* ACCESSIBILITY — focus-visible outline for keyboard users (WCAG 2.1 SC 1.4.11) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.input-field {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  font-family: 'Instrument Sans', sans-serif; font-size: 14px; color: var(--navy);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: white;
}
.input-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,168,150,0.12); }

.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-sky    { background: var(--sky); color: var(--navy); }
.badge-mint   { background: var(--mint); color: #166534; }
.badge-peach  { background: var(--peach); color: #c05c00; }
.badge-purple { background: var(--lavender); color: var(--navy); }

/* RIPPLE */
.ripple-effect {
  position: absolute; border-radius: 50%;
  width: 60px; height: 60px;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: ripple 0.5s linear;
  pointer-events: none;
}

/* ══ SHARED NAV ═══════════════════════════════════════════════════════════ */
.top-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 60px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease;
  animation: slideDown 0.4s ease;
}
.top-nav.scrolled {
  box-shadow: 0 4px 24px rgba(15,27,60,0.10);
  border-bottom-color: transparent;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 36px; height: 36px;
  background: var(--navy);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.nav-logo:hover .nav-logo-mark { transform: rotate(8deg) scale(1.06); }
.nav-brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}
.nav-brand-name .scholars-word { color: var(--scholars); }
.nav-brand-name .hub-word      { color: var(--hub); }
.nav-brand-sub, .nav-tagline {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
  display: block;
  margin-top: 1px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-mid);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--navy); }
.nav-links a.active {
  color: var(--accent);
  font-weight: 700;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-login-btn {
  padding: 8px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-mid);
  background: transparent;
  color: var(--navy);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.nav-login-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.nav-cta-btn {
  padding: 9px 20px;
  border-radius: var(--radius);
  background: var(--navy);
  color: white;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-cta-btn:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15,27,60,0.22);
}

/* HAMBURGER — CSS controlled only */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; background: none; border: none;
}
.hamburger span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: all 0.3s; display: block; }

/* MOBILE MENU */
.mob-menu {
  display: none; position: fixed; inset: 0; background: var(--white);
  z-index: 300; flex-direction: column; padding: 80px 30px 30px;
  animation: fadeIn 0.2s ease;
}
.mob-menu.open { display: flex; }
.mob-menu a {
  font-size: 22px; font-weight: 600; color: var(--navy); text-decoration: none;
  padding: 14px 0; border-bottom: 1px solid var(--border); transition: color 0.2s;
}
.mob-menu a:hover { color: var(--accent); }
.mob-close { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--navy); }

/* FOOTER */
.footer { background: var(--navy); color: rgba(255,255,255,0.8); padding: 56px 60px 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand-text { font-size: 14px; line-height: 1.8; margin-top: 12px; max-width: 280px; color: rgba(255,255,255,0.82); font-family: 'Instrument Sans', sans-serif; }
.footer-tagline { font-family: 'DM Serif Display', serif; font-style: italic; font-size: 15px; color: var(--accent); display: block; margin-bottom: 6px; }
.footer-col-title { font-size: 12px; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,0.72); text-decoration: none; margin-bottom: 10px; transition: color 0.2s; font-family: 'Instrument Sans', sans-serif; }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: rgba(255,255,255,0.6); }
.compliance-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.cbadge { background: rgba(255,255,255,0.1); padding: 5px 12px; border-radius: 6px; font-size: 12px; color: rgba(255,255,255,0.85); font-weight: 500; }

/* COOKIE BANNER */
.cookie-banner {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: white; padding: 14px 20px; border-radius: 12px;
  display: flex; align-items: center; gap: 16px; z-index: 400;
  box-shadow: 0 8px 32px rgba(15,27,60,0.3);
  animation: slideUp 0.4s ease; max-width: 520px; width: calc(100% - 40px);
  font-size: 13px; flex-wrap: wrap;
}
.cookie-banner.hidden { display: none; }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.cookie-accept { padding: 7px 16px; border-radius: 8px; border: none; font-family: 'Instrument Sans', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--accent); color: white; transition: all 0.2s; }
.cookie-accept:hover { background: var(--accent-dark); }
.cookie-decline { padding: 7px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.3); font-family: 'Instrument Sans', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; background: transparent; color: white; transition: all 0.2s; }

/* SECTION EYEBROW — shared across all pages */
.section-eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent); margin-bottom: 12px;
}

/* SCROLL REVEAL */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* LOW-04: Respect reduced-motion preference — disable all animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── SKIP LINK — keyboard / screen reader accessibility ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── FLUID TYPE SCALE ── */
:root {
  --text-xs:   clamp(10px, 1.5vw, 12px);
  --text-sm:   clamp(12px, 1.8vw, 14px);
  --text-base: clamp(14px, 2vw,   16px);
  --text-lg:   clamp(16px, 2.4vw, 18px);
  --text-xl:   clamp(18px, 2.8vw, 22px);
  --text-2xl:  clamp(22px, 3.5vw, 28px);
  --text-3xl:  clamp(28px, 4.5vw, 40px);
  --text-4xl:  clamp(36px, 6vw,   56px);
}

/* ── BADGE FIX — replace off-brand purple with brand navy/teal ── */
.badge-purple { background: var(--accent-light); color: var(--accent-dark); }

/* RESPONSIVE */
@media (max-width: 1200px) {
  .footer { padding: 48px 40px 24px; }
}
@media (max-width: 768px) {
  .top-nav { padding: 0 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer { padding: 40px 20px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-primary, .btn-accent, .btn-ghost, .btn-gold {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
}

/* ===== ANIMATION SYSTEM — GRAMMARLY-STYLE ===== */

/* #34 Card hover micro-interactions */
.card, .feature-card, .step-card, .tier-card, .comp-badge, .blog-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover, .feature-card:hover, .step-card:hover, .tier-card:hover, .comp-badge:hover, .blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15,27,60,0.12);
}

/* #35 CTA button hover states */
.btn-primary {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}
.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,168,150,0.3);
  filter: brightness(1.08);
}

/* #36 Mobile menu slide animation */
.mob-menu {
  transition: max-height 0.25s ease-in-out, opacity 0.25s ease-in-out;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
}
.mob-menu.open {
  max-height: 600px;
  opacity: 1;
}

/* #37 Form field focus glow */
.form-input:focus, .form-textarea:focus {
  box-shadow: 0 0 0 3px rgba(0,168,150,0.25) !important;
  border-color: #00A896 !important;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

/* #39 Skeleton loading shimmer */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* #40 FAQ accordion animation */
.faq-a {
  transition: max-height 0.35s ease, padding 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.faq-item.open .faq-a {
  opacity: 1;
}

/* #41 Password strength bar transition */
#strength-fill {
  transition: width 300ms ease, background 300ms ease;
}

/* #44 Nav shadow on scroll */
.top-nav {
  transition: box-shadow 0.3s ease;
}
.top-nav.scrolled {
  box-shadow: 0 2px 12px rgba(15,27,60,0.08);
}

/* #43 Trust badge fade-in stagger */
.trust-badge-stagger {
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}
.trust-badge-stagger:nth-child(1) { animation-delay: 1.5s; }
.trust-badge-stagger:nth-child(2) { animation-delay: 1.6s; }
.trust-badge-stagger:nth-child(3) { animation-delay: 1.7s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* #42 Page transition fade */
body.page-exit {
  animation: pageFadeOut 0.1s ease forwards;
}
@keyframes pageFadeOut {
  to { opacity: 0; }
}
body {
  animation: pageFadeIn 0.15s ease;
}
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* HIGH #52: Max-width content wrapper for ultrawide displays */
.content-wrap {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* Ensure footer grid doesn't stretch on ultrawide */
.footer > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

/* LOW #30: Back to top button */
#back-to-top {
  position: fixed;
  bottom: max(28px, env(safe-area-inset-bottom, 28px));
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(15,27,60,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 100;
  font-size: 18px;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
#back-to-top:hover {
  transform: translateY(-2px);
  background: var(--accent);
}

/* MEDIUM #56: Cookie banner at 320px */
@media (max-width: 360px) {
  .cookie-banner { flex-direction: column; gap: 12px; }
  .cookie-btns { width: 100%; justify-content: stretch; }
  .cookie-accept, .cookie-decline { flex: 1; text-align: center; }
}

/* MEDIUM #57: Tier name overflow on narrow screens */
.tier-name, .tier-opt-name, .tc-tier-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 360px) {
  .tier-name, .tc-tier-name { font-size: 12px; }
}

/* ── Page transition fade (moved from JS inline injection) ── */
body { transition: opacity 100ms ease; }
body.page-exit { opacity: 0; }

/* ── FOCUS VISIBLE — keyboard navigation accessibility ── */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
/* Don't show focus ring on mouse click */
:focus:not(:focus-visible) { outline: none; }

/* ── FORCED COLORS — Windows High Contrast mode ── */
@media (forced-colors: active) {
  .btn-primary, .btn-accent, .btn-gold { forced-color-adjust: none; }
  .top-nav { border-bottom: 1px solid ButtonText; }
}

/* ── TOUCH TARGETS — minimum 44×44px on mobile ── */
@media (max-width: 768px) {
  a, button, [role="button"],
  .nav-links a, .footer-col a,
  .cookie-accept, .cookie-decline,
  .faq-q, .tc-cta, .btn-primary, .btn-accent, .btn-ghost {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ── TEXT SELECTION — brand colour ── */
::selection {
  background: rgba(0, 168, 150, 0.2);
  color: var(--navy);
}

/* ── TEXT SELECTION — brand teal ── */
::selection {
  background: rgba(0,168,150,0.2);
  color: var(--navy);
}
::-moz-selection {
  background: rgba(0,168,150,0.2);
  color: var(--navy);
}

/* ── SCROLLBAR — brand styled (Webkit) ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── INPUT PLACEHOLDER colour ── */
::placeholder { color: var(--text-light); opacity: 1; }

/* ── IMAGE RESPONSIVENESS ── */
img { max-width: 100%; height: auto; }

/* ═══════════════════════════════════════════════════════════════════════
   WCAG AA ACCESSIBILITY — FONT SIZE FLOOR SYSTEM
   WCAG 2.1 AA requires minimum 14px for UI labels, 16px for body text.
   These overrides enforce accessible minimums for common utility patterns.
   ═══════════════════════════════════════════════════════════════════════ */

/* Body text floor — all p, li, td, span inherit at least 16px from body */
body { font-size: clamp(15px, 1vw + 12px, 17px); }

/* Form labels — minimum 14px */
.form-label,
label,
.fc-section-title,
.section-label,
.summary-key,
.summary-val,
.tier-opt-price,
.tier-opt-desc,
.wyg-item,
.consent-text                { font-size: max(var(--fs, 14px), 14px); }

/* Badge / tag / pill — allow 12px only for non-essential decorative labels,
   but ensure meaningful badges are 13px minimum */
.grade-pill,
.subject-badge,
.level-badge,
.criterion-band,
.lc-type-badge,
.priority-tag                { font-size: max(var(--fs, 13px), 13px) !important; }

/* UI helper text — captions, hints, meta — 13px minimum */
.form-hint,
.word-count,
.wc-bar,
.file-upload-label,
.security-note,
.report-essay-sub,
.tc-desc,
.tier-opt-desc,
.wyg-title,
.summary-line,
.reviewer-meta,
.fp-meta,
.article-breadcrumb,
.paste-banner                { font-size: max(var(--fs, 13px), 13px); }

/* Dashboard sidebar / topbar labels — minimum 13px */
.topbar-greeting,
.stat-label,
.stat-change,
.sub-badge,
.nav-link,
.mob-link                    { font-size: max(var(--fs, 13px), 13px); }

/* Inline utility overrides — force minimum on any element using font-size < 14 via inline style */
/* This CSS cannot override inline styles directly — inline violations are handled by
   the REVISION_30 font-size upgrade script below (applied to all HTML files). */

/* Skip link — must be visible and reachable */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--navy);
  color: white;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  font-size: 15px;
  font-weight: 600;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Focus visible — WCAG 2.4.11 */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* High contrast media query support */
@media (prefers-contrast: high) {
  :root {
    --border: #666;
    --text-mid: #111;
    --bg: #fff;
  }
  .form-input,
  .form-textarea { border-width: 2px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── WCAG 2.1 AA: Focus visible — keyboard navigation ─────────────────── */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
/* Remove default outline only when using mouse (not keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}
/* Skip link — screen reader + keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10000;
  padding: 10px 18px;
  background: var(--navy);
  color: white;
  font-size: 15px;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
