/* hubs.css — the room, edge-profile and care hubs (server/hubpages.go,
   templates/{rooms,edges,care}.html).

   Every color is a site.css token (light-dark() pairs), so both themes and the
   header's theme toggle work with no rules of their own here. No inline
   styles: the edge drawings are styled by class only. Grids use
   minmax(0,1fr) or min(100%,…) so nothing can widen the page at 360px, and
   every link in a list is at least 44px tall on a touch screen. */

/* ── shared ─────────────────────────────────────────────────────────────── */
.hub-sec .hub-list { list-style: none; padding: 0; margin: 0; }
.hub-sec .hub-list li { margin: 0; border-bottom: 1px solid var(--border); }
.hub-sec .hub-list li:last-child { border-bottom: 0; }
.hub-sec .hub-list a { display: flex; align-items: center; min-height: 44px; padding: 6px 0; }
.hub-sec .hub-list li:not(:has(a)) { padding: 10px 0; }

.hub-split { display: grid; gap: 10px 46px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.hub-split h2, .hub-split h3 { margin: 0 0 6px; }

.hub-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; padding: 26px 0 8px; color: var(--fg-subtle); font-size: .95rem; }
.hub-nav a { display: inline-flex; align-items: center; min-height: 44px; }

.hub-n { font-variant-numeric: tabular-nums; color: var(--gold-hi); font-weight: 700; }
.hub-more { margin-top: 18px; }

/* ── rooms ──────────────────────────────────────────────────────────────── */
.hub-rooms .cardx { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.hub-rooms .cardx picture, .hub-rooms .cardx > img { display: block; margin: 0; }
.hub-rooms .cardx img.thumb { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; margin: 0; border-radius: 0; background: var(--surface-sunk); }
.hub-rooms .cardbody { display: block; padding: 16px 18px 20px; }
.hub-cardtitle { margin: 0 0 6px; font-size: 1.3rem; }

.hub-sec .hub-counts { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.hub-counts li { margin: 0; }
.hub-counts a { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--fg);
  transition: border-color .2s ease, transform .15s ease; }
.hub-counts a:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-2px); }
.hub-counts .hub-n { font-size: 1.6rem; line-height: 1; }

.hub-sec .hub-mats { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 46px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.hub-mats li { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); }
.hub-mats a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; color: var(--fg); }
.hub-mats a:hover strong { color: var(--gold-hi); }
.hub-mats p { margin: 2px 0 4px; font-size: .92rem; }

/* ── edge profiles ──────────────────────────────────────────────────────── */
.hub-sec .edge-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.edge-card { margin: 0; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; scroll-margin-top: 90px;
  transition: border-color .2s ease; }
.edge-card:target { border-color: var(--gold); }
.edge-fig { display: block; box-sizing: border-box; width: 100%; height: 150px; padding: 16px 20px;
  background: var(--bg-deep); border-bottom: 1px solid var(--border); }
.edge-fig .edge-o { fill: var(--tint-gold); stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.edge-fig .edge-x { fill: none; stroke: var(--gold); stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-dasharray: 2 2; opacity: .7; }
.edge-fig .edge-d { fill: none; stroke: var(--gold-hi); stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-dasharray: 3 2; }
.edge-body { padding: 16px 18px 18px; }
.edge-body h3 { margin: 0 0 6px; font-size: 1.12rem; }
.edge-tags { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.edge-tags .pill { margin: 0; }
.pill.pill-ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--fg-muted); }
.edge-body > p { font-size: .95rem; }
.edge-facts { margin: 12px 0 0; display: grid; gap: 8px; font-size: .9rem; }
.edge-facts div { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 10px; }
.edge-facts dt { color: var(--fg-subtle); font-weight: 600; }
.edge-facts dd { margin: 0; color: var(--fg-muted); min-width: 0; }

@media (prefers-reduced-motion: no-preference) {
  .edge-card:hover .edge-o { fill: var(--tint-gold-strong); }
  .edge-fig .edge-o { transition: fill .25s ease; }
}

/* ── care ───────────────────────────────────────────────────────────────── */
.care-table { min-width: 760px; }
.pg-sec .care-table th[scope="row"] { white-space: normal; min-width: 9rem; }
.pg-sec .care-table td { vertical-align: top; min-width: 11rem; }
.care-src { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin-left: 2px; font-size: .78rem; color: var(--gold); white-space: nowrap; }
.care-mat { scroll-margin-top: 90px; }
.care-mat h3 { font-size: 1rem; }

@media (max-width: 640px) {
  .hub-counts .hub-n { font-size: 1.35rem; }
  .edge-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
