.test-list-page {
  --list-line: rgba(var(--text), 0.1);
  --list-muted: rgba(var(--text), 0.66);
  --list-panel: rgba(var(--div-bg), 1);
  --list-soft: rgba(var(--theme), 0.08);
  color: rgba(var(--text), 1);
  overflow: hidden;
  padding-bottom: 56px;
}

.test-list-page .container {
  width: min(1160px, 92%);
}

.test-list-page svg {
  margin: 0;
  transform: none;
}

.test-list-page .eyebrow,
.section-head .eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(var(--theme), 0.2);
  border-radius: 999px;
  background: rgba(var(--theme), 0.1);
  color: rgba(var(--theme), 1);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  padding: 8px 13px 6px;
}

.back-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  color: rgba(var(--text), 0.62);
  font-weight: 800;
  margin-bottom: 14px;
}

.back-link:hover {
  color: rgba(var(--theme), 1);
}

.test-list-hero {
  min-height: 66vh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.74fr);
  align-items: center;
  gap: clamp(28px, 5vw, 74px);
  padding-block: clamp(48px, 7vw, 90px) clamp(30px, 5vw, 62px);
}

.test-list-hero .header-text {
  text-align: left;
}

.test-list-hero h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  color: rgba(var(--text), 1);
  font-size: 4.2rem;
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: 0;
  text-transform: none;
}

.test-list-hero .subtitle {
  max-width: 650px;
  margin: 0;
  color: var(--list-muted);
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  gap: 7px;
  border: 1px solid var(--list-line);
  border-radius: 999px;
  background: var(--list-panel);
  color: rgba(var(--text), 0.76);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 8px 13px 6px;
}

.hero-meta time {
  color: rgba(var(--theme), 1);
  font-size: inherit;
}

.test-list-hero .author {
  margin-top: 18px;
  color: rgba(var(--text), 0.58);
}

.test-list-hero .author span,
.test-list-hero .author a {
  font-size: 0.86rem;
}

.test-list-hero .author a {
  color: rgba(var(--theme), 1);
  font-weight: 850;
}

.test-list-hero .header-img {
  position: relative;
  border-radius: 8px;
  border: 1px solid var(--list-line);
  background: var(--list-panel);
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

.test-list-hero .header-img img {
  width: 100%;
  aspect-ratio: 4 / 4.35;
  border-radius: 8px;
  object-fit: cover;
  opacity: 1;
  filter: none;
}

.hero-float {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 3px 12px;
  align-items: center;
  border-radius: 8px;
  border: 1px solid rgba(var(--theme), 0.18);
  background: rgba(var(--div-bg), 0.94);
  padding: 15px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.14);
}

.hero-float i {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: rgba(var(--theme), 1);
  background: rgba(var(--theme), 0.1);
}

.hero-float i svg {
  width: 24px;
  height: 24px;
}

.hero-float strong {
  font-size: 1.45rem;
  line-height: 1;
}

.hero-float span {
  color: var(--list-muted);
  font-size: 0.86rem;
}

.test-list-section,
.quiz-list-section {
  padding-block: 30px 70px;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-head .eyebrow {
  margin-inline: auto;
}

.section-head h2,
.mt > header h2 {
  margin: 15px 0 0;
  color: rgba(var(--text), 1);
  font-size: 2.45rem;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
}

.test-card-grid,
.quiz-card-grid,
.grid {
  gap: 16px;
}

.t-item {
  position: relative;
  min-height: 184px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--list-line);
  border-radius: 8px;
  background: var(--list-panel);
  color: rgba(var(--text), 1);
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.t-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(var(--theme), 0.08), transparent 52%);
  pointer-events: none;
}

.t-item:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--theme), 0.36);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
}

.t-item.locked {
  border-style: dashed;
}

.t-item.locked .t-icon {
  color: rgba(var(--orange), 1);
  background: rgba(var(--orange), 0.12);
}

