/* Professor comparison dashboard */
:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
  background: #f4f5f7;
  line-height: 1.4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-width: 100%;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: #f4f5f7;
  color: #111;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 12px;
  background: #111;
  color: #fff;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.dashboard {
  height: 100vh;
  padding: 10px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.dashboard-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
}

.dashboard-header p {
  margin: 0;
  font-size: 0.85rem;
  color: #333;
}

.dashboard-nav {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dashboard-nav a {
  padding: 4px 8px;
  border: 1px solid #555;
  border-radius: 4px;
  background: #fff;
  color: #003f8f;
  font-size: 0.8rem;
  text-decoration: none;
}

.dashboard-nav a:hover { text-decoration: underline; }

.dashboard-nav a.nav-current {
  background: #111;
  color: #fff;
  font-weight: 700;
}

.dashboard-nav a:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

.group-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 2), minmax(0, 1fr));
  gap: 8px;
}

.group-card {
  min-width: 0;
  min-height: 0;
  background: #fff;
  border: 1px solid #767676;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.group-card-header {
  padding: 6px 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #b8b8b8;
}

.group-title {
  margin: 0;
  font-size: 0.95rem;
  white-space: nowrap;
}

.view-switch {
  display: inline-flex;
  justify-self: center;
  border: 1px solid #555;
  border-radius: 4px;
  overflow: hidden;
}

.view-switch button {
  border: 0;
  border-right: 1px solid #555;
  padding: 4px 7px;
  min-height: 30px;
  font: inherit;
  font-size: 0.75rem;
  background: #fff;
  color: #111;
  cursor: pointer;
}

.view-switch button:last-child {
  border-right: 0;
}

.view-switch button[aria-pressed="true"] {
  background: #111;
  color: #fff;
  font-weight: 700;
}

.view-switch button:hover {
  text-decoration: underline;
}

.view-switch button:focus-visible,
.open-original:focus-visible,
.task-link:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

.open-original {
  display: inline-block;
  min-width: 30px;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid #555;
  border-radius: 4px;
  color: #111;
  background: #fff;
  text-decoration: none;
  text-align: center;
  font-size: 0.78rem;
  line-height: 20px;
}

.open-original:hover {
  text-decoration: underline;
}

.preview-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.preview-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 450px;
  transform-origin: top left;
}

.preview-stage iframe {
  display: block;
  width: 800px;
  height: 450px;
  border: 0;
  background: #fff;
}

.status-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  background: #fff;
  font-size: 0.85rem;
}

.task-list {
  max-width: 760px;
  margin: 32px auto;
  padding: 0 20px;
}

.task-list h1 { margin-bottom: 8px; }
.task-list p { margin-top: 0; }
.task-list ul { line-height: 1.8; }
.task-link { color: #003f8f; }

@media (max-width: 1100px) {
  .dashboard { height: auto; min-height: 100vh; }
  .group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }
  .group-card { min-height: 280px; }
}

@media (max-width: 680px) {
  .dashboard-header { display: block; }
  .dashboard-header p { margin-top: 4px; }
  .group-grid { grid-template-columns: 1fr; }
  .group-card { min-height: 320px; }
  .group-card-header {
    grid-template-columns: 1fr auto;
  }
  .view-switch {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
