:root {
  --ink: #0f172a;
  --border: rgba(15, 23, 42, 0.16);
  --shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  color: var(--ink);
  background-color: #f4f2ed;
  background-image:
    radial-gradient(600px circle at 15% 10%, rgba(255, 225, 196, 0.7), transparent 60%),
    radial-gradient(700px circle at 90% 15%, rgba(196, 218, 255, 0.7), transparent 60%),
    linear-gradient(180deg, #f7f4ee 0%, #f1f5f9 100%);
}

body.class-page {
  display: block;
  align-items: initial;
  justify-content: initial;
}

a {
  color: inherit;
  text-decoration: none;
}

.gateway {
  width: min(860px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 32px 24px;
}

.gateway-title {
  margin: 0;
  text-align: center;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(90deg, #0f172a, #1d4ed8, #0f172a);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gateway-title::after {
  content: "";
  display: block;
  width: 120px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #1d4ed8, transparent);
}

.class-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.class-button {
  position: relative;
  isolation: isolate;
  min-height: 110px;
  padding: 26px 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.class-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft), transparent 65%);
  opacity: 0.9;
  z-index: -1;
}

.class-button:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 18px 34px var(--accent-glow);
}

.class-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.accent-ecs {
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.18);
  --accent-glow: rgba(37, 99, 235, 0.28);
}

.accent-web {
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.18);
  --accent-glow: rgba(15, 118, 110, 0.28);
}

.accent-lit {
  --accent: #b45309;
  --accent-soft: rgba(180, 83, 9, 0.18);
  --accent-glow: rgba(180, 83, 9, 0.28);
}

.accent-python {
  --accent: #9a3412;
  --accent-soft: rgba(154, 52, 18, 0.18);
  --accent-glow: rgba(154, 52, 18, 0.28);
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 8px;
}

.signature-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signature {
  height: 200px;
  width: min(520px, 78vw);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 22px rgba(15, 23, 42, 0.22));
}

.signature-caption {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.7);
  background: rgba(245, 246, 250, 0.85);
  padding: 2px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.15);
  pointer-events: none;
}

.class-page .page {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.class-page .page-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.class-page .back-link {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  color: rgba(15, 23, 42, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.class-page .back-link:hover {
  color: rgba(15, 23, 42, 0.95);
  border-color: rgba(15, 23, 42, 0.35);
  transform: translateX(-2px);
}

.class-page .page-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.class-page .page-subtitle {
  margin: 0;
  max-width: 60ch;
  color: rgba(15, 23, 42, 0.7);
}

.class-page .section-title {
  margin: 36px 0 16px;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.65);
}

.class-page .assignment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.class-page .assignment-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.class-page .assignment-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 23, 42, 0.3);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.14);
}

.class-page .assignment-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.class-page .assignment-meta {
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.6);
}

.class-page .assignment-cta {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
}

.assignment-page .assignment-layout {
  display: block;
}

.assignment-page .content-panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.assignment-page .content-panel h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.assignment-page .meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.assignment-page .meta-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.assignment-page .meta-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(15, 23, 42, 0.6);
}

.assignment-page .meta-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 6px;
}

.assignment-page .callout {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(29, 78, 216, 0.2);
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(255, 255, 255, 0.9));
}

.assignment-page .callout h3 {
  margin: 0 0 8px;
}

.assignment-page .stepper {
  position: relative;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  min-height: 420px;
}

.assignment-page .stepper input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.assignment-page .stepper-header h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.assignment-page .stepper-header p {
  margin: 0;
  color: rgba(15, 23, 42, 0.7);
}

.assignment-page .stepper-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
}

.assignment-page .stepper-nav label {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(15, 23, 42, 0.7);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.assignment-page #step-1:checked ~ .stepper-nav label[for="step-1"],
.assignment-page #step-2:checked ~ .stepper-nav label[for="step-2"] {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(15, 23, 42, 0.9);
  color: #fff;
}

.assignment-page .stepper-panels {
  min-height: 240px;
}

.assignment-page .step-panel {
  display: none;
}

