/* Home page — peak_checklist's component vocabulary (stat card, chip, pill, sticky
   control bar) arranged for browsing rather than lookup.

   Everything is scoped under `.hp` because this stylesheet loads on every page and
   names like .card / .stats / .controls would otherwise collide with Material.
   Tokens come from tokens.css. */

/* ── unconstrain Material's content column for this page only ─────────────── */
.md-main__inner:has(.hp) { margin-top: 0; max-width: none; }
.md-content:has(.hp) { max-width: none; }
.md-content__inner:has(.hp) { margin: 0; padding: 0; }
.md-content__inner:has(.hp)::before { display: none; }

.hp { font-size: 15px; line-height: 1.45; }
.hp *, .hp *::before, .hp *::after { box-sizing: border-box; }
.hp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }

/* ── climber switcher ─────────────────────────────────────────────────────── */
.hp-switch-bar { border-bottom: 1px solid var(--line); background: var(--card); }
.hp .who-switch {
  display: inline-flex; gap: 3px; margin: 9px 0; background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px;
}
.hp .who {
  font-size: 12px; padding: 4px 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.hp .who:hover { color: var(--fg); }
.hp .who[aria-current="page"] { background: var(--accent); color: #fff; font-weight: 550; }

/* ── masthead (renders the page's own markdown: H1 + deck) ────────────────── */
.hp-mast { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px;
           padding: 22px 18px 16px; }
.hp-mast .hp-intro { flex: 1 1 380px; }
.hp-mast h1 { margin: 0 0 5px; font-size: 25px; font-weight: 660; letter-spacing: -0.02em; }
.hp-mast p { margin: 0; color: var(--muted); font-size: 14px; max-width: 62ch; }
.hp-mast a { color: var(--accent); }

.hp .tallies { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.hp .tally { background: var(--accent-soft); border-radius: 6px; padding: 7px 12px;
             font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.hp .tally b { color: var(--fg); font-size: 15px; font-variant-numeric: tabular-nums;
               display: block; line-height: 1.15; }
.hp .tally.done { background: var(--climbed-soft); }
.hp .tally.done b { color: var(--climbed); }
.hp .tally.pending { background: transparent; border: 1px dashed var(--pending); }

/* ── map ──────────────────────────────────────────────────────────────────── */
.hp .hero { border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
            background: var(--card); box-shadow: var(--shadow); }
.hp .hero #peak-map { height: min(64vh, 640px); width: 100%; border: 0;
                      border-radius: 0; background: var(--bg); }
.hp .hero-cap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
                padding: 9px 18px 2px; font-size: 12px; color: var(--muted);
                max-width: 1180px; margin: 0 auto; }
.hp .hero-cap .key { display: inline-flex; align-items: center; gap: 5px; }
.hp .hero-cap a { color: var(--accent); text-decoration: none; margin-left: auto;
                  font-weight: 550; }

/* ── controls ─────────────────────────────────────────────────────────────── */
.hp .controls { background: var(--card); border-top: 1px solid var(--line);
                border-bottom: 1px solid var(--line); position: sticky;
                top: var(--hp-header-h, 48px); z-index: 3; margin-top: 14px; }
.hp .ctl-in { padding: 10px 18px 12px; display: flex; flex-direction: column; gap: 9px;
              max-width: 1180px; margin: 0 auto; }
.hp .row1 { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hp input[type="search"], .hp select, .hp #hp-filters-toggle {
  font: inherit; font-size: 13px; padding: 7px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
.hp input[type="search"] { flex: 1; min-width: 190px; }
.hp #hp-filters-toggle { display: none; align-items: center; gap: 6px; cursor: pointer;
                         white-space: nowrap; }
.hp #hp-filters-toggle .n { background: var(--accent); color: #fff; border-radius: 999px;
                            padding: 0 6px; font-size: 11px;
                            font-variant-numeric: tabular-nums; }
.hp #hp-filters-toggle .n:empty { display: none; }

.hp .facets { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.hp .facet { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hp .facet > span.lbl { font-size: 10.5px; font-weight: 650; color: var(--muted);
                        text-transform: uppercase; letter-spacing: 0.05em; margin-right: 2px; }
.hp .chip { font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
            cursor: pointer; background: var(--card); border: 1px solid var(--line);
            color: var(--fg); display: inline-flex; align-items: center; gap: 5px; }
.hp .chip:hover { border-color: var(--accent); }
.hp .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent);
                                 color: #fff; }
.hp .chip .n { font-size: 10.5px; opacity: 0.62; font-variant-numeric: tabular-nums; }
.hp .chip[aria-pressed="true"] .n { opacity: 0.8; }
.hp .chip.done[aria-pressed="true"] { background: var(--climbed); border-color: var(--climbed); }
.hp .chip[disabled] { opacity: 0.38; cursor: default; }
.hp .meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px;
            color: var(--muted); }
.hp .linkish { background: none; border: 0; color: var(--accent); cursor: pointer;
               font: inherit; font-size: 12.5px; padding: 2px 4px; border-radius: 4px; }
.hp .linkish[hidden] { display: none; }
.hp :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── cards ────────────────────────────────────────────────────────────────── */
.hp .listing { padding: 16px 18px 20px; max-width: 1180px; margin: 0 auto; }
.hp .grid { display: grid; gap: 10px;
            grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.hp .card { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
            padding: 12px 13px; box-shadow: var(--shadow); text-decoration: none;
            color: inherit; display: flex; flex-direction: column; gap: 9px; }
.hp .card:hover { border-color: var(--accent); }
.hp .card-top { display: flex; justify-content: space-between; gap: 8px;
                align-items: flex-start; }
.hp .name { font-weight: 600; font-size: 14.5px; line-height: 1.25; text-wrap: balance; }
.hp .where { color: var(--muted); font-size: 12px; margin-top: 3px; }
.hp .pill { font-size: 10.5px; font-weight: 650; padding: 2px 7px; border-radius: 999px;
            white-space: nowrap; background: var(--accent-soft); color: var(--accent); }
.hp .stats { display: flex; gap: 12px; flex-wrap: wrap;
             font-variant-numeric: tabular-nums; }
.hp .stat { display: flex; flex-direction: column; gap: 1px; }
.hp .stat .v { font-size: 13.5px; font-weight: 600; }
.hp .stat .k { font-size: 9.5px; color: var(--muted); text-transform: uppercase;
               letter-spacing: 0.05em; }
.hp .bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.hp .bar i { display: block; height: 100%; background: var(--accent); opacity: 0.55; }
.hp .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px;
            font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line);
            padding-top: 8px; }
