/* SRCA website + staff admin portal styles.
   Tokens and patterns come from design/README.md (the team's chosen design):
   flag blue, navy, sun, reef green; Atkinson Hyperlegible; one diagonal flag
   stripe under each header; status chips always pair an icon with text;
   tap targets at least 44px. Mobile first, then wider screens. */
:root {
  /* Brand tokens from design/brand/README.md (taro leaf logo). */
  --blue: #0051ba; --navy: #0b2a5b; --sun: #fcd116; --green: #215b33;
  --ink: #18202f; --mute: #4a5468; --mist: #eef2f8; --line: #d8dee9;
  --warn: #8a4b00; --warnbg: #fdf0d5; --page: #f7f9fc;
  color-scheme: light;
}
* { box-sizing: border-box; min-width: 0; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.55 "Atkinson Hyperlegible", system-ui, sans-serif; }
h1, h2, h3, h4, p { margin: 0; }
/* Brand: headings in Montserrat 800, body in Atkinson Hyperlegible. */
h1, h2, .sec-title { font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-weight: 800; }
img { max-width: 100%; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--navy); padding: 8px 14px; border-radius: 6px; font-weight: 700; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { padding-left: 20px; padding-right: 20px; }
@media (min-width: 900px) { .wrap { padding-left: max(64px, 5vw); padding-right: max(64px, 5vw); } }
.stripe { height: 10px; background: linear-gradient(100deg, var(--blue) 0 46%, var(--sun) 46% 48.5%, var(--green) 48.5% 100%); }
.stripe.thin { height: 6px; }

