:root {
  --background: #11191d;
  --foreground: #f6efdf;
  --card: #1a252b;
  --muted-foreground: #bac1c1;
  --primary: #e1b974;
  --primary-foreground: #172027;
  --border: #536068;
}
:root {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--foreground);
  background: var(--background);
  line-height: 1.55;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 36px 28px 54px;
}
a {
  color: var(--primary);
  text-underline-offset: 4px;
}
header {
  max-width: 800px;
  padding: 0 2px 22px;
}
.brand {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.11em;
  text-decoration: none;
  color: var(--foreground);
}
.brand span {
  color: var(--primary);
}
.eyebrow {
  color: var(--primary);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 28px 0 6px;
}
h1 {
  font:
    400 clamp(2.7rem, 6vw, 4.2rem)/1.08 Georgia,
    serif;
  margin: 4px 0 8px;
}
.subtitle {
  color: var(--primary);
  font:
    400 clamp(1.2rem, 3vw, 1.55rem)/1.3 Georgia,
    serif;
  margin: 0;
}
#intro {
  color: var(--muted-foreground);
  max-width: 65ch;
  margin: 14px 0 0;
}
.screen {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 18px 60px #0003;
}
.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 22px;
  padding: 8px 16px;
}
button[aria-pressed="true"] {
  color: var(--primary-foreground);
  background: var(--primary);
  border-color: var(--primary);
}
button:hover {
  border-color: var(--primary);
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
.video-wrap {
  position: relative;
  background: #070c0e;
}
video {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 75vh;
  object-fit: contain;
}
video::cue {
  color: white;
  background: #000c;
  font-family: Arial, sans-serif;
  font-size: clamp(16px, 2.5vw, 24px);
  line-height: 1.4;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
}
.toolbar label {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
input {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}
#status {
  color: var(--muted-foreground);
  font-size: 0.85rem;
  text-align: right;
}
.hint {
  color: var(--muted-foreground);
  font-size: 0.86rem;
  margin: 10px 20px 17px;
}
.chapters-section {
  padding: 22px 0 8px;
}
h2 {
  font-size: 1.06rem;
  font-weight: 600;
  margin: 12px 0;
}
#chapters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
#chapters button {
  text-align: left;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-radius: 9px;
  padding: 12px;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  background: var(--card);
}
#chapters button span {
  color: var(--primary);
  font-size: 0.76rem;
}
#chapters button[aria-current="step"] {
  border-color: var(--primary);
  background: var(--card);
  color: var(--foreground);
}
.resources {
  padding: 18px 0;
}
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.downloads a {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 14px;
  text-decoration: none;
  font-size: 0.9rem;
}
.resources .hint {
  margin-left: 0;
  margin-right: 0;
}
.review {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}
.review summary {
  cursor: pointer;
  color: var(--foreground);
}
.review p {
  max-width: 85ch;
}
footer {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
footer span {
  max-width: 60ch;
}
@media (max-width: 650px) {
  main {
    padding: 22px 12px 35px;
  }
  .languages {
    padding: 12px;
    gap: 6px;
  }
  .languages button {
    padding: 7px 10px;
    font-size: 0.86rem;
  }
  .toolbar {
    padding: 12px 12px 0;
  }
  #chapters {
    grid-template-columns: repeat(2, 1fr);
  }
  #chapters button {
    padding: 10px 8px;
    gap: 7px;
  }
  .hint {
    margin-left: 12px;
    margin-right: 12px;
  }
  video::cue {
    font-size: 16px;
  }
  footer {
    display: block;
  }
  footer span {
    display: block;
    margin-top: 12px;
  }
}

.reflection,
details,
#quiz fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  background: var(--card);
}
.reflection p,
details p {
  max-width: 78ch;
}
summary {
  cursor: pointer;
}
#quiz fieldset {
  min-inline-size: 0;
}
#quiz legend {
  padding: 0 6px;
  font-weight: 600;
}
#quiz .quiz-level {
  display: block;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 400;
  margin-bottom: 6px;
}
#quiz label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
}
#quiz input {
  flex-shrink: 0;
}
#quiz p {
  min-height: 1.5em;
}
.reflection .hint {
  margin: 0;
}
h3 {
  font-size: 1rem;
}
footer div {
  max-width: 75ch;
}
video:fullscreen {
  max-height: none;
  height: 100%;
  width: 100%;
}

.modal-open {
  overflow: hidden;
}
.screen.theatre {
  position: fixed;
  inset: 0;
  z-index: 50;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.screen.theatre .video-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.screen.theatre video {
  height: 100%;
  max-height: 100dvh;
}
.screen.theatre .languages,
.screen.theatre .toolbar,
.screen.theatre #language-hint {
  display: none;
}
.toolbar {
  flex-wrap: wrap;
}
.toolbar button {
  font-size: 0.85rem;
  padding: 6px 12px;
}
[hidden] {
  display: none !important;
}
#play-film {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-foreground);
  background: var(--primary);
  font-weight: 600;
  min-height: 48px;
}
#play-film:disabled {
  opacity: 0.65;
}
#close-film {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  color: var(--foreground);
  background: var(--card);
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 32px;
  line-height: 1;
}
#close-film.quiet:not(:focus-visible) {
  opacity: 0;
}
#ai-notice {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  max-width: calc(100% - 150px);
  padding: 10px 18px;
  border-radius: 8px;
  text-align: center;
  color: var(--foreground);
  background: var(--card);
  pointer-events: none;
}
