.exam-index-content {
  max-width: 980px;
  padding-bottom: 68px;
}

.exam-filters {
  display: grid;
  grid-template-columns: minmax(104px, .8fr) minmax(0, 1.15fr) minmax(0, 1.8fr) minmax(0, 1.65fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
}

.exam-filters label {
  display: grid;
  min-width: 0;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
}

.exam-filters :is(select, input, button) {
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid #a2b4a5;
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font: 400 16px/1.4 var(--sans);
}

.exam-filters :is(select, input) {
  width: 100%;
  min-width: 0;
}

.exam-filters input::placeholder {
  color: var(--secondary);
}

.exam-filters button {
  color: #295e4d;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.exam-filters button:hover {
  background: #dde9d8;
}

.exam-count {
  margin: 18px 0 8px;
  color: var(--secondary);
  font-size: 14px;
}

.exam-list, .exam-empty {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.exam-list {
  padding: 0;
  list-style: none;
}

.exam-empty {
  padding: 18px;
  color: var(--secondary);
}

.exam-list > li {
  display: flex;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
  padding-inline: 6px 14px;
}

.exam-list > li:not([hidden]) ~ li:not([hidden]) {
  border-top: 1px solid var(--line);
}

.exam-result {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

.exam-result strong {
  font-size: 16px;
  line-height: 1.5;
}

.exam-result small {
  color: var(--secondary);
  font-size: 13px;
}

.exam-result:hover strong {
  color: #295e4d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.exam-classroom {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 10px;
  border-radius: 6px;
  background: var(--wash);
  color: #295e4d;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.exam-classroom:hover {
  background: #dde9d8;
}

@media (max-width: 800px) {
  .exam-filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .exam-filter-year, .exam-filter-paper { grid-column: span 3; }
  .exam-filter-topic { grid-column: 1 / -1; }
  .exam-filter-keyword { grid-column: span 4; }
  .exam-filters button { grid-column: span 2; justify-self: end; }
}

@media (max-width: 460px) {
  .exam-index-content { padding-bottom: 40px; }
  .exam-list > li { flex-direction: column; align-items: stretch; padding-inline: 6px; }
  .exam-classroom { align-self: flex-start; margin: 0 8px 10px; }
}