.hp .foot .done { font-weight: 650; color: var(--climbed); }
.hp .empty { padding: 44px 8px; text-align: center; color: var(--muted); }

/* ── footer ───────────────────────────────────────────────────────────────── */
.hp .hp-foot { border-top: 1px solid var(--line); margin-top: 26px;
               padding: 20px 18px 50px; font-size: 12.5px; color: var(--muted);
               max-width: 1180px; margin-inline: auto; }
.hp .hp-foot a { color: var(--accent); text-decoration: none; }
.hp .hp-foot h4 { margin: 0 0 7px; font-size: 10.5px; text-transform: uppercase;
                  letter-spacing: 0.06em; color: var(--muted); font-weight: 650; }
.hp .foot-cols { display: grid; gap: 22px;
                 grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hp .foot-cols ol { margin: 0; padding-left: 18px; line-height: 1.7; }
.hp .foot-cols ul { margin: 0; padding: 0; list-style: none; line-height: 1.9; }

/* ── mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .hp-wrap, .hp .ctl-in, .hp .listing, .hp .hero-cap, .hp .hp-foot { padding-inline: 14px; }
  .hp-mast { padding: 16px 14px 12px; gap: 12px; }
  .hp-mast h1 { font-size: 21px; }
  .hp-mast p { font-size: 13.5px; }
  .hp .tallies { margin-left: 0; width: 100%; display: grid;
                 grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .hp .tally { padding: 8px 10px; }
  .hp .hero #peak-map { height: min(58vh, 440px); }
  .hp .hero-cap { font-size: 11.5px; gap: 6px 12px; }
  .hp .hero-cap a { margin-left: 0; width: 100%; }
  .hp #hp-filters-toggle { display: inline-flex; }
  .hp .facets { display: none; }
  .hp.filters-open .facets { display: flex; }
  .hp select { max-width: 44vw; }
}
@media (max-width: 640px) {
  .hp .grid { grid-template-columns: 1fr; }
  .hp .who-switch { display: flex; width: 100%; justify-content: center; }
  .hp .foot-cols { gap: 16px; }
}
