/* ==========================================================================
   K.Nabot SACCO — mobile first (360px), enhanced upward.
   Palette: forest green / golden yellow / white, with river blue, earth
   brown, harvest orange and fruit red in single roles. No gradients,
   no shadows — depth comes from spacing, borders and colour blocks.
   ========================================================================== */

:root {
  --green: #046E25;
  --green-deep: #034A19;
  --green-ink: #0A2412;
  --gold: #FCC607;
  --gold-tint: #FEF6D8;
  --blue: #0480C7;
  --blue-ink: #03527E;
  --brown-ink: #8C4212;
  --orange: #EB8A33;
  --red: #D2031B;
  --red-ink: #A60216;
  --paper: #FFFFFF;
  --wash: #F2F6F2;
  --line: #D8E4DA;
  --ink: #14261B;
  --muted: #4A5A4F;

  /* Image slot aspect ratios — adjust here when real photos arrive */
  --ar-hero: 16 / 9;
  --ar-card: 4 / 3;
  --ar-audience: 3 / 2;
  --ar-office: 4 / 3;
  --ar-office-lg: 4 / 3;
  --ar-feature: 16 / 9;

  --wrap: 70rem;
  --wrap-narrow: 46rem;
  --pad: 1rem;
  --radius: 8px;
  --radius-card: 10px;
}

* { box-sizing: border-box; }

