/* ============================================================
   CARE COMPASS — style.css
   Purpose: help people get healthcare without insurance —
   free/low-cost clinics, sliding scale, pay-later, know-your-rights.
   Tone: warm, hopeful, reassuring, happy — you are not alone.
   Palette: coral #FF6B6B | aqua #17C3B2 | sunshine #FFD166
            plum-navy #2B2D42 | soft white #FFFDF9 | mint #C7F0E9
   Type: Poppins (friendly headings) + Nunito Sans (body)
   ============================================================ */

:root {
  --coral: #FF6B6B;
  --coral-dk: #E8484A;
  --aqua: #17C3B2;
  --aqua-dk: #109A8D;
  --sun: #FFD166;
  --sun-dk: #F0B72E;
  --plum: #2B2D42;
  --plum-2: #3D4060;
  --paper: #FFFDF9;
  --paper-2: #FFF2EC;
  --mint: #C7F0E9;
  --ink: #2B2D42;
  --ink-soft: #626580;
  --line: #F0E4DE;
  --white: #fff;
  --ok: #17A06B;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 8px 26px rgba(43, 45, 66, 0.12);
  --head: "Poppins", -apple-system, "Segoe UI", sans-serif;
  --body: "Nunito Sans", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); background: var(--paper); color: var(--ink); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; }