.t-item.is-unlocked .t-icon {
  color: rgba(var(--green), 1);
  background: rgba(var(--green), 0.1);
}

.t-icon,
.t-arrow {
  position: relative;
  z-index: 1;
}

.t-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--theme), 0.1);
  color: rgba(var(--theme), 1);
}

.t-icon svg {
  width: 30px;
  height: 30px;
}

.t-details {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 0 16px;
}

.t-kicker {
  width: fit-content;
  border-radius: 999px;
  background: rgba(var(--theme), 0.1);
  color: rgba(var(--theme), 1);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  padding: 6px 10px 5px;
}

.t-name,
.t-item h3,
.t-item h4.t-name {
  margin: 0;
  color: rgba(var(--text), 1);
  font-size: 1.16rem;
  font-weight: 950;
  line-height: 1.24;
}

.t-subtitle,
.t-item h4:not(.t-name) {
  display: block;
  margin: 0;
  color: rgba(var(--text), 0.58);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

.t-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  color: rgba(var(--text), 0.62);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.25;
}

.t-total strong {
  color: rgba(var(--theme), 1);
  font-size: 1.7rem;
  font-weight: 950;
  line-height: 1;
}

.t-note {
  color: rgba(var(--text), 0.5);
  font-size: 0.76rem;
  font-weight: 800;
}

.t-arrow {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--theme), 0.1);
  color: rgba(var(--theme), 1);
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.t-arrow svg {
  width: 18px;
  height: 18px;
}

.t-item:hover .t-arrow {
  transform: translateX(3px);
  background: rgba(var(--theme), 1);
  color: rgba(var(--op-theme), 1);
}

.empty-state {
  max-width: 620px;
  margin: 24px auto 0;
  border: 1px solid var(--list-line);
  border-radius: 8px;
  background: var(--list-panel);
  color: var(--list-muted);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.6;
  padding: 22px;
  text-align: center;
}

.empty-state.error {
  border-color: rgba(var(--red), 0.24);
  color: rgba(var(--red), 1);
}

.unit-panel {
  border: 1px solid var(--list-line);
  border-radius: 8px;
  background: rgba(var(--div-bg), 0.58);
  padding: 18px;
  margin-top: 22px;
}

.unit-panel + .unit-panel {
  margin-top: 26px;
}

.unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.unit-kicker {
  display: inline-flex;
  width: fit-content;
  color: rgba(var(--theme), 1);
  font-size: 0.72rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.unit {
  margin: 0;
  color: rgba(var(--text), 1);
  font-size: 1.55rem;
  font-weight: 950;
  line-height: 1.15;
  text-transform: none;
}

.random-buy-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.random-buy {
  min-height: 42px;
  white-space: nowrap;
}

.random-offer {
  border-radius: 999px;
  background: rgba(var(--orange), 0.12);
  color: rgba(var(--orange), 1);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  padding: 7px 10px 6px;
}

@media (max-width: 1100px) {
  .grid,
  .test-card-grid,
  .quiz-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .test-list-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .test-list-hero h1 {
    font-size: 3.15rem;
  }

  .test-list-hero .subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 680px) {
  .grid,
  .test-card-grid,
  .quiz-card-grid {
    grid-template-columns: 1fr;
  }

  .test-list-hero {
    padding-top: 34px;
  }

  .test-list-hero h1 {
    font-size: 2.18rem;
  }

  .hero-meta {
    display: grid;
  }

  .test-list-hero .header-img {
    padding: 12px;
  }

  .test-list-hero .header-img img {
    aspect-ratio: 16 / 13;
  }

  .hero-float {
    position: static;
    margin-top: 12px;
  }

  .section-head h2,
  .mt > header h2 {
    font-size: 1.72rem;
  }

  .t-item {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 150px;
    padding: 18px;
  }

  .t-arrow {
    display: none;
  }

  .unit-panel {
    padding: 14px;
  }

  .unit-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .random-buy-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .random-buy {
    width: 100%;
  }
}
