/* Alameda County Resource Hub Styles */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  /*  ACOE Primary Colors  */
  --teal:#17175D;--teal-light:#E0F3F8;--teal-dark:#001a45;--teal-mid:#0e8dac;
  --amber:#F5BB4C;--amber-light:#FEF6DC;
  --coral:#E5763A;--coral-light:#FDEDE3;
  /*  ACOE Secondary Colors  */
  --purple:#DB383B;--purple-light:#FCEAEA;
  --blue:#9BAB8E;--blue-light:#EEF2EB;
  --green:#73B661;--green-light:#EAF5E6;
  --pink:#D4537E;--pink-light:#FBEAF0;
  --red:#DB383B;--red-light:#FCEAEA;
  /*  Neutrals  */
  --ink:#1a2332;--ink-soft:#4a5568;--ink-faint:#8a97a8;
  --mist:#f5f7f9;--white:#ffffff;--border:rgba(0,0,0,0.09);--border2:rgba(0,0,0,0.15);
  --card-r:18px;--pill:100px;
  --shadow:0 2px 16px rgba(0,0,0,0.07),0 1px 3px rgba(0,0,0,0.05);
  --shadow-h:0 8px 32px rgba(0,0,0,0.13),0 2px 8px rgba(0,0,0,0.07);
  /*  ACOE Font Stack  */
  --font-head:'Montserrat','Century Gothic','Avenir',sans-serif;
  --font-body:'Montserrat','Century Gothic','Avenir',sans-serif;
}
html{scroll-behavior:smooth}
body{font-family:var(--font-body);background:var(--mist);color:var(--ink);min-height:100vh;line-height:1.6}

/*  HEADER  */
header{background:var(--white);border-bottom:1px solid var(--border);padding:0 2rem;position:sticky;top:0;z-index:200;display:flex;align-items:center;justify-content:space-between;height:64px}
.logo{display:flex;align-items:center;gap:10px;text-decoration:none}
.logo-mark{width:36px;height:36px;background:var(--teal);border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.logo-mark svg{width:20px;height:20px}
.logo-text{font-family:var(--font-head);font-weight:800;font-size:1.15rem;color:var(--ink);letter-spacing:-.01em}
.logo-text span{color:var(--teal)}
nav{display:flex;gap:.25rem}
nav button{background:none;border:none;padding:6px 14px;border-radius:var(--pill);font-family:var(--font-body);font-size:.875rem;font-weight:500;color:var(--ink-soft);cursor:pointer;transition:all .15s}
nav button:hover,nav button.nav-active{background:var(--teal-light);color:var(--teal-dark)}

/*  HERO  */
.hero{background:var(--white);padding:3.5rem 2rem 2.5rem;text-align:center;border-bottom:1px solid var(--border);position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 80% 60% at 50% -10%,rgba(13,158,117,.08) 0%,transparent 70%);pointer-events:none}
.eyebrow{display:inline-flex;align-items:center;gap:6px;background:var(--teal-light);color:var(--teal-dark);font-size:.8rem;font-weight:500;letter-spacing:.05em;text-transform:uppercase;padding:5px 14px;border-radius:var(--pill);margin-bottom:1.25rem}
.hero h1{font-family:var(--font-head);font-size:clamp(1.9rem,4.5vw,3rem);font-weight:800;line-height:1.1;letter-spacing:-.03em;margin-bottom:.9rem}
.hero h1 em{font-style:normal;color:var(--teal)}
.hero p{font-size:1rem;color:var(--ink-soft);max-width:580px;margin:0 auto 1.75rem;font-weight:300}
.hero-btns{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}
.btn-primary{background:var(--teal);color:white;border:none;border-radius:var(--pill);padding:12px 28px;font-family:var(--font-body);font-size:.95rem;font-weight:500;cursor:pointer;transition:background .15s;text-decoration:none}
.btn-primary:hover{background:var(--teal-dark)}
.btn-secondary{background:transparent;color:var(--teal-dark);border:1.5px solid var(--teal);border-radius:var(--pill);padding:11px 24px;font-family:var(--font-body);font-size:.95rem;font-weight:500;cursor:pointer;transition:all .15s}
.btn-secondary:hover{background:var(--teal-light)}

/*  SEARCH BAR  */
.search-wrap{max-width:600px;margin:0 auto;position:relative}
.search-wrap input{width:100%;padding:13px 52px 13px 20px;border-radius:var(--pill);border:1.5px solid var(--border);background:var(--white);font-family:var(--font-body);font-size:.95rem;color:var(--ink);outline:none;box-shadow:var(--shadow);transition:border-color .2s,box-shadow .2s}
.search-wrap input:focus{border-color:var(--teal);box-shadow:0 0 0 3px rgba(13,158,117,.12)}
.search-wrap input::placeholder{color:#aaa}
.search-btn{position:absolute;right:6px;top:50%;transform:translateY(-50%);background:#17175D;border:none;border-radius:var(--pill);width:38px;height:38px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s}
.search-btn:hover{background:var(--teal-dark)}
.search-btn svg{width:15px;height:15px;stroke:white;stroke-width:2.5;fill:none}

/*  FILTERS  */
.filters{display:flex;gap:.4rem;flex-wrap:wrap;justify-content:center;padding:1.4rem 2rem 0}
.fpill{background:var(--white);border:1px solid var(--border);border-radius:var(--pill);padding:5px 14px;font-size:.8rem;font-weight:500;cursor:pointer;transition:all .15s;color:var(--ink-soft)}
.fpill:hover{border-color:var(--teal);color:var(--teal-dark)}
.fpill.active{background:var(--teal);border-color:var(--teal);color:white}

/*  MAIN  */
main{max-width:1240px;margin:0 auto;padding:2.5rem 2rem 4rem}

/*  VIEW TOGGLE  */
.view-toggle{display:flex;background:var(--white);border:1px solid var(--border);border-radius:12px;padding:4px;gap:4px;margin-bottom:2rem;width:fit-content}
.vtab{padding:8px 20px;border-radius:8px;border:none;background:none;font-family:var(--font-body);font-size:.85rem;font-weight:500;cursor:pointer;color:var(--ink-soft);transition:all .15s;display:flex;align-items:center;gap:6px}
.vtab.active{background:var(--teal);color:white}
.vtab svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}

/*  SMART MATCH WIZARD  */
#matcher-view{display:none}
#matcher-view.visible{display:block}
#browse-view{display:block}

.wizard-wrap{background:var(--white);border-radius:22px;border:1px solid var(--border);box-shadow:var(--shadow);overflow:hidden;margin-bottom:2rem}

/* Progress bar */
.wiz-progress{height:5px;background:var(--mist);position:relative}
.wiz-bar{height:100%;background:linear-gradient(90deg,var(--teal),var(--teal-mid));border-radius:5px;transition:width .4s ease}

/* Step header */
.wiz-header{padding:2rem 2rem 0;display:flex;align-items:center;justify-content:space-between}
.wiz-step-label{font-size:.78rem;font-weight:600;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.06em}
.wiz-step-num{font-size:.78rem;color:var(--ink-faint)}

/* Step body */
.wiz-body{padding:1.5rem 2rem 2rem}
.wiz-body h2{font-family:var(--font-head);font-size:1.5rem;font-weight:800;margin-bottom:.4rem;line-height:1.2}
.wiz-body .sub{font-size:.9rem;color:var(--ink-soft);margin-bottom:1.5rem;font-weight:300}

/* Option grids */
.opt-grid{display:grid;gap:.65rem}
.opt-grid.cols-2{grid-template-columns:repeat(2,1fr)}
.opt-grid.cols-3{grid-template-columns:repeat(3,1fr)}
.opt-grid.cols-auto{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}

.wiz-opt{background:var(--mist);border:2px solid transparent;border-radius:14px;padding:1rem 1.1rem;cursor:pointer;transition:all .18s;text-align:left;display:flex;flex-direction:column;gap:.3rem;position:relative}
.wiz-opt:hover{border-color:var(--teal);background:var(--teal-light)}
.wiz-opt.selected{border-color:var(--teal);background:var(--teal-light)}
.wiz-opt .opt-icon{font-size:22px;margin-bottom:2px}
.wiz-opt .opt-label{font-size:.9rem;font-weight:500;color:var(--ink);line-height:1.2}
.wiz-opt .opt-sub{font-size:.75rem;color:var(--ink-faint);font-weight:300}
.wiz-opt .check{position:absolute;top:10px;right:10px;width:20px;height:20px;border-radius:50%;border:2px solid var(--border2);display:flex;align-items:center;justify-content:center;transition:all .18s;flex-shrink:0}
.wiz-opt.selected .check{background:var(--teal);border-color:var(--teal)}
.wiz-opt.selected .check::after{content:'';width:6px;height:6px;background:white;border-radius:50%}

/* Risk factors â€” chip style */
.risk-grid{display:flex;flex-wrap:wrap;gap:.5rem}
.risk-chip{background:var(--mist);border:1.5px solid var(--border2);border-radius:var(--pill);padding:8px 16px;cursor:pointer;font-family:var(--font-body);font-size:.84rem;font-weight:500;color:var(--ink-soft);transition:all .15s;display:flex;align-items:center;gap:6px}
.risk-chip:hover{border-color:var(--teal);color:var(--teal-dark)}
.risk-chip.selected{background:var(--teal);border-color:var(--teal);color:white}
.risk-chip svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.5;flex-shrink:0}

