:root{--ink:#172522;--muted:#4a615a;--accent:#086a51;--line:#dce6e1;--wash:#f3f7f4;--white:#fff;--mint:#d8f3e8;--dark:#153b33}
*{box-sizing:border-box}html{scroll-padding-top:1rem}body{margin:0;background:var(--wash);color:var(--ink);font:1.0625rem/1.65 "Segoe UI",system-ui,sans-serif}
[hidden]{display:none!important}.wrap{width:min(calc(100% - 2rem),68rem);margin-inline:auto}a{color:var(--accent);font-weight:700;text-decoration:none}a:focus-visible,summary:focus-visible,h2:focus-visible{outline:3px solid #a74c00;outline-offset:4px}h1,h2,h3,h4{line-height:1.17;letter-spacing:-.025em}p{margin:.55em 0 .9em}
.site-head{background:white;border-bottom:1px solid var(--line)}.site-head .wrap{min-height:4.25rem;display:flex;align-items:center;justify-content:space-between;gap:.6rem}.brand{text-decoration:none;color:var(--dark);font-weight:800}.head-help{font-size:.95rem}
.intro{padding:clamp(1.45rem,4.5vw,3.5rem) 0}.intro .wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(5rem,23%);align-items:center;gap:1rem;padding:clamp(1rem,4vw,2.7rem);background:#e6f7ee;border-radius:1.6rem}.intro h1{font-size:clamp(1.9rem,5.5vw,4.3rem);letter-spacing:-.06em;max-width:15ch;margin:0}.intro p{max-width:38ch;margin:.65rem 0 0;color:var(--muted)}.intro img{display:block;width:100%;max-width:12rem;height:auto;justify-self:end}
.guide{display:grid;grid-template-columns:minmax(13rem,1fr) minmax(0,3fr);gap:1.35rem;align-items:start;padding-bottom:1.4rem}
.rail{padding:.9rem;background:white;border:1px solid var(--line);border-radius:1rem;position:sticky;top:1rem}.rail h2{margin:.1rem .35rem .65rem;font-size:1.05rem}.rail ol{list-style:none;margin:0;padding:0}.rail li+li{margin-top:.16rem}.rail a{min-height:44px;display:flex;align-items:center;gap:.55rem;padding:.4rem;border-radius:.5rem;text-decoration:none;color:var(--ink);font-size:.95rem;line-height:1.25}.rail .rail-label{min-width:0;flex:1;overflow-wrap:break-word}.rail a:hover{background:var(--wash)}.rail a[aria-current=step]{background:var(--mint);color:#084c3b}.rail a span:first-child{flex:none;display:grid;place-items:center;border:1px solid #b6d0c5;border-radius:50%;width:1.65rem;height:1.65rem;font-size:.82rem}
.stage{min-width:0}.progress{padding:1rem 1.25rem;background:white;border:1px solid var(--line);border-radius:1rem 1rem 0 0;border-bottom:0}.progress p{margin:0 0 .4rem;font-size:.95rem;font-weight:750;color:var(--accent)}.progress ol{display:grid;grid-template-columns:repeat(5,1fr);gap:.35rem;list-style:none;padding:0;margin:0}.progress li{height:5px;border-radius:99px;background:#e2ece7}.progress li.done{background:var(--accent)}
.stage>details{background:white;border:1px solid var(--line);border-radius:1rem;margin:0 0 .65rem}.enhanced .stage>details{border-radius:0 0 1rem 1rem;border-top:0;margin:0}.stage>details>summary{font-size:1.3rem}.enhanced .stage>details>summary{display:none}.step-heading{margin:0 0 .85rem;font-size:clamp(1.65rem,4vw,2.35rem)}.stage>details>.body{padding:1rem clamp(.95rem,3vw,1.7rem) 1.35rem}.n{margin-right:.35rem;color:var(--accent)}
details details{border:1px solid var(--line);border-radius:.75rem;margin:.65rem 0;background:white}summary{display:flex;gap:.6rem;align-items:center;min-height:48px;cursor:pointer;font-weight:750;padding:.65rem .85rem;list-style:none;line-height:1.3}summary::-webkit-details-marker{display:none}summary::after{content:'+';margin-left:auto;flex:none;font-size:1.2rem}details[open]>summary::after{content:'−'}.body{padding:.25rem .95rem .85rem}.body ol,.body ul{padding-inline-start:1.4rem}.body li+li{margin-top:.45rem}
.methods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;margin:.85rem 0}.methods a{display:flex;flex-direction:column;justify-content:center;min-height:76px;padding:.6rem .7rem;border:1px solid #b6d5c9;border-radius:.65rem;background:#f4fbf8;text-decoration:none;line-height:1.28;overflow-wrap:anywhere}.methods small{font-size:.875rem;font-weight:500;color:var(--muted);margin-top:.22rem}.methods a[aria-current=true]{background:var(--mint);border-color:var(--accent)}.route{background:#f8fbf9}.route>summary{color:var(--accent)}.route>.body{border-top:1px solid var(--line);padding-top:.75rem}.route .button{margin-bottom:.65rem}
.button,.stores a,.actions a{display:inline-flex;align-items:center;justify-content:center;text-align:center;min-height:46px;border-radius:.55rem;padding:.55rem .85rem;background:var(--accent);color:white;text-decoration:none;line-height:1.25}.stores{display:flex;flex-wrap:wrap;gap:.5rem}.egov-note{color:var(--muted)}.body ol.screens{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;padding:0;list-style:none;counter-reset:screen}.screens>li{min-width:0;margin:0!important;padding:.75rem;background:white;border:1px solid var(--line);border-radius:.75rem;counter-increment:screen}.screens h4{margin:0 0 .6rem;font-size:1.05rem}.screens h4::before{content:counter(screen) '. ';color:var(--accent)}.screens figure,.portal-shot{margin:.6rem 0}.screens figure a,.portal-shot a{display:grid;place-items:center;padding:.4rem;background:var(--wash);border-radius:.5rem}.screens img,.portal-shot img{display:block;width:auto;max-width:100%;height:auto;max-height:29rem;object-fit:contain}.portal-shot{max-width:26rem}.screens figcaption{margin-top:.65rem}
.actions{display:flex;justify-content:space-between;gap:.55rem;margin-top:.7rem}.actions a:first-child{background:white;color:var(--accent);border:1px solid var(--line)}.actions a:last-child{margin-left:auto}


@media(max-width:740px){.guide{grid-template-columns:minmax(0,1fr);gap:.7rem}.rail{position:static;padding:.55rem .65rem}.rail h2{display:none}.rail ol{display:grid;grid-template-columns:repeat(5,1fr)}.rail li+li{margin:0}.rail a{justify-content:center;padding:.32rem}.rail .rail-label{display:none}.rail a span:first-child{width:1.95rem;height:1.95rem}.body ol.screens{grid-template-columns:minmax(0,1fr)}.intro .wrap{grid-template-columns:minmax(0,1fr) minmax(4.1rem,22%)}}
@media(max-width:450px){.wrap{width:calc(100% - 1.2rem)}.methods{grid-template-columns:1fr}.methods a{min-height:58px}.stores a{width:100%}footer .wrap{grid-template-columns:1fr}.route>.body{padding-inline:.6rem}.brand,.head-help{font-size:.86rem}}

.help{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem 2rem;align-items:start;padding:clamp(1rem,3vw,1.75rem);margin-bottom:1.6rem;background:#e0f3eb;border:1px solid #c3e0d3;border-radius:1rem}
.help h2{margin:0;font-size:clamp(1.35rem,3vw,1.75rem)}
.help p{margin:.55rem 0 0;max-width:36ch}
.bring{padding:.85rem 1rem;background:#f8fffb;border:1px solid #c3e0d3;border-radius:.7rem}
.bring h3{margin:0;font-size:1.06rem}
.bring ul{padding-inline-start:1.2rem;margin:.4rem 0 0}
.bring li+li{margin-top:.35rem}

@media(max-width:640px){.help,footer nav{grid-template-columns:minmax(0,1fr)}}

.head-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .4rem .65rem;
  border: 1px solid #b6d5c9;
  border-radius: .55rem;
  background: #f4fbf8;
  text-align: center;
  text-decoration: none;
  line-height: 1.25;
}
/* Interactive states shared by links, buttons and expandable sections. */
a, button, summary {
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}
.button, .stores a, .actions a, .methods a, .head-help, footer a {
  border: 0;
  border-radius: .7rem;
  min-height: 44px;
}
.actions #previous-step { background: #eaf3ee; border: 0; }
.head-help { background: #eaf5ef; }
.methods a { background: #eaf5ef; }
.methods a[aria-current=true] { background: #c9ecdd; }
.stores { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 12rem),1fr)); }
.screens figure a, .portal-shot a { cursor: zoom-in; }

@media (hover: hover) {
  a:hover, button:hover, summary:hover {
    background-color: #e0f3eb;
    border-radius: .5rem;
  }
  .button:hover, .stores a:hover, .actions #next-step:hover { background: #064c3b; }
  footer a:hover { background: #2a5b4e; }
  .head-help:hover, .methods a:hover, .actions a:hover, .button:hover,
  .stores a:hover, footer a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px #153b3326;
    border-radius: .7rem;
  }
  .screens figure a:hover, .portal-shot a:hover {
    box-shadow: 0 0 0 3px #84c9ab;
  }
}
a:active, button:active, summary:active {
  transform: scale(.98);
  box-shadow: inset 0 0 0 2px currentColor;
}
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #a74c00;
  outline-offset: 3px;
}
footer a:focus-visible { outline-color: #ccf9e5; }
details[open] > .body { animation: reveal-section 180ms ease-out both; }
@keyframes reveal-section {
  from { opacity: .7; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  a, button, summary, details[open] > .body {
    transition: none;
    animation: none;
    transform: none !important;
  }
}

.intro h1 span { display: block; }
.intro-accent { color: var(--accent); }
.intro .wrap {
  background: radial-gradient(ellipse at 86% 20%, #d7f3bd, transparent 55%), #e6f7ee;
}
.rhu-address {
  margin-top: .8rem;
  padding: .55rem .75rem;
  background: #f8fffb;
  border-radius: .55rem;
  font-style: normal;
  font-weight: 700;
}
@media (prefers-reduced-motion: no-preference) {
  .intro h1 span, .intro p {
    animation: intro-reveal 520ms cubic-bezier(.2,.75,.2,1) both;
  }
  .intro h1 .intro-accent { animation-delay: 120ms; }
  .intro p { animation-delay: 240ms; }
  .intro img {
    animation: mascot-arrive 620ms cubic-bezier(.2,.75,.2,1) both,
      mascot-bob 1.45s ease-in-out 700ms 2;
  }
}
@keyframes intro-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mascot-arrive {
  from { opacity: 0; transform: translateX(20px) rotate(7deg); }
  to { opacity: 1; transform: translateX(0) rotate(0); }
}
@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px) rotate(-3deg); }
}

.step-note { margin-top: 1rem; padding: .85rem 1rem; background: #edf7f2; border-radius: .7rem; }
.step-note p { margin: 0; }
.step-note a { display: inline-flex; align-items: center; min-height: 44px; padding: .25rem .4rem; margin-left: -.4rem; }

.resource-footer { background: var(--dark); color: #fff; padding: clamp(1.75rem, 4vw, 3rem) 0; }
.resource-footer h2 { margin: 0; font-size: clamp(1.35rem, 2.8vw, 1.8rem); }
.resource-intro { color: #d1e7df; margin: .45rem 0 1.25rem; }
.resource-footer nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.resource-footer nav a {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: .55rem;
  padding: 1rem;
  background: #204b40;
  color: #f5fffb;
  line-height: 1.4;
}
.resource-footer nav a strong { font-size: 1.075rem; }
.resource-footer nav a span { color: #e3eee9; font-size: .95rem; font-weight: 400; }
.resource-footer nav a .resource-format { color: #c1e2d6; font-size: .875rem; font-weight: 650; }
@media (hover: hover) { .resource-footer nav a:hover { background: #2a5b4e; } }
@media (max-width: 740px) { .resource-footer nav { grid-template-columns: minmax(0, 1fr); } }

.head-links { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; padding-block: .45rem; }
.rhu-overview { margin: .6rem 0 1.6rem; padding: clamp(1rem, 3vw, 2rem); background: #fff; border-radius: 1.1rem; border: 1px solid var(--line); }
.rhu-overview-heading { background: none; border: 0; color: var(--ink); }
.rhu-overview-heading p { color: var(--accent); font-weight: 750; margin: 0 0 .35rem; }
.rhu-overview h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); }
.rhu-benefits { list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; margin: 1rem 0; padding: 0; }
.rhu-benefits li { background: #eaf6f0; padding: .9rem 1rem; border-radius: .7rem; }
.rhu-benefits li > span { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; background: #cfeade; color: var(--accent); border-radius: .55rem; }
.rhu-benefits h3 { margin: .65rem 0 .3rem; font-size: 1.15rem; }
.rhu-benefits p { margin: 0; }
.rhu-members { background: #f3f7f4; padding: 1rem; border-radius: .7rem; }
.rhu-members ul { columns: 2; margin: 0; padding-inline-start: 1.2rem; }
.rhu-members li { break-inside: avoid; }
@media(max-width:640px) { .rhu-benefits { grid-template-columns: 1fr; } .rhu-members ul { columns: 1; } }

.rhu-overview { display: grid; gap: .65rem; padding: 0; background: none; border: 0; }
.rhu-disclosure { margin: 0; border: 1px solid var(--line); background: #fff; border-radius: .75rem; }
.rhu-disclosure > summary { color: var(--accent); }
.rhu-disclosure > .body { margin: 0; padding: .65rem 1rem 1rem; }

.rhu-popup-button, .rhu-popup-close { font: inherit; font-weight: 750; cursor: pointer; color: var(--accent); background: #eaf5ef; border: 0; border-radius: .7rem; min-height: 44px; padding: .55rem .85rem; }
.rhu-popup-button { text-align: left; }
.rhu-popup { width: min(calc(100% - 2rem), 60rem); max-height: 85dvh; padding: 0; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); }
.rhu-popup::backdrop { background: #102a23a8; }
.rhu-popup-header { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .85rem 1rem; background: #fff; border-bottom: 1px solid var(--line); z-index: 1; }
.rhu-popup-header h2 { margin: 0; font-size: clamp(1.2rem, 4vw, 1.75rem); }
.rhu-popup > .body { padding: .65rem 1rem 1rem; }
@media(prefers-reduced-motion: no-preference) { .rhu-popup[open] { animation: reveal-section 180ms ease-out both; } }

.rhu-popup-button, .head-links [data-popup] { display: inline-flex; align-items: center; gap: .65rem; }
.rhu-popup-button { padding: .7rem .9rem; }
.rhu-popup-button .rhu-icon, .rhu-benefits .rhu-icon {
  display: inline-grid; place-items: center; flex: none; width: 2.45rem; height: 2.45rem;
  border-radius: .7rem; background: #d3eee2; color: #07533f;
}
.rhu-icon svg { display: block; width: 1.35rem; height: 1.35rem; }
.rhu-benefits .rhu-icon-lab { background: #dceaff; color: #1c4d87; }
.rhu-benefits .rhu-icon-pill { background: #fcebd4; color: #864d11; }
.rhu-benefits .rhu-icon-hospital { background: #f7e2eb; color: #8a365b; }
.rhu-benefits .rhu-icon-monitor { background: #e8e3f9; color: #503a89; }

.rhu-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.rhu-popup-button {
  min-width: 0; min-height: 5.5rem; padding: 1rem; gap: .8rem;
  background: #fff; border: 1px solid #c5dfd2; border-radius: 1rem; color: var(--ink);
}
.rhu-popup-button .rhu-icon { width: 2.8rem; height: 2.8rem; }
.popup-button-copy { display: grid; gap: .2rem; line-height: 1.3; }
.popup-button-copy strong { font-size: 1.1rem; }
.popup-button-copy small { color: var(--muted); font-weight: 500; font-size: .92rem; }
.rhu-popup-button::after {
  content: '+'; flex: none; display: grid; place-items: center;
  margin-left: auto; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; background: #edf6f1; color: var(--accent);
}
@media (hover: hover) {
  .rhu-popup-button:hover { background: #f4fcf8; border-color: #84bca6; border-radius: 1rem; box-shadow: 0 5px 14px #153b3318; transform: translateY(-2px); }
}
.rhu-popup { box-shadow: 0 24px 72px #102a2340; background: #f5f8f6; }
.rhu-popup-header { align-items: flex-start; padding: 1.05rem clamp(1rem, 3vw, 1.7rem); background: #fff; }
.rhu-popup-header p { margin: 0 0 .2rem; color: var(--accent); font-size: .9rem; font-weight: 750; }
.rhu-popup-header form { margin: 0; }
.rhu-popup > .body { padding: 1rem clamp(1rem, 3vw, 1.7rem) 1.4rem; }
.rhu-benefits { grid-template-columns: repeat(6,minmax(0,1fr)); margin: 0; gap: .75rem; }
.rhu-benefits li { grid-column: span 2; background: #fff; border: 1px solid var(--line); padding: 1rem; }
.rhu-benefits li:nth-child(n+4) { grid-column: span 3; }
.rhu-benefits p { color: var(--muted); line-height: 1.55; }
.rhu-popup .rhu-members { border-radius: 0; background: transparent; }
.rhu-members ul { columns: auto; list-style: none; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; padding: 0; }
.rhu-members li { margin: 0 !important; padding: .55rem .7rem; border: 1px solid var(--line); background: #fff; border-radius: .55rem; }
@media(max-width:680px) {
  .rhu-overview, .rhu-benefits, .rhu-members ul { grid-template-columns: minmax(0,1fr); }
  .rhu-benefits li, .rhu-benefits li:nth-child(n+4) { grid-column: auto; }
  .rhu-popup-button { min-height: 4.75rem; }
}

.methods a {
  position: relative;
  min-height: 6.5rem;
  border: 2px solid #a9d4c3;
  padding: .75rem;
}
.methods .method-action {
  margin-top: .65rem;
  width: fit-content;
  padding: .28rem .58rem;
  border-radius: .4rem;
  color: #fff;
  background: var(--accent);
  font-size: .85rem;
}
.methods a[aria-current=true] { border-color: var(--accent); }
.step-note ul { margin: .65rem 0 0; }
@property --method-glow-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (background: conic-gradient(red, blue)) {
    .methods a:not([aria-current=true]) {
      border-color: transparent;
      background: linear-gradient(#eaf5ef, #eaf5ef) padding-box,
        conic-gradient(from var(--method-glow-angle), #a9d4c3 0 76%, #25a77c 85%, #c9ffe9 92%, #a9d4c3 100%) border-box;
      animation: method-edge-glow 2.8s linear 3;
    }
    .methods a:nth-child(2) { animation-delay: .2s; }
    .methods a:nth-child(3) { animation-delay: .4s; }
  }
}
@keyframes method-edge-glow { to { --method-glow-angle: 360deg; } }

.rhu-members li { display: flex; align-items: center; gap: .7rem; min-width: 0; line-height: 1.35; }
.member-icon {
  display: inline-grid; place-items: center; flex: 0 0 2.35rem; height: 2.35rem;
  color: #07533f; background: #e0f3eb; border-radius: .65rem;
}
.member-icon svg { display: block; width: 1.3rem; height: 1.3rem; }

/* Dark feedback for pointer, keyboard, and touch. */
body .actions #next-step { background: #d8f3e8; color: #084c3b; }
body .rail a[aria-current=step],
body .methods a[aria-current=true],
body details[open] > summary,
body .rhu-popup-button:has(+ dialog[open]),
body:has(#benepisyo[open]) .head-links [data-popup="benepisyo"] {
  background: #d8f3e8;
  color: #084c3b;
}

@media (hover: hover) {
  body :is(a, button, summary):hover,
  body :is(.rail, .methods, .resource-footer) a:hover,
  body details[open] > summary:hover,
  body .actions :is(#next-step, #previous-step):hover {
    background: #0d5945;
    color: #fff;
  }
  body :is(a, button, summary):hover :is(small, .resource-format, span[lang]) {
    color: #e2f6ee;
  }
}

body :is(a, button, summary):is(:focus-visible, :active),
body :is(.rail, .methods, .resource-footer) a:is(:focus-visible, :active),
body details[open] > summary:is(:focus-visible, :active),
body .actions :is(#next-step, #previous-step):is(:focus-visible, :active) {
  background: #083e30;
  color: #fff;
}
body :is(a, button, summary):is(:focus-visible, :active) :is(small, .resource-format, span[lang]) {
  color: #e2f6ee;
}

@media (hover: hover) {
  body .rhu-popup-button:hover,
  body .rhu-popup-button:has(+ dialog[open]):hover {
    background: #0d5945;
    color: #fff;
    border-color: #0d5945;
  }
}
body .rhu-popup-button:is(:focus-visible, :active),
body .rhu-popup-button:has(+ dialog[open]):is(:focus-visible, :active) {
  background: #083e30;
  color: #fff;
  border-color: #083e30;
}

/* Keep the step highlight inside the number circle. */
body .rail a:is(:hover, :focus-visible, :active, [aria-current=step]) {
  background: transparent;
  color: var(--ink);
}
.rail a > span:first-child {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.rail a:is([aria-current=step], :active) > span:first-child {
  background: #0d5945;
  border-color: #0d5945;
  color: #fff;
}
@media (hover: hover) {
  .rail a:hover:not([aria-current=step], :active) > span:first-child {
    background: #d8f3e8;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rail a > span:first-child { transition: none; }
}

.site-head .brand { display: grid; gap: .12rem; padding-block: .4rem; line-height: 1.25; }
.brand-rhu { font-size: .85em; font-weight: 650; }

.guide-notice { margin: 0 0 1rem; padding: .75rem 1rem; background: #153b33; border-radius: .65rem; color: #f0fbf6; }
.guide-notice p { margin: 0; }
.guide-notice strong { color: #fff; }

.site-head { background: #153b33; border-bottom-color: #214d42; }
.site-head .brand { color: #fff; }
.site-head .brand-rhu { color: #d4eee4; }
.site-head .head-links .head-help { color: #fff; background: #246454; }
@media (hover: hover) {
  body .site-head .brand:hover,
  body .site-head .head-links .head-help:hover { color: #fff; background: #0d5945; }
}
body .site-head :is(.brand, .head-links .head-help):is(:active, :focus-visible) { color: #fff; background: #083e30; }
.site-head a:focus-visible { outline-color: #c9ecdd; }

.rhu-gallery { margin: 0 0 1.6rem; padding: clamp(1rem, 3vw, 1.65rem); background: #fff; border: 1px solid var(--line); border-radius: 1rem; }
.gallery-heading { display: flex; flex-wrap: wrap; gap: .6rem 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: .9rem; }
.gallery-heading h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.1rem); }
.gallery-heading p { margin: .35rem 0 0; color: var(--muted); }
.gallery-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, calc((100% - .8rem) / 2)); gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 0 .6rem; margin: 0; list-style: none; scrollbar-color: #8ab9a7 #eaf4ee; }
.gallery-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.gallery-track > li { min-width: 0; scroll-snap-align: start; }
.gallery-track figure { margin: 0; overflow: hidden; border-radius: .75rem; background: #edf6f1; }
.gallery-track img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-track figcaption { padding: .75rem .9rem; }
.gallery-track h3 { margin: 0; font-size: 1.07rem; }
@media (max-width: 640px) { .gallery-track { grid-auto-columns: 89%; } }
.gallery-track figcaption p { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }

.gallery-track { display: flex; }
.gallery-track > li { flex: 0 0 100%; scroll-snap-stop: always; }
.gallery-track img { aspect-ratio: 16 / 9; max-height: 29rem; object-position: center 55%; }
.gallery-track figure { height: 100%; }
@media (max-width: 640px) { .gallery-track img { aspect-ratio: 4 / 3; } }

/* Fit the entire photo, including portrait images, inside each slide. */
.gallery-track img {
  height: clamp(15rem, 55vw, 30rem);
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  background: #e2eee8;
}
