/* SDA-TECH 2026 theme: the main catalog (home section and the catalogs page). */

.cats-home { padding-block: clamp(48px, 6vw, 84px); }
.cats-home-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 32px; margin-bottom: clamp(22px, 3vw, 34px); }
.cats-home-head p, .cats-lede { color: var(--ink-2); font-size: 17.5px; max-width: 62ch; }
.cats-lede { margin: 10px 0 clamp(22px, 3vw, 34px); }
.cats-home .more { margin-top: 22px; }

.cat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.cat-card { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--red); border-radius: 18px; overflow: hidden; }
.cc-cover { display: flex; align-items: center; justify-content: center; height: 260px; background: #e9ecef; padding: 14px; }
.cc-cover img { max-width: 100%; max-height: 232px; width: auto; height: auto; object-fit: contain; box-shadow: 0 14px 30px -18px rgba(15, 23, 32, .55); border-radius: 4px; }
.cc-body { display: grid; gap: 8px; align-content: start; padding: 16px 18px 18px; }
.cc-body h2, .cc-body h3 { font-size: 20px; font-weight: 800; line-height: 1.25; }
.cc-body p { color: var(--ink-2); font-size: 15.5px; }
.cc-meta { font: 600 13px var(--font-data); color: var(--ink-2); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* The filters catalog on the page */
.fw { padding-top: 0; }
.fw-how { margin: 10px 0 22px; padding-inline-start: 1.2em; color: var(--ink-2); display: grid; gap: 4px; max-width: 80ch; }
.fw-how a { color: var(--cobalt-deep); }
.fw-tools { position: sticky; top: 74px; z-index: 5; display: grid; gap: 12px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 14px 0; border-bottom: 1px solid var(--line); }
.fw-search { display: grid; gap: 6px; }
.fw-search label { font-weight: 700; font-size: 15px; }
.fw-search input { min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; font: 500 17px var(--font-body); background: var(--surface); color: var(--ink); width: 100%; max-width: 560px; }
.fw-search input:focus { border-color: var(--red); outline: 3px solid color-mix(in srgb, var(--red) 25%, transparent); outline-offset: 1px; }
.fw-chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fw-lbl { flex: none; font-weight: 700; font-size: 15px; margin-inline-end: 6px; }
.fw-chips button { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14.5px var(--font-body); cursor: pointer; }
.fw-chips button:hover { border-color: var(--red); }
.fw-chips button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #ffffff; }
.fw-count { margin: 14px 0 6px; font-weight: 700; color: var(--ink-2); min-height: 1.5em; }
.fw-brand { padding: 0; margin-top: 26px; }
.fw-brand > h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; padding: 10px 16px; border-radius: 12px; background: var(--red); color: #ffffff; }
.fw-group h4 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 18px 0 10px; }
.fw-group h4::before { content: ""; width: 22px; height: 6px; border-radius: 3px; background: var(--red); }
.fw-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fw-item { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.fw-im { height: 150px; background: #ffffff; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fw-im img { width: auto; height: auto; max-width: 100%; max-height: 150px; object-fit: contain; }
.fw-code { font: 700 18px var(--font-data); color: var(--red); margin-top: 6px; }
.fw-type { font-weight: 700; }
.fw-item dl { margin: 2px 0 8px; display: grid; gap: 2px; font-size: 14.5px; }
.fw-item dl div { display: flex; flex-wrap: wrap; gap: 0 6px; }
.fw-item dt { color: var(--ink-2); }
.fw-item dt::after { content: ":"; }
.fw-item dd { margin: 0; font-weight: 600; }
.fw-item .btn { justify-self: start; }
.fw-empty { margin: 22px 0; font-weight: 700; }
.fw-empty a, .fw-note a { color: var(--cobalt-deep); }
.fw-note { margin-top: 28px; font-size: 13.5px; color: var(--ink-2); max-width: 90ch; }
:root[data-mode="night"] .cc-cover { background: #1c2733; }
:root[data-mode="night"] .fw-how a, :root[data-mode="night"] .fw-empty a { color: var(--ice); }

@media (max-width: 1120px) {
  .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fw-tools { top: 64px; }
}
@media (max-width: 780px) {
  .cat-cards { grid-template-columns: 1fr; }
  .cc-cover { height: 220px; }
  .cc-cover img { max-height: 192px; }
  .fw-tools { position: static; }
  .fw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fw-item { padding: 8px; }
  .fw-im { height: 110px; }
  .fw-im img { max-height: 110px; }
  .fw-code { font-size: 16px; }
  .fw-item dl { font-size: 13.5px; }
  .fw-lbl { width: 100%; }
}

/* The search over all catalogs */
.cs { padding-top: 0; }
.cs-lede { color: var(--ink-2); margin: 10px 0 4px; max-width: 80ch; }
.fw-chips .n { font: 500 12.5px var(--font-data); opacity: .8; }
.cs-src { padding: 0; margin-top: 28px; }
.cs-src-h { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; padding: 10px 16px; border-radius: 12px; background: var(--red); color: #ffffff; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cs-src-h small { font-size: 14px; font-weight: 600; opacity: .9; }
.cs-grid { margin-top: 14px; }
.cs-acc { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cs-tag { font-size: 13px; font-weight: 700; color: var(--red); }
.cs-title { font-size: 16.5px; line-height: 1.35; }
.cs-title a { color: inherit; text-decoration: none; }
.cs-title a:hover { text-decoration: underline; }
.cs-models, .cs-note { font-size: 13.5px; color: var(--ink-2); }
.cs-models span { font-weight: 700; color: var(--ink); }
.cs-note { text-align: left; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-self: end; }
.cs-page { background: #eef0f2; }
.cs-table { border-top: 1px solid var(--line); padding-top: 6px; }
.cs-table summary { cursor: pointer; font-weight: 700; font-size: 14.5px; min-height: 36px; display: flex; align-items: center; color: var(--cobalt-deep); }
:root[data-mode="night"] .cs-table summary { color: var(--ice); }
.cs-scroll { overflow-x: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; }
.cs-scroll table { border-collapse: collapse; width: 100%; font: 500 12.5px var(--font-data); }
.cs-scroll th { background: var(--red); color: #ffffff; padding: 5px 7px; text-align: left; white-space: nowrap; font-weight: 600; }
.cs-scroll td { padding: 4px 7px; border-top: 1px solid var(--line); white-space: nowrap; }
.cs-scroll td.pn { font-weight: 700; color: var(--red); }
.cs-scroll tr.is-hit td { background: color-mix(in srgb, var(--yellow) 45%, transparent); }
@media (max-width: 780px) {
  .cs-acc { grid-template-columns: 1fr; }
}