/* Text / select inputs */
.wiz-input{width:100%;padding:12px 16px;border-radius:10px;border:1.5px solid var(--border2);background:var(--white);font-family:var(--font-body);font-size:.95rem;color:var(--ink);outline:none;transition:border-color .2s}
.wiz-input:focus{border-color:var(--teal)}
.wiz-input::placeholder{color:#bbb}
.input-row{display:flex;gap:.75rem}
.input-row .wiz-input{flex:1}
.input-label{font-size:.82rem;font-weight:500;color:var(--ink-soft);margin-bottom:.4rem;display:block}

/* Nav buttons */
.wiz-nav{display:flex;align-items:center;justify-content:space-between;padding:1.25rem 2rem;border-top:1px solid var(--border);background:var(--mist)}
.wiz-back{background:none;border:1.5px solid var(--border2);border-radius:var(--pill);padding:10px 22px;font-family:var(--font-body);font-size:.88rem;font-weight:500;color:var(--ink-soft);cursor:pointer;transition:all .15s}
.wiz-back:hover{border-color:var(--teal);color:var(--teal-dark)}
.wiz-next{background:var(--teal);color:white;border:none;border-radius:var(--pill);padding:11px 28px;font-family:var(--font-body);font-size:.92rem;font-weight:500;cursor:pointer;transition:background .15s;display:flex;align-items:center;gap:8px}
.wiz-next:hover{background:var(--teal-dark)}
.wiz-next svg{width:14px;height:14px;stroke:white;fill:none;stroke-width:2.5}
.wiz-next:disabled{background:#ccc;cursor:not-allowed}

/*  MATCH RESULTS  */
#match-results{display:none}
#match-results.visible{display:block}
.match-header{background:var(--white);border-radius:18px;border:1px solid var(--border);padding:1.75rem 2rem;margin-bottom:1.5rem;box-shadow:var(--shadow);display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.match-header-left h2{font-family:var(--font-head);font-size:1.4rem;font-weight:800;margin-bottom:.3rem}
.match-header-left p{font-size:.88rem;color:var(--ink-soft);font-weight:300}
.profile-pills{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.75rem}
.profile-pill{font-size:.75rem;background:var(--teal-light);color:var(--teal-dark);border-radius:var(--pill);padding:3px 12px;font-weight:500}
.match-again-btn{background:var(--teal-light);color:var(--teal-dark);border:1.5px solid var(--teal);border-radius:var(--pill);padding:9px 20px;font-family:var(--font-body);font-size:.84rem;font-weight:500;cursor:pointer;white-space:nowrap;transition:all .15s;flex-shrink:0}
.match-again-btn:hover{background:var(--teal);color:white}

/* Match score badge */
.score-badge{position:absolute;top:12px;right:12px;display:flex;align-items:center;gap:4px;background:var(--green-light);color:var(--green);border-radius:var(--pill);padding:3px 10px;font-size:.72rem;font-weight:700;z-index:1}
.score-badge.high{background:#E1F5EE;color:#085041}
.score-badge.med{background:var(--amber-light);color:#633806}
.score-badge svg{width:11px;height:11px;fill:currentColor;stroke:none}

/*  SOURCE TABS  */
.source-tabs{display:flex;gap:.45rem;flex-wrap:wrap;margin-bottom:1.5rem}
.stab{background:var(--white);border:1px solid var(--border);border-radius:10px;padding:6px 13px;font-size:.78rem;font-weight:500;cursor:pointer;color:var(--ink-soft);transition:all .15s;display:flex;align-items:center;gap:5px}
.stab:hover{border-color:var(--teal);color:var(--teal-dark)}
.stab.active{background:var(--teal-light);border-color:var(--teal);color:var(--teal-dark)}
.sdot{width:7px;height:7px;border-radius:50%;flex-shrink:0}

/*  SEC HEADER  */
.sec-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem;flex-wrap:wrap;gap:.5rem}
.sec-hdr h2{font-family:var(--font-head);font-size:1.25rem;font-weight:700}
.cnt{font-size:.8rem;color:var(--ink-soft);background:var(--white);border:1px solid var(--border);border-radius:var(--pill);padding:2px 10px}

/*  RESOURCE GRID  */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:1.2rem}

/*  CARD  */
.card{background:var(--white);border-radius:var(--card-r);border:1px solid var(--border);padding:1.4rem;display:flex;flex-direction:column;gap:.85rem;box-shadow:var(--shadow);transition:transform .2s,box-shadow .2s;position:relative;overflow:hidden;animation:fadeUp .35s ease both}
.card:hover{transform:translateY(-3px);box-shadow:var(--shadow-h)}
.accent{position:absolute;top:0;left:0;right:0;height:4px;border-radius:var(--card-r) var(--card-r) 0 0}
.card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}
.cicon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
.badges{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.cat{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;padding:3px 9px;border-radius:var(--pill);white-space:nowrap}
.src-lbl{font-size:.65rem;color:#bbb;text-align:right}
.card h3{font-family:var(--font-head);font-size:.98rem;font-weight:700;line-height:1.25}
.ages-pill{font-size:.74rem;color:var(--teal-dark);background:var(--teal-light);display:inline-block;border-radius:var(--pill);padding:2px 10px;font-weight:500;margin-top:4px}
.card p{font-size:.845rem;color:var(--ink-soft);line-height:1.6;font-weight:300}
.tags{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:auto}
.tag{font-size:.7rem;background:var(--mist);color:var(--ink-soft);border-radius:var(--pill);padding:3px 9px;border:1px solid var(--border)}
.card-foot{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--border);padding-top:.85rem;gap:.5rem}
.card-meta{font-size:.73rem;color:#999;flex:1}
.card-contact{font-size:.73rem;color:var(--ink-soft)}
.card-addr{font-size:.68rem;color:#bbb}
.cta{background:var(--teal);color:white;border:none;border-radius:var(--pill);padding:7px 15px;font-family:var(--font-body);font-size:.78rem;font-weight:500;cursor:pointer;text-decoration:none;display:inline-block;transition:background .15s;white-space:nowrap;flex-shrink:0}
.cta:hover{background:var(--teal-dark)}
.cta-gray{background:#e5e5e5;color:#aaa;cursor:default}

/* match reason tag */
.match-reason{font-size:.7rem;background:var(--green-light);color:var(--green);border-radius:var(--pill);padding:3px 10px;border:1px solid rgba(99,153,34,.2);font-weight:500}

/*  THEMES  */
.th-teal .accent{background:var(--teal)}.th-teal .cicon{background:var(--teal-light)}.th-teal .cat{background:var(--teal-light);color:var(--teal-dark)}
.th-amber .accent{background:var(--amber)}.th-amber .cicon{background:var(--amber-light)}.th-amber .cat{background:var(--amber-light);color:#633806}
.th-coral .accent{background:var(--coral)}.th-coral .cicon{background:var(--coral-light)}.th-coral .cat{background:var(--coral-light);color:#4A1B0C}
.th-purple .accent{background:var(--purple)}.th-purple .cicon{background:var(--purple-light)}.th-purple .cat{background:var(--purple-light);color:#26215C}
.th-blue .accent{background:var(--blue)}.th-blue .cicon{background:var(--blue-light)}.th-blue .cat{background:var(--blue-light);color:#042C53}
.th-pink .accent{background:var(--pink)}.th-pink .cicon{background:var(--pink-light)}.th-pink .cat{background:var(--pink-light);color:#4B1528}
.th-red .accent{background:var(--red)}.th-red .cicon{background:var(--red-light)}.th-red .cat{background:var(--red-light);color:#501313}

/*  NO RESULTS  */
.nores{display:none;text-align:center;padding:3rem;color:var(--ink-soft)}
.nores h3{font-family:var(--font-head);font-weight:700;margin-bottom:.5rem}

/*  FOOTER  */
footer{font-size:.8rem}
footer strong{color:white;font-family:var(--font-head)}

/*  EMPTY WIZARD STATE  */
.start-card{text-align:center;padding:3rem 2rem;background:var(--white);border-radius:22px;border:1px solid var(--border);box-shadow:var(--shadow)}
.start-card .big-icon{font-size:3rem;margin-bottom:1rem}
.start-card h2{font-family:var(--font-head);font-size:1.5rem;font-weight:800;margin-bottom:.5rem}
.start-card p{color:var(--ink-soft);font-size:.95rem;max-width:440px;margin:0 auto 1.75rem;font-weight:300}

@media(max-width:680px){
  nav{display:none}
  .hero{padding:2.5rem 1.25rem 2rem}
  main{padding:1.5rem 1rem 3rem}
  .grid{grid-template-columns:1fr}
  .opt-grid.cols-2,.opt-grid.cols-3,.opt-grid.cols-auto{grid-template-columns:1fr}
  .input-row{flex-direction:column}
  .match-header{flex-direction:column}
}
@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
@keyframes slideIn{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}
.wiz-body{animation:slideIn .25s ease}

/* Accessibility improvements */
.skip-link{position:absolute;left:1rem;top:-48px;background:#fff;color:#17175D;border:2px solid #17175D;border-radius:8px;padding:.65rem 1rem;z-index:9999;font-weight:700;text-decoration:none;transition:top .15s}
.skip-link:focus{top:1rem}
.sr-only{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}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #F5BB4C!important;outline-offset:3px!important;box-shadow:0 0 0 5px rgba(11,118,145,.35)!important}
button[aria-pressed="true"],.active{font-weight:700}
footer,footer div,footer p{color:rgba(255,255,255,.92)!important}
footer a{color:#FFE08A!important;text-decoration:underline!important;text-underline-offset:3px}
header button{color:#fff!important}
.cicon{font-size:22px;line-height:1}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}



/* ADA/WCAG contrast hardening */
:root{
  --ink-faint:#4a5568;
  --ink-soft:#334155;
}
.search-wrap input::placeholder,.wiz-input::placeholder{color:#555!important;opacity:1!important}
.wiz-step-label,.wiz-step-num,.wiz-opt .opt-sub,.card-meta,.card-addr,.src-lbl{color:#334155!important}
.card-contact,.card p,.tag,.cnt,.stab,.fpill,.vtab,.wiz-back,.input-label,.match-header-left p,.start-card p,.nores{color:#334155!important}
.cta-gray{background:#e2e8f0!important;color:#1f2937!important}
.score-badge,.match-reason{color:#064e3b!important;background:#d1fae5!important;border-color:#047857!important}
header,header *,header button,header a,header span,header div{color:#fff!important}
header button{border-color:rgba(255,255,255,.75)!important}
header button.nav-active{background:rgba(255,255,255,.25)!important}
footer,footer *,footer a,footer div,footer span{color:#fff!important}
footer a{text-decoration:underline!important;text-underline-offset:3px}
.eyebrow{color:#5c3b00!important}
.hero h1{color:#17175D!important}
.hero h1 em{color:#a33100!important}
#sheet-status{color:#06495a!important}
.abtn-d{color:#9f2a12!important;background:#fff1ed!important;border-color:#9f2a12!important}
/* Admin table and small muted text */
#ad-list td,#ad-list th{color:#1f2937!important}
[style*="color:#777"],[style*="color:#888"],[style*="color:#999"],[style*="color:#aaa"],[style*="color:#bbb"]{color:#334155!important}
[style*="rgba(255,255,255,.3)"],[style*="rgba(255,255,255,.35)"],[style*="rgba(255,255,255,.5)"],[style*="rgba(255,255,255,.55)"],[style*="rgba(255,255,255,.6)"],[style*="rgba(255,255,255,.62)"],[style*="rgba(255,255,255,.65)"],[style*="rgba(255,255,255,.7)"],[style*="rgba(255,255,255,.75)"],[style*="rgba(255,255,255,.8)"]{color:#fff!important}
[style*="color:#FFFFFF"],[style*="color:#FFE08A"]{color:#fff!important}


/* Final WCAG contrast overrides */
.fpill.active, button.fpill.active{background:#085566!important;border-color:#085566!important;color:#ffffff!important;}
.btn-primary, .wiz-next, .cta{background:#085566!important;color:#ffffff!important;}
.btn-primary:hover, .wiz-next:hover, .cta:hover{background:#043f4d!important;}
header[style], footer[style]{background:#17175D!important;}
footer, footer *, footer div, footer span, footer p{color:#ffffff!important;}
footer a{color:#ffffff!important;text-decoration:underline!important;text-underline-offset:3px;}


/* ================================
   ADA CARD CONTRAST FIX
   Added to improve WCAG contrast on resource cards
================================ */
.card{
  background:#ffffff !important;
  border:1px solid #cfd8df !important;
  box-shadow:0 2px 10px rgba(0,0,0,0.08) !important;
}

.card:hover{
  box-shadow:0 8px 24px rgba(0,0,0,0.15) !important;
}

.card h3{
  color:#1e293b !important;
  font-size:1.08rem !important;
  font-weight:800 !important;
  line-height:1.35 !important;
}

.card p{
  color:#334155 !important;
  font-size:.92rem !important;
  line-height:1.75 !important;
  font-weight:500 !important;
}

.card-meta,
.card-contact,
.card-addr{
  color:#334155 !important;
  font-size:.78rem !important;
  font-weight:500 !important;
}

.card-addr{
  color:#475569 !important;
}

.tag{
  background:#e2e8f0 !important;
  color:#1e293b !important;
  border:1px solid #cbd5e1 !important;
  font-size:.72rem !important;
  font-weight:600 !important;
  padding:4px 10px !important;
}

.ages-pill{
  color:#0f172a !important;
  background:#cfe8ef !important;
  font-size:.76rem !important;
  font-weight:700 !important;
  padding:4px 10px !important;
}

.cat{
  font-size:.72rem !important;
  font-weight:800 !important;
  padding:5px 10px !important;
}

.src-lbl{
  color:#475569 !important;
  font-size:.7rem !important;
  font-weight:600 !important;
}

.cta{
  background:#17175D !important;
  color:#ffffff !important;
  font-size:.82rem !important;
  font-weight:700 !important;
  padding:9px 16px !important;
}

.cta:hover,
.cta:focus{
  background:#084c5c !important;
}

.th-teal .cat{
  background:#d7edf3 !important;
  color:#0f172a !important;
}

.th-amber .cat{
  background:#fde7b0 !important;
  color:#422006 !important;
}

.th-coral .cat{
  background:#f8d7c5 !important;
  color:#3b1b10 !important;
}

.th-purple .cat{
  background:#eadcf9 !important;
  color:#24104f !important;
}

.th-blue .cat{
  background:#dbe8ef !important;
  color:#0f172a !important;
}

.th-pink .cat{
  background:#f8d8e4 !important;
  color:#4a1024 !important;
}

.th-red .cat{
  background:#f8d0d0 !important;
  color:#4a0f0f !important;
}

/* Filter pill active fix */
.fpill.active,
button.fpill.active{
  background:#17175D !important;
  border-color:#17175D !important;
  color:#ffffff !important;
}

/* Keep primary teal buttons AAA-friendlier */
.btn-primary{
  background:#17175D !important;
  color:#ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus{
  background:#17175D !important;
}


/* ================================
   AAA HEADER/NAV CONTRAST FIX
   Fixes white text on translucent white backgrounds
================================ */
header nav button,
header nav button.nav-active,
header nav button[aria-current="page"]{
  background:#17175D !important;
  color:#ffffff !important;
  border:2px solid #ffffff !important;
  font-weight:700 !important;
}

header nav button:hover,
header nav button:focus{
  background:#021f26 !important;
  color:#ffffff !important;
  border-color:#ffffff !important;
}

header a.logo,
header a.logo *,
header [style*="color:white"],
header [style*="color: white"]{
  color:#ffffff !important;
}

header [style*="rgba(255,255,255,.65)"],
header [style*="rgba(255,255,255,.8)"],
header [style*="rgba(255,255,255,.75)"],
header [style*="rgba(255,255,255,.7)"],
header [style*="rgba(255,255,255,.6)"],
header [style*="rgba(255,255,255,.55)"],
header [style*="rgba(255,255,255,.5)"]{
  color:#ffffff !important;
}

header [style*="background:rgba(255,255,255,.15)"],
header [style*="background:rgba(255,255,255,.1)"],
header [style*="background:rgba(255,255,255,.08)"]{
  background:#17175D !important;
  color:#ffffff !important;
  border-color:#ffffff !important;
}

header .nav-active{
  background:#021f26 !important;
  color:#ffffff !important;
  border-color:#ffffff !important;
}

/* Footer AAA contrast support */
footer{
  background:#17175D !important;
  color:#ffffff !important;
}

footer div,
footer span,
footer strong,
footer a{
  color:#ffffff !important;
}

footer a{
  text-decoration:underline !important;
  font-weight:800 !important;
}


/* ================================
   FINAL FOOTER CONTRAST OVERRIDE
   Forces all footer text to meet contrast on dark teal.
================================ */
footer,
footer *{
  color:#ffffff !important;
}

footer{
  background:#17175D !important;
}

footer a{
  color:#ffffff !important;
  text-decoration:underline !important;
  font-weight:800 !important;
}

footer [style*="color"]{
  color:#ffffff !important;
}

footer div[style*="Our Vision"],
footer [style*="color:#FFFFFF"]{
  color:#ffffff !important;
}

.abtn{background:#f1f5f9;border:1px solid #cbd5e1;border-radius:20px;padding:5px 14px;font-family:var(--font-body);font-size:.76rem;font-weight:500;cursor:pointer;color:#475569;transition:all .15s;white-space:nowrap}
.abtn:hover{background:#e2e8f0}
.abtn-p{background:var(--teal)!important;color:white!important;border-color:var(--teal)!important}
.abtn-p:hover{background:var(--teal-dark)!important}
.abtn-d{background:#fde8e3!important;color:#e85c3a!important;border-color:rgba(232,92,58,.2)!important}
.abtn-d:hover{background:#e85c3a!important;color:white!important}
.afl{display:block;font-size:.71rem;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.25rem}
.afi{width:100%;border:1.5px solid #cbd5e1;border-radius:7px;padding:.5rem .75rem;font-family:var(--font-body);font-size:.83rem;color:#0f172a;outline:none;transition:border-color .2s;background:white}
.afi:focus{border-color:var(--teal);box-shadow:0 0 0 3px rgba(13,158,117,.1)}
textarea.afi{resize:vertical;min-height:72px;line-height:1.5}
#admin-ov{display:none;position:fixed;inset:0;background:rgba(0,0,0,.52);z-index:800;overflow-y:auto;padding:1.5rem}
#admin-ov.open{display:block}



/* ========================================
   LANGUAGE TOGGLE
======================================== */
.lang-toggle{
  display:flex;
  align-items:center;
  gap:.45rem;
  flex-wrap:wrap;
}

.lang-btn{
  border:2px solid #ffffff;
  background:#17175D;
  color:#ffffff;
  border-radius:999px;
  padding:.42rem .72rem;
  font-size:.78rem;
  font-weight:800;
  cursor:pointer;
  transition:.2s;
  line-height:1;
}

.lang-btn:hover,
.lang-btn:focus{
  background:#ffffff;
  color:#17175D;
  outline:3px solid #ffffff;
  outline-offset:2px;
}

.lang-btn.active,
.lang-btn[aria-pressed="true"]{
  background:#ffffff;
  color:#17175D;
  border-color:#ffffff;
}



/* ========================================
   GOOGLE TRANSLATE CLEANUP
======================================== */
#google_translate_element,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover{
  display:none !important;
}

body{
  top:0 !important;
}

.skiptranslate{
  display:none !important;
}



/* ========================================
   ACCESSIBILITY TOOLBAR
======================================== */
.a11y-fab{
  position:fixed;
  right:1rem;
  bottom:1rem;
  z-index:10000;
  background:#17175D;
  color:#ffffff;
  border:3px solid #ffffff;
  border-radius:999px;
  padding:.75rem 1rem;
  font-weight:800;
  font-size:.9rem;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,.28);
}

.a11y-fab:hover,
.a11y-fab:focus{
  background:#021f26;
  outline:4px solid #facc15;
  outline-offset:3px;
}

.a11y-panel{
  position:fixed;
  right:1rem;
  bottom:4.8rem;
  z-index:10000;
  width:min(320px,calc(100vw - 2rem));
  background:#ffffff;
  color:#0f172a;
  border:2px solid #17175D;
  border-radius:18px;
  box-shadow:0 18px 48px rgba(0,0,0,.32);
  display:none;
  overflow:hidden;
}

.a11y-panel.open{
  display:block;
}

.a11y-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:.9rem 1rem;
  background:#17175D;
  color:#ffffff;
}

.a11y-panel-head h2{
  margin:0;
  color:#ffffff;
  font-size:1rem;
  font-weight:800;
}

.a11y-close{
  background:#ffffff;
  color:#17175D;
  border:0;
  border-radius:999px;
  padding:.35rem .65rem;
  font-weight:900;
  cursor:pointer;
}

.a11y-options{
  padding:1rem;
  display:grid;
  gap:.65rem;
}

.a11y-option{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:.75rem;
  background:#f8fafc;
}

.a11y-option span{
  font-weight:700;
  color:#0f172a;
}

.a11y-option button{
  background:#334155;
  color:#ffffff;
  border:0;
  border-radius:999px;
  padding:.45rem .8rem;
  font-weight:800;
  cursor:pointer;
  min-width:72px;
}

.a11y-option button[aria-pressed="true"]{
  background:#17175D;
  color:#ffffff;
  outline:3px solid #facc15;
}

.a11y-reset{
  width:100%;
  background:#7f1d1d !important;
  color:#ffffff !important;
  border:0;
  border-radius:999px;
  padding:.7rem 1rem;
  font-weight:900;
  cursor:pointer;
}

html.a11y-large-text{
  font-size:120%;
}

html.a11y-readable-font body,
html.a11y-readable-font button,
html.a11y-readable-font input,
html.a11y-readable-font textarea,
html.a11y-readable-font select{
  font-family:Arial, Verdana, Tahoma, sans-serif !important;
  letter-spacing:.01em;
}

html.a11y-underline-links a{
  text-decoration:underline !important;
  text-decoration-thickness:2px !important;
  text-underline-offset:3px !important;
}

html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after{
  animation:none !important;
  transition:none !important;
  scroll-behavior:auto !important;
}

html.a11y-high-contrast body{
  background:#ffffff !important;
  color:#000000 !important;
}

html.a11y-high-contrast .card,
html.a11y-high-contrast .wizard-wrap,
html.a11y-high-contrast .start-card,
html.a11y-high-contrast .match-header,
html.a11y-high-contrast .search-wrap input,
html.a11y-high-contrast .a11y-panel{
  background:#ffffff !important;
  color:#000000 !important;
  border:3px solid #000000 !important;
  box-shadow:none !important;
}

html.a11y-high-contrast .card *,
html.a11y-high-contrast .wizard-wrap *,
html.a11y-high-contrast .start-card *,
html.a11y-high-contrast .match-header *{
  color:#000000 !important;
}

html.a11y-high-contrast header,
html.a11y-high-contrast footer,
html.a11y-high-contrast .a11y-panel-head{
  background:#000000 !important;
  color:#ffffff !important;
}

html.a11y-high-contrast header *,
html.a11y-high-contrast footer *,
html.a11y-high-contrast .a11y-panel-head *{
  color:#ffffff !important;
}

html.a11y-high-contrast button,
html.a11y-high-contrast .btn-primary,
html.a11y-high-contrast .btn-secondary,
html.a11y-high-contrast .cta,
html.a11y-high-contrast .fpill.active,
html.a11y-high-contrast .stab.active{
  background:#000000 !important;
  color:#ffffff !important;
  border:3px solid #000000 !important;
}

html.a11y-high-contrast button:focus,
html.a11y-high-contrast a:focus,
html.a11y-high-contrast input:focus,
html.a11y-high-contrast textarea:focus,
html.a11y-high-contrast select:focus{
  outline:4px solid #ffbf00 !important;
  outline-offset:3px !important;
}

html.a11y-high-contrast .tag,
html.a11y-high-contrast .cat,
html.a11y-high-contrast .ages-pill{
  background:#ffffff !important;
  color:#000000 !important;
  border:2px solid #000000 !important;
}

@media(max-width:680px){
  .a11y-fab{
    right:.75rem;
    bottom:.75rem;
    padding:.65rem .85rem;
  }

  .a11y-panel{
    right:.75rem;
    bottom:4.2rem;
  }
}



/* ========================================
   RESOURCE DISPLAY LAYOUT OPTIONS
======================================== */
.layout-toggle{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  align-items:center;
}

.layout-btn{
  border:1.5px solid #0b5f73;
  background:#ffffff;
  color:#0b5f73;
  border-radius:999px;
  padding:.4rem .75rem;
  font-size:.75rem;
  font-weight:800;
  cursor:pointer;
}

.layout-btn.active,
.layout-btn[aria-pressed="true"]{
  background:#0b5f73;
  color:#ffffff;
}

.resource-list-view{
  display:grid;
  gap:.85rem;
}

.resource-list-item{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:1rem;
  align-items:center;
  background:#ffffff;
  border:1px solid #cfd8df;
  border-radius:16px;
  padding:1rem;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
}

.resource-list-icon{
  width:48px;
  height:48px;
  border-radius:14px;
  background:#d7edf3;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.45rem;
}

.resource-list-title{
  font-weight:900;
  color:#1e293b;
  font-size:1rem;
  margin-bottom:.2rem;
}

.resource-list-meta{
  font-size:.82rem;
  color:#334155;
  font-weight:700;
  margin-bottom:.3rem;
}

.resource-list-desc{
  font-size:.86rem;
  color:#334155;
  line-height:1.55;
}

.resource-list-actions{
  display:flex;
  gap:.45rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.resource-accordion{
  border:1px solid #cfd8df;
  border-radius:16px;
  overflow:hidden;
  background:#ffffff;
}

.resource-acc-item{
  border-bottom:1px solid #dbe3ea;
}

.resource-acc-item:last-child{
  border-bottom:0;
}

.resource-acc-summary{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:.8rem;
  align-items:center;
  text-align:left;
  background:#ffffff;
  border:0;
  padding:1rem;
  cursor:pointer;
  color:#1e293b;
}

.resource-acc-summary:hover,
.resource-acc-summary:focus{
  background:#e0f3f8;
}

.resource-acc-chevron{
  color:#0b5f73;
  font-weight:900;
}

.resource-acc-details{
  display:none;
  padding:0 1rem 1rem 3rem;
  background:#f8fafc;
  color:#334155;
  line-height:1.6;
}

.resource-acc-item.open .resource-acc-details{
  display:block;
}

.resource-split-view{
  display:grid;
  grid-template-columns:360px 1fr;
  border:1px solid #cfd8df;
  border-radius:18px;
  overflow:hidden;
  background:#ffffff;
  min-height:480px;
}

.resource-split-list{
  border-right:1px solid #dbe3ea;
  max-height:620px;
  overflow:auto;
}

.resource-split-row{
  width:100%;
  display:block;
  text-align:left;
  background:#ffffff;
  border:0;
  border-bottom:1px solid #e2e8f0;
  padding:.9rem 1rem;
  cursor:pointer;
  color:#1e293b;
}

.resource-split-row.active{
  background:#e0f3f8;
  border-left:5px solid #0b5f73;
}

.resource-split-detail{
  padding:1.5rem;
}

.resource-split-title{
  font-size:1.45rem;
  font-weight:900;
  color:#0b5f73;
  margin-bottom:.35rem;
}

.resource-split-section{
  margin:1rem 0;
}

.resource-split-section strong{
  display:block;
  color:#1e293b;
  margin-bottom:.2rem;
}

.resource-grid-table-wrap{
  overflow:auto;
  border:1px solid #cfd8df;
  border-radius:16px;
  background:#ffffff;
}

.resource-grid-table{
  width:100%;
  min-width:900px;
  border-collapse:collapse;
}

.resource-grid-table th{
  background:#17175D;
  color:#ffffff;
  padding:.85rem;
  text-align:left;
  font-size:.75rem;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.resource-grid-table td{
  padding:.8rem;
  border-bottom:1px solid #e2e8f0;
  font-size:.84rem;
  color:#334155;
  vertical-align:top;
}

.resource-grid-table td strong{
  color:#1e293b;
}

.resource-detail-tags{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  margin-top:.65rem;
}

.resource-detail-tag{
  background:#e2e8f0;
  color:#1e293b;
  border:1px solid #cbd5e1;
  border-radius:999px;
  padding:.25rem .55rem;
  font-size:.72rem;
  font-weight:700;
}

@media(max-width:1040px){
  .resource-list-item{
    grid-template-columns:auto 1fr;
  }
  .resource-list-actions{
    grid-column:1 / -1;
    justify-content:flex-start;
  }
  .resource-split-view{
    grid-template-columns:1fr;
  }
  .resource-split-list{
    border-right:0;
    border-bottom:1px solid #dbe3ea;
    max-height:300px;
  }
}


/* ========================================
   FIXED DETAIL + RESULTS LIST LAYOUT
   Replaces the old left-sidebar split behavior
======================================== */
.resource-split-view{
  display:block !important;
  border:0 !important;
  border-radius:0 !important;
  overflow:visible !important;
  background:transparent !important;
  min-height:auto !important;
}

.resource-split-featured{
  background:#ffffff;
  border:1px solid #cfd8df;
  border-radius:18px;
  padding:1.4rem;
  margin-bottom:1rem;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
}

.resource-split-featured-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:.8rem;
}

.resource-split-title{
  font-size:1.35rem;
  font-weight:900;
  color:#0b5f73;
  margin-bottom:.35rem;
}

.resource-split-section{
  margin:.85rem 0;
  color:#334155;
  line-height:1.65;
}

.resource-split-section strong{
  display:block;
  color:#1e293b;
  margin-bottom:.25rem;
}

.resource-split-more-title{
  font-size:.9rem;
  font-weight:900;
  color:#1e293b;
  margin:1rem 0 .6rem;
}

.resource-split-results{
  display:grid;
  gap:.65rem;
}

.resource-split-result{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:.8rem;
  align-items:center;
  background:#ffffff;
  border:1px solid #cfd8df;
  border-radius:14px;
  padding:.8rem;
  text-align:left;
  cursor:pointer;
  color:#1e293b;
}

.resource-split-result:hover,
.resource-split-result:focus{
  background:#e0f3f8;
  outline:3px solid rgba(11,95,115,.25);
}

.resource-split-result.active{
  border:2px solid #0b5f73;
  background:#e0f3f8;
}

.resource-split-result-icon{
  width:40px;
  height:40px;
  border-radius:12px;
  background:#d7edf3;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.2rem;
}

@media(max-width:1040px){
  .resource-split-result{
    grid-template-columns:auto 1fr;
  }
}



/* ========================================
   FULL-WIDTH FIX FOR NON-CARD LAYOUTS
   The original resource area is a card grid. Non-card layouts need to occupy full width.
======================================== */
#browse-grid.layout-list,
#browse-grid.layout-accordion,
#browse-grid.layout-split,
#browse-grid.layout-grid{
  display:block !important;
  grid-template-columns:none !important;
  width:100% !important;
}

#browse-grid.layout-list > *,
#browse-grid.layout-accordion > *,
#browse-grid.layout-split > *,
#browse-grid.layout-grid > *{
  width:100% !important;
  max-width:none !important;
}

#browse-grid.layout-cards{
  display:grid;
}

/* Make the result section use available page width */
#browse-view .section-head,
#browse-view #browse-grid,
#browse-view .nores{
  width:100%;
}

/* Improve detail layout width */
.resource-split-featured,
.resource-split-results,
.resource-list-view,
.resource-accordion,
.resource-grid-table-wrap{
  width:100% !important;
  max-width:none !important;
}

/* Better featured detail proportions */
.resource-split-featured{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
}

/* Keep the detail layout from looking like a narrow card */
.layout-split .resource-split-featured{
  max-width:100% !important;
}

.layout-split .resource-split-results{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
  gap:.75rem;
}

.layout-list .resource-list-view{
  display:grid;
  grid-template-columns:1fr;
  gap:.85rem;
}

.layout-accordion .resource-accordion{
  width:100%;
}

.layout-grid .resource-grid-table-wrap{
  width:100%;
}

@media(max-width:1040px){
  .layout-split .resource-split-results{
    grid-template-columns:1fr;
  }
}



/* ========================================
   SMART MATCH LAYOUT SUPPORT
======================================== */
#match-grid.layout-list,
#match-grid.layout-accordion,
#match-grid.layout-split,
#match-grid.layout-grid,
#results-grid.layout-list,
#results-grid.layout-accordion,
#results-grid.layout-split,
#results-grid.layout-grid,
.match-grid.layout-list,
.match-grid.layout-accordion,
.match-grid.layout-split,
.match-grid.layout-grid{
  display:block !important;
  grid-template-columns:none !important;
  width:100% !important;
}

#match-grid.layout-list > *,
#match-grid.layout-accordion > *,
#match-grid.layout-split > *,
#match-grid.layout-grid > *,
#results-grid.layout-list > *,
#results-grid.layout-accordion > *,
#results-grid.layout-split > *,
#results-grid.layout-grid > *,
.match-grid.layout-list > *,
.match-grid.layout-accordion > *,
.match-grid.layout-split > *,
.match-grid.layout-grid > *{
  width:100% !important;
  max-width:none !important;
}

/* ========================================
   MOBILE RESPONSIVE FIXES
   Added 2026-06-12
   Keeps the desktop layout intact while making the public pages,
   Smart Match, admin modal, and alternate layouts usable on phones.
======================================== */
html,
body{
  max-width:100%;
  overflow-x:hidden;
}

img,
svg,
video,
canvas,
iframe{
  max-width:100%;
}

button,
input,
select,
textarea{
  max-width:100%;
}

.card,
.resource-list-item,
.resource-split-featured,
.resource-split-result,
.resource-accordion-item,
.wizard-wrap,
.start-card,
.match-header{
  min-width:0;
}

@media(max-width:900px){
  header[style]{
    position:relative !important;
    padding:.75rem 1rem !important;
  }

  header > div:first-child{
    align-items:flex-start !important;
  }

  header .logo{
    flex:1 1 100% !important;
    min-width:0 !important;
  }

  header .logo img{
    width:52px !important;
    height:52px !important;
  }

  header nav,
  header nav[style]{
    display:flex !important;
    width:100% !important;
    gap:.45rem !important;
    justify-content:flex-start !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
    padding:.4rem 0 .15rem !important;
    flex-wrap:nowrap !important;
    scrollbar-width:thin;
  }

  header nav button,
  header .lang-btn{
    flex:0 0 auto !important;
    white-space:nowrap !important;
    min-height:40px !important;
    padding:.55rem .85rem !important;
    font-size:.8rem !important;
  }

  header .lang-toggle{
    flex:0 0 auto !important;
    flex-wrap:nowrap !important;
  }

  header > div:nth-child(2){
    align-items:flex-start !important;
    justify-content:flex-start !important;
    gap:.5rem !important;
  }

  header > div:nth-child(2) > div:first-child{
    flex:1 1 100% !important;
    line-height:1.45 !important;
  }
}

@media(max-width:1040px){
  .hero{
    padding:2rem 1rem 1.6rem !important;
  }

  .eyebrow{
    max-width:100%;
    white-space:normal;
    text-align:left;
    line-height:1.4;
    justify-content:center;
  }

  .hero h1{
    font-size:clamp(1.75rem,9vw,2.3rem) !important;
    line-height:1.12 !important;
  }

  .hero p{
    font-size:.95rem !important;
  }

  .hero-btns,
  .wiz-nav,
  .match-header,
  .sec-hdr{
    align-items:stretch !important;
  }

  .hero-btns .btn-primary,
  .hero-btns .btn-secondary,
  .wiz-back,
  .wiz-next,
  .match-again-btn{
    width:100% !important;
    justify-content:center !important;
    text-align:center !important;
  }

  main{
    width:100% !important;
    padding:1.25rem .85rem 3rem !important;
  }

  .view-toggle,
  .layout-toggle,
  .source-tabs,
  .filters,
  .profile-pills,
  .risk-grid{
    width:100% !important;
    overflow-x:auto !important;
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    -webkit-overflow-scrolling:touch;
    padding-bottom:.25rem;
  }

  .vtab,
  .layout-btn,
  .stab,
  .fpill,
  .profile-pill,
  .risk-chip{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }

  .search-wrap input{
    border-radius:18px !important;
    padding:13px 50px 13px 16px !important;
  }

  .grid,
  #browse-grid.layout-cards,
  #match-grid.layout-cards{
    grid-template-columns:minmax(0,1fr) !important;
    gap:1rem !important;
  }

  .card{
    padding:1rem !important;
    border-radius:16px !important;
  }

  .card-top,
  .card-foot,
  .resource-split-featured-head{
    flex-direction:column !important;
    align-items:flex-start !important;
  }

  .card h3,
  .resource-split-title{
    overflow-wrap:anywhere;
  }

  .card-contact,
  .card-addr,
  .resource-split-section,
  .resource-list-body,
  .resource-accordion-body{
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  .wiz-header,
  .wiz-body,
  .wiz-nav{
    padding-left:1rem !important;
    padding-right:1rem !important;
  }

  .wiz-nav,
  .input-row{
    flex-direction:column !important;
    gap:.75rem !important;
  }

  .opt-grid.cols-2,
  .opt-grid.cols-3,
  .opt-grid.cols-auto{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .resource-list-item,
  .resource-split-result{
    grid-template-columns:minmax(0,1fr) !important;
    gap:.55rem !important;
  }

  .resource-list-icon,
  .resource-split-result-icon{
    width:38px !important;
    height:38px !important;
  }

  .layout-split .resource-split-results,
  .resource-split-results{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .resource-grid-table-wrap{
    max-width:100% !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }

  .resource-grid-table{
    min-width:720px !important;
  }

  footer[style]{
    padding:1.5rem 1rem !important;
  }

  footer [style*="grid-template-columns"]{
    display:block !important;
  }
}

@media(max-width:520px){
  header[style]{
    padding:.65rem .75rem !important;
  }

  header .logo{
    gap:.65rem !important;
  }

  header .logo img{
    width:46px !important;
    height:46px !important;
  }

  header .logo div[style*="font-size:1rem"]{
    font-size:.92rem !important;
  }

  header .logo div[style*="font-size:.66rem"]{
    display:none !important;
  }

  header nav button,
  header .lang-btn{
    font-size:.76rem !important;
    padding:.5rem .72rem !important;
  }

  .hero{
    padding:1.6rem .75rem 1.35rem !important;
  }

  .hero h1 br{
    display:none;
  }

  .start-card,
  .wizard-wrap,
  .match-header,
  .resource-split-featured{
    border-radius:16px !important;
  }

  .start-card{
    padding:2rem 1rem !important;
  }

  .source-tabs,
  .filters{
    margin-left:-.15rem;
    margin-right:-.15rem;
  }

  .fpill,
  .stab{
    padding:.55rem .85rem !important;
    min-height:40px !important;
  }

  .card{
    gap:.7rem !important;
  }

  .tag,
  .chip,
  .resource-detail-tag{
    white-space:normal !important;
  }

  .a11y-fab{
    right:.65rem !important;
    bottom:.65rem !important;
    padding:.6rem .8rem !important;
    font-size:.78rem !important;
  }

  .a11y-panel{
    left:.65rem !important;
    right:.65rem !important;
    bottom:4rem !important;
    width:auto !important;
    max-width:none !important;
  }
}

@media(max-width:1040px){
  #admin-ov{
    padding:.65rem !important;
  }

  #admin-ov > div{
    width:100% !important;
    max-width:none !important;
    padding:1rem !important;
    border-radius:14px !important;
  }

  #admin-ov h2{
    font-size:1.05rem !important;
  }

  #admin-ov [style*="display:flex"]{
    max-width:100%;
  }

  #admin-ov input,
  #admin-ov select,
  #admin-ov textarea,
  #admin-ov .afi{
    width:100% !important;
    min-width:0 !important;
  }

  #admin-ov [style*="grid-template-columns:1fr 1fr"],
  #admin-form-sec [style*="grid-template-columns:1fr 1fr"],
  #admin-form-sec [style*="grid-template-columns:1fr 1fr 1fr"],
  #admin-form-sec [style*="grid-template-columns:repeat"]{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
  }

  #admin-ov [style*="width:180px"]{
    width:100% !important;
  }

  #admin-ov table{
    min-width:1040px !important;
  }

  #admin-ov [style*="white-space:pre-wrap"]{
    overflow-x:auto !important;
    white-space:pre !important;
  }

  #admin-ov .abtn{
    min-height:40px !important;
    flex:1 1 auto !important;
  }
}

/* ========================================
   MOBILE NON-CARD LAYOUT FIX
   Added 2026-06-12
   Makes list, accordion, split, and grid/table layouts fit phones without horizontal scrolling.
======================================== */
@media(max-width:1040px){
  #browse-grid,
  #match-grid,
  #results-grid,
  .match-grid,
  .resource-list-view,
  .resource-accordion,
  .resource-split-view,
  .resource-split-results,
  .resource-grid-table-wrap{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:hidden !important;
  }

  .resource-list-item,
  .resource-acc-summary,
  .resource-split-result{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .resource-list-item{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
  }

  .resource-list-item > div,
  .resource-list-actions{
    width:100% !important;
    min-width:0 !important;
  }

  .resource-list-actions{
    justify-content:flex-start !important;
  }

  .resource-list-actions .cta,
  .resource-acc-details .cta,
  .resource-split-featured .cta{
    width:100% !important;
    text-align:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
  }

  .resource-acc-summary{
    display:grid !important;
    grid-template-columns:1.25rem minmax(0,1fr) !important;
    gap:.6rem !important;
    padding:.9rem !important;
  }

  .resource-acc-summary > .cta{
    grid-column:1 / -1 !important;
    width:100% !important;
    text-align:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
  }

  .resource-acc-details{
    padding:.85rem .9rem 1rem .9rem !important;
  }

  .resource-split-featured{
    padding:1rem !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .resource-split-result{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
  }

  .resource-split-result > span{
    width:100% !important;
    min-width:0 !important;
  }

  .resource-split-result .cta{
    width:100% !important;
    text-align:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
  }

  .resource-grid-table-wrap{
    overflow:visible !important;
    border:0 !important;
    background:transparent !important;
  }

  .resource-grid-table,
  .resource-grid-table thead,
  .resource-grid-table tbody,
  .resource-grid-table tr,
  .resource-grid-table th,
  .resource-grid-table td{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  .resource-grid-table{
    border-collapse:separate !important;
    border-spacing:0 !important;
  }

  .resource-grid-table thead{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    overflow:hidden !important;
    clip:rect(0 0 0 0) !important;
    white-space:nowrap !important;
  }

  .resource-grid-table tr{
    background:#ffffff !important;
    border:1px solid #cfd8df !important;
    border-radius:16px !important;
    margin:0 0 .85rem 0 !important;
    padding:.85rem !important;
    box-shadow:0 2px 10px rgba(0,0,0,.06) !important;
  }

  .resource-grid-table td{
    border:0 !important;
    border-bottom:1px solid #e2e8f0 !important;
    padding:.65rem 0 !important;
    overflow-wrap:anywhere !important;
    word-break:break-word !important;
  }

  .resource-grid-table td:last-child{
    border-bottom:0 !important;
    padding-bottom:0 !important;
  }

  .resource-grid-table td::before{
    display:block;
    margin-bottom:.2rem;
    color:#0b5f73;
    font-size:.72rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.04em;
  }

  .resource-grid-table td:nth-child(1)::before{content:"Resource";}
  .resource-grid-table td:nth-child(2)::before{content:"Category";}
  .resource-grid-table td:nth-child(3)::before{content:"Ages";}
  .resource-grid-table td:nth-child(4)::before{content:"Contact";}
  .resource-grid-table td:nth-child(5)::before{content:"Availability";}
  .resource-grid-table td:nth-child(6)::before{content:"Action";}

  .resource-grid-table td .cta,
  .resource-grid-table td a.cta{
    width:100% !important;
    text-align:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
  }
}

/* ========================================
   MOBILE NAVIGATION + FILTER FIX
   Added 2026-06-12
   Prevents header navigation, language buttons, source filters, layout controls,
   and category filters from forcing horizontal page scrolling on phones.
======================================== */
html,
body{
  max-width:100% !important;
  overflow-x:hidden !important;
}

header,
main,
.hero,
#browse-view,
#matcher-view,
#match-results{
  max-width:100% !important;
  overflow-x:hidden !important;
  box-sizing:border-box !important;
}

header nav,
.source-tabs,
.filters,
.layout-toggle,
.view-toggle,
.profile-pills,
.hero-btns,
.sec-hdr,
.match-header{
  min-width:0 !important;
  box-sizing:border-box !important;
}

@media(max-width:900px){
  header > div:first-child{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    width:100% !important;
    min-width:0 !important;
  }

  header .logo{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  header .logo > div:last-child{
    min-width:0 !important;
  }

  header .logo > div:last-child > div{
    overflow-wrap:anywhere !important;
  }

  header nav,
  header nav[style]{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    width:100% !important;
    max-width:100% !important;
    overflow:visible !important;
    gap:.5rem !important;
    padding:.55rem 0 .15rem !important;
    flex-wrap:unset !important;
  }

  header nav button,
  header .lang-toggle{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  header nav button,
  header .lang-btn{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    white-space:normal !important;
    line-height:1.2 !important;
    text-align:center !important;
  }

  header .lang-toggle{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:.35rem !important;
  }

  header .lang-btn{
    width:100% !important;
    min-width:0 !important;
  }
}

@media(max-width:1040px){
  .search-wrap{
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
  }

  .search-wrap input{
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  .filters,
  .source-tabs,
  .layout-toggle,
  .view-toggle,
  .profile-pills{
    display:grid !important;
    width:100% !important;
    max-width:100% !important;
    overflow:visible !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:.5rem !important;
    padding-left:0 !important;
    padding-right:0 !important;
    margin-left:0 !important;
    margin-right:0 !important;
    justify-content:stretch !important;
  }

  .filters{
    padding-top:1rem !important;
  }

  .fpill,
  .stab,
  .layout-btn,
  .vtab,
  .profile-pill{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    text-align:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
    line-height:1.2 !important;
    min-height:42px !important;
  }

  .stab{
    align-items:center !important;
  }

  .sdot{
    flex:0 0 auto !important;
  }

  .match-header{
    display:flex !important;
    flex-direction:column !important;
    width:100% !important;
    gap:1rem !important;
  }

  .match-header-left,
  .match-header-left h2,
  .match-header-left p{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-wrap:anywhere !important;
  }

  .sec-hdr{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:.45rem !important;
  }

  .cnt{
    width:100% !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }
}

@media(max-width:480px){
  header nav,
  header nav[style],
  .filters,
  .source-tabs,
  .layout-toggle,
  .view-toggle,
  .profile-pills{
    grid-template-columns:minmax(0,1fr) !important;
  }

  header nav button,
  header .lang-btn,
  .fpill,
  .stab,
  .layout-btn,
  .vtab{
    min-height:44px !important;
    padding:.65rem .75rem !important;
  }
}

/* ========================================
   COMPACT MOBILE NAV + FILTERS
   Added 2026-06-12
   Replaces the tall stacked mobile controls with compact horizontal chip rows.
   Page still does not scroll sideways because only the control rows scroll.
======================================== */
@media(max-width:900px){
  header > div:first-child{
    gap:.65rem !important;
  }

  header nav,
  header nav[style]{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-start !important;
    flex-wrap:nowrap !important;
    gap:.4rem !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    padding:.4rem 0 .1rem !important;
    -webkit-overflow-scrolling:touch !important;
    scrollbar-width:none !important;
  }

  header nav::-webkit-scrollbar{
    display:none !important;
  }

  header nav button,
  header .lang-toggle,
  header .lang-btn{
    flex:0 0 auto !important;
    width:auto !important;
    max-width:none !important;
    min-width:auto !important;
    white-space:nowrap !important;
  }

  header nav button,
  header .lang-btn{
    min-height:34px !important;
    padding:.42rem .8rem !important;
    font-size:.78rem !important;
    line-height:1 !important;
  }

  header .lang-toggle{
    display:flex !important;
    grid-template-columns:none !important;
    gap:.25rem !important;
  }
}

@media(max-width:1040px){
  .filters,
  .source-tabs,
  .layout-toggle,
  .view-toggle,
  .profile-pills{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:.4rem !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    padding:.45rem 0 .55rem !important;
    margin-left:0 !important;
    margin-right:0 !important;
    -webkit-overflow-scrolling:touch !important;
    scrollbar-width:none !important;
  }

  .filters::-webkit-scrollbar,
  .source-tabs::-webkit-scrollbar,
  .layout-toggle::-webkit-scrollbar,
  .view-toggle::-webkit-scrollbar,
  .profile-pills::-webkit-scrollbar{
    display:none !important;
  }

  .filters{
    padding-top:.55rem !important;
  }

  .fpill,
  .stab,
  .layout-btn,
  .vtab,
  .profile-pill{
    flex:0 0 auto !important;
    width:auto !important;
    max-width:none !important;
    min-width:auto !important;
    white-space:nowrap !important;
    overflow-wrap:normal !important;
    text-align:center !important;
    justify-content:center !important;
    align-items:center !important;
    min-height:34px !important;
    padding:.45rem .8rem !important;
    font-size:.78rem !important;
    line-height:1 !important;
  }

  .source-tabs{
    margin-top:.75rem !important;
  }

  .sec-hdr{
    margin-top:.75rem !important;
  }

  .match-header{
    gap:.65rem !important;
  }

  .match-again-btn{
    width:auto !important;
    align-self:flex-start !important;
    padding:.5rem .85rem !important;
    min-height:34px !important;
  }
}

@media(max-width:480px){
  header nav,
  header nav[style],
  .filters,
  .source-tabs,
  .layout-toggle,
  .view-toggle,
  .profile-pills{
    grid-template-columns:none !important;
  }

  header nav button,
  header .lang-btn,
  .fpill,
  .stab,
  .layout-btn,
  .vtab,
  .profile-pill{
    min-height:32px !important;
    padding:.4rem .7rem !important;
    font-size:.76rem !important;
  }

  .hero-btns{
    gap:.45rem !important;
  }
}


/* ========================================
   HIDDEN ADMIN BUTTON + SECRET TRIGGERS
======================================== */
#admin-visible-btn{
  display:none !important;
}

#secret-admin-trigger{
  position:fixed;
  right:0;
  bottom:0;
  width:46px;
  height:46px;
  opacity:0;
  background:transparent;
  border:0;
  z-index:9999;
  pointer-events:auto;
}

/* Mobile Hero Compact Update */
@media(max-width:1040px){
  .eyebrow{
    font-size:.62rem !important;
    padding:4px 10px !important;
    flex-direction:column !important;
    gap:2px !important;
    line-height:1.2 !important;
    margin-bottom:.5rem !important;
  }

  .hero{
    padding:1rem .75rem .9rem !important;
  }
}

/* ========================================
   CENTERED RESOURCE WIDTH + SOURCE FILTER FIX
   Added 2026-06-12
   Keeps resources from feeling stretched full-width and centers the source filters.
======================================== */
#browse-view .sec-hdr,
#browse-view .source-tabs,
#browse-view #browse-grid,
#browse-view .nores,
#match-results .match-header,
#match-results .source-tabs,
#match-grid,
#results-grid,
.match-grid{
  max-width:1120px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.source-tabs{
  justify-content:center !important;
}

#browse-grid.layout-cards,
#match-grid.layout-cards,
.grid.layout-cards{
  grid-template-columns:repeat(auto-fit,minmax(300px,360px)) !important;
  justify-content:center !important;
}

#browse-grid.layout-list,
#browse-grid.layout-accordion,
#browse-grid.layout-split,
#browse-grid.layout-grid,
#match-grid.layout-list,
#match-grid.layout-accordion,
#match-grid.layout-split,
#match-grid.layout-grid,
#results-grid.layout-list,
#results-grid.layout-accordion,
#results-grid.layout-split,
#results-grid.layout-grid,
.match-grid.layout-list,
.match-grid.layout-accordion,
.match-grid.layout-split,
.match-grid.layout-grid{
  max-width:1120px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.resource-list-view,
.resource-accordion,
.resource-split-view,
.resource-split-featured,
.resource-split-results,
.resource-grid-table-wrap{
  max-width:1120px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

@media(max-width:1040px){
  #browse-view .sec-hdr,
  #browse-view .source-tabs,
  #browse-view #browse-grid,
  #match-results .match-header,
  #match-results .source-tabs,
  #match-grid,
  #results-grid,
  .match-grid,
  .resource-list-view,
  .resource-accordion,
  .resource-split-view,
  .resource-split-featured,
  .resource-split-results,
  .resource-grid-table-wrap{
    max-width:100% !important;
  }

  .source-tabs{
    width:fit-content !important;
    max-width:100% !important;
    margin-left:auto !important;
    margin-right:auto !important;
    justify-content:flex-start !important;
  }

  #browse-grid.layout-cards,
  #match-grid.layout-cards,
  .grid.layout-cards,
  .grid{
    grid-template-columns:minmax(0,1fr) !important;
    justify-content:stretch !important;
  }
}

/* ========================================
   ACCESSIBLE FONT SIZE UPDATE
   Public-facing readable text minimum: 16px
   Large Text accessibility mode preserved
   Added 2026-06-12
======================================== */

html{
  font-size:16px;
}

body{
  font-size:16px;
  line-height:1.65;
}

/* Core readable text */
.hero p,
.card p,
.resource-list-desc,
.resource-list-meta,
.resource-split-section,
.resource-grid-table td,
.resource-acc-details,
.match-header-left p,
.start-card p,
.nores,
footer,
footer p,
footer a{
  font-size:1rem;
  line-height:1.65;
}

/* Small labels, pills, filters, tabs, and metadata */
.eyebrow,
.fpill,
.stab,
.vtab,
.layout-btn,
.profile-pill,
.risk-chip,
.tag,
.resource-detail-tag,
.match-reason,
.score-badge,
.cat,
.src-lbl,
.card-meta,
.card-contact,
.card-addr,
.ages-pill,
.cnt,
.wiz-step-label,
.wiz-step-num,
.wiz-opt .opt-sub,
.input-label,
.abtn,
.afl,
.lang-btn{
  font-size:1rem;
  line-height:1.35;
}

/* Buttons and form controls */
button,
input,
select,
textarea,
.btn-primary,
.btn-secondary,
.cta,
.wiz-back,
.wiz-next,
.match-again-btn,
.search-wrap input,
.wiz-input,
.afi{
  font-size:1rem;
}

/* Titles and hierarchy */
.card h3,
.resource-list-title{
  font-size:1.15rem;
  line-height:1.35;
}

.sec-hdr h2,
.wiz-body h2,
.start-card h2,
.match-header-left h2{
  font-size:1.5rem;
  line-height:1.25;
}

.resource-split-title{
  font-size:1.55rem;
  line-height:1.25;
}

/* Keep tags readable but prevent oversized pill crowding */
.tags,
.resource-detail-tags,
.profile-pills{
  gap:.45rem;
}

.tag,
.resource-detail-tag,
.profile-pill{
  padding:5px 11px;
}

/* Mobile adjustments after increasing font size */
@media(max-width:1040px){
  body{
    font-size:16px;
  }

  .hero h1{
    font-size:clamp(1.75rem,8vw,2.35rem) !important;
  }

  .eyebrow{
    font-size:1rem;
    padding:5px 10px !important;
    line-height:1.25;
    gap:3px !important;
  }

  .fpill,
  .stab,
  .vtab,
  .layout-btn,
  .tag,
  .resource-detail-tag,
  .profile-pill{
    font-size:1rem;
  }

  .card{
    padding:1rem !important;
  }

  .card h3{
    font-size:1.12rem;
  }

  .card p{
    font-size:1rem;
  }

  .card-meta,
  .card-contact,
  .card-addr,
  .src-lbl{
    font-size:1rem;
  }
}

/* ========================================
   ACCESSIBILITY LARGE TEXT FIX
   This must come AFTER the minimum 16px rules.
======================================== */

html.a11y-large-text{
  font-size:120% !important;
}

html.a11y-large-text body{
  font-size:1rem !important;
}

/* Scale common readable elements when Large Text is enabled */
html.a11y-large-text .hero p,
html.a11y-large-text .card p,
html.a11y-large-text .resource-list-desc,
html.a11y-large-text .resource-list-meta,
html.a11y-large-text .resource-split-section,
html.a11y-large-text .resource-grid-table td,
html.a11y-large-text .resource-acc-details,
html.a11y-large-text .match-header-left p,
html.a11y-large-text .start-card p,
html.a11y-large-text .nores,
html.a11y-large-text footer,
html.a11y-large-text footer p,
html.a11y-large-text footer a,
html.a11y-large-text .eyebrow,
html.a11y-large-text .fpill,
html.a11y-large-text .stab,
html.a11y-large-text .vtab,
html.a11y-large-text .layout-btn,
html.a11y-large-text .profile-pill,
html.a11y-large-text .risk-chip,
html.a11y-large-text .tag,
html.a11y-large-text .resource-detail-tag,
html.a11y-large-text .match-reason,
html.a11y-large-text .score-badge,
html.a11y-large-text .cat,
html.a11y-large-text .src-lbl,
html.a11y-large-text .card-meta,
html.a11y-large-text .card-contact,
html.a11y-large-text .card-addr,
html.a11y-large-text .ages-pill,
html.a11y-large-text .cnt,
html.a11y-large-text .wiz-step-label,
html.a11y-large-text .wiz-step-num,
html.a11y-large-text .wiz-opt .opt-sub,
html.a11y-large-text .input-label,
html.a11y-large-text .abtn,
html.a11y-large-text .afl,
html.a11y-large-text .lang-btn,
html.a11y-large-text button,
html.a11y-large-text input,
html.a11y-large-text select,
html.a11y-large-text textarea,
html.a11y-large-text .btn-primary,
html.a11y-large-text .btn-secondary,
html.a11y-large-text .cta,
html.a11y-large-text .wiz-back,
html.a11y-large-text .wiz-next,
html.a11y-large-text .match-again-btn,
html.a11y-large-text .search-wrap input,
html.a11y-large-text .wiz-input,
html.a11y-large-text .afi{
  font-size:1.12rem !important;
}

html.a11y-large-text .card h3,
html.a11y-large-text .resource-list-title{
  font-size:1.3rem !important;
}

html.a11y-large-text .sec-hdr h2,
html.a11y-large-text .wiz-body h2,
html.a11y-large-text .start-card h2,
html.a11y-large-text .match-header-left h2{
  font-size:1.7rem !important;
}

html.a11y-large-text .resource-split-title{
  font-size:1.8rem !important;
}

html.a11y-large-text .hero h1{
  font-size:clamp(2.25rem,5.5vw,3.5rem) !important;
}


/* ========================================
   POST-16PX LAYOUT BALANCE UPDATE
   Added 2026-06-12
======================================== */

/* Wider content area */
main{
  max-width:1400px !important;
}

/* Resource sections get additional room */
#browse-grid,
#match-grid,
#results-grid{
  max-width:1450px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Larger cards to match larger text */
.grid{
  grid-template-columns:repeat(auto-fill,minmax(360px,1fr)) !important;
}

/* Filters don't need to be full 16px */
.fpill,
.stab,
.profile-pill,
.layout-btn{
  font-size:.9rem !important;
}

/* Keep source/filter sections centered */
.filters,
.source-tabs,
.layout-toggle{
  justify-content:center !important;
}

/* Mobile remains scrollable */
@media(max-width:1040px){
  .filters,
  .source-tabs,
  .layout-toggle{
    justify-content:flex-start !important;
  }

  .grid{
    grid-template-columns:minmax(0,1fr) !important;
  }
}


/* ========================================
   SINGLE-LINE SOURCE FILTERS
   Added 2026-06-12
======================================== */

@media(min-width:761px){

  .source-tabs{
    display:flex !important;
    flex-wrap:nowrap !important;
    justify-content:center !important;
    align-items:center !important;
    gap:.45rem !important;
    overflow-x:auto !important;
    scrollbar-width:none;
  }

  .source-tabs::-webkit-scrollbar{
    display:none;
  }

  .stab{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }

  .filters{
    display:flex !important;
    flex-wrap:nowrap !important;
    justify-content:center !important;
    align-items:center !important;
    gap:.4rem !important;
    overflow-x:auto !important;
    scrollbar-width:none;
  }

  .filters::-webkit-scrollbar{
    display:none;
  }

  .fpill{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }
}

@media(max-width:1040px){

  .source-tabs,
  .filters{
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }

  .stab,
  .fpill{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }
}


/* ========================================
   DESKTOP WIDTH EXPANSION
   No desktop scrolling for source/category filters
   Added 2026-06-12
======================================== */

@media(min-width:761px){

  main{
    max-width:1700px !important;
  }

  #browse-grid,
  #match-grid,
  #results-grid{
    max-width:1700px !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  .source-tabs,
  .filters{
    width:100% !important;
    max-width:1700px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    justify-content:center !important;
    overflow:visible !important;
    flex-wrap:wrap !important;
  }

  .source-tabs .stab,
  .filters .fpill{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }
}


/* ========================================
   DESKTOP FILTERS TRUE SINGLE ROW
   Added 2026-06-12
   Keeps source/category filters on one desktop line.
======================================== */

@media(min-width:761px){

  /* Let the content use almost the full desktop viewport */
  main{
    max-width:min(1900px, calc(100vw - 48px)) !important;
    width:100% !important;
  }

  #browse-grid,
  #match-grid,
  #results-grid{
    max-width:min(1900px, calc(100vw - 48px)) !important;
    width:100% !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  /* Force filter rows to stay one line on desktop */
  .source-tabs,
  .filters{
    width:100% !important;
    max-width:min(1900px, calc(100vw - 48px)) !important;
    margin-left:auto !important;
    margin-right:auto !important;
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    justify-content:center !important;
    align-items:center !important;
    overflow:visible !important;
    gap:.28rem !important;
  }

  .source-tabs .stab,
  .filters .fpill,
  .stab,
  .fpill{
    flex:0 1 auto !important;
    white-space:nowrap !important;
    min-width:0 !important;
    padding:6px 10px !important;
    font-size:.86rem !important;
    line-height:1.2 !important;
  }
}

/* Keep mobile swipe behavior */
@media(max-width:1040px){
  .source-tabs,
  .filters{
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch;
  }

  .source-tabs .stab,
  .filters .fpill,
  .stab,
  .fpill{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }
}


/* ========================================
   TABLET / MOBILE BREAKPOINT UPDATE
   Added 2026-06-12
   Switches compact mobile-style controls at 1046px and below.
======================================== */

@media(max-width:1046px){

  /* Use compact mobile-style horizontal controls earlier */
  .source-tabs,
  .filters,
  .layout-toggle,
  .view-toggle{
    width:100% !important;
    max-width:100% !important;
    display:flex !important;
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    align-items:center !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
    gap:.4rem !important;
  }

  .source-tabs .stab,
  .filters .fpill,
  .layout-toggle .layout-btn,
  .view-toggle .vtab,
  .stab,
  .fpill,
  .layout-btn,
  .vtab{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }

  /* Cards should stop trying to fit multiple columns once space is tight */
  .grid,
  #browse-grid.layout-cards,
  #match-grid.layout-cards,
  #results-grid.layout-cards{
    grid-template-columns:minmax(0,1fr) !important;
  }

  /* Keep the page from feeling cramped */
  main{
    max-width:100% !important;
    padding-left:1rem !important;
    padding-right:1rem !important;
  }

  #browse-grid,
  #match-grid,
  #results-grid{
    max-width:100% !important;
  }

  /* Make alternate resource layouts behave like mobile/tablet */
  .resource-list-item,
  .resource-split-result{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .layout-split .resource-split-results,
  .resource-split-results{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .resource-list-actions{
    justify-content:flex-start !important;
  }

  .resource-list-actions .cta,
  .resource-split-featured .cta,
  .resource-split-result .cta,
  .resource-acc-details .cta{
    width:100% !important;
    text-align:center !important;
    justify-content:center !important;
  }

  /* Header/navigation switches to compact mode earlier */
  header nav,
  header nav[style]{
    display:flex !important;
    width:100% !important;
    gap:.45rem !important;
    justify-content:flex-start !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
    padding:.4rem 0 .15rem !important;
    flex-wrap:nowrap !important;
    scrollbar-width:thin;
  }

  header nav button,
  header .lang-btn{
    flex:0 0 auto !important;
    white-space:nowrap !important;
    min-height:40px !important;
    padding:.55rem .85rem !important;
    font-size:.86rem !important;
  }

  .hero{
    padding:1.5rem 1rem 1.2rem !important;
  }

  .hero h1{
    font-size:clamp(1.85rem,6vw,2.6rem) !important;
  }
}

/* True desktop only: keep filters one line above the breakpoint */
@media(min-width:1047px){

  .source-tabs,
  .filters{
    flex-wrap:nowrap !important;
    justify-content:center !important;
    overflow:visible !important;
  }

  .source-tabs .stab,
  .filters .fpill{
    flex:0 1 auto !important;
    white-space:nowrap !important;
  }
}

/* ========================================
   ADA FIX V2
   Touch targets, landmarks, and filter controls
   Added 2026-06-15
======================================== */

/* 44x44 minimum touch target for all public buttons and controls */
button,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"],
a.btn-primary,
a.btn-secondary,
a.cta,
.btn-primary,
.btn-secondary,
.cta,
.fpill,
.stab,
.vtab,
.layout-btn,
.lang-btn,
.abtn,
.wiz-back,
.wiz-next,
.match-again-btn,
.search-btn,
.a11y-fab,
.a11y-close,
.a11y-option button,
.a11y-reset,
.all-filter{
  min-width:44px !important;
  min-height:44px !important;
  box-sizing:border-box !important;
}

/* Make button/link controls center their text within the 44px target */
button,
[role="button"],
.btn-primary,
.btn-secondary,
.cta,
.fpill,
.stab,
.vtab,
.layout-btn,
.lang-btn,
.abtn,
.wiz-back,
.wiz-next,
.match-again-btn,
.a11y-fab,
.a11y-close,
.a11y-option button,
.a11y-reset,
.all-filter{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}

/* Explicit fix for "All" and "All Sources" buttons */
.fpill:first-child,
.stab:first-child,
button.all-filter,
.all-filter{
  min-width:44px !important;
  min-height:44px !important;
  padding:10px 14px !important;
}

/* Keep filter rows usable after 44px target increase */
.filters,
.source-tabs,
.layout-toggle,
.view-toggle{
  align-items:center !important;
}

/* Search button circular but compliant */
.search-btn{
  width:44px !important;
  height:44px !important;
  right:4px !important;
}

.search-wrap input{
  padding-right:58px !important;
}

/* Header controls */
header nav button,
header .lang-btn{
  min-width:44px !important;
  min-height:44px !important;
}

/* Accordion and resource interactive rows */
.resource-acc-summary,
.resource-split-row,
.resource-split-result{
  min-height:44px !important;
}

/* Accessibility button gets its own named region */
.a11y-landmark{
  position:fixed;
  right:1rem;
  bottom:1rem;
  z-index:10000;
}

.a11y-landmark .a11y-fab{
  position:static !important;
  right:auto !important;
  bottom:auto !important;
}

/* Hidden admin triggers should not appear in the accessibility tree */
#secret-admin-trigger,
#hidden-admin-trigger,
#admin-secret-trigger,
.secret-admin-trigger,
.hidden-admin-trigger,
.admin-secret-trigger{
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  min-height:44px !important;
  opacity:0 !important;
  pointer-events:auto;
}

/* Tablet/mobile 44px touch spacing */
@media(max-width:1046px){
  .fpill,
  .stab,
  .vtab,
  .layout-btn,
  .lang-btn,
  .abtn{
    min-height:44px !important;
    min-width:44px !important;
    padding:10px 14px !important;
  }

  .source-tabs,
  .filters,
  .layout-toggle,
  .view-toggle{
    gap:.5rem !important;
  }
}

@media(max-width:1040px){
  .a11y-landmark{
    right:.75rem;
    bottom:.75rem;
  }
}

/* ========================================
   ADA FIX V3
   Empty dynamic toast list + "All" 44x44 target
   Added 2026-06-15
======================================== */

/* Strong explicit target for All / All Sources buttons */
.all-filter,
button.all-filter,
a.all-filter,
.fpill.all-filter,
.stab.all-filter,
button[data-filter="all"],
button[data-source="all"],
.fpill[data-filter="all"],
.stab[data-source="all"],
.fpill:first-child,
.stab:first-child{
  min-width:44px !important;
  min-height:44px !important;
  width:auto !important;
  box-sizing:border-box !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:10px 14px !important;
  line-height:1.2 !important;
}

/* Runtime-injected empty toast ordered list should not be exposed as an empty list */
ol[role="presentation"][aria-hidden="true"]{
  pointer-events:none !important;
}

/* Keep all nav landmarks named and visible to assistive tech */
nav[aria-label]{
  display:flex;
}

/* Region wrappers should not change visual layout */
[role="region"][aria-label]{
  min-width:0;
}
