:root {
  color-scheme: light;
  --navy: #12355b;
  --blue: #1769aa;
  --teal: #087f72;
  --gold: #f4b942;
  --paper: #f4f8fc;
  --card: #ffffff;
  --ink: #17202a;
  --muted: #526473;
  --line: #c7d5e1;
  --focus: #ffbf00;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

a {
  color: var(--blue);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: #fff;
  color: var(--navy);
  border: 3px solid var(--focus);
  border-radius: 8px;
  font-weight: 800;
}

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

.student-header {
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 40px);
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.student-brand {
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  font-size: 1.05rem;
}

.student-safe-label {
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.student-shell {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 6vw, 56px) 0 72px;
}

.launch-status {
  color: var(--muted);
  font-weight: 700;
}

.lesson-heading {
  margin-bottom: 24px;
}

.lesson-meta {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0;
}

h1 {
  color: var(--navy);
  font-size: clamp(2rem, 7vw, 3.7rem);
  line-height: 1.08;
  margin: 8px 0 16px;
}

h2 {
  color: var(--navy);
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.25;
  margin: 0 0 12px;
}

.lesson-objective,
.language-objective {
  max-width: 70ch;
  margin: 8px 0;
}

.language-objective {
  color: var(--muted);
}

.launch-card {
  margin: 0 0 18px;
  padding: clamp(20px, 4vw, 30px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(18, 53, 91, 0.07);
}

.directions-card ol {
  padding-left: 1.5em;
  margin: 12px 0 24px;
}

.directions-card li {
  padding-left: 7px;
  margin-bottom: 9px;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-action,
.small-button,
.resource-link,
.playlist-nav button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-action {
  width: min(100%, 340px);
  padding: 12px 22px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 0 #0d497b;
}

.small-button,
.playlist-nav button {
  border: 2px solid var(--blue);
  background: #fff;
  color: var(--blue);
  padding: 8px 15px;
}

.vocabulary-list,
.resource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vocabulary-word {
  padding: 7px 12px;
  border-radius: 999px;
  background: #e7f4f2;
  color: #075f56;
  font-weight: 750;
}

.sentence-frame {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: #fff8df;
  border-left: 5px solid var(--gold);
  color: #4f3b00;
  font-weight: 700;
}

.resource-link {
  flex: 1 1 190px;
  padding: 11px 16px;
  border: 2px solid #b7d0e5;
  color: var(--navy);
  background: #f8fbfe;
  text-decoration: none;
}

.progress-checks {
  display: grid;
  gap: 12px;
}

.progress-checks label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.progress-checks input {
  width: 24px;
  height: 24px;
  accent-color: var(--teal);
}

.privacy-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 16px 0 0;
}

.next-step {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-left: 5px solid var(--teal);
  border-radius: 10px;
  background: #eef8f6;
  color: #173f38;
  font-weight: 700;
}

.playlist-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}

.playlist-nav button:last-child {
  justify-self: end;
}

.launch-error {
  padding: 26px;
  background: #fff;
  border: 2px solid #b42318;
  border-radius: 18px;
}

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 4px;
}

@media (max-width: 620px) {
  body {
    font-size: 17px;
  }

  .student-safe-label {
    display: none;
  }

  .playlist-nav {
    grid-template-columns: 1fr 1fr;
  }

  .playlist-nav span {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
  }
}

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

@media print {
  .student-header,
  .skip-link,
  .small-button,
  .playlist-nav {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .student-shell {
    width: 100%;
    padding: 0;
  }

  .launch-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
