/* A quiet, continuous grid keeps adjacent figures easy to distinguish. */
:root {
  --table-rule: #cfc6db;
  --table-rule-strong: #ac9bbd;
}
.table-scroll table {
  border-collapse: separate;
  border-spacing: 0;
}
.table-scroll th,
.table-scroll td {
  border-right: 1px solid var(--table-rule);
  border-bottom-color: #d5cedf;
}
.table-scroll tr > :last-child {
  border-right: 0;
}
.table-scroll th {
  color: #4a3d5e;
}
.journal-table .mark-td {
  border-right-color: var(--table-rule);
  border-bottom-color: #d5cedf;
}
.journal-table .day-head {
  border-right-color: var(--table-rule);
}
.journal-table .sticky-name {
  border-right-color: var(--table-rule-strong);
}
.journal-table .mark:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px #6955b719;
}
.journal-table .mark[aria-busy='true'] {
  opacity: 0.55;
  cursor: wait;
}
.journal-table .mark-td:focus-within {
  background: #ede6fa;
}

/* C and D keep their original positions in the 16-column report. */
.full-date-table {
  --curator-width: 220px;
  --group-width: 112px;
  scroll-padding-left: calc(var(--curator-width) + var(--group-width));
}
.full-date-table .sticky-curator,
.full-date-table .sticky-group {
  position: sticky;
  z-index: 3;
  background: #fff;
  box-sizing: border-box;
}
.full-date-table .sticky-curator {
  left: 0;
  width: var(--curator-width);
  min-width: var(--curator-width);
  max-width: var(--curator-width);
  white-space: normal;
}
.full-date-table .sticky-group {
  left: var(--curator-width);
  width: var(--group-width);
  min-width: var(--group-width);
  max-width: var(--group-width);
  border-right-color: var(--table-rule-strong);
  box-shadow: 5px 0 7px -6px #58456977;
}
.full-date-table tbody tr:hover .sticky-curator,
.full-date-table tbody tr:hover .sticky-group {
  background: #fbfafe;
}
.full-date-table thead .sticky-curator,
.full-date-table thead .sticky-group {
  z-index: 6;
  background: #faf9fd;
  top: 0;
}
.full-date-table .date-parents th {
  z-index: 4;
}
.full-date-table .date-subheader th {
  top: 64px;
  z-index: 4;
}
.full-date-table .date-parents .sticky-curator,
.full-date-table .date-parents .sticky-group {
  z-index: 6;
}
.full-date-table .totals-row .sticky-curator,
.full-date-table .totals-row .sticky-group {
  background: #f4f0fb;
}
@media (max-width: 760px) {
  .full-date-table {
    --curator-width: 150px;
    --group-width: 92px;
  }
  .full-date-table .sticky-curator,
  .full-date-table .sticky-group {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 12px;
  }
  .full-date-table .sticky-curator {
    line-height: 1.5;
  }
}

.table-scroll th {
  font-size: 12px;
  line-height: 1.5;
}
.table-scroll td {
  font-size: 14px;
}
.full-date-table {
  --curator-width: 250px;
}
.full-date-table .date-parents th {
  height: 64px;
}
.full-date-table .date-parents th[rowspan] {
  height: 144px;
}
.full-date-table .date-subheader th {
  top: 64px;
  height: 80px;
}
@media (max-width: 760px) {
  .full-date-table {
    --curator-width: 150px;
    --group-width: 92px;
  }
  .full-date-table .sticky-curator,
  .full-date-table .sticky-group {
    font-size: 12px;
    line-height: 1.5;
  }
}

/* Keep the list number beside a wrapping student name without changing table layout. */
.journal-table td.sticky-name {
  vertical-align: middle;
}
.journal-table td.sticky-name > .row-number {
  display: block;
  position: absolute;
  left: 20px;
  top: 13px;
  width: 24px;
  margin: 0;
  padding-top: 1px;
  font-size: 12px;
  line-height: 21px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #6b607a;
}
.journal-table td.sticky-name > strong {
  display: block;
  margin-left: 32px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

/* Search inputs use the available row width rather than the original fixed 200 px. */
.search-field > input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  max-width: none;
  font-size: 16px;
  line-height: 1.5;
}
.search-field > .icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}
.table-toolbar {
  flex-wrap: wrap;
  align-items: center;
}
.table-toolbar > .search-field,
.journal-toolbar > .search-field,
.panel-head > .search-field {
  flex: 1 1 320px;
  min-width: min(100%, 320px);
  width: auto;
  max-width: 100%;
}
.table-toolbar > .muted {
  flex: 0 0 auto;
  white-space: normal;
  line-height: 1.6;
}
.panel-head:has(> .search-field) > div:first-child {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 100%;
}
.panel-head > div > p {
  white-space: normal;
  overflow-wrap: anywhere;
}
.page-footer {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 20px;
  line-height: 1.7;
}
.page-footer > span {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.panel-foot {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.7;
  max-width: 100%;
  align-items: flex-start;
}
.panel-foot > .icon {
  flex-shrink: 0;
  margin-top: 2px;
}
.report-form-grid > label {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .journal-table td.sticky-name > .row-number {
    left: 10px;
    top: 12px;
  }
  .table-toolbar > .search-field,
  .journal-toolbar > .search-field,
  .panel-head > .search-field {
    flex-basis: 100%;
    min-width: 0;
    width: 100%;
  }
  .panel-head:has(> .search-field) > div:first-child {
    flex-basis: 100%;
  }
  .page-footer > span:last-child {
    display: block;
  }
}
@media (max-width: 380px) {
  .table-toolbar .search-field > input::placeholder,
  .panel-head > .search-field > input::placeholder {
    font-size: 14px;
  }
}