html { font-size: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  color: var(--green-ink);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 700;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1em; }
a { color: var(--blue-ink); }
a:hover { color: var(--green); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
dl, dd { margin: 0; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.narrow { max-width: var(--wrap-narrow); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

.muted { color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Signature element: the river band (green / gold / blue waves)        */
/* ------------------------------------------------------------------ */

.river { display: block; margin-bottom: 0.5rem; }
.river svg { display: block; }

/* ------------------------------------------------------------------ */
/* Header                                                               */
/* ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 3px solid var(--green);
}
.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--green-ink);
}
.brand-logo { width: 44px; height: 44px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt strong { font-size: 1.05rem; }
.brand-txt small { font-size: 0.72rem; color: var(--muted); max-width: 15rem; }

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 2px solid var(--green);
  background: var(--paper);
  color: var(--green);
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 3px solid var(--green);
  padding: 0.5rem var(--pad) 1rem;
  flex-direction: column;
}
.site-nav.open { display: flex; }
.site-nav a {
  display: block;
  padding: 0.8rem 0.25rem;
  text-decoration: none;
  color: var(--green-ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  min-height: 44px;
}
.site-nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--gold); }
.btn-nav {
  margin-top: 0.75rem;
  text-align: center;
  border-bottom: none;
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-nav:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }

/* ------------------------------------------------------------------ */
/* Buttons                                                              */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-block;
  min-height: 44px;
  padding: 0.65rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
}
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn-gold { background: var(--gold); color: var(--green-ink); border-color: var(--gold); }
.btn-gold:hover { background: #EAB200; border-color: #EAB200; color: var(--green-ink); }
.btn-ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--wash); color: var(--green-deep); }
.btn-ghost-dark { background: transparent; color: var(--green-ink); border-color: var(--green-ink); }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.25); color: var(--green-ink); }
.band-green .btn-ghost-dark { color: #fff; border-color: #fff; }
.band-green .btn-ghost-dark:hover { background: var(--green-deep); color: #fff; }
.btn-ghost-on-dark { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost-on-dark:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-small { min-height: 44px; padding: 0.5rem 0.9rem; font-size: 0.9rem; }
.btn-block { display: block; width: 100%; text-align: center; margin-bottom: 0.6rem; }
.btn-danger { background: transparent; color: var(--red-ink); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }

/* Paired actions sit side by side; on mobile they get compact sizing below */
.btn-pair { display: grid; gap: 0.6rem; margin-bottom: 0.9rem; }

.text-link { font-weight: 600; }

/* Card & panel corners — a consistent, modest rounding everywhere */
.step, .day, .audience li, .loan-card, .loan-row, .office-card,
.form-card, .notice, .aside-card, .auth-box, .stat, .note-box,
.rule-list li, .join-step, .paybill, .hero-terms, .trust-reg,
.empty-state {
  border-radius: var(--radius-card);
}

/* Cards whose first child is an image: clip the photo to the card's corners */
.audience li, .office-card { overflow: hidden; }
.audience .img-slot, .office-card .img-slot {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

/* ------------------------------------------------------------------ */
/* Hero                                                                 */
/* ------------------------------------------------------------------ */

.hero { padding: 2rem 0 2.5rem; background: var(--paper); }
.hero-grid { display: grid; gap: 1.5rem; }
.hero h1 { font-size: 2.1rem; }
.lede { font-size: 1.125rem; color: var(--muted); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 1rem; }
.hero-actions .btn { flex: 1 1 auto; text-align: center; }
.hero-note { font-size: 0.9rem; color: var(--muted); }
.hero-terms {
  margin-top: 1rem;
  border: 2px solid var(--gold);
  background: var(--gold-tint);
  padding: 1rem;
}
.hero-terms-head { font-weight: 700; color: var(--green-ink); margin-bottom: 0.5rem; }
.mini-terms { display: grid; gap: 0.4rem; }
.mini-terms > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(4,110,37,0.15); padding-bottom: 0.35rem; }
.mini-terms > div:last-child { border-bottom: 0; }
.mini-terms dt { color: var(--muted); }
.mini-terms dd { font-weight: 700; color: var(--green-ink); text-align: right; }

/* ------------------------------------------------------------------ */
/* Bands & section heads                                                */
/* ------------------------------------------------------------------ */

.band { padding: 2.5rem 0; }
.band-wash { background: var(--wash); }
.band-green { background: var(--green); }
.band-green h2, .band-green h3 { color: #fff; }
.band-green p, .band-green li { color: #EAF4EC; }
.band-green a:not(.btn) { color: var(--gold); }
.band-gold { background: var(--gold); }
.band-gold h2 { color: var(--green-ink); }
.band-gold p { color: var(--green-ink); }

.section-head { margin-bottom: 1.5rem; max-width: 44rem; }
.section-head p { color: var(--muted); }
.section-head-light p { color: #EAF4EC; }

.band-cta { margin-top: 1.5rem; }

.cta-strip {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.cta-strip h2 { margin-bottom: 0.25rem; }
.cta-strip p { margin-bottom: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.cta-actions .btn { flex: 1 1 auto; text-align: center; }

/* ------------------------------------------------------------------ */
/* How it works steps                                                   */
/* ------------------------------------------------------------------ */

.steps { display: grid; gap: 1rem; }
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  padding: 1.25rem;
}
.step h3 { font-size: 1.35rem; color: var(--green); }

/* ------------------------------------------------------------------ */
/* Weekly rhythm (signature functional element)                         */
/* ------------------------------------------------------------------ */

.rhythm-week {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.day {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--line);
  padding: 0.6rem 0.5rem;
  min-height: 5.5rem;
}
.day-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.day-act { display: block; font-size: 0.85rem; line-height: 1.35; margin-top: 0.35rem; }
.day-act strong { color: var(--green-ink); }
.day.is-save { border-top-color: var(--gold); }
.day.is-share { border-top-color: var(--blue); }
.day.is-welfare { border-top-color: var(--orange); }
.day.is-welfare { grid-column: span 2; }

.rhythm-legend { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.4rem; }
.rhythm-legend li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.dot { width: 0.85rem; height: 0.85rem; border-radius: 50%; flex: none; }
.dot-save { background: var(--gold); }
.dot-share { background: var(--blue); }
.dot-welfare { background: var(--orange); }

/* ------------------------------------------------------------------ */
/* Audience rows                                                        */
/* ------------------------------------------------------------------ */

.audience { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.audience li {
  border: 1px solid var(--line);
  background: var(--paper);
}
.audience .img-slot { width: 100%; }
.audience li > div { padding: 1rem 1.25rem 1.25rem; }
.audience h3 { color: var(--green); }
.audience p { margin: 0; }

/* ------------------------------------------------------------------ */
/* Loan cards & rows                                                    */
/* ------------------------------------------------------------------ */

.loan-cards { display: grid; gap: 1rem; }
.loan-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.loan-range { font-size: 1.2rem; font-weight: 700; color: var(--green-ink); margin-bottom: 0.15rem; }
.loan-meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.6rem; }
.loan-short { flex: 1; font-size: 0.95rem; }

.loan-rows { display: grid; gap: 1rem; }
.loan-row {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  background: var(--paper);
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}
.loan-row h2 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.loan-row h2 a { color: var(--green-ink); text-decoration: none; }
.loan-row h2 a:hover { color: var(--green); text-decoration: underline; }
.loan-row-meta { display: grid; gap: 0.4rem; }
.loan-row-meta > div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.35rem; }
.loan-row-meta dt { color: var(--muted); font-size: 0.9rem; }
.loan-row-meta dd { font-weight: 600; text-align: right; font-size: 0.95rem; }
.loan-row-cta { align-self: end; }
.loan-row-cta .btn { width: 100%; text-align: center; }

.loan-detail { display: grid; gap: 2rem; }
.loan-detail-aside .aside-card { margin-bottom: 1rem; }

/* ------------------------------------------------------------------ */
/* Offices                                                              */
/* ------------------------------------------------------------------ */

.office-list { list-style: none; padding: 0; margin: 0; display: grid; }
.office-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.office-row h3 { margin-bottom: 0.1rem; }
.office-row h3 a { color: var(--green-ink); }
.office-row p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.office-actions { display: flex; gap: 0.5rem; }

.office-cards { display: grid; gap: 1.25rem; }
.office-card { border: 1px solid var(--line); background: var(--paper); }
.office-card .img-slot { width: 100%; }
.office-card-body { padding: 1rem 1.25rem 1.25rem; }
.office-card-body h2 { font-size: 1.2rem; margin-bottom: 0.15rem; }
.office-card-body h2 a { color: var(--green-ink); text-decoration: none; }
.office-card-body h2 a:hover { color: var(--green); text-decoration: underline; }
.office-region { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.35rem; }
.office-addr { font-size: 0.95rem; margin-bottom: 0.35rem; }
.office-status { font-size: 0.85rem; color: var(--brown-ink); margin-bottom: 0.75rem; }

.office-detail { display: grid; gap: 1.5rem; }
.office-cta { display: grid; gap: 0.6rem; margin: 1.25rem 0; }
.office-cta .btn { text-align: center; }

.terms-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.terms-list > div:last-child { border-bottom: 0; }
.terms-list dt { color: var(--muted); }
.terms-list dd { font-weight: 600; text-align: right; }
.terms-list-lg dd { text-align: left; }
.terms-list-lg > div { flex-direction: column; gap: 0.15rem; }
.terms-list-lg dt { font-weight: 700; color: var(--green-ink); }

/* ------------------------------------------------------------------ */
/* Trust                                                                */
/* ------------------------------------------------------------------ */

.trust-grid { display: grid; gap: 1.5rem; }
.trust-points { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.trust-points li {
  border-left: 4px solid var(--gold);
  padding-left: 1rem;
}
.trust-panel { display: grid; gap: 1rem; align-content: start; }
.trust-reg {
  border: 1px solid var(--line);
  padding: 1rem;
  background: var(--paper);
}

/* ------------------------------------------------------------------ */
/* Paybill block                                                        */
/* ------------------------------------------------------------------ */

.paybill {
  background: var(--green-deep);
  color: #fff;
  border: 2px solid var(--gold);
  padding: 1.25rem;
  text-align: center;
}
.paybill-label { margin: 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); }
.paybill-num { font-size: 1.6rem; margin: 0.25rem 0; }
.paybill-num strong { color: var(--gold); }
.paybill-acc { font-size: 0.95rem; color: #EAF4EC; margin-bottom: 0.9rem; }
.paybill-note { font-size: 0.85rem; color: #EAF4EC; margin: 0.9rem 0 0; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 0.75rem; }
.paybill .btn { margin: 0 auto; }

/* ------------------------------------------------------------------ */
/* FAQ                                                                  */
/* ------------------------------------------------------------------ */

.faq-list details {
  border: 1px solid var(--line);
  border-bottom: none;
  background: var(--paper);
}
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--green-ink);
  min-height: 44px;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  float: right;
  font-size: 1.3rem;
  color: var(--green);
  line-height: 1;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { padding: 0 1.25rem 1.1rem; margin: 0; }
.faq-list summary:hover { background: var(--wash); }

/* ------------------------------------------------------------------ */
/* Page heads, crumbs, prose                                            */
/* ------------------------------------------------------------------ */

.page-head { padding: 2rem 0 0.5rem; }
.page-head .lede { margin-bottom: 0; }

.crumbs {
  padding-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }

.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose p, .prose li { max-width: 65ch; }
.prose img { margin: 1.5rem 0; }
.prose-note { font-size: 0.9rem; color: var(--muted); }
.wrap-note { margin-top: 1.5rem; }

.note-box {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  background: var(--paper);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.note-box h2, .note-box h3 { margin-top: 0; }
.note-box > :last-child { margin-bottom: 0; }

.tick-list { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.tick-list li { padding-left: 1.5rem; position: relative; }
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--gold);
  border-radius: 2px;
}

.rule-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.rule-list li { border: 1px solid var(--line); padding: 0.9rem 1rem; background: var(--paper); }

.plain-steps li { margin-bottom: 0.5rem; }

.flag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brown-ink);
  border: 1px solid var(--brown-ink);
  border-radius: 2px;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
}

/* ------------------------------------------------------------------ */
/* Join page                                                            */
/* ------------------------------------------------------------------ */

.join-steps { display: grid; gap: 1rem; }
.join-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  padding: 1.1rem 1.25rem;
}
.join-step h3 { margin-bottom: 0.25rem; }
.join-step p { margin: 0; }

.join-grid { display: grid; gap: 2rem; }
.join-aside { display: grid; gap: 1rem; align-content: start; }

.aside-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1.25rem;
}
.aside-card h3 { margin-top: 0; }
.aside-dark { background: var(--green); border-color: var(--green); }
.aside-dark h3, .aside-dark p { color: #fff; }
.aside-dark .paybill { border: 2px solid var(--gold); }

/* ------------------------------------------------------------------ */
/* Forms                                                                */
/* ------------------------------------------------------------------ */

.form { display: grid; gap: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; color: var(--green-ink); }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green);
  outline: none;
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--red);
}
.field-error { color: var(--red-ink); font-size: 0.9rem; margin: 0.3rem 0 0; }
.form-error {
  color: var(--red-ink);
  border: 1px solid var(--red);
  background: #FDF0F1;
  padding: 0.75rem 1rem;
  font-weight: 600;
}
.field-check label { display: flex; gap: 0.6rem; font-weight: 400; align-items: flex-start; }
.field-check input[type="checkbox"] { width: 1.3rem; height: 1.3rem; margin-top: 0.2rem; flex: none; accent-color: var(--green); }
.field-check .field-error { margin-left: 1.9rem; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-alt { margin-top: 1rem; font-size: 0.95rem; color: var(--muted); }
.req { color: var(--red); }

/* ------------------------------------------------------------------ */
/* Contact                                                              */
/* ------------------------------------------------------------------ */

.contact-grid { display: grid; gap: 2rem; }
.contact-block h2 { margin-top: 0; }

/* ------------------------------------------------------------------ */
/* Forms page                                                           */
/* ------------------------------------------------------------------ */

.form-cards { display: grid; gap: 1rem; }
.form-card {
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  background: var(--paper);
  padding: 1.25rem;
}
.form-card h2 { font-size: 1.2rem; }
.form-status { font-size: 0.95rem; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* News                                                                 */
/* ------------------------------------------------------------------ */

.notice-list { display: grid; gap: 1rem; }
.notice { border: 1px solid var(--line); padding: 1.25rem; background: var(--paper); }
.notice-pinned { border-top: 4px solid var(--gold); }
.notice-date { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; }
.notice h2 { font-size: 1.2rem; }

.empty-state {
  border: 1px dashed var(--line);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* Thanks / 404                                                         */
/* ------------------------------------------------------------------ */

.thanks-box { padding: 1rem 0 1rem; }
.lost-links li { margin-bottom: 0.5rem; }

/* ------------------------------------------------------------------ */
/* Footer                                                               */
/* ------------------------------------------------------------------ */

.site-footer {
  background: var(--green-ink);
  color: #DCE7DD;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}
.river-footer { margin-bottom: 0.75rem; }
.footer-name { font-weight: 700; font-size: 1.15rem; color: #fff; margin-bottom: 0.15rem; }
.footer-legal { font-size: 0.85rem; margin-bottom: 0.35rem; }
.footer-reg { font-size: 0.85rem; margin-bottom: 0.75rem; }
.footer-brand address { font-style: normal; font-size: 0.9rem; line-height: 1.7; }
.footer-brand a, .footer-links a, .footer-legal-links a, .footer-bar a { color: var(--gold); }
.footer-head {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.footer-links, .footer-legal-links { display: flex; flex-direction: column; }
.footer-links a, .footer-legal-links a {
  padding: 0.3rem 0;
  text-decoration: none;
  color: #DCE7DD;
  min-height: 32px;
}
.footer-links a:hover, .footer-legal-links a:hover { color: var(--gold); text-decoration: underline; }
.footer-fraud { font-size: 0.8rem; color: #DCE7DD; margin-top: 0.75rem; }
.footer-bar {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1.25rem;
  padding-bottom: 5.5rem; /* room for floating action buttons on phones */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.footer-bar p { margin: 0; }

/* ------------------------------------------------------------------ */
/* Floating action buttons                                              */
/* ------------------------------------------------------------------ */

.float-actions {
  position: fixed;
  right: 0.9rem;
  bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 60;
}
.float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  text-decoration: none;
}
.float-wa { background: #25D366; color: #fff; border-color: #1DA851; }
.float-wa svg { width: 26px; height: 26px; }
.float-call { background: var(--green); color: #fff; border-color: #fff; }
.float-btn:hover { transform: none; }
.float-wa:hover { background: #1EBE5A; color: #fff; }
.float-call:hover { background: var(--green-deep); color: #fff; }

/* ------------------------------------------------------------------ */
/* Image slots — flat-colour placeholders, crop with object-fit         */
/* ------------------------------------------------------------------ */

.img-slot {
  width: 100%;
  object-fit: cover;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ar-hero { aspect-ratio: var(--ar-hero); }
.ar-card { aspect-ratio: var(--ar-card); }
.ar-audience { aspect-ratio: var(--ar-audience); }
.ar-office { aspect-ratio: var(--ar-office); }
.ar-office-lg { aspect-ratio: var(--ar-office-lg); }
.ar-feature { aspect-ratio: var(--ar-feature); }
.hero-img { width: 100%; }

/* ------------------------------------------------------------------ */
/* Admin                                                                */
/* ------------------------------------------------------------------ */

.admin { background: var(--wash); }
.admin-header { background: var(--green-ink); color: #fff; }
.admin-header-in { padding-top: 0.75rem; padding-bottom: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; }
.admin-brand { color: #fff; text-decoration: none; font-weight: 700; margin-right: auto; }
.admin-brand span { color: var(--gold); font-weight: 400; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.admin-nav a { color: #DCE7DD; text-decoration: none; font-size: 0.9rem; padding: 0.4rem 0; min-height: 32px; display: inline-flex; align-items: center; }
.admin-nav a:hover { color: var(--gold); }
.admin-main { padding: 2rem 0 4rem; }
.admin-main h1 { margin-top: 0; }
.admin-note { color: var(--muted); font-size: 0.95rem; }
.admin-saved { border: 1px solid var(--green); background: #EAF4EC; color: var(--green-deep); padding: 0.6rem 1rem; font-weight: 600; }
.admin-head-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

.admin-auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.auth-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  padding: 2rem;
  width: 100%;
  max-width: 24rem;
}
.auth-box h1 { font-size: 1.4rem; }
.auth-note { color: var(--muted); font-size: 0.95rem; }
.auth-back { margin-top: 1rem; font-size: 0.9rem; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 1.5rem 0; }
.stat {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  padding: 1rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}
.stat-num { display: block; font-size: 1.8rem; font-weight: 700; color: var(--green); }
.stat:hover { border-top-color: var(--gold); color: var(--green-ink); }

.admin-cols { display: grid; gap: 2rem; }
.admin-cols h2 { font-size: 1.2rem; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 0.95rem; }
.admin-table th, .admin-table td { border: 1px solid var(--line); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.admin-table th { background: var(--wash); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-table-wide { display: block; overflow-x: auto; }
.admin-table-wide table, .admin-table-wide { min-width: 40rem; }

.pill { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 2px; font-size: 0.8rem; font-weight: 700; }
.pill-new { background: var(--gold-tint); color: var(--brown-ink); border: 1px solid var(--gold); }
.pill-contacted { background: #E4F0F8; color: var(--blue-ink); border: 1px solid var(--blue); }
.pill-closed { background: var(--wash); color: var(--muted); border: 1px solid var(--line); }

.flagged-list { padding-left: 1.2em; }
.flagged-list li { margin-bottom: 0.35rem; }

.row-actions { display: flex; gap: 0.5rem; align-items: center; }
.row-actions form { margin: 0; }
.status-form select { font: inherit; min-height: 40px; }
.admin-form { max-width: 46rem; background: var(--paper); border: 1px solid var(--line); padding: 1.5rem; }
.settings-grid { display: grid; gap: 1rem; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }

/* ==========================================================================
   <768px — paired CTAs stay on one line: equal widths, compact height,
   labels never wrap. The office detail puts its primary action on a
   full-width row above the two secondary ones.
   ========================================================================== */

@media (max-width: 47.99rem) {
  .hero-actions, .cta-actions { flex-wrap: nowrap; gap: 0.6rem; }
  .btn-pair, .office-cta { grid-template-columns: 1fr 1fr; }
  .office-cta .btn:first-child { grid-column: 1 / -1; }
  .hero-actions .btn, .cta-actions .btn, .btn-pair .btn, .office-cta .btn {
    flex: 1 1 0;
    min-height: 40px;
    padding: 0.5rem 0.55rem;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
  }
}

/* ==========================================================================
   ≥640px — large phones / small tablets
   ========================================================================== */

@media (min-width: 40rem) {
  :root { --pad: 1.5rem; }
  h1 { font-size: 2.3rem; }
  .hero h1 { font-size: 2.6rem; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .loan-cards { grid-template-columns: repeat(2, 1fr); }
  .audience { grid-template-columns: repeat(2, 1fr); }
  .audience li { display: flex; flex-direction: column; }
  .rhythm-week { grid-template-columns: repeat(8, 1fr); }
  .day.is-welfare { grid-column: auto; }
  .join-steps { grid-template-columns: repeat(2, 1fr); }
  .form-cards { grid-template-columns: repeat(3, 1fr); }
  .office-cards { grid-template-columns: repeat(2, 1fr); }
  .cta-strip { flex-direction: row; align-items: center; justify-content: space-between; }
  .cta-actions { flex: none; }
  .cta-actions .btn { flex: none; }
  .stat-grid { grid-template-columns: repeat(5, 1fr); }
  .footer-bar { flex-direction: row; justify-content: space-between; padding-bottom: 1.25rem; }
}

/* ==========================================================================
   ≥768px — tablets
   ========================================================================== */

@media (min-width: 48rem) {
  .hero { padding: 3rem 0; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; gap: 2.5rem; }
  .band { padding: 3.5rem 0; }
  .trust-grid { grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; }
  .join-grid { grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: 2.5rem; }
  .loan-detail { grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; }
  .office-detail { grid-template-columns: 0.9fr 1.1fr; gap: 2.5rem; }
  .loan-row { grid-template-columns: 1.2fr 1fr auto; align-items: center; }
  .loan-row-cta .btn { width: auto; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 0.8fr; }
  .admin-cols { grid-template-columns: 1.2fr 0.8fr; }
  .settings-grid { grid-template-columns: repeat(2, 1fr); }
  .office-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   ≥1024px — laptops: full nav, no hamburger
   ========================================================================== */

@media (min-width: 64rem) {
  :root { --pad: 2rem; }
  h1 { font-size: 2.75rem; }
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border-bottom: none;
  }
  .site-nav a {
    padding: 0.4rem 0.7rem;
    border-bottom: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
  }
  .site-nav a[aria-current="page"] { border-bottom: 3px solid var(--gold); }
  .btn-nav { margin-top: 0; margin-left: 0.5rem; padding: 0.5rem 1.1rem; }
  .loan-cards { grid-template-columns: repeat(4, 1fr); }
  .audience { grid-template-columns: repeat(3, 1fr); }
  .join-steps { grid-template-columns: repeat(4, 1fr); }
  .join-step { border-left: 1px solid var(--line); border-top: 4px solid var(--green); }
  .office-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   ≥1440px — wide screens: more air, capped widths hold
   ========================================================================== */

@media (min-width: 90rem) {
  .band { padding: 4.5rem 0; }
  .hero { padding: 4.5rem 0; }
  .loan-cards { grid-template-columns: repeat(4, 1fr); }
  .office-cards { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
