/* InstantPalette - palette collections (/palettes and the theme pages), layer 5: after tools.css, nothing else loads it.
   Cards, their previews and their swatch rows. The page shell, buttons, strips and FAQ come from the shared layers. */

.pc-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 0 0 24px; }
@container tpage (min-width: 600px) { .pc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container tpage (min-width: 1000px) { .pc-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pc {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--raised); scroll-margin-top: 16px;
}
.pc:target { border-color: var(--ink-1); }
.pc-prev { display: block; position: relative; aspect-ratio: 8 / 5; background: var(--sunken); border-radius: 11px 11px 0 0; overflow: hidden; }
.pc-prev svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pc-bd { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 16px; }
.pc-n { margin: 0; font: 600 17px/1.3 var(--f-sans); }

/* Five copy buttons in a row; the codes stay readable down to a 300px card */
.pc-sw { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pc-c {
  width: 100%; min-height: 56px; padding: 0 2px 6px;
  display: flex; align-items: flex-end; justify-content: center;
  background: var(--sw); color: var(--ink); cursor: copy;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink-1) 12%, transparent);
  font: 500 12px/1 var(--f-mono); font-stretch: 75%; letter-spacing: -.04em; white-space: nowrap;
}
.pc-sw li:first-child .pc-c { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.pc-sw li:last-child .pc-c { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.pc-c:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
@media (hover: hover) and (pointer: fine) { .pc-c:hover { box-shadow: inset 0 0 0 2px var(--ink); } }

.pc-use { margin: 0; font-size: 15px; line-height: 1.5; }
.pc-meta { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.pc-meta .mono { font: 500 12px/1 var(--f-mono); color: var(--ink-1); }
.pc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.pc-acts .btn-o { min-height: 44px; }
.pc-acts .btn-o.ic { width: 44px; padding: 0; justify-content: center; }

.pc-all { margin: 16px 0 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.pc-all a { color: var(--ink-1); }

/* Hub */
.rt-list.pc-hub { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 0 24px; }
@container tpage (min-width: 560px) { .rt-list.pc-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container tpage (min-width: 880px) { .rt-list.pc-hub { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pc-hub .rt-card { padding: 0 16px 16px; gap: 8px; overflow: hidden; }
.pc-hub .pc-prev { margin: 0 -16px 8px; border-radius: 0; }
.pc-hub .rt-n { font-size: 17px; }
.pc-hub .rt-card p { margin: 0 0 auto; }
.pc-hub .strip { height: 18px; }
