/* Skater Eval — design system v2. OKLCH palette, hockey-rink identity.
   Same class names as v1 — zero JS changes. */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: oklch(0.965 0.005 250);
  --card: oklch(1 0 0);
  --text: oklch(0.25 0.02 250);
  --muted: oklch(0.54 0.02 250);
  --primary: oklch(0.55 0.17 255);
  --primary-dark: oklch(0.48 0.17 255);
  --primary-soft: oklch(0.95 0.025 255);
  --danger: oklch(0.55 0.19 25);
  --danger-soft: oklch(0.96 0.02 25);
  --green: oklch(0.56 0.14 150);
  --green-soft: oklch(0.96 0.03 150);
  --border: oklch(0.9 0.008 250);
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 250 / 0.06), 0 1px 3px oklch(0.2 0.02 250 / 0.08);
  --shadow-md: 0 2px 4px oklch(0.2 0.02 250 / 0.05), 0 6px 16px oklch(0.2 0.02 250 / 0.09);
  --shadow-lg: 0 4px 8px oklch(0.2 0.02 250 / 0.06), 0 16px 40px oklch(0.2 0.02 250 / 0.14);
  --r-lg: 16px;
  --r-md: 10px;
  --r-sm: 7px;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(1200px 500px at 50% -10%, oklch(0.93 0.02 255 / 0.6), transparent 70%),
    var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

.page { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.center-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 16px; }

/* Landing */
.landing { text-align: center; padding-top: 18vh; }
.landing h1 {
  margin-bottom: 24px; font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(135deg, oklch(0.4 0.14 255), oklch(0.62 0.17 255));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.landing-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.error-page { padding: 40px; text-align: center; color: var(--danger); }

/* Cards & forms */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 12px;
}
.login-card { width: 100%; max-width: 400px; padding: 28px; border-radius: 20px; box-shadow: var(--shadow-lg); }
.login-card h2 { margin-bottom: 20px; font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }
.login-card label { display: block; margin-bottom: 14px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.login-card input {
  display: block; width: 100%; margin-top: 6px; padding: 13px 14px;
  font-size: 1rem; border: 1.5px solid var(--border); border-radius: var(--r-md);
  background: oklch(0.985 0.002 250);
  transition-property: border-color, box-shadow, background-color; transition-duration: 0.15s;
}
.login-card input:focus, .form-row input:focus, textarea:focus {
  outline: none; border-color: var(--primary); background: var(--card);
  box-shadow: 0 0 0 3px oklch(0.55 0.17 255 / 0.15);
}
.form-error {
  background: var(--danger-soft); color: var(--danger);
  padding: 11px 14px; border-radius: var(--r-md); margin-bottom: 12px; font-size: 0.9rem; font-weight: 500;
}
.form-notice {
  background: var(--primary-soft, oklch(0.95 0.03 255)); color: var(--primary);
  padding: 11px 14px; border-radius: var(--r-md); margin-bottom: 12px; font-size: 0.9rem; font-weight: 500;
}
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row input {
  flex: 1; min-width: 140px; padding: 11px 13px; border: 1.5px solid var(--border);
  border-radius: var(--r-md); font-size: 1rem;
  transition-property: border-color, box-shadow; transition-duration: 0.15s;
}
textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--border); border-radius: var(--r-md);
  font-size: 1rem; font-family: inherit; margin-bottom: 8px;
  transition-property: border-color, box-shadow; transition-duration: 0.15s;
}

