/* FJES styles */
:root {
  --marine-700: #0a3d62; /* marine blue */
  --marine-800: #072f4d;
  --marine-900: #05243c;
  /* Shift text palette from near-black to deep marine hues */
  --text-900: #132b42;
  --text-700: #1e3c55;
  --text-600: #3a5670;
  --text-400: #59748a;
  --bg: #ffffff; /* main background white */
  --muted: #f5f7fb;
  --muted-2: #fafbfe;
  --border: #e6e8ee;
  --focus: var(--marine-700);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --font-scale: 1; /* accessibility font scale */
  --header-h: 70px; /* measured at runtime; fallback */

  /* Gold gradient (higher contrast on white) */
  --gold-1: #7a5600;
  --gold-2: #c79a0a;
  --gold-3: #e6c64a;
  --gold-4: #a87500;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* font scaling removed */
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-900);
  background: var(--bg);
  line-height: 1.6;
}
body.has-fixed-header { padding-top: var(--header-h, 120px); }
img { max-width: 100%; height: auto; display: block; }

.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; }

.container { width: min(1440px, 96%); margin-inline: auto; }

/* Announcement ribbon */
.announcement-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1200; background: linear-gradient(90deg, #0a3d62, #3b4da9 55%, #6a2fbf); color: #fff; font-weight: 600; font-size: 14px; line-height: 1.3; font-family: 'Montserrat', system-ui, sans-serif; letter-spacing: .3px; }
.announcement-bar__inner { width: min(1440px, 96%); margin-inline: auto; padding: 4px 0 5px; display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; }
.announcement-bar a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.announcement-bar a:hover { opacity: .9; }


/* Header */
.site-header { position: fixed; top: var(--ann-h, 0px); left: 0; right: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 6px 14px -8px rgba(10,61,98,0.15), 0 1px 0 rgba(0,0,0,0.04); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 16px; pointer-events: none; background: linear-gradient(to bottom, rgba(10,61,98,0.12), rgba(10,61,98,0.08) 45%, rgba(10,61,98,0)); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; flex-wrap: nowrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: 0 0 auto; min-width: 0; }
.brand__logo { width: clamp(32px, 3.2vw, 44px); height: clamp(32px, 3.2vw, 44px); object-fit: contain; box-shadow: 0 0 0 2px rgba(212,175,55,0.35); border-radius: 8px; background: #fff; }
.brand__title { font-weight: 800; letter-spacing: 0.2px; background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 45%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 1px 0 rgba(0,0,0,0.06); font-size: clamp(14px, 1.4vw, 18px); white-space: nowrap; }
.brand__tag { font-size: clamp(10px, 1vw, 12px); color: var(--text-600); display: block; margin-top: 2px; white-space: nowrap; }

/* Header nav and actions */
.nav-toggle { display: none; border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 10px; }
.nav-toggle__bar { width: 22px; height: 2px; background: var(--marine-700); display: block; box-shadow: 0 6px 0 var(--marine-700), 0 -6px 0 var(--marine-700); }
.nav-toggle { transition: transform 220ms ease; transform-origin: 50% 50%; }
.nav-toggle.open { transform: rotate(-90deg); }

.primary-nav { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 20px); flex: 1 1 auto; min-width: 0; }
.primary-nav ul { display: flex; gap: clamp(8px, 1.2vw, 16px); list-style: none; margin: 0; padding: 0; align-items: center; flex-wrap: nowrap; min-width: 0; }
.primary-nav > ul > li > a { text-decoration: none; color: var(--text-700); font-weight: 800; padding: clamp(6px, 0.7vw, 8px) clamp(8px, 0.9vw, 10px); border-radius: 8px; border: 1px solid transparent; line-height: 1.2; font-size: clamp(11px, 1.0vw, 14px); text-transform: uppercase; letter-spacing: .2px; white-space: nowrap; flex: 0 1 auto; }
.primary-nav a:visited { color: var(--marine-800); }
.primary-nav a:hover { background: var(--muted); }
/* Hide auth items in the tabs on larger screens to avoid duplication */
.primary-nav .nav-auth { display: none; }
/* Dropdown */
.dropdown { position: relative; }
.nav-admin { display: inline-block; }
.header-actions .nav-admin { margin-right: 8px; }
.dropdown__toggle { background: #fff; border: 1px solid var(--border); padding: clamp(6px, 0.7vw, 8px) clamp(8px, 0.9vw, 10px); border-radius: 8px; font-weight: 800; cursor: pointer; font-family: inherit; color: var(--text-700); line-height: 1.2; font-size: clamp(11px, 1.0vw, 14px); display: inline-flex; align-items: center; text-transform: uppercase; letter-spacing: .2px; white-space: nowrap; }
.dropdown__toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dropdown__menu { list-style: none; margin: 8px 0 0; padding: 4px 0; position: absolute; top: 100%; left: 0; width: min(280px, 92vw); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 20px -4px rgba(10,61,98,0.18), 0 4px 10px rgba(0,0,0,0.06); z-index: 1300; opacity: 0; transform: translateY(6px) scale(.98); pointer-events: none; transition: opacity 160ms ease, transform 230ms cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; display: flex; flex-direction: column; }
.dropdown__menu li { display: block; margin: 0; padding: 0; width: 100%; flex: none; }
.dropdown__menu li a { display: block; padding: 8px 16px; text-decoration: none; color: var(--marine-800); font-weight: 600; font-size: 14px; line-height: 1.3; width: 100%; box-sizing: border-box; text-align: left; text-transform: none; letter-spacing: 0; }
.dropdown__menu li a:hover { background: var(--muted); }
.dropdown.open > .dropdown__menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .dropdown__menu { transition: none; transform: none; } }

.header-inner { position: relative; }
.header-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; flex: 0 0 auto; }
/* admin dropdown uses regular button styles; no overrides */
.header-user { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text-700); font-weight: 700; font-size: 12px; }
.header-user__dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 2px #fff inset; }
.btn--login { background: #fff; color: var(--text-700); border: 1px solid var(--border); text-transform: uppercase; letter-spacing: .2px; font-weight: 800; }
.btn--login:hover { background: var(--muted); }
.btn--register { background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 50%, var(--gold-3)); color: var(--marine-900); border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 3px 10px rgba(0,0,0,0.08); text-transform: uppercase; letter-spacing: .2px; font-weight: 800; }
.btn--register:hover { filter: brightness(1.05); }

