/* ==========================================================================
   Resources hub only (/resources/). Loaded after resources.css. Every rule is scoped to .res-hub.
   The topic legend in the hero: one tile per group on the page, each a jump link to that group.
   Default CSS = the final, visible state; the one-shot reveal lives only in the no-preference block.
   ========================================================================== */

.res-hub .res-hub-legend { margin-top: clamp(30px, 5vh, 46px); }
.res-hub .res-hub-legend-l { max-width: none; margin-bottom: 12px; font: 500 max(.66rem, 11px)/1.3 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-t); }
.res-hub .res-hub-legend ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.res-hub .res-hub-legend a { position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 6px 14px; align-items: start; height: 100%;
  padding: 18px 18px 16px; border: 1px solid var(--line2); background: rgba(15, 18, 23, .72); color: var(--text); text-decoration: none;
  transition: border-color .3s, background .3s, box-shadow .3s; }
.res-hub .res-hub-legend a::before { content: ''; position: absolute; left: -1px; top: -1px; width: 56px; height: 1px; background: var(--teal); box-shadow: 0 0 10px var(--teal); transform-origin: left; transition: width .4s var(--ease); }
.res-hub .res-hub-legend a:hover { border-color: color-mix(in srgb, var(--teal) 55%, transparent); background: rgba(16, 35, 42, .72); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.res-hub .res-hub-legend a:hover::before { width: calc(100% + 2px); }
.res-hub .res-hub-legend a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.res-hub .lg-n { grid-row: 1 / 3; padding-top: 4px; font: 500 max(.7rem, 11px)/1 var(--mono); letter-spacing: .2em; color: var(--accent-t); }
.res-hub .lg-t { font: 400 clamp(1.15rem, 1rem + .5vw, 1.4rem)/1.2 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.res-hub .lg-c { grid-column: 2; font: 500 max(.64rem, 11px)/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text2); }
.res-hub .lg-go { grid-column: 3; grid-row: 1 / 3; align-self: center; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 50%; color: var(--accent-t); transition: transform .3s var(--ease), border-color .3s, background .3s; }
.res-hub .lg-go svg { width: 16px; height: 16px; }
.res-hub .res-hub-legend a:hover .lg-go { transform: translateY(3px); border-color: var(--teal); background: rgba(25, 230, 207, .12); }
@media (max-width: 899px) { .res-hub .res-hub-legend ol { grid-template-columns: 1fr; } }

/* the jump lands below the fixed header */
.res-hub .res-showing { scroll-margin-top: 84px; }

@media (prefers-reduced-motion: no-preference) {
  html:has(body.res-hub) { scroll-behavior: smooth; }
  html.ready .res-hub .res-hub-legend:not(.in) li { opacity: .3; transform: translateY(10px); }
  .res-hub .res-hub-legend li { transition: opacity .55s var(--ease) calc(var(--k) * .14s + .2s), transform .55s var(--ease) calc(var(--k) * .14s + .2s); }
}

@media print { .res-hub .res-hub-legend { display: none !important; } }
