/* =========================================================
   Global Impact Corps — Professional Polish Layer
   (Overrides only; keeps existing layout/branding intact)
   ========================================================= */

/* Core refinement tokens */
:root{
  /* Typography: use Manrope for a clean, professional tone */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* Softer, more modern shadows */
  --shadow: 0 18px 44px rgba(11,34,63,.14);
  --shadow-soft: 0 12px 28px rgba(11,34,63,.12);

  /* Slightly stronger border for clarity on light backgrounds */
  --stroke: rgba(31,53,83,.14);

  /* Crisper glass cards */
  --card: rgba(255,255,255,.94);
  --card-2: rgba(255,255,255,.90);

  /* Rounded corners across sections */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
}

/* Base typography polish */
html{ text-size-adjust: 100%; }
body{
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Mobile safeguard: prevent accidental horizontal scroll caused by long
   flex rows / intrinsic media widths, while keeping intentional horizontal
   scrollers (thumbnail rails, map tags) functional. */
html, body{ overflow-x: hidden; }

/* Transparency: allow single-wide metric rows (e.g., Current funds) */
.metric-row.metric-row-single{ grid-template-columns: 1fr; }
.metric-row.metric-row-single .metric{ grid-column: 1 / -1; }

/* =========================================================
   iOS Mobile Input Zoom Prevention
   iOS Safari auto-zooms when focusing form fields with
   font-size < 16px. Keep mobile inputs at 16px so the
   viewport does not zoom and layouts remain stable.
   (Applies to all user-input controls, including map search.)
   ========================================================= */
@media (max-width: 760px){
  :where(
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea
  ){
    font-size: 16px !important;
  }
}

/* Map search pills should be readable and never appear clipped.
   The base stylesheet used a very small font-size (11px) which
   also triggered iOS focus-zoom. */
.map-search{
  padding: 10px 12px;
  min-height: 44px;
}
.hero-map--home .map-search{ padding: 11px 14px; }
.map-search input{
  font-size: 14px !important;
  line-height: 1.2;
}
@media (max-width: 760px){
  .map-search input{ font-size: 16px !important; }
}

/* Calm the background texture slightly (keeps brand feel, reduces visual noise) */
body::before{
  opacity: .08;
  background-size: 20px 20px;
}

/* Slightly roomier container padding (feels more premium) */
.container{
  width: min(var(--container), calc(100% - 56px));
}
@media (max-width: 640px){
  .container{ width: min(var(--container), calc(100% - 28px)); }
}

/* =========================================================
   Projects directory — Mobile search bar height fix
   On the Projects Map page, the directory toolbars switch to
   flex-direction: column at <=980px. The base stylesheet sets
   `.section-search` / `.funding-search` to `flex: 1 1 420px`,
   which becomes a *height* basis in column mode and makes the
   search bar huge on mobile.
   Keep the search row auto-height while preserving full width.
   ========================================================= */
@media (max-width: 980px){
  .section-toolbar .section-search,
  .funding-toolbar .funding-search{
    flex: 0 0 auto !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* Headings: tighter, modern tracking */
h1,h2,h3{
  letter-spacing: -0.01em;
}

/* Nav: slightly larger labels, improved readability */
.navlinks a{
  font-size: 13px;
  letter-spacing: .15px;
}
@media (max-width: 1100px){
  .navlinks a{ font-size: 12.5px; }
}

/* Buttons: consistent premium sizing + clearer states */
.btn{
  font-size: 14px;
  padding: 11px 18px;
  min-height: 40px;
  border-radius: var(--radius-sm);
}

/* Small buttons should still feel like real buttons (not tiny text chips) */
.btn-sm,
.btn.btn-sm{
  padding: 9px 14px;
  font-size: 13px;
  min-height: 36px;
  border-radius: var(--radius-sm);
}

/* Dense directory grids keep a compact footprint */
:where(.projects-grid-5, .funding-grid) .btn-sm{
  min-height: 32px;
}

@media (max-width: 640px){
  .btn{ min-height: 42px; }
  .btn-sm,
  .btn.btn-sm{ min-height: 40px; }
}
.btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(34,184,199,.22), var(--shadow-soft);
}

/* Ensure outline buttons remain readable in content areas */
.btn-outline{
  background: rgba(255,255,255,.92);
  border-color: rgba(31,53,83,.20);
  color: var(--text);
  box-shadow: 0 6px 14px rgba(11,34,63,.08);
}
.btn-outline:hover{
  border-color: rgba(31,53,83,.26);
  background: rgba(255,255,255,.97);
}

/* Cards: consistent border + shadow + hover lift */
.card{
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.card:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ---------------------------------------------------------
   Unified image framing
   - consistent border + shadow for all content media
   - excludes logos and Leaflet marker sprites
   --------------------------------------------------------- */
img:not(.brand-logo):not(.leaflet-marker-icon):not(.leaflet-marker-shadow){
  border-radius: var(--radius-md);
}

:where(
  .card img,
  .card-media img,
  [class*="popover"] img,
  .about-photo img,
  .about-hero-media img,
  .problem-img,
  .photo-img,
  .volunteer-img,
  .steward-photo,
  .solution-media img,
  .update-item img
):not(.brand-logo):not(.leaflet-marker-icon):not(.leaflet-marker-shadow){
  border: 1px solid rgba(31,53,83,.14);
  box-shadow: 0 14px 30px rgba(11,34,63,.12);
  background: rgba(255,255,255,.92);
}

/* ---------------------------------------------------------
   Face-safe focal framing
   Many documentary photos include faces near the upper third.
   Nudge object-position upward slightly for key content images
   to avoid awkward forehead cropping while keeping landscapes
   and wide shots natural.
   --------------------------------------------------------- */
:root{ --img-focal-y: 32%; }

:where(
  .idea-hero-media img,
  .about-hero-media img,
  .contact-hero-media img,
  .donate-hero-image-card img,
  .donate-project-hero-media img,
  .popover-img img,
  .rel-img img,
  .update-item img,
  .solution-media img,
  .about-photo img,
  .photo-img,
  .problem-img,
  .volunteer-img,
  .steward-photo
){
  object-position: 50% var(--img-focal-y) !important;
}

/* Inputs: slightly crisper borders and focus */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="number"],
select,
textarea{
  border-color: rgba(31,53,83,.20);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus{
  border-color: rgba(34,184,199,.65);
  box-shadow: 0 0 0 4px rgba(34,184,199,.18);
}

/* Section headers: slightly stronger divider (more “institutional”) */
.section-head::after,
.section-title::after{
  opacity: .6;
}

/* Chips/tags: slightly clearer outline for readability */
.chip{
  border-color: rgba(31,53,83,.18);
}
.chip:hover{
  border-color: rgba(31,53,83,.26);
}

/* Footer: cleaner link hover */
.site-footer a:hover{
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Motion: keep it subtle, always respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .card,
  .btn,
  .chip{
    transition: none !important;
  }
}

/* =========================================================
   Vertical rhythm (final pass)
   ========================================================= */

:root{
  --section-pad: clamp(14px, 2.0vw, 28px);
  --section-pad-tight: clamp(10px, 1.4vw, 20px);
}

/* Consistent padding for shared section blocks */
.section{ padding: var(--section-pad) 0 !important; }

:where(.home-main, .about-section, .donate-section, .contact-section){
  padding: var(--section-pad) 0 !important;
}

/* Hero bands keep a touch tighter bottom spacing */
:where(.page-hero, .about-hero, .contact-hero, .donate-hero, .idea-hero, .project-hero){
  padding: var(--section-pad) 0 var(--section-pad-tight) !important;
}

/* =========================================================
   Contact — "Connect with us" spacing polish
   ========================================================= */

/* Give the connect card the same comfortable padding as other
   contact cards, and a slightly roomier internal stack. */
.connect-card{
  padding: 16px;
  gap: var(--stack-4);
}

/* Add a small top rhythm so this block doesn't feel tight
   against the previous section content. */
.contact-section .connect-grid{
  margin-top: 6px;
}

/* Slightly increase separation between the connect grid and the
   verification card below (only in this section). */
.contact-section .connect-grid + .spacer{
  height: 18px;
}

/* Contact form: fill the column so it visually balances the side rail */
.contact-form-fill{
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(31,53,83,.10);
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 26px rgba(9,26,47,.06);
}
.contact-form-fill-title{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(22,50,79,.82);
}
.contact-form-fill-sub{
  margin: 8px 0 0;
  color: rgba(22,50,79,.72);
}
.contact-form-fill-grid{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.contact-form-step{
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(22,50,79,.10);
}
.contact-form-step-top{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-bottom: 6px;
}
.contact-form-step-num{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: 12px;
  color: rgba(22,50,79,.86);
  background: rgba(34,184,199,.18);
  border: 1px solid rgba(34,184,199,.22);
}
.contact-form-step-title{
  font-weight: 900;
  color: rgba(22,50,79,.92);
}
.contact-form-step-text{
  margin: 0;
  color: rgba(22,50,79,.74);
}
.contact-form-fill-callout{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(34,184,199,.22);
  background:
    radial-gradient(420px 160px at 18% 20%, rgba(34,184,199,.18), transparent 62%),
    rgba(255,255,255,.70);
  color: rgba(22,50,79,.78);
}

@media (max-width: 720px){
  .contact-form-fill-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   Hierarchy + readability (headers should not be smaller than body text)
   ========================================================= */

/* Enterprise polish: align section headers on a baseline for perfect rhythm */
.section-head{
  align-items: baseline !important;
}

.section-title{
  font-size: clamp(18px, 1.6vw, 22px) !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 10px !important;
}
.section-sub,
.section-note{
  font-size: 14px !important;
  line-height: 1.75 !important;
}
.page-subtitle{
  font-size: 14px !important;
  line-height: 1.75 !important;
}
.work-title{
  font-size: 16px !important;
  font-weight: 800 !important;
}
.process-title{
  font-size: 18px !important;
  font-weight: 900 !important;
}
.project-section-title{
  font-size: 20px !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}
.idea-after-title,
.campaign-supporting-title,
.timeline-title{
  font-size: 15px !important;
  font-weight: 900 !important;
}
.step-title{
  font-size: 16px !important;
  font-weight: 900 !important;
}
.step-text{
  font-size: 13px !important;
  font-weight: 650 !important;
}
.step-num{
  font-size: 11px !important;
}
details.faq .faq-body{
  font-size: 13px !important;
}

/* Tighter section cadence (reduces empty vertical gaps) */
.section-head{
  margin: 4px 0 10px !important;
}
:where(.section, .home-main, .about-section, .donate-section, .contact-section){
  padding: var(--section-pad) 0 !important;
}
:where(.page-hero, .about-hero, .contact-hero, .donate-hero, .idea-hero, .project-hero){
  padding: var(--section-pad) 0 var(--section-pad-tight) !important;
}

/* =========================================================
   Unified world background across pages (centered + cohesive)
   ========================================================= */
:root{
  --world-wash-img: url("../img/world-map-watercolor-hq.webp");
}

/* Make hero backgrounds consistent across pages */
:where(.page-hero, .about-hero, .contact-hero, .donate-hero, .idea-hero){
  position: relative;
  /* Allow the world wash to blend into the next section */
  overflow: visible;
}

/* Extend the wash past the hero bottom and fade it out so it
   transitions smoothly into the next section. */
:where(.page-hero, .about-hero, .contact-hero, .donate-hero, .idea-hero)::before{
  inset: -26px 0 -220px !important;
  opacity: .46 !important;
  z-index: 0 !important;
  background-image: var(--noise-svg), var(--world-wash-img) !important;
  background-size: 240px 240px, cover !important;
  background-repeat: repeat, no-repeat !important;
  background-position: 0 0, center !important;
  filter: saturate(1.10) contrast(1.05) brightness(.94) !important;
  animation: gicNoiseDrift 30s linear infinite !important;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 74%, rgba(0,0,0,.55) 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 74%, rgba(0,0,0,.55) 88%, transparent 100%);
}

/* Soft left-to-right wash (slightly deeper blue) */
:where(.page-hero, .about-hero, .contact-hero, .donate-hero, .idea-hero)::after{
  content:"";
  position:absolute;
  inset: -26px 0 -220px;
  pointer-events:none;
  z-index: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.70) 0%, rgba(255,255,255,.22) 52%, rgba(60,160,215,.30) 100%);
  opacity: .82;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 74%, rgba(0,0,0,.55) 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 74%, rgba(0,0,0,.55) 88%, transparent 100%);
}

/* Keep hero content above the overlays */
:where(.page-hero, .about-hero, .contact-hero, .donate-hero, .idea-hero) .container{
  position: relative;
  z-index: 1;
}

/* Volunteer hero: stronger right-side tint that fades left */
.page-hero--volunteer::after{
  background:
    radial-gradient(520px 260px at 85% 55%, rgba(34,184,199,.22), transparent 62%),
    linear-gradient(270deg, rgba(34,184,199,.18) 0%, rgba(34,184,199,.08) 38%, rgba(34,184,199,0) 74%);
  opacity: .95;
}


/* Home hero: use the same world wash asset + fade into the next section */
.hero{
  overflow: visible;
}
.hero::after{
  background-image: var(--world-wash-img) !important;
  /* Extend below the hero so the wash blends into the next section */
  inset: -24px -36px -220px -36px !important;
  opacity: .40 !important;
  filter: saturate(1.12) contrast(1.05) brightness(.94) !important;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 74%, rgba(0,0,0,.55) 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 74%, rgba(0,0,0,.55) 88%, transparent 100%);
}
.hero::before{
  /* Keep the existing animation + sizing, but tune the wash to a deeper blue */
  inset: 0 0 -220px 0 !important;
  background-image:
    var(--noise-svg),
    radial-gradient(800px 240px at 20% 45%, rgba(55,145,205,.44), transparent 60%),
    radial-gradient(900px 260px at 85% 25%, rgba(55,145,205,.30), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.14)) !important;
  opacity: .86 !important;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 74%, rgba(0,0,0,.55) 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 74%, rgba(0,0,0,.55) 88%, transparent 100%);
}

