/* CRASA thematic areas (30 October 2026): the scrolling band on the home
 * page and the index and theme pages. Classes are prefixed th-. Colours
 * are the k- and design tokens.
 */

/* ---- Home band ---- */
.th-band { background: var(--k-pale, #F4F8F6); border-block: 1px solid #CFE3D8; padding-block: 40px; overflow: hidden; }
.th-band__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.th-band__head h2 { margin: 0; font: 600 28px/1.2 var(--k-serif); color: var(--k-deep); }
.th-band__tools { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.th-toggle {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--k-green); border-radius: var(--r-sm, 4px);
  background: var(--k-white); color: var(--k-deep); font: 600 15px var(--k-sans); cursor: pointer;
}
.th-toggle:hover { background: var(--k-tint); }
.th-toggle[hidden] { display: none; }

.th-marquee { position: relative; overflow: hidden; padding-block: 6px; }
.th-track { display: flex; width: max-content; animation: th-scroll 60s linear infinite; }
.th-list { display: flex; gap: 16px; margin: 0; padding: 0 0 0 16px; list-style: none; }
.th-list > li { display: flex; }
@keyframes th-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Paused: pointer over the row, the pause button, or a card focused. A
   focused card stops the row where it is so the focus stays in view. */
.th-marquee:hover .th-track,
.th-band.is-paused .th-track { animation-play-state: paused; }
.th-marquee:focus-within .th-track { animation: none; }

.th-card {
  display: flex; align-items: center; gap: 12px; width: 232px; min-height: 76px; padding: 12px 16px;
  background: var(--k-white); border: 1px solid var(--k-line); border-radius: 12px;
  color: var(--k-ink); text-decoration: none; box-shadow: var(--e-1);
}
a.th-card:hover { border-color: var(--k-green); color: var(--k-deep); }
a.th-card:hover .th-card__t { text-decoration: underline; text-underline-offset: 2px; }
a.th-card:focus-visible { outline: 2px solid var(--k-blue-ink); outline-offset: 2px; }
.th-card__ico {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--k-tint); color: var(--k-deep);
}
.th-card__ico .th-svg { width: 22px; height: 22px; }
.th-card__t { font: 600 15px/1.3 var(--k-sans); }

/* Still: no motion asked for, by the system or the display options. The
   copy goes and the cards wrap inside the page width. */
@media (prefers-reduced-motion: reduce) {
  .th-track { animation: none; width: auto; max-width: calc(var(--k-container) + 48px); margin: 0 auto; padding-inline: 8px; }
  .th-list { flex-wrap: wrap; padding-left: 16px; }
  .th-list--copy, .th-toggle { display: none; }
}
html.a11y-pause .th-track { animation: none; width: auto; max-width: calc(var(--k-container) + 48px); margin: 0 auto; padding-inline: 8px; }
html.a11y-pause .th-list { flex-wrap: wrap; }
html.a11y-pause .th-list--copy,
html.a11y-pause .th-toggle { display: none; }

@media (max-width: 640px) {
  .th-band { padding-block: 32px; }
  .th-band__head h2 { font-size: 24px; }
  .th-card { width: 200px; }
}

/* ---- Index and theme pages ---- */
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.th-item { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: var(--k-white); border: 1px solid var(--k-line); border-radius: 12px; }
.th-item h2 { margin: 0 0 6px; font: 600 19px/1.3 var(--k-serif); }
.th-item h2 a { color: var(--k-deep); }
.th-item p { margin: 0; color: var(--k-muted); }
.th-hero__ico { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--k-white); color: var(--k-deep); margin-bottom: 16px; }
.th-hero__ico .th-svg { width: 32px; height: 32px; }
.th-body { max-width: 68ch; }
.th-body p { margin: 0 0 1em; }
.th-related { list-style: none; margin: 0 0 16px; padding: 0; }
.th-related li + li { margin-top: 8px; }
.th-hero .u-actions { margin-top: 24px; }
