:root {
  color-scheme: dark;
  --navy-950: #020b18;
  --navy-900: #061120;
  --navy-850: #091626;
  --navy-800: #0b1a2d;
  --navy-700: #112640;
  --navy-600: #1b3553;
  --line: rgba(167, 180, 198, 0.18);
  --line-strong: rgba(167, 180, 198, 0.32);
  --cyan: #08a4c8;
  --cyan-light: #49cce6;
  --gold: #f0cf21;
  --gold-soft: #ffe965;
  --white: #f7fafc;
  --muted: #a7b4c6;
  --ink: #0b1827;
  --paper: #f4f7f8;
  --paper-blue: #eaf1f4;
  --danger: #bd3c4d;
  --danger-soft: #fff0f1;
  --success: #118863;
  --shadow: 0 28px 80px rgba(0, 6, 17, 0.34);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container: 1380px;
  --header-height: 78px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--navy-950);
  color: var(--white);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }
body.admin-mode { background: var(--paper); color-scheme: light; }
body.admin-mode .site-header,
body.admin-mode .site-footer { display: none; }
body.member-mode { background: var(--paper); color-scheme: light; }

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

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

:focus-visible {
  outline: 3px solid var(--cyan-light);
  outline-offset: 3px;
}

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

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 7px;
  background: var(--gold);
  color: var(--navy-950);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: 0.62; }
