/* v44.8: desktop workspace rhythm, research layouts and timetable hierarchy. */
@media (min-width: 821px) {
  .v43 .v43d-content {
    padding-top: 18px;
  }

  .v43 .v43d-page-head {
    min-height: 80px;
    align-items: center;
    margin-bottom: 8px;
  }

  .v43 .v43d-page-head > div:first-child {
    display: grid;
    align-content: center;
    min-height: 68px;
  }

  .v43 .v43d-page-head h1 {
    margin: 5px 0 6px;
    font-size: clamp(26px, 2vw, 30px);
    line-height: 1.2;
  }

  .v43 .v43d-page-head p {
    min-height: 21px;
    max-width: 720px;
  }

  .v43 :is(.v43d-center-tabs, .v43d-research-tabs) {
    min-height: 44px;
    margin: 0 0 12px;
    padding-bottom: 6px;
  }

  .v43 .ui-research-nav {
    min-height: 44px;
    margin-bottom: 12px;
  }

  /* Shared overview strips use space and tone instead of divider lines. */
  .v43 :is(
      .v45-research-metrics,
      .v44-literature-statuses,
      .v43-academic-overview-metrics,
      .v43-assignment-summary,
      .v43-grade-metrics,
      .v43-review-summary,
      .v43-admin-record-metrics,
      .v43-admin-status-line
    ) {
    gap: 8px;
    overflow: visible;
    padding: 4px;
    border: 0;
    border-radius: 12px;
    background: var(--v43-surface-soft);
  }

  .v43 :is(
      .v45-research-metrics > article,
      .v44-literature-statuses > button,
      .v43-academic-overview-metrics > span,
      .v43-assignment-summary > span,
      .v43-grade-metrics > span,
      .v43-review-summary > span,
      .v43-admin-record-metrics > span,
      .v43-admin-status-line > span
    ) {
    border: 0;
    border-radius: 9px;
    background: var(--v43-surface);
  }

  .v43 .v44-literature-statuses button {
    min-height: 58px;
    border-left: 0;
  }

  .v43 .v44-literature-statuses button[aria-pressed='true'] {
    background: var(--v43-surface-blue);
    box-shadow: inset 0 -3px var(--v43-blue);
  }

  .v43 .v44-literature-statuses {
    margin-bottom: 8px;
  }

  /* One 8:4 column rule for the four core research workspaces. */
  .v43 :is(
      .v48-split-layout,
      .v45-project-layout,
      .v44-literature-workspace,
      .v44-thesis-top,
      .v44-thesis-lower
    ) {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr);
    align-items: start;
    gap: 24px;
  }

  .v43 :is(.v48-research-main, .v48-research-rail, .v45-project-board, .v44-literature-main) {
    min-width: 0;
  }

  .v43 .v48-research-main,
  .v43 .v48-research-rail {
    display: grid;
    align-content: start;
    gap: 18px;
  }

  .v43 .v43d-research-pipeline {
    padding: 22px;
    border-radius: 12px;
    box-shadow: none;
  }

  .v43 .v43d-research-pipeline > div {
    gap: 10px;
    margin-top: 20px;
  }

  .v43 .v43d-research-pipeline article {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
  }

  .v43 .v43d-research-pipeline article > span {
    width: 34px;
    height: 34px;
  }

  .v43 .v43d-research-pipeline article > i {
    inset: 16px 0 auto 34px;
  }

  .v43 :is(.v48-continue-work, .v48-recent-activity, .v48-research-rail > .v43d-literature-stream) {
    min-width: 0;
    padding: 18px;
    border: 0;
    border-radius: 12px;
    background: var(--v43-surface-soft);
  }

  .v43 :is(.v48-continue-work, .v48-recent-activity, .v48-research-rail > .v43d-literature-stream) > header {
    display: flex;
    min-height: 44px;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 0 2px 12px;
  }

  .v43 :is(.v48-continue-work, .v48-recent-activity) header small {
    display: block;
    color: var(--v43-ink-faint);
    font-size: 12px;
  }

  .v43 :is(.v48-continue-work, .v48-recent-activity) h2 {
    margin: 3px 0 0;
    color: var(--v43-ink-strong);
    font-size: 17px;
  }

  .v43 :is(.v48-continue-work, .v48-recent-activity) header > span {
    color: var(--v43-blue-strong);
    font-size: 12px;
  }

  .v43 .v48-continue-work > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .v43 .v48-continue-work > div > button {
    display: grid;
    min-width: 0;
    min-height: 126px;
    grid-template-columns: 34px minmax(0, 1fr) 16px;
    align-items: start;
    gap: 10px;
    padding: 14px;
    border: 0;
    border-radius: 10px;
    background: var(--v43-surface);
    color: var(--v43-ink);
    text-align: left;
    font: inherit;
    cursor: pointer;
  }

  .v43 .v48-continue-work > div > button > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    background: var(--v43-surface-blue);
    color: var(--v43-blue);
  }

  .v43 .v48-continue-work > div > button > svg {
    margin-top: 8px;
    color: var(--v43-ink-faint);
  }

  .v43 .v48-continue-work button small,
  .v43 .v48-continue-work button strong,
  .v43 .v48-continue-work button p {
    display: block;
    overflow: hidden;
  }

  .v43 .v48-continue-work button small {
    color: var(--v43-blue-strong);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .v43 .v48-continue-work button strong {
    margin-top: 4px;
    color: var(--v43-ink-strong);
    font-size: 14px;
    line-height: 1.45;
  }

  .v43 .v48-continue-work button p {
    display: -webkit-box;
    margin: 7px 0 0;
    color: var(--v43-ink-soft);
    font-size: 12px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .v43 .v48-research-rail > .v43d-literature-stream > div {
    margin-top: 0;
    border-top: 0;
  }

  .v43 .v48-research-rail .v43d-literature-stream article {
    padding: 12px 2px;
    border-bottom-color: color-mix(in srgb, var(--v43-ink-faint) 14%, transparent);
  }

  .v43 .v48-research-rail .v43d-literature-stream article strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .v43 .v48-recent-activity > div > button {
    display: grid;
    width: 100%;
    grid-template-columns: 30px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 9px;
    padding: 11px 2px;
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--v43-ink-faint) 14%, transparent);
    background: transparent;
    color: var(--v43-ink);
    text-align: left;
    font: inherit;
    cursor: pointer;
  }

  .v43 .v48-recent-activity > div > button > span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: var(--v43-surface-blue);
    color: var(--v43-blue);
  }

  .v43 .v48-recent-activity button strong,
  .v43 .v48-recent-activity button small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .v43 .v48-recent-activity button strong {
    color: var(--v43-ink-strong);
    font-size: 12px;
  }

  .v43 .v48-recent-activity button small {
    margin-top: 3px;
    color: var(--v43-ink-faint);
    font-size: 11px;
  }

  .v43 .v48-recent-activity button > svg {
    color: var(--v43-ink-faint);
  }

  /* Project cards size themselves from their content; rail panels stop naturally. */
  .v43 [data-ui-research-results='projects'] {
    align-items: start;
  }

  .v43 [data-ui-research-results='projects'] .v45-project-card {
    min-height: 0;
    padding: 14px !important;
    border: 0 !important;
    background: var(--v43-surface-soft);
  }

  .v43 [data-ui-research-results='projects'] .v45-project-card:only-child {
    grid-column: 1 / -1;
  }

  .v43 [data-ui-research-results='projects'] .v45-project-card:hover {
    border-color: transparent !important;
    background: var(--v43-surface-blue);
  }

  .v43 .v45-project-card > .v43-research-row-main {
    min-height: 0;
  }

  .v43 .v45-project-card-foot {
    margin-top: 12px;
    padding-top: 10px;
  }

  .v43 .v45-project-rail,
  .v43 .v44-literature-rail {
    display: grid;
    align-content: start;
    gap: 14px;
  }

  .v43 :is(.v45-project-rail, .v44-literature-rail) > section,
  .v43 .v45-research-standard .v43d-research-panel,
  .v43 .v44-thesis-stages,
  .v43 .v44-thesis-lower > .v43d-research-panel,
  .v43 .v44-thesis-checkpoint {
    border: 0;
    background: var(--v43-surface-soft);
  }

  .v43 :is(.v45-project-rail, .v44-literature-rail) > section > header,
  .v43 .v45-research-standard .v43d-research-panel > header,
  .v43 .v44-thesis-stages > header,
  .v43 .v44-thesis-checkpoint > header {
    border-bottom-color: color-mix(in srgb, var(--v43-ink-faint) 14%, transparent);
  }

  .v43 .v44-literature-list [data-ui-research-row] {
    border: 0 !important;
    background: var(--v43-surface-soft);
  }

  .v43 .v44-literature-list [data-ui-research-row]:hover {
    border-color: transparent !important;
    background: var(--v43-surface-blue);
  }

  .v43 .v43-research-filterbar {
    padding: 10px;
    border-radius: 10px;
    background: var(--v43-surface-soft);
  }

  .v43 .v43-research-filterbar.is-desktop {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
  }

  .v43 .v43-research-filterbar.is-desktop .v43-research-filter-search {
    grid-column: 1;
    grid-row: 1;
  }

  .v43 .v43-research-filterbar.is-desktop .v43-research-toolbar-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .v43 .v43-research-filterbar.is-desktop .v43-research-filter-selects {
    grid-column: 1;
    grid-row: 2;
  }

  .v43 .v43-research-filterbar.is-desktop .v43-research-filter-summary {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    flex-basis: auto;
    white-space: nowrap;
  }

  .v43 .v43-research-filter-summary {
    padding: 0 2px;
  }

  /* Shared empty, filter and initial loading states. */
  .v43 :is(.v43d-empty, .v43-research-filter-empty) {
    min-height: 116px;
    padding: 18px;
    border: 0;
    border-radius: 10px;
    background: var(--v43-surface-soft);
  }

  .v43 .v43-research-filter-empty {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 13px;
    text-align: left;
  }

  .v43 .v43-research-filter-empty > span {
    display: grid;
    width: 40px;
    height: 40px;
    grid-row: 1 / 3;
    place-items: center;
    border-radius: 50%;
    background: var(--v43-surface-blue);
    color: var(--v43-blue);
  }

  .v43 .v43-research-filter-empty > strong,
  .v43 .v43-research-filter-empty > small {
    grid-column: 2;
  }

  .v43 .v43-research-filter-empty > small {
    color: var(--v43-ink-soft);
  }

  .v43 .v43-research-filter-empty > button {
    grid-column: 3;
    grid-row: 1 / 3;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid var(--v43-line-strong);
    border-radius: 7px;
    background: var(--v43-surface);
    color: var(--v43-blue-strong);
  }

  body[aria-busy='true'].v43 #v43DesktopContent::before {
    display: block;
    width: min(100%, 720px);
    min-height: 118px;
    border-radius: 12px;
    background: linear-gradient(100deg, var(--v43-surface-soft) 20%, var(--v43-surface-blue) 38%, var(--v43-surface-soft) 56%);
    background-size: 220% 100%;
    content: '';
    animation: v48-loading-slide 1.2s ease-in-out infinite;
  }

  /* Timetable: today, day parts, stronger course bars and the current time. */
  .v43 .v43-course-timetable-panel {
    padding-top: 0;
    border-top: 0;
  }

  .v43 .v43-course-week-context {
    border: 0;
  }

  .v43 .v43-course-timetable-desktop {
    border: 0;
    border-radius: 12px;
    background: var(--v43-surface-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v43-ink-faint) 12%, transparent);
  }

  .v43 .v43-timetable-grid {
    position: relative;
  }

  .v43 .v43-timetable-cell.is-today {
    background: color-mix(in srgb, var(--v43-surface-blue) 72%, #fff);
  }

  .v43 .v43-timetable-day.is-today {
    background: var(--v43-surface-blue);
    box-shadow: inset 0 -3px var(--v43-blue);
  }

  .v43 .v43-timetable-period.is-session-start,
  .v43 .v43-timetable-cell.is-session-start {
    border-top: 5px solid var(--v43-surface-soft);
  }

  .v43 .v43-timetable-period strong b {
    display: inline-flex;
    margin-right: 4px;
    padding: 2px 4px;
    border-radius: 4px;
    background: var(--v43-surface-blue);
    color: var(--v43-blue-strong);
    font-size: 9px;
    font-weight: 720;
  }

  .v43 .v43-timetable-course {
    border-left-width: 4px;
    box-shadow: 0 2px 7px rgb(20 51 77 / 7%);
  }

  .v43 .v43-timetable-course.is-today {
    box-shadow: 0 3px 10px rgb(25 87 138 / 15%);
  }

  .v43 .v48-current-time {
    z-index: 4;
    align-self: start;
    height: 2px;
    margin: 0 4px;
    background: #df5a57;
    pointer-events: none;
    transform: translateY(var(--v48-time-offset));
  }

  .v43 .v48-current-time::before {
    position: absolute;
    width: 7px;
    height: 7px;
    margin: -2.5px 0 0 -2px;
    border-radius: 50%;
    background: #df5a57;
    content: '';
  }

  .v43 .v48-current-time span {
    position: absolute;
    right: 2px;
    bottom: 4px;
    padding: 1px 4px;
    border-radius: 4px;
    background: #df5a57;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
  }
}

@media (min-width: 821px) and (max-width: 980px) {
  .v43 :is(.v48-split-layout, .v45-project-layout, .v44-literature-workspace, .v44-thesis-top, .v44-thesis-lower) {
    grid-template-columns: minmax(0, 1fr);
  }

  .v43 :is(.v48-research-rail, .v45-project-rail, .v44-literature-rail) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@keyframes v48-loading-slide {
  to { background-position: -120% 0; }
}

@media (prefers-reduced-motion: reduce) {
  body[aria-busy='true'].v43 #v43DesktopContent::before { animation: none; }
}

body.v43.dark .v43 .v43-timetable-cell.is-today,
body.v43.dark .v43 .v43-timetable-day.is-today {
  background: color-mix(in srgb, var(--v43-surface-blue) 82%, var(--v43-surface));
}
