/* Nursing home pages built by source/build_facilities.py. The layout comes
   from place.css (.pl); these are the CMS-only pieces: star rows, the
   benchmark table, turnover bars, flags and deficiencies. Scoped to .nh. */
.nh{--good:#1f7a3d;--good-bg:#e8f5ec;--warn:#9a4a12;--warn-bg:#fdf1e7;--bad:#a01b1b;--bad-bg:#fbe3e3;--star:#e5a400}
.nh-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.nh-stars{color:var(--star);letter-spacing:1px;font-size:1rem;line-height:1;white-space:nowrap}
.nh-stars small{color:#d7dcdf;font-size:inherit}
.nh .nh-stars{color:var(--star)}.nh .nh-stars small{color:#d7dcdf}
.nh-none{color:var(--mute);font-weight:500}
/* title pill tones */
.nh .pl-pill.nh-pill-warn{background:var(--warn-bg);border-color:#f1d3b8;color:var(--warn)}
.nh .pl-pill.nh-pill-warn i{color:var(--warn)}
.nh .pl-pill.nh-pill-bad{background:var(--bad-bg);border-color:#f0c4c4;color:var(--bad)}
.nh .pl-pill.nh-pill-bad i{color:var(--bad)}
.nh .pl-ok.nh-changed{background:#fff6dc;color:#7a5a00;margin-left:6px}
/* facts row: star cells */
.nh-facts .nh-stars{display:block;margin-bottom:10px;font-size:1.05rem}
.nh-nums .pl-fact{padding:16px 14px 14px}
.nh-nums .pl-fact span{overflow-wrap:anywhere}
.nh-nums .pl-fact b{font-size:1.45rem;letter-spacing:-.02em;line-height:1.2}
/* flags under the overview */
.nh-flags{list-style:none;margin:20px 0 0;padding:0;display:grid;gap:10px}
.nh-flags li{display:flex;gap:12px;align-items:flex-start;border-radius:12px;padding:14px 16px;background:var(--warn-bg)}
.nh-flags li.is-bad{background:var(--bad-bg)}
.nh-flags i{color:var(--warn);margin-top:3px}
.nh-flags li.is-bad i{color:var(--bad)}
.nh-flags b{display:block;color:var(--ink)}
.nh-flags span{font-size:.92rem}
/* rating rows */
.nh-rates{display:grid;grid-template-columns:1fr 1fr;column-gap:40px}
.nh-rate{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}
.nh-rate>span:first-child{flex:1;color:var(--ink)}
.nh-rate b{min-width:2.4em;text-align:right;color:var(--ink);font-weight:600}
/* benchmark table */
.nh-table{width:100%;border-collapse:collapse;font-size:.94rem}
.nh-table th,.nh-table td{text-align:left;padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
.nh-table thead th{font-size:.76rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--mute);padding-top:0}
.nh-table tbody th{font-weight:500;color:var(--ink);padding-left:0}
.nh-table td strong{color:var(--ink)}
.nh-cmp{display:inline-block;font-size:.78rem;font-weight:600;border-radius:999px;padding:2px 10px;white-space:nowrap}
.nh-cmp.is-good{background:var(--good-bg);color:var(--good)}
.nh-cmp.is-bad{background:var(--bad-bg);color:var(--bad)}
/* turnover */
.nh-turn-row{display:grid;grid-template-columns:180px minmax(0,1fr) 7em;gap:16px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}
.nh-turn-row>span:first-child{color:var(--ink)}
.nh-turn-row b{text-align:right;color:var(--ink);font-weight:600}
.nh-bar{display:block;height:8px;border-radius:99px;background:var(--soft);overflow:hidden}
.nh-bar span{display:block;height:100%;border-radius:99px}
.nh-bar .is-good{background:#2e9d5b}.nh-bar .is-avg{background:#e5a400}.nh-bar .is-bad{background:#c0392b}
/* deficiencies */
.nh-defs{list-style:none;margin:0;padding:0}
.nh-defs li{display:grid;grid-template-columns:150px minmax(0,1fr);gap:16px;padding:16px 0;border-bottom:1px solid var(--line);font-size:.95rem}
.nh-defs p{margin:0;color:var(--ink);line-height:1.5}
.nh-defs li span:not(.nh-sev){display:block;margin-top:4px;color:var(--mute);font-size:.82rem}
.nh-sev{justify-self:start;align-self:start;font-size:.76rem;font-weight:600;padding:3px 10px;border-radius:99px;white-space:nowrap}
.nh-sev.sev-ij{background:var(--bad-bg);color:var(--bad)}.nh-sev.sev-harm{background:var(--warn-bg);color:var(--warn)}
.nh-sev.sev-pot{background:#eef2f7;color:#3a5168}.nh-sev.sev-min{background:var(--good-bg);color:var(--good)}
.nh-more summary{list-style:none;cursor:pointer;display:inline-block;margin-top:18px;font-weight:600;font-size:.92rem;
  border:1px solid var(--ink);color:var(--ink);border-radius:10px;padding:10px 16px}
.nh-more summary::-webkit-details-marker{display:none}
.nh-more[open] summary{display:none}
/* about, location, alternatives */
.nh .pl-sec .pl-dl+h3{margin-top:28px}
.nh .pl-sec h3+p{margin:0}
.nh-sla{margin-top:22px}
.nh-sla i{color:var(--good)}
.nh-poi{display:flex;flex-wrap:wrap;gap:10px}
.nh-poi a{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;padding:9px 16px;
  text-decoration:none;color:var(--ink);font-size:.9rem;font-weight:500;background:#fff}
.nh-poi a:hover{border-color:var(--accent)}
.nh-poi i{color:var(--accent)}
.nh-alts{grid-template-columns:1fr 1fr;margin-bottom:4px}
.nh-morelink{margin:16px 0 0;font-weight:600}
.nh .pl-near-grid .nh-stars{font-size:.8rem;margin-right:4px}
@media(max-width:960px){
  .nh-nums.pl-facts{grid-template-columns:repeat(3,1fr)}
  .nh-nums .pl-fact:nth-child(4){border-left:0}
  .nh-nums .pl-fact:nth-child(n+4){border-top:1px solid var(--line)}
}
@media(max-width:680px){
  .nh .pl-pill{white-space:normal}
  .nh-rates{grid-template-columns:1fr}
  .nh-nums.pl-facts{grid-template-columns:1fr 1fr}
  .nh-nums .pl-fact:nth-child(4){border-left:1px solid var(--line)}
  .nh-nums .pl-fact:nth-child(odd){border-left:0}
  .nh-nums .pl-fact:nth-child(n+3){border-top:1px solid var(--line)}
  .nh-nums .pl-fact b{font-size:1.25rem}
  /* benchmark table: one block per metric */
  .nh-table thead{display:none}
  .nh-table,.nh-table tbody,.nh-table tr{display:block}
  .nh-table tr{display:grid;grid-template-columns:repeat(3,1fr);gap:4px 10px;padding:14px 0;border-bottom:1px solid var(--line)}
  .nh-table th,.nh-table td{border:0;padding:0}
  .nh-table tbody th{grid-column:1/-1;display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:4px}
  .nh-table td::before{content:attr(data-label);display:block;font-size:.74rem;color:var(--mute)}
  .nh-table td.nh-verdict{grid-column:1/-1;margin-top:4px}
  .nh-table td.nh-verdict::before{content:none}
  .nh-turn-row{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}
  .nh-turn-row .nh-bar,.nh-turn-row .nh-bar-none{grid-column:1/-1;grid-row:2}
  .nh-defs li{grid-template-columns:minmax(0,1fr);gap:8px}
  .nh-alts{grid-template-columns:1fr}
}