.assignment-page #step-1:checked ~ .stepper-panels .step-1,
.assignment-page #step-2:checked ~ .stepper-panels .step-2 {
  display: block;
}

.assignment-page .step-panel h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.assignment-page .step-panel h4 {
  margin: 14px 0 8px;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.65);
}

.assignment-page .step-panel ul {
  margin: 0;
  padding-left: 20px;
}

.assignment-page .sample-frame {
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  padding: 10px;
}

.assignment-page .sample-frame img {
  width: 100%;
  height: 600px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.assignment-page .step-controls {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.assignment-page .step-next,
.assignment-page .step-back {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.25);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.assignment-page .step-next {
  margin-left: auto;
}

.assignment-page .step-next:hover,
.assignment-page .step-back:hover {
  border-color: rgba(15, 23, 42, 0.5);
  transform: translateY(-1px);
}

.assignment-page .file-name {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.08);
  padding: 6px 10px;
  border-radius: 10px;
  display: inline-block;
}

.assignment-page .mission-checklist {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.assignment-page .checklist-title {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: rgba(15, 23, 42, 0.55);
}

.assignment-page .mission-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.assignment-page .mission-item input {
  margin-top: 2px;
  accent-color: #2563eb;
}

.assignment-page .mission-item:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.assignment-page .mission-item input:checked + span {
  color: rgba(15, 23, 42, 0.55);
  text-decoration: line-through;
}

.assignment-page .mission-item input:checked {
  transform: scale(1.08);
}

.assignment-page .mission-item input {
  transition: transform 0.12s ease;
}

.assignment-page .progress-wrap {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.assignment-page .progress-title {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: rgba(15, 23, 42, 0.55);
}

.assignment-page .progress-bar {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.assignment-page .progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transition: width 0.2s ease;
}

.assignment-page .progress-text {
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.6);
  text-align: center;
}

.assignment-page .assignment-notes {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  color: rgba(15, 23, 42, 0.6);
  font-size: 0.9rem;
}

.assignment-page .note-block {
  display: flex;
  gap: 8px;
  align-items: baseline;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 8px;
}

.assignment-page .note-label {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.5);
  min-width: 110px;
}

.notes-page .notes-shell {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.notes-page .notes-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px 0;
}

.notes-page .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: rgba(15, 23, 42, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.notes-page .dot.active {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(37, 99, 235, 0.85);
  transform: scale(1.2);
}

.notes-page .dot:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.7);
  outline-offset: 2px;
}

.notes-page .notes-track {
  display: flex;
  transition: transform 0.3s ease;
}

.notes-page .notes-slide {
  flex: 0 0 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
}

.notes-page .notes-slide h3 {
  margin: 0;
  font-size: 1.2rem;
}

.notes-page .prompt {
  margin: 0;
  color: rgba(15, 23, 42, 0.7);
}

.notes-page .notes-input {
  width: 100%;
  resize: vertical;
  min-height: 180px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #fff;
  padding: 12px;
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
}

.notes-page .notes-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.notes-page .word-count {
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.6);
  text-align: right;
}

.notes-page .notes-controls {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notes-page .nav-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.notes-page .nav-btn.primary {
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  border-color: rgba(15, 23, 42, 0.95);
}

.notes-page .nav-btn:hover {
  border-color: rgba(15, 23, 42, 0.5);
  transform: translateY(-1px);
}

.notes-page .nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.notes-page .slide-indicator {
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.65);
}

.notes-page .export-panel {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.notes-page .export-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.notes-page .export-status {
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.6);
}

.notes-page .json-output {
  width: 100%;
  min-height: 180px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #f8fafc;
  padding: 12px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85rem;
  color: #0f172a;
}

.notes-page .export-note {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.6);
}

@media (max-width: 980px) {
  .assignment-page .stepper {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .class-grid {
    grid-template-columns: 1fr;
  }

  .assignment-page .mission-checklist {
    grid-template-columns: 1fr;
  }

  .notes-page .notes-controls {
    flex-direction: column;
  }

  .signature {
    height: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .class-button {
    transition: none;
  }

  .class-button:hover {
    transform: none;
  }
}