/* Accessibility button & panel */
/* a11y panel removed */

/* Layout: content + right sidebar for ads */
.content-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.main { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--header-h, 70px) + 20px); height: fit-content; }

/* Prevent fixed header/announcement overlap with first content */
main { padding-top: clamp(0px, 4vh, 40px); }
/* make a persistent ad rail that follows scroll on wider screens */
/* Sidebar remains sticky within layout so it stays visible but never overlaps the footer */

.ad-stack { display: grid; gap: 16px; }
.ad-box { border: 1px dashed rgba(10,61,98,0.4); background: #fff; border-radius: 12px; box-shadow: var(--shadow); aspect-ratio: 1 / 2; /* ~300x600 default placeholder */ display: grid; place-items: center; position: relative; overflow: hidden; }
.ad-box--vh { aspect-ratio: auto; height: calc(100vh - var(--header-h,70px) - 20px); min-height: 480px; width: 100%; display: flex; flex-direction: column; justify-content: center; padding: 16px; }
.ad-box--vh .ad-box__size { font-size: 18px; }
.ad-box--small { aspect-ratio: 6 / 5; /* ~300x250 */ }
.ad-box__label { position: absolute; top: 8px; left: 8px; font-size: 10px; letter-spacing: 0.8px; font-weight: 700; color: var(--text-400); }
.ad-box__size { color: var(--text-400); font-weight: 700; }

/* Sections */
.section { padding: 42px 0; }
.hero { padding-top: 56px; }
.hero__art { min-height: 120px; background: radial-gradient(120px 60px at 20% 30%, rgba(212,175,55,0.25), transparent 60%), radial-gradient(120px 80px at 70% 60%, rgba(10,61,98,0.15), transparent 60%); border-radius: 16px; }
/* Landing hero variant */
.hero--landing { padding: 96px 0 84px; background: linear-gradient(180deg, rgba(10,61,98,0.04), rgba(10,61,98,0) 35%); min-height: 52vh; }
.hero--landing .hero__content { max-width: 920px; }
.hero--landing .lead { max-width: 860px; font-size: clamp(18px, 2.4vw, 22px); }
/* Hero media layout */
.hero__layout { display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 1100px) {
  .hero__layout { flex-direction: row; align-items: flex-start; }
  .hero__body { flex: 1 1 0; }
  .hero__media { flex: 0 0 320px; }
}
.hero__media { position: relative; }
.hero__media img { width: 100%; height: auto; border-radius: 24px; box-shadow: 0 8px 28px -6px rgba(10,61,98,0.25), 0 4px 12px rgba(0,0,0,0.08); object-fit: cover; }
.hero__media figcaption { font-size: 12px; color: var(--text-400); margin-top: 6px; text-align: center; }
.section--alt { background: var(--muted-2); }
.section--vm { background: #fff; padding: 56px 0; }
.vm { text-align: center; max-width: 980px; }
.vm__title { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 10px; }
.vm__bar { margin: 0 auto 16px; width: 140px; height: 4px; background: linear-gradient(90deg, var(--marine-700), var(--gold-2)); border-radius: 999px; }
.vm__statements { display: grid; gap: 12px; }
.vm__statement { font-size: clamp(16px, 2.2vw, 22px); font-weight: 700; color: var(--marine-800); margin: 0; }
.section--final { padding: 36px 0 48px; }
.section__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section__header--wrap { flex-wrap: wrap; }
.section__title { margin: 0; font-size: 24px; overflow-wrap: anywhere; }
.section__bar { height: 4px; width: 120px; background: linear-gradient(90deg, var(--marine-700), var(--gold-2) 55%, var(--gold-3)); border-radius: 999px; }
.subhead { margin: 18px 0 8px; font-size: 18px; color: var(--marine-800); }
/* add breathing room when a grid follows a section header */
.section__header + .grid { margin-top: 8px; }

/* Subpage tabs (Support: Donate/Collaborate/Sponsor) */
.subnav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.subnav--tabs a { text-decoration: none; color: var(--text-700); font-weight: 800; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 13px; letter-spacing: .2px; }
.subnav--tabs a:hover { background: var(--muted); }
.subnav--tabs a[aria-current="page"] { background: var(--marine-700); color: #fff; border-color: var(--marine-700); }

/* Serif gravitas */
.lead { font-style: italic; }

/* Display font accents */
.display-accent, .highlight-card__eyebrow, .pill, .ad-box__label { font-family: 'Special Gothic Expanded One', system-ui, sans-serif; letter-spacing: .2px; }
/* Headings use Special Gothic Expanded One */
h1, h2, h3, .section__title { font-family: 'Special Gothic Expanded One', system-ui, sans-serif; letter-spacing: .2px; }
/* Utility to force display font when needed */
.serif { font-family: 'Special Gothic Expanded One', system-ui, sans-serif; }

/* Typography */
.hero__title { font-size: clamp(28px, 4.2vw, 52px); line-height: 1.12; margin: 0; }
@media (max-width: 1366px) {
  .hero__title { line-height: 1.1; }
}
/* Dark blue static portion of hero title */
.hero__title .hero-static { color: var(--marine-700); }
/* Lock hero title height to avoid layout shift when phrase length changes */
.hero__title--lock-3 { min-height: 3.5lh; margin-bottom: clamp(32px, 3.6vw, 64px); }
@media (max-width: 1920px) {
  .hero__title--lock-3 { min-height: 4lh; margin-bottom: clamp(36px, 4vw, 72px); }
}
@media (max-width: 1600px) {
  .hero__title--lock-3 { min-height: 4.25lh; margin-bottom: clamp(40px, 4.6vw, 80px); }
}
@media (max-width: 1366px) {
  .hero__title--lock-3 { min-height: 4.6lh; margin-bottom: clamp(44px, 5vw, 88px); }
}
.gold-text { background: linear-gradient(90deg, var(--gold-4), var(--gold-2) 30%, var(--gold-3) 55%, var(--gold-2) 80%, var(--gold-1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gold-text { text-shadow: 0 1px 0 rgba(0,0,0,0.06); }
/* Animated blue-purple gradient quote highlight */
.gradient-quote { background: linear-gradient(90deg,#4a3dd9,#6a2fbf,#3b4da9,#0a3d62); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradient-slide 7s linear infinite; font-weight: 700; }
@keyframes gradient-slide { 0% { background-position: 0 50%; } 100% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .gradient-quote { animation: none; background-size: 100% 100%; } }
/* General purpose heading gradient (blue-purple) */
.text-gradient { background: linear-gradient(90deg,#0a3d62,#3b4da9 55%,#6a2fbf); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Rotating phrase inside hero title */
.gold-rotate { display: inline-block; position: relative; white-space: normal; overflow-wrap: anywhere; word-break: break-word; transition: opacity 300ms ease; }
/* Ensure long hero titles wrap nicely */
.hero__title { overflow-wrap: anywhere; word-break: normal; position: relative; z-index: 1; }
.hero__title #headline-rotator { font-size: 0.9em; font-weight: 700; word-break: break-word; }
@media (max-width: 1280px) {
  .hero__title #headline-rotator { font-size: 0.85em; }
}

/* Stricter scaling: shrink headline progressively under desktop widths */
@media (max-width: 1920px) {
  .hero__title { font-size: clamp(26px, 3.2vw, 46px); }
  .hero__title #headline-rotator { font-size: 0.86em; }
}
@media (max-width: 1600px) {
  .hero__title { font-size: clamp(24px, 2.8vw, 40px); }
  .hero__title #headline-rotator { font-size: 0.82em; }
}
@media (max-width: 1366px) {
  .hero__title { font-size: clamp(22px, 2.4vw, 36px); }
  .hero__title #headline-rotator { font-size: 0.8em; }
}
.gold-rotate.fade-out { opacity: 0; }
/* Scroll hint */
.scroll-hint { margin-top: 14px; display: grid; }
.scroll-hint__btn { justify-self: center; }
.scroll-hint__text { font-size: 18px; }
.scroll-hint__arrow { font-size: 20px; }
.scroll-hint__btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--marine-800); font-weight: 700; }
.scroll-hint__btn:hover { text-decoration: underline; }
.scroll-hint__arrow { display: inline-block; transition: transform 200ms ease; }
.scroll-hint__btn:hover .scroll-hint__arrow { transform: translateY(2px); }
/* USP rotator */
.usp-rotator { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; width: fit-content; box-shadow: var(--shadow); margin: 10px 0 16px; }
.usp-rotator__icon { color: var(--gold-2); text-shadow: 0 1px 0 rgba(0,0,0,0.06); }
.usp-rotator__viewport { position: relative; height: 24px; overflow: hidden; display: block; }
.usp-rotator__item { color: var(--marine-800); font-weight: 700; font-size: 16px; white-space: nowrap; position: absolute; inset: 0; transform: translateY(100%); opacity: 0; transition: transform 500ms cubic-bezier(.2,.7,.2,1), opacity 500ms ease; }
.usp-rotator__item.is-active { transform: translateY(0); opacity: 1; }
/* Emphasis utilities */
.u-strong { font-weight: 800; }
.u-underline { text-decoration: underline; text-underline-offset: 3px; }
.u-highlight { background: linear-gradient(transparent 60%, rgba(255, 233, 150, 0.9) 60%); }
/* Cards */
.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }

.highlight-card { border: 1px solid var(--border); border-top: 3px solid var(--marine-700); border-radius: 14px; padding: 16px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.highlight-card__eyebrow { font-size: 12px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--marine-700); font-weight: 700; }

.article-card { border: 1px solid var(--border); border-top: 3px solid var(--marine-700); border-radius: 14px; padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.article-card__meta { color: var(--text-400); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.pill { background: var(--muted); color: var(--marine-800); padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; border: 1px solid rgba(10,61,98,0.35); }
.article-card__title { margin: 0; font-size: 18px; }
.article-card__abstract { color: var(--text-600); margin: 0; }
.article-card__actions { margin-top: auto; display: flex; gap: 10px; align-items: center; }

/* Issue rail (horizontal scroller) */
.issue-rail { position: relative; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; }
.rail-nav { appearance: none; -webkit-appearance: none; border: 1px solid var(--border); background: #fff; border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--marine-800); font-weight: 900; box-shadow: var(--shadow); cursor: pointer; }
.rail-nav:hover { background: var(--muted); }
.rail-nav:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.issue-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 360px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: #fff; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.issue-scroller::-webkit-scrollbar { height: 10px; }
.issue-scroller::-webkit-scrollbar-track { background: var(--muted); border-radius: 6px; }
.issue-scroller::-webkit-scrollbar-thumb { background: var(--text-400); border-radius: 6px; border: 1px solid var(--muted); }
.issue-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border); border-top: 3px solid var(--marine-700); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; scroll-snap-align: start; }
.issue-card__title { font-size: 16px; margin: 0; }

@media (max-width: 720px) {
  .issue-rail { grid-template-columns: 1fr; }
  .rail-nav { display: none; }
}

.person-card { border: 1px solid var(--border); border-top: 3px solid var(--marine-700); border-radius: 14px; padding: 16px; background: #fff; text-align: center; }
.person-card__avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 6px; }
.person-card__name { margin: 6px 0 0; font-size: 18px; }
.person-card__role { margin: 2px 0 8px; color: var(--text-600); font-weight: 700; }
.person-card__bio { margin: 0; color: var(--text-600); }

.step-card { border: 1px solid var(--border); border-top: 3px solid var(--marine-700); border-radius: 14px; padding: 16px; background: #fff; position: relative; }
.step-card__num { position: absolute; top: -12px; left: -12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 50%, var(--gold-3)); box-shadow: 0 3px 6px rgba(0,0,0,0.12); }

/* Buttons & links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 10px 14px; text-decoration: none; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: transform .06s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--xs { padding: 4px 8px; border-radius: 8px; font-size: 12px; line-height: 1.2; }
.btn--sm { padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.btn--gold { color: #333; background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 50%, var(--gold-3)); border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 3px 10px rgba(0,0,0,0.08); text-transform: uppercase; letter-spacing: .2px; font-weight: 800; }
.btn--gold:hover { filter: brightness(1.05); }
.btn--marine { background: var(--marine-700); color: #fff; text-transform: uppercase; letter-spacing: .2px; font-weight: 800; }
.btn--marine:hover { background: var(--marine-800); }
.btn--outline { background: #fff; color: var(--marine-800); border-color: var(--border); text-transform: uppercase; letter-spacing: .2px; font-weight: 800; }
.btn--outline:hover { background: var(--muted); }
.btn--danger { background: #dc2626; color: #fff; text-transform: uppercase; letter-spacing: .2px; font-weight: 800; }
.btn--danger:hover { background: #b91c1c; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row--tight { gap: 6px; }
.btn-column { display: flex; flex-direction: column; gap: 10px; }
.text-link { color: var(--marine-700); text-decoration: none; font-weight: 700; }
.text-link:hover { text-decoration: underline; }
/* CTA row spacing so buttons don't crowd cards below */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: clamp(18px, 2.4vw, 28px) 0 20px; position: relative; z-index: 3; }
@media (max-width: 1366px) {
  .cta-row { margin-top: clamp(24px, 3.4vw, 36px); }
}
@media (max-width: 1600px) {
  .cta-row { margin-top: clamp(28px, 3.8vw, 44px); }
}
@media (max-width: 1920px) {
  .cta-row { margin-top: clamp(24px, 3.2vw, 40px); }
}
/* Stronger, accessible focus states */
.btn:focus { outline: none; }
.btn:focus-visible,
.primary-nav a:focus-visible,
.text-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px) scale(0.98); transition: opacity 600ms ease, transform 700ms cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0) scale(1); }
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }

/* reduced motion: keep native preference only */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  /* Make rotator swap instantly without animation */
  .usp-rotator__viewport { position: relative; display: block; height: 24px; overflow: hidden; }
  .usp-rotator__item { transition: none !important; transform: none !important; opacity: 0; position: absolute; inset: 0; }
  .usp-rotator__item.is-active { opacity: 1; }
}

/* Forms */
.form-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: #fff; max-width: 560px; }
.form-row { display: grid; gap: 6px; margin-bottom: 12px; }
.form-row--check { grid-template-columns: 18px 1fr; align-items: center; gap: 8px; }
label { font-weight: 700; color: var(--text-700); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-family: inherit; }
input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.form-row input[type="file"] { border: 1px solid var(--border); border-radius: 10px; padding: 8px; font-family: inherit; background: #fff; color: var(--text-600); }
/* Modern browsers */
.form-row input[type="file"]::file-selector-button { 
  background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 50%, var(--gold-3));
  color: #2b2b2b; border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  border-radius: 10px; padding: 8px 12px; margin-right: 10px; cursor: pointer;
  font-weight: 800; text-transform: uppercase; letter-spacing: .2px;
}
.form-row input[type="file"]:hover::file-selector-button { filter: brightness(1.05); }
.form-row input[type="file"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* WebKit fallback */
.form-row input[type="file"]::-webkit-file-upload-button { 
  background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 50%, var(--gold-3));
  color: #2b2b2b; border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  border-radius: 10px; padding: 8px 12px; margin-right: 10px; cursor: pointer;
  font-weight: 800; text-transform: uppercase; letter-spacing: .2px;
}
.form-actions { display: flex; gap: 10px; align-items: center; }
.form-msg { margin: 8px 0 0; color: var(--marine-800); font-weight: 600; }
.form-msg--muted { color: var(--text-600); font-weight: 500; }
/* Date input (DOB) theming */
input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  padding-right: 2.2rem; /* space for icon */
  font-family: inherit;
  color: var(--text-900);
}
input[type="date"]:hover { border-color: rgba(10,61,98,0.35); }
input[type="date"]:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(18%) sepia(18%) saturate(1406%) hue-rotate(165deg) brightness(92%) contrast(90%); }
/* OAuth buttons */
.social-login { display: grid; gap: 10px; margin-bottom: 12px; }
.btn--oauth { background: #fff; color: var(--text-900); border: 1px solid var(--border); justify-content: start; }
.btn--oauth:hover { background: var(--muted); }
.btn--google svg { margin-right: 8px; }
.btn--microsoft svg { margin-right: 8px; }
.auth-divider { display: grid; place-items: center; color: var(--text-400); margin: 8px 0 12px; position: relative; }
.auth-divider::before, .auth-divider::after { content: ""; position: absolute; height: 1px; background: var(--border); width: 45%; top: 50%; }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-divider span { background: #fff; padding: 0 8px; z-index: 1; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #fff; }
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.footer__brand img { width: 28px; height: 28px; object-fit: contain; }
.footer__brand span { background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 45%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 1px 0 rgba(0,0,0,0.06); }
.footer__links { display: flex; gap: 14px; list-style: none; padding: 0; margin: 0; }
.footer__links a { text-decoration: none; color: var(--marine-800); font-weight: 600; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; color: var(--text-600); font-size: 14px; border-top: 1px solid var(--border); }

/* Responsive */
@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr 280px; }
}
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer__top { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .nav-toggle { display: inline-grid; position: absolute; right: 12px; top: 12px; z-index: 1101; }
  .brand { margin-left: 0; }
  /* Full-screen mobile menu overlay */
  .primary-nav { position: fixed; inset: 0; background: #fff; padding: calc(var(--header-h, 70px) + 10px) 20px 20px; display: none; flex-direction: column; gap: 16px; z-index: 1100; overflow-y: auto; }
  .primary-nav.open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 14px; }
  .header-actions { display: none; }
  /* Auth links inside hamburger */
  .primary-nav .nav-auth { display: block; }
  .primary-nav .nav-auth a { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-weight: 700; }
  .primary-nav .nav-auth--login a { background: #fff; color: var(--marine-800); }
  .primary-nav .nav-auth--register a { background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 50%, var(--gold-3)); color: #2b2b2b; }
}

/* Earlier hamburger fallback to prevent nav overlap on medium laptops (incl. MacBooks) */
@media (max-width: 1280px) and (min-width: 721px) {
  .nav-toggle { display: inline-grid; position: absolute; right: 12px; top: 12px; z-index: 1101; }
  .primary-nav { position: fixed; inset: 0; background: #fff; padding: calc(var(--header-h, 70px) + 10px) 20px 20px; display: none; flex-direction: column; gap: 16px; z-index: 1100; overflow-y: auto; }
  .primary-nav.open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 14px; }
  .header-actions { display: none; }
  .primary-nav .nav-auth { display: block; }
  .primary-nav .nav-auth a { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-weight: 700; }
}

/* Active tab styling: gold text (no box) */
.primary-nav a[aria-current="page"] {
  background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 45%, var(--gold-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  border-color: transparent; box-shadow: none;
}
/* Press/click feedback: momentary gold text */
.primary-nav a:active {
  background: linear-gradient(135deg, var(--gold-4), var(--gold-2) 45%, var(--gold-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* dark theme removed */

/* Submission portal */
.portal-card { border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.portal-card__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.portal-user__name { font-weight: 800; color: var(--marine-800); }
.portal-user__meta { color: var(--text-600); font-size: 14px; }
.portal-actions { display: flex; gap: 10px; }
.portal-filters { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.portal-count { margin-left: auto; color: var(--text-600); font-weight: 700; }
.portal-form { margin: 14px 16px; }
.table-wrap { padding: 12px 16px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--text-400) var(--muted); }
.table-wrap::-webkit-scrollbar { height: 12px; }
.table-wrap::-webkit-scrollbar-track { background: var(--muted); border-radius: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--text-400); border-radius: 6px; border: 1px solid var(--muted); }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--marine-700); }
.table { width: 100%; min-width: 1200px; border-collapse: collapse; background: #fff; }
.table th, .table td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; white-space: nowrap; }
.table thead th { background: var(--muted-2); color: var(--marine-800); font-weight: 800; }
.table tbody tr:nth-child(even) td { background: #fff; }
.table tbody tr:hover td { background: var(--muted); }
.table td:nth-child(1) { width: 110px; }
.table td:nth-child(3) { white-space: nowrap; }
.table td:nth-child(8) { color: #7a263a; }
.table td:last-child { width: 230px; white-space: nowrap; }

@media (max-width: 900px) {
  .table { min-width: 900px; }
  .table th, .table td { white-space: nowrap; }
}

/* Simple badges for table statuses */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 800; font-size: 12px; color: var(--marine-800); background: var(--muted); border: 1px solid rgba(10,61,98,0.22); }
.badge--warn { color: #7a4a00; background: #fff7e6; border-color: #f0c36c; }
.badge--danger { color: #7a263a; background: #ffe8ee; border-color: #f3a8b9; }

/* Generic card used on admin/editor pages */
.card { border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); padding: 20px; }
.stack-md > * + * { margin-top: 12px; }
.stack-sm > * + * { margin-top: 16px; }

/* Enhanced Definition Lists */
.definition {
  margin: 0;
  border: 1px solid var(--color-border-light, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
}

.definition__row {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

.definition__row:last-child {
  border-bottom: none;
}

.definition__row:nth-child(even) {
  background: #f9fafb;
}

.definition dt {
  font-weight: 600;
  color: var(--color-text-secondary, #6b7280);
  width: 140px;
  flex-shrink: 0;
  font-size: 14px;
}

.definition dd {
  margin: 0;
  color: var(--color-text, #1f2937);
  font-size: 14px;
  flex-grow: 1;
}

/* Enhanced Form Styles */
.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-700);
  font-size: 14px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--marine-600);
  box-shadow: 0 0 0 3px rgba(26, 86, 128, 0.1);
}

.form-row textarea {
  resize: vertical;
  min-height: 80px;
}

/* Button Row */
.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Stats Grid for Sidebar */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.stat-item {
  text-align: center;
  padding: 8px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.stat-number {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--marine-800);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-600);
  margin-top: 2px;
  font-weight: 500;
}

/* Submissions List for Editor/Reviewer */
.submissions-list {
  display: grid;
  gap: 12px;
  max-height: 400px; /* Limit height to about 3 submissions */
  overflow-y: auto; /* Add vertical scroll when needed */
  scroll-behavior: smooth;
  padding-right: 4px; /* Add space for scrollbar */
}

/* Custom scrollbar styling for submissions list */
.submissions-list::-webkit-scrollbar {
  width: 6px;
}

.submissions-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.submissions-list::-webkit-scrollbar-thumb {
  background: var(--marine-700);
  border-radius: 3px;
}

.submissions-list::-webkit-scrollbar-thumb:hover {
  background: var(--marine-800);
}

/* Add subtle fade effect to indicate scrollable content */
.submissions-list::before,
.submissions-list::after {
  content: '';
  position: sticky;
  left: 0;
  right: 0;
  height: 8px;
  pointer-events: none;
  z-index: 1;
}

.submissions-list::before {
  top: 0;
  background: linear-gradient(to bottom, #f8fafc, transparent);
  margin-bottom: -8px;
}

.submissions-list::after {
  bottom: 0;
  background: linear-gradient(to top, #f8fafc, transparent);
  margin-top: -8px;
}

.submission-item {
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submission-item:hover {
  border-color: var(--marine-600);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.submission-item.active {
  border-color: var(--marine-600);
  background: #f0f7ff;
  box-shadow: 0 2px 8px rgba(26, 86, 128, 0.15);
}

.submission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.submission-id {
  font-weight: 700;
  color: var(--marine-800);
  font-size: 14px;
  font-family: monospace;
}

.submission-item h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-900);
  line-height: 1.3;
}

.submission-meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-600);
  line-height: 1.4;
}

/* Grid Improvements */
.grid--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid--3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

/* Drag & drop */
.file-drop { margin-top: 8px; border: 2px dashed rgba(10,61,98,0.35); border-radius: 12px; padding: 14px; display: grid; place-items: center; color: var(--text-600); background: #fff; transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.file-drop:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.file-drop.drag-over { background: var(--muted); border-color: var(--marine-700); box-shadow: 0 0 0 3px rgba(10,61,98,0.1) inset; }
.file-drop__text { font-weight: 700; }
