/* Child Care Access — warm, playful child care theme.
   Structure follows Eviction Lab (sentence controls, big numerals, stat bands);
   the look borrows from a classroom: crayon-box colors, building blocks,
   rounded chunky cards on a warm paper background. */
:root {
  --ink: #2b2340;          /* deep plum: text and outlines */
  --ink-2: #4a4160;
  --muted: #6d6580;
  --paper: #fffaf1;        /* warm cream */
  --paper-2: #fff3dc;
  --card: #ffffff;
  --line: #eadfca;
  --sun: #ffc531;
  --sun-soft: #ffe7a3;
  --coral: #ff6b57;
  --coral-ink: #d94a37;
  --teal: #1fa79a;
  --teal-ink: #137a70;
  --sky: #4c9be8;
  --grape: #7a5cc9;
  --mint: #d8f2ec;
  --peach: #ffe2da;
  --display: "Fredoka", "Nunito", "Trebuchet MS", sans-serif;
  --body: "Nunito", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 18px;
  --wrap: 1180px;
  --shadow: 4px 4px 0 var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--teal-ink); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--sun); font-weight: 700; }
a:hover { color: var(--coral-ink); }
h1, h2, h3, .display { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.12; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.eyebrow { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .04em; color: var(--ink); background: var(--sun); padding: 4px 14px; border-radius: 999px; margin: 0 0 18px; }
.muted { color: var(--muted); }
.squiggle { background: linear-gradient(transparent 62%, var(--sun-soft) 62%); padding: 0 4px; }

/* notice + header */
.notice { background: var(--ink); color: #fff; text-align: center; font-size: 14px; padding: 8px 16px; }
.notice strong { color: var(--sun); }
.notice a { color: #fff; text-decoration-color: var(--sun); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,250,241,.96); border-bottom: 2px solid var(--line); backdrop-filter: blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 23px; }
.brand small { display: block; font: 700 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: -2px; }
.brand > span { display: block; line-height: 1.1; }
.brand-mark { display: block; width: 42px; height: 42px; flex: none; transition: transform .2s; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.nav { display: flex; gap: 6px; }
.nav a { font-family: var(--display); font-weight: 500; font-size: 16px; color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.menu-btn { display: none; background: var(--sun); border: 2px solid var(--ink); border-radius: 12px; color: var(--ink); font: 600 12px var(--display); padding: 6px 10px; cursor: pointer; }
.menu-btn span { display: block; width: 20px; height: 2.5px; background: var(--ink); margin: 3px auto; border-radius: 2px; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--paper); flex-direction: column; gap: 0; border-bottom: 2px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .menu-btn { display: block; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--coral); color: #fff; font: 600 16px var(--display); padding: 13px 24px; border-radius: 999px; text-decoration: none; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); color: #fff; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { color: var(--ink); }
.btn.ghost.dark { background: #fff; color: var(--ink); }
.btn.sun { background: var(--sun); color: var(--ink); }
.btn.teal { background: var(--teal); }
.btn.small { padding: 8px 16px; font-size: 14px; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* hero */
.hero { background: var(--paper); position: relative; overflow: hidden; border-bottom: 2px solid var(--line); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(36px, 4.8vw, 60px); }
.hero h1 em { font-style: normal; color: var(--coral-ink); background: linear-gradient(transparent 60%, var(--sun-soft) 60%); }
.hero p.lede { font-size: 20px; max-width: 44ch; color: var(--ink-2); margin: 24px 0 32px; }
.hero-art { position: relative; aspect-ratio: 1 / 1; }
.hero-art .blob { position: absolute; inset: 6% 2% 4% 6%; background: var(--mint); border-radius: 46% 54% 42% 58% / 52% 40% 60% 48%; border: 2px solid var(--ink); }
.hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .chip { position: absolute; background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 14px; font: 600 14px var(--display); }
.hero-art .chip b { display: block; font-size: 24px; }
.toy { position: absolute; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 8px; }
.toy.t1 { top: 8%; right: 6%; background: var(--sun); transform: rotate(12deg); }
.toy.t2 { bottom: 10%; left: 0; background: var(--sky); border-radius: 50%; }
.toy.t3 { top: 44%; right: -2%; background: var(--grape); transform: rotate(-10deg); width: 26px; height: 26px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art { max-width: 440px; } }

/* stat band */
.stats { background: var(--teal); color: #fff; border-bottom: 2px solid var(--ink); border-top: 2px solid var(--ink); }
.stats .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: 40px; padding-bottom: 44px; }
.stat { background: rgba(255,255,255,.1); border-radius: var(--radius); padding: 22px 24px; }
.stat .num { font-family: var(--display); font-weight: 600; font-size: clamp(44px, 5vw, 64px); line-height: 1; color: var(--sun); }
.stat .lbl { margin-top: 10px; color: #e6f6f3; font-size: 16px; max-width: 30ch; }
.stat .place { font: 600 15px var(--display); color: #fff; margin-bottom: 8px; }
@media (max-width: 760px) { .stats .wrap { grid-template-columns: 1fr; } }

/* sections */
.section { padding: 80px 0; position: relative; }
.section.mist { background: var(--paper-2); }
.section.mint { background: var(--mint); }
.section h2 { font-size: clamp(30px, 3.4vw, 44px); max-width: 22ch; }
.section .intro { font-size: 19px; color: var(--ink-2); max-width: 60ch; margin: 16px 0 0; }
.wave { display: block; width: 100%; height: 28px; }
.grid-2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 2px solid var(--ink); padding: 26px; border-radius: var(--radius); box-shadow: var(--shadow); }
.card h3 { font-size: 23px; margin-bottom: 8px; }
.link-card { display: block; text-decoration: none; color: inherit; font-weight: 400; transition: transform .12s, box-shadow .12s; }
.link-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); color: inherit; }
.link-card .icon { width: 54px; height: 54px; border-radius: 14px; border: 2px solid var(--ink); display: grid; place-items: center; margin-bottom: 16px; }
.link-card .go { font: 600 15px var(--display); color: var(--coral-ink); margin-top: 14px; display: inline-block; }
.dim h3::before { content: attr(data-n); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--ink); font-size: 18px; margin-bottom: 14px; background: var(--dim-c, var(--sun)); color: var(--ink); }
.dim { display: block; }

/* sentence builder */
.sentence { font-family: var(--display); font-weight: 500; font-size: 18px; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sentence select { font: 600 17px var(--display); color: var(--ink); background-color: var(--sun-soft); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 34px 5px 14px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; max-width: 100%; }
.sentence select:hover { background-color: var(--sun); }
.sentence select:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.sentence .tag { font-size: 14px; background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 999px; }

/* map page */
.map-page { height: calc(100vh - 72px); position: relative; }
#map { position: absolute; inset: 0; }
.map-bar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 5; background: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow); padding: 12px 16px; border-radius: var(--radius); width: max-content; max-width: calc(100% - 28px); }
.layers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 2px dashed var(--line); align-items: center; }
.layers .lbl { font: 600 13px var(--display); color: var(--muted); margin-right: 4px; }
.layers button { font: 600 14px var(--display); color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.layers button i { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--ink); }
.layers button:hover { background: var(--paper-2); }
.layers button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.layers button[aria-pressed="true"] i { border-color: #fff; }
.map-card { position: absolute; left: 14px; top: 150px; z-index: 5; width: 300px; background: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow); border-radius: var(--radius); padding: 18px 20px; font-size: 14px; }
.map-card h3 { font-size: 21px; margin-bottom: 2px; }
.map-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.map-card dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.map-card dt { color: var(--muted); } .map-card dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.map-card .hint { margin: 14px 0 0; padding: 10px 12px; background: var(--paper-2); border-radius: 12px; color: var(--ink-2); font-size: 13px; }
.legend { position: absolute; right: 14px; bottom: 30px; z-index: 5; background: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow); padding: 14px 16px; border-radius: var(--radius); font-size: 12px; width: 330px; }
.legend .title { font: 600 14px var(--display); margin-bottom: 8px; }
.legend .ramp { display: grid; grid-template-columns: repeat(7, 1fr); height: 14px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.legend .ticks { display: flex; justify-content: space-between; color: var(--muted); margin-top: 5px; font-weight: 700; }
.legend .note { color: var(--muted); margin-top: 8px; line-height: 1.4; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; pointer-events: none; font: 600 16px var(--display); color: var(--ink-2); }
.maplibregl-popup-content { border: 2px solid var(--ink) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow) !important; padding: 16px 18px 14px !important; font-family: var(--body); min-width: 240px; }
.maplibregl-popup-tip { display: none; }
.maplibregl-popup-close-button { font-size: 22px; right: 8px; top: 6px; color: var(--muted); }
.pop .kind { font: 700 11px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pop h4 { font: 600 20px/1.15 var(--display); margin: 2px 0 10px; padding-right: 18px; }
.pop dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; margin: 0 0 12px; font-size: 14px; }
.pop dt { color: var(--muted); } .pop dd { margin: 0; font-weight: 800; text-align: right; }
.pop .btn { width: 100%; justify-content: center; }
.pop .alt { display: block; text-align: center; font-size: 13px; margin-top: 8px; }
@media (max-width: 760px) { .map-card { display: none; } .legend { width: auto; left: 14px; } .map-bar { top: 8px; } }

/* tables */
.toolbar { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin: 28px 0 18px; }
.search { font: inherit; padding: 11px 18px; border: 2px solid var(--ink); border-radius: 999px; min-width: 260px; background: #fff; }
.search:focus { outline: 3px solid var(--sky); outline-offset: 1px; }
.table-card { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table.rank { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
table.rank th { text-align: left; font: 600 14px var(--display); color: var(--ink); background: var(--paper-2); padding: 12px 14px; border-bottom: 2px solid var(--ink); cursor: pointer; white-space: nowrap; user-select: none; }
table.rank th.num, table.rank td.num { text-align: right; }
table.rank th[aria-sort]::after { content: " ↓"; color: var(--coral-ink); }
table.rank th[aria-sort="ascending"]::after { content: " ↑"; }
table.rank td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.rank tr:last-child td { border-bottom: 0; }
table.rank tr:hover td { background: #fffbef; }
table.rank td a { color: var(--ink); text-decoration: none; }
table.rank td a:hover { color: var(--coral-ink); text-decoration: underline; text-decoration-color: var(--sun); }
.bar { display: inline-block; height: 10px; border-radius: 999px; vertical-align: middle; margin-right: 10px; }
.chg.up { color: var(--teal-ink); font-weight: 700; } .chg.down { color: var(--coral-ink); font-weight: 700; }
.rank-num { font-family: var(--display); font-weight: 600; width: 60px; }
.rank-num span { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 10px; background: var(--paper-2); }

/* page heads (rankings, reports, methods) */
.report-head { background: var(--sun); color: var(--ink); padding: 52px 0 46px; border-bottom: 2px solid var(--ink); position: relative; overflow: hidden; }
.report-head::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.35); }
.report-head .eyebrow { background: #fff; border: 2px solid var(--ink); }
.report-head h1 { font-size: clamp(36px, 5vw, 56px); position: relative; z-index: 1; }
.report-head .sentence { margin-top: 22px; position: relative; z-index: 1; }
.report-head .sentence select { background-color: #fff; }
.report-head .sentence select:hover { background-color: var(--paper-2); }
.metric-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: -34px; position: relative; z-index: 2; }
.metric-cards .m { padding: 22px 22px; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 10px solid var(--mc, var(--teal)); }
.metric-cards .m:nth-child(1) { --mc: var(--teal); } .metric-cards .m:nth-child(2) { --mc: var(--grape); }
.metric-cards .m:nth-child(3) { --mc: var(--sky); } .metric-cards .m:nth-child(4) { --mc: var(--coral); }
.metric-cards .k { font: 600 15px var(--display); color: var(--ink-2); }
.metric-cards .v { font: 600 46px/1 var(--display); color: var(--ink); margin: 10px 0 8px; }
.metric-cards .r { font-size: 14px; color: var(--muted); }
.metric-cards .r b { color: var(--ink); }
@media (max-width: 900px) { .metric-cards { grid-template-columns: 1fr 1fr; } }
.chart-card { background: #fff; border: 2px solid var(--ink); padding: 22px 22px 14px; border-radius: var(--radius); box-shadow: var(--shadow); }
.chart-card h3 { font-size: 20px; }
.chart-card .sub { color: var(--muted); font-size: 14px; margin: 4px 0 6px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 700; }
.chart-legend i { display: inline-block; width: 18px; height: 4px; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
svg.chart text { font-family: var(--body); font-size: 12px; fill: var(--muted); font-weight: 700; }
svg.chart .grid line { stroke: var(--line); stroke-dasharray: 2 4; }
.callout { border: 2px solid var(--ink); background: #fff; border-radius: var(--radius); padding: 18px 22px 18px 76px; font-size: 16px; position: relative; box-shadow: var(--shadow); }
.callout::before { content: "!"; position: absolute; left: 20px; top: 18px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--sun); border: 2px solid var(--ink); font: 600 20px var(--display); }
.mix-row { display: grid; grid-template-columns: 100px 1fr 52px; gap: 12px; align-items: center; margin: 12px 0; font-size: 14px; font-weight: 700; }
.mix-bar { height: 16px; background: var(--paper-2); position: relative; border-radius: 999px; overflow: hidden; }
.mix-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }

/* prose */
.prose { max-width: 72ch; }
.prose h2 { font-size: 30px; margin: 48px 0 14px; }
.prose h3 { font-size: 21px; margin: 30px 0 8px; }
.prose table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; margin: 14px 0; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font: 600 14px var(--display); background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.prose tr:last-child td { border-bottom: 0; }

/* footer */
.signup { background: var(--grape); color: #fff; padding: 30px 0; border-top: 2px solid var(--ink); }
.signup .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 18px; }
.signup .btn { background: var(--sun); color: var(--ink); }
footer.site { background: var(--ink); color: #d9d4e6; padding: 56px 0 40px; font-size: 14px; }
footer.site .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
footer.site a { color: #fff; text-decoration: none; display: block; margin: 0 0 10px; font-weight: 600; }
footer.site a:hover { color: var(--sun); }
footer.site .brand { display: flex; color: #fff; margin-bottom: 16px; }
footer.site .brand-mark path[fill="none"] { stroke: #fff; }
footer.site .brand small { color: #b8b0cc; }
footer.site .fine { color: #b8b0cc; line-height: 1.6; }
@media (max-width: 820px) { footer.site .wrap { grid-template-columns: 1fr; } }