/* =========================================================
   Submit an Idea — new section styles
   ========================================================= */

/* Hero media: avoid “dead space” when the copy column is taller on desktop.
   Let the image expand to fill the card and keep the caption pinned. */
.idea-hero-media{
  display: flex;
  flex-direction: column;
  height: 100%;
}
.idea-hero-media img{
  flex: 1 1 auto;
  height: auto !important;
  min-height: 300px;
}
.idea-hero-caption{
  margin-top: auto;
}

.idea-subtitle-secondary{
  margin-top: 10px !important;
  color: rgba(22,50,79,.70) !important;
}

.idea-quality-grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
  align-items: start;
}
.idea-quality-card{
  padding: 18px;
}
.idea-quality-list{
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 14px;
}
.idea-quality-item h3{
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 900;
  color: var(--blue-900);
}
.idea-quality-item p{
  margin: 0;
  color: rgba(22,50,79,.76);
}
.idea-quality-item ul{
  margin: 8px 0 0 18px;
  color: rgba(22,50,79,.74);
}
.idea-quality-test{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(31,53,83,.14);
}
.idea-quality-test-title{
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 900;
  color: var(--blue-900);
}
.idea-quality-test-sub{
  margin: 0 0 8px;
  color: rgba(22,50,79,.72);
}
.idea-quality-test-list{
  margin: 0 0 14px 18px;
  color: rgba(22,50,79,.74);
}
.idea-quality-actions{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.idea-quality-media{
  padding: 0;
  overflow: hidden;
}
.idea-quality-media img{
  width:100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  display:block;
}
.media-caption{
  padding: 12px 14px 14px;
}
.media-caption .cap-title{
  font-size: 12px;
  font-weight: 900;
  color: var(--blue-900);
  margin-bottom: 4px;
}
.media-caption .cap-text{
  font-size: 12px;
  font-weight: 650;
  color: rgba(22,50,79,.72);
  line-height: 1.6;
}

/* How it works grid responsiveness (2 rows of 3 on desktop) */
@media (max-width: 980px){
  .idea-steps{ grid-template-columns: repeat(2, 1fr) !important; }
  .idea-quality-grid{ grid-template-columns: 1fr !important; }
  .idea-quality-media img{ min-height: 320px; }
}

@media (max-width: 640px){
  .hero-map.hero-map--dock{
    grid-template-rows: auto auto 360px auto;
  }
}
@media (max-width: 560px){
  .idea-steps{ grid-template-columns: 1fr !important; }
}

/* =========================================================
   Corps Apply — “Why Become a Corps Member?” section
   ========================================================= */
.corps-why-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items: stretch;
}
.corps-why-card{
  padding: 18px;
}
.long-copy p{
  margin: 0 0 12px;
  color: rgba(22,50,79,.78);
}
.long-copy p strong{
  color: var(--blue-900);
}
.corps-why-lines{
  margin: 14px 0 14px;
  padding: 12px 14px;
  border-left: 4px solid rgba(34,184,199,.55);
  background: rgba(34,184,199,.08);
}
.corps-why-lines .line{
  font-weight: 800;
  color: rgba(22,50,79,.80);
  margin: 2px 0;
}
.corps-why-quote{
  margin: 14px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(31,53,83,.12);
  background: rgba(255,255,255,.72);
}
.corps-why-quote .quote-title{
  font-weight: 900;
  color: var(--blue-900);
}
.corps-why-quote .quote-body{
  margin-top: 2px;
  font-weight: 750;
  color: rgba(22,50,79,.74);
}
.corps-why-final{
  margin-top: 10px;
  font-weight: 700;
}
.corps-why-media{
  padding: 0;
  overflow: hidden;
}
.corps-why-media img{
  width:100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  display:block;
}

/* Collage variant (replaces the single photo) */
.corps-why-collage{
  padding: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 700px at 10% 0%, rgba(34,184,199,.08), transparent 55%),
              radial-gradient(900px 600px at 100% 100%, rgba(53,98,255,.06), transparent 55%),
              rgba(255,255,255,.92);
}

.corps-collage{
  flex: 1;
  min-height: 560px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.corps-collage .cc-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% var(--img-focal-y);
  border-radius: 14px;
  border: 1px solid rgba(31,53,83,.12);
  box-shadow: 0 18px 40px rgba(22,50,79,.10);
  filter: saturate(1.02) contrast(1.02);
}

.corps-collage .cc-1{ grid-column: 1 / 8; grid-row: 1 / 8; }
.corps-collage .cc-2{ grid-column: 8 / 13; grid-row: 1 / 6; }
.corps-collage .cc-3{ grid-column: 1 / 6; grid-row: 8 / 13; }
.corps-collage .cc-4{ grid-column: 6 / 13; grid-row: 6 / 13; }

@media (max-width: 980px){
  .corps-why-grid{ grid-template-columns: 1fr !important; }
  .corps-why-media img{ min-height: 320px; }
  .corps-collage{ min-height: 340px; }
}

/* ==========================================================
   Flow polish — tighter rhythm + consistent headings
   (keeps the existing visual style, improves cohesion)
   ========================================================== */

/* Slightly tighter section rhythm to reduce “floaty” gaps */
:root{
  --section-pad: clamp(14px, 2.1vw, 30px);
  --section-pad-tight: clamp(10px, 1.6vw, 22px);
}

/* Home hero uses a different wrapper; align its spacing with the rest */
.hero{
  padding: var(--section-pad) 0 var(--section-pad-tight) !important;
}
.hero-left{
  padding-top: clamp(10px, 1.6vw, 18px) !important;
}

/* Make sure every major section uses the same cadence */
:where(.home-main, .about-section, .contact-section, .donate-section, .projects-section){
  padding: var(--section-pad) 0 var(--section-pad-tight) !important;
}

/* Consistent, clearly larger headings in section headers */
:where(.section-head, .about-section-head, .projects-directory-card .directory-head, .project-related-card .related-head)
  :where(h1,h2,h3){
  font-size: clamp(18px, 1.55vw, 22px) !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.18 !important;
}

/* Card header rows should never read smaller than their content */
.contact-card-head h2{
  font-size: 16px !important;
  line-height: 1.2 !important;
}

/* Contact cards: improve hierarchy without changing layout */
.contact-route-title{ font-size: 15px !important; }
.location-top h3{ font-size: 15px !important; }

/* Reduce extra “dead air” between stacked blocks */
.home-intro{ margin-bottom: 12px !important; }
.home-grid{ padding: 12px !important; }

/* Make long-form prose read cleaner and more consistent with site rhythm */
.prose{ max-width: 80ch !important; }
.founder-letter{ padding: clamp(16px, 2vw, 22px) !important; }
.founder-letter .prose p{ line-height: 1.78 !important; }


/* =========================================================
   Card hierarchy extension
   - Ensure compact card titles are clearly larger than body text
   - Improves scanability and removes “header smaller than body” moments
   ========================================================= */

:root{
  --fs-card-kicker: 10.5px;
  --fs-card-title: 13px;
  --fs-card-body: 11.4px;
  --fs-card-meta: 11px;
}

/* Map/project popovers */
.project-popover{
  /* Slightly larger so descriptions read comfortably */
  width: min(400px, calc(100% - 28px));
  visibility: visible;
  transition:
    left .18s ease,
    top .18s ease,
    opacity .18s ease,
    transform .18s ease,
    visibility 0s linear 0s;
}
.hero-map--home .project-popover{
  width: min(440px, calc(100% - 28px));
}
.hero-map--projects .project-popover{
  width: min(440px, calc(100% - 28px));
}

@media (max-width: 760px){
  /* Keep the mobile bottom-sheet behavior (full width) */
  .project-popover,
  .hero-map--home .project-popover,
  .hero-map--projects .project-popover{
    width: auto !important;
    max-width: none !important;
  }
}

/* Stack image above copy (cleaner, more “editorial” preview) */
.project-popover .popover-inner{
  grid-template-columns: 1fr !important;
}
.project-popover .popover-img{
  height: 156px;
  min-height: 156px;
}
.project-popover .popover-body{
  padding: 12px 14px 14px;
  /* Allow the card to size naturally. (Previous max-height could clip
     text/actions due to the popover container using overflow:hidden.) */
  max-height: none;
}

/* Desktop hover rule: allow the popover to fade away so pins remain selectable */
.project-popover.is-hidden{
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  visibility: hidden;
  transition:
    left .18s ease,
    top .18s ease,
    opacity .18s ease,
    transform .18s ease,
    visibility 0s linear .18s;
}

.popover-title{
  font-size: clamp(13px, 1.15vw, 14px) !important;
}
.popover-meta{
  font-size: var(--fs-card-meta) !important;
}
.popover-desc{
  font-size: var(--fs-card-body) !important;
  line-height: 1.58 !important;
  display: -webkit-box;
  /* Default: keep previews compact and readable */
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Prevent last-line clipping in some mobile WebKit builds */
  padding-bottom: 1px;
}

/* “View more” toggle for map popovers */
.popover-more{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -2px 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(26,167,187,.98);
  font-size: 11.2px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
}
.popover-more::after{
  content: '▾';
  opacity: .85;
  transform: translateY(-1px);
  font-size: 12px;
}
.project-popover.is-expanded .popover-more::after{
  content: '▴';
}
.popover-more:hover{ text-decoration: underline; }
.popover-more:focus-visible{
  outline: 2px solid rgba(26,167,187,.55);
  outline-offset: 2px;
  border-radius: 6px;
}
.popover-more.is-hidden{ display:none; }

/* Expanded state: show full description and allow body to scroll
   if it grows beyond the viewport. */
.project-popover.is-expanded .popover-desc{
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}
.project-popover.is-expanded .popover-body{
  max-height: min(560px, calc(100vh - 190px));
  overflow: auto;
}

/* Directory cards (Current / Completed / Funding) */
.rel-kicker{
  font-size: var(--fs-card-kicker) !important;
}
.rel-body h4{
  font-size: var(--fs-card-title) !important;
  line-height: 1.24 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rel-body p{
  font-size: var(--fs-card-body) !important;
  line-height: 1.58 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rel-meta{
  font-size: var(--fs-card-meta) !important;
}
.rel-progress-row{
  font-size: var(--fs-card-kicker) !important;
}

/* Update blocks */
.update-title{
  font-size: 12.6px !important;
}
.update-desc{
  font-size: 11.2px !important;
  line-height: 1.58 !important;
}

/* Detail rows and “Impact” rows */
.detail-title,
.impact-title{
  font-size: 12.6px !important;
}
.detail-text,
.impact-sub{
  font-size: 11.2px !important;
  line-height: 1.62 !important;
}
.detail-sub,
.summary-frequency{
  font-size: 10.6px !important;
}
.alloc-title{
  font-size: 12px !important;
}

/* Steward cards */
.steward-name{ font-size: 13px !important; }
.steward-role,
.steward-location{ font-size: 11px !important; }
.steward-bio{ font-size: 11.2px !important; }
.steward-about-title{ font-size: 10.6px !important; }

/* Home program feature card */
.program-feature h3{ font-size: 15px !important; }
.program-feature p{
  font-size: 11.4px !important;
  line-height: 1.55 !important;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.program-caption{ font-size: 11.4px !important; }

/* Chips and small badges (make them readable on mobile) */
.check-chip{ font-size: 11px !important; }
.chip{ font-size: 11px !important; }

/* Prevent tiny-text regression on very large screens */
@media (min-width: 1400px){
  .popover-title{ font-size: 14px !important; }
  .rel-body h4{ font-size: 13.5px !important; }
}

/* =========================================================
   Professional grade polish
   - Typography hierarchy (fix small headers vs larger body)
   - Slightly deeper world-wash tint
   - Volunteer page right-side fade panel
   - Consistent section cadence
   ========================================================= */

/* Final vertical rhythm (single source of truth)
   Keep sections tight but breathable across desktop + mobile. */
:root{
  --section-pad: clamp(14px, 2.15vw, 32px);
  --section-pad-tight: clamp(10px, 1.55vw, 22px);

  /* Responsive micro-type used on dense 5-column grids */
  --fs-card-kicker: clamp(10.6px, .78vw, 11.6px);
  --fs-card-title: clamp(13.2px, .95vw, 14.3px);
  --fs-card-body: clamp(12px, .88vw, 12.8px);
  --fs-card-meta: clamp(11.2px, .84vw, 12.1px);
}

/* “Step list” readability (used on Volunteer + Corps pages)
   The default sizes were too small relative to neighboring copy. */
.step-body strong{
  font-size: 13px !important;
  font-weight: 900 !important;
}
.step-body div{
  font-size: 12px !important;
  font-weight: 650 !important;
}

/* Slightly deeper blue world wash so the map reads premium,
   while keeping copy contrast safe. */
:where(.page-hero, .about-hero, .contact-hero, .donate-hero, .idea-hero)::before,
.hero::after{
  filter: saturate(1.12) contrast(1.06) brightness(.94) !important;
}

/* Volunteer page: right-side tint behind the “How matching works” row
   (creates a gentle “fade left” panel). */
body.volunteer-page #roles .about-grid-2{
  position: relative;
}
body.volunteer-page #roles .about-grid-2::before{
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 18px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(520px 260px at 88% 58%, rgba(34,184,199,.22), transparent 62%),
    linear-gradient(270deg, rgba(34,184,199,.18) 0%, rgba(34,184,199,.10) 34%, rgba(34,184,199,0) 70%);
  opacity: .95;
}
body.volunteer-page #roles .about-grid-2 > *{
  position: relative;
  z-index: 1;
}

