/* Study plan section of department pages (components/collections/academics/StudyPlan.tsx). Prefix: qsp- */
.qsp { background: #F7F5EF; padding-block: 56px; color: #051435; }
.qsp-inner { max-width: 1140px; margin-inline: auto; padding-inline: 16px; }
.qsp-head { margin-block-end: 24px; }
.qsp-kicker { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #003A65; display: flex; align-items: center; gap: 10px; }
.qsp-kicker::before { content: ""; width: 24px; height: 3px; background: #FFCA2D; border-radius: 2px; }
.qsp-title-h { margin: 0 0 8px; font-size: clamp(26px, 4vw, 36px); line-height: 1.25; color: #051435; }
.qsp-summary { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 16px; color: rgba(5, 20, 53, .75); }
.qsp-badge { font-size: 13px; font-weight: 600; color: #003A65; border: 1px solid rgba(5, 20, 53, .12); background: #fff; border-radius: 999px; padding: 3px 12px; }

.qsp-year { border-block-start: 1px solid rgba(5, 20, 53, .12); }
.qsp-year:last-of-type { border-block-end: 1px solid rgba(5, 20, 53, .12); }
.qsp-year-sum { list-style: none; display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding-block: 8px; cursor: pointer; font-size: 18px; font-weight: 700; color: #051435; }
.qsp-year-sum::-webkit-details-marker { display: none; }
.qsp-year-sum:focus-visible { outline: 2px solid #003A65; outline-offset: 2px; }
.qsp-year-name { flex: 1 1 auto; }
.qsp-year-meta { display: flex; gap: 6px 18px; flex-wrap: wrap; justify-content: flex-end; font-size: 14px; font-weight: 500; color: rgba(5, 20, 53, .7); }
.qsp-chevron { flex: none; width: 10px; height: 10px; border-right: 2px solid #003A65; border-bottom: 2px solid #003A65; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.qsp-year[open] > .qsp-year-sum .qsp-chevron { transform: rotate(-135deg) translateY(-2px); }
.qsp-year-body { padding-block: 4px 28px; display: grid; gap: 28px; }

.qsp-table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; border: 1px solid rgba(5, 20, 53, .12); }
.qsp-caption { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; font-weight: 700; font-size: 16px; text-align: start; color: #003A65; background: #fff; border: 1px solid rgba(5, 20, 53, .12); border-block-end: 0; }
.qsp-caption-ects { font-weight: 500; color: rgba(5, 20, 53, .7); }
.qsp-table th, .qsp-table td { padding: 10px 14px; text-align: start; vertical-align: top; border-block-start: 1px solid rgba(5, 20, 53, .12); line-height: 1.5; }
.qsp-table thead th { font-size: 13px; font-weight: 600; color: rgba(5, 20, 53, .7); background: #F7F5EF; border-block-start: 0; }
.qsp-table tbody th { font-weight: 600; }
.qsp-table .qsp-num { text-align: end; white-space: nowrap; width: 1%; font-variant-numeric: tabular-nums; }
.qsp-table .qsp-code { white-space: nowrap; width: 1%; text-align: start; color: #003A65; font-weight: 600; }
.qsp-table tfoot th { text-align: end; }
.qsp-table tfoot th, .qsp-table tfoot td { font-weight: 700; background: #F7F5EF; }

@media (max-width: 719px) {
  .qsp { padding-block: 40px; }
  .qsp-year-sum { font-size: 17px; flex-wrap: wrap; row-gap: 2px; }
  .qsp-year-name { flex-basis: calc(100% - 30px); }
  .qsp-year-meta { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .qsp-chevron { order: 2; margin-inline-start: auto; }
  .qsp-year-sum { position: relative; }
  .qsp-table, .qsp-table tbody, .qsp-table tfoot { display: block; border: 0; background: transparent; }
  .qsp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .qsp-caption { display: flex; border: 1px solid rgba(5, 20, 53, .12); }
  /* phones: one compact row per module — code and title, then one line of hours, ECTS and type */
  .qsp-table tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 14px; background: #fff; border: 1px solid rgba(5, 20, 53, .12); border-block-start: 0; }
  .qsp-table tbody tr > * { display: block; padding: 0; border: 0; width: auto; text-align: start; min-width: 0; }
  .qsp-table tbody tr > .qsp-code, .qsp-table tbody tr > .qsp-num { width: auto; white-space: nowrap; text-align: start; }
  .qsp-table tbody .qsp-code { flex: none; font-size: 12px; unicode-bidi: isolate; }
  .qsp-table tbody .qsp-title { flex: 1 1 0; font-size: 15px; line-height: 1.5; }
  .qsp-table tbody .qsp-num, .qsp-table tbody .qsp-type, .qsp-table tbody .qsp-prereq { flex: none; font-size: 13px; font-weight: 600; color: #051435; }
  .qsp-table tbody td:not(.qsp-code)::before { content: attr(data-label) " "; font-weight: 500; color: rgba(5, 20, 53, .6); }
  .qsp-table tbody .qsp-num, .qsp-table tbody .qsp-type, .qsp-table tbody .qsp-prereq { order: 2; }
  .qsp-table tbody .qsp-code, .qsp-table tbody .qsp-title { order: 1; }
  .qsp-table tbody tr::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
  .qsp-table tbody .qsp-prereq:empty, .qsp-table tbody .qsp-type:empty { display: none; }
  .qsp-table tfoot tr { display: flex; justify-content: space-between; padding: 10px 14px; background: #F7F5EF; border: 1px solid rgba(5, 20, 53, .12); border-block-start: 0; }
  .qsp-table tfoot tr > * { display: block; padding: 0; border: 0; width: auto; }
  .qsp-table tfoot td:last-child { display: none; }
  .qsp-table tfoot td[colspan] { display: none; }
}
