/* Explore: every subject, searchable. A dense index rather than a showcase. */

.x-hero { width: 100%; max-width: var(--max); margin-inline: auto; padding: clamp(28 * var(--z), 4vw, 56 * var(--z)) var(--gutter) 0; }
.x-tools { display: flex; flex-wrap: wrap; align-items: center; gap: calc(14 * var(--z)) calc(24 * var(--z)); margin-top: clamp(36 * var(--z), 4vw, 56 * var(--z)); }
.x-search {
  position: relative; display: flex; align-items: center;
  flex: 1 1 calc(380 * var(--z)); max-width: calc(560 * var(--z)); height: calc(60 * var(--z)); padding: 0 calc(22 * var(--z)) 0 calc(54 * var(--z));
  border-radius: calc(999 * var(--z)); background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: box-shadow 0.25s;
}
.x-search:focus-within { box-shadow: inset 0 0 0 1px var(--lavender-2), 0 0 0 calc(5 * var(--z)) rgba(164, 135, 234, 0.16); }
.x-search svg { position: absolute; left: calc(22 * var(--z)); width: calc(19 * var(--z)); color: var(--text-3); }
.x-search input { width: 100%; height: 100%; border: 0; background: none; font-size: calc(17 * var(--z)); outline: none; }
.x-search input::placeholder { color: var(--text-4); }
.x-search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
.x-filter { display: flex; flex-wrap: wrap; gap: calc(8 * var(--z)); }
.x-filter button span { margin-right: calc(8 * var(--z)); font-size: calc(12 * var(--z)); opacity: 0.6; }
.x-count { margin-top: calc(22 * var(--z)); font-size: calc(14 * var(--z)); color: var(--text-3); }

.x-results { width: 100%; max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter); }
.x-group { padding-top: clamp(72 * var(--z), 8vw, 128 * var(--z)); }
.x-group[hidden] { display: none; }
.x-group-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: calc(22 * var(--z));
  padding-bottom: calc(22 * var(--z)); border-bottom: 1px solid var(--line-2);
}
.x-group-art { width: calc(56 * var(--z)); height: calc(70 * var(--z)); border-radius: calc(8 * var(--z)); overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); background: var(--surface); }
.x-group-art img { width: 100%; height: 100%; object-fit: cover; }
.x-group-head h2 { display: flex; align-items: center; font-size: clamp(32 * var(--z), 3.4vw, 52 * var(--z)); font-weight: 800; letter-spacing: -0.04em; }
.x-group-link { display: inline-flex; align-items: center; gap: calc(8 * var(--z)); font-size: calc(15 * var(--z)); font-weight: 500; color: var(--text-2); transition: color 0.2s; }
.x-group-link:hover { color: var(--text); }
.x-group-link .arrow { width: calc(15 * var(--z)); }

.x-subjects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.x-subject { padding: calc(28 * var(--z)) calc(28 * var(--z)) calc(32 * var(--z)) 0; }
.x-subject + .x-subject { padding-left: calc(28 * var(--z)); border-left: 1px solid var(--line); }
.x-subject[hidden] { display: none; }
.x-subject h3 { font-size: calc(24 * var(--z)); font-weight: 700; letter-spacing: -0.02em; }
.x-subject > p { margin-top: calc(10 * var(--z)); font-size: calc(15 * var(--z)); line-height: 1.55; color: var(--text-2); }
.x-subject .chips { margin-top: calc(18 * var(--z)); }
.x-courses { margin-top: calc(22 * var(--z)); border-top: 1px solid var(--line); }
.x-courses li { border-bottom: 1px solid var(--line); }
.x-courses li.is-muted { padding: calc(13 * var(--z)) 0; font-size: calc(14 * var(--z)); }
.x-courses a { display: grid; grid-template-columns: 1fr auto calc(16 * var(--z)); align-items: center; gap: calc(12 * var(--z)); padding: calc(13 * var(--z)) 0; font-size: calc(15 * var(--z)); font-weight: 500; transition: color 0.2s; }
.x-courses a:hover { color: var(--lavender-2); }
.x-courses .arrow { width: calc(14 * var(--z)); transition: transform 0.3s var(--ease-out); }
.x-courses a:hover .arrow { transform: translateX(calc(3 * var(--z))); }
.xc-level { font-size: calc(12 * var(--z)); font-weight: 400; color: var(--text-3); }
mark { background: rgba(164, 135, 234, 0.3); color: inherit; border-radius: calc(3 * var(--z)); padding: 0 calc(2 * var(--z)); }
.x-empty { padding: calc(72 * var(--z)) 0; font-size: calc(20 * var(--z)); color: var(--text-3); }

@media (max-width: 1240px) {
  .x-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-subject:nth-child(3) { padding-left: 0; border-left: 0; }
  .x-subject:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .x-subjects { grid-template-columns: 1fr; }
  .x-subject, .x-subject + .x-subject { padding: calc(26 * var(--z)) 0; border-left: 0; }
  .x-subject + .x-subject { border-top: 1px solid var(--line); }
  .x-group-head { grid-template-columns: auto 1fr; }
  .x-group-link { grid-column: 1 / -1; }
  .x-filter { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .x-filter button { flex: none; }
}