/* Tighten overly-loose spacers without changing layout semantics */
.spacer-18{ height: 14px !important; }
.spacer-14{ height: 12px !important; }
/* Used by Reporting & Budgeting page between document grid and FAQ */
.spacer-16{ height: 24px; }

/* =========================================================
   Mobile density: tighter grid gaps + consistent rhythm
   ========================================================= */
@media (max-width: 760px){
  :where(.related-grid, .program-grid, .impact-grid, .connect-grid, .projects-grid-5, .funding-grid){
    gap: 10px !important;
  }
  :where(.projects-grid-5, .funding-grid){
    gap: 8px !important;
  }
}

@media (max-width: 520px){
  :where(.related-grid, .program-grid, .impact-grid, .connect-grid){
    gap: 10px !important;
  }
}

/* =========================================================
   Mobile drawer legibility
   - Ensure the slide-out menu has a SOLID surface so links
     remain readable over bright hero/map backgrounds.
   ========================================================= */
.mobile-drawer{
  /* solid fallback */
  background-color: #0b1c30 !important;
  /* premium solid gradient surface */
  background-image: linear-gradient(180deg, #0b1c30 0%, #123a5a 100%) !important;
  /* prevent translucency effects */
  backdrop-filter: none !important;
}

.drawer-overlay{
  /* keep the page behind dimmed, but avoid "milky" transparency */
  background: rgba(6, 12, 20, 0.72) !important;
  backdrop-filter: none !important;
}

.mobile-links a,
.mobile-actions .btn,
.mobile-actions .btn-outline{
  color: rgba(255,255,255,.95) !important;
}

/* =========================================================
   Form refinements
   - Email-draft forms: stack fields so inputs fill the card
   - Sidebar subscribe: stretch email input, keep CTA compact
   ========================================================= */

/* Forms that submit via the site endpoint (Volunteer / Corps / Submit an Idea)
   are easier to complete when fields are full-width. */
.email-draft-form .form-row{
  grid-template-columns: 1fr !important;
}

/* Newsletter / email signup forms inside compact cards */
.newsletter-form .form-row{
  grid-template-columns: 1fr !important;
}

/* Project pages: “Email for updates” should be wide, with a compact button */
.sidefill-form .form-row{
  grid-template-columns: 1fr auto !important;
  align-items: center;
}
.sidefill-form .input{ min-width: 0; }
.sidefill-form .btn{
  width: auto !important;
  white-space: nowrap;
}

/* Small heading used to add meaningful “filler” summaries where columns feel empty */
.sidefill-kicker{
  margin-top: 14px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(22,50,79,.65);
}


/* =========================================================
   Image sizing fixes (hero + banners)
   - prevents oversized images creating large vertical gaps
   - keeps imagery crisp + consistent across pages
   ========================================================= */

img{ max-width: 100%; }

/* Inner pages: hero/banner image inserted beneath .page-head */
.page-hero-img{
  width: 100%;
  display: block;
  margin: 14px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(31,53,83,.12);
  box-shadow: var(--shadow-soft);
  /* Keep the hero band professional (not full-photo height) */
  height: clamp(220px, 26vw, 360px);
  object-fit: cover;
  object-position: 50% var(--img-focal-y);
}

/* Home page: small documentary photo under the "Global Projects" stats */
.hero-inline-img{
  width: 100%;
  display: block;
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(31,53,83,.12);
  box-shadow: var(--shadow-soft);
  height: clamp(180px, 18vw, 240px);
  object-fit: cover;
  object-position: 50% var(--img-focal-y);
}

/* Home hero map should fill the grid height so there is no empty vertical band */
.hero-map--home{
  height: auto !important;
  min-height: 470px;
}

@media (max-width: 980px){
  .hero-map--home{ min-height: 440px; }
}
@media (max-width: 640px){
  .hero-map--home{ min-height: 380px; }
}

/* Mobile maps: keep controls above the canvas (prevents the search bar from
   covering pins/regions on small screens and improves scroll ergonomics). */
@media (max-width: 760px){
  .hero-map--home{
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(31,53,83,.12) !important;
    background: linear-gradient(180deg, rgba(170,220,245,.26), rgba(255,255,255,.44)) !important;
    box-shadow: var(--shadow) !important;
  }
  .hero-map--home .map-toolbar{
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: auto !important;
    margin: 0;
    justify-content: flex-start;
  }
  /* Ensure the search pill doesn't grow vertically when the toolbar stacks */
  .hero-map--home .map-search{ flex: 0 0 auto !important; }
  .hero-map--home #workMap{
    height: clamp(260px, 62vw, 380px) !important;
    min-height: 0 !important;
    border-radius: 12px;
    overflow: hidden;
  }
}

/* =========================================================
   FINAL POLISH OVERRIDES
   (tighten spacing + fix a few image edge cases)
   ========================================================= */

/* Prevent avatar distortion (square PNGs should not stretch) */
.team-avatar{
  object-fit: cover;
  background: #e7f3ff;
}

/* Some pages apply `card-media` directly to an <img> (not a wrapper). */
img.card-media{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(31,53,83,.12);
  box-shadow: 0 12px 22px rgba(10,30,55,.10);
}

/* Reduce accidental "dead space" where media columns were forcing extra height */
.connect-media img,
.verify-media img{
  /* previously fixed min-heights could exceed the copy height */
  min-height: clamp(220px, 24vw, 300px);
}

/* Volunteer media: keep proportional across desktops without over-stretching */
.volunteer-media img{
  min-height: clamp(220px, 28vw, 360px);
}

/* Long-form side images: scale more naturally on very large displays */
.idea-quality-media img{
  min-height: clamp(340px, 42vw, 520px);
}
.corps-why-media img{
  min-height: clamp(360px, 44vw, 560px);
}


/* =========================================================
   Project media gallery (inline + modal)
   ========================================================= */

/* Match default media aspect ratio to our current documentary set (2:1), but keep videos 16:9 */
.project-media-card .media-stage[data-media-type="video"]{ aspect-ratio: 16 / 9; cursor: default; }
.project-media-card .media-stage{ cursor: zoom-in; }
.gic-media-stage[data-media-type="video"]{ aspect-ratio: 16 / 9; cursor: default; }
.gic-media-stage{ cursor: zoom-in; }

/* Better keyboard focus for gallery controls */
.media-thumb:focus-visible .media-thumb-frame,
.gic-media-grid .media-thumb:focus-visible .media-thumb-frame{
  outline: 3px solid rgba(34,184,199,.55);
  outline-offset: 3px;
}

.media-arrow:focus-visible,
.gic-media-close:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(34,184,199,.22), 0 10px 18px rgba(11,34,63,.14);
}


/* Lock page scroll when the media modal is open */
html.gic-modal-open,
body.gic-modal-open{
  overflow: hidden;
}

.project-media-card .media-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.project-media-card .media-viewer{
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31,53,83,.14);
  background: rgba(22,50,79,.06);
  overflow: hidden;
}

.project-media-card .media-stage{
  width: 100%;
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.project-media-card .media-stage .media-img,
.project-media-card .media-stage .media-video,
.project-media-card .media-stage .media-iframe{
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31,53,83,.14);
  box-shadow: 0 14px 30px rgba(11,34,63,.12);
  background: rgba(255,255,255,.92);
}

.project-media-card .media-stage .media-img,
.project-media-card .media-stage .media-video{
  object-fit: contain;
}

.project-media-card.media-single .media-arrow{ display: none; }

.media-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(31,53,83,.18);
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 18px rgba(11,34,63,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.media-arrow:hover{ background: rgba(255,255,255,.92); }
.media-arrow:disabled{ opacity: .35; cursor: default; }
.media-prev{ left: 12px; }
.media-next{ right: 12px; }

.project-media-card .media-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(22,50,79,.75);
}

.project-media-card .media-caption{
  font-weight: 600;
  color: rgba(22,50,79,.82);
}

.project-media-card .media-count{
  color: rgba(22,50,79,.60);
}

