/* Staged only. Stacks the exam-edition table on small screens so Source stays readable without sideways scrolling. */
@media (max-width: 640px) {
  .ed-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .ed-table, .ed-table tbody, .ed-table tr, .ed-table td {
    display: block;
    width: 100%;
  }
  .ed-table {
    border: 0;
    background: transparent;
  }
  .ed-table tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 0 0 12px;
    padding: 8px 12px 12px;
    box-shadow: var(--shadow);
  }
  .ed-table td {
    border-bottom: 0;
    padding: 8px 0;
  }
  .ed-table td + td { border-top: 1px solid var(--line); }
  .ed-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    color: var(--navy);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0 0 2px;
  }
}

/* Filter row: never wider than the screen (SIM-018). */
.ed-filters .form-field { min-width: 0; }
/* Search and Show controls match the site's form fields (.community-form): 16px text, 10px 12px padding, 10px radius, 47px tall (SIM-020). */
.ed-filters input, .ed-filters select {
  width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
  font: inherit; font-size: 16px; line-height: 1.4;
  padding: 10px 12px; min-height: 47px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: #fff; color: var(--ink);
}
.ed-filters input:focus-visible, .ed-filters select:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }
@media (max-width: 640px) {
  .ed-filters.grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* v3.1 polish: fit all five columns in the 1120px wrap; wrap at words, not mid-word */
.ed-table { width: 100%; table-layout: fixed; }
.ed-table th, .ed-table td { overflow-wrap: break-word; }
.ed-table th:nth-child(1), .ed-table td:nth-child(1) { width: 14%; white-space: normal; }
.ed-table th:nth-child(2), .ed-table td:nth-child(2) { width: 16%; }
.ed-table th:nth-child(3), .ed-table td:nth-child(3) { width: 14%; }
.ed-table th:nth-child(4), .ed-table td:nth-child(4) { width: 36%; }
.ed-table th:nth-child(5), .ed-table td:nth-child(5) { width: 20%; }
.ed-table td a { overflow-wrap: break-word; word-break: break-word; }
@media (max-width: 640px) {
  .ed-table { table-layout: auto; }
  .ed-table tr { padding: 10px 14px 14px; }
  .ed-table td { padding: 10px 0; }
  .ed-table th:nth-child(1), .ed-table td:nth-child(1),
  .ed-table th:nth-child(2), .ed-table td:nth-child(2),
  .ed-table th:nth-child(3), .ed-table td:nth-child(3),
  .ed-table th:nth-child(4), .ed-table td:nth-child(4),
  .ed-table th:nth-child(5), .ed-table td:nth-child(5) { width: auto; white-space: normal; }
}
