/* The cancel guides hub: search, category chips and the grid of guides. Loads after base.css. */

a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.finder, .count { display: none; }
.js .finder, .js .count { display: block; }
.search { position: relative; max-width: 520px; margin: var(--s6) auto 0; }
.search svg { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search input { -webkit-appearance: none; appearance: none; width: 100%; min-height: 52px; padding: 0 52px 0 48px; border: 1px solid transparent; border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 17px; box-shadow: var(--lift); }
.search input::placeholder { color: var(--ink-2); opacity: 1; }
.search input:hover { border-color: #c9c9cf; }
.search kbd { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); min-width: 24px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 7px; font: 500 13px/1.3 var(--mono); color: var(--ink-2); text-align: center; pointer-events: none; }
.search input:focus ~ kbd, .search input:not(:placeholder-shown) ~ kbd { display: none; }
@media (hover: none), (pointer: coarse) {
  .search kbd { display: none; }
}
/* the "/" shortcut is for keyboards */
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); margin-top: var(--s4); }
.cat { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: var(--lift); }
.cat:hover { border-color: #c9c9cf; }
.cat .n { color: var(--ink-2); font-weight: 400; font-variant-numeric: tabular-nums; }
.cat[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat[aria-pressed="true"] .n { color: #c7c7cc; }
/* Guide cards: each card is one link to its guide */
.count { font-size: 14px; color: var(--ink-2); margin: 0 0 var(--s4); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.grid > li { display: flex; }
.grid > li[hidden] { display: none; }
.card { flex: 1; display: flex; flex-direction: column; background: var(--card); border: 1px solid transparent; border-radius: var(--radius); padding: var(--s5); text-decoration: none; box-shadow: 0 1px 0 rgba(0,0,0,.04); transition: box-shadow .15s ease, border-color .15s ease; }
.card:hover { border-color: var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 12px 30px rgba(0,0,0,.08); }
.card:focus-visible { outline-offset: 3px; }
.card-head { display: flex; align-items: center; gap: var(--s3); }
.card-head img { width: 40px; height: 40px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--line); }
/* the ring keeps white logos round on a white card */
.card-name { margin: 0; font-size: 19px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; }
.card-cat { font-size: 13px; color: var(--ink-2); }
.card-facts { margin: var(--s4) 0 0; font-size: 15px; line-height: 1.5; color: #3a3a3c; }
.card-facts span { display: block; }
.card-go { margin-top: auto; padding-top: var(--s5); font-size: 15px; font-weight: 500; }
.card:hover .card-go { text-decoration: underline; text-underline-offset: 3px; }
.empty { background: var(--card); border-radius: var(--radius); padding: var(--s7) var(--s5); text-align: center; }
.empty[hidden] { display: none; }
.empty p { margin: 0 auto var(--s5); max-width: 46ch; font-size: 17px; }
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .final { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .search { margin-top: var(--s5); }
  .cat { min-height: 44px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
}
