.reviews-archive-reference {
  background: var(--paper);
}

.reviews-archive-reference .wide-shell {
  max-width: var(--maxw);
  padding-inline: 32px;
}

.tests-hero {
  background: linear-gradient(180deg, var(--cream-2) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 72px 0 48px;
  position: relative;
}

.tests-hero::before {
  background: radial-gradient(circle, rgb(184 97 58 / 0.12), transparent 65%);
  content: "";
  height: 400px;
  pointer-events: none;
  position: absolute;
  right: -120px;
  top: -120px;
  width: 400px;
}

.tests-crumbs {
  color: var(--moss-text);
  display: flex;
  font-family: var(--f-mono);
  font-size: 11px;
  gap: 8px;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.tests-crumbs [aria-current="page"] { color: var(--ink); }

.tests-hero h1 {
  font-size: clamp(4.5rem, 10vw, 7.75rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.88;
  margin: 0 0 14px;
}

.tests-hero h1 em {
  color: var(--terracotta-text);
  font-style: italic;
}

.tests-hero__intro {
  align-items: end;
  display: grid;
  gap: 56px;
  grid-template-columns: 1.3fr 1fr;
  margin-top: 32px;
}

.tests-hero__intro > p {
  color: var(--ink-soft);
  font-family: var(--f-display);
  font-size: 20px;
  line-height: 1.5;
  margin: 0;
  max-width: 650px;
}

.tests-hero__stats {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 40px;
  margin: 0;
  padding: 20px 0 4px;
}

.tests-hero__stats dt {
  color: var(--forest);
  font-family: var(--f-display);
  font-size: 42px;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
}

.tests-hero__stats dd {
  color: var(--moss-text);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  margin: 4px 0 0;
  text-transform: uppercase;
}

.latest-tests {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 64px;
}

.latest-tests__head { margin-bottom: 28px; }
.latest-tests__head h2 {
  font-size: 44px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}
.latest-tests__head em { color: var(--terracotta-text); }

.latest-tests__rail {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.5fr 3fr;
}

.latest-tests__small-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.latest-test-card {
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s;
}

.latest-test-card:hover { border-color: var(--moss-text); transform: translateY(-3px); }
.latest-test-card--featured { border-radius: var(--r-lg); }
.latest-test-card--small { border-radius: var(--r-md); }
.latest-test-card > a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }

.latest-test-card__visual {
  align-items: flex-end;
  min-height: 76px;
  padding: 0;
  position: relative;
}

.latest-test-card__visual img { height: 100%; object-fit: cover; width: 100%; }
.latest-test-card--featured .latest-test-card__visual { aspect-ratio: 16 / 11; max-height: 220px; }
.latest-test-card__visual time {
  background: var(--paper);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 10px;
  left: 14px;
  letter-spacing: 0.12em;
  padding: 5px 10px;
  position: absolute;
  text-transform: uppercase;
  top: 14px;
}

.latest-test-card__score {
  background: var(--forest);
  border-radius: 4px;
  color: var(--paper);
  font-family: var(--f-display);
  font-size: 18px;
  font-style: italic;
  font-weight: 600;
  padding: 6px 12px;
  position: absolute;
  right: 14px;
  top: 14px;
}

.latest-test-card--small .latest-test-card__score { font-size: 13px; padding: 3px 8px; right: 8px; top: 8px; }
.latest-test-card__body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }
.latest-test-card--small .latest-test-card__body { gap: 6px; padding: 12px 14px 14px; }
.latest-test-card__category,
.latest-test-card--small time {
  color: var(--moss-text);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.latest-test-card--small time { color: var(--terracotta-text); margin: 0; }
.latest-test-card h3 { font-size: 22px; line-height: 1.2; margin: 0 0 10px; }
.latest-test-card h4 { font-size: 17px; line-height: 1.2; margin: 0; }
.latest-test-card__excerpt {
  color: var(--ink-soft);
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.latest-test-card__foot {
  border-top: 1px dashed var(--line);
  color: var(--moss-text);
  display: flex;
  font-family: var(--f-mono);
  font-size: 11px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
}

.reviews-listing-layout {
  display: grid;
  gap: 48px;
  grid-template-columns: 260px minmax(0, 1fr);
  padding: 48px 0 96px;
}

.reviews-filter-panel { min-width: 0; }
.reviews-filter-toggle { display: none; }
.reviews-filter-aside { align-self: start; position: sticky; top: 96px; }

.reviews-filter-block {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 18px 0;
}
.reviews-filter-block:first-of-type { padding-top: 0; }
.reviews-filter-block legend,
.reviews-filter-label {
  color: var(--moss-text);
  display: flex;
  font-family: var(--f-mono);
  font-size: 10px;
  justify-content: space-between;
  letter-spacing: 0.15em;
  margin: 0 0 12px;
  padding: 0;
  text-transform: uppercase;
  width: 100%;
}
.reviews-filter-block legend span { color: var(--forest); }
.reviews-filter-list { display: flex; flex-direction: column; gap: 8px; }
.reviews-filter-list label {
  align-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  gap: 10px;
}
.reviews-filter-list label:hover { color: var(--ink); }
.reviews-filter-list input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.reviews-filter-box {
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  display: inline-flex;
  flex: 0 0 16px;
  height: 16px;
  justify-content: center;
  width: 16px;
}
.reviews-filter-list input:focus-visible + .reviews-filter-box { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.reviews-filter-list input:checked + .reviews-filter-box { background: var(--forest); border-color: var(--forest); }
.reviews-filter-list input:checked + .reviews-filter-box::after {
  border-bottom: 2px solid var(--paper);
  border-left: 2px solid var(--paper);
  content: "";
  height: 5px;
  transform: rotate(-45deg) translate(1px, -1px);
  width: 8px;
}
.reviews-filter-list input:checked ~ span:not(.reviews-filter-box) { color: var(--ink); font-weight: 500; }
.reviews-filter-list small { color: var(--moss-text); font-family: var(--f-mono); font-size: 11px; margin-left: auto; }

.reviews-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reviews-filter-chips input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.reviews-filter-chips span {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  display: block;
  font-family: var(--f-mono);
  font-size: 12px;
  padding: 6px 12px;
}
.reviews-filter-chips input:checked + span { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.reviews-filter-chips input:focus-visible + span { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.reviews-filter-block select { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); padding: 8px 10px; width: 100%; }
.reviews-range { align-items: center; display: flex; gap: 10px; }
.reviews-range input { accent-color: var(--forest); flex: 1; min-width: 0; }
.reviews-range output { color: var(--ink-soft); font-family: var(--f-mono); font-size: 11px; min-width: 64px; text-align: right; }

.reviews-filter-submit {
  background: var(--forest);
  border: 0;
  border-radius: var(--r-md);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-top: 20px;
  padding: 12px 16px;
  text-transform: uppercase;
  width: 100%;
}
.reviews-filter-submit:hover { background: var(--forest-deep); }
.reviews-filter-clear { color: var(--terracotta-text); display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; margin-top: 12px; text-align: center; text-transform: uppercase; }

.reviews-results { min-width: 0; }
.reviews-results__head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
}
.reviews-results__count { font-size: 26px; font-style: italic; font-weight: 500; margin: 0; }
.reviews-results__count::first-letter { color: var(--terracotta-text); }
.reviews-active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.reviews-active-filters a {
  align-items: center;
  background: var(--cream-2);
  border-radius: 999px;
  color: var(--ink-soft);
  display: inline-flex;
  font-family: var(--f-mono);
  font-size: 11px;
  gap: 6px;
  padding: 5px 8px 5px 12px;
}
.reviews-active-filters a span { align-items: center; background: var(--line); border-radius: 50%; color: var(--paper); display: inline-flex; height: 14px; justify-content: center; width: 14px; }
.reviews-sort { align-items: center; color: var(--moss-text); display: flex; font-family: var(--f-mono); font-size: 11px; gap: 16px; letter-spacing: 0.1em; text-transform: uppercase; }
.reviews-sort select { background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); font: inherit; padding: 8px 12px; text-transform: uppercase; }

.tests-grid { display: grid; gap: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.test-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow 0.25s, transform 0.25s; }
.test-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-4px); }
.test-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.test-card__thumb { aspect-ratio: 4 / 3; padding: 0; position: relative; }
.test-card__image { height: 100%; object-fit: cover; width: 100%; }
.test-card__score {
  background: var(--paper);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
  color: var(--forest);
  font-family: var(--f-display);
  font-size: 18px;
  font-style: italic;
  font-weight: 600;
  padding: 6px 12px;
  position: absolute;
  right: 14px;
  top: 14px;
}
.test-card__badge { background: var(--terracotta-text); border-radius: var(--r-sm); color: var(--paper); font-family: var(--f-mono); font-size: 9px; left: 14px; letter-spacing: 0.15em; padding: 5px 11px; position: absolute; text-transform: uppercase; top: 14px; }
.test-card__body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.test-card__category { color: var(--moss-text); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; margin: 0 0 10px; text-transform: uppercase; }
.test-card h3 { font-size: 24px; line-height: 1.15; margin: 0 0 10px; }
.test-card__excerpt { color: var(--ink-soft); font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.test-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.test-card__tags span { background: var(--cream-2); border-radius: var(--r-sm); color: var(--ink-soft); font-family: var(--f-mono); font-size: 10px; padding: 3px 8px; }
.test-card__meta { align-items: baseline; border-top: 1px dashed var(--line); color: var(--ink-soft); display: flex; font-family: var(--f-mono); font-size: 11px; justify-content: space-between; margin-top: auto; padding-top: 14px; }
.test-card__meta strong { color: var(--terracotta-text); font-family: var(--f-display); font-size: 18px; font-style: italic; }

.reviews-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 56px; }
.reviews-pagination .page-numbers { align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink-soft); display: flex; font-family: var(--f-mono); font-size: 13px; height: 40px; justify-content: center; min-width: 40px; padding: 0 12px; }
.reviews-pagination .current { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.reviews-empty { border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 64px 24px; text-align: center; }
.reviews-empty h3 { font-size: 32px; margin: 0; }
.reviews-empty a { color: var(--terracotta-text); font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; }

@media (max-width: 75rem) {
  .tests-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 68.75rem) {
  .latest-tests__rail { grid-template-columns: 1fr; }
  .latest-tests__small-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 60.001rem) {
  .reviews-filter-panel:not([open]) > .reviews-filter-aside { display: block; }
}

@media (max-width: 60rem) {
  .reviews-listing-layout { grid-template-columns: 1fr; }
  .reviews-filter-panel { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
  .reviews-filter-toggle { align-items: center; background: var(--forest); border-radius: var(--r-md); color: var(--paper); cursor: pointer; display: flex; font-family: var(--f-mono); font-size: 12px; justify-content: center; letter-spacing: 0.1em; list-style: none; padding: 14px 20px; text-transform: uppercase; }
  .reviews-filter-toggle::-webkit-details-marker { display: none; }
  .reviews-filter-toggle span { align-items: center; background: var(--terracotta-text); border-radius: 50%; display: inline-flex; height: 22px; justify-content: center; margin-left: 8px; width: 22px; }
  .reviews-filter-aside { position: static; }
  .reviews-filter-panel[open] .reviews-filter-aside { padding-top: 20px; }
  .tests-hero__intro { gap: 24px; grid-template-columns: 1fr; }
}

@media (max-width: 40rem) {
  .reviews-archive-reference .wide-shell { padding-inline: 20px; }
  .tests-hero { padding: 48px 0 36px; }
  .tests-hero h1 { font-size: clamp(4rem, 20vw, 5.25rem); }
  .tests-hero__stats { justify-content: space-between; }
  .latest-tests { padding: 42px 0 48px; }
  .latest-tests__head h2 { font-size: 36px; }
  .latest-tests__small-grid,
  .tests-grid { grid-template-columns: 1fr; }
  .reviews-listing-layout { padding: 32px 0 64px; }
  .reviews-results__head { align-items: stretch; flex-direction: column; }
  .reviews-sort { justify-content: space-between; }
  .reviews-sort select { max-width: 65%; }
  .test-card__body { padding: 20px; }
  .reviews-pagination .prev,
  .reviews-pagination .next { width: 100%; }
}
