/* TG health.css: Health page only. Rules the live TownTapestry Health page uses (tools/css_audit.py on its
   Oct 8 render), minus those already in core.css/town.css. Rewrite section by section as the page is reviewed. */
.he-b{color:var(--good)}
.he-w{color:var(--bad)}
.he-s{color:var(--muted)}
b.he-b, b.he-w, b.he-s{font-weight:600}
.he-kpis .kpi .s b.he-b{color:var(--good)}
.he-kpis .kpi .s b.he-w{color:var(--bad)}
.he-kpis .kpi .s b.he-s{color:var(--muted)}
.he-hero h1 em{font-style:normal;color:var(--accent-ink)}
.he-hero .hb-in > p{color:var(--ink-2);margin:14px 0 0;font-size:16px;max-width:640px}
.he-hero .hb-in > p.he-src{margin-top:8px}
.he-kpis{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.he-kpis .kpi{display:block;transition:border-color .15s}
.he-kpis .kpi:hover{border-color:#c9ced7}
.he-kpis .kpi .s{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.he-subs{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin-bottom:18px}
.he-sub{display:flex;gap:10px;align-items:center;padding:10px;border-radius:10px;background:var(--surface)}
.he-sub span{display:flex;flex-direction:column;min-width:0}
.he-sub b{font-size:13.5px}
.he-sub small{font-size:12px;color:var(--muted)}
.he-say{font-size:13.5px;color:var(--ink-2);margin:-4px 0 14px}
.he-cond{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:24px;align-items:start}
.he-say2{font-size:17px;font-weight:600;letter-spacing:-.01em;line-height:1.35}
.he-say2 b{font-size:34px;letter-spacing:-.03em;margin-right:4px;vertical-align:-3px}
.he-say2 b.he-s{color:var(--ink)}
.he-grid{display:grid;grid-template-columns:repeat(20,1fr);gap:4px 3px}
.hp{width:100%;aspect-ratio:10/16;height:auto;fill:#dfe3e8;display:block}
.hp.on.b{fill:var(--good)}
.hp.on.w{fill:var(--bad)}
.hp.on.s{fill:#6b7484}
.hp.on.v{fill:#6b57c9}
.he-cmp{font-size:13px;color:var(--muted)}
.he-bars{display:flex;flex-direction:column;gap:2px}
.he-bar .t u{position:absolute;top:-3px;width:2px;height:16px;background:var(--ink);text-decoration:none}

.he-db{display:flex;flex-direction:column;gap:6px}
.he-dbr{display:grid;grid-template-columns:170px minmax(0,1fr) 84px;gap:14px;align-items:center;min-height:38px}
.he-dbr .nm{font-size:14px;font-weight:600}
.he-dbr .trk{position:relative;height:14px;background:linear-gradient(var(--line),var(--line)) center/100% 2px no-repeat}
.he-dbr .ln{position:absolute;top:5px;height:4px;border-radius:2px;opacity:.45}
.he-dbr .ln.b{background:var(--good)}
.he-dbr .ln.w{background:var(--bad)}
.he-dbr .ln.s{background:#9aa3b1}
.he-dbr .sv{position:absolute;top:0;width:14px;height:14px;margin-left:-7px;border-radius:50%;border:2.5px solid var(--ink);background:#fff}
.he-dbr .dot{position:absolute;top:-1px;width:16px;height:16px;margin-left:-8px;border-radius:50%;box-shadow:0 0 0 3px #fff}
.he-dbr .dot.b{background:var(--good)}
.he-dbr .dot.w{background:var(--bad)}
.he-dbr .dot.s{background:#9aa3b1}
.he-dbr .out{display:flex;flex-direction:column;text-align:right;line-height:1.2}
.he-dbr .out b{font-size:16px}
.he-dbr .out small{font-size:12px;color:var(--muted)}
.he-dbs{display:grid;grid-template-columns:170px minmax(0,1fr) 84px;gap:14px;margin-top:2px}
.he-dbs > span:nth-child(2){display:flex;justify-content:space-between;font-size:11.5px;color:var(--faint)}
.he-dbs em{font-style:normal;width:0;display:flex;justify-content:center}
.he-ring{display:inline-block;width:10px;height:10px;border-radius:50%;border:2px solid var(--ink);margin-right:5px;vertical-align:-1px;box-sizing:border-box}
.he-db .legend i.he-ring{background:#fff}
.he-move{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:20px;align-items:center;margin-top:16px;padding:18px;border-radius:var(--r-lg);background:linear-gradient(160deg,var(--accent-tint),#fff 75%);border:1px solid var(--line)}
.he-move.one{grid-template-columns:1fr}
.he-movemap{display:block;border-radius:var(--r);overflow:hidden;border:1px solid var(--line);background:#fff}
.he-movemap img{width:100%;height:auto}
.he-move h3{font-size:19px;letter-spacing:-.02em;margin:6px 0 12px}
.he-places{display:flex;flex-direction:column;gap:6px}
.he-places a{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 10px;border-radius:10px;background:#fff;border:1px solid var(--line)}
.he-places a:hover{border-color:var(--accent)}
.he-places .n{width:24px;height:24px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:700}
.he-places b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.he-places small{font-size:12.5px;color:var(--muted);white-space:nowrap}
.he-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.he-quick{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-bottom:16px}
.he-q{display:flex;flex-direction:column;gap:3px;padding:16px;border-radius:14px;border:1px solid var(--line);background:#fff}
.he-q.er{background:#fff5f3;border-color:#f6dcd6}
.he-q.top{background:#fffaf0;border-color:#f3e6c6}
.he-q.low{background:var(--accent-tint);border-color:transparent}
.he-q .ql{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.he-q .ql i{font-style:normal;width:22px;height:22px;border-radius:6px;display:grid;place-items:center;color:#fff;font-size:12px;font-weight:800}
.he-q.er .ql i{background:#c0492f}
.he-q.top .ql i{background:#b7791f}
.he-q.low .ql i{background:var(--accent)}
.he-q b{font-size:15.5px;margin-top:6px;line-height:1.3}
.he-q small{font-size:13px;color:var(--muted)}
.he-q .link{font-size:13.5px;margin-top:6px}
.he-cbar{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;align-items:center}
.he-filt{display:flex;flex-wrap:wrap;gap:6px}
.he-filt button{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:#fff;font-size:13px;font-weight:600;color:var(--ink-2)}
.he-filt button em{font-style:normal;font-size:11.5px;color:var(--faint)}
.he-filt button.on{background:var(--ink);border-color:var(--ink);color:#fff}
.he-filt button.on em{color:#c9ced7}
.he-filt button:disabled{opacity:.45;cursor:default}
.he-tools{display:flex;gap:8px}
.he-search{display:flex;align-items:center;gap:6px;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:10px;color:var(--faint)}
.he-search input{border:0;outline:none;font:inherit;font-size:13.5px;width:140px;color:var(--ink);background:none}
.he-tools select{height:34px;border:1px solid var(--line);border-radius:10px;font:inherit;font-size:13.5px;padding:0 8px;background:#fff;color:var(--ink)}
.he-count{font-size:12.5px;color:var(--muted);margin:12px 0 8px;min-height:18px}
.he-grid2{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px}
.he-cf.js .he-fac.cut, .he-cf.js .he-fac.off{display:none}

.he-fac .fi{flex:none;width:32px;height:32px;border-radius:9px;display:grid;place-items:center;color:#fff;font-weight:800;font-size:15px}
.he-fac.h .fi{background:#c0492f}
.he-fac.c .fi{background:var(--accent)}

.he-fac .dist{position:absolute;right:0;top:0;font-weight:700;font-size:15px}
.he-fac .dist small{font-weight:500;color:var(--muted);font-size:12px}
.he-q .hl-stars, .he-fac .hl-stars{color:#d29a1e;letter-spacing:1px}
.he-q .hl-stars em, .he-fac .hl-stars em{font-style:normal;color:#dfe3e8}
.he-fac .tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.he-fac .tags span{font-size:11.5px;font-weight:600;padding:2px 7px;border-radius:5px;background:var(--surface);color:var(--muted)}
.he-fac .tags .er{background:#fdeae6;color:#a33a22}
.he-fac .tags .in{background:var(--accent-tint);color:var(--accent-ink)}
.he-fac .acts{display:flex;flex-wrap:wrap;gap:12px;margin-top:10px;font-size:13px;font-weight:600}
.he-fac .acts a, .he-fac .acts button{color:var(--accent-ink);border:0;background:none;padding:0;font-size:13px;font-weight:600}
.he-fac .acts a:hover, .he-fac .acts button:hover{text-decoration:underline}
.he-more{margin-top:12px;width:100%}
.he-hpsa{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin-top:16px}
.he-hpsa > div{display:flex;flex-direction:column;gap:3px;padding:14px;border-radius:var(--r);font-size:13.5px}
.he-hpsa .ok{background:var(--surface);color:var(--muted)}
.he-hpsa .ok b{color:var(--good)}
.he-hpsa .short{background:#fff5f0;border:1px solid #f5ddd0;color:var(--ink-2)}
.he-hpsa .short b{color:#b4441f}
.he-hpsa small{font-size:12px;color:var(--muted)}
.he-rings{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}
.he-ringc{display:flex;flex-direction:column;align-items:center;text-align:center;padding:14px 10px;border:1px solid var(--line);border-radius:14px}
.he-ringc svg{width:96px;height:96px}
.he-ringc circle{fill:none;stroke-width:10}
.he-ringc .bg{stroke:#eef0f3}
.he-ringc .fg{stroke-linecap:round}
.he-ringc .fg.b{stroke:var(--good)}
.he-ringc .fg.w{stroke:var(--bad)}
.he-ringc .fg.s{stroke:#9aa3b1}
.he-ringc .tk{stroke:var(--ink);stroke-width:2.5}
.he-ringc text{font:700 19px var(--sans);fill:var(--ink)}
.he-ringc b{font-size:13.5px;margin-top:6px;line-height:1.25}
.he-ringc small{font-size:12px;color:var(--muted)}
.he-insure{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:20px;align-items:center;margin-top:14px}
.he-insure .n, .he-one .n, .he-needs .n, .he-dis .n{font-size:30px;font-weight:700;letter-spacing:-.03em;line-height:1.1}
.he-people{display:flex;flex-wrap:wrap;gap:3px}
.he-people .hp{width:14px}
.he-insure .muted, .he-one .muted, .he-needs .muted{font-size:13px}
.he-ones{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.he-one{display:flex;flex-direction:column;gap:10px}
.he-one .r1{display:flex;flex-direction:column;gap:2px}
.he-one .w{font-size:14px;color:var(--ink-2)}
.he-conn{display:flex;gap:20px;align-items:center;justify-content:space-between;margin-top:14px;background:linear-gradient(160deg,#f7f5ff,#fff 75%);border-color:#e7e2fb}
.he-conn .kick{color:#5b47b8}
.he-conn h3{font-size:19px;letter-spacing:-.02em;margin-top:6px;line-height:1.3}
.he-conn p{margin:6px 0 0;font-size:14px}
.he-faces{display:flex;flex:none}
.he-faces .av{width:44px;height:44px;border:3px solid #fff;margin-left:-12px;font-size:16px}
.he-faces .av:first-child{margin-left:0}
.he-needs{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.he-needs .card{display:flex;flex-direction:column;gap:4px}
.he-needs .ni{width:36px;height:36px;border-radius:10px;background:#eaf3fa;color:#2f7fb5;display:grid;place-items:center;margin-bottom:6px}
.he-needs .ni svg{width:20px;height:20px;fill:currentColor}
.he-needs .w{font-size:14px;color:var(--ink-2);margin-bottom:4px}
.he-needfoot{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.he-needfoot p{margin:0}
.he-dis{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:24px;align-items:center}
.he-dis p{margin:6px 0 0;font-size:14px}
.he-hb{display:grid;grid-template-columns:170px minmax(0,1fr) 52px;gap:10px;align-items:center;min-height:30px;font-size:13.5px}
.he-hb .t{position:relative;height:10px;background:#f0f2f5;border-radius:4px}
.he-hb .t i{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:#8b7fd0}
.he-hb .t u{position:absolute;top:-3px;width:2px;height:16px;background:var(--ink);text-decoration:none}
.he-hb b{text-align:right;font-weight:600}
.he-mapwrap{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:16px;align-items:start}
.he-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12px;color:var(--muted);margin-top:8px}
.he-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:5px;vertical-align:-2px;border:1px solid rgba(15,22,35,.08)}
.he-legend .pin-k{font-style:normal;width:16px;height:16px;border-radius:50%;color:#fff;font-size:9px;font-weight:800;display:inline-grid;place-items:center;border:0;vertical-align:-3px}
.he-legend .pin-k.h{background:#c0492f}
.he-legend .pin-k.c{background:var(--accent)}
.he-side .rank{font-size:34px;font-weight:700;letter-spacing:-.03em;margin:4px 0 10px;line-height:1.1}
.he-side .rank small{display:block;font-size:12.5px;font-weight:500;color:var(--muted);letter-spacing:0}
.he-side .mini{display:flex;flex-direction:column}
.he-side .mini div{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px solid var(--hair);font-size:13.5px}
.he-side .mini div.me{font-weight:700}
.he-side .mini div.st{color:var(--muted);border-bottom:0}
.he-nbg{margin-top:16px;max-width:760px}
.he-nbg .brow{grid-template-columns:140px minmax(0,1fr) 40px;min-height:32px}
.he-nbg .brow:hover .l{color:var(--accent-ink)}
.he-nbg .brow .v{display:flex;justify-content:flex-end}
.he-all{border:1px solid var(--line);border-radius:14px;padding:4px 18px}
.he-all summary{cursor:pointer;font-weight:600;padding:12px 0}
.he-all .tbl{margin-bottom:12px}
.he-all td.he-g{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding-top:18px}
.he-how{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.he-how p{margin:6px 0 0;font-size:14px;color:var(--muted)}
@media (max-width:1100px){
  .he-mapwrap{grid-template-columns:1fr}
  .he-cond{grid-template-columns:1fr}
}
@media (max-width:900px){
  .he-move, .he-dis{grid-template-columns:1fr}
  .he-conn{flex-direction:column;align-items:flex-start}
}
@media (max-width:640px){
        .he-hero h1{font-size:30px}
  .he-kpis{grid-template-columns:1fr 1fr;gap:8px}
  .he-kpis .kpi{padding:12px}
  .he-kpis .kpi .v{font-size:22px}
      .he-dbr, .he-dbs{grid-template-columns:96px minmax(0,1fr) 62px;gap:10px}
  .he-dbr .nm{font-size:12.5px}
  .he-hb{grid-template-columns:120px minmax(0,1fr) 44px;font-size:12.5px}
  .he-insure{grid-template-columns:1fr;gap:10px}
  .he-cbar{flex-direction:column;align-items:stretch}
  .he-tools{width:100%}
  .he-search{flex:1}
  .he-search input{width:100%}
  .he-grid2{grid-template-columns:1fr}
  .he-rings{grid-template-columns:repeat(2,1fr)}
  .he-needs, .he-ones{grid-template-columns:1fr 1fr;gap:8px}
  .he-needs .card, .he-one{padding:14px}
  .he-needs .n, .he-one .n{font-size:24px}
  .he-needs .w, .he-one .w{font-size:13px}
  .he-nbg .brow{grid-template-columns:100px minmax(0,1fr) 34px}
}
@keyframes fpspin{to{transform:rotate(360deg)}}
@keyframes ngbeat{0%,100%{transform:scale(1)}12%{transform:scale(1.07)}24%{transform:scale(1)}36%{transform:scale(1.05)}}

@keyframes lnspin{to{transform:rotate(360deg)}}
@keyframes fySpin{to{transform:rotate(360deg)}}

/* From the v1 mock (10/8): the open 40-estimate table and the neighbor source column */
.hl-tbl td{font-size:14px}
.hl-tbl th.r,.hl-tbl td.r{text-align:right}
.hl-tbl th.r + th,.hl-tbl td.r + td,.hl-src{padding-left:20px}
.hl-tbl .num b{font-weight:600}
.hl-rng{display:block;white-space:nowrap;font-size:11.5px;color:var(--faint);font-weight:400;margin-top:1px}
.hl-mt td:first-child{max-width:340px}
.hl-mt td:last-child{white-space:nowrap;font-size:13px}
.hl-grp th{padding:20px 0 8px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2);text-align:left;border-bottom:1px solid var(--line)}
.hl-mt tbody:first-of-type .hl-grp th{padding-top:6px}
.hl-same{color:var(--muted);font-size:13px}
.hl-fn{margin:12px 0 0;font-size:13px;line-height:1.55;color:var(--muted);max-width:80ch}
.hl-fn b{color:var(--ink-2);font-weight:600}
.tbl td.hl-src,.tbl th.hl-src{padding-left:20px}   /* beats .tbl td padding */
@media (max-width:640px){.hl-tbl td,.hl-tbl th{font-size:13px}.hl-mt td:first-child{max-width:none}.hl-mt th:nth-child(4),.hl-mt td:nth-child(4){display:none}}
.he-sub span.badge{display:inline-flex;align-items:center;justify-content:center;flex-direction:row}   /* .he-sub span (meant for the label) also hit the badge and pushed its letter to the top */

/* Merged pages for Flint, Cahokia Heights, New York City (10/8): live rules those pages use that Exeter didn't */

.he-fac .nr{color:var(--faint)}
.hl-pending{margin:0 0 14px;padding:14px 16px;border:1px dashed var(--bar);border-radius:var(--r);font-size:14px;line-height:1.55;color:var(--ink-2);background:var(--surface)}
.hl-pending b{color:var(--ink)}
.hl-tbd{color:var(--faint);font-size:13px;font-style:italic}

/* the grade card's method link (was an inline <style> in the merged mocks, 10/8) */
.he-method{margin:14px 0 0;font-size:14px}
/* Ported from TownTapestry 10/11 (css audit: used on this page, no rule here). */
.he-age{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:24px;align-items:center;margin-top:16px;padding:18px;border-radius:14px;background:#f7f5ff;border:1px solid #e7e2fb}
.he-age .kick{color:#5b47b8}
.he-age p{margin:6px 0 0;font-size:14.5px;color:var(--ink-2)}
.he-age h4{font-size:13px;font-weight:600;margin:0 0 8px}
@media (max-width:900px){
  .he-age{grid-template-columns:1fr}
}
