:root {
  --navy: #12304a;
  --navy-2: #0b2337;
  --teal: #137c78;
  --teal-soft: #dcefed;
  --gold: #d99a2b;
  --gold-soft: #fff2d4;
  --paper: #f7f5ef;
  --white: #fff;
  --ink: #17242d;
  --muted: #61717a;
  --line: #d8e0df;
  --danger: #b63434;
  --success: #28764d;
  --shadow: 0 14px 35px rgba(18, 48, 74, .09);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3 { color: var(--navy); line-height: 1.18; margin: 0 0 .7rem; }
h1 { font-size: clamp(2rem, 5vw, 4.25rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.3rem, 2.5vw, 2rem); letter-spacing: -.02em; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1rem; }
.container { width: min(1160px, calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(680px, calc(100% - 2rem)); }
.section { padding: clamp(2.8rem, 7vw, 5.5rem) 0; }
.section.compact { padding: 2rem 0; }
.section-title { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.5rem; }
.section-title p { color: var(--muted); max-width: 680px; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 999; background: #fff; padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 239, .96);
  border-bottom: 1px solid rgba(18, 48, 74, .1);
  backdrop-filter: blur(14px);
}
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand img { width: 64px; height: 64px; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 1.15rem; }
.site-nav a, .link-button { color: var(--navy); text-decoration: none; font-weight: 650; font-size: .94rem; }
.site-nav a:hover, .link-button:hover { color: var(--teal); }
.site-nav .nav-login { color: #fff; background: var(--navy); padding: .62rem 1rem; border-radius: 999px; }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.menu-button { display: none; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 10px; padding: .55rem .8rem; font-weight: 700; }
.hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: clamp(4rem, 10vw, 8rem) 0; }
.hero::before { content: ""; position: absolute; width: 540px; height: 540px; border-radius: 50%; background: rgba(19, 124, 120, .45); top: -250px; right: -120px; }
.hero::after { content: ""; position: absolute; width: 300px; height: 300px; border: 60px solid rgba(240, 180, 76, .13); border-radius: 50%; bottom: -220px; left: 12%; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 850px; }
.hero p { color: #d8e6e5; max-width: 720px; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.7rem; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .15em; font-size: .76rem; font-weight: 800; margin-bottom: .8rem; }
.page-hero { background: var(--navy); color: #fff; padding: clamp(2.8rem, 7vw, 5rem) 0; }
.page-hero h1 { color: #fff; max-width: 900px; }
.page-hero p { color: #d8e6e5; max-width: 720px; font-size: 1.1rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; border: 0; border-radius: 999px; padding: .68rem 1.12rem;
  background: var(--teal); color: #fff; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer;
}
.button:hover { color: #fff; background: #0d6965; }
.button.gold { background: var(--gold); color: var(--navy-2); }
.button.secondary { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.button.danger { background: var(--danger); }
.button.small { min-height: 36px; padding: .4rem .8rem; font-size: .88rem; }
.button[disabled] { opacity: .55; cursor: not-allowed; }
.grid { display: grid; gap: 1.25rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid rgba(18, 48, 74, .09); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-body { padding: 1.3rem; }
.card h2 a, .card h3 a { color: var(--navy); text-decoration: none; }
.card-image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #dfe8e7; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.card-image:hover img { transform: scale(1.025); }
.meta { color: var(--muted); font-size: .86rem; }
.badge { display: inline-flex; align-items: center; padding: .18rem .52rem; border-radius: 999px; background: #edf1f1; color: #43565f; font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.badge.gold { background: var(--gold-soft); color: #78500a; }
.badge.teal { background: var(--teal-soft); color: #075d59; }
.badge.danger { background: #fde2e2; color: #8f2525; }
.event-card { display: grid; grid-template-columns: 82px 1fr; align-items: stretch; }
.card-link { cursor: pointer; }
.card-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[data-content-protected] { -webkit-user-select: none; user-select: none; }
[data-content-protected] :is(input, textarea, select, [contenteditable="true"]) { -webkit-user-select: text; user-select: text; }
[data-content-protected] img { -webkit-user-drag: none; user-select: none; }
@media print { .member-view > * { visibility: hidden !important; } .member-view::after { content: 'Printing is disabled for protected BHEEA content.'; position: fixed; inset: 35% 1rem auto; visibility: visible; color: #12304a; font: 700 20pt/1.4 sans-serif; text-align: center; } }
.date-tile { background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-transform: uppercase; }
.date-tile strong { font-size: 2rem; line-height: 1; }
.date-tile span { color: var(--gold); font-weight: 800; }
.location { color: var(--teal); font-weight: 700; }
.leaders { grid-template-columns: repeat(auto-fill, minmax(160px, 190px)); justify-content: start; }
.leader-card { width: 100%; max-width: 190px; text-align: center; }
.leader-card img { width: 100%; aspect-ratio: 35 / 45; object-fit: cover; object-position: center top; background: var(--teal-soft); }
.leader-card .card-body { padding: 1rem .75rem; }
.leader-card h2, .leader-card h3 { font-size: 1.15rem; line-height: 1.15; overflow-wrap: anywhere; }
.leader-card .position { color: var(--teal); font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat { background: #fff; border-radius: 16px; padding: 1.25rem; border: 1px solid var(--line); }
.stat strong { display: block; color: var(--navy); font-size: 2rem; line-height: 1.1; }
.alerts { padding-top: 1rem; }
.alert { padding: .8rem 1rem; border-radius: 12px; margin-bottom: .65rem; border: 1px solid; }
.alert.success { color: #185c39; background: #e4f5eb; border-color: #a5d8b9; }
.alert.error { color: #8a2929; background: #fde8e8; border-color: #edb2b2; }
.alert.info { color: #174f70; background: #e5f2fa; border-color: #afd3e9; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.2rem); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { margin-bottom: 1rem; }
.field.full { grid-column: 1 / -1; }
label, legend { display: block; color: var(--navy); font-weight: 750; margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; min-height: 46px; border: 1px solid #b9c7c8; border-radius: 11px;
  background: #fff; color: var(--ink); font: inherit; padding: .65rem .75rem;
}
textarea { min-height: 145px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(19, 124, 120, .17); border-color: var(--teal); }
input[type="checkbox"], input[type="radio"] { width: 18px; min-height: 18px; accent-color: var(--teal); }
.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 550; color: var(--ink); }
.field-help { color: var(--muted); font-size: .86rem; margin-top: .25rem; }
.field-error { color: var(--danger); font-size: .86rem; margin-top: .25rem; }
.password-wrap { display: grid; grid-template-columns: 1fr auto; gap: .45rem; }
.password-wrap button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 0 .8rem; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; margin-bottom: 1.5rem; }
.filters .field { margin: 0; min-width: 170px; flex: 1; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: .8rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid #e5eaea; }
th { background: #f0f4f3; color: var(--navy); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.subnav { display: flex; gap: .35rem; overflow-x: auto; padding: .7rem 0 1rem; scrollbar-width: thin; }
.subnav a { flex: 0 0 auto; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .45rem .75rem; text-decoration: none; font-size: .88rem; font-weight: 700; }
.subnav a[aria-current="page"] { color: #fff; background: var(--teal); border-color: var(--teal); }
.profile-head { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.5rem; }
.avatar { width: 105px; height: 135px; border-radius: 10px; object-fit: cover; object-position: center top; background: var(--teal-soft); border: 4px solid #fff; box-shadow: var(--shadow); }
.visually-hidden { 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; }
.avatar-button { position: relative; width: 105px; height: 135px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; overflow: hidden; }
.avatar-button .avatar { width: 100%; height: 100%; }
.avatar-button:focus-visible { outline: 4px solid rgba(19, 124, 120, .35); outline-offset: 3px; }
.avatar-edit-label { position: absolute; inset: auto 4px 4px; padding: .25rem .35rem; border-radius: 0 0 6px 6px; background: rgba(11, 35, 55, .86); color: #fff; font-size: .72rem; font-weight: 800; line-height: 1.2; }
.photo-editor-dialog { width: min(620px, calc(100% - 1rem)); }
.photo-crop-stage { width: min(350px, 100%); aspect-ratio: 35 / 45; margin: 1rem auto; overflow: hidden; border: 2px solid var(--line); border-radius: 12px; background: var(--teal-soft); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); touch-action: none; }
.photo-crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.photo-crop-stage canvas:active { cursor: grabbing; }
.photo-editor-zoom { display: grid; grid-template-columns: auto auto minmax(120px, 1fr) auto; gap: .55rem; align-items: center; margin: 1rem 0; }
.photo-editor-zoom label { margin: 0; }
.photo-editor-zoom input[type="range"] { min-height: 28px; padding: 0; border: 0; accent-color: var(--teal); }
.photo-editor-actions { justify-content: center; margin-top: 1rem; }
.profile-photo-picker { display: flex; align-items: center; gap: 1rem; }
.request-applicant { display: flex; align-items: center; gap: .7rem; min-width: 190px; }
.request-photo { width: 52px; aspect-ratio: 35 / 45; flex: 0 0 auto; object-fit: cover; object-position: center top; border-radius: 7px; background: var(--teal-soft); }.donor-card .blood { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #fde6e6; color: var(--danger); font-size: 1.25rem; font-weight: 850; }
.article { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: clamp(1.25rem, 4vw, 3rem); }
.article-cover { width: 100%; max-height: 570px; object-fit: cover; border-radius: 14px; margin: 1rem 0 2rem; }
.article-body { font-size: 1.08rem; max-width: 780px; }
.empty-state { padding: 3rem 1.2rem; text-align: center; border: 1px dashed #acbcbc; border-radius: var(--radius); color: var(--muted); }
.error-code { font-size: 5rem; color: var(--gold); font-weight: 900; line-height: 1; }
.callout { border-left: 5px solid var(--gold); padding: 1rem 1.2rem; background: var(--gold-soft); border-radius: 0 12px 12px 0; margin: 1rem 0; }
.access-dialog { width: min(520px, calc(100% - 2rem)); padding: 0; border: 0; border-radius: var(--radius); color: var(--ink); background: #fff; box-shadow: 0 24px 70px rgba(11, 35, 55, .3); }
.access-dialog::backdrop { background: rgba(11, 35, 55, .68); backdrop-filter: blur(3px); }
.access-dialog-panel { position: relative; padding: clamp(1.4rem, 5vw, 2.2rem); }
.access-dialog-close { position: absolute; top: .8rem; right: .9rem; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #edf1f1; color: var(--navy); font-size: 1.4rem; cursor: pointer; }
.leader-card .button { margin-top: .8rem; }
.leader-profile-dialog { width: min(440px, calc(100% - 2rem)); }
.leader-profile-photo { width: 140px; aspect-ratio: 35 / 45; object-fit: cover; object-position: center top; margin: 0 auto 1.1rem; border-radius: 12px; background: var(--teal-soft); }
.leader-profile-dialog h2, .leader-profile-dialog .position { text-align: center; }
.leader-profile-dialog .position { color: var(--teal); font-weight: 800; margin-bottom: 1rem; }
.access-dialog ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.access-dialog li + li { margin-top: .45rem; }
.access-dialog .actions { margin-top: 1.3rem; }
.site-footer { background: var(--navy-2); color: #c9d9db; padding: 2.2rem 0; margin-top: 3rem; }
.site-footer a { color: #fff; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.install-button { border: 1px solid #647d87; color: #fff; background: transparent; border-radius: 999px; padding: .5rem .8rem; }
@media (max-width: 900px) {
  .grid.three, .grid.four, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; top: 72px; left: 1rem; right: 1rem; flex-direction: column; align-items: stretch; gap: 0; padding: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a, .site-nav .inline-form { padding: .7rem; }
  .site-nav .nav-login { border-radius: 9px; }
  .link-button { padding: 0; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 1.2rem, 1160px); }
  .brand img { width: 52px; height: 52px; }
  .grid.two, .grid.three, .grid.four, .stats, .form-grid { grid-template-columns: 1fr; }
  .section-title, .footer-grid { align-items: flex-start; flex-direction: column; }
  .event-card { grid-template-columns: 68px 1fr; }
  .profile-head { align-items: flex-start; }
  .leaders { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .leader-card { max-width: 190px; }
  .avatar { width: 84px; height: 108px; }
  .avatar-button { width: 84px; height: 108px; }
  .photo-editor-dialog .access-dialog-panel { padding: 1rem; }
  .photo-editor-zoom { grid-template-columns: auto minmax(90px, 1fr) auto; }
  .photo-editor-zoom label { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
