/* ============================================================================
   /team-report/<ccn>-<slug>/: one page per TEAM hospital (ops/build_team_pages.py).
   Layout only, from ka.css tokens. No new colors. Sizes in rem (DESIGN.md, The scale).
   ========================================================================== */

/* ---------- hero ---------- */
.th-hero.hero.page{padding-bottom:2.25rem}
.th-hero h1{max-width:24ch;margin-bottom:.75rem}
.th-id{font-size:var(--fs-ui);color:var(--mut);margin-bottom:1.25rem}
.th-hero.hero.page .sub{max-width:60ch}

/* ---------- the numbers ---------- */
.th-lede{max-width:64ch;margin-bottom:1.5rem}
.th-table{border:1px solid var(--line);border-radius:.75rem;background:var(--surface);overflow:hidden}
table.th-tbl{font-size:var(--fs-ui)}
table.th-tbl caption{border-bottom:1px solid var(--line)}
table.th-tbl thead th{position:static;white-space:normal;vertical-align:bottom;line-height:1.35}
table.th-tbl tbody th{font:600 var(--fs-ui)/1.4 var(--sans);color:var(--ink);text-transform:none;letter-spacing:0;padding:.75rem;border-bottom:1px solid var(--line);white-space:normal}
table.th-tbl td{padding:.75rem;font-variant-numeric:tabular-nums;white-space:nowrap}
table.th-tbl tr:last-child th{border-bottom:0}
table.th-tbl .th-none td{color:var(--mut);white-space:normal}
.th-total{margin-top:1.25rem;max-width:64ch;font-size:var(--fs-lg);color:var(--ink)}
.th-note{margin-top:.75rem;max-width:64ch;font-size:var(--fs-sm);color:var(--mut)}
#numbers .datafig-src{margin-top:1rem}
.th-links{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1.5rem;margin-top:.75rem}

/* a phone: each surgery becomes a block of label and value rows */
@media (max-width:700px){
  table.th-tbl thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  table.th-tbl,table.th-tbl tbody,table.th-tbl tr,table.th-tbl th,table.th-tbl td{display:block;width:100%}
  table.th-tbl caption{display:block;padding:.75rem}
  table.th-tbl tr{padding:.375rem 0 .5rem;border-bottom:1px solid var(--line)}
  table.th-tbl tbody tr:last-child{border-bottom:0}
  table.th-tbl tbody th{border-bottom:0;padding:.5rem .75rem .25rem}
  table.th-tbl td{display:flex;justify-content:space-between;gap:1rem;padding:.25rem .75rem;border-bottom:0;text-align:right}
  table.th-tbl td::before{content:attr(data-label);color:var(--mut);font-size:var(--fs-sm);text-align:left;white-space:normal}
  table.th-tbl .th-none td{display:block;text-align:left;padding-top:0}
}

/* ---------- how it is counted ---------- */
.th-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,26rem),1fr));gap:1rem;margin:1.5rem 0 1rem}
.th-card{padding:1.5rem}
.th-card h3{font-size:var(--fs-xl);margin-bottom:.625rem}
.th-card p{font-size:var(--fs-ui);line-height:1.6}

/* ---------- TEAM and the report ---------- */
.th-narrow p{max-width:68ch}
.th-narrow .datafig-src{margin-top:.75rem}
.th-report{max-width:52rem}
.th-report .h2{font-size:var(--fs-2xl)}
.th-report p{margin-bottom:1.25rem;max-width:62ch}

/* ---------- /team-report/hospitals/: the hospital pages by state ----------
   one closed <details> per state (43 rows on a phone); wide screens set them in columns, and an open state's
   list runs down its own column */
.thx-how{margin:0 0 1rem;font-size:var(--fs-sm);color:var(--mut)}
.thx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,20rem),1fr));gap:0 2rem;align-items:start}
.thx-st{border-top:1px solid var(--line)}
.thx-st>summary{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;min-height:3rem;padding:.75rem .25rem;cursor:pointer;list-style:none;-webkit-tap-highlight-color:transparent}
.thx-st>summary::-webkit-details-marker{display:none}
.thx-st>summary::after{content:"+";flex:none;width:1rem;text-align:center;font:600 var(--fs-lg)/1 var(--sans);color:var(--blue2)}
.thx-st[open]>summary::after{content:"\2212"}
.thx-st>summary:hover .thx-h{color:var(--blue)}
.thx-h{flex:1 1 auto;font:600 var(--fs-lg)/1.25 var(--disp);color:var(--ink)}
.thx-n{flex:none;font-size:var(--fs-sm);color:var(--mut);font-variant-numeric:tabular-nums}
.thx-list{list-style:none;padding:0 .25rem .75rem;margin:0}
.thx-list li{padding:.4375rem 0;font-size:var(--fs-ui);line-height:1.35}
.thx-list a{color:var(--ink);font-weight:500}
.thx-list a:hover{color:var(--blue)}
.thx-city{display:block;margin-top:.125rem;font-size:var(--fs-sm);color:var(--mut)}
