/* ═══════════════════════════════════════════════════════════════════════════
   מערכת ניהול קורסים ומעבדות — Sela
   Hebrew / RTL first. Colours from the Sela mark (selacloud.com):
   ink #1C1C1C, cyan #00DBE9.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --sela-cyan: #00dbe9;
  --sela-cyan-dark: #00a8b3;
  --sela-ink: #1c1c1c;
  --ink: #202124;
  --grey: #5f6368;
  --grey-light: #80868b;
  --line: #e3e6ea;
  --bg: #f5f7fa;
  --surface: #ffffff;

  /* Status colours. Each is paired with a tint that keeps text at AA contrast. */
  --ok: #137333;
  --ok-bg: #e6f4ea;
  --warn: #8a5300;
  --warn-bg: #fff4e0;
  --danger: #c5221f;
  --danger-bg: #fce8e6;
  --info: #1a5fb4;
  --info-bg: #e8f0fe;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(32, 33, 36, 0.08), 0 1px 2px rgba(32, 33, 36, 0.06);
  --shadow-lg: 0 4px 16px rgba(32, 33, 36, 0.12);
  --header-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Heebo", -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

/* 12.1 / WCAG 2.1 AA — a visible focus ring on every interactive element, never
   removed. `:focus-visible` keeps it off mouse clicks but always on for keyboards. */