/* Brand mark */
.mark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--blue); text-decoration: none; line-height: 1.1; }
.mark svg { flex: none; }
.mark small { display: block; font-size: 12px; font-weight: 400; color: var(--mute); }
/* Logo lockup: taro leaf mark + Montserrat 800 wordmark, as in srca-logo-horizontal.svg */
.brand { gap: 12px; }
.wordmark { display: flex; flex-direction: column; font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-weight: 800; line-height: 1; }
.wordmark .w1 { color: var(--navy); font-size: 22px; }
.wordmark .w2 { color: var(--green); font-size: 17px; margin-top: 3px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 8px; border: 2px solid var(--blue); background: #fff; color: var(--blue); font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; }
.btn.solid { background: var(--blue); color: #fff; }
.btn.sun { background: var(--sun); border-color: var(--sun); color: var(--navy); }
.btn.ghost { border-color: #fff; color: #fff; background: transparent; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Status chips: icon + text, never colour alone */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 3px 10px 3px 8px; white-space: nowrap; }
.chip.ok { background: #e3f2e9; color: var(--green); }
.chip.rev { background: var(--warnbg); color: var(--warn); }
.chip.info { background: var(--mist); color: var(--blue); }

/* Empty / placeholder states for data we don't have yet */
.empty { border: 2px dashed var(--line); border-radius: 10px; padding: 28px 22px; text-align: center; color: var(--mute); background: #fff; }
.empty strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; }
.missing { color: var(--mute); font-style: italic; font-weight: 400; }
.devnote { display: flex; gap: 10px; align-items: flex-start; background: var(--mist); border-left: 4px solid var(--blue); border-radius: 6px; padding: 12px 14px; font-size: 15px; color: var(--ink); margin-bottom: 20px; }

/* ---------- Public header ---------- */
.pnav { display: flex; align-items: center; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.pnav .mark { margin-right: auto; }
.pnav-links { display: flex; gap: 22px; align-items: center; flex-wrap: nowrap; order: 3; width: 100%; overflow-x: auto; }
.pnav-links a { flex-shrink: 0; color: var(--ink); text-decoration: none; font-weight: 700; padding: 10px 0; white-space: nowrap; }
.pnav-links a.on { box-shadow: inset 0 -4px 0 var(--sun); }
.pnav .staff { font-size: 14px; font-weight: 700; color: var(--mute); text-decoration: none; padding: 10px 4px; }
@media (min-width: 900px) {
  .pnav { flex-wrap: nowrap; min-height: 84px; gap: 28px; }
  .pnav-links { order: 0; width: auto; gap: 28px; }
}

/* ---------- Public: hero + band ---------- */
.hero img { display: block; width: 100%; height: 260px; object-fit: cover; object-position: 50% 40%; }
.band { background: var(--navy); color: #fff; display: grid; gap: 20px; padding-top: 32px; padding-bottom: 36px; }
.band h1 { font-size: 38px; line-height: 1.04; letter-spacing: -.02em; max-width: 14ch; }
.band p { font-size: 18px; color: #dfe6f5; max-width: 46ch; margin-bottom: 18px; }
.band .acts { display: flex; gap: 12px; flex-wrap: wrap; }
@media (min-width: 900px) {
  .hero img { height: 480px; }
  .band { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 64px; padding-top: 48px; padding-bottom: 52px; align-items: end; }
  .band h1 { font-size: 60px; max-width: 11ch; }
}

/* Page header (non-hero pages) */
.phead { background: var(--navy); color: #fff; padding-top: 36px; padding-bottom: 36px; }
.phead h1 { font-size: 36px; line-height: 1.08; letter-spacing: -.015em; }
.phead p { color: #dfe6f5; font-size: 18px; margin-top: 8px; max-width: 60ch; }
@media (min-width: 900px) { .phead h1 { font-size: 48px; } .phead { padding-top: 52px; padding-bottom: 52px; } }

/* Get involved: three short lines instead of cards */
.ways { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ways li { font-size: 18px; color: #dfe6f5; }
.ways a { color: #fff; font-family: Montserrat, "Segoe UI", Arial, sans-serif; font-weight: 800; font-size: 26px; text-decoration: none; margin-right: 8px; }
.ways a:hover, .ways a.on { box-shadow: inset 0 -4px 0 var(--sun); }
@media (min-width: 900px) { .ways a { font-size: 32px; } }

section.block { padding-top: 48px; padding-bottom: 24px; }
.sec-title { font-size: 30px; line-height: 1.1; letter-spacing: -.015em; margin-bottom: 8px; }
.sec-lead { font-size: 17px; color: var(--mute); max-width: 62ch; margin-bottom: 24px; }
@media (min-width: 900px) { .sec-title { font-size: 38px; } }

/* Stats row */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--mist); border-radius: 10px; padding: 18px; }
.stat b { display: block; font-size: 34px; line-height: 1; color: var(--navy); margin-bottom: 6px; }
.stat span { color: var(--mute); font-size: 15px; }
.source { font-size: 14px; color: var(--mute); margin-top: 10px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } .stat b { font-size: 42px; } }

/* Pillar rows (About) */
.intro { display: grid; gap: 14px; padding-top: 48px; padding-bottom: 24px; }
.intro h2 { font-size: 30px; line-height: 1.08; letter-spacing: -.015em; }
.intro p { font-size: 18px; color: var(--mute); max-width: 60ch; }
.pillar { display: grid; gap: 22px; padding-top: 28px; padding-bottom: 28px; }
.pillar + .pillar { border-top: 1px solid var(--line); }
.media img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair figure { margin: 0; position: relative; }
.pair img { aspect-ratio: 3/4; }
.pair figcaption { position: absolute; left: 10px; bottom: 10px; background: #fff; font-weight: 700; font-size: 14px; padding: 2px 10px; border-radius: 4px; }
.ptext h3 { font-size: 28px; line-height: 1.1; margin-bottom: 10px; display: flex; align-items: center; gap: 14px; }
.ptext h3 i { width: 14px; height: 30px; border-radius: 2px; flex: none; }
.fact { font-size: 19px; font-weight: 700; color: var(--blue); margin-bottom: 10px; }
.ptext p { font-size: 17px; color: var(--mute); max-width: 52ch; margin-bottom: 14px; }
.ptext ul { margin: 0 0 22px; padding-left: 20px; }
.ptext li { margin: 4px 0; }
@media (min-width: 900px) {
  .intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 64px; padding-top: 72px; }
  .intro h2 { font-size: 40px; }
  .pillar { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: center; padding-top: 36px; padding-bottom: 36px; }
  .pillar.flip .media { order: 2; }
  .ptext h3 { font-size: 34px; }
}

/* Cards grid (stories, leaders, paths, reports) */
.cards { display: grid; gap: 16px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.card img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 21px; line-height: 1.2; }
.card p { color: var(--mute); }
.card .btn { align-self: flex-start; margin-top: auto; }
.card.path { border-top: 6px solid var(--blue); }
.person { display: flex; gap: 14px; align-items: center; padding: 18px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--mist); color: var(--navy); display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: none; }

/* Accountability */
.split { display: grid; gap: 16px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; } }
.panel-box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.panel-box h3 { font-size: 22px; margin-bottom: 12px; }
.big-number { font-size: 40px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.doclist { list-style: none; margin: 0; padding: 0; }
.doclist li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.bar { height: 12px; border-radius: 999px; background: var(--mist); overflow: hidden; margin: 6px 0 12px; }
.bar i { display: block; height: 100%; background: var(--blue); }

/* Impact map */
.mapbox { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
#map { height: 420px; background: #dfe9ef; }
@media (min-width: 900px) { #map { height: 560px; } }
.map-overlay { position: absolute; inset: auto 16px 16px 16px; z-index: 500; background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 6px 20px rgba(15, 37, 87, .18); max-width: 440px; }
.map-overlay strong { display: block; margin-bottom: 2px; }
.map-overlay p { color: var(--mute); font-size: 15px; }

/* Forms (inquiry, admin, login) */
.form { display: grid; gap: 18px; max-width: 760px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 700; }
.field .hint { color: var(--mute); font-size: 14px; }
.req { color: #a3261b; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid #8a94a8; border-radius: 8px; background: #fff; color: var(--ink);
}
textarea { min-height: 140px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); }
.grid-2 { display: grid; gap: 18px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.errors { background: #fbe9e7; border-left: 4px solid #a3261b; padding: 12px 14px; border-radius: 6px; }
.errors ul { margin: 6px 0 0; padding-left: 20px; }

/* Public footer */
.pfoot { background: var(--mist); display: grid; gap: 24px; padding-top: 36px; padding-bottom: 36px; margin-top: 56px; }
.pfoot h4 { font-size: 15px; margin-bottom: 6px; }
.pfoot p { font-size: 15px; color: var(--mute); }
.pfoot .q { font-size: 21px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.pfoot .footer-actions { margin-top: 14px; }
@media (min-width: 900px) { .pfoot { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }

/* Staff login */
.login-page { min-height: 100vh; background: var(--page); display: flex; flex-direction: column; }
.login-card { width: min(440px, calc(100% - 32px)); margin: 56px auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.login-card .inner { padding: 28px; display: grid; gap: 16px; }
.login-card h1 { font-size: 28px; }
.login-card p { color: var(--mute); }
.google-btn { width: 100%; background: #fff; color: var(--ink); border-color: #8a94a8; }

/* ---------- Staff admin portal ---------- */
.admin-body { background: var(--page); min-height: 100vh; }
.atop { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 12px 28px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 0; }
.atop .mark { color: #fff; margin-right: auto; }
.atop .mark small { color: #b8c4de; }
.anav { display: flex; gap: 22px; order: 3; width: 100%; overflow-x: auto; }
.anav a { color: #dfe6f5; text-decoration: none; font-weight: 700; padding: 12px 0 14px; white-space: nowrap; }
.anav a.on { color: #fff; box-shadow: inset 0 -4px 0 var(--sun); }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #dfe6f5; }
.who b { width: 34px; height: 34px; border-radius: 50%; background: var(--sun); color: var(--navy); display: grid; place-items: center; font-size: 14px; }
.who a { color: #dfe6f5; }
@media (min-width: 900px) {
  .atop { flex-wrap: nowrap; min-height: 68px; padding-top: 0; }
  .anav { order: 0; width: auto; gap: 28px; }
  .anav a { padding: 22px 0; }
  .who { border-left: 1px solid #2c4280; padding-left: 24px; }
}
.apage { padding-top: 24px; padding-bottom: 48px; }
.ahead { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ahead h1 { font-size: 32px; letter-spacing: -.015em; line-height: 1.1; }
.ahead p { color: var(--mute); margin-top: 4px; }
.ahead .acts { display: flex; gap: 10px; flex-wrap: wrap; }
@media (min-width: 900px) { .ahead h1 { font-size: 40px; } .apage { padding-top: 32px; } }
.tools { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search { flex: 1 1 260px; position: relative; }
.search input { padding-left: 40px; }
.search svg { position: absolute; left: 13px; top: 14px; }
.seg { display: flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.seg a, .seg span { padding: 10px 14px; font-weight: 700; font-size: 15px; color: var(--mute); border-right: 1.5px solid var(--line); text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.seg :last-child { border-right: 0; }
.seg .on { background: var(--mist); color: var(--blue); }
.tablebox { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 14px; color: var(--mute); font-weight: 700; padding: 12px 14px; border-bottom: 1.5px solid var(--line); background: #fbfcfe; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th.placeholder-col { font-weight: 400; font-style: italic; }
td.empty-row { padding: 36px 16px; text-align: center; color: var(--mute); }
td.empty-row strong { display: block; color: var(--ink); font-size: 17px; }
.admin-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1100px) { .admin-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; } }
.aside-box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.aside-box h2 { font-size: 20px; margin-bottom: 8px; }
.aside-box p { color: var(--mute); font-size: 15px; }
.formbox { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.postlist { list-style: none; margin: 0; padding: 0; }
.postlist li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }

/* The hidden attribute must win over display rules above. */
[hidden] { display: none !important; }

/* Privacy policy: long-form reading. Lines are capped near 70 characters
   because short lines are easier for second-language readers to follow. */
.privacy { max-width: 820px; padding-top: 32px; }
.privacy section { margin-top: 36px; }
.privacy section.short { margin-top: 12px; }
.privacy h2 { font-size: 26px; line-height: 1.2; margin-bottom: 12px; color: var(--navy); }
.privacy h3 { font-size: 19px; margin: 22px 0 6px; }
.privacy p, .privacy li { max-width: 70ch; font-size: 17px; }
.privacy p + p, .privacy p + ul, .privacy ul + p, .privacy .table-scroll + p { margin-top: 10px; }
.privacy ul, .privacy ol { margin: 8px 0 0; padding-left: 22px; }
.privacy li + li { margin-top: 6px; }
.privacy .updated { color: var(--mute); font-size: 15px; }
.privacy .short { border-left: 6px solid var(--green); }
.privacy .toc { margin-top: 24px; background: var(--mist); border-radius: 10px; padding: 18px 22px; }
.privacy .toc-title { font-size: 18px; margin-bottom: 4px; color: var(--ink); }
/* Each contents link is a full-height row so it meets the 44px tap target. */
.privacy .toc li + li { margin-top: 0; }
.privacy .toc a { display: inline-flex; align-items: center; min-height: 44px; }
.privacy .contact-lines { line-height: 1.8; }
.table-scroll { overflow-x: auto; margin-top: 12px; }
.table-scroll:focus-visible { outline-offset: 4px; }
.privacy table { width: 100%; border-collapse: collapse; font-size: 16px; }
.privacy caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
.privacy th, .privacy td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--line); }
.privacy thead th { background: var(--mist); border-top: 0; }
.privacy tbody th { font-weight: 700; white-space: nowrap; }
@media (max-width: 520px) { .privacy tbody th { white-space: normal; } }
.consent-hint { color: var(--mute); font-size: 14px; margin: 2px 0 0 32px; }
.pfoot .footer-legal { margin-top: 12px; }
.pfoot .footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