/* Buttons */
.btn {
  padding: 12px 22px; font-size: 0.95rem; font-weight: 600; border: none; border-radius: var(--r-md);
  cursor: pointer; background: oklch(0.93 0.008 250); color: var(--text); touch-action: manipulation;
  min-height: 44px;
  transition-property: scale, background-color, box-shadow; transition-duration: 0.15s;
}
.btn:active { scale: 0.96; }
.btn-primary {
  background: linear-gradient(180deg, oklch(0.58 0.17 255), var(--primary-dark));
  color: #fff;
  box-shadow: 0 1px 2px oklch(0.48 0.17 255 / 0.4), inset 0 1px 0 oklch(1 0 0 / 0.15);
}
.btn-primary:hover { background: linear-gradient(180deg, oklch(0.55 0.17 255), oklch(0.45 0.17 255)); }
.btn-secondary { background: oklch(0.3 0.02 250); color: #fff; }
.btn-secondary:hover { background: oklch(0.25 0.02 250); }
.btn-small { padding: 7px 14px; font-size: 0.85rem; min-height: 36px; }
.btn-danger { background: var(--danger); color: #fff; }

/* Header */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-header h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.page-header > div:last-child { display: flex; align-items: center; gap: 10px; }
.page-header h2 { font-size: 1.2rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

/* Badges */
.code-badge {
  font-family: ui-monospace, 'SF Mono', monospace; background: var(--primary-soft); color: var(--primary-dark);
  padding: 3px 10px; border-radius: var(--r-sm); font-weight: 700; letter-spacing: 2px;
}
.code-large { font-size: 1.15rem; padding: 5px 12px; }
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; line-height: 1.5; background: oklch(0.93 0.008 250);
  font-variant-numeric: tabular-nums; white-space: nowrap; text-transform: capitalize;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--danger-soft); color: var(--danger); }

/* Pinnies */
.pinnie {
  display: inline-block; padding: 4px 11px; border-radius: var(--r-sm);
  font-weight: 800; font-size: 0.82rem; letter-spacing: 0.5px; white-space: nowrap;
  box-shadow: inset 0 -1px 0 oklch(0 0 0 / 0.12), 0 1px 2px oklch(0.2 0.02 250 / 0.15);
}

/* Session list */
.session-row {
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px;
  transition-property: box-shadow, translate; transition-duration: 0.15s;
}
.session-row:hover { box-shadow: var(--shadow-md); translate: 0 -1px; }
.session-row:active { scale: 0.99; }
.session-row-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.session-row-main strong { font-size: 1.02rem; letter-spacing: -0.01em; }
.row-sub { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.session-row-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.meta-text { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Tabs — segmented control */
.tab-bar {
  display: inline-flex; gap: 2px; margin-bottom: 18px; overflow-x: auto; max-width: 100%;
  background: oklch(0.92 0.008 250); border-radius: 12px; padding: 3px;
}
.tab {
  padding: 9px 18px; border: none; background: none; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; color: var(--muted); white-space: nowrap; border-radius: 9px;
  transition-property: background-color, color, box-shadow; transition-duration: 0.15s;
  min-height: 40px;
}
.tab-active { color: var(--text); background: var(--card); box-shadow: var(--shadow-sm); }

/* Tables */
.data-table {
  width: 100%; border-collapse: collapse; background: var(--card);
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table th {
  background: oklch(0.975 0.004 250); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.data-table td { font-variant-numeric: tabular-nums; }

/* Progress (admin) */
.eval-summary {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  margin-bottom: 8px; cursor: pointer; position: relative; overflow: hidden;
  transition-property: box-shadow; transition-duration: 0.15s;
}
.eval-summary:hover { box-shadow: var(--shadow-md); }
.eval-summary::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.eval-incomplete::before { background: var(--danger); }
.eval-complete::before { background: var(--green); }
.eval-summary strong { min-width: 120px; }
.progress-bar { flex: 1; height: 8px; background: oklch(0.92 0.008 250); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), oklch(0.65 0.15 230));
  transition-property: width; transition-duration: 0.35s;
}
.eval-complete .progress-fill { background: linear-gradient(90deg, var(--green), oklch(0.62 0.14 160)); }
.drill-grid { margin: 0 0 16px; font-size: 0.9rem; }
.cell-scored { background: var(--green-soft); color: var(--green); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.cell-missing { background: var(--danger-soft); color: var(--danger); text-align: center; }

/* Split pane */
.split-pane { display: flex; gap: 14px; align-items: flex-start; }
.pane-left { flex: 0 0 138px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 10px; }
.pane-item {
  padding: 12px 12px; border: none; background: var(--card); box-shadow: var(--shadow-sm);
  border-radius: var(--r-md); cursor: pointer; font-size: 0.9rem; font-weight: 500; text-align: left;
  min-height: 44px;
  transition-property: background-color, box-shadow, color, scale; transition-duration: 0.15s;
}
.pane-item:active { scale: 0.97; }
.pane-item-active {
  background: linear-gradient(180deg, oklch(0.58 0.17 255), var(--primary-dark));
  color: #fff; font-weight: 700;
  box-shadow: 0 2px 6px oklch(0.48 0.17 255 / 0.35);
}
.pane-right { flex: 1; min-width: 0; }

/* Sliders */
.slider-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  margin-bottom: 8px; flex-wrap: wrap;
}
.slider-label { flex: 0 0 auto; min-width: 90px; }
.slider-track { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 180px; }
.score-slider { flex: 1; height: 44px; accent-color: var(--primary); }
.slider-unset { opacity: 0.35; filter: grayscale(1); }
.slider-value {
  font-size: 1.35rem; font-weight: 800; min-width: 36px; text-align: center;
  font-variant-numeric: tabular-nums; color: var(--primary-dark);
}

/* Grid view */
.grid-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.score-grid { margin-bottom: 0; border-radius: 0; box-shadow: none; }
.score-grid td, .score-grid th { text-align: center; border-bottom: 1px solid var(--border); }
.score-grid td + td, .score-grid th + th { border-left: 1px solid var(--border); }
.score-grid tbody tr:nth-child(even) td { background-color: oklch(0.977 0.004 250); }
.score-grid tbody tr:nth-child(even) .sticky-col { background-color: oklch(0.977 0.004 250); }
.score-grid .sticky-col { position: sticky; left: 0; background: var(--card); text-align: left; z-index: 1; }
.score-grid thead .sticky-col { background: oklch(0.975 0.004 250); }
.grid-cell {
  cursor: pointer; min-width: 54px; height: 48px; font-size: 1.1rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition-property: background-color; transition-duration: 0.12s;
}
/* Unscored cells: hatched tint so "needs a score" is visible at a glance */
.grid-cell:not(.cell-scored) {
  background-image: repeating-linear-gradient(
    -45deg,
    oklch(0.55 0.17 255 / 0.05) 0 4px,
    transparent 4px 10px
  );
}
.score-grid .grid-cell.cell-scored { background-color: var(--green-soft); color: var(--green); }
.grid-cell:hover { background-color: var(--primary-soft); }
.grid-cell:active { background-color: oklch(0.9 0.05 255); }

/* Number pad modal */
.modal-overlay {
  position: fixed; inset: 0; background: oklch(0.15 0.02 250 / 0.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; justify-content: center; align-items: center; z-index: 100;
  animation: fade-in 0.15s ease-out;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  background: var(--card); border-radius: 22px; padding: 22px; width: 90%; max-width: 340px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes modal-in { from { opacity: 0; scale: 0.94; } }
.numpad-title { margin-bottom: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.numpad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.numpad-btn {
  padding: 16px 0; font-size: 1.3rem; font-weight: 700; border: none;
  background: oklch(0.955 0.006 250); border-radius: 12px; cursor: pointer; touch-action: manipulation;
  min-height: 52px; font-variant-numeric: tabular-nums;
  transition-property: background-color, color, scale; transition-duration: 0.1s;
}
.numpad-btn:active { background: var(--primary); color: #fff; scale: 0.94; }
.numpad-clear { grid-column: span 4; background: var(--danger-soft); color: var(--danger); font-size: 1rem; }

/* Pinnie filter */
.pinnie-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  padding: 8px 16px; border-radius: 999px; border: none; box-shadow: var(--shadow-sm);
  background: var(--card); cursor: pointer; font-size: 0.85rem; font-weight: 600; text-transform: capitalize;
  min-height: 36px;
  transition-property: scale, box-shadow; transition-duration: 0.12s;
}
.filter-chip:active { scale: 0.95; }
.filter-chip-active { font-weight: 700; box-shadow: var(--shadow-md), inset 0 0 0 2px var(--primary); }

/* Mobile */
@media (max-width: 600px) {
  .pane-left { flex-basis: 100px; }
  .slider-label { min-width: 72px; }
  .eval-summary strong { min-width: 80px; }
  .page { padding: 12px 10px; }
  .login-card { padding: 22px; }
}

/* Color picker swatches (session create) */
.chip-swatch {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  margin-right: 6px; vertical-align: -1px;
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.15);
}
.create-form label { display: block; margin-bottom: 8px; }

/* Filter + sort bars (evaluator header) */
.filter-sort { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.sort-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
@media (max-width: 600px) {
  .filter-sort { align-items: flex-start; }
}

/* Horizontal-scroll affordance (grid on narrow screens) */
.grid-shell { position: relative; }
.grid-shell::before, .grid-shell::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 28px;
  pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 2;
  border-radius: var(--r-lg);
}
.grid-shell::after {
  right: 0;
  background: linear-gradient(to left, oklch(0.3 0.04 255 / 0.18), transparent);
}
.grid-shell::before {
  left: 0;
  background: linear-gradient(to right, oklch(0.3 0.04 255 / 0.18), transparent);
}
.grid-shell.can-scroll-right::after { opacity: 1; }
.grid-shell.can-scroll-left::before { opacity: 1; }
.scroll-hint {
  position: absolute; right: 8px; top: -26px;
  font-size: 0.72rem; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 3px 8px; border-radius: 999px;
  pointer-events: none;
  animation: hint-nudge 1.6s ease-in-out infinite;
}
@keyframes hint-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
}

/* Per-skater completion badge (evaluator views) */
.pinnie-with-pct { display: inline-flex; align-items: center; gap: 6px; }
.pct-badge {
  font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 1px 6px; border-radius: 999px;
  /* Solid opaque pill: identical high-contrast rendering on every row
     background, including the blue selected row. */
  background: #fff;
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.08), 0 1px 2px oklch(0 0 0 / 0.08);
}
.pct-low  { color: oklch(0.5 0.19 27); }
.pct-mid  { color: oklch(0.52 0.12 85); }
.pct-done { color: oklch(0.5 0.14 155); }

/* Sync status chip (evaluator header) */
.sync-chip {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; margin-right: 8px;
  vertical-align: 2px;
}
.sync-ok { color: oklch(0.5 0.14 155); background: oklch(0.5 0.14 155 / 0.1); }
.sync-pending { color: oklch(0.52 0.12 85); background: oklch(0.72 0.15 85 / 0.18); }

/* Results tab */
.results-table td, .results-table th { text-align: center; border-bottom: 1px solid var(--border); }

/* Results: skater cell — pill + name on one aligned line, no wrapping */
.results-table .skater-cell { min-width: 180px; }
.skater-id { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.skater-id .pinnie { flex: 0 0 auto; }
.skater-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.results-table td { vertical-align: middle; }
.results-table tbody tr { height: 44px; }

/* Admin fill-in */
.cell-fillable { cursor: pointer; }
.cell-fillable:hover { background-color: var(--primary-soft); }
.fill-choice { display: flex; justify-content: center; margin-top: 10px; }

/* Tappable slider value -> numpad; shaded by score depth */
.slider-value-btn {
  border: 1px solid var(--border); border-radius: var(--r-sm);
  min-width: 44px; min-height: 36px; font-size: 1rem; font-weight: 600;
  cursor: pointer; font-variant-numeric: tabular-nums;
}
.slider-value-btn.muted { background: var(--card); }

.admin-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* Placement (bantam) evaluator view.
   Cards hold ~400px of real controls; on wide screens a single full-width
   column is mostly whitespace, so the list becomes a responsive grid. */
.placement-list {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  align-items: start;
}
@media (min-width: 700px) {
  .placement-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .placement-list { grid-template-columns: repeat(3, 1fr); }
}
.placement-list .card { margin-bottom: 0; }
.placement-row { padding: 12px 14px; }
.placement-row-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.placement-row.placement-done { border-left: 4px solid var(--green); }
.pinnie-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.placement-chips { display: flex; gap: 6px; }
.placement-chip {
  min-width: 44px; min-height: 40px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--card); font-weight: 700; cursor: pointer;
}
.placement-chip-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.placement-comment { width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px; font: inherit; resize: vertical; }

/* Completion badges: green = all scores in, red = missing, neutral = nothing to score yet */
.completion-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; line-height: 1.5;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.completion-full { background: var(--green); color: #fff; }
.completion-partial { background: var(--danger); color: #fff; }
.completion-none { background: var(--card); color: var(--muted, #888); border: 1px solid var(--border); }

/* Ghost danger button: quiet until hovered */
.btn-danger-ghost { color: var(--danger); border-color: transparent; background: transparent; }
.btn-danger-ghost:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Category info (evaluator guidance) */
.cat-info-btn {
  border: none; background: none; color: var(--primary); cursor: pointer;
  font-size: 1rem; padding: 2px 4px; margin-left: 4px; line-height: 1; vertical-align: middle;
}
.cat-info-btn:hover { color: var(--primary-dark); }
.modal.cat-info { max-width: 420px; text-align: left; }
.cat-info-text { white-space: pre-wrap; margin: 10px 0 14px; color: var(--text, #222); }

/* Library picker on session Categories tab */
.lib-pick-list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 12px; }
.lib-pick { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); }
.lib-pick:hover { background: var(--primary-soft); }

/* Category reorder arrows */
.cat-move-cell { white-space: nowrap; width: 1%; }
.cat-move { padding: 2px 8px; margin-right: 4px; font-size: 0.75rem; }
.cat-move[disabled] { opacity: 0.3; cursor: default; }

/* Evaluator self-results */
.my-results td, .my-results th { text-align: left; }
.my-results td:first-child, .my-results th:first-child,
.my-results td:nth-child(3), .my-results th:nth-child(3) { text-align: center; }
.result-partial td { color: var(--muted, #888); }
.result-partial td:last-child { color: var(--danger); }

/* Finalize */
.finish-btn { margin-left: auto; align-self: center; }
.finalized-banner { background: var(--green-soft); color: var(--green);
  padding: 10px 14px; border-radius: var(--r-md); font-weight: 600; margin-bottom: 12px; }

/* Collapsible cards */
details.card > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
  user-select: none; -webkit-user-select: none;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before {
  content: ''; width: 8px; height: 8px; flex: 0 0 auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform 0.15s;
}
details.card[open] > summary::before { transform: rotate(45deg); }
details.card > summary h3 { font-size: 1rem; font-weight: 700; }
details.card[open] > summary { margin-bottom: 10px; }

/* Card headings: one consistent size */
.card h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }

/* Section label above lists */
.section-label {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); margin: 18px 0 8px;
}

/* Attendance */
.attendance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.attendance-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer; }
.attendance-row:hover { background: var(--primary-soft); }
.attendance-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.attendance-absent { opacity: 0.45; text-decoration: line-through; }
.attendance-row .chip-swatch { margin-left: auto; }

.summary-cell { max-width: 320px; white-space: normal; text-align: left; font-size: 0.85rem; }

/* Placement matrix: letter rows + full-text comment rows */
.placement-matrix .placement-letter-row td { border-bottom: none; }
.placement-comment-row td {
  text-align: left; font-size: 0.85rem; padding: 2px 10px 10px;
  color: var(--muted, #667); background: oklch(0.985 0.003 250);
}
.placement-comment-row .comment-line { margin: 2px 0; white-space: normal; }
.placement-comment-row .comment-line strong { color: var(--text, #223); }
