/* ==========================================================================
   justBursaries — South African opportunity design system
   ========================================================================== */

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
img, picture, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:root {
  /* Core identity: fynbos green, Highveld gold, warm paper, clear ink. */
  --ink-950: #092927;
  --ink-900: #103a36;
  --ink-800: #194a44;
  --brand-700: #075e4d;
  --brand-600: #08745e;
  --brand-500: #0b8a70;
  --brand-100: #d9eee7;
  --brand-50: #edf7f3;
  --gold-600: #b87800;
  --gold-500: #e6a11b;
  --gold-300: #f5c867;
  --gold-100: #fdf0cf;
  --rust-700: #9d3e26;
  --rust-600: #bd4e2f;
  --rust-100: #fae7df;
  --sky-700: #245a73;
  --sky-100: #dfedf2;

  --paper: #f7f4ec;
  --paper-deep: #eeeadf;
  --surface: #ffffff;
  --surface-soft: #fbfaf6;
  --line: #d8ddd6;
  --line-strong: #bbc6bd;
  --text: #283b38;
  --text-muted: #5f716d;
  --text-soft: #7a8986;
  --white: #ffffff;
  --danger: #a9362c;
  --danger-soft: #fbe9e5;
  --success: #08745e;
  --success-soft: #e2f2ec;
  --warning: #9a6200;
  --warning-soft: #fff2d3;

  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --step--1: clamp(0.78rem, 0.74rem + 0.15vw, 0.86rem);
  --step-0: clamp(0.94rem, 0.9rem + 0.18vw, 1rem);
  --step-1: clamp(1.06rem, 0.99rem + 0.34vw, 1.22rem);
  --step-2: clamp(1.28rem, 1.12rem + 0.72vw, 1.62rem);
  --step-3: clamp(1.65rem, 1.32rem + 1.38vw, 2.25rem);
  --step-4: clamp(2.05rem, 1.48rem + 2.45vw, 3.2rem);
  --step-5: clamp(2.5rem, 1.65rem + 3.6vw, 4.2rem);

  --space-2xs: clamp(0.25rem, 0.2rem + 0.2vw, 0.375rem);
  --space-xs: clamp(0.5rem, 0.43rem + 0.25vw, 0.625rem);
  --space-sm: clamp(0.75rem, 0.65rem + 0.35vw, 0.95rem);
  --space-md: clamp(1rem, 0.85rem + 0.6vw, 1.3rem);
  --space-lg: clamp(1.35rem, 1.05rem + 1.1vw, 1.9rem);
  --space-xl: clamp(1.8rem, 1.3rem + 1.9vw, 2.8rem);
  --space-2xl: clamp(2.5rem, 1.7rem + 3vw, 4.2rem);
  --space-3xl: clamp(3.4rem, 2.1rem + 5vw, 6.2rem);

  --radius-xs: 0.25rem;
  --radius-sm: 0.45rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.1rem;
  --radius-xl: 1.6rem;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(9, 41, 39, 0.06), 0 5px 16px rgba(9, 41, 39, 0.04);
  --shadow-md: 0 12px 32px rgba(9, 41, 39, 0.09);
  --shadow-lg: 0 22px 60px rgba(9, 41, 39, 0.14);
  --max-width: 78rem;
  --reading-width: 46rem;
  --header-height: 6.25rem;
  --control-height: 2.75rem;
  --transition: 180ms cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Compatibility aliases retained for existing templates and email content. */
  --color-primary: var(--brand-600);
  --color-primary-dark: var(--brand-700);
  --color-primary-light: var(--brand-50);
  --color-primary-50: var(--brand-100);
  --color-accent: var(--brand-600);
  --color-accent-light: var(--brand-50);
  --color-warning: var(--warning);
  --color-warning-light: var(--warning-soft);
  --color-danger: var(--danger);
  --color-danger-light: var(--danger-soft);
  --color-success: var(--success);
  --color-success-light: var(--success-soft);
  --color-slate-50: #f7f8f5;
  --color-slate-100: #edf0eb;
  --color-slate-200: #d8ddd6;
  --color-slate-300: #bdc7bf;
  --color-slate-400: #889691;
  --color-slate-500: #657570;
  --color-slate-600: #4f615d;
  --color-slate-700: #344844;
  --color-slate-800: #213a36;
  --color-slate-900: var(--ink-950);
  --color-bg: var(--paper);
  --color-surface: var(--surface);
  --color-border: var(--line);
  --shadow-premium: var(--shadow-md);
}

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(rgba(9, 41, 39, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 3rem;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open,
body.filters-open { overflow: hidden; }

::selection { color: var(--ink-950); background: var(--gold-300); }

h1, h2, h3, h4 {
  color: var(--ink-950);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { color: var(--text-muted); }
a { color: var(--brand-700); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--brand-500); }
strong { color: inherit; font-weight: 700; }
small { font-size: var(--step--1); }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 50%;
  min-height: var(--control-height);
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--ink-950);
  font-weight: 700;
  transform: translate(-50%, -150%);
  transition: transform var(--transition);
}
.skip-link:focus { color: var(--white); transform: translate(-50%, 0.5rem); }

.container { width: min(100% - 2rem, var(--max-width)); margin-inline: auto; }
.site-main { flex: 1; padding-block: var(--space-lg) var(--space-3xl); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.clipboard-helper { position: fixed; left: -9999px; top: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand-700);
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.eyebrow--light { color: var(--gold-300); }
.eyebrow--urgent { color: var(--rust-700); }

.btn {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.66rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: wait; opacity: 0.65; transform: none; }
.btn--primary { color: var(--white); background: var(--brand-700); border-color: var(--brand-700); box-shadow: 0 6px 16px rgba(7, 94, 77, 0.16); }
.btn--primary:hover { color: var(--white); background: var(--ink-900); border-color: var(--ink-900); }
.btn--secondary { color: var(--ink-900); background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn--secondary:hover { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-600); }
.btn--accent { color: var(--ink-950); background: var(--gold-500); border-color: var(--gold-500); box-shadow: 0 7px 18px rgba(184, 120, 0, 0.2); }
.btn--accent:hover { color: var(--ink-950); background: var(--gold-300); border-color: var(--gold-300); }
.btn--compact { min-height: 2.5rem; padding: 0.55rem 0.8rem; }
.btn--large { min-height: 3.15rem; padding: 0.85rem 1.25rem; font-size: 0.98rem; }
.btn--block { width: 100%; }
.btn--sm { min-height: var(--control-height); padding: 0.58rem 0.85rem; font-size: 0.84rem; }
.text-link,
.guide-link,
.card-link {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand-700);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}
.text-link:hover i,
.guide-link:hover i,
.card-link:hover i { transform: translateX(0.2rem); }
.text-link i,
.guide-link i,
.card-link i { transition: transform var(--transition); }

