.page-products {
  --page-band-green: #122e27;
  --page-tile-ink: #263238;
  --page-sort-yellow: #ffc107;
}

.page-products .directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "main"
    "sidebar";
  gap: 22px;
  max-width: 1460px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}

.page-products .filter-sidebar {
  grid-area: sidebar;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.page-products .sidebar-inner {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-products .sidebar-head .filter-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 6px;
}

.page-products .sidebar-head .filter-state {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
}

.page-products .sidebar-nav {
  display: grid;
  gap: 5px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: 14px;
}

.page-products .sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: background .2s, color .2s, transform .2s;
}

.page-products .sidebar-link:hover,
.page-products .sidebar-link:focus-visible {
  background: rgba(255, 255, 255, .1);
  color: var(--white);
  transform: translateX(3px);
}

.page-products .sidebar-link .sidebar-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  min-width: 24px;
}

.page-products .sidebar-link small {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(255, 255, 255, .12);
  padding: 2px 8px;
  border-radius: 999px;
}

.page-products .sidebar-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: 14px;
}

.page-products .sidebar-quick .sidebar-link {
  background: rgba(255, 255, 255, .06);
}

.page-products .sidebar-link-featured {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
}

.page-products .sidebar-data-img {
  display: block;
  width: 100%;
  max-width: 130px;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 4px;
}

.page-products .directory-main {
  grid-area: main;
  min-width: 0;
}

.page-products .breadcrumbs {
  margin-bottom: 18px;
}

.page-products .directory-hero {
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--dark-blue-2) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 48px);
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}

.page-products .directory-hero .section-kicker {
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.page-products .directory-hero h1 {
  font-size: clamp(32px, 4.4vw, 54px);
  font-weight: 900;
  line-height: 1.12;
  margin: 0 0 14px;
  letter-spacing: .01em;
}

.page-products .directory-hero .lede {
  max-width: 820px;
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .86);
}

.page-products .lede-link {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-products .lede-link:hover {
  color: var(--white);
}

.page-products .hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.page-products .hero-stat {
  min-width: 96px;
  flex: 1 1 120px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
}

.page-products .hero-stat .num {
  display: block;
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: var(--yellow);
}

.page-products .hero-stat small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, .72);
}

.page-products .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-products .category-section,
.page-products .index-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
  margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
}

.page-products .section-head {
  margin-bottom: 18px;
}

.page-products .section-head .section-kicker,
.page-products .index-subhead {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--purple);
  margin: 0 0 6px;
}

.page-products .section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  margin: 0 0 8px;
}

.page-products .section-head .section-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.page-products .section-banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 84px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 22px;
  border: 1px solid var(--line);
}

.page-products .tile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.page-products .tile-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s;
}

.page-products .tile-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.page-products .tile-card-orange {
  background: var(--orange);
  color: var(--white);
}

.page-products .tile-card-yellow {
  background: var(--yellow);
  color: var(--ink);
}

.page-products .tile-card-cyan {
  background: var(--cyan);
  color: var(--white);
}

.page-products .tile-card-green {
  background: var(--green-2);
  color: var(--white);
}

.page-products .tile-card-purple {
  background: var(--purple);
  color: var(--white);
}

.page-products .tile-card-dark {
  background: var(--dark-blue-2);
  color: var(--white);
}

.page-products .tile-card-ink {
  background: var(--page-tile-ink);
  color: var(--white);
}

.page-products .tile-card-multi {
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: var(--white);
}

.page-products .tile-card summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "glyph code"
    "glyph title"
    "glyph count";
  gap: 2px 14px;
  align-items: center;
  padding: 20px 48px 20px 20px;
  cursor: pointer;
  position: relative;
}

.page-products .tile-card summary::-webkit-details-marker {
  display: none;
}

.page-products .tile-card summary::after {
  content: "＋";
  position: absolute;
  right: 16px;
  top: 18px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  opacity: .85;
}

.page-products .tile-card[open] summary::after {
  content: "－";
}

.page-products .tile-glyph {
  grid-area: glyph;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .18);
  border-radius: 10px;
  font-size: 22px;
  font-weight: 900;
}

.page-products .tile-card-yellow .tile-glyph {
  background: rgba(0, 0, 0, .12);
}

.page-products .tile-code {
  grid-area: code;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  opacity: .78;
  text-transform: uppercase;
}

.page-products .tile-title {
  grid-area: title;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
}