.button svg { width: 18px; height: 18px; }
.button-gold { background: var(--gold); color: var(--navy-950); box-shadow: 0 8px 28px rgba(240, 207, 33, 0.16); }
.button-gold:hover:not(:disabled) { background: var(--gold-soft); box-shadow: 0 12px 34px rgba(240, 207, 33, 0.22); }
.button-outline { border-color: rgba(247, 250, 252, 0.36); color: var(--white); backdrop-filter: blur(8px); }
.button-outline:hover { border-color: var(--cyan); background: rgba(8, 164, 200, 0.12); }
.button-quiet { color: var(--white); }
.button-quiet:hover { background: rgba(255, 255, 255, 0.07); }
.button-dark { background: var(--navy-950); color: var(--white); }
.button-dark:hover:not(:disabled) { background: var(--navy-700); }
.button-back { border-color: #cbd5dc; color: #34465a; }
.button-back:hover { background: #edf2f4; }
.button-full { width: 100%; }
.button-compact { min-height: 44px; padding: 10px 18px; }
.button-reject { border-color: #ebc2c8; background: #fff; color: #a22d3c; }
.button-reject:hover { background: var(--danger-soft); }
.button-approve { background: var(--success); color: #fff; }
.button-approve:hover { background: #0c7555; }

.button-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submit-button.loading > svg { display: none; }
.submit-button.loading .button-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--cyan-light);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.15em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 26px;
  height: 2px;
  background: var(--gold);
}

.eyebrow.dark { color: #06728c; }
.kicker { margin: 0 0 10px; color: #087f9b; font-size: 0.72rem; font-weight: 820; letter-spacing: 0.13em; text-transform: uppercase; }

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(2, 11, 24, 0.88), rgba(2, 11, 24, 0.62));
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: rgba(2, 11, 24, 0.94);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.header-shell {
  width: min(calc(100% - 48px), var(--container));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand img { width: 44px; height: auto; max-height: 48px; object-fit: contain; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 1.24rem; font-weight: 850; letter-spacing: 0.055em; text-transform: uppercase; }
.brand-copy span { margin-top: 5px; color: var(--muted); font-size: 0.58rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; }

.primary-nav { display: flex; margin-left: auto; align-items: center; gap: 31px; }
.primary-nav a { position: relative; padding: 28px 0 25px; color: #d7e0ea; font-size: 0.82rem; font-weight: 620; text-decoration: none; }
.primary-nav a::after { content: ""; position: absolute; right: 0; bottom: 20px; left: 0; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform 0.2s ease; }
.primary-nav a:hover { color: #fff; }
.primary-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 5px; margin-left: 14px; }

.icon-button { display: inline-grid; width: 44px; height: 44px; place-content: center; background: none; color: inherit; cursor: pointer; }
.nav-toggle { display: none; margin-left: auto; }
.nav-toggle span, .admin-nav-toggle span { display: block; width: 22px; height: 2px; margin: 3px 0; border-radius: 2px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1), .admin-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2), .admin-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3), .admin-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.member-actions { position: relative; margin-left: auto; }
.member-pill { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.045); color: #fff; cursor: pointer; }
.member-pill > svg { width: 16px; height: 16px; margin-left: 3px; color: var(--muted); }
.member-avatar { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(8,164,200,.5); border-radius: 50%; background: rgba(8,164,200,.13); color: var(--cyan-light); font-size: .69rem; font-weight: 850; }
.member-identity { display: grid; min-width: 90px; text-align: left; line-height: 1.15; }
.member-identity strong { max-width: 130px; overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.member-identity small { margin-top: 3px; color: var(--muted); font-size: .62rem; }
.member-menu { position: absolute; top: calc(100% + 9px); right: 0; width: 218px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 12px; background: #0a1728; box-shadow: var(--shadow); }
.member-menu a, .member-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 8px; background: none; color: #dfe7ef; font-size: .78rem; text-align: left; text-decoration: none; cursor: pointer; }
.member-menu a:hover, .member-menu button:hover { background: rgba(255,255,255,.07); }
.member-menu svg { width: 17px; height: 17px; color: var(--cyan-light); }

/* Hero */
.hero { position: relative; min-height: 860px; overflow: hidden; background: var(--navy-950); }
.hero-image { position: absolute; inset: 0; background: url('/assets/vi-hero-v2.webp') center / cover no-repeat; transform: scale(1.005); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2,11,24,.98) 0%, rgba(2,11,24,.88) 28%, rgba(2,11,24,.37) 58%, rgba(2,11,24,.05) 85%), linear-gradient(0deg, var(--navy-950) 0%, transparent 24%); }
.hero-grid { position: absolute; inset: 0 50% 0 0; opacity: .16; background-image: linear-gradient(rgba(8,164,200,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(8,164,200,.18) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, transparent 4%, #000 30%, transparent 92%); }
.hero-ray { position: absolute; width: 390px; height: 650px; bottom: -260px; left: 19%; border: 1px solid rgba(8,164,200,.22); transform: rotate(-29deg); clip-path: polygon(0 0, 100% 0, 55% 100%, 43% 100%); }
.hero-content { position: relative; z-index: 2; display: flex; min-height: 860px; align-items: center; padding-top: 82px; padding-bottom: 82px; }
.hero-copy { width: min(650px, 58%); }
.hero h1 { margin: 0; max-width: 690px; font-size: clamp(3rem, 5vw, 5.1rem); font-weight: 790; letter-spacing: -0.052em; line-height: .99; }
.hero h1 em, .section-intro h2 em, .verification-copy h2 em, .portal-section h2 em { color: var(--cyan-light); font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.035em; }
.hero-lede { max-width: 590px; margin: 30px 0 0; color: #c0cad7; font-size: 1.08rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.hero-actions .button { min-height: 53px; padding-inline: 24px; }
.hero-note { display: flex; align-items: center; gap: 10px; margin: 25px 0 0; color: #99a9bc; font-size: .74rem; }
.hero-note svg { width: 18px; height: 18px; color: var(--cyan-light); }
.hero-scroll { position: absolute; z-index: 3; bottom: 54px; left: max(18px, calc(50% - 744px)); display: flex; align-items: center; gap: 14px; color: #8799ad; font-size: .59rem; font-weight: 760; letter-spacing: .16em; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); pointer-events: none; }
.hero-scroll::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan-light); box-shadow: 0 0 0 5px rgba(73,204,230,.1); }
.hero-scroll span { width: 1px; height: 54px; background: linear-gradient(var(--gold), rgba(240,207,33,0)); }

@media (max-width: 1500px) {
  .hero-scroll { display: none; }
}

.trust-strip { position: relative; z-index: 4; margin-top: -38px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid rgba(130,161,190,.24); border-radius: 14px; background: rgba(9,22,38,.92); box-shadow: 0 22px 60px rgba(0,0,0,.3); backdrop-filter: blur(18px); }
.trust-item { display: flex; min-height: 106px; align-items: center; gap: 15px; padding: 24px 31px; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item > span:last-child { display: grid; line-height: 1.2; }
.trust-item strong { font-size: .9rem; }
.trust-item small { margin-top: 7px; color: var(--muted); font-size: .7rem; }
.trust-icon { display: grid; flex: 0 0 auto; width: 43px; height: 43px; place-items: center; border: 1px solid rgba(240,207,33,.3); border-radius: 10px; background: rgba(240,207,33,.07); color: var(--gold); }
.trust-icon.cyan { border-color: rgba(8,164,200,.33); background: rgba(8,164,200,.08); color: var(--cyan-light); }
.trust-icon svg { width: 23px; height: 23px; }

/* Landing sections */
.section { padding: 128px 0; }
.foundation-section { background: var(--paper); color: var(--ink); }
.foundation-section .section-intro h2 em,
.portal-section .section-intro h2 em { color: #087c98; }
.section-intro h2, .verification-copy h2, .portal-section h2 { margin: 0; font-size: clamp(2.35rem, 4.1vw, 4rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.08; }
.split-intro { display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 80px; }
.split-intro > p { margin: 0 0 3px; color: #526477; font-size: .98rem; line-height: 1.82; }
.heritage-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 52px; }
.heritage-fact { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; min-height: 104px; padding: 21px 20px; border: 1px solid #d6e0e5; border-radius: 13px; background: rgba(255,255,255,.72); color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; }
.heritage-fact:hover { transform: translateY(-3px); border-color: rgba(8,164,200,.48); box-shadow: 0 14px 30px rgba(13,39,62,.07); }
.heritage-fact strong { color: #087c98; font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; font-weight: 500; letter-spacing: -.04em; }
.heritage-fact > span { display: grid; color: #263a4d; font-size: .76rem; font-weight: 760; line-height: 1.3; }
.heritage-fact small { margin-top: 5px; color: #53677a; font-size: .62rem; font-weight: 560; }
.heritage-fact i { align-self: start; color: #789; font-size: .8rem; font-style: normal; }
.heritage-source { margin: 15px 2px 0; color: #536678; font-size: .66rem; line-height: 1.6; }
.heritage-source strong, .archive-note strong { color: #354b5d; }
.heritage-source a { color: #066f88; font-weight: 760; text-underline-offset: 2px; }
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 60px; }
.pillar-card { position: relative; min-height: 390px; overflow: hidden; padding: 39px 35px 32px; border: 1px solid #d6e0e5; border-radius: 18px; background: #fff; box-shadow: 0 18px 46px rgba(13,39,62,.07); }
.pillar-card.featured { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.pillar-card::after { content: ""; position: absolute; right: -85px; bottom: -140px; width: 220px; height: 290px; border: 1px solid rgba(8,164,200,.1); transform: rotate(28deg); }
.pillar-card.featured::after { border-color: rgba(8,164,200,.23); }
.card-number { position: absolute; top: 26px; right: 28px; color: #718293; font-size: 3.9rem; font-weight: 850; letter-spacing: -.07em; line-height: 1; }
.featured .card-number { color: #718293; }
.card-icon { display: grid; width: 53px; height: 53px; place-items: center; border: 1px solid rgba(8,164,200,.3); border-radius: 13px; background: rgba(8,164,200,.09); color: #087f9b; }
.card-icon.cyan { color: #087f9b; }
.card-icon.gold { border-color: rgba(181,150,0,.28); background: rgba(240,207,33,.11); color: #907800; }
.featured .card-icon { color: var(--cyan-light); }
.card-icon svg { width: 27px; height: 27px; }
.pillar-card h3 { margin: 30px 0 14px; font-size: 1.35rem; letter-spacing: -.025em; }
.pillar-card p { margin: 0; color: #647586; font-size: .86rem; line-height: 1.75; }
.pillar-card.featured p { color: var(--muted); }
.card-link { position: absolute; z-index: 2; bottom: 30px; left: 35px; display: inline-flex; align-items: center; gap: 7px; padding: 0; background: none; color: #087f9b; font-size: .73rem; font-weight: 790; cursor: pointer; }
.card-link svg { width: 15px; height: 15px; transition: transform .2s; }
.card-link:hover svg { transform: translateX(3px); }
.muted-link { color: #607284; cursor: default; }
.featured .muted-link { color: var(--cyan-light); }

.verification-section { position: relative; overflow: hidden; background: var(--navy-900); }
.verification-section::before { content: ""; position: absolute; inset: 0; opacity: .23; background-image: linear-gradient(rgba(8,164,200,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(8,164,200,.12) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at 30% 50%, #000, transparent 52%); }
.verification-mark { position: absolute; right: -3vw; bottom: -280px; color: rgba(8,164,200,.035); font-family: Georgia,serif; font-size: 54rem; line-height: 1; transform: scaleX(.82); }
.verification-layout { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 110px; }
.crest-stage { position: relative; display: grid; min-height: 590px; place-items: center; }
.crest-stage img { position: relative; z-index: 2; width: min(390px, 78%); max-width: 100%; filter: drop-shadow(0 35px 48px rgba(0,0,0,.4)); }
.crest-halo { position: absolute; width: min(490px, 84vw); height: min(490px, 84vw); border: 1px solid rgba(8,164,200,.22); border-radius: 50%; background: radial-gradient(circle, rgba(8,164,200,.12), transparent 66%); }
.crest-halo::before, .crest-halo::after { content: ""; position: absolute; border: 1px solid rgba(240,207,33,.14); border-radius: 50%; }
.crest-halo::before { inset: 36px; }
.crest-halo::after { inset: -32px; border-color: rgba(8,164,200,.08); }
.crest-label { position: absolute; z-index: 3; right: 2%; bottom: 76px; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(2,11,24,.75); color: #b8c6d5; font-size: .65rem; font-weight: 730; letter-spacing: .1em; text-transform: uppercase; backdrop-filter: blur(10px); }
.crest-label span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(240,207,33,.1); }
.verification-copy h2 em { color: var(--gold); }
.section-lede { margin: 26px 0 0; max-width: 600px; color: #9eacbc; line-height: 1.8; }
.process-list { display: grid; gap: 0; margin: 35px 0 37px; padding: 0; list-style: none; }
.process-list li { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 0 0 25px; }
.process-list li:last-child { padding-bottom: 0; }
.process-list li::before { content: ""; position: absolute; top: 39px; bottom: 3px; left: 20px; width: 1px; background: linear-gradient(var(--cyan), rgba(8,164,200,.1)); }
.process-list li:last-child::before { display: none; }
.process-list li > span { display: grid; width: 41px; height: 41px; place-items: center; border: 1px solid rgba(8,164,200,.35); border-radius: 50%; background: rgba(8,164,200,.08); color: var(--cyan-light); font-size: .66rem; font-weight: 820; }
.process-list strong { font-size: .91rem; }
.process-list p { margin: 5px 0 0; color: var(--muted); font-size: .79rem; }

.portal-section { background: #eef3f5; color: var(--ink); }
.section-intro.centered { max-width: 760px; margin-inline: auto; text-align: center; }
.section-intro.centered .eyebrow { justify-content: center; }
.section-intro.centered > p:last-child { max-width: 620px; margin: 23px auto 0; color: #596b7d; }
.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 54px; }
.module-grid article { display: flex; min-height: 310px; flex-direction: column; padding: 29px 25px; border: 1px solid #d5e0e5; border-radius: 14px; background: rgba(255,255,255,.78); transition: transform .25s, box-shadow .25s, border-color .25s; }
.module-grid article:hover { transform: translateY(-6px); border-color: rgba(8,164,200,.4); box-shadow: 0 20px 45px rgba(15,45,67,.09); }
.module-grid article > span { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 10px; background: var(--navy-800); color: var(--cyan-light); }
.module-grid svg { width: 23px; height: 23px; }
.module-grid h3 { margin: 22px 0 10px; font-size: 1rem; }
.module-grid p { margin: 0; color: #657586; font-size: .78rem; line-height: 1.7; }
.archive-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 24px; color: #06738d; font-size: .71rem; font-weight: 790; text-decoration: none; }
.archive-link span { transition: transform .2s; }
.archive-link:hover span { transform: translate(2px, -2px); }
.archive-note { max-width: 780px; margin: 25px auto 0; color: #536779; font-size: .66rem; line-height: 1.65; text-align: center; }
.archive-note a { color: #066f88; font-weight: 760; text-underline-offset: 2px; }

.join-section { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 39px; min-height: 250px; overflow: hidden; padding: 45px max(6vw, calc((100vw - 1220px)/2)); background: linear-gradient(110deg, #071729, #0a2742); }
.join-section::after { content: ""; position: absolute; top: 0; right: 0; width: 34%; height: 100%; background: rgba(8,164,200,.09); clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%); }
.join-lines { position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(90deg, transparent 49.8%, rgba(8,164,200,.5) 50%, transparent 50.2%); background-size: 94px 100%; transform: skew(-20deg); }
.join-section > *:not(.join-lines) { position: relative; z-index: 2; }
.join-section > img { width: 104px; filter: drop-shadow(0 12px 22px rgba(0,0,0,.3)); }
.join-section .eyebrow { margin-bottom: 12px; }
.join-section h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.75rem); line-height: 1.12; letter-spacing: -.04em; }

/* Footer */
.site-footer { background: #010812; color: #fff; }
.footer-main { display: grid; grid-template-columns: .85fr 1.15fr; gap: 110px; padding-top: 70px; padding-bottom: 64px; }
.footer-brand > p { max-width: 390px; margin: 22px 0 0; color: #8393a6; font-size: .8rem; line-height: 1.75; }
.footer-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; }
.footer-links div { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-links h2 { margin: 3px 0 8px; color: #fff; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-links a, .footer-links button, .footer-links span { padding: 0; border: 0; background: none; color: #8293a7; font-size: .73rem; text-decoration: none; }
.footer-links button { cursor: pointer; }
.footer-links a:hover, .footer-links button:hover { color: var(--cyan-light); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 21px; border-top: 1px solid rgba(255,255,255,.08); color: #7c8da0; font-size: .66rem; }
.footer-bottom a { display: flex; align-items: center; gap: 8px; color: #9dabb9; text-decoration: none; }
.footer-bottom svg { width: 15px; height: 15px; }

/* Dialogs and shared forms */
dialog {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

dialog[open] { animation: modal-in .24s ease both; }
dialog::backdrop { background: rgba(0,7,16,.79); backdrop-filter: blur(7px); animation: fade-in .2s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(15px) scale(.985); } }
@keyframes fade-in { from { opacity: 0; } }

.modal { width: min(940px, calc(100vw - 32px)); margin: auto; border-radius: 20px; box-shadow: 0 34px 100px rgba(0,0,0,.45); }
.modal-close { display: grid; position: absolute; z-index: 5; top: 20px; right: 20px; width: 38px; height: 38px; place-items: center; border: 1px solid #d8e1e6; border-radius: 50%; background: #fff; color: #516375; cursor: pointer; }
.modal-close:hover { background: #edf2f4; color: var(--ink); }
.modal-close.light { display: none; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: #fff; }
.modal-close svg { width: 18px; height: 18px; }

/* External source viewer */
.external-frame-dialog { width: min(1320px, calc(100vw - 36px)); height: min(900px, calc(100dvh - 36px)); border-radius: 17px; }
.external-frame-shell { display: grid; height: 100%; grid-template-rows: auto auto auto minmax(0,1fr) auto; overflow: hidden; border: 1px solid rgba(152,171,189,.34); border-radius: 17px; background: #f1f4f6; color: var(--ink); }
.external-frame-header { display: flex; grid-row: 1; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; padding: 13px 17px 13px 20px; border-bottom: 1px solid #d6dfe4; background: #fff; }
.external-frame-heading { display: flex; min-width: 0; align-items: center; gap: 12px; }
.external-frame-heading > div { min-width: 0; }
.external-frame-mark { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: var(--navy-800); color: var(--cyan-light); }
.external-frame-mark svg { width: 23px; height: 23px; }
.external-frame-heading p { margin: 0 0 3px; color: #68798a; font-size: .58rem; font-weight: 790; letter-spacing: .09em; text-transform: uppercase; }
.external-frame-heading h2 { margin: 0; overflow: hidden; font-size: 1rem; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.external-frame-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.external-frame-controls .modal-close { position: static; width: 40px; height: 40px; }
.external-open-direct { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #ccd7dd; border-radius: 8px; color: #31465a; font-size: .68rem; font-weight: 740; text-decoration: none; }
.external-open-direct:hover { border-color: var(--cyan); background: #f2fafb; color: #067d98; }
.external-open-direct svg { width: 16px; height: 16px; }
.external-frame-address { display: flex; grid-row: 2; min-height: 39px; align-items: center; gap: 8px; padding: 7px 20px; border-bottom: 1px solid #d5dee3; background: #f7f9fa; color: #536678; font-size: .63rem; }
.external-frame-address svg { width: 14px; height: 14px; color: #158567; }
.external-frame-address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.external-frame-address small { margin-left: auto; color: #7b8b99; font-size: .58rem; }
.external-frame-periods { display: flex; grid-row: 3; min-width: 0; align-items: center; gap: 6px; overflow-x: auto; padding: 7px 20px; border-bottom: 1px solid #d5dee3; background: #fff; scrollbar-width: thin; }
.external-frame-periods[hidden] { display: none; }
.external-frame-periods strong { flex: 0 0 auto; margin-right: 3px; color: #536678; font-size: .58rem; text-transform: uppercase; letter-spacing: .055em; }
.external-frame-periods button { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #cfdae0; border-radius: 999px; background: #f7f9fa; color: #3f5366; font: inherit; font-size: .58rem; font-weight: 720; cursor: pointer; }
.external-frame-periods button:hover { border-color: var(--cyan); color: #067d98; }
.external-frame-periods button[aria-current="page"] { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.external-frame-viewport { position: relative; grid-row: 4; min-height: 0; overflow: hidden; background: #fff; }
.external-frame-viewport iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.external-frame-loading { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; align-content: center; gap: 9px; background: #f7f9fa; color: #34485b; text-align: center; }
.external-frame-loading i { display: block; width: 34px; height: 34px; border: 3px solid #d4e2e7; border-top-color: var(--cyan); border-radius: 50%; animation: spin .75s linear infinite; }
.external-frame-loading strong { margin-top: 3px; font-size: .78rem; }
.external-frame-loading small { color: #748595; font-size: .63rem; }
.external-frame-footer { grid-row: 5; padding: 8px 20px; border-top: 1px solid #d5dee3; background: #f7f9fa; color: #637587; font-size: .57rem; line-height: 1.5; text-align: center; }
.external-frame-footer strong { color: #3f5366; }
.external-frame-footer a { color: #066f88; font-weight: 700; overflow-wrap: anywhere; text-underline-offset: 2px; }
.modal-layout { display: grid; grid-template-columns: 41% 59%; min-height: 590px; overflow: hidden; border-radius: 20px; background: #fff; color: var(--ink); }
.modal-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 52px 42px 37px; background: var(--navy-800); color: #fff; }
.modal-aside::after { content: ""; position: absolute; right: -120px; bottom: -210px; width: 310px; height: 490px; border: 1px solid rgba(8,164,200,.25); transform: rotate(29deg); }
.modal-aside > img { width: 83px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.28)); }
.modal-aside h2 { margin: 0; font-size: 2.1rem; line-height: 1.15; letter-spacing: -.04em; }
.modal-aside p:not(.eyebrow) { margin: 18px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.modal-aside > small { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; color: #899aaf; font-size: .68rem; }
.modal-aside > small svg { width: 18px; height: 18px; color: var(--cyan-light); }
.modal-content { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 70px 70px 55px; }
.auth-heading h2, .form-heading h2 { margin: 0; font-size: 2rem; line-height: 1.15; letter-spacing: -.04em; }
.auth-heading > p:last-child, .form-heading > p:last-child { margin: 12px 0 0; color: #68798b; font-size: .8rem; line-height: 1.6; }
.auth-heading { margin-bottom: 28px; }
.field { display: grid; position: relative; gap: 7px; margin-bottom: 18px; color: #34475a; }
.field > span:first-child, .field > label, .field > legend { color: #34475a; font-size: .73rem; font-weight: 720; }
.field:has(input:required) > span:first-child::after,
.field:has(select:required) > span:first-child::after,
.field:has(textarea:required) > span:first-child::after { content: ' *'; color: #a22d3c; }
.field b, .upload-field b, .consent-field b { color: #b12f40; }
.field span small { color: #8291a0; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid #ced9df;
  border-radius: 8px;
  outline: none;
  background: #fbfcfd;
  color: var(--ink);
  font-size: .82rem;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input, .field select { height: 47px; padding: 0 14px; }
.field select { appearance: none; padding-right: 38px; background-image: linear-gradient(45deg,transparent 50%,#718295 50%),linear-gradient(135deg,#718295 50%,transparent 50%); background-position: calc(100% - 18px) 20px,calc(100% - 13px) 20px; background-repeat: no-repeat; background-size: 5px 5px,5px 5px; }
.field textarea { resize: vertical; min-height: 86px; padding: 12px 14px; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #a2aeba; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--cyan); background-color: #fff; box-shadow: 0 0 0 3px rgba(8,164,200,.1); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"], .field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); background-color: #fffafa; }
.field-hint { color: #8795a3; font-size: .64rem; }
.field-error { display: none; color: #a22d3c; font-size: .65rem; }
.field.invalid > .field-error, .field input[aria-invalid="true"] ~ .field-error, .field select[aria-invalid="true"] ~ .field-error { display: block; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 7px; display: grid; width: 34px; height: 34px; place-items: center; transform: translateY(-50%); border-radius: 6px; background: transparent; color: #718295; cursor: pointer; }
.password-toggle:hover { background: #edf2f4; color: var(--ink); }
.password-toggle svg { width: 19px; height: 19px; }
.password-toggle .eye-closed { display: none; }
.password-toggle.visible .eye-closed { display: block; }
.password-toggle.visible .eye-open { display: none; }
.auth-switch { margin: 25px 0 0; color: #728193; font-size: .73rem; text-align: center; }
.auth-switch button { padding: 0; background: none; color: #087f9b; font-weight: 760; cursor: pointer; }
.form-alert { display: flex; align-items: flex-start; gap: 9px; margin: -6px 0 18px; padding: 11px 12px; border: 1px solid #efc8ce; border-radius: 8px; background: var(--danger-soft); color: #8f2836; font-size: .72rem; line-height: 1.45; }
.form-alert svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; }

/* Registration */
.registration-modal { width: min(1160px, calc(100vw - 30px)); }
.registration-shell { display: grid; grid-template-columns: 34% 66%; height: min(800px, calc(100vh - 36px)); min-height: min(650px, calc(100dvh - 36px)); overflow: hidden; border-radius: 20px; background: #fff; color: var(--ink); color-scheme: light; }
.registration-aside { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 39px 38px 34px; background: linear-gradient(155deg, #071527, #0b1e34); color: #fff; }
.registration-aside::after { content: ""; position: absolute; right: -135px; bottom: -300px; width: 350px; height: 640px; border: 1px solid rgba(8,164,200,.22); transform: rotate(28deg); }
.registration-aside .brand { position: relative; z-index: 2; }
.registration-aside .brand img { width: 43px; height: 46px; }
.registration-message { position: relative; z-index: 2; margin-top: 55px; }
.registration-message .eyebrow { margin-bottom: 14px; }
.registration-message h2 { margin: 0; max-width: 310px; font-size: 1.7rem; letter-spacing: -.035em; line-height: 1.16; }
.registration-message > p:last-child { margin: 15px 0 0; max-width: 300px; color: #98a9ba; font-size: .74rem; line-height: 1.65; }
.step-list { position: relative; z-index: 2; display: grid; gap: 0; margin: 37px 0 auto; padding: 0; list-style: none; }
.step-list li { position: relative; display: grid; grid-template-columns: 37px 1fr; gap: 13px; min-height: 66px; color: #718399; }
.step-list li::before { content: ""; position: absolute; top: 34px; bottom: 0; left: 16px; width: 1px; background: #29405a; }
.step-list li:last-child::before { display: none; }
.step-list li > span { display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid #314861; border-radius: 50%; background: #0a1b2e; font-size: .67rem; font-weight: 800; }
.step-list li > div { display: grid; align-content: start; padding-top: 1px; }
.step-list strong { color: #8293a7; font-size: .76rem; }
.step-list small { margin-top: 3px; font-size: .63rem; }
.step-list li.active, .step-list li.complete { color: var(--cyan-light); }
.step-list li.active > span { border-color: var(--gold); background: var(--gold); color: var(--navy-950); box-shadow: 0 0 0 5px rgba(240,207,33,.08); }
.step-list li.complete > span { border-color: var(--cyan); background: var(--cyan); color: #fff; }
.step-list li.active strong, .step-list li.complete strong { color: #fff; }
.privacy-note { position: relative; z-index: 2; display: flex; align-items: flex-start; gap: 12px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.09); }
.privacy-note > svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--gold); }
.privacy-note span { display: grid; }
.privacy-note strong { font-size: .68rem; }
.privacy-note small { margin-top: 5px; color: #74869b; font-size: .6rem; line-height: 1.55; }
.registration-content { position: relative; overflow-y: auto; padding: 54px 68px 34px; scrollbar-width: thin; scrollbar-color: #b9c6ce transparent; }
.registration-content form { display: flex; min-height: 100%; flex-direction: column; }
.form-step { flex: 1; }
.form-heading { margin-bottom: 29px; }
.form-heading > p:last-child span { color: #a32d3c; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; column-gap: 17px; }
.field-wide { grid-column: 1 / -1; }
.character-count { position: absolute; right: 9px; bottom: 8px; padding: 1px 4px; background: rgba(251,252,253,.9); color: #8b99a7; font-size: .61rem; }
.year-group { margin: 5px 0 21px; padding: 0; border: 0; }
.year-group legend { margin-bottom: 3px; color: #34475a; font-size: .73rem; font-weight: 720; }
.year-group legend small { color: #8291a0; font-weight: 500; }
.year-group > p { margin: 0 0 10px; color: #8291a0; font-size: .64rem; }
.year-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.year-grid label { display: grid; gap: 5px; }
.year-grid label span { color: #657689; font-size: .63rem; }
.year-grid input { width: 100%; height: 43px; min-width: 0; padding: 0 8px; border: 1px solid #ced9df; border-radius: 7px; outline: none; background: #fbfcfd; color: var(--ink); font-size: .75rem; }
.year-grid input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(8,164,200,.1); }
.year-group.invalid .field-error { display: block; margin-top: 7px; }
.choice-toggle { display: flex; align-items: center; gap: 10px; margin: 1px 0 19px; color: #4d6174; cursor: pointer; }
.choice-toggle input { position: absolute; opacity: 0; }
.choice-toggle > span { display: grid; flex: 0 0 auto; width: 19px; height: 19px; place-items: center; border: 1px solid #b8c5cd; border-radius: 5px; background: #fff; color: #fff; }
.choice-toggle svg { width: 12px; height: 12px; opacity: 0; stroke-width: 2.5; }
.choice-toggle input:checked + span { border-color: var(--cyan); background: var(--cyan); }
.choice-toggle input:checked + span svg { opacity: 1; }
.choice-toggle input:focus-visible + span { outline: 3px solid rgba(8,164,200,.25); outline-offset: 2px; }
.choice-toggle small { font-size: .7rem; font-weight: 670; }
.conditional-fields { margin: -3px 0 20px; padding: 17px 18px 0; border: 1px solid #d9e4e8; border-radius: 10px; background: #f7fafb; }
.conditional-heading { display: grid; gap: 3px; margin-bottom: 14px; }
.conditional-heading strong { color: #34475a; font-size: .73rem; }
.conditional-heading small { color: #81909e; font-size: .62rem; line-height: 1.45; }
.option-group { margin: 0 0 20px; padding: 0; border: 0; }
.option-group > legend { margin-bottom: 9px; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option-card { position: relative; display: block; cursor: pointer; }
.option-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.option-card > span { display: grid; min-height: 91px; align-content: center; padding: 14px 48px 14px 16px; border: 1px solid #ced9df; border-radius: 10px; background: #fbfcfd; transition: border-color .18s,box-shadow .18s,background .18s; }
.option-card > span::after { content: ""; position: absolute; top: 50%; right: 17px; width: 17px; height: 17px; transform: translateY(-50%); border: 1.5px solid #aebcc5; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4px #fff; }
.option-card strong { color: #263a4e; font-size: .74rem; }
.option-card small { margin-top: 4px; color: #83919e; font-size: .61rem; }
.option-card em { margin-top: 7px; color: #087f9b; font-size: .69rem; font-style: normal; font-weight: 810; }
.option-card.compact > span { min-height: 72px; }
.option-card input:checked + span { border-color: var(--cyan); background: #f1fafc; box-shadow: 0 0 0 2px rgba(8,164,200,.08); }
.option-card input:checked + span::after { border-color: var(--cyan); background: var(--cyan); }
.option-card input:focus-visible + span { outline: 3px solid rgba(8,164,200,.24); outline-offset: 2px; }
.option-group.invalid .option-card > span { border-color: var(--danger); }
.currency-field { position: relative; display: block; }
.currency-field > b { position: absolute; z-index: 1; top: 50%; left: 14px; transform: translateY(-50%); color: #526577; font-size: .72rem; }
.currency-field input { padding-left: 43px; }
.bank-reference { overflow: hidden; margin: -3px 0 20px; border: 1px solid #cfe0e6; border-radius: 11px; background: #f8fbfc; }
.bank-reference-heading { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid #dce8eb; background: #eef7f9; }
.bank-reference-heading > span { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: #dff1f5; color: #087f9b; }
.bank-reference-heading svg { width: 18px; height: 18px; }
.bank-reference-heading > div { display: grid; gap: 2px; }
.bank-reference-heading strong { color: #263a4e; font-size: .72rem; }
.bank-reference-heading small { color: #718394; font-size: .6rem; }
.bank-reference dl { display: grid; grid-template-columns: .7fr 1.3fr 1fr; gap: 12px; margin: 0; padding: 15px 17px; }
.bank-reference dl div { display: grid; min-width: 0; }
.bank-reference dt { color: #83919e; font-size: .54rem; letter-spacing: .05em; text-transform: uppercase; }
.bank-reference dd { margin: 3px 0 0; color: #2c4155; font-size: .68rem; font-weight: 720; overflow-wrap: anywhere; }
.bank-reference > p { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 11px 17px; border-top: 1px solid #eadca5; background: #fff9df; color: #756327; font-size: .62rem; line-height: 1.5; }
.bank-reference > p svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; }
.upload-control { position: relative; }
.upload-field { display: flex; min-height: 155px; align-items: center; justify-content: center; gap: 18px; padding: 25px; border: 1.5px dashed #afbec8; border-radius: 12px; background: #f8fafb; color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s; }
.upload-field:hover, .upload-field.dragging { border-color: var(--cyan); background: #f0fafc; }
.upload-field.invalid { border-color: var(--danger); background: #fffafa; }
.upload-field > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: rgba(8,164,200,.1); color: #0786a3; }
.upload-icon svg { width: 25px; height: 25px; }
.upload-copy { display: grid; }
.upload-copy strong { font-size: .82rem; }
.upload-copy > span { margin-top: 5px; color: #667789; font-size: .71rem; }
.upload-copy u { color: #087f9b; font-weight: 720; text-underline-offset: 2px; }
.upload-copy small { margin-top: 5px; color: #91a0ad; font-size: .62rem; }
.upload-field > .field-error { width: 100%; text-align: center; }
.upload-field.invalid > .field-error { display: block; }
.upload-field.has-file .upload-icon, .upload-field.has-file .upload-copy { display: none; }
.file-selected { display: flex; width: 100%; align-items: center; gap: 13px; }
.file-selected > svg { width: 32px; height: 32px; color: var(--success); }
.file-selected > span { display: grid; min-width: 0; }
.file-selected strong { max-width: 420px; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.file-selected small { margin-top: 4px; color: #78899a; font-size: .65rem; }
.remove-upload { display: inline-flex; align-items: center; gap: 5px; margin: 8px 0 0 auto; padding: 5px 2px; background: none; color: #68798a; font-size: .63rem; font-weight: 680; cursor: pointer; }
.remove-upload:hover { color: #a22d3c; }
.remove-upload svg { width: 14px; height: 14px; }
.document-security-note { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 16px; color: #66798a; font-size: .63rem; line-height: 1.5; }
.document-security-note svg { flex: 0 0 auto; width: 16px; height: 16px; color: #14856b; }

@media (min-width: 681px) {
  [data-form-step="1"] .form-heading { margin-bottom: 18px; }
  [data-form-step="1"] .form-heading h2 { font-size: 1.7rem; }
  [data-form-step="1"] .form-heading > p:last-child { margin-top: 8px; }
  [data-form-step="1"] .field { margin-bottom: 10px; }
  [data-form-step="1"] .field textarea { height: 64px; min-height: 64px; }
  [data-form-step="1"] .choice-toggle { margin-bottom: 11px; }
  [data-form-step="1"] .upload-field { min-height: 104px; justify-content: flex-start; gap: 11px; padding: 14px; }
  [data-form-step="1"] .upload-icon { width: 38px; height: 38px; }
  [data-form-step="1"] .upload-icon svg { width: 21px; height: 21px; }
  [data-form-step="1"] .upload-copy strong { font-size: .7rem; }
  [data-form-step="1"] .upload-copy > span { font-size: .61rem; line-height: 1.35; }
  [data-form-step="1"] .upload-copy small { font-size: .55rem; }
  [data-form-step="1"] .file-selected strong { max-width: 210px; }
  [data-form-step="1"] .document-security-note { margin: 0; }
}
.review-card { margin-top: 18px; padding: 17px 19px; border: 1px solid #d9e2e7; border-radius: 11px; background: #fff; }
.review-card-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 13px; border-bottom: 1px solid #e7edef; }
.review-card-heading > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: var(--navy-800); color: var(--cyan-light); }
.review-card-heading svg { width: 18px; height: 18px; }
.review-card-heading div { display: grid; }
.review-card-heading strong { font-size: .75rem; }
.review-card-heading small { margin-top: 2px; color: #7a8998; font-size: .62rem; }
.review-card dl { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 15px; margin: 14px 0 0; }
.review-card dl div { display: grid; min-width: 0; }
.review-card dt { color: #8a98a6; font-size: .58rem; text-transform: uppercase; }
.review-card dd { margin: 3px 0 0; overflow: hidden; color: #26394d; font-size: .7rem; font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.application-summary dl { grid-template-columns: 1.25fr 1fr 1fr 1fr 1fr; }
.declaration-consent { margin-top: 2px; padding: 15px 16px; border: 1px solid #dce5e8; border-radius: 10px; background: #f8fafb; }
.consent-field { display: grid; grid-template-columns: 19px 1fr; gap: 10px; margin-top: 16px; color: #68798a; cursor: pointer; }
.consent-field input { position: absolute; opacity: 0; }
.consent-field > span { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid #b8c5cd; border-radius: 4px; background: #fff; }
.consent-field > span svg { width: 12px; height: 12px; opacity: 0; stroke-width: 2.5; }
.consent-field input:checked + span { border-color: var(--cyan); background: var(--cyan); color: #fff; }
.consent-field input:checked + span svg { opacity: 1; }
.consent-field input:focus-visible + span { outline: 3px solid rgba(8,164,200,.3); outline-offset: 2px; }
.consent-field small { font-size: .66rem; line-height: 1.5; }
.consent-field.invalid > span { border-color: var(--danger); }
.form-navigation { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #e3e9ec; }
.form-navigation .button-back { margin-right: auto; }
.form-security { display: flex; align-items: center; gap: 6px; margin-right: auto; color: #8a98a7; font-size: .62rem; }
.form-security svg { width: 15px; height: 15px; color: #09829e; }
.mobile-step-label { display: none; }

/* Success dialog */
.success-modal { width: min(500px, calc(100vw - 30px)); }
.success-shell { position: relative; padding: 48px 54px 42px; border-radius: 18px; background: #fff; color: var(--ink); text-align: center; }
.success-icon { display: grid; width: 69px; height: 69px; margin: 0 auto 22px; place-items: center; border-radius: 50%; background: #e9f8f3; color: var(--success); }
.success-icon svg { width: 34px; height: 34px; }
.success-shell h2 { margin: 0; font-size: 1.8rem; letter-spacing: -.04em; }
.success-shell > p:not(.kicker) { color: #647587; font-size: .8rem; line-height: 1.65; }
.success-next { margin: 25px 0; padding: 18px; border-radius: 10px; background: #f2f6f7; text-align: left; }
.success-next > strong { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.success-next ol { display: grid; gap: 10px; margin: 13px 0 0; padding: 0; list-style: none; color: #56687a; font-size: .69rem; }
.success-next li { display: flex; align-items: center; gap: 9px; }
.success-next li span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--navy-800); color: var(--cyan-light); font-size: .56rem; font-weight: 800; }

/* Admin */
.admin-page { min-height: 100vh; background: var(--paper); color: var(--ink); }
.admin-sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 250px; flex-direction: column; padding: 27px 18px 19px; background: var(--navy-950); color: #fff; }
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; border-bottom: 1px solid rgba(255,255,255,.09); color: #fff; text-decoration: none; }
.admin-brand img { width: 40px; height: 43px; object-fit: contain; }
.admin-brand span { display: grid; line-height: 1.1; }
.admin-brand strong { font-size: 1rem; letter-spacing: .05em; text-transform: uppercase; }
.admin-brand small { margin-top: 4px; color: #75879b; font-size: .52rem; letter-spacing: .055em; text-transform: uppercase; }
.admin-sidebar nav { display: flex; flex: 1; flex-direction: column; gap: 5px; padding-top: 29px; }
.admin-sidebar nav a, .admin-sidebar nav button { display: flex; position: relative; width: 100%; min-height: 44px; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; background: none; color: #8496a9; font-size: .72rem; font-weight: 650; text-align: left; text-decoration: none; }
.admin-sidebar nav a.active { background: rgba(8,164,200,.13); color: #fff; }
.admin-sidebar nav a.active::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 0; width: 2px; border-radius: 3px; background: var(--cyan); }
.admin-sidebar nav svg, .sidebar-footer svg { width: 18px; height: 18px; }
.admin-sidebar nav a.active svg { color: var(--cyan-light); }
.admin-sidebar nav a > span { min-width: 21px; margin-left: auto; padding: 2px 6px; border-radius: 99px; background: var(--gold); color: var(--navy-950); font-size: .57rem; font-weight: 850; text-align: center; }
.admin-sidebar nav button:disabled { cursor: default; opacity: .55; }
.admin-sidebar nav button small { margin-left: auto; padding: 2px 5px; border: 1px solid #304055; border-radius: 4px; font-size: .5rem; text-transform: uppercase; }
.admin-nav-label { margin: 22px 12px 4px; color: #455970; font-size: .55rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-footer { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.09); }
.sidebar-footer a, .sidebar-footer button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; background: none; color: #74869a; font-size: .68rem; text-decoration: none; cursor: pointer; }
.sidebar-footer a:hover, .sidebar-footer button:hover { background: rgba(255,255,255,.05); color: #fff; }
.admin-workspace { min-height: 100vh; margin-left: 250px; }
.admin-topbar { display: flex; height: 68px; align-items: center; padding: 0 35px; border-bottom: 1px solid #dbe3e7; background: rgba(255,255,255,.9); }
.admin-breadcrumb { display: flex; align-items: center; gap: 8px; color: #8593a1; font-size: .65rem; }
.admin-breadcrumb svg { width: 13px; height: 13px; }
.admin-breadcrumb strong { color: #34475a; }
.admin-account { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.admin-account > span:last-child { display: grid; line-height: 1.15; }
.admin-account strong { max-width: 180px; overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-account small { margin-top: 3px; color: #8291a0; font-size: .58rem; }
.admin-nav-toggle { display: none; margin-right: 8px; color: var(--ink); }
.admin-content { width: min(1180px, calc(100% - 64px)); margin-inline: auto; padding: 49px 0 70px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.admin-heading .eyebrow { margin-bottom: 11px; }
.admin-heading h1 { margin: 0; font-size: 2.15rem; letter-spacing: -.04em; line-height: 1.05; }
.admin-heading > div > p:last-child { margin: 11px 0 0; color: #6c7d8e; font-size: .75rem; }
.admin-heading .button { min-height: 43px; font-size: .7rem; }
.admin-overview { display: grid; grid-template-columns: .8fr 1.08fr 1.25fr; gap: 14px; margin-top: 32px; }
.overview-card { display: flex; min-height: 145px; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 24px; border: 1px solid #d7e1e5; border-radius: 13px; background: #fff; box-shadow: 0 8px 24px rgba(18,47,67,.04); }
.overview-card.primary { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.overview-card > div { display: grid; }
.overview-card p { margin: 0; color: #718294; font-size: .61rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.overview-card.primary p { color: #92a5b9; }
.overview-card strong { margin-top: 4px; font-size: 2.35rem; letter-spacing: -.04em; line-height: 1.1; }
.overview-card .overview-word { margin-top: 9px; font-size: 1.03rem; letter-spacing: -.01em; }
.overview-card > div > span { margin-top: 7px; color: #7d8d9c; font-size: .62rem; line-height: 1.4; }
.overview-card.primary > div > span { color: #8da0b3; }
.overview-icon { display: grid; flex: 0 0 auto; width: 47px; height: 47px; place-items: center; border-radius: 11px; background: rgba(240,207,33,.1); color: var(--gold); }
.overview-icon.cyan { background: rgba(8,164,200,.1); color: #0789a6; }
.overview-icon.gold { background: rgba(240,207,33,.13); color: #9a8200; }
.overview-icon svg { width: 24px; height: 24px; }
.overview-card.policy { justify-content: flex-start; background: #fffdf1; border-color: #ece2ad; }
.overview-card.policy > div > span { color: #756c44; line-height: 1.5; }
.queue-panel { margin-top: 18px; overflow: hidden; border: 1px solid #d7e1e5; border-radius: 13px; background: #fff; box-shadow: 0 10px 30px rgba(18,47,67,.045); }
.queue-toolbar { display: flex; min-height: 90px; align-items: center; justify-content: space-between; gap: 30px; padding: 20px 24px; border-bottom: 1px solid #e2e9ec; }
.queue-toolbar h2 { margin: 0; font-size: .95rem; }
.queue-toolbar p { margin: 5px 0 0; color: #81909e; font-size: .64rem; }
.search-field { display: flex; width: min(280px, 100%); height: 39px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #d3dde2; border-radius: 8px; background: #fafcfc; }
.search-field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(8,164,200,.08); }
.search-field svg { width: 17px; height: 17px; color: #8998a5; }
.search-field input { width: 100%; border: 0; outline: 0; background: none; color: var(--ink); font-size: .68rem; }
.search-field input::placeholder { color: #9ba7b2; }
.queue-tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid #e2e9ec; background: #fbfcfd; }
.queue-tabs button { display: inline-flex; min-height: 45px; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 2px solid transparent; background: none; color: #718293; font-size: .65rem; font-weight: 740; cursor: pointer; }
.queue-tabs button:hover { color: #087f9b; }
.queue-tabs button[aria-selected="true"] { border-bottom-color: var(--cyan); color: var(--ink); }
.queue-tabs button span { min-width: 20px; padding: 2px 6px; border-radius: 99px; background: #e9eff2; color: #647687; font-size: .53rem; text-align: center; }
.queue-tabs button[aria-selected="true"] span { background: #dff3f7; color: #087b96; }
.table-wrap { overflow-x: auto; }
.queue-panel table { width: 100%; border-collapse: collapse; }
.queue-panel th { padding: 13px 20px; border-bottom: 1px solid #e4eaed; background: #f7f9fa; color: #8492a0; font-size: .56rem; font-weight: 780; letter-spacing: .075em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.queue-panel td { padding: 16px 20px; border-bottom: 1px solid #e8edef; color: #435669; font-size: .68rem; }
.queue-panel tbody tr:last-child td { border-bottom: 0; }
.queue-panel tbody tr:hover { background: #fafcfc; }
.applicant-cell { display: flex; min-width: 200px; align-items: center; gap: 11px; }
.table-avatar { display: grid; flex: 0 0 auto; width: 35px; height: 35px; place-items: center; border: 1px solid rgba(8,164,200,.22); border-radius: 50%; background: #eaf7fa; color: #087f9b; font-size: .61rem; font-weight: 850; }
.applicant-cell > span { display: grid; min-width: 0; }
.applicant-cell strong { max-width: 190px; overflow: hidden; color: var(--ink); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.applicant-cell small { margin-top: 3px; color: #8a98a6; font-size: .58rem; }
.history-cell { display: grid; min-width: 90px; }
.history-cell strong { color: #34475a; font-size: .68rem; }
.history-cell small { margin-top: 3px; color: #8a98a6; font-size: .58rem; }
.donation-cell { color: #253b4e; font-weight: 760; white-space: nowrap; }
.approval-status { display: inline-flex; min-height: 24px; align-items: center; padding: 4px 8px; border-radius: 99px; background: #edf2f4; color: #536678; font-size: .56rem; font-weight: 780; white-space: nowrap; }
.approval-status.status-awaiting-review { background: #fff6cf; color: #78641c; }
.approval-status.status-kiv { background: #e9f5f8; color: #087792; }
.approval-status.status-approved { background: #e6f6f0; color: #0c7254; }
.approval-status.status-rejected { background: #fbecef; color: #9b2e3e; }
.approval-status.status-expiring { background: #fff3d6; color: #9a6a0b; }
.review-button { display: inline-flex; min-height: 34px; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid #ccd8de; border-radius: 7px; background: #fff; color: #25394d; font-size: .63rem; font-weight: 720; white-space: nowrap; cursor: pointer; }
.review-button:hover { border-color: var(--cyan); color: #087f9b; }
.review-button svg { width: 14px; height: 14px; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; }
.queue-loading { display: grid; gap: 0; }
.skeleton-row { display: grid; grid-template-columns: 1.4fr .8fr .8fr .8fr .7fr .4fr; align-items: center; gap: 24px; min-height: 68px; padding: 14px 22px; border-bottom: 1px solid #edf1f2; }
.skeleton-row > * { display: block; height: 10px; border-radius: 99px; background: linear-gradient(90deg,#edf1f3 25%,#f8fafb 45%,#edf1f3 65%); background-size: 300% 100%; animation: shimmer 1.3s infinite linear; }
.skeleton-row i { width: 65%; height: 31px; }
.skeleton-row em { width: 100%; height: 30px; }
@keyframes shimmer { to { background-position: -150% 0; } }
.state-panel { display: grid; min-height: 310px; place-items: center; align-content: center; padding: 40px; text-align: center; }
.state-panel > span { display: grid; width: 57px; height: 57px; place-items: center; border-radius: 50%; background: #eaf7fa; color: #087f9b; }
.state-panel > span svg { width: 27px; height: 27px; }
.queue-error > span { background: var(--danger-soft); color: var(--danger); }
.state-panel h3 { margin: 17px 0 0; font-size: .94rem; }
.state-panel p { margin: 7px 0 18px; color: #7a8998; font-size: .7rem; }
.state-panel .button { min-height: 38px; font-size: .65rem; }
.settings-panel { margin-top: 32px; }
.settings-login, .assignment-meta { display: table-cell; }
.settings-login strong, .settings-login small, .assignment-meta small { display: block; }
.settings-login strong { color: #34475a; font-size: .68rem; }
.settings-login small, .assignment-meta small { margin-top: 3px; color: #8a98a6; font-size: .57rem; }
.role-toggle { display: inline-flex; align-items: center; gap: 8px; color: #405468; font-size: .63rem; font-weight: 680; white-space: nowrap; cursor: pointer; }
.role-toggle input { width: 17px; height: 17px; accent-color: var(--cyan); }
.assignment-meta { min-width: 110px; color: #586a7b; font-size: .61rem; }
.members-panel { margin-top: 32px; }
.members-filters { display: flex; flex: 1 1 auto; justify-content: flex-end; gap: 10px; }
.members-filters .search-field { flex: 0 1 230px; }
.members-filters .members-year { flex: 0 1 140px; }
.members-filters .members-year input { width: 100%; }
.membership-id { color: #087f9b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 720; white-space: nowrap; }
.member-status-pill { display: inline-flex; min-height: 24px; align-items: center; padding: 4px 9px; border-radius: 99px; background: #edf2f4; color: #536678; font-size: .56rem; font-weight: 780; white-space: nowrap; }
.member-status-pill.status-full { background: #e6f6f0; color: #0c7254; }
.member-status-pill.status-notfull { background: #fff6cf; color: #78641c; }
.member-status-pill.status-active { background: #e6f6f0; color: #0c7254; }
.member-status-pill.status-expired { background: #fbecef; color: #9b2e3e; }
.member-status-pill.status-lifetime { background: #e9f5f8; color: #087792; }
.member-expiry { white-space: nowrap; }
.members-toolbar .members-search { flex: 0 1 340px; }
.members-filterbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px; border-bottom: 1px solid #e8edef; background: #fbfcfc; }
.filter-field { display: grid; gap: 4px; color: #7a8998; font-size: .58rem; }
.filter-field > span { font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.filter-field input, .filter-field select { min-height: 34px; padding: 0 9px; border: 1px solid #ccd8de; border-radius: 7px; background: #fff; color: #34475a; font-size: .62rem; }
.filter-field input[type='date'] { min-width: min(140px, 100%); }
.filter-field select { min-width: min(150px, 100%); max-width: 100%; }
.members-filterbar .button { min-height: 34px; align-self: flex-end; padding: 7px 13px; font-size: .62rem; }
.members-columns-popover { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; padding: 14px 20px; border-bottom: 1px solid #e8edef; background: #fff; }
.members-table th.sortable { cursor: pointer; user-select: none; }
.members-table th.sortable:hover { color: #087f9b; }
.members-table th .sort-indicator { margin-left: 5px; color: #0c7555; font-size: .6rem; }
.form-status { display: inline-flex; min-height: 24px; align-items: center; padding: 4px 9px; border-radius: 99px; background: #edf2f4; color: #536678; font-size: .56rem; font-weight: 780; white-space: nowrap; }
.form-status.status-draft { background: #fff6cf; color: #78641c; }
.form-status.status-needs-edits { background: #fbecef; color: #9b2e3e; }
.form-status.status-verified { background: #e6f6f0; color: #0c7254; }
.members-actions { white-space: nowrap; }
.members-remind-button { min-height: 32px; padding: 6px 12px; border-radius: 8px; border: 1px solid #cbd5dc; background: #fff; color: #34465a; font-size: .58rem; font-weight: 760; line-height: 1; cursor: pointer; white-space: nowrap; }
.members-remind-button:hover:not(:disabled) { border-color: #087f9b; color: #087f9b; background: #f2fbff; }
.members-remind-button:disabled { opacity: .6; cursor: not-allowed; }
.member-link { color: #0b6b84; font-weight: 720; cursor: pointer; }
.change-password-modal { width: min(440px, calc(100vw - 30px)); }
.change-password-shell { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: #f7f9fa; color: var(--ink); }
.change-password-body { padding: 22px 26px 26px; }
.letter-index { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px; border-bottom: 1px solid #e8edef; background: #fff; }
.letter-index button { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #dfe7ea; border-radius: 6px; background: #fff; color: #506575; font-size: .62rem; font-weight: 720; cursor: pointer; }
.letter-index button.active { border-color: var(--cyan); background: #eaf7fa; color: #087f9b; }
.letter-index button:disabled { opacity: .4; cursor: not-allowed; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid #e8edef; background: #fbfcfc; }
.pagination-size { display: inline-flex; align-items: center; gap: 8px; color: #7a8998; font-size: .62rem; }
.pagination-size select { min-height: 34px; padding: 0 10px; border: 1px solid #ccd8de; border-radius: 7px; background: #fff; color: #34475a; font-size: .62rem; }
.pagination-pages { display: inline-flex; align-items: center; gap: 10px; }
.pagination-pages button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #ccd8de; border-radius: 7px; background: #fff; color: #34475a; font-size: .9rem; cursor: pointer; }
.pagination-pages button:hover:not(:disabled) { border-color: var(--cyan); color: #087f9b; }
.pagination-pages button:disabled { opacity: .45; cursor: not-allowed; }
.pagination-pages span { color: #7a8998; font-size: .62rem; white-space: nowrap; }
.member-page { padding-top: calc(var(--header-height) + 24px); color: var(--ink); }
.member-profile-shell { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; padding: 34px 0 72px; }
.profile-tabs { display: flex; gap: 6px; margin: 20px 0; border-bottom: 1px solid #e0e8eb; }
.profile-tabs button { min-height: 40px; padding: 10px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: #5b6c7c; font-size: .68rem; font-weight: 720; cursor: pointer; }
.profile-tabs button.active { border-bottom-color: var(--cyan); color: var(--ink); }
.profile-form .detail-grid { row-gap: 14px; }
.profile-social-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e0e8eb; }
.profile-section-label { margin: 0 0 12px; color: #5b6c7c; font-size: .62rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.profile-photo-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding: 16px 18px; border: 1px solid #e0e8eb; border-radius: 11px; background: #fff; }
.profile-photo-preview { flex: 0 0 auto; }
.profile-photo-preview .table-avatar { width: 64px; height: 64px; font-size: .82rem; }
.profile-photo-preview img { display: block; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #eaf7fa; }
.profile-photo-actions { display: grid; gap: 6px; }
.profile-photo-actions .button {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid #c3d1d8;
  background: #fff;
  color: #25465a;
  font-size: .64rem;
  font-weight: 720;
  cursor: pointer;
}
.profile-photo-actions .button:hover { border-color: var(--cyan); color: #087f9b; }
.profile-photo-actions small { color: #7a8998; font-size: .6rem; }
.profile-photo-status { color: #087f9b; font-size: .6rem; }
.profile-toggles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; margin-top: 16px; padding: 16px 18px; border: 1px solid #e0e8eb; border-radius: 10px; background: #fbfcfc; }
.profile-form-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.profile-hint { color: #7a8998; font-size: .64rem; }
.profile-alert { margin-top: 16px; }
.member-profile-meta { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 16px 18px; border: 1px solid #e0e8eb; border-radius: 11px; background: #fff; }
.member-profile-meta .table-avatar { width: 46px; height: 46px; font-size: .72rem; }
.member-profile-identity { display: grid; min-width: 0; }
.member-profile-identity strong { color: var(--ink); font-size: .86rem; }
.member-profile-identity small { margin-top: 3px; color: #7a8998; font-size: .62rem; }
.profile-completion { display: grid; gap: 5px; margin-left: auto; }
.profile-completion > span { color: #5b6c7c; font-size: .62rem; font-weight: 720; text-align: right; }
.profile-progress { width: 150px; height: 7px; overflow: hidden; border-radius: 99px; background: #edf2f4; }
.profile-progress i { display: block; width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), #0c7555); transition: width .3s ease; }

/* Member moments: a picture-and-caption feed in a Pinterest-style masonry */
.member-page-tabs { margin-bottom: 4px; }
.feed-composer { display: flex; gap: 18px; margin-top: 20px; padding: 18px; border: 1px solid #e0e8eb; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(18,47,67,.045); }
.feed-composer-media { position: relative; flex: 0 0 auto; width: 148px; }
.feed-composer-picker { display: grid; width: 148px; height: 148px; place-items: center; align-content: center; gap: 8px; padding: 12px; border: 1px dashed #c3d3da; border-radius: 12px; background: #f8fbfc; color: #6c8090; font-size: .61rem; font-weight: 720; text-align: center; cursor: pointer; }
.feed-composer-picker:hover { border-color: var(--cyan); color: #087f9b; }
.feed-composer-picker svg { width: 26px; height: 26px; }
.feed-composer-media img { width: 148px; height: 148px; border-radius: 12px; object-fit: cover; background: #eef3f5; }
.feed-composer-media img:not([hidden]) + .feed-composer-picker { display: none; }
.feed-composer-clear { display: grid; position: absolute; top: 7px; right: 7px; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: rgba(6,17,32,.72); color: #fff; cursor: pointer; }
.feed-composer-clear svg { width: 14px; height: 14px; }
.feed-composer-body { display: grid; flex: 1 1 auto; align-content: start; gap: 12px; min-width: 0; }
.feed-composer-body textarea { width: 100%; min-height: 96px; padding: 12px 14px; border: 1px solid #d3dde2; border-radius: 10px; background: #fafcfc; color: var(--ink); font-size: .72rem; line-height: 1.55; resize: vertical; }
.feed-composer-body textarea:focus { border-color: var(--cyan); outline: 0; box-shadow: 0 0 0 3px rgba(8,164,200,.08); }
.feed-composer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.feed-composer-actions small { flex: 1 1 200px; color: #7a8998; font-size: .6rem; }
.feed-composer-actions .button { min-height: 38px; padding: 8px 18px; font-size: .65rem; }
.feed-counter { color: #7a8998; font-size: .6rem; font-variant-numeric: tabular-nums; }
.feed-counter.near-limit { color: #9a6a0b; font-weight: 740; }

.feed-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 30px; }
.feed-heading h2 { margin: 0; font-size: .95rem; }
.feed-heading p { margin: 0; color: #81909e; font-size: .64rem; }
.feed-state { margin-top: 16px; border: 1px solid #d7e1e5; border-radius: 13px; background: #fff; }

.feed-loading { display: flex; align-items: flex-start; gap: 18px; margin-top: 18px; }
.feed-skeleton { flex: 1 1 0; height: 210px; border-radius: 14px; background: linear-gradient(90deg,#edf1f3 25%,#f8fafb 45%,#edf1f3 65%); background-size: 300% 100%; animation: shimmer 1.3s infinite linear; }
.feed-skeleton.tall { height: 290px; }

.feed-grid { display: flex; align-items: flex-start; gap: 18px; margin-top: 18px; }
.feed-grid:empty { display: none; }
.feed-column { display: grid; flex: 1 1 0; align-content: start; gap: 18px; min-width: 0; }
.feed-card { overflow: hidden; border: 1px solid #e0e8eb; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(18,47,67,.05); }
.feed-card:hover { border-color: #cfdde3; box-shadow: 0 16px 40px rgba(18,47,67,.09); }
.feed-media { display: block; overflow: hidden; background: #eef3f5; }
.feed-media img { width: 100%; height: 100%; object-fit: cover; }
.feed-body { display: grid; gap: 12px; padding: 14px 15px 15px; }
.feed-caption { margin: 0; color: #2c3e4f; font-size: .7rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.feed-meta { display: flex; align-items: center; gap: 9px; }
.feed-meta .table-avatar { width: 30px; height: 30px; font-size: .55rem; }
.feed-author { display: grid; min-width: 0; }
.feed-author strong { overflow: hidden; color: var(--ink); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.feed-author small { margin-top: 2px; color: #8a98a6; font-size: .56rem; }
.feed-delete { display: grid; width: 28px; height: 28px; place-items: center; margin-left: auto; border-radius: 7px; background: none; color: #91a0ad; cursor: pointer; }
.feed-delete:hover { background: var(--danger-soft); color: var(--danger); }
.feed-delete svg { width: 15px; height: 15px; }
.feed-reactions { display: flex; gap: 8px; padding-top: 11px; border-top: 1px solid #eef2f4; }
.feed-reaction { display: inline-flex; min-height: 32px; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid #dfe7ea; border-radius: 99px; background: #fff; color: #647685; font-size: .61rem; font-weight: 720; font-variant-numeric: tabular-nums; cursor: pointer; }
.feed-reaction:hover:not(:disabled) { border-color: #c3d3da; background: #f7fafb; }
.feed-reaction:disabled { opacity: .6; cursor: progress; }
.feed-reaction svg { width: 15px; height: 15px; }
.feed-reaction[aria-pressed="true"][data-reaction="like"] { border-color: var(--cyan); background: #eaf7fa; color: #087f9b; }
.feed-reaction[aria-pressed="true"][data-reaction="love"] { border-color: #e8b3bc; background: #fbecef; color: #9b2e3e; }
.feed-reaction[aria-pressed="true"] svg { fill: currentColor; stroke-width: 1.2; }

.feed-more { display: grid; justify-items: center; gap: 10px; min-height: 46px; margin-top: 24px; padding-bottom: 8px; }
.feed-more-spinner, .feed-more-end { color: #8a98a6; font-size: .63rem; }
.feed-more .button { min-height: 38px; font-size: .64rem; }

/* Back office email history */
.email-log-cell { white-space: nowrap; }
.email-count-chip { display: inline-flex; min-height: 26px; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid #dfe7ea; border-radius: 99px; background: #fff; color: #647685; font-size: .58rem; font-weight: 780; font-variant-numeric: tabular-nums; cursor: default; }
.email-count-chip svg { width: 14px; height: 14px; }
.email-count-chip.has-sends { border-color: var(--cyan); background: #eaf7fa; color: #087f9b; }
.email-count-chip[data-has-history="true"] { cursor: help; }
.email-log-tooltip { position: fixed; z-index: 60; width: min(340px, calc(100vw - 24px)); max-height: 320px; overflow-y: auto; padding: 12px 14px; border: 1px solid #d7e1e5; border-radius: 11px; background: #fff; box-shadow: 0 20px 50px rgba(12,32,48,.18); color: var(--ink); }
.email-log-tooltip h4 { margin: 0 0 9px; color: #7a8998; font-size: .55rem; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.email-log-tooltip ol { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.email-log-tooltip li { display: grid; gap: 2px; padding-left: 11px; border-left: 2px solid #e1eef2; }
.email-log-tooltip li.status-failed { border-left-color: #e8b3bc; }
.email-log-tooltip li.status-skipped { border-left-color: #ece2ad; }
.email-log-tooltip strong { color: #34475a; font-size: .63rem; font-weight: 740; }
.email-log-tooltip small { color: #8a98a6; font-size: .57rem; }
.email-log-tooltip .email-log-status { color: #9b2e3e; font-weight: 720; }

.feed-composer-media video { width: 148px; height: 148px; border-radius: 12px; object-fit: cover; background: #0b1a2d; }
.feed-media-button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.feed-media-button:focus-visible { outline: 3px solid var(--cyan-light); outline-offset: -3px; }
.feed-media { position: relative; }
.feed-media.is-video img { background: #0b1a2d; }
.feed-media.no-frames { display: grid; place-items: center; background: #0b1a2d; }
.feed-video-badge { display: inline-flex; position: absolute; bottom: 9px; left: 9px; align-items: center; gap: 5px; padding: 4px 9px 4px 6px; border-radius: 99px; background: rgba(6,17,32,.72); color: #fff; font-size: .58rem; font-weight: 760; backdrop-filter: blur(6px); }
.feed-video-badge svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }

/* Moment viewer */
.moment-lightbox { width: min(1180px, calc(100vw - 24px)); border: 0; background: none; }
.moment-lightbox::backdrop { background: rgba(3, 9, 18, .88); }
.lightbox-shell { display: grid; position: relative; grid-template-columns: minmax(0, 1fr) 320px; max-height: min(88vh, 860px); overflow: hidden; border-radius: 18px; background: #0a1626; color: #fff; }
.lightbox-stage { display: grid; place-items: center; min-height: 320px; max-height: min(88vh, 860px); padding: 12px; background: #050d18; }
.lightbox-stage img, .lightbox-stage video { max-width: 100%; max-height: min(84vh, 820px); border-radius: 8px; object-fit: contain; }
.lightbox-panel { display: grid; align-content: start; gap: 14px; overflow-y: auto; padding: 26px 24px; border-left: 1px solid rgba(255,255,255,.09); }
.lightbox-meta { display: flex; align-items: center; gap: 10px; }
.lightbox-meta .table-avatar { width: 38px; height: 38px; border-color: rgba(8,164,200,.4); background: rgba(8,164,200,.14); color: var(--cyan-light); font-size: .62rem; }
.lightbox-panel .feed-author strong { color: #fff; font-size: .74rem; }
.lightbox-panel .feed-author small { color: #8fa1b4; font-size: .6rem; }
.lightbox-caption { margin: 0; color: #d5e0ea; font-size: .74rem; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.lightbox-panel .feed-reactions { border-top-color: rgba(255,255,255,.09); }
.lightbox-panel .feed-reaction { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #c3d2df; }
.lightbox-panel .feed-reaction:hover:not(:disabled) { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.1); }
.lightbox-position { margin: 0; color: #7f92a6; font-size: .6rem; }
.moment-lightbox .modal-close.light { display: grid; z-index: 6; }
.lightbox-step { display: grid; position: absolute; z-index: 5; top: 50%; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: rgba(6,17,32,.66); color: #fff; transform: translateY(-50%); cursor: pointer; }
.lightbox-step:hover:not(:disabled) { background: rgba(6,17,32,.9); }
.lightbox-step:disabled { opacity: .25; cursor: not-allowed; }
.lightbox-step svg { width: 20px; height: 20px; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 336px; }

@media (max-width: 860px) {
  .lightbox-shell { grid-template-columns: 1fr; max-height: 92vh; }
  .lightbox-stage { max-height: 52vh; }
  .lightbox-panel { border-top: 1px solid rgba(255,255,255,.09); border-left: 0; padding: 18px 20px; }
  .lightbox-next { right: 14px; }
}

@media (max-width: 720px) {
  .feed-composer { flex-direction: column; }
  .feed-composer-media video { width: 100%; height: 190px; }
  .feed-composer-media, .feed-composer-picker, .feed-composer-media img { width: 100%; }
  .feed-composer-picker, .feed-composer-media img { height: 190px; }
}
.member-detail-modal { width: min(760px, calc(100vw - 30px)); }
.member-detail-shell { display: flex; max-height: calc(100vh - 34px); flex-direction: column; overflow: hidden; border-radius: 18px; background: #f7f9fa; color: var(--ink); }
.member-detail-header { display: flex; align-items: center; padding: 24px 28px 18px; border-bottom: 1px solid #dfe7ea; background: #fff; }
.member-detail-header h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.03em; }
.member-detail-header .kicker { margin-bottom: 5px; font-size: .58rem; }
.member-detail-header .modal-close { position: static; margin-left: auto; }
.member-detail-body { overflow-y: auto; padding: 22px 28px 26px; }
.member-detail-banner { display: flex; align-items: center; gap: 13px; padding: 16px 18px; border-radius: 11px; background: var(--navy-800); color: #fff; }
.member-detail-banner .large { width: 48px; height: 48px; font-size: .76rem; }
.member-detail-identity { display: grid; }
.member-detail-identity strong { font-size: .9rem; }
.member-detail-identity small { margin-top: 3px; color: rgba(255,255,255,.72); font-size: .62rem; }
.member-detail-badges { display: flex; gap: 8px; margin-left: auto; }
.member-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 18px; }
.member-detail-grid .detail-field { padding: 12px 0; border-bottom: 1px solid #e8edef; }
.member-detail-grid .detail-field dt { color: #7a8998; font-size: .58rem; font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.member-detail-grid .detail-field dd { margin: 5px 0 0; color: #34475a; font-size: .68rem; line-height: 1.5; overflow-wrap: anywhere; }
.member-detail-grid .detail-field.full { grid-column: 1 / -1; }

/* Admin review dialog */
.review-modal { width: min(900px, calc(100vw - 30px)); }
.review-shell { display: flex; max-height: calc(100vh - 34px); flex-direction: column; overflow: hidden; border-radius: 18px; background: #f7f9fa; color: var(--ink); }
.review-header { display: flex; align-items: center; padding: 25px 28px 20px; border-bottom: 1px solid #dfe7ea; background: #fff; }
.review-header h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.03em; }
.review-header .kicker { margin-bottom: 5px; font-size: .59rem; }
.review-header .modal-close { position: static; margin-left: auto; }
.review-body { overflow-y: auto; padding: 22px 28px 26px; }
.applicant-banner { display: flex; align-items: center; gap: 13px; padding: 17px 18px; border-radius: 11px; background: var(--navy-800); color: #fff; }
.large-avatar { display: grid; flex: 0 0 auto; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(8,164,200,.45); border-radius: 50%; background: rgba(8,164,200,.14); color: var(--cyan-light); font-size: .76rem; font-weight: 850; }
.applicant-banner > div { display: grid; }
.applicant-banner h3 { margin: 0; font-size: .91rem; }
.applicant-banner p { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: #8fa1b4; font-size: .6rem; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.batch-chip { margin-left: auto; padding: 5px 9px; border: 1px solid rgba(240,207,33,.28); border-radius: 99px; background: rgba(240,207,33,.08); color: var(--gold); font-size: .58rem; font-weight: 750; }
.detail-section { margin-top: 17px; padding: 19px; border: 1px solid #dce4e8; border-radius: 10px; background: #fff; }
.detail-section > h3 { margin: 0 0 14px; font-size: .75rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 25px; margin: 0; }
.detail-grid-three { grid-template-columns: repeat(3,1fr); }
.detail-grid div { display: grid; }
.detail-grid .detail-wide { grid-column: 1 / -1; }
.detail-grid dt { color: #8a98a6; font-size: .55rem; letter-spacing: .06em; text-transform: uppercase; }
.detail-grid dd { margin: 3px 0 0; color: #34475a; font-size: .68rem; font-weight: 660; overflow-wrap: anywhere; }
.legacy-review-section { border-color: #dfd5a8; background: #fffdf4; }
.legacy-review-section a { color: #087f9b; text-underline-offset: 2px; }
.legacy-review-section > p { margin: 15px 0 0; color: #756c48; font-size: .62rem; line-height: 1.55; }
.review-history-section { padding: 0; overflow: hidden; }
.review-history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 16px 18px 13px; border-bottom: 1px solid #e2e9ec; }
.review-history-heading .kicker { margin-bottom: 3px; font-size: .51rem; }
.review-history-heading h3 { margin: 0; font-size: .75rem; }
.review-history-heading > span { color: #8a98a5; font-size: .55rem; }
.review-history-table-wrap { overflow-x: auto; }
.review-history-table { width: 100%; border-collapse: collapse; }
.review-history-table th { padding: 10px 13px; border-bottom: 1px solid #e5ebee; background: #f7f9fa; color: #8492a0; font-size: .5rem; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.review-history-table td { padding: 12px 13px; border-bottom: 1px solid #e8edef; color: #435669; font-size: .61rem; vertical-align: top; }
.review-history-table tbody tr:last-child td { border-bottom: 0; }
.review-history-table td:nth-child(2) { min-width: 90px; }
.review-entry-type { display: block; margin-top: 5px; color: #8392a0; font-size: .5rem; font-weight: 750; text-transform: uppercase; }
.review-date-tag { display: inline-flex; padding: 4px 7px; border-radius: 99px; background: #edf2f4; color: #506475; font-size: .54rem; font-weight: 700; white-space: nowrap; }
.reviewer-identity { display: grid; min-width: 130px; }
.reviewer-identity strong { color: #34475a; font-size: .61rem; }
.reviewer-identity small { margin-top: 3px; color: #8593a0; font-size: .52rem; overflow-wrap: anywhere; }
.review-reason { min-width: 210px; line-height: 1.5; white-space: pre-wrap; }
.review-history-empty { margin: 0; padding: 20px 18px; color: #7d8d9b; font-size: .62rem; text-align: center; }
.add-note-controls { display: flex; align-items: flex-end; justify-content: flex-end; gap: 12px; padding-top: 2px; }
.approval-grid .add-note-controls .field { width: min(220px, 100%); margin-bottom: 0; }
.add-note-controls .button { min-height: 44px; }
.application-id-line { margin: -6px 0 14px; color: #748493; font-size: .61rem; }
.application-id-line strong { color: #3b5063; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.evidence-review-card { overflow: hidden; border: 1px solid #cbdde3; border-radius: 9px; background: #f5fafb; }
.evidence-review-card:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(8,164,200,.08); }
.evidence-preview { display: grid; gap: 4px; padding: 13px 14px; border-bottom: 1px solid #dbe6ea; color: #087994; text-decoration: none; }
.evidence-preview:hover { border-color: var(--cyan); background: #eef9fb; }
.evidence-preview strong { font-size: .68rem; }
.evidence-preview span { color: #728493; font-size: .58rem; overflow-wrap: anywhere; }
.evidence-preview[aria-disabled="true"] { border-color: #e2e7e9; background: #f7f8f8; color: #8a969f; cursor: not-allowed; }
.document-validation-check { display: flex; align-items: center; gap: 9px; padding: 11px 14px; color: #405466; font-size: .62rem; font-weight: 720; cursor: pointer; }
.document-validation-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--success); }
.document-validation-check:has(input:checked) { background: #eaf7f2; color: #0b7354; }
.document-validation-check.invalid { background: var(--danger-soft); color: var(--danger); }
.document-validation-check:has(input:disabled) { cursor: default; opacity: .72; }
.evidence-missing { margin: 12px 0 0; padding: 9px 11px; border-radius: 7px; background: #fff0f2; color: #9b2e3e; font-size: .61rem; }
.form-history { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; margin-top: 16px; }
.form-history span { display: grid; padding: 8px; border: 1px solid #e0e7ea; border-radius: 7px; background: #f8fafb; text-align: center; }
.form-history small { color: #8a98a6; font-size: .51rem; text-transform: uppercase; }
.form-history strong { margin-top: 2px; font-size: .63rem; }
.bio-detail { margin-top: 15px; padding-top: 13px; border-top: 1px solid #e7ecee; }
.bio-detail strong { font-size: .6rem; text-transform: uppercase; color: #798897; }
.bio-detail p { margin: 5px 0 0; color: #526578; font-size: .68rem; line-height: 1.55; white-space: pre-wrap; }
.approval-section { border-color: #cbdde3; background: linear-gradient(180deg,#fff,#f7fafb); }
.approval-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding-bottom: 13px; border-bottom: 1px solid #e0e8eb; }
.approval-heading .kicker { margin-bottom: 4px; font-size: .55rem; }
.approval-heading h3 { margin: 0; font-size: .8rem; }
.approval-heading > span { color: #7b8a98; font-size: .6rem; }
.approval-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.approval-grid .field { margin-bottom: 14px; }
.validation-result { display: flex; min-height: 44px; align-items: center; padding: 10px 14px; border: 1px solid #d3dde2; border-radius: 8px; background: #f5f7f8; color: #8a4c55; font-size: .72rem; font-weight: 800; }
.validation-result.validated { border-color: #b9dfd1; background: #eaf7f2; color: #0b7354; }
.decision-alert { margin: 2px 0 0; }
.button-kiv { border: 1px solid #a8bdc7; background: #fff; color: #3b5668; }
.button-kiv:hover { border-color: #087f9b; background: #eef8fa; color: #087f9b; }
.review-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 28px; border-top: 1px solid #dce5e8; background: #fff; }
.review-footer p { display: flex; max-width: 290px; align-items: center; gap: 7px; margin: 0; color: #8795a2; font-size: .56rem; }
.review-footer p svg { flex: 0 0 auto; width: 17px; height: 17px; color: #0786a3; }
.review-footer > div { display: flex; gap: 8px; }
.review-footer .button { min-height: 39px; padding: 10px 14px; font-size: .64rem; }

/* Toast */
.toast-region { position: fixed; z-index: 10000; top: 20px; right: 20px; display: grid; width: min(370px, calc(100vw - 40px)); gap: 10px; pointer-events: none; }
.toast { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 13px 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; background: #0a192b; color: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.3); pointer-events: auto; animation: toast-in .28s ease both; }
.toast.removing { animation: toast-out .23s ease both; }
.toast > span:first-child { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: rgba(8,164,200,.12); color: var(--cyan-light); }
.toast.error > span:first-child { background: rgba(189,60,77,.16); color: #ff8998; }
.toast svg { width: 18px; height: 18px; }
.toast div { display: grid; }
.toast strong { font-size: .7rem; }
.toast small { margin-top: 2px; color: #9badbf; font-size: .6rem; line-height: 1.35; }
.toast button { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: none; color: #8295a9; cursor: pointer; }
.toast button:hover { background: rgba(255,255,255,.08); color: #fff; }
.toast button svg { width: 14px; height: 14px; }
@keyframes toast-in { from { opacity: 0; transform: translateX(25px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(25px); } }

.page-scrim { position: fixed; z-index: 25; inset: 0; background: rgba(0,7,16,.62); }

/* Responsive */
@media (max-width: 1120px) {
  .primary-nav { gap: 20px; }
  .primary-nav a { font-size: .75rem; }
  .header-actions .button-quiet { display: none; }
  .hero-scroll { display: none; }
  .verification-layout { gap: 60px; }
  .heritage-facts { grid-template-columns: repeat(2,1fr); }
  .module-grid { grid-template-columns: repeat(2,1fr); }
  .admin-overview { grid-template-columns: 1fr 1fr; }
  .overview-card.policy { grid-column: 1 / -1; min-height: 110px; }
}

@media (max-width: 900px) {
  :root { --header-height: 70px; }
  .container { width: min(calc(100% - 34px), var(--container)); }
  .nav-toggle { display: grid; }
  .primary-nav { position: fixed; z-index: 90; top: var(--header-height); right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 11px 20px 20px; border-bottom: 1px solid var(--line); background: rgba(2,11,24,.98); box-shadow: 0 18px 35px rgba(0,0,0,.3); }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 13px 8px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: .8rem; }
  .primary-nav a::after { display: none; }
  .header-actions { margin-left: 0; }
  .header-actions .button-gold { min-height: 39px; padding: 8px 13px; font-size: .7rem; }
  .brand-copy strong { font-size: 1.05rem; }
  .brand-copy span { font-size: .5rem; }
  .hero { min-height: 790px; }
  .hero-image { background-position: 60% center; }
  .hero-overlay { background: linear-gradient(90deg, rgba(2,11,24,.97), rgba(2,11,24,.77) 48%, rgba(2,11,24,.2)), linear-gradient(0deg,var(--navy-950),transparent 28%); }
  .hero-content { min-height: 790px; }
  .hero-copy { width: 72%; }
  .hero h1 { font-size: clamp(2.8rem, 8vw, 4.4rem); }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { min-height: 89px; }
  .trust-item + .trust-item { border-top: 1px solid var(--line); border-left: 0; }
  .split-intro { grid-template-columns: 1fr; gap: 25px; }
  .pillar-grid { grid-template-columns: 1fr; }
  .pillar-card { min-height: 320px; }
  .verification-layout { grid-template-columns: 1fr; gap: 45px; }
  .crest-stage { min-height: 460px; }
  .crest-halo { width: min(390px, 84vw); height: min(390px, 84vw); }
  .crest-stage img { width: 300px; }
  .join-section { grid-template-columns: auto 1fr; }
  .join-section .button { grid-column: 2; justify-self: start; }
  .footer-main { grid-template-columns: 1fr; gap: 45px; }
  .modal-layout { grid-template-columns: 34% 66%; }
  .modal-aside { padding-inline: 28px; }
  .modal-content { padding-inline: 45px; }
  .registration-shell { grid-template-columns: 30% 70%; }
  .registration-aside { padding-inline: 25px; }
  .registration-message h2 { font-size: 1.42rem; }
  .registration-content { padding-inline: 43px; }
  .admin-sidebar { transform: translateX(-100%); transition: transform .23s ease; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-workspace { margin-left: 0; }
  .admin-nav-toggle { display: grid; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .header-shell { width: calc(100% - 24px); gap: 6px; }
  .header-actions .button-gold { display: none; }
  .member-identity { display: none; }
  .member-pill { padding-right: 7px; }
  .hero { min-height: 760px; }
  .hero-image { background-position: 67% center; }
  .hero-overlay { background: linear-gradient(90deg, rgba(2,11,24,.98), rgba(2,11,24,.74) 70%, rgba(2,11,24,.35)), linear-gradient(0deg,var(--navy-950),transparent 35%); }
  .hero-content { min-height: 760px; align-items: flex-end; padding-top: 120px; padding-bottom: 95px; }
  .hero-copy { width: 100%; }
  .hero .eyebrow { max-width: 290px; }
  .hero h1 { max-width: 520px; font-size: clamp(2.55rem, 13vw, 3.8rem); }
  .hero-lede { max-width: 500px; margin-top: 22px; font-size: .91rem; line-height: 1.65; }
  .hero-actions { margin-top: 27px; }
  .hero-actions .button { flex: 1 1 185px; min-height: 49px; }
  .hero-note { align-items: flex-start; font-size: .66rem; }
  .trust-strip { margin-top: 0; }
  .trust-grid { width: 100%; border-right: 0; border-left: 0; border-radius: 0; }
  .trust-item { padding: 20px 25px; }
  .section { padding: 88px 0; }
  .section-intro h2, .verification-copy h2, .portal-section h2 { font-size: clamp(2.15rem, 10vw, 3.1rem); }
  .pillar-grid { margin-top: 40px; }
  .heritage-facts { grid-template-columns: 1fr; margin-top: 38px; }
  .heritage-fact { min-height: 92px; }
  .pillar-card { padding-inline: 28px; }
  .card-link { left: 28px; }
  .crest-stage { min-height: 390px; }
  .crest-halo { width: min(310px, 80vw); height: min(310px, 80vw); }
  .crest-stage img { width: 248px; }
  .crest-label { right: 0; bottom: 38px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-grid article { min-height: 245px; }
  .join-section { grid-template-columns: 1fr; gap: 22px; padding: 55px 28px; text-align: center; }
  .join-section > img { margin: auto; }
  .join-section .eyebrow { justify-content: center; }
  .join-section .button { grid-column: 1; justify-self: stretch; }
  .footer-main { padding-top: 55px; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: 35px; }
  .footer-bottom { align-items: flex-start; gap: 20px; }
  .modal { width: 100vw; height: 100dvh; border-radius: 0; }
  .external-frame-dialog { width: 100vw; height: 100dvh; }
  .external-frame-shell { border: 0; border-radius: 0; }
  .external-frame-header { min-height: 66px; gap: 10px; padding: 9px 10px 9px 12px; }
  .external-frame-mark { width: 37px; height: 37px; }
  .external-frame-heading p { display: none; }
  .external-frame-heading h2 { max-width: 42vw; font-size: .78rem; }
  .external-frame-controls { gap: 6px; }
  .external-frame-controls .modal-close { width: 38px; height: 38px; }
  .external-open-direct { width: 38px; min-height: 38px; justify-content: center; padding: 0; }
  .external-open-direct span { display: none; }
  .external-frame-address { min-height: 36px; padding-inline: 13px; }
  .external-frame-address small { display: none; }
  .external-frame-periods { padding: 6px 13px; }
  .external-frame-periods strong { position: sticky; left: -13px; z-index: 1; padding: 7px 7px 7px 13px; background: #fff; }
  .external-frame-footer { max-height: 76px; overflow-y: auto; padding: 6px 11px; font-size: .5rem; text-align: left; }
  .modal-layout { display: block; min-height: 100%; border-radius: 0; }
  .modal-aside { display: none; }
  .modal-content { min-height: 100dvh; padding: 76px 27px 35px; }
  .registration-shell { display: block; height: 100dvh; min-height: 0; border-radius: 0; }
  .registration-aside { display: none; }
  .registration-content { height: 100%; padding: 67px 24px 24px; }
  .registration-content .modal-close { top: 16px; right: 17px; }
  .mobile-step-label { display: flex; position: absolute; top: 22px; right: 68px; left: 24px; align-items: center; gap: 12px; color: #68798a; font-size: .62rem; font-weight: 740; }
  .mobile-step-label > div { flex: 1; height: 3px; overflow: hidden; border-radius: 99px; background: #dfe6e9; }
  .mobile-step-label i { display: block; width: 25%; height: 100%; border-radius: 99px; background: var(--cyan); transition: width .25s; }
  .form-grid { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .option-grid { grid-template-columns: 1fr; }
  .bank-reference dl { grid-template-columns: 1fr; }
  .application-summary dl { grid-template-columns: 1fr 1fr; }
  .year-grid { grid-template-columns: repeat(3,1fr); }
  .form-navigation { position: sticky; bottom: -24px; z-index: 3; margin-top: 25px; padding: 17px 0 24px; background: linear-gradient(transparent,#fff 13%); }
  .form-security { display: none; }
  .form-navigation .button { flex: 1; }
  .form-navigation .button-back { flex: 0 0 auto; }
  .review-card dl { grid-template-columns: 1fr 1fr; }
  .file-selected strong { max-width: 230px; }
  .success-modal { width: calc(100vw - 26px); height: auto; }
  .success-shell { padding: 47px 27px 30px; }
  .admin-topbar { padding-inline: 14px; }
  .admin-breadcrumb span, .admin-breadcrumb svg { display: none; }
  .admin-account > span:last-child { display: none; }
  .admin-content { width: calc(100% - 26px); padding-top: 34px; }
  .admin-heading { display: grid; }
  .admin-heading .button { justify-self: start; }
  .admin-overview { grid-template-columns: 1fr; }
  .overview-card.policy { grid-column: auto; }
  .queue-toolbar { align-items: stretch; flex-direction: column; gap: 15px; }
  .queue-tabs { padding-inline: 10px; overflow-x: auto; }
  .queue-tabs button { flex: 1 0 auto; justify-content: center; }
  .search-field { width: 100%; }
  .queue-panel table, .queue-panel thead, .queue-panel tbody, .queue-panel tr, .queue-panel td { display: block; }
  .queue-panel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .queue-panel tbody { padding: 0 17px; }
  .queue-panel tbody tr { position: relative; padding: 17px 0; border-bottom: 1px solid #e5ebed; }
  .queue-panel tbody tr:last-child { border-bottom: 0; }
  .queue-panel td { padding: 5px 0; border: 0; }
  .queue-panel td[data-label]::before { content: attr(data-label) ": "; color: #8a98a6; font-size: .58rem; }
  .queue-panel td:last-child { position: absolute; top: 17px; right: 0; }
  .applicant-cell { padding-right: 90px; }
  .review-button { min-height: 32px; }
  .review-modal { width: 100vw; height: 100dvh; }
  .review-shell { height: 100%; max-height: none; border-radius: 0; }
  .review-header, .review-body, .review-footer { padding-inline: 18px; }
  .applicant-banner { flex-wrap: wrap; }
  .batch-chip { width: 100%; margin: 3px 0 0 61px; text-align: center; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid-three { grid-template-columns: 1fr; }
  .detail-grid .detail-wide { grid-column: auto; }
  .form-history { grid-template-columns: repeat(3,1fr); }
  .approval-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .approval-grid { grid-template-columns: 1fr; }
  .review-footer { align-items: stretch; flex-direction: column; }
  .review-footer p { max-width: none; }
  .review-footer > div { display: grid; grid-template-columns: repeat(3,1fr); }
  .review-footer.legacy-decision > div { grid-template-columns: repeat(2,1fr); }
  .review-footer .button { padding-inline: 9px; }
}

@media (max-width: 390px) {
  .brand-copy span { display: none; }
  .hero h1 { font-size: 2.5rem; }
  .hero-actions .button { flex-basis: 100%; }
  .footer-links { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: repeat(2,1fr); }
  .registration-content { padding-inline: 19px; }
  .form-navigation .button { padding-inline: 13px; }
  .review-footer > div { grid-template-columns: 1fr; }
  .review-footer.legacy-decision > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Analytics workspace
   Sequential blue ramp for magnitude, reserved status hues for state. Marks
   stay thin, grids recessive, and every value is written out beside its mark
   so colour is never the only channel. */
.analytics-controls { display: flex; align-items: flex-end; gap: 12px; }
.analytics-controls .button { min-height: 38px; font-size: .65rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 14px; margin-top: 20px; }
.stat-row.compact { margin: 0; padding: 16px 22px 4px; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.stat-tile { display: grid; align-content: start; gap: 4px; padding: 16px 18px; border: 1px solid #dfe7ea; border-radius: 12px; background: #fff; }
.stat-label { color: #7a8998; font-size: .56rem; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.stat-value { color: var(--ink); font-size: 1.5rem; font-weight: 760; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile small { color: #8a98a6; font-size: .6rem; }

.viz-panel { margin-top: 22px; }
.viz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 22px; }
.viz-grid .viz-panel { margin-top: 22px; }
.viz-body { padding: 18px 22px 22px; }
.viz-subtitle { margin: 18px 0 10px; color: #5b6c7c; font-size: .58rem; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.viz-body > .viz-subtitle:first-child { margin-top: 0; }
.viz-empty { margin: 0; color: #8a98a6; font-size: .66rem; }
.viz-legend { display: inline-flex; align-items: center; gap: 3px; }
.viz-legend i { width: 15px; height: 10px; border-radius: 2px; }
.viz-legend small { color: #8a98a6; font-size: .56rem; font-variant-numeric: tabular-nums; }
.viz-legend small:first-child { margin-right: 4px; }
.viz-legend small:last-child { margin-left: 4px; }

.bar-rows { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(84px, 148px) 1fr auto; align-items: center; gap: 11px; border-radius: 6px; }
.bar-row:hover, .bar-row:focus-visible { background: #f7fafb; outline: none; }
.bar-label { overflow: hidden; color: #435669; font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 9px; overflow: hidden; border-radius: 4px; background: #eef2f4; }
.bar-track i { display: block; height: 100%; border-radius: 4px; }
.bar-value { color: #34475a; font-size: .62rem; font-weight: 740; font-variant-numeric: tabular-nums; }

.timeline { display: flex; align-items: flex-end; gap: 2px; height: 150px; padding-bottom: 2px; border-bottom: 1px solid #e4eaed; }
.timeline-column { display: flex; flex: 1 1 0; align-items: flex-end; min-width: 3px; height: 100%; border-radius: 3px; }
.timeline-column:hover, .timeline-column:focus-visible { background: #f2f7fb; outline: none; }
.timeline-column i { display: block; width: 100%; border-radius: 3px 3px 0 0; }
.timeline-axis { display: flex; justify-content: space-between; margin-top: 7px; color: #8a98a6; font-size: .57rem; }

.heatmap-scroll { overflow-x: auto; padding: 16px 22px 22px; }
.heatmap { display: grid; gap: 2px; min-width: 620px; }
.heatmap-row { display: grid; grid-template-columns: 62px repeat(24, 1fr); gap: 2px; align-items: center; }
.heatmap-day { color: #8a98a6; font-size: .55rem; text-align: right; padding-right: 6px; white-space: nowrap; }
.heatmap-hour { color: #98a6b3; font-size: .5rem; text-align: center; }
.heatmap-header { margin-bottom: 2px; }
.heatmap-cell { height: 13px; border-radius: 2px; }
.heatmap-cell:hover, .heatmap-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.cell-meter-wrap { min-width: 120px; }
.cell-meter { display: block; height: 5px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: #eef2f4; }
.cell-meter i { display: block; height: 100%; border-radius: 3px; background: #2a78d6; }
.cell-meter-wrap b { color: #34475a; font-size: .64rem; font-weight: 740; font-variant-numeric: tabular-nums; }
.analytics-path { max-width: 320px; overflow: hidden; color: #25394d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }

.live-dot { display: inline-flex; align-items: center; gap: 7px; color: #5b6c7c; font-size: .6rem; font-weight: 740; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #0ca30c; animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.live-badge { display: inline-flex; align-items: center; gap: 6px; color: #64768a; font-size: .6rem; font-weight: 720; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; }
.live-badge.is-active { color: #0c7254; }

.viz-tooltip { display: grid; position: fixed; z-index: 60; gap: 2px; max-width: 260px; padding: 9px 11px; border: 1px solid #d7e1e5; border-radius: 9px; background: #fff; box-shadow: 0 16px 40px rgba(12,32,48,.16); color: var(--ink); pointer-events: none; }
.viz-tooltip strong { font-size: .63rem; }
.viz-tooltip span { color: #64768a; font-size: .59rem; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------------
   Collections: twelve months of one year, three thin bars to a month. Bars sit
   on a single baseline, and the colour of a bar never carries meaning on its
   own — the legend, the hover tooltip and the table below all name the state.
   --------------------------------------------------------------------------- */
.viz-card { margin: 0 0 20px; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.viz-card figcaption { margin-bottom: 12px; }
.viz-card figcaption h3 { margin: 0; font-size: .78rem; }
.viz-card figcaption p { margin: 4px 0 0; max-width: 62ch; color: #64768a; font-size: .6rem; line-height: 1.5; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend-item i { width: 11px; height: 11px; flex: none; border-radius: 3px; }
.chart-legend-item b { color: var(--ink); font-size: .6rem; font-weight: 740; }
.chart-legend-item small { color: #8a98a6; font-size: .58rem; font-variant-numeric: tabular-nums; }
.month-chart { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 20px; border-bottom: 1px solid #e4eaed; }
.month-group { display: flex; flex: 1 1 0; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; border-radius: 4px 4px 0 0; }
.month-group:hover { background: #f5f8fb; }
.month-bar { display: flex; position: relative; flex: 1 1 0; align-items: flex-end; max-width: 16px; height: 100%; border-radius: 4px 4px 0 0; }
.month-bar:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.month-bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; transition: opacity .12s ease; }
.month-bar:hover i { opacity: .78; }
.month-bar b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 5px; color: #64768a; font-size: .53rem; font-variant-numeric: tabular-nums; font-weight: 760; white-space: nowrap; }
.month-axis { display: flex; gap: 8px; margin-top: 7px; }
.month-axis span { flex: 1 1 0; color: #8a98a6; font-size: .56rem; text-align: center; }
.viz-table { margin-top: 14px; }
.viz-table summary { color: #536678; font-size: .6rem; font-weight: 720; cursor: pointer; }
.viz-table[open] summary { margin-bottom: 10px; }

.approval-status.status-pending { background: #fff6cf; color: #78641c; }

@media (max-width: 720px) {
  /* Below this the twelve groups cannot hold three legible bars, so the chart
     scrolls sideways at a workable width rather than shrinking to hairlines. */
  .viz-card { padding: 16px 14px 14px; overflow-x: auto; }
  .month-chart, .month-axis { min-width: 520px; }
}

/* ---------------------------------------------------------------------------
   Mobile: member page, Moments feed, member dialogs and the analytics tables.
   The landing page, sign-in and application wizard already adapt above; these
   rules cover the member-facing views and the workspace tables added since.
   --------------------------------------------------------------------------- */

/* Tablet and below */
@media (max-width: 900px) {
  .member-profile-shell { width: min(calc(100% - 34px), var(--container)); padding: 26px 0 56px; }
  .feed-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .viz-grid { gap: 18px; }
  .analytics-controls { flex-wrap: wrap; width: 100%; }
  .analytics-controls .filter-field { flex: 1 1 160px; }
}

@media (max-width: 680px) {
  .member-page { padding-top: calc(var(--header-height) + 14px); }
  .member-profile-shell { width: calc(100% - 26px); padding: 20px 0 48px; }

  /* Tabs scroll sideways rather than wrapping into a ragged block. */
  .profile-tabs { gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .profile-tabs::-webkit-scrollbar { display: none; }
  .profile-tabs button { flex: 0 0 auto; min-height: 44px; padding: 10px 13px; font-size: .66rem; }

  .member-profile-meta { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .profile-completion { width: 100%; margin-left: 0; }
  .profile-completion > span { text-align: left; }
  .profile-progress { width: 100%; }
  .profile-toggles { grid-template-columns: 1fr; padding: 14px; }
  .role-toggle { align-items: flex-start; min-height: 34px; white-space: normal; }
  .profile-photo-upload { flex-wrap: wrap; }
  .profile-form-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .profile-form-actions .button { width: 100%; min-height: 46px; }

  .members-filterbar { padding: 12px 14px; }
  .members-filterbar .filter-field { flex: 1 1 140px; min-width: 0; }
  .letter-index { gap: 4px; padding: 10px 14px; }
  .letter-index button { min-width: 36px; height: 36px; }
  .pagination { flex-wrap: wrap; justify-content: center; gap: 12px; padding: 14px; }
  .pagination-pages button { width: 40px; height: 40px; }

  /* The approval queue puts its actions in the corner of each card; every other
     stacked table reads straight down instead. */
  .queue-panel td:last-child { position: static; }
  #queue-table-body td:last-child { position: absolute; top: 17px; right: 0; }
  .applicant-cell { padding-right: 0; }
  #queue-table-body .applicant-cell { padding-right: 90px; }
  .queue-panel tbody tr { padding: 15px 0; }
  .queue-panel td[data-label] { display: grid; grid-template-columns: 40% 1fr; gap: 10px; align-items: baseline; }
  .queue-panel td[data-label]::before { font-weight: 740; letter-spacing: .03em; text-transform: uppercase; }
  .queue-panel td.applicant-cell[data-label] { display: flex; }
  .queue-panel td.applicant-cell[data-label]::before { content: none; }
  .analytics-path { max-width: none; white-space: normal; overflow-wrap: anywhere; }
  .cell-meter-wrap { min-width: 0; }

  /* Moments */
  .feed-grid, .feed-loading { gap: 12px; }
  .feed-card { border-radius: 12px; }
  .feed-reaction { min-height: 40px; padding: 6px 13px; }
  .feed-delete { width: 40px; height: 40px; }
  .feed-composer { padding: 14px; }
  .feed-composer-actions .button { width: 100%; min-height: 46px; }
  .feed-composer-actions { row-gap: 10px; }
  .feed-counter { margin-left: auto; }
  .feed-more .button { width: 100%; min-height: 46px; }

  /* Moment viewer fills the screen, media above the caption. */
  .moment-lightbox { width: 100vw; height: 100dvh; }
  .lightbox-shell { grid-template-rows: minmax(0, 1fr) auto; height: 100dvh; max-height: none; border-radius: 0; }
  .lightbox-stage { min-height: 0; max-height: none; padding: 8px; }
  .lightbox-stage img, .lightbox-stage video { max-height: 100%; }
  .lightbox-panel { max-height: 42dvh; padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); }
  .lightbox-step { width: 44px; height: 44px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .moment-lightbox .modal-close.light { top: 12px; right: 12px; }

  /* Member record dialog */
  .member-detail-modal { width: 100vw; height: 100dvh; }
  .member-detail-shell { height: 100%; max-height: none; border-radius: 0; }
  .member-detail-header, .member-detail-body { padding-inline: 18px; }
  .member-detail-banner { flex-wrap: wrap; gap: 10px; }
  .member-detail-badges { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .member-detail-grid { grid-template-columns: 1fr; }

  .change-password-modal { width: 100vw; height: 100dvh; }
  .change-password-shell { height: 100%; border-radius: 0; }
  .change-password-body { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }

  /* Analytics */
  .stat-row { gap: 10px; margin-top: 16px; }
  .stat-value { font-size: 1.3rem; }
  .viz-body { padding: 16px 14px 18px; }
  .heatmap-scroll { padding: 14px; }
  .bar-row { grid-template-columns: minmax(72px, 40%) 1fr auto; gap: 8px; }
  .email-log-tooltip, .viz-tooltip { width: min(300px, calc(100vw - 20px)); }
}

@media (max-width: 390px) {
  .member-profile-shell { width: calc(100% - 20px); }
  .feed-composer-actions small { flex-basis: 100%; }
  .letter-index button { min-width: 32px; height: 32px; }
  .queue-panel td[data-label] { grid-template-columns: 1fr; gap: 2px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}

/* Coarse pointers get comfortable hit targets regardless of viewport width. */
@media (pointer: coarse) {
  .feed-reaction, .review-button, .members-remind-button, .email-count-chip { min-height: 40px; }
  .letter-index button, .pagination-pages button { min-width: 40px; height: 40px; }
  .profile-tabs button, .queue-tabs button { min-height: 46px; }
}

/* ---------------------------------------------------------------------------
   Newsroom: the back office editor, the article datagrid, and the member-facing
   News tab and reader.
   --------------------------------------------------------------------------- */
.reaction-tally { display: inline-flex; gap: 6px; }
.tally { display: inline-flex; min-width: 30px; min-height: 24px; align-items: center; justify-content: center; padding: 3px 7px; border-radius: 99px; font-size: .58rem; font-weight: 780; font-variant-numeric: tabular-nums; }
.tally-like { background: #eaf7fa; color: #087f9b; }
.tally-love { background: #fbecef; color: #9b2e3e; }
.tally-unlike { background: #edf2f4; color: #64768a; }

/* Editor */
.news-editor-modal { width: min(1240px, calc(100vw - 24px)); }
.news-editor-shell { display: flex; max-height: calc(100vh - 30px); flex-direction: column; overflow: hidden; border-radius: 18px; background: #f7f9fa; color: var(--ink); }
.news-editor-header { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-bottom: 1px solid #dfe7ea; background: #fff; }
.news-editor-header h2 { margin: 0; font-size: 1.1rem; letter-spacing: -.02em; }
.news-editor-header .kicker { margin-bottom: 3px; color: #8a98a6; font-size: .56rem; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.news-editor-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.news-editor-actions .button { min-height: 38px; padding: 8px 15px; font-size: .64rem; }
.news-editor-actions .modal-close { position: static; }
.news-editor-body { display: grid; grid-template-columns: minmax(0, 1fr) 288px; overflow: hidden; }
.news-editor-main { overflow-y: auto; padding: 20px 24px 26px; }
.news-meta-grid { display: grid; grid-template-columns: 1fr 220px; gap: 14px; }
.news-meta-grid .field-wide { grid-column: 1 / -1; }

.editor-toolbar { display: flex; position: sticky; top: 0; z-index: 4; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding: 8px; border: 1px solid #dfe7ea; border-radius: 10px; background: #fff; }
.toolbar-group { display: inline-flex; position: relative; align-items: center; gap: 2px; padding-right: 6px; border-right: 1px solid #eef2f4; }
.toolbar-group:last-child { border-right: 0; padding-right: 0; }
.editor-toolbar button { display: grid; min-width: 32px; height: 32px; place-items: center; padding: 0 7px; border-radius: 7px; background: none; color: #435669; font-size: .68rem; font-weight: 720; cursor: pointer; }
.editor-toolbar button:hover { background: #eef4f6; color: var(--ink); }
.editor-toolbar button.active { background: #eaf7fa; color: #087f9b; }
.editor-toolbar svg { width: 16px; height: 16px; }
.editor-toolbar select { min-height: 32px; padding: 0 8px; border: 1px solid #dfe7ea; border-radius: 7px; background: #fff; color: #435669; font-size: .63rem; }
.colour-chip { display: block; width: 16px; height: 16px; border: 1px solid #cbd7dd; border-radius: 4px; background: linear-gradient(135deg, #0b1827 50%, #9b2e3e 50%); }
.colour-popover { display: grid; position: absolute; z-index: 6; top: 38px; left: 0; gap: 6px; width: 208px; padding: 12px; border: 1px solid #d7e1e5; border-radius: 10px; background: #fff; box-shadow: 0 18px 44px rgba(12,32,48,.16); }
.colour-popover h4 { margin: 0; color: #7a8998; font-size: .54rem; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.colour-row { display: flex; flex-wrap: wrap; gap: 6px; }
.colour-swatch { width: 26px; height: 26px; border: 1px solid #cbd7dd; border-radius: 6px; cursor: pointer; }

.editor-blocks { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; }
.editor-blocks > span { color: #7a8998; font-size: .56rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.editor-blocks button { min-height: 30px; padding: 6px 11px; border: 1px dashed #c8d6dd; border-radius: 99px; background: #fff; color: #48607a; font-size: .61rem; font-weight: 700; cursor: pointer; }
.editor-blocks button:hover { border-style: solid; border-color: var(--cyan); color: #087f9b; }

.editor-canvas { min-height: 340px; margin-top: 12px; padding: 26px 30px; border: 1px solid #dfe7ea; border-radius: 12px; background: #fff; color: #23364a; font-size: .78rem; line-height: 1.75; }
.editor-canvas:focus { border-color: var(--cyan); outline: 0; box-shadow: 0 0 0 3px rgba(8,164,200,.08); }
.editor-hint { margin: 10px 2px 0; color: #8a98a6; font-size: .6rem; }

.news-editor-side { overflow-y: auto; padding: 20px 20px 26px; border-left: 1px solid #dfe7ea; background: #fff; }
.side-panel + .side-panel { margin-top: 22px; padding-top: 20px; border-top: 1px solid #eef2f4; }
.side-panel h3 { margin: 0 0 10px; color: #5b6c7c; font-size: .56rem; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.cover-preview { display: grid; overflow: hidden; aspect-ratio: 16 / 9; place-items: center; border: 1px dashed #cbd7dd; border-radius: 10px; background: #f7fafb; color: #8a98a6; font-size: .6rem; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.side-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.side-actions .button { flex: 1 1 auto; min-height: 34px; padding: 7px 10px; font-size: .6rem; }
.review-note { margin: 0; padding: 11px 13px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; background: #fffdf1; color: #6b6033; font-size: .65rem; line-height: 1.6; }
.activity-log { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.activity-log li { display: grid; gap: 2px; padding-left: 11px; border-left: 2px solid #e1eef2; }
.activity-log strong { color: #34475a; font-size: .63rem; font-weight: 700; text-transform: capitalize; }
.activity-log small { color: #8a98a6; font-size: .56rem; }
.activity-log em { margin-top: 3px; color: #64768a; font-size: .6rem; font-style: normal; line-height: 1.5; }

/* Stock picker */
.stock-dialog { width: min(1000px, calc(100vw - 24px)); }
.stock-shell { display: flex; max-height: calc(100vh - 40px); flex-direction: column; overflow: hidden; border-radius: 18px; background: #f7f9fa; color: var(--ink); }
.stock-search { display: flex; gap: 10px; padding: 16px 24px 6px; }
.stock-search .search-field { flex: 1; width: auto; }
.stock-note { margin: 0; padding: 6px 24px 12px; color: #7a8998; font-size: .61rem; }
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; overflow-y: auto; padding: 0 24px 24px; }
.stock-card { display: grid; overflow: hidden; padding: 0; border: 1px solid #dfe7ea; border-radius: 10px; background: #fff; cursor: pointer; }
.stock-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.stock-card small { padding: 7px 9px; color: #7a8998; font-size: .56rem; text-align: left; }
.stock-card:hover { border-color: var(--cyan); }

/* Article body, shared by the editor canvas and the member reader */
.editor-canvas h2, .news-article h2 { margin: 26px 0 10px; font-size: 1.24rem; letter-spacing: -.02em; }
.editor-canvas h3, .news-article h3 { margin: 22px 0 8px; font-size: 1rem; }
.editor-canvas h4, .news-article h4 { margin: 18px 0 6px; font-size: .84rem; }
.editor-canvas p, .news-article p { margin: 0 0 14px; }
.editor-canvas ul, .editor-canvas ol, .news-article ul, .news-article ol { margin: 0 0 14px; padding-left: 22px; }
.editor-canvas li, .news-article li { margin-bottom: 6px; }
.editor-canvas img, .news-article img { max-width: 100%; height: auto; border-radius: 10px; }
.editor-canvas video, .news-article video { width: 100%; border-radius: 10px; background: #0b1a2d; }
.editor-canvas figure, .news-article figure { margin: 18px 0; }
.editor-canvas figcaption, .news-article figcaption { margin-top: 7px; color: #7a8998; font-size: .63rem; }
.editor-canvas table, .news-article table { width: 100%; margin: 18px 0; border-collapse: collapse; font-size: .72rem; }
.editor-canvas th, .editor-canvas td, .news-article th, .news-article td { padding: 9px 11px; border: 1px solid #dfe7ea; text-align: left; }
.editor-canvas th, .news-article th { background: #f4f8f9; font-weight: 760; }
.editor-canvas hr, .news-article hr { margin: 24px 0; border: 0; border-top: 1px solid #dfe7ea; }
.news-callout { margin: 20px 0; padding: 16px 18px; border-left: 3px solid var(--cyan); border-radius: 0 10px 10px 0; background: #f2fbfd; }
.news-callout p:last-child, .news-columns p:last-child { margin-bottom: 0; }
.news-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; margin: 20px 0; }
.news-pullquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold); font-size: 1.02rem; font-style: italic; line-height: 1.6; }
.news-pullquote figcaption { font-size: .62rem; font-style: normal; }
.news-embed { position: relative; margin: 20px 0; padding-bottom: 56.25%; }
.news-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }

/* Member News tab */
.news-filter { border-bottom: 0; padding-inline: 0; background: none; }
.news-grid { display: flex; align-items: flex-start; gap: 18px; margin-top: 18px; }
.news-column { display: grid; flex: 1 1 0; align-content: start; gap: 18px; min-width: 0; }
.news-grid:empty { display: none; }
.news-card { display: flex; overflow: hidden; flex-direction: column; border: 1px solid #e0e8eb; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(18,47,67,.05); }
.news-card:hover { border-color: #cfdde3; box-shadow: 0 16px 40px rgba(18,47,67,.09); }
.news-card-open { display: grid; flex: 1; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.news-card-open:focus-visible { outline: 3px solid var(--cyan-light); outline-offset: -3px; }
.news-card-cover { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #eef3f5; }
.news-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card-copy { display: grid; align-content: start; gap: 7px; padding: 16px 17px; }
.news-card-tag { justify-self: start; padding: 3px 9px; border-radius: 99px; background: #eaf7fa; color: #087f9b; font-size: .55rem; font-style: normal; font-weight: 780; letter-spacing: .04em; text-transform: uppercase; }
.news-card-copy strong { color: var(--ink); font-size: .88rem; line-height: 1.35; letter-spacing: -.01em; }
.news-card-summary { color: #64768a; font-size: .68rem; line-height: 1.55; }
.news-card-copy small { color: #8a98a6; font-size: .58rem; }
.news-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 15px 13px; }
.news-card-footer .feed-reactions { padding-top: 11px; border-top: 0; }
.news-card-readers { color: #8a98a6; font-size: .58rem; font-variant-numeric: tabular-nums; }

/* Member article reader */
.news-reader-modal { width: min(860px, calc(100vw - 24px)); }
.news-reader-shell { position: relative; max-height: calc(100vh - 34px); overflow-y: auto; border-radius: 18px; background: #fff; color: var(--ink); }
.news-reader-cover { overflow: hidden; aspect-ratio: 21 / 9; background: #eef3f5; }
.news-reader-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-reader-body { padding: 30px 40px 36px; }
.news-reader-meta { margin: 0 0 10px; color: #8a98a6; font-size: .6rem; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.news-reader-body h1 { margin: 0 0 12px; font-size: 1.72rem; line-height: 1.2; letter-spacing: -.03em; }
.news-reader-standfirst { margin: 0 0 22px; color: #526478; font-size: .86rem; line-height: 1.6; }
.news-article { color: #23364a; font-size: .8rem; line-height: 1.78; }
.news-reader-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid #eef2f4; }
.news-reader-readers { color: #8a98a6; font-size: .62rem; }

@media (max-width: 900px) {
  .news-editor-body { grid-template-columns: 1fr; }
  .news-editor-side { border-left: 0; border-top: 1px solid #dfe7ea; }
  .news-meta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .news-editor-modal, .stock-dialog, .news-reader-modal { width: 100vw; height: 100dvh; }
  .news-editor-shell, .stock-shell { height: 100%; max-height: none; border-radius: 0; }
  .news-reader-shell { max-height: none; height: 100%; border-radius: 0; }
  .news-editor-header { flex-wrap: wrap; padding: 14px 16px; }
  .news-editor-actions { width: 100%; flex-wrap: wrap; margin-left: 0; }
  .news-editor-actions .button { flex: 1 1 auto; }
  .news-editor-actions .modal-close { position: absolute; top: 12px; right: 12px; }
  .news-editor-main { padding: 16px; }
  .editor-canvas { padding: 18px 16px; }
  .news-reader-body { padding: 22px 20px 28px; }
  .news-reader-body h1 { font-size: 1.35rem; }
  .news-reader-footer { align-items: flex-start; flex-direction: column; }
  .news-grid { gap: 14px; }
}

/* .button-outline is drawn for the dark landing page, where white text on a
   translucent border is right. On the light workspace and member surfaces that
   renders white on white, so it is restated here with real contrast. */
body.admin-mode .button-outline,
body.member-mode .button-outline,
.news-editor-shell .button-outline,
.stock-shell .button-outline,
.news-reader-shell .button-outline {
  border-color: #c3d1d8;
  background: #fff;
  color: #25465a;
  backdrop-filter: none;
}
body.admin-mode .button-outline:hover:not(:disabled),
body.member-mode .button-outline:hover:not(:disabled),
.news-editor-shell .button-outline:hover:not(:disabled),
.stock-shell .button-outline:hover:not(:disabled),
.news-reader-shell .button-outline:hover:not(:disabled) {
  border-color: var(--cyan);
  background: #f2fbff;
  color: #087f9b;
}

/* The cover panel's actions are the primary way to get a picture in, so they
   read as buttons rather than as faint outlines. */
.side-actions .button { min-height: 38px; padding: 8px 12px; font-size: .63rem; font-weight: 740; }
.side-actions .button svg { width: 15px; height: 15px; }
.cover-preview { border-color: #c3d1d8; }

/* Star rating: five stars plus the running average. The number is always shown
   beside the stars, so the score never depends on counting filled shapes. */
.news-rating { display: flex; align-items: center; gap: 2px; padding: 0 15px; }
.news-rating .star { display: grid; width: 26px; height: 26px; place-items: center; padding: 0; border-radius: 6px; background: none; color: #c8d4dc; cursor: pointer; }
.news-rating .star svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.news-rating .star:hover { color: #e0a92a; }
.news-rating .star.on { color: #f0b429; }
.news-rating .star:disabled { cursor: progress; }
.star-summary { margin-left: 7px; color: #8a98a6; font-size: .6rem; font-weight: 720; font-variant-numeric: tabular-nums; }

.news-card-footer { padding-top: 4px; }
.news-card .news-rating { padding-top: 10px; }

/* The reader is a framed window: a title bar that stays put, a scrolling body,
   and a footer that keeps the rating and reactions in reach. */
.news-reader-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: min(88vh, 900px); max-height: none; overflow: hidden; border-radius: 18px; background: #fff; }
.news-reader-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e2e9ec; background: var(--navy-900); color: #fff; }
.news-reader-bar strong { overflow: hidden; flex: 1; font-size: .78rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.news-reader-bar .modal-close.light { display: grid; position: static; flex: 0 0 auto; }
.news-reader-chip { padding: 4px 10px; border-radius: 99px; background: rgba(8,164,200,.18); color: var(--cyan-light); font-size: .55rem; font-weight: 780; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.news-reader-scroll { overflow-y: auto; }
.news-reader-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0; padding: 12px 22px; border-top: 1px solid #eef2f4; background: #fbfcfd; }
.news-reader-footer .news-rating { padding: 0; }
.news-reader-footer .feed-reactions { padding-top: 0; border-top: 0; }
.news-reader-footer .news-reader-readers { margin-left: auto; }

@media (max-width: 680px) {
  .news-reader-shell { height: 100dvh; border-radius: 0; }
  .news-reader-bar { padding: 12px 14px; }
  .news-reader-footer { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .news-reader-footer .news-reader-readers { margin-left: 0; }
  .news-grid { gap: 12px; }
  .news-rating .star { width: 34px; height: 34px; }
}

/* Reader response in the newsroom: the members' rating leads the tally. */
.tally-rating { display: inline-flex; gap: 4px; padding-inline: 8px; background: #f4f6f8; color: #8a98a6; }
.tally-rating.has-rating { background: #fff6e2; color: #8a6410; }
.tally-rating svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.rating-breakdown { display: grid; gap: 5px; margin-top: 14px; }
.breakdown-row { display: grid; grid-template-columns: 26px 1fr 22px; align-items: center; gap: 8px; }
.breakdown-row span:first-child { color: #8a98a6; font-size: .58rem; font-weight: 720; }
.breakdown-row .bar-track { height: 7px; }
.breakdown-row b { color: #64768a; font-size: .58rem; font-variant-numeric: tabular-nums; text-align: right; }
#news-stats-panel .stat-row.compact { padding: 0; grid-template-columns: 1fr 1fr; gap: 8px; }
#news-stats-panel .stat-tile { padding: 10px 11px; }
#news-stats-panel .stat-value { font-size: 1.05rem; }

/* Selected media in the editor: a floating toolbar and a corner drag handle,
   both positioned over the canvas rather than inside it, so neither becomes
   part of the saved article. */
.editor-canvas img.is-selected,
.editor-canvas video.is-selected { outline: 2px solid var(--cyan); outline-offset: 2px; }
.editor-canvas img, .editor-canvas video { cursor: pointer; }
.media-tools { display: flex; position: fixed; z-index: 60; align-items: center; gap: 6px; padding: 6px; border: 1px solid #d7e1e5; border-radius: 10px; background: #fff; box-shadow: 0 14px 36px rgba(12,32,48,.18); }
.media-tools-label { padding: 0 6px; color: #7a8998; font-size: .55rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.media-tools .toolbar-group { gap: 2px; }
.media-tools button { display: grid; min-width: 32px; height: 30px; place-items: center; padding: 0 8px; border-radius: 7px; background: none; color: #435669; font-size: .6rem; font-weight: 740; cursor: pointer; }
.media-tools button:hover { background: #eef4f6; color: var(--ink); }
.media-tools svg { width: 15px; height: 15px; }
.media-tools .media-delete { color: var(--danger); }
.media-tools .media-delete:hover { background: var(--danger-soft); }
.media-resize-handle { position: fixed; z-index: 61; width: 18px; height: 18px; border: 2px solid #fff; border-radius: 4px; background: var(--cyan); box-shadow: 0 2px 8px rgba(12,32,48,.3); cursor: nwse-resize; touch-action: none; }
body.is-resizing-media { user-select: none; }
body.is-resizing-media * { cursor: nwse-resize !important; }

/* Alignment applies to the figure, so a caption travels with its picture.
   Shared by the editor canvas and the published article. */
.editor-canvas .align-center, .news-article .align-center { margin-inline: auto; text-align: center; }
.editor-canvas .align-left, .news-article .align-left { margin-inline: 0 auto; text-align: left; }
.editor-canvas .align-right, .news-article .align-right { margin-inline: auto 0; text-align: right; }
.editor-canvas figure.align-left img, .editor-canvas figure.align-left video,
.news-article figure.align-left img, .news-article figure.align-left video { margin-inline: 0 auto; }
.editor-canvas figure.align-right img, .editor-canvas figure.align-right video,
.news-article figure.align-right img, .news-article figure.align-right video { margin-inline: auto 0; }
.editor-canvas figure img, .editor-canvas figure video,
.news-article figure img, .news-article figure video { display: block; }
/* A picture pasted without a figure around it still aligns. */
.editor-canvas img.align-left, .editor-canvas img.align-center, .editor-canvas img.align-right,
.editor-canvas video.align-left, .editor-canvas video.align-center, .editor-canvas video.align-right,
.news-article img.align-left, .news-article img.align-center, .news-article img.align-right,
.news-article video.align-left, .news-article video.align-center, .news-article video.align-right { display: block; }

/* ---------------------------------------------------------------------------
   Fund raising. One track carries two figures — the paler bar is what members
   promised, the solid bar is what has actually reached the Foundation — and
   both are written out beside it, so the bar is never the only way to read them.
   --------------------------------------------------------------------------- */
.fund-track { display: block; position: relative; height: 9px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #eef2f4; }
.fund-track i { display: block; position: absolute; top: 0; left: 0; height: 100%; border-radius: 99px; }
.fund-pledged { background: #b7d3f6; }
.fund-collected { background: #2a78d6; }
.fund-progress { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.fund-progress .fund-track { flex: 1; margin-top: 0; min-width: 90px; }
.fund-progress b { color: #25465a; font-size: .6rem; font-weight: 760; font-variant-numeric: tabular-nums; }

.money-cell { color: #25394d; font-weight: 720; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-cell.is-collected { color: #0c7254; }
.money-cell.is-outstanding { color: #8a6410; }

/* Member appeal cards */
.fund-card .news-card-copy { padding-bottom: 6px; }
.fund-card-footer { padding: 0 17px 15px; }
.fund-progress-block { display: grid; gap: 10px; }
.fund-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fund-figure { display: grid; gap: 1px; }
.fund-figure strong { font-size: .76rem; font-weight: 760; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fund-figure small { color: #8a98a6; font-size: .53rem; }
.fund-figure.is-pledged strong { color: #4a7fbd; }
.fund-figure.is-collected strong { color: #0c7254; }
.fund-figure.is-target strong { color: #64768a; }
.fund-card-meta { margin: 11px 0 0; color: #8a98a6; font-size: .58rem; }

/* Appeal reader */
.fund-progress-panel { margin-bottom: 22px; padding: 16px 18px; border: 1px solid #e0e8eb; border-radius: 12px; background: #fbfcfd; }
.fund-pledge-block { margin-top: 30px; padding: 20px 22px; border: 1px solid #dfe7ea; border-radius: 14px; background: #f7fbfc; }
.fund-pledge-block h3 { margin: 0 0 14px; font-size: .9rem; }
.fund-pledge-form { display: grid; grid-template-columns: 160px 1fr auto; align-items: end; gap: 12px; }
.fund-pledge-form .role-toggle { grid-column: 1 / -1; }
.fund-pledge-form .button { min-height: 42px; padding: 10px 22px; }
.fund-pledge-note { margin: 12px 0 0; color: #7a8998; font-size: .62rem; }
.my-pledges { margin-top: 16px; }
.my-pledges h4 { margin: 0 0 8px; color: #5b6c7c; font-size: .56rem; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.my-pledges ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.my-pledges li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #e0e8eb; border-radius: 9px; background: #fff; }
.my-pledges strong { color: var(--ink); font-size: .7rem; font-variant-numeric: tabular-nums; }
.my-pledges small { color: #7a8998; font-size: .6rem; }
.pledge-cancel { margin-left: auto; padding: 5px 10px; border: 1px solid #e0d0d3; border-radius: 7px; background: #fff; color: var(--danger); font-size: .58rem; font-weight: 720; cursor: pointer; }
.pledge-cancel:hover { background: var(--danger-soft); }
.fund-supporters { margin-top: 28px; }
.fund-supporters h3 { margin: 0 0 12px; font-size: .9rem; }
.supporter-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.supporter-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 13px; border-radius: 9px; background: #f7fafb; }
.supporter-list strong { color: var(--ink); font-size: .7rem; }
.supporter-list span { color: #0c7254; font-size: .7rem; font-weight: 740; font-variant-numeric: tabular-nums; }
.supporter-list small { grid-column: 1 / -1; color: #7a8998; font-size: .61rem; font-style: italic; }

/* Back office pledge grid */
.pledges-modal { width: min(1320px, calc(100vw - 24px)); }
.pledges-shell { display: flex; max-height: calc(100vh - 30px); flex-direction: column; overflow: hidden; border-radius: 18px; background: #f7f9fa; color: var(--ink); }
.pledges-table-wrap { overflow: auto; padding: 0 4px 8px; }
.receipt-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; min-width: 160px; }
.receipt-list li { display: flex; align-items: baseline; gap: 7px; }
.receipt-list strong { color: #0c7254; font-size: .64rem; font-variant-numeric: tabular-nums; }
.receipt-list small { color: #8a98a6; font-size: .55rem; }
.receipt-slip { color: #087f9b; font-size: .55rem; font-weight: 720; text-decoration: underline; text-underline-offset: 2px; }
.receipt-remove { margin-left: auto; padding: 0 5px; border-radius: 5px; background: none; color: #b0bcc6; font-size: .8rem; line-height: 1; cursor: pointer; }
.receipt-remove:hover { background: var(--danger-soft); color: var(--danger); }
.pledge-message { display: block; margin-top: 4px; color: #7a8998; font-size: .58rem; font-style: italic; }
.pledge-remark { max-width: 200px; color: #64768a; font-size: .61rem; }
.pledge-percent { margin-left: 6px; color: #8a6410; font-size: .56rem; font-weight: 740; }
.email-last { margin-left: 6px; color: #8a98a6; font-size: .54rem; }

.receipt-modal { width: min(640px, calc(100vw - 24px)); }
.receipt-shell { display: flex; max-height: calc(100vh - 40px); flex-direction: column; overflow: hidden; border-radius: 18px; background: #f7f9fa; color: var(--ink); }
.receipt-body { overflow-y: auto; padding: 20px 24px; }
.receipt-context { margin: 0 0 16px; padding: 11px 13px; border-radius: 9px; background: #eef6f9; color: #25465a; font-size: .66rem; }
.receipt-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid #e2e9ec; background: #fff; }
.receipt-footer .button { min-height: 40px; font-size: .65rem; }

@media (max-width: 900px) {
  .fund-pledge-form { grid-template-columns: 1fr; }
  .fund-pledge-form .button { width: 100%; }
}

@media (max-width: 680px) {
  .pledges-modal, .receipt-modal, .fund-reader-modal { width: 100vw; height: 100dvh; }
  .pledges-shell, .receipt-shell { height: 100%; max-height: none; border-radius: 0; }
  .fund-figures { grid-template-columns: 1fr 1fr; }
  .fund-pledge-block { padding: 16px; }
  .pledge-remark { max-width: none; }
}

/* ---------------------------------------------------------------------------
   The Constitution ebook. Two leaves of the same PDF side by side, each an
   iframe pointed at a different page, so the browser's own PDF engine renders
   it and the portal carries no viewer library.
   --------------------------------------------------------------------------- */
.verification-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
.verification-actions .button-outline { gap: 9px; }
.verification-actions .button-outline svg { width: 17px; height: 17px; }

.ebook-dialog { width: min(1280px, calc(100vw - 24px)); border: 0; background: none; }
.ebook-dialog::backdrop { background: rgba(3, 9, 18, .9); }
.ebook-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: min(92vh, 940px); overflow: hidden; border-radius: 18px; background: var(--navy-900); color: #fff; }
.ebook-bar { display: flex; align-items: center; gap: 16px; padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.ebook-heading .kicker { margin: 0 0 3px; color: #8fa1b4; font-size: .54rem; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
.ebook-heading h2 { margin: 0; font-size: 1.02rem; letter-spacing: -.02em; }
.ebook-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ebook-link { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: #c3d2df; font-size: .62rem; font-weight: 700; text-decoration: none; }
.ebook-link:hover { border-color: var(--cyan); color: #fff; }
.ebook-link svg { width: 15px; height: 15px; }
.ebook-controls .modal-close.light { display: grid; position: static; }

.ebook-stage { display: flex; position: relative; align-items: center; justify-content: center; gap: 14px; min-height: 0; padding: 18px; background: #050d18; }
.ebook-book { display: grid; position: relative; grid-template-columns: 1fr auto 1fr; width: 100%; height: 100%; max-width: 1080px; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.ebook-leaf { position: relative; min-width: 0; background: #fff; }
.ebook-leaf iframe { display: block; width: 100%; height: 100%; border: 0; }
.ebook-leaf.is-blank { background: #f2f5f7; }
.ebook-leaf.is-blank iframe { display: none; }
/* The spine, so the two leaves read as one open book rather than two panes. */
.ebook-spine { width: 22px; background: linear-gradient(90deg, rgba(11,24,39,.16), rgba(11,24,39,.03) 32%, rgba(255,255,255,0) 50%, rgba(11,24,39,.03) 68%, rgba(11,24,39,.16)); }
.ebook-turn { display: grid; flex: 0 0 auto; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; }
.ebook-turn:hover:not(:disabled) { background: rgba(255,255,255,.2); }
.ebook-turn:disabled { opacity: .25; cursor: not-allowed; }
.ebook-turn svg { width: 22px; height: 22px; }
.ebook-state { display: grid; position: absolute; inset: 18px; place-items: center; border-radius: 8px; background: #050d18; color: #8fa1b4; font-size: .72rem; text-align: center; }
.ebook-state p { max-width: 420px; margin: 0; padding: 0 24px; line-height: 1.6; }

.ebook-footer { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.09); }
.ebook-pages { color: #c3d2df; font-size: .66rem; font-weight: 720; font-variant-numeric: tabular-nums; }
.ebook-jump input { width: 84px; min-height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(255,255,255,.06); color: #fff; font-size: .63rem; }
.ebook-hint { margin-left: auto; color: #7f92a6; font-size: .6rem; }

@media (max-width: 860px) {
  /* One leaf at a time on a narrow screen; a spread would be unreadable. */
  .ebook-book { grid-template-columns: 1fr; }
  .ebook-spine, .ebook-leaf-right { display: none; }
  .ebook-hint { display: none; }
}

@media (max-width: 680px) {
  .ebook-dialog { width: 100vw; height: 100dvh; }
  .ebook-shell { height: 100dvh; border-radius: 0; }
  .ebook-bar { padding: 12px 14px; }
  .ebook-heading h2 { font-size: .86rem; }
  .ebook-link span { display: none; }
  .ebook-link { padding: 7px 9px; }
  .ebook-stage { gap: 6px; padding: 10px; }
  .ebook-turn { width: 40px; height: 40px; }
  .ebook-footer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
}

/* Documentation. A fixed contents column beside a scrolling body, and print
   styles so the whole set can be saved as a PDF. */
.docs-layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 24px; margin-top: 22px; align-items: start; }
.docs-nav { display: grid; position: sticky; top: calc(var(--header-height) + 14px); gap: 3px; padding: 12px; border: 1px solid #dfe7ea; border-radius: 12px; background: #fff; }
.docs-nav button { padding: 9px 12px; border-radius: 8px; background: none; color: #56697c; font-size: .66rem; font-weight: 700; text-align: left; cursor: pointer; }
.docs-nav button:hover { background: #f2f7f9; color: var(--ink); }
.docs-nav button.active { background: #eaf7fa; color: #087f9b; }
.docs-body { min-width: 0; padding: 26px 30px 32px; border: 1px solid #dfe7ea; border-radius: 12px; background: #fff; }
.docs-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.docs-download-card { display: flex; align-items: center; gap: 15px; margin: 22px 0; padding: 18px; border: 1px solid #d9e4e8; border-radius: 12px; background: linear-gradient(135deg,#f6fbfc,#fff); box-shadow: 0 8px 24px rgba(19,48,66,.06); }
.docs-download-icon { display: grid; flex: 0 0 auto; width: 48px; height: 48px; place-items: center; border-radius: 10px; background: #d35230; color: #fff; font-size: 1.25rem; font-weight: 850; }
.docs-download-copy { display: grid; min-width: 0; gap: 4px; margin-right: auto; }
.docs-download-copy strong { color: var(--ink); font-size: .74rem; }
.docs-download-copy small { color: #788995; font-size: .58rem; line-height: 1.4; }
.docs-h2 { margin: 0 0 18px; font-size: 1.32rem; letter-spacing: -.03em; }
.docs-h3 { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 10px; font-size: .92rem; letter-spacing: -.01em; }
.docs-h3:first-of-type { margin-top: 8px; }
.docs-rowcount { color: #8a98a6; font-size: .58rem; font-weight: 600; }
.docs-p { margin: 0 0 13px; color: #435669; font-size: .74rem; line-height: 1.75; max-width: 74ch; }
.docs-list, .docs-steps { margin: 0 0 15px; padding-left: 20px; color: #435669; font-size: .73rem; line-height: 1.7; max-width: 78ch; }
.docs-list li, .docs-steps li { margin-bottom: 7px; }
.docs-list strong, .docs-steps strong { color: var(--ink); }
.docs-steps { counter-reset: step; }
.docs-note { display: grid; gap: 4px; margin: 16px 0; padding: 13px 16px; border-left: 3px solid var(--cyan); border-radius: 0 9px 9px 0; background: #f2fbfd; }
.docs-note.warning { border-left-color: #fab219; background: #fffaf0; }
.docs-note.critical { border-left-color: var(--danger); background: var(--danger-soft); }
.docs-note strong { color: var(--ink); font-size: .62rem; font-weight: 780; letter-spacing: .05em; text-transform: uppercase; }
.docs-note p { margin: 0; color: #435669; font-size: .71rem; line-height: 1.65; }
.docs-table { font-size: .68rem; }
.docs-table td { vertical-align: top; }
.docs-table td:first-child { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .63rem; white-space: nowrap; }
.docs-table-card { margin: 22px 0; padding: 16px 18px; border: 1px solid #e8edef; border-radius: 11px; background: #fbfcfd; }
.docs-table-card .table-wrap { background: #fff; border-radius: 8px; }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .docs-body { padding: 20px 16px 24px; }
  .docs-heading-actions, .docs-download-card { align-items: stretch; flex-direction: column; }
  .docs-heading-actions .button, .docs-download-card .button { justify-content: center; width: 100%; }
}

@media print {
  /* Save the documentation as a PDF: chrome away, content only. */
  .site-header, .site-footer, .admin-sidebar, .admin-topbar, .docs-nav,
  #docs-print, .admin-heading .button { display: none !important; }
  .admin-workspace, .admin-content { margin: 0 !important; width: auto !important; padding: 0 !important; }
  .docs-layout { display: block; }
  .docs-body { border: 0; padding: 0; }
  .docs-h2 { margin-top: 24px; page-break-before: always; }
  .docs-h2:first-of-type { page-break-before: avoid; }
  .docs-h3, .docs-note, .docs-table-card { page-break-inside: avoid; }
  .table-wrap { overflow: visible !important; }
  body { background: #fff !important; }
}

/* Audit and the paged pledge grid */
.pledges-toolbar { min-height: 0; padding: 14px 22px 10px; border-bottom: 0; }
.pledges-toolbar p { margin: 0; color: #81909e; font-size: .63rem; }
#audit-table-body td { vertical-align: top; }
#audit-tabs button { flex: 0 0 auto; }

/* Membership collections */
#collections-panel .stat-row { margin: 18px 22px; }
#collections-panel .members-filterbar { border-top: 1px solid #e8edef; }
.collections-search input { min-width: min(260px, 100%); }

/* Membership accounting report */
.accounting-heading-actions { display: flex; align-items: end; gap: 10px; }
.accounting-months { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 1px; padding: 1px; background: #e3eaed; }
.accounting-month { min-width: 0; padding: 14px; background: #fff; }
.accounting-month h3 { margin: 0 0 10px; color: var(--ink); font-size: .76rem; }
.accounting-month p { display: flex; justify-content: space-between; gap: 7px; margin: 5px 0; font-size: .55rem; }
.accounting-month p span { color: #80909e; }
.accounting-month p strong { color: #405365; font-variant-numeric: tabular-nums; }
.accounting-month .is-collected strong { color: #0c7254; }
.accounting-month .is-outstanding strong { color: #a36100; }
.accounting-month .is-new strong { color: #2167a8; }
#accounting-tabs { overflow-x: auto; }
#accounting-tabs button { flex: 0 0 auto; }
.accounting-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 250px; }
.accounting-actions .review-button { margin: 0; white-space: nowrap; }
.accounting-modal { width: min(620px, calc(100vw - 30px)); }
.accounting-dialog-shell { width: 100%; }
.accounting-feedback-quote { margin: 0 0 18px; padding: 16px; border-left: 3px solid var(--cyan); border-radius: 0 8px 8px 0; background: #f2f8fa; color: #31485b; font-size: .72rem; line-height: 1.65; }
.accounting-note { padding: 12px 0; border-bottom: 1px solid #e5ebed; }
.accounting-note p { margin: 0 0 5px; color: #405365; font-size: .7rem; }
.accounting-note small { color: #8694a1; font-size: .58rem; }
#membership-thread-form { margin-top: 20px; }

@media (max-width: 1050px) { .accounting-months { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) {
  .accounting-modal { width: 100vw; height: 100dvh; }
}
@media (max-width: 620px) {
  .accounting-heading-actions { align-items: stretch; flex-direction: column; }
  .accounting-months { grid-template-columns: repeat(2, 1fr); }
  .accounting-actions { min-width: 0; }
}

/* Learning creator and member course player */
.learning-builder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.learning-builder .queue-panel { margin: 0; }
.learning-mini-form { display: grid; align-content: start; gap: 12px; padding: 18px 22px 22px; }
.learning-admin-grid { columns: 3 260px; column-gap: 18px; padding: 22px; }
.learning-admin-card { display: inline-block; width: 100%; margin: 0 0 18px; overflow: hidden; break-inside: avoid; border: 1px solid #dce5e9; border-radius: 14px; background: #fff; box-shadow: 0 9px 28px rgba(19,48,66,.07); }
.learning-card-preview { display: grid; place-items: center; min-height: 145px; padding: 20px; background: linear-gradient(145deg,#133b57,#286e91); color: #fff; font-size: .78rem; font-weight: 800; }
.learning-card-body { display: grid; gap: 10px; padding: 17px; }
.learning-card-body > small { color: #7c8c98; font-size: .56rem; }
.learning-card-body h3 { margin: 0; color: var(--ink); font-size: .8rem; line-height: 1.35; }
.learning-card-stats { display: grid; grid-template-columns: repeat(5,1fr); gap: 5px; }
.learning-card-stats span { display: grid; gap: 2px; padding: 7px 3px; border-radius: 7px; background: #f2f6f8; text-align: center; }
.learning-card-stats strong { color: #24475c; font-size: .7rem; }.learning-card-stats small { color: #84929c; font-size: .46rem; }
.learning-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.learning-card-footer select { padding: 8px; border: 1px solid #cfdae0; border-radius: 7px; background: #fff; color: #43596a; }
.learning-editor-dialog, .learning-player-dialog { width: min(1120px, calc(100% - 24px)); max-width: none; }
.learning-editor-shell, .learning-player-shell { max-height: 92vh; overflow: auto; border-radius: 14px; background: #fff; }
.learning-editor-body { padding: 22px; }.learning-editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.learning-editor-actions form { display: grid; align-content: start; gap: 11px; padding: 18px; border: 1px solid #dce5e9; border-radius: 11px; background: #f9fbfc; }
.learning-editor-actions h3, #learning-resource-history h3, .learning-player-copy h3, .learning-player-layout aside h3 { margin: 0; color: var(--ink); font-size: .76rem; }
.learning-editor-actions > form > small { color: #6e8190; font-size: .57rem; line-height: 1.45; }
#learning-resource-history { display: grid; gap: 9px; margin-top: 22px; }
.learning-resource-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid #e1e8eb; border-radius: 8px; }
.learning-resource-row > div { display: grid; gap: 3px; }.learning-resource-row strong { color: #304b5e; font-size: .67rem; }.learning-resource-row small { color: #81909b; font-size: .54rem; }
.learning-resource-row > span { display: flex; flex-wrap: wrap; gap: 6px; }.learning-resource-row b { padding: 5px 8px; border-radius: 12px; background: #ddf3eb; color: #087153; font-size: .5rem; }
#learning-editor-summary details { margin: 12px 0; padding: 12px; border-radius: 8px; background: #f2f6f8; color: #40586a; font-size: .62rem; }
#learning-editor-summary blockquote { margin: 10px 0 0; padding: 10px; border-left: 3px solid var(--cyan); background: #fff; line-height: 1.5; }
.learning-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding: 28px 32px; border-radius: 16px; background: linear-gradient(130deg,#102f46,#235d7c); color: #fff; }
.learning-hero span { color: #83d6e2; font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }.learning-hero h2 { margin: 5px 0; font-size: clamp(1.2rem,3vw,2rem); }.learning-hero p { margin: 0; color: #c8d8e1; font-size: .68rem; }
.learning-hero-progress { display: grid; min-width: 130px; text-align: center; }.learning-hero-progress strong { font-size: 2rem; }.learning-hero-progress small { color: #b9cdd8; font-size: .55rem; }
.learning-category-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 22px; border-bottom: 1px solid #dce5e9; }.learning-category-tabs button { padding: 12px 15px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #758491; font-weight: 700; white-space: nowrap; cursor: pointer; }.learning-category-tabs button.active { border-color: #1b506d; color: #173b53; }
.learning-member-grid { display: grid; gap: 28px; }.learning-subject-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 12px; }.learning-subject-heading h3 { margin: 0; color: var(--ink); font-size: 1rem; }.learning-subject-heading p { margin: 4px 0 0; color: #768793; font-size: .62rem; }.learning-subject-heading b { color: #167756; font-size: .65rem; }
.learning-subject-group { display: inline-block; margin-bottom: 5px; color: #087f9b; font-size: .5rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.learning-course-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(260px,100%),1fr)); gap: 17px; }.learning-course-card { overflow: hidden; border: 1px solid #dce5e9; border-radius: 13px; background: #fff; box-shadow: 0 8px 24px rgba(19,48,66,.06); }.learning-course-art { position: relative; display: grid; place-items: center; height: 155px; background: radial-gradient(circle at 30% 30%,#2a89a4,#142f4a 70%); color: white; font-size: 2.2rem; }.learning-course-art span { position: absolute; right: 9px; bottom: 9px; padding: 4px 7px; border-radius: 4px; background: rgba(0,0,0,.7); font-size: .52rem; }.learning-course-card > div:last-child { display: grid; gap: 9px; padding: 16px; }.learning-course-card small { color: #7d8c98; font-size: .54rem; }.learning-course-card h3 { margin: 0; color: var(--ink); font-size: .82rem; }.learning-course-card p { overflow: hidden; margin: 0; color: #5f7383; font-size: .61rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.learning-progress { position: relative; height: 20px; overflow: hidden; border-radius: 10px; background: #e8eef1; }.learning-progress i { display: block; height: 100%; background: #18a078; }.learning-progress span { position: absolute; inset: 0; display: grid; place-items: center; color: #183c4e; font-size: .5rem; font-weight: 800; }
.learning-player-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; }.learning-player-layout main { min-width: 0; background: #f6f8f9; }.learning-player-layout aside { padding: 18px; border-left: 1px solid #dce5e9; background: #fff; }.learning-player-media { display: grid; place-items: center; aspect-ratio: 16/9; background: #0d1115; color: #d8e2e7; }.learning-player-media video,.learning-player-media iframe,.learning-player-media > div { width: 100%; height: 100%; border: 0; }.learning-player-copy { display: grid; gap: 15px; padding: 22px; }.learning-player-copy > p { margin: 0; color: #506879; font-size: .68rem; line-height: 1.6; }.learning-reaction-row { display: flex; gap: 8px; }.learning-reaction-row button { padding: 8px 12px; border: 1px solid #d6e0e5; border-radius: 20px; background: white; color: #496173; cursor: pointer; }.learning-reaction-row button.active { border-color: #178b6a; background: #e6f6f1; color: #087052; }
#learning-player-resources { display: grid; gap: 7px; color: #71828f; font-size: .62rem; }#learning-player-resources a { padding: 10px; border: 1px solid #dce5e9; border-radius: 7px; background: #fff; color: #176b92; text-decoration: none; }
#learning-feedback-form { display: grid; gap: 10px; }#learning-player-playlist { display: grid; gap: 5px; margin-top: 12px; }#learning-player-playlist button { padding: 11px; border: 1px solid #e0e7ea; border-radius: 6px; background: #f7f9fa; color: #455d6e; font-size: .59rem; line-height: 1.4; text-align: left; cursor: pointer; }#learning-player-playlist button.active { border-color: #236f91; background: #eaf4f8; color: #174e68; font-weight: 750; }

@media (max-width: 900px) { .learning-builder { grid-template-columns: 1fr; }.learning-player-layout { grid-template-columns: 1fr; }.learning-player-layout aside { border-top: 1px solid #dce5e9; border-left: 0; }.learning-editor-actions { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .learning-hero { align-items: flex-start; flex-direction: column; }.learning-resource-row { align-items: flex-start; flex-direction: column; } }

/* Yearly fund raising report */
.fundraising-quarter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.fundraising-quarter-card { display: grid; gap: 5px; padding: 17px 19px; border: 1px solid #dfe7ea; border-top: 3px solid #2a78d6; border-radius: 11px; background: #fff; }
.fundraising-quarter-card > span { color: #667989; font-size: .6rem; font-weight: 800; letter-spacing: .08em; }
.fundraising-quarter-card strong { color: var(--ink); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.fundraising-quarter-card small { color: #8795a1; font-size: .58rem; }
.report-progress { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.report-progress > span { width: 90px; height: 7px; overflow: hidden; border-radius: 5px; background: #e8eef1; }
.report-progress i { display: block; height: 100%; border-radius: inherit; background: #0c8a63; }
.report-progress b { color: #355064; font-size: .63rem; font-variant-numeric: tabular-nums; }
.fundraising-gantt { overflow-x: auto; padding: 18px 22px 22px; }
.gantt-axis, .gantt-row { display: grid; grid-template-columns: minmax(160px, 250px) minmax(620px, 1fr); gap: 16px; align-items: center; }
.gantt-axis { margin-bottom: 10px; color: #8492a0; font-size: .54rem; font-weight: 780; letter-spacing: .05em; text-transform: uppercase; }
.gantt-axis > div { display: grid; grid-template-columns: repeat(12, 1fr); text-align: center; }
.gantt-row { min-height: 46px; border-top: 1px solid #edf1f3; }
.gantt-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.gantt-row strong { overflow: hidden; color: #344b5e; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.gantt-row small { color: #8997a3; font-size: .55rem; }
.gantt-track { position: relative; height: 18px; border-radius: 4px; background: repeating-linear-gradient(to right, #f2f5f7 0, #f2f5f7 calc(8.333% - 1px), #dce5e9 calc(8.333% - 1px), #dce5e9 8.333%); }
.gantt-bar { position: absolute; top: 4px; height: 10px; border-radius: 5px; background: #2a78d6; box-shadow: 0 2px 5px rgba(25,88,145,.2); }
.gantt-bar.achieved { background: #0c8a63; }
.gantt-goal { position: absolute; z-index: 2; top: 3px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); border: 2px solid #fff; background: #d19a22; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.fundraising-report-campaigns { display: grid; gap: 1px; background: #e5ebee; }
.fundraising-report-campaign { background: #fff; }
.fundraising-report-campaign > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 22px; cursor: pointer; list-style-position: inside; }
.fundraising-report-campaign > summary span { display: inline-grid; gap: 3px; margin-left: 7px; }
.fundraising-report-campaign > summary strong { color: var(--ink); font-size: .72rem; }
.fundraising-report-campaign > summary small, .fundraising-report-campaign > summary b { color: #7e8e9b; font-size: .58rem; }
.fundraising-campaign-detail { border-top: 1px solid #e5ebee; background: #fbfcfd; }
.fundraising-remarks { padding: 20px 22px; border-top: 1px solid #e5ebee; }
.fundraising-remarks > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fundraising-remarks h3 { margin: 0; color: var(--ink); font-size: .75rem; }
.fundraising-remarks article { padding: 12px 0; border-bottom: 1px solid #e5ebee; }
.fundraising-remarks article p { margin: 0 0 5px; color: #405568; font-size: .68rem; line-height: 1.55; }
.fundraising-remarks article small { color: #8795a1; font-size: .56rem; }

@media (max-width: 760px) {
  .fundraising-quarter-grid { grid-template-columns: 1fr 1fr; }
  .gantt-axis, .gantt-row { grid-template-columns: 130px minmax(600px, 1fr); }
}

/* Marketplace catalogue, cart and fulfilment */
.marketplace-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 22px; }
.marketplace-form .field-wide { grid-column: 1 / -1; }
.marketplace-admin-grid, .marketplace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 18px; padding: 22px; }
.marketplace-card { min-width: 0; overflow: hidden; border: 1px solid #dce5e9; border-radius: 13px; background: #fff; box-shadow: 0 8px 24px rgba(19,48,66,.06); }
.marketplace-media-strip { display: flex; gap: 3px; height: 210px; overflow-x: auto; scroll-snap-type: x mandatory; background: #edf2f4; }
.marketplace-media-strip img, .marketplace-media-strip video, .marketplace-media-blank { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.marketplace-media-blank { display: grid; place-items: center; color: #8a9aa6; font-size: 2rem; font-weight: 800; }
.marketplace-card-body { display: grid; gap: 9px; padding: 17px; }
.marketplace-card-body h3 { margin: 0; color: var(--ink); font-size: .9rem; line-height: 1.25; }
.marketplace-card-body > p { display: -webkit-box; overflow: hidden; margin: 0; color: #607386; font-size: .65rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.marketplace-price { color: #0b2b3f; font-size: 1rem; }
.marketplace-meta { color: #82919e; font-size: .58rem; }
.marketplace-bid-form, .marketplace-upload-form, .marketplace-feedback-form { display: grid; gap: 8px; }
.marketplace-bid-form { grid-template-columns: 1fr auto; }
.marketplace-bid-form input, .marketplace-feedback-form select, .marketplace-feedback-form textarea { min-width: 0; padding: 10px; border: 1px solid #cfdae0; border-radius: 7px; font: inherit; }
.marketplace-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.marketplace-cart-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid #e5ebee; color: #405569; font-size: .68rem; }
.marketplace-cart-line > strong { min-width: 0; overflow-wrap: anywhere; }
.marketplace-cart-line span { display: flex; align-items: center; gap: 9px; }
.marketplace-cart-line button { width: 30px; height: 30px; border: 1px solid #d5e0e4; border-radius: 6px; background: #fff; cursor: pointer; }
.marketplace-cart-line em { min-width: 90px; color: var(--ink); font-style: normal; font-weight: 750; text-align: right; }
.marketplace-final-warning { padding: 12px; border: 1px solid #edd79d; border-radius: 8px; background: #fff9e8; color: #725514; font-size: .65rem; }
.marketplace-order-list { display: grid; gap: 14px; padding: 20px 22px; }
.marketplace-order-card { display: grid; gap: 13px; padding: 18px; border: 1px solid #dce5e9; border-radius: 11px; background: #fff; }
.marketplace-order-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.marketplace-order-card > div:first-child > span:first-child { display: grid; gap: 3px; }
.marketplace-order-card strong { color: var(--ink); font-size: .75rem; }
.marketplace-order-card small, .marketplace-order-card li { color: #718291; font-size: .6rem; }
.marketplace-order-card ul { margin: 0; padding-left: 18px; }
.marketplace-invoice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 12px; border-radius: 7px; background: #f1f7f9; color: #244a60; font-size: .65rem; font-weight: 700; }
.marketplace-tracker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 0; padding: 0; list-style: none; counter-reset: marketplace-step; }
.marketplace-tracker li { position: relative; padding: 28px 6px 8px; border-top: 3px solid #dce5e9; text-align: center; }
.marketplace-tracker li::before { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); counter-increment: marketplace-step; content: counter(marketplace-step); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #dce5e9; color: #6f8190; font-size: .52rem; font-weight: 800; }
.marketplace-tracker li.done { border-top-color: #0c8a63; color: #0c7254; }
.marketplace-tracker li.done::before { background: #0c8a63; color: #fff; content: '✓'; }
.marketplace-order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.marketplace-order-card blockquote { margin: 0; padding: 12px; border-left: 3px solid var(--cyan); background: #f3f8fa; color: #405569; font-size: .65rem; }

@media (max-width: 620px) {
  .marketplace-form { grid-template-columns: 1fr; }
  .marketplace-form .field-wide { grid-column: auto; }
  .marketplace-heading { align-items: stretch; flex-direction: column; }
  .marketplace-tracker { grid-template-columns: 1fr 1fr; }
  .marketplace-cart-line { align-items: flex-start; flex-direction: column; }
}