:focus-visible {
  outline: 3px solid var(--sela-cyan-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link — the first tab stop on every screen. */
.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 200;
  background: var(--sela-ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* Screen-reader-only text, still announced. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

a { color: var(--info); }
a:hover { text-decoration: underline; }

/* ── App shell ───────────────────────────────────────────────────────────── */

.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.topbar .logo img { height: 22px; display: block; }
.topbar .logo .divider { width: 1px; height: 22px; background: var(--line); }
.topbar .logo .product { font-weight: 700; font-size: 14.5px; color: var(--ink); white-space: nowrap; }
.topbar .spacer { flex: 1; }

.cohort-picker {
  font: inherit; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 7px 12px; background: var(--surface); color: var(--ink);
  max-width: 320px;
}

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--sela-ink); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: none;
}

.layout { display: flex; align-items: flex-start; }

.sidenav {
  width: 232px; flex: none;
  padding: 16px 12px;
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-inline-start: 1px solid var(--line);
  background: var(--surface);
}
.sidenav h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--grey-light); margin: 14px 10px 6px; font-weight: 700;
}
.sidenav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500;
}
.sidenav a:hover { background: var(--bg); text-decoration: none; }
.sidenav a[aria-current="page"] { background: var(--sela-ink); color: #fff; font-weight: 700; }
.sidenav a .badge-count {
  margin-inline-start: auto; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px;
}

main { flex: 1; padding: 22px 26px 60px; max-width: 1400px; min-width: 0; }

.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 25px; font-weight: 800; letter-spacing: -.01em; }
.page-head .sub { color: var(--grey); font-size: 14px; margin-top: 2px; }
.page-head .actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Cards, KPIs, tables ─────────────────────────────────────────────────── */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.card > header {
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; background: #fafbfc;
}
.card > header h2 { font-size: 15.5px; font-weight: 700; }
.card > header .actions { margin-inline-start: auto; display: flex; gap: 8px; }
.card .body { padding: 18px; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow);
}
.kpi .label { color: var(--grey); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 29px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.kpi .hint { font-size: 12.5px; color: var(--grey-light); margin-top: 2px; }
.kpi.alert { background: var(--danger-bg); border-color: #f5c6c4; }
.kpi.alert .label, .kpi.alert .value { color: var(--danger); }

/* A wide table scrolls inside its own box; the page itself never scrolls sideways. */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 13px; text-align: start; border-bottom: 1px solid var(--line); }
thead th {
  background: #fafbfc; font-weight: 700; font-size: 12.5px;
  color: var(--grey); position: sticky; top: 0; z-index: 2;
  white-space: nowrap;
}
tbody tr:hover { background: #fafbfc; }
tbody tr:last-child td { border-bottom: 0; }

/* The matrix keeps the student name visible while the lab columns scroll (ADM-081). */
.matrix th.sticky-name, .matrix td.sticky-name {
  position: sticky; inset-inline-start: 0; z-index: 3;
  background: var(--surface); border-inline-end: 1px solid var(--line);
  min-width: 190px; font-weight: 600;
}
.matrix thead th.sticky-name { z-index: 4; background: #fafbfc; }
.matrix td.cell { text-align: center; min-width: 92px; padding: 6px; }
.cell-pill {
  display: block; border-radius: 6px; padding: 4px 6px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.cell-pill.none { background: #f1f3f4; color: var(--grey-light); }
.cell-pill.partial { background: var(--info-bg); color: var(--info); }
.cell-pill.done { background: var(--ok-bg); color: var(--ok); }
.cell-pill.locked { background: repeating-linear-gradient(45deg, #f8f9fa, #f8f9fa 4px, #f1f3f4 4px, #f1f3f4 8px); color: var(--grey-light); }

/* ── Badges & pills ──────────────────────────────────────────────────────── */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent;
}
.badge.required  { background: var(--ok-bg);     color: var(--ok);     border-color: #b7dfc4; }
.badge.bonus     { background: var(--info-bg);   color: var(--info);   border-color: #b8ceef; }
.badge.homework  { background: var(--warn-bg);   color: var(--warn);   border-color: #f0cf95; }
.badge.info      { background: #f1f3f4;          color: var(--grey);   border-color: var(--line); }
.badge.active    { background: var(--ok-bg);     color: var(--ok);     border-color: #b7dfc4; }
.badge.locked    { background: #f1f3f4;          color: var(--grey);   border-color: var(--line); }
.badge.closed    { background: var(--danger-bg); color: var(--danger); border-color: #f3c2c0; }
.badge.draft     { background: #f1f3f4;          color: var(--grey-light); border-color: var(--line); }
.badge.archived  { background: #f1f3f4;          color: var(--grey-light); border-color: var(--line); }
.badge.ready     { background: var(--ok-bg);     color: var(--ok);     border-color: #b7dfc4; }
.badge.incomplete{ background: var(--warn-bg);   color: var(--warn);   border-color: #f0cf95; }
.badge.delivered { background: var(--info-bg);   color: var(--info);   border-color: #b8ceef; }
.badge.fault     { background: var(--danger-bg); color: var(--danger); border-color: #f3c2c0; }

/* ── Buttons & forms ─────────────────────────────────────────────────────── */

button, .btn {
  font: inherit; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); padding: 8px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
button:hover:not(:disabled), .btn:hover { background: var(--bg); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--sela-ink); color: #fff; border-color: var(--sela-ink); }
.btn-primary:hover:not(:disabled) { background: #000; }
.btn-accent { background: var(--sela-cyan); color: var(--sela-ink); border-color: var(--sela-cyan); font-weight: 700; }
.btn-accent:hover:not(:disabled) { background: var(--sela-cyan-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f3c2c0; }
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); }
.btn-sm { padding: 5px 11px; font-size: 13px; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--grey); margin-bottom: 5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"],
input[type="number"], input[type="url"], select, textarea {
  font: inherit; font-size: 14.5px; width: 100%;
  padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--sela-cyan-dark); }
input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-bg); }
textarea { resize: vertical; min-height: 84px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12.5px; color: var(--grey-light); margin-top: 4px; font-weight: 400; }
.field .error { font-size: 12.5px; color: var(--danger); margin-top: 4px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; color: var(--ink); }
.switch input { width: 18px; height: 18px; accent-color: var(--sela-cyan-dark); cursor: pointer; flex: none; }

/* ── Progress bars ───────────────────────────────────────────────────────── */

.progress { height: 8px; background: #e8eaed; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--sela-cyan-dark); border-radius: 99px; transition: width .3s; }
.progress.done > span { background: var(--ok); }
.progress-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--grey); margin-bottom: 5px; }

/* ── Notices ─────────────────────────────────────────────────────────────── */

.notice {
  padding: 12px 16px; border-radius: var(--radius-sm);
  border-inline-start: 4px solid; font-size: 14px; margin-bottom: 14px;
}
.notice.info    { background: var(--info-bg);   border-color: var(--info);   color: #174ea6; }
.notice.success { background: var(--ok-bg);     border-color: var(--ok);     color: var(--ok); }
.notice.warning { background: var(--warn-bg);   border-color: #f9ab00;       color: var(--warn); }
.notice.danger  { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }

.empty-state { padding: 46px 20px; text-align: center; color: var(--grey); }
.empty-state .big { font-size: 34px; margin-bottom: 10px; }

/* ── Modal ───────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(32,33,36,.5);
  display: grid; place-items: center; z-index: 300; padding: 20px;
}
.modal {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 620px;
  max-height: 88vh; display: flex; flex-direction: column;
}
.modal > header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal > header h2 { font-size: 17px; font-weight: 700; }
.modal > header button.close { margin-inline-start: auto; border: 0; background: none; font-size: 20px; padding: 2px 8px; line-height: 1; }
.modal .body { padding: 20px; overflow-y: auto; }
.modal > footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-start; background: #fafbfc; }

/* ── Toasts ──────────────────────────────────────────────────────────────── */

.toasts { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 400; display: grid; gap: 9px; }
.toast {
  background: var(--sela-ink); color: #fff; padding: 11px 18px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 500; max-width: 380px;
  animation: toast-in .18s ease-out;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ── Login ───────────────────────────────────────────────────────────────── */

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.login-card .accent { height: 5px; background: var(--sela-cyan); }
.login-card .inner { padding: 32px 30px; }
.login-card .brand { display: flex; justify-content: center; margin-bottom: 22px; }
.login-card .brand img { height: 30px; }
.login-card h1 { font-size: 21px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--grey); font-size: 14px; margin-bottom: 24px; }
.login-card button[type="submit"] { width: 100%; justify-content: center; padding: 11px; margin-top: 6px; }
.login-card .alt { text-align: center; margin-top: 18px; font-size: 13.5px; }
.code-input {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 26px; text-align: center; letter-spacing: 12px;
  direction: ltr; padding: 12px !important;
}

/* ── Student lab view ────────────────────────────────────────────────────── */

.lab-page { max-width: 860px; margin: 0 auto; }
.lab-sticky {
  position: sticky; top: var(--header-h); z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--line);
  margin: -22px -26px 20px; padding: 11px 26px 0;
}
.lab-sticky .row { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; }
.lab-sticky .saved { margin-inline-start: auto; font-size: 12.5px; color: var(--grey-light); }
.lab-sticky .progress { margin: 0 -26px; border-radius: 0; height: 4px; }

.lab-title { text-align: center; margin-bottom: 18px; }
.lab-title h1 { font-size: 26px; font-weight: 800; line-height: 1.3; }
.lab-title .meta { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

/* Imported lab content — the classes come from the original course HTML, so the
   pages keep the look students already know (§2.3). */
.lab-content .svgwrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; margin: 16px 0; }
.lab-content .svgwrap svg { max-width: 100%; height: auto; }
.lab-content .goal { background: var(--info-bg); border-inline-start: 4px solid var(--info); padding: 13px 16px; border-radius: var(--radius-sm); margin: 14px 0; }
.lab-content .note { background: var(--info-bg); border-inline-start: 4px solid var(--info); padding: 11px 14px; border-radius: var(--radius-sm); margin: 12px 0; font-size: 14px; }
.lab-content .tip  { background: var(--warn-bg); border-inline-start: 4px solid #f9ab00; padding: 11px 14px; border-radius: var(--radius-sm); margin: 12px 0; font-size: 14px; }
.lab-content .why  { background: #f3e8fd; border-inline-start: 4px solid #7b1fa2; padding: 11px 14px; border-radius: var(--radius-sm); margin: 12px 0; font-size: 14px; }
.lab-content .path { background: #f1f3f4; padding: 9px 13px; border-radius: var(--radius-sm); margin: 10px 0; font-size: 13.5px; }
.lab-content .path .sep { color: var(--grey-light); margin: 0 5px; }
.lab-content code { background: #f1f3f4; padding: 2px 7px; border-radius: 5px; font-size: 13.5px; direction: ltr; display: inline-block; font-family: "SF Mono", Menlo, Consolas, monospace; }
.lab-content ol, .lab-content ul { margin: 8px 0; padding-inline-start: 22px; }
.lab-content li { margin: 5px 0; }
.lab-content dl { margin: 6px 0; }
.lab-content dt { font-weight: 700; margin-top: 8px; }
.lab-content dd { margin-inline-start: 14px; color: var(--grey); font-size: 14px; }
.lab-content h3 { font-size: 15.5px; color: var(--info); margin-bottom: 6px; }
.lab-content details.instructor { background: #fff8e1; border: 1px solid #f0cf95; border-radius: var(--radius-sm); padding: 12px 15px; margin: 14px 0; }
.lab-content details.instructor summary { font-weight: 700; color: var(--warn); cursor: pointer; }

.step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
  transition: border-color .15s;
}
.step.is-done { border-color: #b7dfc4; background: #fbfefc; }
.step > .head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; cursor: pointer; width: 100%;
  background: none; border: 0; text-align: start; font: inherit;
  border-radius: 0;
}
.step > .head:hover { background: #fafbfc; }
.step .num {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--sela-ink); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.step.is-done .num { background: var(--ok); }
.step .stitle { flex: 1; font-weight: 700; font-size: 16px; min-width: 0; }
.step .chev { color: var(--grey-light); transition: transform .15s; flex: none; }
.step[open] .chev, .step.is-open .chev { transform: rotate(180deg); }
.step .sbody { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.step .sbody > .inner { padding-top: 14px; }
.step .check-row {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 11px;
}
.step .check-row input { width: 21px; height: 21px; accent-color: var(--ok); cursor: pointer; flex: none; }
.step .check-row label { margin: 0; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; }
.step .staff-note { font-size: 12.5px; color: var(--warn); margin-inline-start: auto; }

.done-banner {
  background: var(--ok-bg); border: 1px solid #b7dfc4; color: var(--ok);
  border-radius: var(--radius); padding: 22px; text-align: center;
  font-size: 17px; font-weight: 700; margin-top: 20px;
}

.resources { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 18px; margin-top: 18px; }
.resources h3 { font-size: 15px; margin-bottom: 8px; }
.resources a { display: block; margin: 5px 0; font-size: 14px; font-weight: 600; }
.resources a::before { content: "🔗 "; }

/* ── Student home lab grid ───────────────────────────────────────────────── */

.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.lab-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 17px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 11px;
}
.lab-card.is-locked { background: #fafbfc; }
.lab-card.is-locked h3 { color: var(--grey); }
.lab-card.is-done { border-color: #b7dfc4; }
.lab-card .top { display: flex; align-items: center; gap: 8px; }
.lab-card .top .time { margin-inline-start: auto; font-size: 12.5px; color: var(--grey-light); }
.lab-card h3 { font-size: 16px; font-weight: 700; line-height: 1.35; }
.lab-card .foot { margin-top: auto; display: flex; align-items: flex-end; gap: 12px; }
.lab-card .foot .progress-block { flex: 1; min-width: 0; }

/* ── Environment credentials ─────────────────────────────────────────────── */

/* One field per row rather than a wrapping grid. The grid packed cards of unequal
   width side by side and broke long values mid-word, so a domain and a password read
   as one run-on block. A label column plus a value column keeps every row aligned and
   scannable, which is what these are actually used for: reading a value out loud or
   copying it. */
.cred-list { display: grid; gap: 8px; }

.cred {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr auto;
  align-items: center;
  gap: 14px;
}
.cred.is-secret { background: var(--warn-bg); border-color: #f0cf95; }
.cred .label { font-size: 13px; color: var(--grey); font-weight: 600; }
.cred .value {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px; font-weight: 600;
  direction: ltr; text-align: left;
  /* Break only where a URL or an address allows it — never mid-token. */
  overflow-wrap: anywhere; word-break: normal;
  min-width: 0;
}
.cred .value.masked { letter-spacing: 3px; color: var(--grey-light); font-size: 15px; }
.cred .value.empty { color: var(--grey-light); font-style: italic; font-family: inherit; }
.cred .cred-actions { display: flex; gap: 6px; justify-content: flex-end; }
.cred .cred-actions button { padding: 4px 10px; font-size: 12.5px; }

@media (max-width: 720px) {
  /* Stacked on a phone: a three-column row would crush the value to a few characters. */
  .cred { grid-template-columns: 1fr; gap: 6px; }
  .cred .cred-actions { justify-content: flex-start; }
}

/* ── Collapsible cards ───────────────────────────────────────────────────── */

.card.collapsible > header { padding: 0; }
.card-toggle {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: none; border: 0; border-radius: 0;
  padding: 13px 18px; font: inherit; text-align: start; cursor: pointer;
}
.card-toggle:hover { background: #f1f3f4; }
.card-toggle h2 { font-size: 15.5px; font-weight: 700; }
.card-chev { color: var(--grey); transition: transform .15s; font-size: 13px; }
.card.is-collapsed .card-chev { transform: rotate(-90deg); }
.card-count {
  background: #eceff3; color: var(--grey); border-radius: 20px;
  padding: 1px 9px; font-size: 12px; font-weight: 700;
}
.card.collapsible > header .actions { padding-inline-end: 14px; }
.card.is-collapsed > header { border-bottom: 0; }

/* ── Lab preview modal ───────────────────────────────────────────────────── */

.lab-preview .modal-scroll { max-height: 60vh; }
.step-preview {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 8px; background: var(--surface);
}
.step-preview > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.step-preview .num {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--sela-ink); color: #fff;
  display: inline-grid; place-items: center; font-size: 12px;
}

/* ── Responsive (12.1) ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidenav {
    width: 100%; height: auto; position: static;
    border-inline-start: 0; border-bottom: 1px solid var(--line);
    display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px;
  }
  .sidenav h3 { display: none; }
  .sidenav a { white-space: nowrap; padding: 7px 13px; }
  main { padding: 16px; }
  .lab-sticky { margin: -16px -16px 16px; padding: 11px 16px 0; }
  .lab-sticky .progress { margin: 0 -16px; }
  .page-head h1 { font-size: 21px; }
  .kpi .value { font-size: 25px; }
}

@media (max-width: 600px) {
  .topbar { padding: 0 13px; gap: 10px; }
  .topbar .logo .product { display: none; }
  .cohort-picker { max-width: 150px; font-size: 13px; }
  .lab-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Respect a reduced-motion preference (WCAG 2.3.3). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* A hidden lab stays in the instructor's plan — muted, not removed. Hiding concerns
   students; the person managing the course still needs to see the whole list. */
tbody tr.row-hidden { background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 6px, #f4f5f7 6px, #f4f5f7 12px); }
tbody tr.row-hidden:hover { background: #f1f3f4; }
tbody tr.row-hidden td:first-child > div:first-child { color: var(--grey); }

/* The actions column holds up to four buttons; letting it wrap turned every row into
   two lines. It gets its own width and keeps the buttons on one line. */
td .row-actions { display: flex; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
td .row-actions button { flex: none; }