.page-products .tile-count {
  grid-area: count;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  opacity: .9;
}

.page-products .subcategory-list {
  list-style: none;
  margin: 0;
  padding: 8px 20px 18px;
  display: grid;
  gap: 2px;
  background: rgba(0, 0, 0, .2);
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.page-products .tile-card-yellow .subcategory-list {
  background: rgba(0, 0, 0, .24);
}

.page-products .subcategory-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 4px;
  color: rgba(255, 255, 255, .94);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  transition: background .2s, padding-left .2s;
}

.page-products .subcategory-link:hover,
.page-products .subcategory-link:focus-visible {
  background: rgba(255, 255, 255, .08);
  padding-left: 8px;
}

.page-products .sub-count {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, .16);
  padding: 2px 9px;
  border-radius: 999px;
}

.page-products .tag-section {
  position: relative;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}

.page-products .tag-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-products .tag-bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .18;
}

.page-products .tag-section-inner {
  position: relative;
  z-index: 1;
  padding: clamp(22px, 3vw, 32px);
}

.page-products .tag-section .section-kicker {
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.page-products .tag-section .section-head h2 {
  color: var(--white);
}

.page-products .tag-section .section-head .section-note {
  color: rgba(255, 255, 255, .76);
}

.page-products .tag-cloud-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.page-products .tag-tier-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-products .tag-tier-title::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.page-products .tag-tier-hot::before {
  background: var(--orange);
}

.page-products .tag-tier-warm::before {
  background: var(--yellow);
}

.page-products .tag-tier-cool::before {
  background: var(--cyan);
}

.page-products .tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-products .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, filter .2s;
}

.page-products .tag:hover,
.page-products .tag:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  filter: saturate(1.15);
}

.page-products .tag-count {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(0, 0, 0, .12);
  padding: 2px 7px;
  border-radius: 999px;
}

.page-products .index-subhead {
  font-size: 14px;
  text-transform: none;
  letter-spacing: .06em;
  color: var(--dark-blue);
  border-left: 4px solid var(--purple);
  padding-left: 10px;
  margin: 0 0 14px;
}

.page-products .alpha-banner,
.page-products .index-banner {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.page-products .alpha-banner {
  max-height: 110px;
}

.page-products .index-banner {
  max-height: 84px;
}

.page-products .filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 14px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.page-products .filter-bar .filter-label {
  font-weight: 700;
  color: var(--purple);
  background: rgba(124, 77, 255, .1);
  padding: 3px 10px;
  border-radius: 999px;
}

.page-products .filter-bar .filter-state {
  color: var(--ink);
}

.page-products .index-bar,
.page-products .year-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.page-products .index-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}

.page-products .index-link:hover,
.page-products .index-link:focus-visible {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.page-products .index-link-off {
  color: #9aa7b0;
  background: #e9edef;
  border-color: transparent;
  pointer-events: none;
}

.page-products .index-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.page-products .index-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--surface);
}

.page-products .index-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--dark-blue);
  color: var(--white);
  text-align: left;
  padding: 12px 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.page-products .sort-glyph {
  color: var(--page-sort-yellow);
  font-family: var(--font-mono);
  font-size: 11px;
  margin-right: 4px;
}

.page-products .index-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}

.page-products .index-table tbody tr {
  scroll-margin-top: 160px;
}

.page-products .index-table tbody tr:nth-child(even) {
  background: #f0f4f6;
}

.page-products .index-table tbody tr:hover {
  background: #e3f4f7;
}

.page-products .year-anchor {
  scroll-margin-top: 160px;
}

@media (min-width: 640px) {
  .page-products .directory-layout {
    padding: 24px 20px 60px;
  }

  .page-products .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-products .hero-stat {
    flex: 1 1 140px;
  }

  .page-products .tag-cloud-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-products .tag-tier:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .page-products .directory-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-areas: "sidebar main";
    align-items: start;
    gap: 26px;
    padding: 30px 28px 64px;
  }

  .page-products .filter-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }

  .page-products .directory-main {
    padding-left: 0;
  }

  .page-products .tile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-products .tag-cloud-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-products .tag-tier:last-child {
    grid-column: auto;
  }

  .page-products .index-table-wrap {
    max-height: 560px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-products .tile-card,
  .page-products .tag,
  .page-products .index-link,
  .page-products .sidebar-link {
    transition: none;
    transform: none;
  }
}