/* Status toast */
.site-status {
  position: fixed;
  z-index: 11000;
  top: calc(var(--header-height) + 0.75rem);
  left: 50%;
  width: min(calc(100% - 2rem), 30rem);
  padding: 0.85rem 1rem;
  color: var(--white);
  background: var(--ink-950);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 650;
  text-align: center;
  transform: translateX(-50%);
}
.site-status--success { border-left-color: #51c49e; }
.site-status--error { border-left-color: #ef8f75; }

/* Header and navigation */
.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  color: var(--ink-950);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--transition);
}
.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-700) 0 36%, var(--gold-500) 36% 62%, var(--rust-600) 62% 75%, var(--sky-700) 75% 100%);
}
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(9, 41, 39, 0.08); }
.site-ribbon { min-height: 2rem; display: flex; align-items: center; color: #dcece6; background: var(--ink-950); font-size: 0.7rem; font-weight: 650; letter-spacing: 0.025em; }
.site-ribbon__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-ribbon__inner span { display: inline-flex; align-items: center; gap: 0.35rem; }
.site-ribbon__inner i { color: var(--gold-500); }
.site-ribbon__meta { color: #a9bdb8; }
.site-nav { min-height: 4.3rem; display: flex; align-items: center; gap: 1.2rem; }
.site-logo { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink-950); text-decoration: none; }
.site-logo:hover { color: var(--ink-950); }
.site-logo__mark {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  color: var(--ink-950);
  background: var(--gold-500);
  border-radius: 50% 50% 50% 0.3rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  transform: rotate(-3deg);
}
.site-logo__wordmark { color: var(--ink-900); font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; letter-spacing: -0.035em; }
.site-logo__wordmark strong { color: var(--brand-600); font-weight: 800; }
.primary-navigation { margin-left: auto; }
.nav-menu { display: flex; align-items: center; gap: 0.1rem; list-style: none; }
.nav-menu a { min-height: var(--control-height); display: inline-flex; align-items: center; padding: 0.6rem 0.65rem; color: #455a56; border-bottom: 2px solid transparent; font-size: 0.83rem; font-weight: 650; text-decoration: none; }
.nav-menu a:hover { color: var(--brand-700); }
.nav-menu a.active { color: var(--ink-950); border-bottom-color: var(--gold-500); }
.nav-menu__mobile-only,
.nav-menu__mobile-divider { display: none; }
.header-actions { display: flex; align-items: center; gap: 0.45rem; }
.header-login { min-height: var(--control-height); display: inline-flex; align-items: center; padding-inline: 0.5rem; color: var(--ink-900); font-size: 0.86rem; font-weight: 700; text-decoration: none; }
.header-icon-button,
.nav-toggle {
  min-width: var(--control-height);
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-900);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.header-icon-button:hover { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-100); }
.nav-toggle { display: none; margin-left: auto; gap: 0.4rem; border-color: var(--line); font-size: 1.15rem; }
.nav-toggle__label { font-size: 0.75rem; font-weight: 750; }

/* Search */
.search-container { width: 100%; max-width: 44rem; }
.search-bar {
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 34px rgba(9, 41, 39, 0.11);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.search-bar:focus-within { border-color: var(--gold-500); box-shadow: 0 14px 38px rgba(9, 41, 39, 0.16), 0 0 0 4px rgba(230, 161, 27, 0.16); transform: translateY(-1px); }
.search-bar__icon { flex: 0 0 auto; margin-left: 0.55rem; color: var(--brand-700); font-size: 1.25rem; }
.search-input { min-width: 0; flex: 1; min-height: 2.75rem; padding: 0.55rem 0.5rem; color: var(--ink-950); background: transparent; border: 0; outline: 0; font-size: 0.96rem; }
.search-input::placeholder { color: #7b8b87; opacity: 1; }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-btn { min-height: 2.8rem; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.65rem 1rem; color: var(--white); background: var(--brand-700); border: 0; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 750; transition: background-color var(--transition); }
.search-btn:hover { background: var(--ink-900); }

/* Home hero */
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: var(--space-xl);
  margin-top: var(--space-sm);
  padding: var(--space-2xl);
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand-700);
  border-radius: var(--radius-lg);
}
.home-hero::before {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 24rem;
  aspect-ratio: 1;
  border: 4rem solid rgba(230, 161, 27, 0.11);
  border-radius: 50%;
  pointer-events: none;
}
.home-hero__content { position: relative; z-index: 1; align-self: center; max-width: 48rem; }
.home-hero h1 { max-width: 15ch; margin-top: var(--space-sm); font-size: var(--step-5); }
.home-hero h1 span { position: relative; color: var(--brand-700); white-space: nowrap; }
.home-hero h1 span::after { content: ""; position: absolute; right: 0.02em; bottom: 0.02em; left: 0.02em; z-index: -1; height: 0.18em; background: var(--gold-300); transform: rotate(-1deg); }
.home-hero__intro { max-width: 39rem; margin-top: var(--space-md); font-size: var(--step-1); }
.home-hero .search-container { margin-top: var(--space-lg); }
.hero__quick-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: var(--space-sm); }
.hero__quick-links > span { margin-right: 0.15rem; color: var(--text-soft); font-size: 0.74rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; }
.hero__quick-links a { min-height: 2rem; display: inline-flex; align-items: center; padding: 0.3rem 0.55rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-full); font-size: 0.73rem; font-weight: 650; text-decoration: none; }
.hero__quick-links a:hover { color: var(--brand-700); border-color: var(--brand-500); }
.home-hero__proof { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-lg); list-style: none; }
.home-hero__proof li { display: flex; align-items: center; gap: 0.45rem; color: var(--text-muted); font-size: 0.76rem; line-height: 1.35; }
.home-hero__proof i { color: var(--brand-600); font-size: 1.05rem; }
.home-hero__proof strong { display: block; color: var(--ink-950); }
.home-hero__guide { position: relative; z-index: 1; align-self: stretch; padding: var(--space-xl); overflow: hidden; color: var(--white); background: var(--ink-950); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.home-hero__motif { position: absolute; top: -2.6rem; right: -2.6rem; width: 9rem; height: 9rem; opacity: 0.85; }
.home-hero__motif span { position: absolute; border-radius: 50%; }
.home-hero__motif span:nth-child(1) { inset: 0; border: 1.6rem solid var(--brand-500); }
.home-hero__motif span:nth-child(2) { inset: 1.8rem; border: 1rem solid var(--gold-500); }
.home-hero__motif span:nth-child(3) { inset: 3.4rem; background: var(--rust-600); }
.home-hero__count { position: relative; max-width: 11rem; display: flex; flex-direction: column; color: #b7cac5; font-size: 0.78rem; line-height: 1.35; }
.home-hero__count-number { color: var(--white); font-family: var(--font-display); font-size: var(--step-3); font-weight: 800; line-height: 1; }
.funding-steps { position: relative; display: grid; gap: 0; margin-top: var(--space-xl); list-style: none; counter-reset: steps; }
.funding-steps li { position: relative; display: grid; grid-template-columns: 2.35rem 1fr; gap: 0.75rem; padding-bottom: var(--space-lg); }
.funding-steps li:not(:last-child)::after { content: ""; position: absolute; top: 2.1rem; bottom: 0.15rem; left: 1.05rem; width: 1px; background: #35635d; }
.funding-steps li > span { width: 2.15rem; height: 2.15rem; display: grid; place-items: center; color: var(--ink-950); background: var(--gold-500); border-radius: 50%; font-size: 0.66rem; font-weight: 850; }
.funding-steps strong { display: block; color: var(--white); font-size: 0.9rem; }
.funding-steps small { display: block; margin-top: 0.18rem; color: #9fb5b0; line-height: 1.45; }
.home-hero__guide .guide-link { color: var(--gold-300); }
.home-hero__guide .guide-link:hover { color: var(--white); }

/* Section rhythm */
.home-section { margin-top: var(--space-3xl); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.section-heading h2 { margin-top: 0.4rem; }
.section-heading p { margin-top: 0.45rem; }
.home-section--featured { position: relative; }
.deadline-section { padding: var(--space-xl); background: #fcf4ef; border: 1px solid #ebc5b7; border-left: 4px solid var(--rust-600); border-radius: var(--radius-lg); }

/* Bursary cards */
.bursary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.5rem), 1fr)); gap: var(--space-md); align-items: stretch; }
.bursary-card {
  position: relative;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.05rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.bursary-card:hover { border-color: #a7beb4; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.bursary-card__topline { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: var(--brand-600); }
.bursary-card--urgent .bursary-card__topline { background: var(--rust-600); }
.bursary-card__badges { min-height: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.6rem; padding-top: 0.1rem; }
.badge { min-height: 1.45rem; display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.22rem 0.5rem; border-radius: var(--radius-full); font-size: 0.63rem; font-weight: 800; line-height: 1.2; letter-spacing: 0.045em; text-transform: uppercase; }
.badge--verified { color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-100); }
.badge--new { color: var(--sky-700); background: var(--sky-100); }
.badge--featured { color: #765000; background: var(--gold-100); }
.badge--closing-soon { color: var(--rust-700); background: var(--rust-100); }
.badge--type { color: var(--brand-700); background: var(--brand-50); }
.bursary-card__provider-row { min-width: 0; display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.65rem; }
.provider-logo-small,
.provider-logo-placeholder { width: 2.25rem; height: 2.25rem; flex: 0 0 auto; border-radius: var(--radius-sm); }
.provider-logo-small { padding: 0.15rem; object-fit: contain; background: var(--surface); border: 1px solid var(--line); }
.provider-logo-placeholder { display: grid; place-items: center; color: var(--brand-700); background: var(--brand-100); font-size: 0.65rem; font-weight: 850; }
.bursary-card__provider { min-width: 0; overflow: hidden; color: var(--text-muted); font-size: 0.76rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.bursary-card__title { margin-bottom: 0.55rem; font-size: clamp(1.02rem, 0.96rem + 0.25vw, 1.16rem); line-height: 1.25; }
.bursary-card__title a { color: var(--ink-950); text-decoration: none; }
.bursary-card__title a:hover { color: var(--brand-700); text-decoration: underline; }
.bursary-card__summary { display: -webkit-box; overflow: hidden; margin-bottom: 0.65rem; color: var(--text-muted); font-size: 0.79rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.bursary-card__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem; margin-bottom: 0.65rem; }
.meta-item { min-width: 0; display: inline-flex; align-items: flex-start; gap: 0.25rem; color: var(--text-muted); font-size: 0.69rem; font-weight: 550; line-height: 1.35; }
.meta-item i { flex: 0 0 auto; margin-top: 0.1rem; color: var(--brand-600); font-size: 0.85rem; }
.bursary-card__tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.7rem; }
.card-tag { padding: 0.18rem 0.42rem; color: #556761; background: #f3f5f1; border: 1px solid #e2e7e0; border-radius: var(--radius-xs); font-size: 0.64rem; font-weight: 650; line-height: 1.35; text-decoration: none; }
.card-tag:hover { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-500); }
.card-tag--funding { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-100); }
.bursary-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 0.55rem; margin-top: auto; padding-top: 0.7rem; border-top: 1px solid #e8ebe6; }
.bursary-card__deadline { min-width: 0; display: flex; align-items: center; gap: 0.3rem; color: var(--text-muted); font-size: 0.67rem; font-weight: 650; line-height: 1.35; }
.bursary-card__deadline i { flex: 0 0 auto; font-size: 0.88rem; }
.bursary-card__deadline--urgent { color: var(--rust-700); }
.card-link { flex: 0 0 auto; font-size: 0.72rem; }

/* Category landing pages */
.category-page { padding-bottom: var(--space-xl); }
.category-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-xl); margin-bottom: var(--space-xl); padding: var(--space-xl); color: var(--white); background: var(--ink-950); border-left: 6px solid var(--gold-500); border-radius: var(--radius-md); }
.category-hero h1 { margin-top: 0.35rem; color: var(--white); }
.category-hero p { max-width: 46rem; margin-top: 0.65rem; color: #c6d5d1; }
.category-hero .eyebrow { color: var(--gold-300); }
.category-hero__count { min-width: 8.5rem; padding: var(--space-md); color: var(--ink-950); background: var(--gold-500); border-radius: var(--radius-sm); text-align: center; }
.category-hero__count strong,
.category-hero__count span { display: block; }
.category-hero__count strong { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; }
.category-hero__count span { margin-top: 0.25rem; font-size: 0.72rem; font-weight: 750; text-transform: uppercase; }
.related-categories { margin-top: var(--space-3xl); padding-top: var(--space-xl); border-top: 1px solid var(--line); }

/* Category directory and home trust */
.category-directory__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
.category-group { padding: var(--space-lg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.category-group__heading { display: flex; align-items: flex-start; gap: 0.75rem; padding-bottom: var(--space-md); border-bottom: 1px solid var(--line); }
.category-group__icon { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; display: grid; place-items: center; color: var(--ink-950); background: var(--gold-500); border-radius: 50% 50% 50% 0.3rem; font-size: 1.2rem; }
.category-group h3 { font-size: 1rem; }
.category-group p { margin-top: 0.2rem; font-size: 0.75rem; }
.category-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--space-md); }
.category-pill { min-height: 2.4rem; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.48rem 0.65rem; color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.74rem; font-weight: 650; text-decoration: none; }
.category-pill:hover { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-500); }
.category-pill i { font-size: 0.78rem; }
.home-cta { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-xl); margin-top: var(--space-3xl); padding: var(--space-xl); overflow: hidden; color: var(--white); background: var(--ink-950); border-left: 6px solid var(--gold-500); border-radius: var(--radius-md); }
.home-cta::after { content: ""; position: absolute; right: 19%; bottom: -6rem; width: 12rem; height: 12rem; border: 2rem solid rgba(11, 138, 112, 0.25); border-radius: 50%; }
.home-cta__mark { position: relative; z-index: 1; width: 4rem; height: 4rem; display: grid; place-items: center; color: var(--ink-950); background: var(--gold-500); border-radius: 50% 50% 50% 0.7rem; font-family: var(--font-display); font-size: 1.4rem; font-weight: 850; }
.home-cta__copy { position: relative; z-index: 1; }
.home-cta h2 { margin-top: 0.4rem; color: var(--white); font-size: var(--step-2); }
.home-cta p { max-width: 43rem; margin-top: 0.4rem; color: #b7c9c5; }
.home-cta .btn { position: relative; z-index: 1; }
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: var(--space-lg); overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.trust-strip div { padding: var(--space-md); background: var(--surface); }
.trust-strip strong,
.trust-strip span { display: block; }
.trust-strip strong { color: var(--ink-950); font-size: 0.85rem; }
.trust-strip span { margin-top: 0.15rem; color: var(--text-muted); font-size: 0.72rem; }
.disclaimer { margin-top: var(--space-2xl); padding: var(--space-md); background: #efede5; border-left: 3px solid var(--line-strong); border-radius: var(--radius-xs); }
.disclaimer p { font-size: 0.73rem; line-height: 1.6; }

/* Breadcrumbs */
.breadcrumbs { margin: 0.15rem 0 var(--space-md); }
.breadcrumb-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; list-style: none; }
.breadcrumb-item { min-width: 0; display: flex; align-items: center; color: var(--text-soft); font-size: 0.72rem; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; margin-right: 0.25rem; color: #a5b0ac; }
.breadcrumb-item a { min-height: 2rem; display: inline-flex; align-items: center; padding: 0.25rem; color: var(--text-muted); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--brand-700); }
.breadcrumb-item span { max-width: min(36rem, 60vw); overflow: hidden; padding: 0.25rem; color: var(--ink-900); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }

/* Listing and filters */
.listing-hero { position: relative; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(22rem, 1.2fr); align-items: end; gap: var(--space-xl); padding: var(--space-xl); overflow: hidden; color: var(--white); background: var(--ink-950); border-radius: var(--radius-md); }
.listing-hero::after { content: ""; position: absolute; top: -6rem; left: 38%; width: 15rem; height: 15rem; border: 2.6rem solid rgba(230, 161, 27, 0.13); border-radius: 50%; pointer-events: none; }
.listing-hero__copy,
.listing-hero__search { position: relative; z-index: 1; }
.listing-hero h1 { margin-top: 0.35rem; color: var(--white); }
.listing-hero p { max-width: 36rem; margin-top: 0.55rem; color: #b9cbc6; }
.listing-hero .eyebrow { color: var(--gold-300); }
.listing-layout { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); gap: var(--space-xl); margin-top: var(--space-xl); }
.listing-filters { position: sticky; top: calc(var(--header-height) + 1rem); align-self: start; }
.filter-panel { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-500); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.filter-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.filter-panel__eyebrow { display: block; margin-bottom: 0.2rem; color: var(--text-soft); font-size: 0.59rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.filter-panel__title { display: flex; align-items: center; gap: 0.4rem; font-size: 1.05rem; }
.filter-panel__title i { color: var(--brand-600); }
.filter-close { width: var(--control-height); height: var(--control-height); display: none; place-items: center; color: var(--ink-900); background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 1.2rem; }
.filter-panel__body { padding: 1rem; }
.filter-group + .filter-group { margin-top: 0.85rem; }
.filter-label { display: block; margin-bottom: 0.3rem; color: #3e524d; font-size: 0.7rem; font-weight: 750; }
.filter-select,
.form-group input,
.form-group select,
.form-group textarea,
.contact-form input,
.contact-form select,
.contact-form textarea,
.auth-card input,
.account-page input,
.account-page select,
.account-page textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 0.65rem 0.75rem;
  color: var(--ink-950);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  font-size: 0.84rem;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}
.filter-select {
  padding-right: 2rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23075e4d'%3E%3Cpath d='m5.5 7.5 4.5 4 4.5-4 1 1.1-5.5 5-5.5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1rem;
}
.filter-select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus,
.auth-card input:focus,
.account-page input:focus,
.account-page select:focus,
.account-page textarea:focus { border-color: var(--brand-600); box-shadow: 0 0 0 4px var(--brand-100); }
textarea { min-height: 8.5rem; resize: vertical; }
.filter-actions { display: grid; gap: 0.5rem; margin-top: 1.2rem; }
.filter-reset { min-height: var(--control-height); display: grid; place-items: center; color: var(--text-muted); font-size: 0.73rem; font-weight: 650; text-decoration: none; }
.filter-reset:hover { color: var(--rust-700); }
.filter-backdrop { display: none; }
.listing-mobile-actions { display: none; }
.listing-content { min-width: 0; }
.listing-summary,
.listing-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: var(--space-lg); padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.listing-summary h2 { margin-top: 0.2rem; font-size: 1.2rem; }
.listing-summary > p { font-size: 0.76rem; font-weight: 650; }
.result-count { color: var(--text-muted); font-size: 0.82rem; }
.result-count strong { color: var(--ink-950); font-size: 1.05rem; }
.sort-form { display: flex; align-items: center; gap: 0.5rem; }
.sort-form label { flex: 0 0 auto; color: var(--text-muted); font-size: 0.7rem; font-weight: 700; }
.sort-form .filter-select { width: auto; min-width: 10.5rem; }
.discovery-section + .discovery-section { margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: 1px solid var(--line); }
.discovery-section__heading { display: flex; align-items: center; gap: 0.75rem; margin-bottom: var(--space-md); }
.discovery-section__heading h2 { font-size: 1.25rem; }
.discovery-section__heading p { margin-top: 0.15rem; font-size: 0.75rem; }
.discovery-section__icon { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; display: grid; place-items: center; color: var(--brand-700); background: var(--brand-100); border-radius: 50%; }
.discovery-section__icon--urgent { color: var(--rust-700); background: var(--rust-100); }
.empty-state { display: grid; justify-items: center; max-width: 40rem; margin-inline: auto; padding: var(--space-2xl); text-align: center; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-500); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.empty-state__icon { width: 3.5rem; height: 3.5rem; display: grid; place-items: center; margin-bottom: var(--space-md); color: var(--brand-700); background: var(--brand-100); border-radius: 50%; font-size: 1.6rem; }
.empty-state h2,
.empty-state h3 { font-size: var(--step-2); }
.empty-state p { max-width: 32rem; margin: 0.5rem 0 var(--space-md); }

/* Pagination and infinite loading */
.pagination { margin-top: var(--space-xl); }
.pagination-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem; list-style: none; }
.pagination-link { min-width: var(--control-height); min-height: var(--control-height); display: grid; place-items: center; padding: 0.55rem 0.7rem; color: var(--ink-900); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 700; text-decoration: none; }
.pagination-link:hover,
.pagination-link.active { color: var(--white); background: var(--brand-700); border-color: var(--brand-700); }
.pagination-link.disabled { color: #9da8a4; background: #f0f1ed; }
.pagination-ellipsis { min-height: var(--control-height); display: grid; place-items: center; padding-inline: 0.25rem; }
.load-more-region { display: grid; justify-items: center; margin-top: var(--space-lg); }
#scroll-sentinel { width: 100%; height: 1px; }
#loading-indicator { width: 100%; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
.skeleton-card { min-height: 15rem; overflow: hidden; background: #e9ece7; border: 1px solid var(--line); border-radius: var(--radius-md); }
.skeleton-card::after { content: ""; display: block; width: 45%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent); animation: shimmer 1.25s infinite; transform: translateX(-150%); }
@keyframes shimmer { to { transform: translateX(300%); } }
#load-more-btn { margin-top: var(--space-md); }
.end-message { display: inline-flex; align-items: center; gap: 0.35rem; padding: var(--space-md); color: var(--text-muted); font-size: 0.78rem; font-weight: 650; }
.end-message i { color: var(--brand-600); font-size: 1rem; }
.scroll-error-message { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); padding: var(--space-md); color: var(--rust-700); background: var(--danger-soft); border: 1px solid #edc0b4; border-radius: var(--radius-sm); font-size: 0.8rem; }
.scroll-error-message span { display: inline-flex; align-items: center; gap: 0.35rem; }
.scroll-retry-btn { min-height: var(--control-height); padding: 0.55rem 0.9rem; color: var(--rust-700); background: var(--white); border: 1px solid currentColor; border-radius: var(--radius-sm); font-size: 0.76rem; font-weight: 750; }
.bursary-card--appended { animation: card-in 320ms var(--transition) both; animation-delay: calc(var(--append-index, 0) * 45ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(0.75rem); } }

/* Alerts */
.alert { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: var(--space-md); padding: 0.9rem 1rem; border: 1px solid; border-radius: var(--radius-sm); }
.alert > i { flex: 0 0 auto; margin-top: 0.1rem; font-size: 1.25rem; }
.alert strong,
.alert span { display: block; }
.alert strong { font-size: 0.88rem; }
.alert span { margin-top: 0.1rem; font-size: 0.78rem; line-height: 1.45; }
.alert--expired,
.alert--error { color: var(--danger); background: var(--danger-soft); border-color: #e9b8ad; }
.alert--closing-soon { color: var(--warning); background: var(--warning-soft); border-color: #efd08b; }
.alert--success { color: var(--success); background: var(--success-soft); border-color: #a9d4c4; }

/* Bursary detail */
.bursary-detail { max-width: 73rem; margin-inline: auto; }
.detail-hero { position: relative; overflow: hidden; margin-bottom: var(--space-xl); padding: var(--space-xl); background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--gold-500); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.detail-hero::after { content: ""; position: absolute; right: -6rem; top: -7rem; width: 16rem; height: 16rem; border: 2.5rem solid var(--brand-50); border-radius: 50%; pointer-events: none; }
.detail-hero__provider { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 0.65rem; }
.provider-logo-medium { width: 3rem; height: 3rem; flex: 0 0 auto; padding: 0.2rem; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.provider-logo-medium--placeholder { display: grid; place-items: center; color: var(--brand-700); background: var(--brand-100); font-size: 0.72rem; font-weight: 850; }
.detail-hero__provider span,
.detail-hero__provider a { display: block; }
.detail-hero__provider span { color: var(--text-soft); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.detail-hero__provider a { color: var(--ink-950); font-size: 0.9rem; font-weight: 750; text-decoration: none; }
.detail-hero__provider a:hover { color: var(--brand-700); text-decoration: underline; }
.detail-hero__body { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem); align-items: end; gap: var(--space-xl); margin-top: var(--space-lg); }
.detail-hero__copy h1 { max-width: 23ch; margin-top: 0.65rem; font-size: var(--step-4); }
.detail-hero__copy > p { max-width: 45rem; margin-top: 0.65rem; font-size: 0.92rem; }
.header-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.detail-hero__primary-action { display: grid; gap: 0.45rem; padding: 0.9rem; background: var(--ink-950); border-radius: var(--radius-sm); }
.detail-hero__primary-action > span { color: #b9cbc6; font-size: 0.66rem; font-weight: 650; }
.detail-hero__primary-action small { display: inline-flex; align-items: center; gap: 0.25rem; color: #b9cbc6; font-size: 0.62rem; }
.detail-hero__primary-action small i { color: #6dd0ad; }
.detail-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--line); }
.detail-action { min-height: var(--control-height); display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.55rem 0.75rem; color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.76rem; font-weight: 700; text-decoration: none; }
.detail-action:hover { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-500); }
.detail-action--whatsapp { color: #176a51; }
.detail-action.is-saved { color: var(--brand-700); background: var(--brand-100); border-color: var(--brand-500); }
.detail-action:disabled { opacity: 0.6; }
.bursary-detail__grid { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: var(--space-xl); align-items: start; }
.bursary-detail__sidebar { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-height) + 1rem); }
.bursary-detail__main { min-width: 0; grid-column: 1; grid-row: 1; }
.sidebar-widget { margin-bottom: var(--space-md); padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.deadline-widget { border-top: 4px solid var(--gold-500); }
.widget-heading { display: flex; align-items: center; gap: 0.65rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
.widget-heading__icon { width: 2.35rem; height: 2.35rem; flex: 0 0 auto; display: grid; place-items: center; color: var(--brand-700); background: var(--brand-100); border-radius: 50%; font-size: 1.1rem; }
.widget-heading span { display: block; color: var(--text-soft); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.widget-heading h2 { margin-top: 0.15rem; font-size: 1rem; }
.widget-heading--compact h2 { margin: 0; }
.date-list { margin-block: 0.7rem 0.85rem; }
.date-list > div { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid #e9ece7; }
.date-list dt { color: var(--text-soft); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.055em; }
.date-list dd { color: var(--ink-950); font-size: 0.83rem; font-weight: 750; text-align: right; }
.date-list .is-urgent dd { color: var(--rust-700); }
.widget-subgroup { margin-top: 0.85rem; }
.widget-subgroup h3 { margin-bottom: 0.4rem; color: var(--text-muted); font-family: var(--font-sans); font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag-item { min-height: 2rem; display: inline-flex; align-items: center; padding: 0.34rem 0.5rem; color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-xs); font-size: 0.67rem; font-weight: 650; text-decoration: none; }
.tag-item:hover { color: var(--brand-700); border-color: var(--brand-500); }
.verification-widget p { display: flex; gap: 0.4rem; margin-top: 0.75rem; font-size: 0.72rem; line-height: 1.55; }
.verification-widget p i { flex: 0 0 auto; margin-top: 0.15rem; color: var(--brand-600); }
.verification-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.75rem; }
.verification-stats > div { padding: 0.55rem; background: var(--surface-soft); border-radius: var(--radius-xs); }
.verification-stats dt { color: var(--text-soft); font-size: 0.58rem; font-weight: 700; text-transform: uppercase; }
.verification-stats dd { margin-top: 0.15rem; color: var(--ink-950); font-size: 0.68rem; font-weight: 700; }
.detail-jump-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin-bottom: var(--space-md); padding: 0.65rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.detail-jump-links span { padding: 0.35rem; color: var(--text-soft); font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; }
.detail-jump-links a { min-height: 2rem; display: inline-flex; align-items: center; padding: 0.3rem 0.5rem; color: var(--brand-700); background: var(--brand-50); border-radius: var(--radius-xs); font-size: 0.67rem; font-weight: 650; text-decoration: none; }
.detail-card { scroll-margin-top: calc(var(--header-height) + 1rem); margin-bottom: var(--space-md); overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.detail-card--highlight { border-left: 4px solid var(--gold-500); }
.detail-card__heading { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.detail-card__heading > span { width: 2rem; height: 2rem; flex: 0 0 auto; display: grid; place-items: center; color: var(--white); background: var(--brand-700); border-radius: 50%; font-size: 0.62rem; font-weight: 800; }
.detail-card__heading p { color: var(--text-soft); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.detail-card__heading h2 { margin-top: 0.12rem; font-size: 1.1rem; }
.detail-card__content { padding: var(--space-lg); }
.detail-card__content p { color: var(--text); line-height: 1.78; white-space: pre-line; }
.application-panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-md); padding: var(--space-lg); color: var(--white); background: var(--ink-950); border-left: 5px solid var(--gold-500); border-radius: var(--radius-md); }
.application-panel__icon { width: 3rem; height: 3rem; display: grid; place-items: center; color: var(--ink-950); background: var(--gold-500); border-radius: 50%; font-size: 1.35rem; }
.application-panel h2 { margin-top: 0.3rem; color: var(--white); font-size: var(--step-2); }
.application-panel p { margin-top: 0.35rem; color: #b9cbc6; font-size: 0.78rem; }
.application-panel__notice { display: flex; gap: 0.3rem; color: #edc894 !important; }
.similar-bursaries { margin-top: var(--space-3xl); padding-top: var(--space-xl); border-top: 1px solid var(--line); }
.sticky-cta { display: none; }

/* Shared page shells, prose and forms */
.page-content,
.legal-page,
.content-page { max-width: 56rem; margin: var(--space-md) auto 0; }
.page-header { margin-bottom: var(--space-xl); padding: var(--space-xl); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-500); border-radius: var(--radius-md); text-align: center; }
.page-header .eyebrow { margin-bottom: 0.5rem; }
.page-header p { max-width: 42rem; margin: 0.65rem auto 0; font-size: var(--step-1); }
.detail-section,
.content-panel { margin-bottom: var(--space-md); padding: var(--space-lg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.detail-section h2 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; font-size: var(--step-2); }
.detail-section h2 i { color: var(--brand-600); }
.detail-section p + p { margin-top: 0.75rem; }
.detail-section ul,
.prose ul,
.prose ol { padding-left: 1.25rem; color: var(--text); }
.detail-section li + li,
.prose li + li { margin-top: 0.45rem; }
.detail-section a,
.prose a { font-weight: 650; }
.page-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.page-feature-grid .detail-section { margin-bottom: 0; }
.process-list { display: grid; gap: 0.75rem; margin-top: 0.85rem; list-style: none; }
.process-list li { display: flex; align-items: flex-start; gap: 0.7rem; }
.process-list i { flex: 0 0 auto; margin-top: 0.2rem; color: var(--brand-600); font-size: 1.15rem; }
.detail-cta { padding: var(--space-xl); color: var(--white); background: var(--ink-950); border-left: 5px solid var(--gold-500); border-radius: var(--radius-md); text-align: center; }
.detail-cta h2 { color: var(--white); }
.detail-cta p { margin: 0.55rem 0 var(--space-md); color: #b9cbc6; }
.prose { color: var(--text); font-size: clamp(1rem, 0.96rem + 0.18vw, 1.1rem); line-height: 1.8; }
.prose > * + * { margin-top: 1.1em; }
.prose h2,
.prose h3 { margin-top: 1.6em; }
.prose img { height: auto; border-radius: var(--radius-sm); }
.form-group { display: grid; gap: 0.35rem; }
.form-group + .form-group { margin-top: 0.9rem; }
.form-group label,
.form-label { color: var(--ink-900); font-size: 0.76rem; font-weight: 700; }
.form-errors { margin-top: 0.25rem; color: var(--danger); font-size: 0.72rem; list-style: none; }
.helptext { color: var(--text-soft); font-size: 0.7rem; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(15rem, 0.9fr); gap: var(--space-xl); align-items: start; }
.contact-form { display: grid; gap: 0.9rem; padding: var(--space-lg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.contact-aside { display: grid; gap: var(--space-md); }
.contact-card { padding: var(--space-lg); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--brand-600); border-radius: var(--radius-md); }
.contact-card--notice { border-top-color: var(--gold-500); background: var(--warning-soft); }
.contact-card h2,
.contact-card h3 { display: flex; align-items: center; gap: 0.45rem; font-size: 1rem; }
.contact-card h2 i,
.contact-card h3 i { color: var(--brand-600); }
.contact-card p { margin-top: 0.55rem; font-size: 0.8rem; }
.contact-card a { display: inline-block; margin-top: 0.65rem; font-weight: 700; }

/* Blog */
.blog-listing { margin-top: var(--space-md); }
.blog-header { display: flex; align-items: end; justify-content: space-between; gap: var(--space-lg); margin-bottom: var(--space-xl); padding: var(--space-xl); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-500); border-radius: var(--radius-md); }
.blog-header p { max-width: 42rem; margin-top: 0.55rem; }
.taxonomy-groups { display: grid; gap: 0.75rem; margin-bottom: var(--space-xl); padding: var(--space-md); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.taxonomy-group { display: flex; align-items: flex-start; gap: 0.8rem; }
.taxonomy-group h2 { flex: 0 0 5rem; padding-top: 0.45rem; color: var(--text-soft); font-family: var(--font-sans); font-size: 0.67rem; letter-spacing: 0.08em; text-transform: uppercase; }
.taxonomy-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.taxonomy-link { min-height: 2.25rem; display: inline-flex; align-items: center; padding: 0.4rem 0.6rem; color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.72rem; font-weight: 650; text-decoration: none; }
.taxonomy-link:hover { color: var(--brand-700); border-color: var(--brand-500); }
.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--space-md); }
.article-card { height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.article-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand-50); }
.article-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 320ms ease; }
.article-card:hover .article-card__media img { transform: scale(1.025); }
.article-card__body { flex: 1; display: flex; flex-direction: column; padding: 1rem; }
.article-card__meta { display: flex; align-items: center; gap: 0.35rem; color: var(--text-soft); font-size: 0.67rem; font-weight: 650; }
.article-card h2,
.article-card h3 { margin-top: 0.55rem; font-size: 1.08rem; line-height: 1.28; }
.article-card h2 a,
.article-card h3 a { color: var(--ink-950); text-decoration: none; }
.article-card h2 a:hover,
.article-card h3 a:hover { color: var(--brand-700); text-decoration: underline; }
.article-card__excerpt { display: -webkit-box; overflow: hidden; margin-top: 0.55rem; font-size: 0.8rem; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.article-card .text-link { margin-top: auto; padding-top: 0.7rem; }
.blog-pagination { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-top: var(--space-xl); }
.blog-pagination span { color: var(--text-muted); font-size: 0.76rem; }
.post-detail { max-width: 50rem; margin: var(--space-md) auto 0; }
.post-header { margin-bottom: var(--space-xl); }
.post-header h1 { margin-top: 0.5rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: var(--space-md); padding-bottom: var(--space-md); border-bottom: 1px solid var(--line); color: var(--text-muted); font-size: 0.76rem; }
.post-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.post-featured-image { overflow: hidden; margin-bottom: var(--space-xl); background: var(--brand-50); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.post-featured-image img { width: 100%; height: auto; }
.related-bursaries { margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: 1px solid var(--line); }
.post-cta { margin-top: var(--space-2xl); padding: var(--space-xl); background: var(--ink-950); border-left: 4px solid var(--gold-500); border-radius: var(--radius-md); text-align: center; }
.post-cta h2 { color: var(--white); font-size: var(--step-2); }
.post-cta .btn { margin-top: var(--space-md); }

/* Provider */
.provider-detail { margin-top: var(--space-md); }
.provider-detail__header { display: flex; align-items: center; gap: var(--space-lg); padding: var(--space-xl); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-500); border-radius: var(--radius-md); }
.provider-detail__logo { width: 5rem; height: 5rem; flex: 0 0 auto; padding: 0.35rem; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.provider-detail__header .badge { margin-top: 0.55rem; }
.provider-detail__description { max-width: 50rem; margin-top: var(--space-md); }
.provider-detail__description p { font-size: var(--step-1); }
.provider-detail__website { margin-top: var(--space-md); }
.provider-detail__website a { min-height: var(--control-height); display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; }
.provider-detail__stats-bar { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--space-xl); overflow: hidden; background: var(--ink-950); border-radius: var(--radius-sm); }
.provider-detail__stats-bar .stat { padding: var(--space-md); color: var(--white); text-align: center; }
.provider-detail__stats-bar .stat + .stat { border-left: 1px solid #315650; }
.stat__value { display: block; color: var(--gold-300); font-family: var(--font-display); font-size: var(--step-2); font-weight: 800; }
.stat__label { display: block; margin-top: 0.15rem; color: #afc2bd; font-size: 0.68rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; }
.provider-detail__bursaries { margin-top: var(--space-2xl); }
.provider-detail__bursaries > h2 { margin-bottom: var(--space-lg); }
.empty-message { padding: var(--space-xl); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); text-align: center; }

/* Accounts and authentication */
.auth-page {
  min-height: 65vh;
  display: grid;
  place-items: center;
  padding-block: var(--space-xl);
}
.auth-card {
  position: relative;
  width: min(100%, 30rem);
  overflow: hidden;
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold-500);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.auth-card h1 { font-size: var(--step-3); text-align: center; }
.auth-card > p { max-width: 24rem; margin: 0.55rem auto 0; text-align: center; }
.auth-card form { margin-top: var(--space-lg); }
.auth-card .alert { margin-bottom: var(--space-md); }
.auth-card .alert p { color: inherit; text-align: left; }
.auth-card form > .btn { margin-top: var(--space-md); }
.auth-link { padding-top: 0.8rem; border-top: 1px solid var(--line); font-size: 0.78rem; }
.auth-link + .auth-link { margin-top: 0.65rem; padding-top: 0; border-top: 0; }
.auth-link a { font-weight: 750; }
.account-page { max-width: 68rem; margin: var(--space-md) auto 0; }
.account-page > h1 { padding-bottom: 0.55rem; border-bottom: 3px solid var(--gold-500); }
.account-page > p { max-width: 46rem; margin-top: 0.65rem; }
.account-page > form {
  max-width: 42rem;
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.account-page > form > .btn { margin-top: var(--space-md); }
.account-page > .bursary-grid,
.account-page > .empty-state { margin-top: var(--space-xl); }
.status-group { margin-top: var(--space-xl); }
.status-group h2 { margin-bottom: var(--space-md); font-size: var(--step-2); }
.application-list { display: grid; gap: 0.65rem; }
.application-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-600);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.application-card a { color: var(--ink-950); font-weight: 750; text-decoration: none; }
.application-card a:hover { color: var(--brand-700); text-decoration: underline; }
.application-card .badge { flex: 0 0 auto; }
.text-muted { color: var(--text-muted); }

/* Global footer and newsletter */
.site-footer {
  position: relative;
  margin-top: auto;
  padding-block: var(--space-2xl) var(--space-lg);
  color: var(--white);
  background: var(--ink-950);
  border-top: 5px solid var(--gold-500);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-500) 0 38%, var(--gold-500) 38% 66%, var(--rust-600) 66% 82%, var(--sky-700) 82% 100%);
}
.site-footer p { color: #b7c9c5; }
.footer-lead {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1.1fr);
  align-items: end;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid #315650;
}
.footer-lead h2 { margin-top: 0.4rem; color: var(--white); font-size: var(--step-3); }
.footer-lead__copy p { max-width: 37rem; margin-top: 0.55rem; }
.newsletter-form { min-width: 0; }
.newsletter-form > label { display: block; margin-bottom: 0.4rem; color: #d9e5e1; font-size: 0.72rem; font-weight: 750; }
.newsletter-form__controls { display: flex; gap: 0.5rem; }
.newsletter-form__controls input {
  min-width: 0;
  min-height: 3rem;
  flex: 1;
  padding: 0.7rem 0.85rem;
  color: var(--ink-950);
  background: var(--surface);
  border: 1px solid #6f8d85;
  border-radius: var(--radius-sm);
  outline: 0;
}
.newsletter-form__controls input::placeholder { color: var(--text-soft); }
.newsletter-form__controls input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(230, 161, 27, 0.2); }
.newsletter-form__note { margin-top: 0.4rem; font-size: 0.66rem; }
.newsletter-form__message { margin-top: 0.5rem; font-size: 0.74rem; font-weight: 700; }
.newsletter-form__message.is-success { color: #8ce0c1; }
.newsletter-form__message.is-error { color: #ffb39e; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 1.5fr) repeat(3, minmax(8.5rem, 0.75fr));
  gap: var(--space-xl);
  padding-block: var(--space-xl);
}
.site-logo--footer .site-logo__mark { background: var(--gold-500); }
.site-logo--footer .site-logo__wordmark { color: var(--white); }
.site-logo--footer .site-logo__wordmark strong { color: var(--gold-300); }
.footer-brand p { max-width: 28rem; margin-top: var(--space-md); font-size: 0.78rem; }
.footer-brand__location { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.8rem; color: #d6e3df; font-size: 0.72rem; font-weight: 700; }
.footer-brand__location i { color: var(--gold-500); }
.footer-col h3 { color: var(--white); font-family: var(--font-sans); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-links { display: grid; gap: 0.45rem; margin-top: 0.75rem; list-style: none; }
.footer-links a { min-height: 2rem; display: inline-flex; align-items: center; color: #b7c9c5; font-size: 0.76rem; font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--gold-300); text-decoration: underline; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: var(--space-md); border-top: 1px solid #315650; }
.footer-bottom p { font-size: 0.67rem; }
.footer-bottom a { color: var(--gold-300); font-weight: 700; }

/* Cookie notice */
.cookie-banner {
  position: fixed;
  z-index: 2000;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  width: min(calc(100% - 2rem), 66rem);
  margin-inline: auto;
  padding: 0.85rem;
  color: var(--white);
  background: var(--ink-950);
  border: 1px solid #41645d;
  border-left: 5px solid var(--gold-500);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: cookie-rise 260ms var(--transition) both;
}
@keyframes cookie-rise { from { opacity: 0; transform: translateY(1rem); } }
.cookie-content { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.cookie-text { min-width: 0; display: flex; align-items: flex-start; gap: 0.75rem; }
.cookie-icon { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; display: grid; place-items: center; color: var(--ink-950); background: var(--gold-500); border-radius: 50%; font-size: 1.25rem; }
.cookie-text strong { display: block; color: var(--white); font-size: 0.86rem; }
.cookie-text p { margin-top: 0.2rem; color: #bdceca; font-size: 0.72rem; line-height: 1.5; }
.cookie-text a { color: var(--gold-300); font-weight: 700; }
.cookie-actions { flex: 0 0 auto; display: flex; gap: 0.45rem; }
.listing-summary--all { margin-top: var(--space-2xl); }

/* Tablet and mobile layout */
@media (max-width: 899px) {
  body.nav-open::before {
    content: "";
    position: fixed;
    z-index: 900;
    inset: var(--header-height) 0 0;
    background: rgba(9, 41, 39, 0.52);
    backdrop-filter: blur(2px);
  }
  .site-nav { gap: 0.5rem; }
  .nav-toggle { order: 3; display: inline-flex; margin-left: 0; }
  .header-actions { order: 2; margin-left: auto; }
  .header-actions .header-login,
  .header-actions .btn,
  .header-actions .header-icon-button:not(.search-shortcut) { display: none; }
  .primary-navigation {
    position: fixed;
    z-index: 1100;
    top: var(--header-height);
    right: 0;
    width: min(24rem, 100%);
    max-height: calc(100vh - var(--header-height));
    max-height: calc(100dvh - var(--header-height));
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    background: var(--surface);
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .primary-navigation.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translateX(0); }
  .nav-menu { display: block; padding: var(--space-md); }
  .nav-menu li + li { margin-top: 0.2rem; }
  .nav-menu a { width: 100%; min-height: 3rem; padding: 0.7rem 0.85rem; border: 0; border-left: 3px solid transparent; border-radius: var(--radius-sm); font-size: 0.9rem; }
  .nav-menu a:hover { background: var(--brand-50); }
  .nav-menu a.active { background: var(--brand-50); border-left-color: var(--gold-500); }
  .nav-menu__mobile-only { display: block; }
  .nav-menu__mobile-divider { height: 1px; display: block; margin: var(--space-sm) 0 !important; background: var(--line); }
  .nav-menu .nav-menu__mobile-cta { justify-content: center; color: var(--ink-950); background: var(--gold-500); border-left: 0; font-weight: 800; }

  .listing-hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .listing-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .listing-mobile-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: var(--space-md); padding: 0.65rem 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .listing-mobile-actions > span { color: var(--text-muted); font-size: 0.72rem; font-weight: 700; }
  .filter-drawer-trigger { display: none; }
  .filters-enhanced .filter-drawer-trigger { display: inline-flex; }
  .listing-filters { position: static; top: auto; }
  .filters-enhanced .listing-filters {
    position: fixed;
    z-index: 1200;
    inset: 0 auto 0 0;
    width: min(24rem, calc(100% - 1rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-105%);
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .filters-enhanced .listing-filters.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translateX(0); }
  .filters-enhanced .listing-filters .filter-panel { min-height: 100%; border: 0; border-top: 5px solid var(--gold-500); border-radius: 0; box-shadow: none; }
  .filters-enhanced .filter-close { display: grid; }
  .filters-enhanced .filter-backdrop {
    position: fixed;
    z-index: 1190;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(9, 41, 39, 0.58);
    border: 0;
    opacity: 0;
  }
  body.filters-open .filter-backdrop { opacity: 1; }

  .home-hero { grid-template-columns: minmax(0, 1fr); padding: var(--space-xl); }
  .home-hero__guide { max-width: none; }
  .category-directory__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-cta { grid-template-columns: auto minmax(0, 1fr); }
  .home-cta .btn { grid-column: 2; justify-self: start; }

  .detail-hero__body { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .detail-hero__primary-action { max-width: 30rem; }
  .bursary-detail__grid { grid-template-columns: minmax(0, 1fr); }
  .bursary-detail__sidebar,
  .bursary-detail__main { grid-column: 1; grid-row: auto; }
  .bursary-detail__sidebar { position: static; top: auto; }
  .application-panel { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .application-panel > .btn { grid-column: 2; justify-self: start; }

  .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .page-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-header { align-items: flex-start; flex-direction: column; }
  .footer-lead { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .newsletter-form { width: min(100%, 40rem); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .cookie-content { align-items: flex-start; flex-direction: column; }
  .cookie-actions { align-self: flex-end; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 1rem, var(--max-width)); }
  .site-main { padding-block: var(--space-md) var(--space-2xl); }
  .site-ribbon__meta { display: none; }
  .site-ribbon__inner { justify-content: center; }
  .site-nav { min-height: 4rem; }
  .site-logo__wordmark { font-size: 1.08rem; }
  .nav-toggle__label { font-size: 0.7rem; }

  .search-bar { grid-template-columns: auto minmax(0, 1fr); display: grid; min-height: 0; }
  .search-bar__icon { margin-left: 0.35rem; }
  .search-input { width: 100%; }
  .search-btn { grid-column: 1 / -1; width: 100%; justify-content: center; }

  .home-hero,
  .listing-hero,
  .detail-hero,
  .page-header { padding: var(--space-lg); }
  .home-hero h1 span { white-space: normal; }
  .home-hero__proof { display: grid; gap: 0.7rem; }
  .home-hero__guide { padding: var(--space-lg); }
  .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: var(--space-lg); }
  .section-heading .text-link { min-height: 2.25rem; }
  .deadline-section { padding: var(--space-md); }
  .bursary-grid,
  .article-grid,
  .skeleton-grid,
  .category-directory__grid { grid-template-columns: minmax(0, 1fr); }
  .bursary-card__footer { align-items: flex-start; flex-direction: column; }
  .bursary-card__footer .card-link { width: 100%; justify-content: flex-end; }
  .category-group { padding: var(--space-md); }
  .home-cta { grid-template-columns: minmax(0, 1fr); padding: var(--space-lg); }
  .home-cta .btn { width: 100%; grid-column: 1; justify-self: stretch; }
  .home-cta__mark { width: 3.25rem; height: 3.25rem; }
  .trust-strip { grid-template-columns: minmax(0, 1fr); }

  .listing-summary,
  .listing-toolbar { align-items: flex-start; flex-direction: column; }
  .sort-form { width: 100%; }
  .sort-form .filter-select { width: 100%; min-width: 0; }
  .listing-summary--all { margin-top: var(--space-xl); }
  .discovery-section + .discovery-section { margin-top: var(--space-xl); padding-top: var(--space-lg); }
  .discovery-section__heading { align-items: flex-start; }
  .empty-state { padding: var(--space-xl) var(--space-md); }
  .pagination-list { gap: 0.25rem; }
  .scroll-error-message { align-items: stretch; flex-direction: column; }

  .detail-hero__copy h1 { font-size: var(--step-3); }
  .detail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-action { width: 100%; justify-content: center; }
  .detail-card__content { padding: var(--space-md); }
  .detail-jump-links { align-items: stretch; }
  .application-panel { grid-template-columns: minmax(0, 1fr); padding: var(--space-md); }
  .application-panel > .btn { width: 100%; grid-column: 1; justify-self: stretch; }
  .application-panel__icon { width: 2.6rem; height: 2.6rem; }
  .sticky-cta {
    position: fixed;
    z-index: 950;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem max(0.75rem, env(safe-area-inset-right)) max(0.6rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    color: var(--white);
    background: var(--ink-950);
    border-top: 3px solid var(--gold-500);
    box-shadow: 0 -8px 24px rgba(9, 41, 39, 0.2);
  }
  .sticky-cta > div { min-width: 0; display: grid; }
  .sticky-cta span { color: #b7c9c5; font-size: 0.62rem; }
  .sticky-cta strong { overflow: hidden; font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
  .sticky-cta .btn { min-height: 2.5rem; flex: 0 0 auto; }

  .auth-page { min-height: 55vh; padding-block: var(--space-md); }
  .auth-card { padding: var(--space-lg); }
  .account-page > form { padding: var(--space-md); }
  .application-card { align-items: flex-start; flex-direction: column; }
  .provider-detail__header { align-items: flex-start; flex-direction: column; padding: var(--space-lg); }
  .provider-detail__stats-bar { grid-template-columns: minmax(0, 1fr); }
  .provider-detail__stats-bar .stat + .stat { border-top: 1px solid #315650; border-left: 0; }
  .verification-stats { grid-template-columns: minmax(0, 1fr); }
  .category-hero { grid-template-columns: 1fr; align-items: start; padding: var(--space-lg); }
  .category-hero__count { width: 100%; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; }
  .category-hero__count span { margin-top: 0; }

  .taxonomy-group { flex-direction: column; gap: 0.25rem; }
  .taxonomy-group h2 { flex-basis: auto; }
  .post-meta { gap: 0.45rem 0.75rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-brand { grid-column: auto; }
  .newsletter-form__controls { align-items: stretch; flex-direction: column; }
  .newsletter-form__controls .btn { width: 100%; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .cookie-banner { right: 0.5rem; bottom: 0.5rem; left: 0.5rem; width: calc(100% - 1rem); padding: 0.75rem; }
  .cookie-actions { width: 100%; display: grid; }
  .cookie-actions .btn { width: 100%; }
}

@media (max-width: 420px) {
  .site-logo__wordmark { display: none; }
  .detail-actions { grid-template-columns: minmax(0, 1fr); }
  .listing-mobile-actions { align-items: flex-start; flex-direction: column; }
  .cookie-text { gap: 0.55rem; }
  .cookie-icon { width: 2.1rem; height: 2.1rem; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .skeleton-card::after { animation: none; transform: none; }
}
