/* The category page, and the cards and chips the search page shares with it: the rail of categories, the title, the order and grade chips, and the
   listings as wide pack cards. It uses the tokens of style.css. The four below are the colours of a grade's words, for the pills of the grade filter. */
:root {
  --i3: light-dark(#166534, #86efac);
  --i25: light-dark(#854d0e, #fde047);
  --i2: light-dark(#9a3412, #fdba74);
  --iq: light-dark(#4b5563, #d1d5db);
}

.lay { display: flex; flex-wrap: wrap; align-items: stretch; align-content: flex-start; min-height: 60vh; }
.rail { flex: 1 1 230px; max-width: 100%; background: var(--side); border-right: 1px solid var(--line); padding: 22px 12px 32px; }
.rail h2 { margin: 0 8px 12px; font-size: 15px; color: var(--dim); }
.rl { display: flex; flex-direction: column; gap: 2px; }
.ri { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; font-size: 13.5px; min-height: 36px; }
.ri .ic { color: var(--dim); }
.ri:hover { background: var(--hover); }
.ri.cur { background: var(--raised); border-color: var(--line); font-weight: 600; }
.ri.cur .ic { color: var(--accT); }
.ri b { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--bg0); border: 1px solid var(--line); color: var(--dim); font: 600 11.5px/18px var(--font); text-align: center; }
.lmain { flex: 999 1 560px; min-width: 0; padding: 28px var(--gutter) 56px; }

.head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.ptitle { margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: 0.03em; }
.bdg { padding: 1px 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); color: var(--dim); font: 600 12.5px/20px var(--font); }
.intro { margin: 10px 0 20px; max-width: 68ch; color: var(--dim); font-size: 15px; }
.ctl { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 12px 14px; margin: 0 0 8px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.grp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gl { font-size: 12.5px; color: var(--dim); margin-right: 2px; }
.cb { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg0); color: var(--text); font-size: 13px; font-weight: 500; min-height: 34px; }
.cb:hover { border-color: var(--acc); background: var(--hover); }
.cb .ic { display: none; }
.cb[aria-checked='true'], .cb[aria-pressed='true'] { border-color: var(--acc); background: var(--hover); box-shadow: 0 0 12px var(--glow); font-weight: 700; }
.cb[aria-checked='true'] .ic, .cb[aria-pressed='true'] .ic { display: block; color: var(--accT); }
.cb[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
.cb[aria-disabled='true']:hover { border-color: var(--line); background: var(--bg0); }
.quiet.note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 2px 0; }
.cnt { margin: 6px 2px 16px; color: var(--dim); font-size: 12.5px; }
.none { margin: 0 0 22px; padding: 30px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--dim); }

/* The words of a grade in the filter, as the browser's own mark names them */
.wm { --tone: #9ca3af; --ink: var(--iq); display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px 0 7px; border-radius: 999px; flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; line-height: 1; white-space: nowrap; color: var(--ink); background: color-mix(in srgb, var(--tone) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 30%, transparent); }
.wm::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 22%, transparent); }
.wm.g-web3 { --tone: #22c55e; --ink: var(--i3); }
.wm.g-web25 { --tone: #eab308; --ink: var(--i25); }
.wm.g-web2 { --tone: #f97316; --ink: var(--i2); }
.wm.g-unscored { --tone: #9ca3af; --ink: var(--iq); }

/* A listing as a card as wide as a row */
.pks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 22px; }
.pk { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); border-radius: 12px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28); }
.pk:hover, .pk:focus-within { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42), 0 0 0 1px var(--acc), 0 0 26px var(--glow); }
.pk .art { height: auto; min-height: 210px; border-radius: 0; }
.pk .mk { top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%); width: 92px; height: 92px; border-radius: 22px; }
.pk .ltr { font-size: 52px; }
.pk .tag { top: 12px; left: 12px; }
.pkb { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; min-width: 0; }
.pkb h3 { margin: 0; font-size: 24px; line-height: 1.1; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.pkb h3 a:hover { color: var(--accT); }
.pline2 { margin: 0; color: var(--dim); font-size: 13.5px; }
.mh { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--dim); }
.mem { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mem li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 8px; background: var(--bg0); border: 1px solid var(--line); font-size: 12.5px; }
.pk .pg { stroke: var(--accT); }
.pk .join { background: var(--dim); }
.pk .pm.pictured { background: #fff; border: 1px solid var(--line); }

@media (max-width: 900px) {
  .rail { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px var(--gutter); }
  .rail h2 { display: none; }
  .rl { flex-direction: row; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 0; }
  .rl::-webkit-scrollbar { display: none; }
  .ri { flex: none; scroll-snap-align: start; border-color: var(--line); border-radius: 999px; background: var(--panel); }
  .lmain { flex-basis: 100%; }
}
@media (max-width: 520px) {
  .pk { grid-template-columns: minmax(0, 1fr); }
  .pk .art { min-height: 130px; }
}
