/* resources.css : Resources alone (S31; DESIGN.md sec. 6). Tokens only. */

/* 1. Groups: flex rows that grow, so no hole */
.res-list .res-group + .res-group, .res-list .share--foot { margin-top: var(--sp-8); }
.res-group > .section-head + .res-grid { margin-top: var(--sp-5); }
.res-grid { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.res-grid > li { flex: 1 1 100%; min-width: 0; }
@media (min-width: 40rem) { .res-grid > li { flex-basis: calc(50% - var(--sp-4)); } }
@media (min-width: 48rem) { .res-grid { gap: var(--sp-5); } .res-grid > li { flex-basis: calc(50% - var(--sp-5)); } }
@media (min-width: 64rem) { .res-grid > li { flex-basis: calc(33.34% - var(--sp-5)); } .res-grid--2 > li { flex-basis: calc(50% - var(--sp-5)); } }
.res-grid--1 > li { flex-basis: 100%; }
@media (min-width: 48rem) { .res-list .container { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-5); } .res-list .container > * { grid-column: 1 / -1; } .res-list #blog, .res-list #stories { grid-column: auto; grid-row: span 2; display: grid; grid-template-rows: subgrid; } .res-grid--1 > li { align-content: start; } }

/* 2. Cards */
.res__by, .res__credit { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.res h3 a { display: inline-block; padding-block: var(--sp-3); margin-block: calc(-1 * var(--sp-3)); color: var(--link); }
.tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.res--case { container-type: inline-size; }
.res__in, .res__main { display: grid; gap: var(--sp-3); align-content: start; }
.res__quote { padding-left: var(--sp-4); border-left: 0.25rem solid var(--deco-mark-a); }
.res__quote blockquote p { color: var(--heading); font-size: var(--fs-h4); line-height: var(--lh-snug); }
.res__quote figcaption { margin-top: var(--sp-2); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
@container (min-width: 46rem) { .res__in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--sp-6); align-items: stretch; } }
.res .res__text { max-width: var(--measure); text-wrap: pretty; }
.res-note { max-width: var(--measure); margin-bottom: var(--sp-5); }

/* 2b. Videos (S34, DEC-164 (6)): our own 16:9 panel, a link until resources.js makes it a button; nothing from the provider before a press */
.res-grid--video > li { flex-basis: 100%; }
@media (min-width: 48rem) { .res-grid--video > li { flex-basis: calc(50% - var(--sp-5)); } }
.res__play, .res__frame { width: 100%; aspect-ratio: 16 / 9; margin-top: auto; border-radius: var(--radius); }
.res__play { position: relative; display: grid; place-content: center; justify-items: center; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--line); background: var(--tint); color: var(--heading); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.res__play .icon { position: absolute; top: var(--sp-3); left: var(--sp-3); }
.res__mark { width: 4rem; height: 4rem; border-radius: 50%; background: var(--accent); }
.res__mark::after { content: ""; display: block; height: 100%; background: var(--on-accent); clip-path: polygon(40% 29%, 40% 71%, 73% 50%); }
.res__frame { display: block; height: auto; border: 0; }
@media (hover: hover) { .res__play:hover .res__mark { background: var(--accent-hover); } .res__play:hover .res__go { text-decoration: underline; } }

/* 3. Search box and chips */
.res-tools { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-7); padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--tint); }
.res-tools__search { max-width: 30rem; }
.chips { margin: 0; padding: 0; border: 0; }
.chips legend { margin-bottom: var(--sp-2); padding: 0; color: var(--heading); font-weight: 600; }
.chips label { position: relative; display: inline-flex; margin: 0 var(--sp-2) var(--sp-2) 0; }
.chips label input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 1.375rem; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.chips label span { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 var(--sp-3); border: 2px solid var(--ui-border); border-radius: 1.375rem; background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 500; }
.chips label input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.res-tools__count { color: var(--muted); font-size: var(--fs-sm); }
@media (hover: hover) { .chips label input:not(:checked):hover + span { border-color: var(--link-hover); color: var(--link-hover); } }

@media (forced-colors: active) {
  .chips label span { border-color: CanvasText; }
  .chips label input:checked + span { forced-color-adjust: none; border-color: Highlight; background: Highlight; color: HighlightText; }
  .res__quote { border-left-color: CanvasText; }
  .res__play { border-color: CanvasText; }
  .res__mark, .res__mark::after { forced-color-adjust: none; background: CanvasText; }
  .res__mark::after { background: Canvas; }
}
@media print {
  .res-tools, .res__play, .res__frame { display: none !important; }
  .res[hidden], .res-group[hidden] { display: block !important; }
  .res__quote { border-left-color: var(--rh-black); }
  .res__credit::after { content: " (" attr(data-href) ")"; font-size: 9pt; overflow-wrap: anywhere; }
}