.project-media-card .media-thumbs{
  margin-top: 12px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.project-media-card .media-thumbs::-webkit-scrollbar{ height: 8px; }
.project-media-card .media-thumbs::-webkit-scrollbar-thumb{
  background: rgba(31,53,83,.14);
  border-radius: 999px;
}

.media-thumb{
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.media-thumb-frame{
  position: relative;
  width: 88px;
  height: 58px;
  border-radius: 12px;
  border: 1px solid rgba(31,53,83,.16);
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(11,34,63,.10);
  background: rgba(255,255,255,.92);
  display: block;
}

.media-thumb-frame img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.media-thumb.is-active .media-thumb-frame{
  border-color: rgba(34,184,199,.95);
  box-shadow: 0 0 0 3px rgba(34,184,199,.18), 0 10px 18px rgba(11,34,63,.14);
}

.media-play{
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(26,167,187,.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(11,34,63,.16);
}

/* ------------------------------
   Modal
   ------------------------------ */
.gic-media-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.gic-media-modal.is-open{ display: block; }

.gic-media-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(11,34,63,.58);
}

.gic-media-dialog{
  position: relative;
  width: min(1120px, calc(100% - 48px));
  max-height: calc(100% - 48px);
  margin: 24px auto;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(31,53,83,.22);
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(0,0,0,.32);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gic-media-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(31,53,83,.12);
  background: rgba(255,255,255,.90);
}

.gic-media-title{
  font-weight: 800;
  letter-spacing: -0.01em;
  color: rgba(22,50,79,.92);
}

.gic-media-close{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(31,53,83,.18);
  background: rgba(255,255,255,.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.gic-media-close:hover{ background: rgba(255,255,255,.98); }

.gic-media-body{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 0;
}

.gic-media-stage-wrap{
  position: relative;
  padding: 16px;
  min-height: 0;
}

.gic-media-stage{
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31,53,83,.14);
  background: rgba(22,50,79,.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.gic-media-stage .media-img,
.gic-media-stage .media-video,
.gic-media-stage .media-iframe{
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31,53,83,.14);
  box-shadow: 0 14px 30px rgba(11,34,63,.12);
  background: rgba(255,255,255,.92);
}

.gic-media-stage .media-img,
.gic-media-stage .media-video{
  object-fit: contain;
}

.gic-media-modal.media-single .media-arrow{ display: none; }

.gic-media-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(22,50,79,.70);
}

.gic-media-caption{ font-weight: 700; color: rgba(22,50,79,.86); }
.gic-media-count{ color: rgba(22,50,79,.55); }

.gic-media-strip{
  border-left: 1px solid rgba(31,53,83,.12);
  background: rgba(255,255,255,.92);
  padding: 16px;
  overflow: auto;
}

.gic-media-strip-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.gic-media-strip-title{
  font-weight: 800;
  color: rgba(22,50,79,.90);
}

.gic-media-strip-sub{
  font-size: 12px;
  color: rgba(22,50,79,.58);
}

.gic-media-grid{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gic-media-grid .media-thumb-frame{
  width: 100%;
  height: 92px;
}

@media (max-width: 900px){
  .gic-media-body{ grid-template-columns: 1fr; }
  .gic-media-strip{
    border-left: 0;
    border-top: 1px solid rgba(31,53,83,.12);
  }
  .gic-media-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px){
  .gic-media-dialog{
    width: calc(100% - 20px);
    margin: 10px auto;
    max-height: calc(100% - 20px);
    border-radius: 16px;
  }
  .gic-media-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* On phones: keep the inline thumbnail rail compact, but do not shrink the
     modal grid thumbnails (they should remain full-width within the grid). */
  .project-media-card .media-thumbs .media-thumb-frame{ width: 84px; height: 56px; }
  .gic-media-grid .media-thumb-frame{ width: 100%; height: 92px; }
}

/* =========================================================
   Layout safety
   - Prevent offscreen bleed from long content
   - Ensure flex/grid children can shrink on small screens
   ========================================================= */

/* Make media never exceed its container */
img, video, canvas, svg, iframe{
  max-width: 100%;
}

/* Allow long words/URLs to wrap instead of forcing horizontal scroll */
:where(p, li, a, h1, h2, h3, h4, h5, h6){
  overflow-wrap: anywhere;
}

/* Flex/grid children should be allowed to shrink */
:where(.container, .hero-grid, .home-grid, .programs-grid, .program-grid, .project-grid, .project-row, .split-grid, .donate-grid, .contact-grid, .idea-grid, .corps-grid, .verify-grid, .connect-grid) > *{
  min-width: 0;
}

/* =========================================================
   Mobile layout hardening (final QA)
   - Prevents off-center feeling and accidental overflow on phones
   - Makes CTA rows and filter rows stack cleanly
   ========================================================= */

@media (max-width: 760px){
  /* Primary CTA rows should never overflow; stack for clean tap targets. */
  .hero-cta{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .hero-cta .btn{
    width: 100%;
    min-width: 0 !important;
    justify-content: center;
  }

  /* Home "Global Projects" card header should wrap without pushing layout */
  .work-head{
    flex-direction: column;
    align-items: flex-start;
  }
  .work-filters{
    flex-wrap: wrap;
  }

  /* Programs right column: avoid chip row overflow */
  .right-top{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .legend-chips{
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* =========================================================
   Home — Programs section polish
   - Removes “empty slot” feeling in Project Focus Areas
   - Adds a richer Field Missions follow-up block
   - Expands the Partners card so it doesn't feel sparse
   ========================================================= */

.section-kicker{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(22,50,79,.62);
}

.focus-followup{
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
}

.focus-followup-grid{
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: stretch;
}

.focus-followup-copy{
  padding: 16px 16px 16px;
}

.focus-followup-title{
  margin: 6px 0 8px;
  font-size: 15px;
  font-weight: 900;
  color: var(--blue-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.focus-followup-text{
  margin: 0 0 10px;
  color: rgba(22,50,79,.74);
  font-size: 11.5px;
  line-height: 1.72;
  font-weight: 650;
}

.focus-followup-bullets{
  margin: 0;
  padding-left: 18px;
  color: rgba(22,50,79,.78);
  font-size: 11px;
  line-height: 1.6;
  font-weight: 700;
}
.focus-followup-bullets li{ margin: 4px 0; }

.focus-followup-callout{
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(31,53,83,.10);
  background: rgba(255,255,255,.72);
}
.focus-followup-callout .callout-title{
  font-weight: 950;
  letter-spacing: -.02em;
  color: rgba(22,50,79,.90);
  font-size: 12.5px;
  margin: 0 0 6px;
}
.focus-followup-callout .callout-text{
  margin: 0;
  color: rgba(22,50,79,.70);
  font-size: 12px;
  line-height: 1.6;
}

.focus-followup-media{
  position: relative;
}

.focus-followup-media img{
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.focus-followup-media::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,35,60,.08) 0%, rgba(12,35,60,.52) 100%);
  pointer-events: none;
}

.partner-highlights{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 10px 0 12px;
}

/* Donate — avoid stretched cards that create “empty” vertical space */

/* =========================================================
   Transparency — replace redundant download buttons with richer panels
   ========================================================= */
.transparency-panels{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.transparency-panels .card{
  background: rgba(255,255,255,.78);
  border-color: rgba(31,53,83,.10);
  box-shadow: 0 14px 26px rgba(10,30,55,.06);
}
@media (max-width: 900px){
  .transparency-panels{ grid-template-columns: 1fr; }
}
.donation-grid.donate-grid{ align-items: start; }
.donation-grid.donate-grid > *{ align-self: start; }

/* Feature card with a background photo (used in Donate page Featured Projects) */
.program-feature--photo{
  position: relative;
  padding: 0;
  overflow: hidden;
  background: none;
  color: #fff;
}

.program-feature--photo .program-feature-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
}

.program-feature--photo::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,24,44,.20) 0%, rgba(8,24,44,.85) 100%);
  pointer-events: none;
}

.program-feature--photo .program-feature-overlay{
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.program-feature--photo .program-feature-overlay h3{
  color: #fff;
  text-shadow: 0 8px 26px rgba(0,0,0,.35);
}

.program-feature--photo .program-feature-overlay p{
  color: rgba(255,255,255,.90);
}

.program-feature--photo .program-feature-overlay .btn{
  margin-top: auto;
  align-self: flex-start;
}

/* Small utility list (compact, readable) */
.tight-list{
  margin: 8px 0 0 18px;
  padding: 0;
  color: rgba(22,50,79,.74);
  font-size: 11px;
  line-height: 1.6;
  font-weight: 700;
}
.tight-list li{ margin: 4px 0; }

.partner-highlight{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(31,53,83,.12);
  background: rgba(255,255,255,.70);
}

.ph-title{
  font-weight: 900;
  color: var(--blue-900);
  font-size: 11.5px;
}

.ph-sub{
  margin-top: 2px;
  font-weight: 650;
  color: rgba(22,50,79,.72);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 980px){
  .focus-followup-grid{ grid-template-columns: 1fr; }
  .focus-followup-media img{ min-height: 260px; }
}


/* =========================================================
   Final QA polish
   - Prevent layout shift when modal opens (stable scrollbar gutter)
   - Provide a professional fallback copy area for email-draft forms
   ========================================================= */

html{
  /* Prevent horizontal “jump” when we lock scroll for modals */
  scrollbar-gutter: stable;
}

.idea-after-draft{
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(31,53,83,.18);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 22px rgba(11,34,63,.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(22,50,79,.86);
  min-height: 200px;
  resize: vertical;
}
@media (max-width: 520px){
  .idea-after-draft{ min-height: 180px; }
}


/* =========================================================
   Requested final polish updates
   ========================================================= */

/* Keep specific section titles on one line on desktop (wrap on mobile) */
.nowrap-title{ white-space: nowrap; }
@media (max-width: 680px){
  .nowrap-title{ white-space: normal; }
}

/* Submit Idea / Corps right-rail typography refinement */
.idea-side .mini-title{
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.idea-side .mini-muted{
  font-size: 11px;
  line-height: 1.7;
  color: rgba(22,50,79,.74);
}
.idea-side .mini-p{ font-size: 11px; line-height: 1.6; }
.idea-side .idea-quality-test-list li{ font-size: 11px; line-height: 1.65; }
.idea-side .tight-list{ font-size: 11px; line-height: 1.65; }

/* Donate — allow the under-form standards card to fill down to the donor-resources rail */
.page-donate .donation-grid.donate-grid{
  align-items: stretch;
}
.page-donate .donation-grid.donate-grid > *{
  align-self: stretch;
}

.page-donate .donate-left-stack{
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}

.page-donate .donate-underform-card{
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
}

.page-donate .donate-underform-grid{
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 14px;
  align-items: stretch;
}

.page-donate .donate-underform-media{
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(31,53,83,.12);
  background: rgba(255,255,255,.80);
  min-height: 220px;
}

.page-donate .donate-underform-media img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.page-donate .donate-underform-copy{
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page-donate .donate-underform-copy .hero-cta{
  margin-top: auto;
}

/* Donate hero: match Submit Idea hero styling (remove drift/noise animation on this page) */
.page-donate .donate-hero.idea-hero::before{
  animation: none;
}

/* Donate hero — Split layout (image + funds tracker)
   Prevents the hero photo from being covered/cut and keeps both panels equal size. */
.page-donate .donate-hero-split{
  min-width: 0;
  height: 100%;
}
.page-donate .donate-hero-split-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  height: 100%;
}
.page-donate .donate-hero-split-grid > *{ height: 100%; }
.page-donate .donate-hero-image-card{
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.page-donate .donate-hero-image-card img{
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 280px;
  object-fit: cover;
  display: block;
}
.page-donate .donate-funds-card{
  padding: 14px 14px 12px;
  border-radius: 16px;
  background:
    radial-gradient(520px 220px at 18% 22%, rgba(34,184,199,.16), transparent 58%),
    radial-gradient(520px 220px at 90% 90%, rgba(53,98,255,.10), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.80));
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.page-donate .donate-funds-top{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.page-donate .donate-funds-title{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(15,39,65,.96);
}
.page-donate .donate-funds-meta{
  font-size: 11px;
  font-weight: 800;
  color: rgba(22,50,79,.62);
  white-space: normal;
}
.page-donate .donate-funds-total{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(31,53,83,.12);
}
.page-donate .donate-funds-total-label{
  font-size: 11px;
  font-weight: 900;
  color: rgba(22,50,79,.70);
}
.page-donate .donate-funds-total-value{
  margin-top: 2px;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.03em;
  color: rgba(15,39,65,.98);
  font-variant-numeric: tabular-nums;
}
.page-donate .donate-funds-breakdown{
  margin-top: 10px;
  display: grid;
  gap: 9px;
  min-height: 0;
}
.page-donate .donate-funds-row-head{
  display:grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: baseline;
}
.page-donate .donate-funds-name{
  font-size: 11.5px;
  font-weight: 900;
  color: rgba(15,39,65,.92);
}
.page-donate .donate-funds-amt{
  font-size: 11px;
  font-weight: 850;
  color: rgba(22,50,79,.72);
  font-variant-numeric: tabular-nums;
}
.page-donate .donate-funds-pct{
  font-size: 11px;
  font-weight: 900;
  color: rgba(34,184,199,.95);
}
.page-donate .donate-funds-bar{
  margin-top: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(31,53,83,.10);
  overflow: hidden;
}
.page-donate .donate-funds-fill{
  display:block;
  height: 100%;
  width: var(--pct, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34,184,199,.95), rgba(55,145,205,.85));
}
.page-donate .donate-funds-foot{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(31,53,83,.12);
  margin-top: auto;
}
.page-donate .donate-funds-foot .mini-link{
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 760px){
  .page-donate .donate-hero-split-grid{
    grid-template-columns: 1fr;
  }
  .page-donate .donate-hero-image-card img{ min-height: 260px; }
}

@media (max-width: 980px){
  .page-donate .donate-underform-grid{ grid-template-columns: 1fr; }
  .page-donate .donate-underform-media{ min-height: 220px; }
}


/* =========================================================
   Final Typography + Page-Level Polish (professional grade)
   - Unifies font usage, rhythm, and “important statement” styling
   - Tightens About / Programs / Donate areas called out in QA
   ========================================================= */

/* Use Manrope everywhere for a clean, professional tone */
:root{
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Slightly refine body copy rhythm (keeps layout stable) */
body{
  letter-spacing: -0.005em;
}

/* Consistent emphasis (important statements) */
:where(.home-intro-sub strong, .about-lead strong, .page-subtitle strong, .mini-callout strong, .secure-note strong){
  color: rgba(15,39,65,.95);
  font-weight: 850;
}

/* Make note text read like an intentional callout (not loose “floating” text) */
:where(.about-hero-note, .idea-hero-note, .donate-hero-note){
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(31,53,83,.12);
  background:
    radial-gradient(480px 160px at 20% 30%, rgba(34,184,199,.16), transparent 62%),
    rgba(255,255,255,.72);
  box-shadow: 0 10px 22px rgba(11,34,63,.08);
}

/* =========================================================
   About — Mission / Vision / Values refinement
   ========================================================= */
.about-section-head--split{
  align-items: baseline !important;
}
.about-section-head--split .section-title{
  margin: 0 !important;
}
.about-section-head--split .about-lead{
  margin: 0 !important;
  max-width: 74ch !important;
}
@media (max-width: 760px){
  .about-section-head--split{
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px !important;
  }
}

.about-grid-3 .about-card{
  display:flex;
  flex-direction: column;
  height: 100%;
}
.about-grid-3 .about-card p{
  font-size: 11.4px;
  line-height: 1.72;
}

.about-bullets{
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(22,50,79,.78);
  font-size: 11.1px;
  line-height: 1.55;
  font-weight: 650;
}
.about-bullets li{ margin: 6px 0; }
.about-bullets strong{
  color: rgba(15,39,65,.92);
  font-weight: 850;
}

.values-divider{
  height: 1px;
  background: rgba(31,53,83,.12);
  margin: 12px 0 10px;
}

/* =========================================================
   Programs — Field Missions should align with Partners
   Stretch the Field Missions card to the bottom of the right column.
   ========================================================= */
.home-grid > div:first-child{
  min-height: 0;
}
.home-grid > div:first-child .focus-followup{
  flex: 1 1 auto;
  display:flex;
  min-height: 0;
}
.home-grid > div:first-child .focus-followup-grid{
  height: 100%;
}
.home-grid > div:first-child .focus-followup-copy{
  display:flex;
  flex-direction: column;
  height: 100%;
}
.home-grid > div:first-child .focus-followup-copy .hero-cta{
  margin-top: auto !important;
}

/* Why we exist: slightly more executive typography */
.home-intro-title{
  letter-spacing: -0.03em !important;
  line-height: 1.12 !important;
}
.home-intro-sub{
  font-size: 13px !important;
  line-height: 1.82 !important;
  font-weight: 650 !important;
  color: rgba(22,50,79,.72) !important;
}

/* =========================================================
   Donate — tighten copy + reduce “dead air”
   ========================================================= */
.page-donate .donate-underform-card .mini-title{
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}
.page-donate .donate-underform-card .mini-p{
  font-size: 10.6px !important;
  line-height: 1.55 !important;
}
.page-donate .donate-underform-card .mini-callout{
  font-size: 10.8px !important;
}


/* =========================================================
   Home — Why we exist (hover polish)
   Prevents subtle gradient/flicker caused by transparent card lift
   ========================================================= */
.home-intro.card{
  background: rgba(255,255,255,.96);
}
.home-intro.card:hover{
  /* Keep the card visually stable on hover */
  transform: none;
}


/* =========================================================
   Project pages — Updates become scrollable (more updates)
   ========================================================= */
.project-updates-card .updates-accordion{
  max-height: 560px;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-gutter: stable;
}

/* Subtle, professional scrollbar */
.project-updates-card .updates-accordion::-webkit-scrollbar{ width: 10px; }
.project-updates-card .updates-accordion::-webkit-scrollbar-track{ background: rgba(31,53,83,.06); border-radius: 999px; }
.project-updates-card .updates-accordion::-webkit-scrollbar-thumb{
  background: rgba(31,53,83,.22);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.70);
}

@media (max-width: 720px){
  .project-updates-card .updates-accordion{
    /* Mobile UX: avoid trapping users in a nested scroller.
       Let the page scroll so the full update content is always reachable
       and never appears cut off behind the sticky action bar. */
    max-height: none;
    overflow: visible;
    padding-right: 0;
    padding-bottom: 0;
    scroll-padding-bottom: 0;
    scrollbar-gutter: auto;
  }
}

/* Updates accordion: improve readability on narrow screens when an item is expanded.
   The default left-indent (to clear the thumbnail) is too tight on phones. */
@media (max-width: 720px){
  .update-panel{
    padding-left: 12px;
  }
}

/* Updates accordion — consistent spacing on desktop (prevents uneven card heights)
   while keeping full details available when expanded. */
@media (min-width: 721px){
  .update-sum-top{
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    column-gap: 10px;
  }

  .update-title{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .update-summary{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}


/* =========================================================
   Project volunteer form — more writing space (skills/message)
   Helps balance left column with "Stay connected" right rail.
   ========================================================= */
.project-volunteer-card textarea#viNotes,
.project-volunteer-card textarea[name="notes"]{
  min-height: clamp(220px, 22vh, 300px);
  resize: vertical;
}

@media (min-width: 980px){
  .project-volunteer-card textarea#viNotes,
  .project-volunteer-card textarea[name="notes"]{
    min-height: clamp(260px, 24vh, 380px);
  }
}

/* Volunteer form follow-up filler (balances columns on project pages) */
.project-volunteer-card .volunteer-fill{
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(31,53,83,.12);
  background:
    radial-gradient(420px 180px at 15% 15%, rgba(34,184,199,.10), transparent 62%),
    rgba(255,255,255,.70);
  box-shadow: 0 12px 22px rgba(10,30,55,.06);
}
.project-volunteer-card .volunteer-fill-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.project-volunteer-card .volunteer-fill-title{
  font-weight: 950;
  letter-spacing: -.02em;
  color: rgba(22,50,79,.92);
  font-size: 13px;
}
.project-volunteer-card .volunteer-fill-badge{
  font-size: 11px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(31,53,83,.14);
  background: rgba(255,255,255,.86);
  color: rgba(22,50,79,.76);
  white-space: nowrap;
}
.project-volunteer-card .volunteer-fill-list{
  margin: 0;
  padding-left: 18px;
  color: rgba(22,50,79,.78);
  font-size: 12.5px;
  line-height: 1.65;
}
.project-volunteer-card .volunteer-fill-list li{ margin: 7px 0; }
.project-volunteer-card .volunteer-fill-note{
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(22,50,79,.70);
}
@media (max-width: 720px){
  .project-volunteer-card textarea#viNotes,
  .project-volunteer-card textarea[name="notes"]{
    min-height: clamp(160px, 18vh, 220px);
  }
}


/* =========================================================
   Footer — Social icon row (site-wide)
   ========================================================= */
.footer-social{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  margin-top: 12px;
}
.footer-social .social-ic{
  width: 38px;
  height: 38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 12px;
  border: 1px solid rgba(31,53,83,.14);
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 22px rgba(11,34,63,.10);
  color: rgba(22,50,79,.82);
  transition: transform .14s ease, background .14s ease, border-color .14s ease, color .14s ease;
}
.footer-social .social-ic svg{ width: 18px; height: 18px; }
.footer-social .social-ic:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.94);
  border-color: rgba(31,53,83,.22);
  color: rgba(22,50,79,.92);
}
.footer-social .social-ic:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(34,184,199,.20), 0 10px 22px rgba(11,34,63,.12);
}


/* =========================================================
   About — Leadership cards: LinkedIn + Email icons
   ========================================================= */
.team-name-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.team-links{
  display:flex;
  align-items:center;
  gap: 8px;
}
.team-ic{
  width: 34px;
  height: 34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 12px;
  border: 1px solid rgba(31,53,83,.14);
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 18px rgba(11,34,63,.10);
  color: rgba(22,50,79,.84);
  transition: transform .14s ease, background .14s ease, border-color .14s ease, color .14s ease;
}
.team-ic svg{ width: 18px; height: 18px; }
.team-ic:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.95);
  border-color: rgba(31,53,83,.22);
  color: rgba(22,50,79,.92);
}
.team-ic:focus-visible{
  outline:none;
  box-shadow: 0 0 0 4px rgba(34,184,199,.18), 0 10px 18px rgba(11,34,63,.12);
}
@media (max-width: 560px){
  .team-name-row{ flex-wrap:wrap; }
  .team-links{
    width:100%;
    justify-content:flex-start;
    margin-top: 6px;
  }
}


/* =========================================================
   Global Typography + Alignment System (Final Site Pass)
   Goal: professional, consistent type scale + perfectly aligned
   headers/subheaders + more readable body copy.
   ========================================================= */

:root{
  /* Type scale */
  --fs-body: 16px;
  --fs-copy: 15px;
  --fs-small: 14px;
  --fs-micro: 12px;

  /* Line heights */
  --lh-title: 1.12;
  --lh-copy: 1.78;
  --lh-small: 1.65;

  /* Tracking */
  --trk-title: -0.02em;
}

body{
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-variant-numeric: tabular-nums lining-nums;
  text-rendering: optimizeLegibility;
}

/* Headings: consistent modern rhythm */
h1,h2,h3,h4{
  font-family: var(--font);
  letter-spacing: var(--trk-title);
  line-height: var(--lh-title);
}

/* Page heroes */
.page-kicker{
  font-size: var(--fs-micro) !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
}
.page-title{
  font-size: clamp(30px, 3.1vw, 44px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.03em !important;
}
.page-subtitle{
  font-size: var(--fs-copy) !important;
  line-height: var(--lh-copy) !important;
}

/* Home hero */
.hero-title{
  font-size: clamp(36px, 3.7vw, 46px) !important;
  line-height: 1.06 !important;
  letter-spacing: -0.03em !important;
}
.hero-subtitle{
  font-size: var(--fs-copy) !important;
  line-height: var(--lh-copy) !important;
}

/* Forms: readable, professional field sizing */
.input,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="number"],
select,
textarea{
  font-size: var(--fs-copy) !important;
  line-height: 1.55 !important;
}

.input{
  padding: 11px 12px !important;
  border-radius: 10px !important;
}

/* File inputs: match the premium button + field styling (desktop + mobile)
   Note: browsers do not allow attaching files via mailto automatically.
   We still present a professional "Attach files" UI so users can select files
   and then attach them in their email client after the draft opens. */
.input[type="file"]{
  padding: 9px 12px !important;
  cursor: pointer;
}
.input[type="file"]::file-selector-button{
  margin-right: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(31,53,83,.22);
  background: rgba(255,255,255,.92);
  color: var(--text);
  box-shadow: 0 6px 14px rgba(11,34,63,.06);
  cursor: pointer;
}
.input[type="file"]::file-selector-button:hover{
  background: rgba(255,255,255,.98);
  border-color: rgba(31,53,83,.28);
}
/* Safari */
.input[type="file"]::-webkit-file-upload-button{
  margin-right: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(31,53,83,.22);
  background: rgba(255,255,255,.92);
  color: var(--text);
  box-shadow: 0 6px 14px rgba(11,34,63,.06);
  cursor: pointer;
}
.input[type="file"]::-webkit-file-upload-button:hover{
  background: rgba(255,255,255,.98);
  border-color: rgba(31,53,83,.28);
}

.file-note{
  margin-top: 6px;
}


/* Enterprise file upload (custom button + filename pills)
   - Works with the hidden <input type=file>
   - Selected file names display as removable pills
   - Note: mailto cannot attach files automatically; we list filenames in the draft.
*/
.file-upload{ margin-top: 2px; }
.file-upload__head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.file-upload__hint{ white-space: nowrap; }
.file-upload__controls{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.file-upload__btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.file-upload__btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(34,184,199,.22), var(--shadow-soft);
}
.file-upload__icon{ display: inline-flex; }
.file-upload__input{
  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;
}
.file-upload__list{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.file-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(31,53,83,.18);
  box-shadow: 0 6px 14px rgba(11,34,63,.06);
  max-width: 100%;
}
.file-pill__name{
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
@media (max-width: 520px){
  .file-pill__name{ max-width: 160px; }
}
.file-pill__size{
  font-size: 12px;
  color: var(--muted);
}
.file-pill__remove{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(31,53,83,.18);
  background: rgba(255,255,255,.96);
  cursor: pointer;
}
.file-pill__remove:hover{
  border-color: rgba(31,53,83,.28);
  background: rgba(255,255,255,1);
}
.file-pill__remove svg{
  width: 14px;
  height: 14px;
}

.input-label,
label{
  font-size: var(--fs-micro) !important;
  font-weight: 800 !important;
  letter-spacing: .02em;
}

/* Section headings (site-wide) */
.section-title{
  font-size: clamp(20px, 1.8vw, 24px) !important;
  line-height: 1.18 !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}

/* Some sections use plain h2/h3 inside header rows (no .section-title class).
   Normalize them so headers stay consistent across the entire site. */
:where(
  .section-head,
  .about-section-head,
  .project-related-card .related-head,
  .projects-directory-card .directory-head
) :is(h2,h3):not(.section-title){
  font-size: clamp(20px, 1.8vw, 24px) !important;
  line-height: 1.18 !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 8px !important;
}

.section-sub,
.section-note,
.about-lead{
  font-size: var(--fs-copy) !important;
  line-height: var(--lh-copy) !important;
  max-width: 78ch;
}

/* Perfectly aligned header rows: title left / meta right */
:where(.section-head, .about-section-head, .project-related-card .related-head, .projects-directory-card .directory-head){
  display:grid !important;
  grid-template-columns: 1fr auto;
  align-items: start !important;
  gap: 18px !important;
}

:where(.section-head, .about-section-head) > :where(.muted-small, .small){
  justify-self: end;
  align-self: start;
  margin-top: 2px;
}

@media (max-width: 760px){
  :where(.section-head, .about-section-head, .project-related-card .related-head, .projects-directory-card .directory-head){
    grid-template-columns: 1fr;
  }
  :where(.section-head, .about-section-head) > :where(.muted-small, .small){
    justify-self: start;
  }
}

/* Card typography: raise baseline readability (removes “tiny text” feel) */
.card :is(h2){
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em;
}
.card :is(h3){
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em;
}
.card :is(h4){
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}
.card :is(p, li){
  font-size: var(--fs-small) !important;
  line-height: var(--lh-copy) !important;
}
.card :is(p.small, .small, .muted-small){
  font-size: var(--fs-micro) !important;
  line-height: var(--lh-small) !important;
}

/* Common small-copy components */
.muted-small{
  font-size: var(--fs-micro) !important;
  line-height: var(--lh-small) !important;
}

/* Mini lists used across pages (make them readable + professional) */
.mini-h{
  font-size: var(--fs-small) !important;
  letter-spacing: -0.01em;
}
.mini-p{
  font-size: var(--fs-micro) !important;
  line-height: 1.6 !important;
}

/* Notes/callouts that were previously too small */
.about-note,
.micro-note,
.secure-note{
  font-size: var(--fs-micro) !important;
  line-height: var(--lh-small) !important;
}
.step-body div{
  font-size: var(--fs-small) !important;
  line-height: 1.65 !important;
}

/* Programs / Corps cards */
.program-card p{
  font-size: var(--fs-small) !important;
  line-height: 1.7 !important;
}
.program-tag{
  font-size: 11px !important;
}

/* Project pages: improve readability */
.project-kicker{
  font-size: var(--fs-micro) !important;
  letter-spacing: .12em !important;
}
.project-hero-sub{
  font-size: var(--fs-copy) !important;
  line-height: var(--lh-copy) !important;
}
.project-intro-copy p{
  font-size: var(--fs-copy) !important;
  line-height: var(--lh-copy) !important;
}

/* Breadcrumbs / crumbs should remain readable (avoid 10px UI text) */
.crumbs,
.crumbs a{
  font-size: var(--fs-micro) !important;
  line-height: var(--lh-small) !important;
}

/* Focus states for keyboard users (enterprise polish) */
:where(button, input, select, textarea):focus-visible{
  outline: none;
}
/* Clear, consistent focus rings for links */
a:focus-visible{
  outline: 2px solid rgba(34,184,199,.55);
  outline-offset: 3px;
  border-radius: 10px;
}
:where(.navlinks a, .mobile-links a, .footer-links a, .breadcrumb a):focus-visible{
  outline: 2px solid rgba(34,184,199,.55);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Respect reduced-motion settings for animated hero texture */
@media (prefers-reduced-motion: reduce){
  :where(.page-hero, .about-hero, .contact-hero, .donate-hero, .idea-hero)::before{
    animation: none !important;
  }
}

/* Metrics / small labels */
.metric-lbl,
.impact-lbl,
.raised-lbl,
.stat-label{
  font-size: var(--fs-micro) !important;
  line-height: 1.5 !important;
}

/* Donation bullets should never be 10px */
.donate-bullets li{
  font-size: var(--fs-small) !important;
  line-height: 1.55 !important;
}

/* =========================================================
   Mobile Map Toolbar Fix
   On very small screens the map toolbar switches to a column.
   The homepage map search bar previously had `flex: 1 1 360px`,
   which caused it to expand vertically and block the map.
   Keep it auto-height so the map remains usable.
   ========================================================= */
@media (max-width: 640px){
  /* Mobile toolbar must never be offset in a way that clips the search pill.
     (The home map toolbar is no longer absolutely centered on mobile.) */
  .hero-map--home .map-toolbar{
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Critical: do not allow the search pill to flex vertically */
  .hero-map--home .map-search{
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .hero-map--home .map-search input{ min-width: 0 !important; }

  /* Allow filter chips to wrap rather than forcing horizontal overflow */
  .hero-map--home .map-tags{
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* Mobile map search: always full-width and never clipped (home + projects map). */
@media (max-width: 760px){
  .hero-map .map-toolbar{ width: 100%; max-width: 100%; }
  .hero-map .map-search{ width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .hero-map .map-search input{ min-width: 0; }
  .hero-map .map-tags{ width: 100%; max-width: 100%; flex-wrap: wrap; }
}


/* Footer type: small but readable (professional) */
.footer-note,
.footer-links a{
  font-size: var(--fs-small) !important;
  line-height: 1.6 !important;
}


/* Long-form content readability */
.page-card p,
.card p{
  font-size: var(--fs-copy) !important;
  line-height: var(--lh-copy) !important;
}

/* =========================================================
   Projects Map — Mobile Popover Placement
   Keep the map visible by flowing the selected-project card
   below the map on narrow screens (instead of overlaying it).
   ========================================================= */
.project-popover.is-detached{
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin-top: 12px;
}

.project-popover.is-detached .popover-inner{
  grid-template-columns: 120px 1fr;
}

@media (max-width: 640px){
  .project-popover.is-detached .popover-inner{
    grid-template-columns: 110px 1fr;
  }
}

/* =========================================================
   Projects Map — Desktop Docked Layout
   - Prevent the selected-project card from blocking map pins
   - Keep toolbar/search from covering the map canvas
   ========================================================= */

/* Full Projects Map page: use a two-column dock (map + details) */
.hero-map.hero-map--dock{
  display: grid;
  grid-template-columns: 1fr 360px;
  /* Let the container size to content; keep a consistent, generous map stage */
  grid-template-rows: auto auto 460px;
  gap: 12px;
  padding: 12px;
  align-items: stretch;
  height: auto !important;
}

/* Ensure the texture overlay sits behind content in dock mode */
.hero-map.hero-map--dock::before{ z-index: 0 !important; }

.hero-map.hero-map--dock .map-toolbar{
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: auto !important;
  grid-column: 1 / -1;
  z-index: 6;
}

.hero-map.hero-map--dock .map-legend{
  grid-column: 1 / -1;
  margin: 0;
  z-index: 6;
  position: relative;
}

.hero-map.hero-map--dock #projectsMap{
  grid-column: 1;
  grid-row: 3;
  height: 100% !important;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  z-index: 2;
}

.hero-map.hero-map--dock .project-popover{
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  width: auto !important;
  max-width: none !important;
  grid-column: 2;
  grid-row: 3;
  z-index: 6;
  align-self: start;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.hero-map.hero-map--dock .project-popover .popover-inner{
  height: 100%;
}

.hero-map.hero-map--dock .project-popover .popover-body{
  display: flex;
  flex-direction: column;
}

.hero-map.hero-map--dock .project-popover .popover-actions{
  margin-top: auto;
}

/* Docked details card: keep actions pinned at the bottom for a clean, app-like feel */

@media (max-width: 980px){
  .hero-map.hero-map--dock{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 420px auto;
  }
  .hero-map.hero-map--dock #projectsMap{ grid-column: 1; grid-row: 3; }
  .hero-map.hero-map--dock .project-popover{ grid-column: 1; grid-row: 4; }
  .hero-map.hero-map--dock .project-popover .popover-body{ max-height: none; }
}

/* =========================================================
   Projects Map — Large Map (Overlay Preview)
   - Big map stage, controls above the canvas
   - Preview card floats over the map and auto-hides on desktop hover
   ========================================================= */
.hero-map.hero-map--projects{
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 560px;
  gap: 12px;
  padding: 12px;
  align-items: stretch;
  height: auto !important;
}
.hero-map.hero-map--projects::before{ z-index: 0 !important; }

.hero-map.hero-map--projects .map-toolbar{
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: auto !important;
  grid-column: 1;
  z-index: 6;
}

.hero-map.hero-map--projects .map-legend{
  grid-column: 1;
  margin: 0;
  z-index: 6;
  position: relative;
}

.hero-map.hero-map--projects #projectsMap{
  grid-column: 1;
  grid-row: 3;
  height: 100% !important;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  z-index: 2;
}

@media (min-width: 1100px){
  .hero-map.hero-map--projects{ grid-template-rows: auto auto 640px; }
}
@media (max-width: 760px){
  /* Mobile: reduce aggressive cropping of the 2:1 watercolor map and
     keep the stage comfortably scrollable around the page content. */
  .hero-map.hero-map--projects{ grid-template-rows: auto auto clamp(260px, 58vw, 420px); }
}

/* Home hero map: allow the preview card to be interacted with (hover delay handles map usability). */
.hero-map--home .project-popover{ pointer-events: auto; }

/* =========================================================
   Premium agency pass (Spacing + Micro-type)
   - Unify card internal padding (no more 12px vs 14px vs 18px randomness)
   - Eliminate <12px UI type while keeping dense grids compact via clamping
   ========================================================= */

:root{
  /* Card padding system */
  --pad-card: 16px;
  --pad-card-tight: 14px;
  --pad-card-roomy: 18px;

  /* Dense grid type tokens (never tiny) */
  --fs-card-kicker: clamp(12px, .85vw, 13px);
  --fs-card-title: clamp(14px, 1.0vw, 15.5px);
  --fs-card-body: clamp(13px, .95vw, 14.5px);
  --fs-card-meta: clamp(12.5px, .9vw, 13.5px);
}

/* =========================================================
   Sticky section sanity
   Some layouts previously used sticky cards. To prevent “sections scrolling
   with the page” in a distracting way, keep these sections static.
   ========================================================= */
@media (min-width: 980px){
  .donate-summary{
    position: static !important;
    top: auto !important;
  }
  .project-left .project-donate-card{
    position: static !important;
    top: auto !important;
  }
}

/* --- Card padding normalization --- */
.card-pad{ padding: var(--pad-card) !important; }
.give-card{ padding: var(--pad-card) !important; }
.metric-card{ padding: var(--pad-card) !important; }
.project-detail-grid{ padding: var(--pad-card) !important; }
.project-shell .card.page-card{ padding: var(--pad-card-roomy) !important; }

details.faq{ padding: 12px 14px !important; }

/* --- Micro-label sizing (chips/tags/kickers) --- */
.chip,
.check-chip,
.program-tag{
  font-size: var(--fs-micro) !important;
}

.section-kicker,
.sidefill-kicker{
  font-size: var(--fs-micro) !important;
  letter-spacing: .12em !important;
}

/* Card header rows and compact list headers should remain readable */
.card-head{ font-size: var(--fs-card-meta) !important; }

/* Home event list (used inside small cards) */
.event .when,
.event .meta{ font-size: var(--fs-micro) !important; }
.event .name{ font-size: var(--fs-small) !important; }

/* Donate “bullet” tiles */
.bullet-title{ font-size: var(--fs-card-meta) !important; }
.bullet-sub{ font-size: var(--fs-micro) !important; }
.bullet-ic{ font-size: var(--fs-micro) !important; }

/* --- Dense grids: use the new tokens --- */
.popover-meta,
.rel-meta,
.detail-sub,
.summary-frequency,
.steward-role,
.steward-location,
.steward-about-title{
  font-size: var(--fs-card-meta) !important;
}

.popover-desc,
.rel-body p,
.update-desc,
.detail-text,
.impact-sub,
.steward-bio{
  font-size: var(--fs-card-body) !important;
  line-height: 1.65 !important;
}

.rel-kicker,
.rel-progress-row{
  font-size: var(--fs-card-kicker) !important;
}

.rel-body h4,
.update-title,
.detail-title,
.impact-title{
  font-size: var(--fs-card-title) !important;
}

/* Home program feature card: readable copy without changing layout density */
.program-feature p{
  font-size: var(--fs-card-body) !important;
  line-height: 1.6 !important;
  -webkit-line-clamp: 3 !important;
}
.program-caption{ font-size: var(--fs-card-body) !important; }

/* Programs follow-up copy: remove “tiny text” feel */
.focus-followup-text{ font-size: var(--fs-small) !important; }
.focus-followup-bullets{ font-size: var(--fs-small) !important; }

/* Submit Idea / Corps right-rail: professional readability */
.idea-side .mini-muted,
.idea-side .mini-p,
.idea-side .idea-quality-test-list li,
.idea-side .tight-list{
  font-size: var(--fs-small) !important;
  line-height: 1.7 !important;
}

/* Email draft preview should be readable (not 11px monospace) */
.idea-after-draft{
  font-size: var(--fs-copy) !important;
  line-height: 1.6 !important;
}

/* =========================================================
   Premium agency pass (Card rhythm system)
   - Unifies internal spacing between: header → body → CTAs
   - Targets card families that still rely on ad-hoc margins
   ========================================================= */

:root{
  /* Use the existing stack tokens from styles.css, but apply them
     consistently across remaining card families. */
  --card-rhythm-tight: var(--stack-2);
  --card-rhythm: var(--stack-3);
  --card-rhythm-roomy: var(--stack-4);
}

/* GIVE CARDS — replace legacy margin-bottom spacing with a consistent gap
   and align CTAs to the bottom for a polished grid. */
.give-card{
  display:flex !important;
  flex-direction:column !important;
  gap: var(--card-rhythm-tight) !important;
  align-items:flex-start;
}
.give-card .give-ic{ margin-bottom: 0 !important; }
.give-card h3,
.give-card p{ margin: 0 !important; }
.give-card .btn{ margin-top: auto; }

/* METRIC CARDS — consistent internal rhythm (icon → value → label) */
.metric-card{
  gap: var(--card-rhythm-tight) !important;
}
.metric-ic{ margin-bottom: 0 !important; }
.metric-val,
.metric-lbl{ margin: 0 !important; }

/* RELATED PROJECT CARDS — unify padding + body stack */
.rel-body{
  padding: var(--pad-card-tight) !important;
  gap: var(--card-rhythm-tight) !important;
}

/* DONATE SUMMARY — remove legacy top offsets that create uneven rhythm */
.donate-summary .trust-stack{ margin-top: 0 !important; }

/* IMPACT + TRUST TILES — make title/sub stacks use consistent micro-gap */
.impact-item > div:last-child,
.trust-item > div:last-child{
  display:flex;
  flex-direction:column;
  gap: var(--stack-1);
}
.impact-sub,
.trust-sub{ margin-top: 0 !important; }

/* PROJECT PAGES — standardize card internal rhythm without changing layout
   by using a single card gap and removing ad-hoc margins inside page cards. */
.project-shell .page-card{
  display:flex;
  flex-direction:column;
  gap: var(--card-rhythm);
}

/* Remove utility top-margins used as "manual gaps" inside project cards;
   the parent card gap now controls spacing consistently. */
.project-shell .page-card .mt-8,
.project-shell .page-card .mt-12{ margin-top: 0 !important; }

/* Common project-card blocks previously used margin-top for spacing */
.project-shell .page-card :where(
  .problem-list,
  .updates-list,
  .guarantee-actions,
  .mini-links,
  .related-head,
  .impact-grid,
  .photo-caption
){
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Photo caption becomes a tidy stack */
.project-shell .project-photo-card .photo-caption{
  display:flex;
  flex-direction:column;
  gap: var(--stack-1);
}
.project-shell .project-photo-card .cap-sub{ margin-top: 0 !important; }

/* Related-head no longer needs its own margin-bottom; parent gap handles it */
.project-shell .project-related-card .related-head{ margin-bottom: 0 !important; }


/* TRANSPARENCY — Public documents library */
.docs-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 980px){
  .docs-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .docs-grid{ grid-template-columns: 1fr; }
}

.doc-card{
  padding: 16px !important;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.doc-card:hover{
  transform: translateY(-1px);
}

.doc-top{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}

.doc-ic{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(26,167,187,.12);
  color: rgba(22,50,79,.9);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}
.doc-ic svg{ width: 22px; height: 22px; }
.doc-ic--web{ background: rgba(31,53,83,.10); }

.doc-title{
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 15px;
  line-height: 1.18;
}
.doc-meta{
  font-size: var(--fs-micro);
  line-height: var(--lh-small);
  color: rgba(22,50,79,.72);
  margin-top: 4px;
}
.doc-desc{
  margin: 12px 0 0;
  font-size: var(--fs-small);
  line-height: var(--lh-copy);
  color: rgba(22,50,79,.9);
}
.doc-foot{
  margin-top: 12px;
  display:flex;
  justify-content:flex-start;
  align-items:center;
}
.doc-tag{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31,53,83,.08);
  font-size: var(--fs-micro);
  font-weight: 800;
  letter-spacing: .01em;
}

.doc-card:focus-visible{
  outline: 3px solid rgba(26,167,187,.45);
  outline-offset: 3px;
}

/* =========================================================
   Final polish — Requested adjustments
   - Projects map (dock): place image ABOVE description in the map popover
   - Contact: increase message textarea height to balance the right rail
   ========================================================= */

/* Projects Map page (desktop docked): stack media above content */
.hero-map.hero-map--dock .project-popover .popover-inner{
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero-map.hero-map--dock .project-popover .popover-img{
  /* Fixed media height gives a clean “card hero” look */
  height: 180px;
  min-height: 180px;
  flex: 0 0 auto;
}

.hero-map.hero-map--dock .project-popover .popover-body{
  /* Fill remaining height so actions can pin to bottom */
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 14px 14px;
}

/* Contact form: increase message box so left column visually balances Quick links */
.contact-form-card textarea#message1{
  min-height: clamp(220px, 26vh, 340px);
}

@media (max-width: 720px){
  .contact-form-card textarea#message1{
    min-height: clamp(160px, 22vh, 240px);
  }
}

/* Projects Map popover (all breakpoints): image above description */
#projectsPopover .popover-inner{
  display: flex;
  flex-direction: column;
}
#projectsPopover .popover-img{
  height: clamp(150px, 18vw, 190px);
  min-height: 150px;
}
#projectsPopover .popover-body{
  padding: 12px 14px 14px;
}

/* =========================================================
   Final sweep — Type safety + enterprise readability
   - Remove last remaining “too-small” donate under-form copy.
   - Keep the visual rhythm, but ensure every line is readable.
   ========================================================= */

/* Donate page: under-form guidance should never drop below the
   global micro/copy scale. */
.page-donate .donate-underform-card .mini-title{
  font-size: 15px !important;
  line-height: 1.2 !important;
}

.page-donate .donate-underform-card .mini-p{
  font-size: var(--fs-micro) !important;
  line-height: 1.6 !important;
}

.page-donate .donate-underform-card .mini-callout{
  font-size: var(--fs-small) !important;
  line-height: 1.65 !important;
}


/* =========================================================
   Project donate page — professional alignment + details card
   - Adds a left column stack (form + project details)
   - Ensures the left column reaches the same bottom as the giving tools rail
   ========================================================= */

.page-donate-project .donation-grid.donate-grid--project{
  align-items: stretch;
}

.page-donate-project .donate-left{
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.page-donate-project .donate-left > *{
  min-width: 0;
}

.page-donate-project .donate-project-details{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page-donate-project .donate-project-details .donate-detail-actions{
  margin-top: auto;
}

.page-donate-project .donate-detail-grid{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.page-donate-project .donate-detail{
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(31,53,83,.10);
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 18px rgba(10,30,55,.06);
}

.page-donate-project .donate-detail-k{
  font-size: 10.5px;
  font-weight: 850;
  color: rgba(22,50,79,.62);
}

.page-donate-project .donate-detail-v{
  margin-top: 4px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: rgba(15,39,65,.96);
}

.page-donate-project .mini-divider{
  height: 1px;
  background: rgba(31,53,83,.10);
  border-radius: 999px;
  margin-top: 12px;
}

.page-donate-project .donate-detail-title{
  margin-top: 12px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: -0.01em;
  color: rgba(15,39,65,.92);
}

.page-donate-project .donate-detail-list{
  margin-top: 8px;
}

/* Project donate hero media: match the site hero style and avoid empty space */
.page-donate-project .donate-project-hero-media{
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.page-donate-project .donate-project-hero-media img{
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 280px;
  object-fit: cover;
}

/* Campaign strip KPI grid (project donate page) */
.campaign-nums.campaign-nums-grid{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.campaign-nums-grid .campaign-kpi{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.campaign-nums-grid .campaign-k{
  font-size: 12px;
  font-weight: 900;
  color: rgba(22,50,79,.60);
}

.campaign-nums-grid .campaign-v{
  font-size: 12.5px;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: rgba(15,39,65,.98);
}

.campaign-nums-grid .campaign-v strong{
  font-weight: 950;
}

/* Project donate: campaign strip (moved below hero) — premium layout */
.page-donate-project .campaign-strip--inline{
  padding: 0 0 14px;
}

.page-donate-project .campaign-strip-card--inline{
  padding: 16px 16px 14px;
  border-radius: 18px;
  background:
    radial-gradient(520px 220px at 12% 18%, rgba(34,184,199,.16), transparent 62%),
    radial-gradient(520px 240px at 92% 92%, rgba(53,98,255,.10), transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82));
  box-shadow: 0 16px 36px rgba(11,34,63,.14);
}

.page-donate-project .campaign-left-wrap{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-donate-project .campaign-thumb-wrap{
  width: 60px;
  height: 60px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(31,53,83,.12);
  background: rgba(255,255,255,.70);
  box-shadow: 0 12px 22px rgba(10,30,55,.12);
  flex: 0 0 auto;
}

.page-donate-project .campaign-thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-donate-project .campaign-left-text{ min-width: 0; }

.page-donate-project .campaign-strip--inline .campaign-name{
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.page-donate-project .campaign-strip--inline .campaign-meta{
  font-size: 12px;
  font-weight: 800;
  color: rgba(22,50,79,.64);
  line-height: 1.35;
}

.page-donate-project .campaign-strip--inline .campaign-nums-grid .campaign-k{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.page-donate-project .campaign-strip--inline .campaign-nums-grid .campaign-v{
  font-size: 13px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.page-donate-project .campaign-strip--inline .campaign-progress{
  height: 12px;
  background: rgba(20,45,73,.10);
}

@media (max-width: 520px){
  .campaign-nums.campaign-nums-grid{
    grid-template-columns: 1fr;
  }
  .page-donate-project .donate-detail-grid{
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------
   Project pages (mobile) — prevent sections bleeding offscreen
   and avoid content being obscured by the sticky action bar.
   --------------------------------------------------------- */

/* Allow flex/grid children to shrink correctly (prevents sideways overflow
   from long strings, pills, or media rails on iOS Safari). */
.project-shell,
.project-shell *{
  min-width: 0;
}

@supports (overflow: clip){
  main{ overflow-x: clip; }
  .project-shell{ overflow-x: clip; }
}

/* Sticky action bar: respect iOS safe areas + ensure enough bottom padding */
@media (max-width: 760px){
  body.has-sticky-donate{
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }

  .sticky-donate-bar{
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

/* =========================================================
   Final cohesion sweep (mobile + desktop)
   - Prevent any remaining offscreen bleed from long content inside grids
   - Make file upload head wrap safely on narrow screens
   - Ensure donate summary never “sticks” on mobile (can feel clipped)
   ========================================================= */

/* Grid children should always be allowed to shrink (prevents offscreen bleed). */
:where(
  .footer-grid,
  .related-grid,
  .project-intro-grid,
  .project-detail-grid,
  .timeline-grid,
  .impact-grid,
  .about-grid-2,
  .about-grid-3,
  .idea-hero-grid,
  .page-grid,
  .faq-grid,
  .split-grid,
  .projects-grid-5,
  .program-grid,
  .volunteer-grid,
  .idea-form-grid,
  .donate-hero-grid,
  .donation-grid,
  .donate-grid,
  .amount-grid,
  .amount-grid-6,
  .bullet-grid,
  .give-grid,
  .about-hero-grid,
  .team-grid,
  .contact-hero-grid,
  .contact-route-grid,
  .contact-main-grid,
  .contact-form-fill-grid,
  .locations-grid
) > *{
  min-width: 0 !important;
}

/* File upload head: allow hint to wrap instead of causing horizontal overflow on very small screens. */
@media (max-width: 520px){
  .file-upload__head{
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .file-upload__hint{
    white-space: normal;
  }
}

/* Donate page: ensure the summary rail is never sticky on mobile (avoids clipped/overlapping behavior). */
@media (max-width: 979px){
  .donate-summary{
    position: static !important;
    top: auto !important;
  }
}

/* ------------------------------------------------------------
   Mobile map zoom controls
   - Used by the image-based maps (Programs/Home + Projects Map)
   - Touch-first: provides discoverable +/- controls alongside pinch-to-zoom
   ------------------------------------------------------------ */

.gic-map-zoom{
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(31,53,83,.18);
  box-shadow: 0 12px 26px rgba(10,30,55,.18);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gic-map-zoom__btn{
  width: 44px;
  height: 42px;
  border: 0;
  background: transparent;
  color: rgba(10,34,55,.94);
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
}

.gic-map-zoom__btn + .gic-map-zoom__btn{
  border-top: 1px solid rgba(15,42,61,.10);
}

.gic-map-zoom__btn:active{
  transform: translateY(1px);
}

.gic-map-zoom__btn:focus-visible{
  outline: 3px solid rgba(20,184,199,.45);
  outline-offset: -3px;
}

@media (max-width: 760px){
  .gic-map-zoom{ right: 10px; bottom: 10px; }
}


/* ==========================================================
   Project steward bio — "View more" toggle
   ========================================================== */
.steward-bio{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.steward-bio.is-expanded{
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.steward-bio-toggle{
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: var(--fs-card-meta);
  color: rgba(22,50,79,.85);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.steward-bio-toggle:hover{
  text-decoration: underline;
}

.steward-bio-toggle .chev{
  width: 14px;
  height: 14px;
  transition: transform .18s ease;
}

.steward-bio.is-expanded + .steward-bio-toggle .chev{
  transform: rotate(180deg);
}




/* Document link lists inside accordions */
.doc-link-list{
  margin: 10px 0 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 18px;
}
@media (max-width: 760px){
  .doc-link-list{ columns: 1; }
}
.doc-link-list li{
  break-inside: avoid;
  margin: 6px 0;
}
.doc-link-list a{
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc-link-list a:hover{
  text-decoration-thickness: 2px;
}

/* =========================================================
   Button text hygiene
   - Prevent awkward mid-word breaks (e.g., "Submi t") caused by
     global overflow-wrap safety rules.
   - Ensure inline SVGs inside buttons never default to 300×150.
   ========================================================= */

.btn{
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.btn svg{
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}

/* =========================================================
   Mobile CTA layout
   - Keep call-to-action blocks readable and prevent cramped
     button columns on small screens.
   ========================================================= */

@media (max-width: 760px){
  .about-cta{
    flex-direction: column;
    align-items: stretch;
  }
  .cta-actions{
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .cta-actions .btn{
    width: 100%;
  }
}

/* =========================================================
   Final cohesion pass — readable micro-type
   Several dense UI areas used very small font sizes early in
   development. This raises micro labels to a professional,
   accessible baseline without changing layout intent.
   ========================================================= */

/* Small uppercase/kicker labels */
.contact-form-fill-title{
  font-size: 12px !important;
}
.step-num{
  font-size: 12px !important;
}

/* Map popover “View more” link */
.popover-more{
  font-size: 12.5px !important;
}

/* Project update cards */
.update-title{
  font-size: 13.5px !important;
}
.update-desc{
  font-size: 13px !important;
  line-height: 1.62 !important;
}

/* Detail/impact rows */
.detail-title,
.impact-title{
  font-size: 13.5px !important;
}
.detail-text,
.impact-sub{
  font-size: 13px !important;
  line-height: 1.62 !important;
}
.detail-sub,
.summary-frequency{
  font-size: 12px !important;
}

/* Steward cards */
.steward-role,
.steward-location{
  font-size: 12.5px !important;
}
.steward-bio{
  font-size: 13px !important;
  line-height: 1.62 !important;
}
.steward-about-title{
  font-size: 12px !important;
}

/* Feature card & small captions */
.program-feature p,
.program-caption{
  font-size: 13px !important;
  line-height: 1.62 !important;
}

/* Chips/badges */
.check-chip,
.chip{
  font-size: 12px !important;
}

/* Donate page helper copy should never be tiny */
.page-donate .donate-underform-card .mini-p,
.page-donate .donate-underform-card .mini-callout{
  font-size: 13px !important;
  line-height: 1.62 !important;
}

/* ==========================================================
   Icon polish
   - Cohesive line weight + crisp rendering across the site
   - Replace "text" icons (FAQ +/–, map hint close) with SVG
   ========================================================== */

:root{
  /* Single source of truth for icon stroke weight */
  --gic-icon-stroke: 1.9;

  /* FAQ toggle icons (SVG data-URIs) */
  --gic-ic-plus: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cpath%20d%3D%27M12%206.2v11.6M6.2%2012h11.6%27%20stroke%3D%27%2316324f%27%20stroke-width%3D%271.9%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
  --gic-ic-minus: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cpath%20d%3D%27M6.2%2012h11.6%27%20stroke%3D%27%2316324f%27%20stroke-width%3D%271.9%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
}



/* Shared icon component (uses the custom symbol set) */
.gic-icon{
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: -0.18em;
}

/* Context sizing */
.social-ic .gic-icon{ width: 18px; height: 18px; }
.social-btn .gic-icon{ width: 20px; height: 20px; }
.team-ic .gic-icon{ width: 18px; height: 18px; }
.file-upload__btn .gic-icon{ width: 18px; height: 18px; }
.file-pill__remove .gic-icon{ width: 16px; height: 16px; }
.gic-map-zoom__btn .gic-icon{ width: 18px; height: 18px; }
.gic-map-hint__icon .gic-icon{ width: 18px; height: 18px; }
.gic-map-hint__close .gic-icon{ width: 16px; height: 16px; }

/* Map search icon tint (replaces previous per-path rgba strokes) */
.map-search .gic-icon{ color: rgba(22,50,79,.72); }

/* Mobile map hint icon tint */
.gic-map-hint__icon{ color: rgba(255,255,255,.82); }
.gic-map-hint__close{ color: rgba(255,255,255,.82); }


/* Crisp SVG icon rendering */
:where(
  .brand-mark svg,
  .chip svg,
  .chip-ic svg,
  .stat-top svg,
  .map-search svg,
  .card-head svg,
  .logo-pill svg,
  .badge-ic svg,
  .secure-note svg,
  .impact-icon svg,
  .trust-ic svg,
  .give-ic svg,
  .share-btn svg,
  .timeline-ic svg,
  .impact-ic svg,
  .contact-card-icon svg,
  .contact-inline-ic svg,
  .detail-ic svg,
  .vol-role-ic svg,
  .steward-social-btn svg,
  .steward-quote .qic svg,
  .step-icon svg,
  .nav-toggle svg,
  .drawer-close svg,
  .social-ic svg,
  .team-ic svg,
  .mini-ic svg,
  .metric-ic svg,
  .trust-badge svg,
  .doc-ic svg,
  .update-chevron svg,
  .file-upload__btn svg,
  .file-pill__remove svg,
  .gic-map-zoom__btn svg,
  .gic-map-hint__icon svg,
  .gic-map-hint__close svg,
  .gic-media-nav svg,
  .gic-media-close svg
){
  shape-rendering: geometricPrecision;
}

/* Unified icon stroke weight + rounded geometry (without overriding colors) */
:where(
  .brand-mark svg,
  .chip svg,
  .chip-ic svg,
  .stat-top svg,
  .map-search svg,
  .card-head svg,
  .logo-pill svg,
  .badge-ic svg,
  .secure-note svg,
  .impact-icon svg,
  .trust-ic svg,
  .give-ic svg,
  .share-btn svg,
  .timeline-ic svg,
  .impact-ic svg,
  .contact-card-icon svg,
  .contact-inline-ic svg,
  .detail-ic svg,
  .vol-role-ic svg,
  .steward-social-btn svg,
  .steward-quote .qic svg,
  .step-icon svg,
  .nav-toggle svg,
  .drawer-close svg,
  .social-ic svg,
  .team-ic svg,
  .mini-ic svg,
  .metric-ic svg,
  .trust-badge svg,
  .doc-ic svg,
  .update-chevron svg,
  .file-upload__btn svg,
  .file-pill__remove svg,
  .gic-map-zoom__btn svg,
  .gic-map-hint__icon svg,
  .gic-map-hint__close svg,
  .gic-media-nav svg,
  .gic-media-close svg
) *{
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

:where(
  .brand-mark svg,
  .chip svg,
  .chip-ic svg,
  .stat-top svg,
  .map-search svg,
  .card-head svg,
  .logo-pill svg,
  .badge-ic svg,
  .secure-note svg,
  .impact-icon svg,
  .trust-ic svg,
  .give-ic svg,
  .share-btn svg,
  .timeline-ic svg,
  .impact-ic svg,
  .contact-card-icon svg,
  .contact-inline-ic svg,
  .detail-ic svg,
  .vol-role-ic svg,
  .steward-social-btn svg,
  .steward-quote .qic svg,
  .step-icon svg,
  .nav-toggle svg,
  .drawer-close svg,
  .social-ic svg,
  .team-ic svg,
  .mini-ic svg,
  .metric-ic svg,
  .trust-badge svg,
  .doc-ic svg,
  .update-chevron svg,
  .file-upload__btn svg,
  .file-pill__remove svg,
  .gic-map-zoom__btn svg,
  .gic-map-hint__icon svg,
  .gic-map-hint__close svg,
  .gic-media-nav svg,
  .gic-media-close svg
) [stroke]{
  stroke-width: var(--gic-icon-stroke);
}

/* FAQ: replace +/– text with a consistent icon button */
details.faq summary::after{
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
  background-color: rgba(255,255,255,.75);
  border: 1px solid rgba(31,53,83,.10);
  background-image: var(--gic-ic-plus);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  box-shadow: 0 8px 16px rgba(10,30,55,.08);
}
details.faq[open] summary::after{ background-image: var(--gic-ic-minus); }

/* Map hint close button: ensure SVG fits neatly */
.gic-map-hint__close{
  display:grid;
  place-items:center;
  font-size: 0;
  line-height: 0;
}
.gic-map-hint__close svg{
  width: 16px;
  height: 16px;
}


/* =========================================================
   Reporting & Budgeting page
   ========================================================= */
.rb-metrics{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 980px){
  .rb-metrics{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .rb-metrics{ grid-template-columns: 1fr; }
}

.rb-metric{
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(31,53,83,.12);
  border-radius: 14px;
  padding: 12px 12px 11px;
  box-shadow: 0 14px 26px rgba(10,30,55,.08);
}
.rb-metric--primary{
  background: rgba(255,255,255,.82);
  border-color: rgba(26,167,187,.20);
}
.rb-k{
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: rgba(22,50,79,.60);
}
.rb-v{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: rgba(22,50,79,.92);
  margin-top: 4px;
}
.rb-metric--primary .rb-v{ font-size: 22px; }
.rb-s{
  font-size: 12.8px;
  color: rgba(22,50,79,.68);
  margin-top: 3px;
  line-height: 1.35;
}
.rb-updated{
  margin-top: 12px;
  font-size: 12.5px;
  color: rgba(22,50,79,.66);
}

.rb-snapshot{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 980px){
  .rb-snapshot{ grid-template-columns: 1fr; }
}

.rb-donut-card{
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(31,53,83,.12);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 14px 26px rgba(10,30,55,.08);
}
.rb-donut-wrap{
  height: 220px;
}
.rb-donut-wrap canvas{
  width: 100% !important;
  height: 100% !important;
}

.rb-legend{
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.rb-legend-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rb-legend-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.rb-legend-main{
  display: grid;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
}
.rb-legend-label{
  font-weight: 900;
  font-size: 12.6px;
  letter-spacing: -0.01em;
  color: rgba(22,50,79,.86);
}
.rb-legend-sub{
  font-size: 12.2px;
  color: rgba(22,50,79,.62);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-legend-pct{
  font-size: 12.6px;
  font-weight: 900;
  color: rgba(22,50,79,.82);
  font-variant-numeric: tabular-nums;
}

.rb-alloc-row{
  padding: 12px 0;
  border-top: 1px solid rgba(31,53,83,.10);
}
.rb-alloc-row:first-child{ border-top: 0; padding-top: 0; }
.rb-alloc-top{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.rb-alloc-name{
  font-weight: 900;
  letter-spacing: -0.01em;
}
.rb-alloc-meta{
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.8px;
  color: rgba(22,50,79,.70);
  font-variant-numeric: tabular-nums;
}
.rb-dot{ color: rgba(22,50,79,.32); }
.rb-bar{
  margin-top: 8px;
  height: 10px;
  border-radius: 999px;
  background: rgba(20,45,73,.10);
  overflow: hidden;
}
.rb-bar > span{
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(26,167,187,.95), rgba(26,167,187,.62));
}
.rb-alloc-desc{
  margin-top: 7px;
  font-size: 13.2px;
  line-height: 1.55;
  color: rgba(22,50,79,.72);
}

.rb-cadence-row{
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(31,53,83,.10);
}
.rb-cadence-row:first-child{ border-top: 0; padding-top: 0; }
@media (max-width: 520px){
  .rb-cadence-row{ grid-template-columns: 1fr; }
}

.rb-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(31,53,83,.14);
  background: rgba(255,255,255,.75);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: rgba(22,50,79,.72);
  width: fit-content;
}
.rb-cadence-title{
  font-weight: 900;
  letter-spacing: -0.01em;
}
.rb-cadence-desc{
  margin-top: 3px;
  font-size: 13.2px;
  line-height: 1.55;
  color: rgba(22,50,79,.72);
}

.rb-edit-note code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
  background: rgba(20,45,73,.08);
  border: 1px solid rgba(31,53,83,.10);
  padding: 2px 6px;
  border-radius: 8px;
}



/* Reporting & Budgeting — extended detail blocks */
.rb-chart-row{
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 980px){
  .rb-chart-row{ grid-template-columns: 1fr; }
}
.rb-chart{
  height: 220px;
}
.rb-chart canvas{
  width: 100% !important;
  height: 100% !important;
}

.rb-breakdown{
  display: grid;
  gap: 0;
}
.rb-break-row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(31,53,83,.10);
}
.rb-break-row:first-child{
  border-top: 0;
  padding-top: 0;
}
.rb-break-left{
  flex: 1 1 auto;
  min-width: 0;
}
.rb-break-name{
  font-weight: 900;
  letter-spacing: -0.01em;
  color: rgba(22,50,79,.86);
}
.rb-break-desc{
  margin-top: 3px;
  font-size: 13.1px;
  line-height: 1.5;
  color: rgba(22,50,79,.72);
}
.rb-break-right{
  flex: 0 0 auto;
  text-align: right;
  min-width: 96px;
  font-variant-numeric: tabular-nums;
}
.rb-break-pct{
  font-weight: 900;
  color: rgba(22,50,79,.84);
}
.rb-break-amt{
  margin-top: 2px;
  font-size: 12.8px;
  color: rgba(22,50,79,.62);
}

.rb-reserve-metrics{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 520px){
  .rb-reserve-metrics{ grid-template-columns: 1fr; }
}
.rb-reserve-metric{
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(31,53,83,.12);
  border-radius: 14px;
  padding: 12px 12px 11px;
  box-shadow: 0 14px 26px rgba(10,30,55,.08);
}