a { color: var(--aqua-dk); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip-link { position: absolute; left: -9999px; background: var(--sun); color: var(--plum); padding: 10px 16px; z-index: 100; font-weight: 800; border-radius: 8px; }
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- help bar ---------- */
.help-bar { background: var(--plum); color: #E8E9F2; text-align: center; padding: 9px 16px; font-size: 0.93rem; font-weight: 700; }
.help-bar strong { color: var(--sun); }
.help-bar a { color: #fff; text-decoration: underline; }

/* ---------- header ---------- */
.hdr { background: var(--paper); border-bottom: 2px solid var(--line); position: sticky; top: 0; z-index: 40; }
.hdr-inner { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--plum); font-family: var(--head); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand .mark { width: 40px; height: 40px; border-radius: 50%; background: var(--aqua); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.brand .p2 { color: var(--aqua-dk); }
.nav { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--plum); text-decoration: none; font-weight: 700; font-size: 0.89rem; padding: 9px 12px; border-radius: 999px; transition: background .15s; }
.nav a:hover, .nav a.on { background: var(--paper-2); }
.nav a.cta { background: var(--coral); color: #fff; }
.nav a.cta:hover { background: var(--coral-dk); }

/* ---------- buttons ---------- */
.btn { display: inline-block; font-family: var(--head); font-weight: 600; font-size: 0.98rem; padding: 12px 24px; border-radius: 999px; border: none; cursor: pointer; text-decoration: none; text-align: center; transition: all .15s; }
.btn:active { transform: translateY(1px); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dk); }
.btn-aqua { background: var(--aqua); color: #fff; }
.btn-aqua:hover { background: var(--aqua-dk); }
.btn-sun { background: var(--sun); color: var(--plum); }
.btn-sun:hover { background: var(--sun-dk); }
.btn-plum { background: var(--plum); color: #fff; }
.btn-plum:hover { background: var(--plum-2); }
.btn-line { background: transparent; color: var(--plum); border: 2px solid var(--plum); }
.btn-line:hover { background: var(--plum); color: #fff; }
.btn-sm { padding: 8px 15px; font-size: 0.88rem; }
.btn-lg { padding: 15px 30px; font-size: 1.08rem; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(circle at 85% 10%, rgba(255,209,102,0.5), transparent 42%), radial-gradient(circle at 8% 92%, rgba(23,195,178,0.28), transparent 46%), var(--coral); color: #fff; padding: 56px 20px 62px; position: relative; overflow: hidden; }
.hero-inner { max-width: 1120px; margin: 0 auto; position: relative; }
.hero .eyebrow { display: inline-block; background: rgba(255,255,255,0.2); padding: 6px 15px; border-radius: 999px; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.05em; margin-bottom: 16px; }
.hero h1 { font-family: var(--head); font-size: clamp(2.1rem, 5.4vw, 3.5rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; max-width: 800px; }
.hero h1 .u { color: var(--plum); }
.hero p.lede { margin-top: 14px; font-size: 1.16rem; max-width: 640px; color: #FFF0EC; font-weight: 600; }

/* ---------- solidarity band ---------- */
.solidarity { background: var(--sun); color: var(--plum); padding: 30px 20px; text-align: center; }
.solidarity .in { max-width: 800px; margin: 0 auto; }
.solidarity h2 { font-family: var(--head); font-size: clamp(1.4rem, 3.2vw, 2rem); font-weight: 700; }
.solidarity p { font-weight: 600; margin-top: 8px; font-size: 1.04rem; }
.solidarity .heart { font-size: 1.6rem; }

/* ---------- search card ---------- */
.search-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-top: 24px; }
.search-card h2 { font-family: var(--head); font-size: 1.12rem; color: var(--plum); margin-bottom: 14px; }
.s-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; }
.fld label { display: block; font-weight: 800; font-size: 0.76rem; color: var(--ink-soft); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.fld input, .fld select { width: 100%; padding: 13px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); font-family: var(--body); font-size: 1rem; background: var(--paper); color: var(--ink); font-weight: 600; }
.fld input:focus, .fld select:focus { outline: 3px solid var(--aqua); outline-offset: 1px; border-color: var(--aqua); }

/* ---------- sections ---------- */
.section { padding: 54px 0; }
.section.alt { background: #fff; }
.sec-head { margin-bottom: 26px; }
.sec-head .k { color: var(--aqua-dk); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.sec-head h2 { font-family: var(--head); font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700; letter-spacing: -0.01em; margin-top: 4px; }
.sec-head p { color: var(--ink-soft); max-width: 640px; margin-top: 6px; font-weight: 600; }

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px,1fr)); gap: 14px; }
.cat { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 22px 16px; text-decoration: none; color: var(--plum); transition: all .16s; }
.cat:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--aqua); }
.cat .ci { font-size: 1.9rem; display: block; margin-bottom: 8px; }
.cat .ct { font-family: var(--head); font-weight: 600; display: block; font-size: 1rem; }
.cat .cs { font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; }

/* ---------- resource cards ---------- */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 18px; }
.res-card { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: all .16s; position: relative; }
.res-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.res-card.urgent-card { border-left: 6px solid var(--coral); }
.res-card h3 { font-family: var(--head); font-size: 1.14rem; font-weight: 600; line-height: 1.3; }
.res-card h3 a { color: var(--plum); text-decoration: none; }
.res-card h3 a:hover { color: var(--coral-dk); }
.res-where { color: var(--ink-soft); font-weight: 700; font-size: 0.88rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.73rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--paper-2); color: var(--coral-dk); }
.tag.cat-t { background: var(--mint); color: var(--aqua-dk); }
.tag.free { background: #DBF3E7; color: var(--ok); }
.tag.slide { background: #FFF0CC; color: #9A7412; }
.res-note { font-size: 0.9rem; color: var(--ink-soft); font-weight: 600; }
.res-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.77rem; color: var(--ink-soft); font-weight: 700; }
.sample-flag { display: inline-block; font-size: 0.67rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--coral-dk); background: var(--paper-2); border: 1px dashed var(--coral); padding: 2px 8px; border-radius: 6px; }

/* ---------- filters ---------- */
.filters { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 0.86rem; font-weight: 800; color: var(--plum); background: var(--paper); border: 2px solid var(--line); border-radius: 999px; padding: 8px 15px; cursor: pointer; user-select: none; }
.chip input { accent-color: var(--aqua); cursor: pointer; width: 16px; height: 16px; }
.chip:has(input:checked) { background: var(--aqua); border-color: var(--aqua); color: #fff; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.count { font-weight: 800; color: var(--ink-soft); }

/* ---------- detail ---------- */
.d-hero { background: var(--plum); color: #fff; padding: 44px 20px; }
.d-hero h1 { font-family: var(--head); font-size: clamp(1.8rem, 4.2vw, 2.6rem); font-weight: 700; line-height: 1.1; }
.d-hero .where { color: #C4C6DA; font-weight: 700; margin-top: 6px; }
.d-grid { display: grid; grid-template-columns: 1fr 330px; gap: 26px; align-items: start; }
@media (max-width: 880px) { .d-grid { grid-template-columns: 1fr; } }
.d-block { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.d-block h2 { font-family: var(--head); font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; color: var(--plum); }
.facts { list-style: none; }
.facts li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-weight: 600; }
.facts li:last-child { border-bottom: none; }
.facts .k { color: var(--ink-soft); font-weight: 800; }
.facts .v { text-align: right; }
.side { background: #fff; border: 2px solid var(--line); border-top: 6px solid var(--aqua); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.side h3 { font-family: var(--head); font-weight: 600; margin-bottom: 12px; color: var(--plum); }
.side .btn { width: 100%; margin-bottom: 9px; }
.mini { font-size: 0.83rem; color: var(--ink-soft); background: var(--paper); border-radius: 10px; padding: 11px 13px; font-weight: 600; }

/* ---------- notices ---------- */
.notice { background: #FFF0CC; border-left: 5px solid var(--sun); border-radius: 10px; padding: 15px 18px; font-weight: 600; color: #7A5A10; margin: 18px 0; }
.notice.aqua { background: var(--mint); border-color: var(--aqua); color: #0E5F57; }
.notice.coral { background: var(--paper-2); border-color: var(--coral); color: #9A3234; }

/* ---------- prose / checklist ---------- */
.prose { max-width: 820px; }
.prose h2 { font-family: var(--head); font-size: 1.5rem; font-weight: 700; color: var(--plum); margin: 30px 0 10px; }
.prose h3 { font-size: 1.14rem; font-weight: 700; margin: 20px 0 8px; color: var(--plum); }
.prose p, .prose li { color: #383A50; font-weight: 600; margin-bottom: 10px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 14px; }
.check-list { list-style: none; padding-left: 0 !important; }
.check-list li { position: relative; padding: 11px 0 11px 38px; border-bottom: 1px solid var(--line); font-weight: 600; }
.check-list li::before { content: "✓"; position: absolute; left: 4px; top: 10px; width: 24px; height: 24px; background: var(--mint); color: var(--aqua-dk); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }

/* ---------- rights cards ---------- */
.rights { display: grid; gap: 16px; }
.right-c { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; border-left: 6px solid var(--aqua); }
.right-c h3 { font-family: var(--head); font-weight: 600; font-size: 1.18rem; margin-bottom: 6px; color: var(--plum); }
.right-c p { color: var(--ink-soft); font-weight: 600; }

/* ---------- community board ---------- */
.note-card { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.note-card.mine { border-color: var(--aqua); border-style: dashed; }
.note-card .n-text { font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.note-card .n-meta { font-size: 0.82rem; color: var(--ink-soft); font-weight: 700; }
.note-badge { display: inline-block; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 9px; border-radius: 999px; }
.note-badge.tip { background: #DBF3E7; color: var(--ok); }
.note-badge.mine { background: var(--mint); color: var(--aqua-dk); }

/* ---------- FAQ ---------- */
.faq { background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--plum); list-style: none; position: relative; font-family: var(--head); }
.faq summary::after { content: "+"; position: absolute; right: 22px; color: var(--coral); font-size: 1.5rem; }
.faq[open] summary::after { content: "–"; }
.faq .a { padding: 0 22px 18px; color: var(--ink-soft); font-weight: 600; }

/* ---------- form ---------- */
.form-card { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 720px; }
.frow { margin-bottom: 16px; }
.frow label { display: block; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-bottom: 6px; }
.frow input, .frow select, .frow textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); font-family: var(--body); font-size: 1rem; background: var(--paper); font-weight: 600; }
.frow textarea { min-height: 110px; resize: vertical; }
.frow input:focus, .frow select:focus, .frow textarea:focus { outline: 3px solid var(--aqua); border-color: var(--aqua); }

.empty { text-align: center; padding: 56px 20px; color: var(--ink-soft); background: #fff; border: 2px dashed var(--line); border-radius: var(--radius); font-weight: 700; }
.cta { background: var(--aqua); color: #fff; padding: 48px 20px; text-align: center; }
.cta h2 { font-family: var(--head); font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; }
.cta p { max-width: 560px; margin: 10px auto 20px; font-weight: 600; color: #E1F7F3; }

.ftr { background: var(--plum); color: #A9ABC4; padding: 46px 20px 30px; font-size: 0.92rem; }
.ftr-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .ftr-grid { grid-template-columns: 1fr 1fr; } }
.ftr h4 { color: #fff; font-family: var(--head); font-weight: 600; margin-bottom: 12px; font-size: 0.98rem; }
.ftr a { color: #A9ABC4; text-decoration: none; display: block; padding: 3px 0; font-weight: 600; }
.ftr a:hover { color: var(--sun); }
.ftr-legal { max-width: 1120px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--plum-2); font-size: 0.82rem; color: #7C7E9A; font-weight: 600; }

.hidden { display: none !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; }
.center { text-align: center; }

@media (max-width: 640px) {
  .hdr-inner { justify-content: center; }
  .nav { justify-content: center; }
}

/* ---------- map page (added) ---------- */
:root { --map-accent: #17C3B2; }
#map { height: 62vh; min-height: 420px; border-radius: 16px; border: 2px solid var(--line); z-index: 1; }
.map-jumps { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.leaflet-popup-content { font-family: inherit; font-size: 0.92rem; line-height: 1.5; }

/* ---------- 988 lifeline button (added — do not remove) ---------- */
.lifeline-btn {
  position: fixed; right: 14px; bottom: 14px; z-index: 999;
  display: inline-flex; align-items: center; gap: 7px;
  background: #4A2A8A; color: #fff; text-decoration: none;
  font-weight: 800; font-size: 0.86rem; line-height: 1;
  padding: 11px 16px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
  border: 2px solid rgba(255,255,255,0.85);
}
.lifeline-btn:hover { background: #5C3AA6; color: #fff; }
.lifeline-btn .lb-sub { font-weight: 600; font-size: 0.72rem; opacity: 0.9; }
@media (max-width: 640px) { .lifeline-btn .lb-sub { display: none; } }
