.course-change { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.course-change.increase { color: var(--good); }
.course-change.decrease { color: var(--bad); }
.course-change.steady { color: var(--muted); }
.course-fees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 32rem), 1fr));
  gap: .4rem 1rem;
}
.price-basis { min-width: 0; display: grid; grid-template-rows: subgrid; grid-row: span 3; }
.price-basis h3 { margin: .3rem 0 0; }
.price-basis small { color: var(--muted); white-space: nowrap; }
.price-basis .table-scroll table { width: 100%; min-width: 28rem; }
.price-basis :is(td, th) { overflow-wrap: break-word; padding: .55rem .65rem; }
.price-course, .tariff-amount { white-space: nowrap; }
.tariff-amount { font-weight: 600; }
.price-basis .table-scroll { align-self: start; }

table[data-column-bands] { width: auto; }
table[data-column-bands] :is(th, td),
table[data-table-key="academic-groups-by-course"] :is(th, td) {
  padding: .45rem .5rem;
  text-align: center;
  vertical-align: middle;
}
table[data-column-bands] :is(th, td)[data-band-start] { border-inline-start: 1px solid var(--line); }
table[data-column-bands] thead tr:first-child th[colspan] + th { border-inline-start: 1px solid var(--line); }
table[data-column-bands] thead tr:nth-child(2) th { min-width: 4.45rem; overflow-wrap: normal; }
table[data-table-key="cohort-snapshots-by-course"] :is(th[rowspan], th[scope="row"]),
table[data-table-key="academic-groups-by-course"] :is(th[scope="row"], th:first-child) { text-align: start; }
table[data-table-key="cohort-snapshots-by-course"] :is(th[rowspan], th[scope="row"]) { white-space: nowrap; }
table[data-table-key="academic-groups-by-course"] th[scope="row"] { width: 13rem; min-width: 9rem; }
table[data-column-bands] input[type="number"],
table[data-table-key="academic-groups-by-course"] input[type="number"],
table[data-table-key="individual-work"] input[type="number"],
table[data-table-key="disciplines"] td > input[type="number"] {
  min-width: 3.5rem; max-width: 6rem; text-align: right; font-variant-numeric: tabular-nums;
}
table[data-column-bands] input[type="number"],
table[data-table-key="academic-groups-by-course"] input[type="number"] {
  padding-inline: .35rem;
  min-width: 3.35rem;
  text-align: center;
}
table[data-table-key="individual-work"] { width: 100%; }
table[data-table-key="individual-work"] td { vertical-align: middle; }
table[data-table-key="individual-work"] th, table[data-table-key="individual-work"] td,
table[data-table-key="disciplines"] th, table[data-table-key="disciplines"] td { padding: .43rem .48rem; }
.work-formula { min-width: 12rem; margin: .2rem 0; }
.work-formula summary, .discipline-extra summary { cursor: pointer; }
.work-formula summary small { color: var(--muted); font-weight: normal; }
.work-formula dl { max-width: 30rem; padding-left: 1rem; }
.work-formula dt { font-size: .85rem; font-weight: 600; margin-top: .55rem; }
.work-formula dd { margin: .15rem 0; }
.work-na { display: block; max-width: 6rem; color: var(--muted); text-align: center; }

table[data-table-key="disciplines"] { width: 100%; }
table[data-table-key="disciplines"] td:has(> .discipline-name) { min-width: 13rem; width: 42%; max-width: none; }
table[data-table-key="disciplines"] td > select { min-width: 3.6rem; width: auto; }
.discipline-name { display: grid; }
.discipline-name > textarea, .discipline-name > span {
  grid-area: 1 / 1; min-width: 0; min-height: 2.1rem; padding: .45em .55em;
  font: inherit; line-height: 1.45; border: 1px solid transparent; white-space: pre-wrap;
  overflow-wrap: anywhere; word-break: normal;
}
.discipline-name > textarea { height: 100%; resize: none; overflow: hidden; }
.discipline-name > span { visibility: hidden; pointer-events: none; }
.discipline-extra { margin: .28rem 0 0; }
.discipline-extra summary { color: var(--accent-dark); font-size: .82rem; }
.discipline-extra .grid { margin-top: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.discipline-extra .field { min-width: 0; }
@media (max-width: 700px) {
  table[data-table-key="disciplines"] td:has(> .discipline-name) { min-width: 11rem; }
  .work-formula { min-width: 10rem; }
}
