:root {
  --bg: oklch(0.14 0.016 155);
  --surface: oklch(0.19 0.018 155);
  --surface-2: oklch(0.23 0.02 155);
  --border: oklch(0.30 0.02 155);
  --border-soft: oklch(0.26 0.02 155);
  --text: oklch(0.97 0.004 155);
  --text-muted: oklch(0.68 0.012 155);
  --text-faint: oklch(0.50 0.012 155);
  --accent: oklch(0.78 0.19 152);
  --accent-strong: oklch(0.70 0.19 152);
  --accent-soft: oklch(0.78 0.19 152 / 0.14);
  --accent-ink: oklch(0.14 0.016 155);
  --amber: oklch(0.78 0.15 75);
  --amber-soft: oklch(0.78 0.15 75 / 0.14);
  --red: oklch(0.68 0.18 25);
  --red-soft: oklch(0.68 0.18 25 / 0.12);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

button { font-family: inherit; }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding: 28px 48px;
  border-bottom: 1px solid var(--border-soft);
}

@media (max-width: 640px) {
  .header { padding: 18px 16px; }
  /* the header's right-hand group gets its own full-width row, so the course
     pills flow across it and the status badge / log out sit underneath */
  .header > div:last-child { flex-wrap: wrap; width: 100%; row-gap: 10px; }
  .header .course-strip { flex: 1 1 100%; }
  .badge, #logout { white-space: nowrap; }
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wordmark-text {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.12em;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.badge-amber {
  background: var(--amber-soft);
  border-color: oklch(0.78 0.15 75 / 0.4);
  color: var(--amber);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 24px oklch(0.78 0.19 152 / 0.25);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pin-boxes {
  display: flex;
  gap: 10px;
}

.pin-box {
  flex: 1;
  min-width: 0;
  height: 58px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}

.pin-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.pin-box.error {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.error-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--red);
}

.slot {
  padding: 14px 0;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.slot.selected {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-color: var(--accent);
  box-shadow: 0 8px 20px oklch(0.78 0.19 152 / 0.25);
  cursor: default;
}

.slot.held {
  background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 6px, var(--surface-2) 6px, var(--surface-2) 12px);
  color: var(--text-faint);
  opacity: 0.55;
  cursor: not-allowed;
}

.stepper-btn {
  width: 52px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.stepper-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* Courses this app works for, shown in the signed-in header: every course by name,
   the one the PIN is locked to highlighted, the rest dimmed. */
.course-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.course-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.course-pill.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 640px) {
  .course-pill { padding: 5px 9px; font-size: 10.5px; }
}
