:root {
  --paper: #f4f1e9;
  --paper-deep: #e8e2d6;
  --ink: #1b1d1c;
  --muted: #5f625f;
  --line: rgba(27, 29, 28, 0.14);
  --blue: #3158d6;
  --blue-dark: #2546af;
  --red: #e54a2e;
  --green: #0d7b67;
  --white: #fffef9;
  --sidebar-width: 252px;
  --radius-small: 12px;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(38, 40, 35, 0.12);
  font-family: "Avenir Next", "Helvetica Neue", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(rgba(27, 29, 28, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 29, 28, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(49, 88, 214, 0.28);
  outline-offset: 3px;
}

svg {
  display: block;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 28px 20px 24px;
  background: rgba(252, 250, 244, 0.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  z-index: 30;
  overflow-y: auto;
}

.brand {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 50% 12px;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
  font-family: "Newsreader", Georgia, serif;
  font-size: 32px;
  line-height: 1;
  transform: rotate(-6deg);
  box-shadow: inset -6px -5px 0 rgba(0, 0, 0, 0.08);
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 26px;
  line-height: 0.95;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.primary-nav {
  display: grid;
  gap: 6px;
  margin-top: 54px;
}

.nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 13px;
  border-radius: 12px;
  color: #5f625f;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(27, 29, 28, 0.05);
  transform: translateX(2px);
}

.nav-item.is-active {
  color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 13px;
}

.sidebar-note {
  margin-top: auto;
  padding: 18px 12px 4px;
  border-top: 1px solid var(--line);
}

.sidebar-note p {
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.mobile-header {
  display: none;
}

#app {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  outline: none;
}

.page {
  width: min(1220px, calc(100% - 80px));
  margin: 0 auto;
  padding: 34px 0 90px;
}

.eyebrow,
.lesson-code {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
}

.page-topline,
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.page-topline h1 {
  margin: 7px 0 0;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.page-heading {
  display: block;
  max-width: 830px;
  margin: 8px 0 26px;
}

.page-heading h1 {
  margin: 10px 0 13px;
  font-size: clamp(34px, 3.5vw, 50px);
  line-height: 1;
  letter-spacing: -0.038em;
}

.page-heading p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.progress-ring {
  --progress: 0deg;
  position: relative;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) var(--progress), var(--paper-deep) 0);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.progress-ring::before {
  content: "";
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--paper);
}

.progress-ring div {
  position: relative;
  display: grid;
  text-align: center;
}

.progress-ring strong {
  font-size: 18px;
}

.progress-ring span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.today-panel {
  position: relative;
  min-height: 440px;
  border-radius: 30px;
  overflow: hidden;
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 52% 48%;
}

.today-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  border-radius: inherit;
}

.today-copy {
  position: relative;
  z-index: 2;
  padding: clamp(38px, 6vw, 70px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.today-copy .lesson-code {
  color: rgba(255, 255, 255, 0.68);
}

.today-copy h2 {
  margin: 16px 0 0;
  max-width: 540px;
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.048em;
}

.today-translation {
  margin: 12px 0 26px;
  color: #f8d7cd;
  font-weight: 700;
}

.today-copy > p:not(.today-translation) {
  max-width: 520px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  gap: 20px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-row span + span {
  position: relative;
}

.meta-row span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -11px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.primary-button,
.secondary-button {
  appearance: none;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.primary-button {
  background: var(--ink);
  color: var(--white);
}

.today-panel .primary-button {
  margin-top: auto;
  background: var(--white);
  color: var(--blue-dark);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
}

.route-poster {
  position: relative;
  appearance: none;
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  background: #f7f0df;
  color: #193330;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}

.route-poster::before {
  display: none;
}

.route-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06) 50%, transparent);
  opacity: 0;
  transform: translateX(-80%);
  transition: opacity 240ms ease, transform 700ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.route-poster:hover::after {
  opacity: 1;
  transform: translateX(80%);
}

.relief-map-image,
.relief-map-vignette,
.relief-route-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.relief-map-image {
  object-fit: cover;
  object-position: center;
  filter: saturate(0.96) contrast(1.02) brightness(1.02);
  transform: scale(1);
  transition: transform 900ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 500ms ease;
}

.route-poster:hover .relief-map-image {
  filter: saturate(1.04) contrast(1.03) brightness(1.03);
  transform: scale(1.025);
}

.relief-map-vignette {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 251, 240, 0.46), transparent 24%, transparent 76%, rgba(239, 224, 194, 0.28)),
    linear-gradient(90deg, rgba(255, 251, 240, 0.32), transparent 25%, transparent 78%, rgba(255, 251, 240, 0.2));
}

.relief-route-map {
  z-index: 2;
  overflow: visible;
}

.relief-region-labels text {
  fill: rgba(36, 91, 87, 0.62);
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.22em;
  paint-order: stroke;
  stroke: rgba(250, 245, 230, 0.92);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.relief-route-shadow,
.relief-route-base,
.relief-route-progress,
.relief-route-spark {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.relief-route-shadow {
  stroke: rgba(89, 67, 42, 0.24);
  stroke-width: 8;
  transform: translate(1px, 3px);
}

.relief-route-base {
  stroke: rgba(27, 54, 51, 0.78);
  stroke-width: 4;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
}

.relief-route-progress {
  stroke: #e74b38;
  stroke-width: 7;
  stroke-dasharray: var(--route-progress) 100;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9))
    drop-shadow(0 3px 6px rgba(179, 57, 40, 0.28));
}

.relief-station-ring {
  fill: rgba(255, 251, 240, 0.98);
  stroke: rgba(24, 54, 51, 0.88);
  stroke-width: 3.5;
  transform-box: fill-box;
  transform-origin: center;
  filter:
    drop-shadow(0 5px 5px rgba(94, 67, 35, 0.25))
    drop-shadow(0 0 0 rgba(255, 255, 255, 0));
}

.relief-station-core {
  fill: var(--red);
}

.relief-a2 .relief-station-core {
  fill: var(--blue);
}

.relief-b1 .relief-station-core {
  fill: var(--green);
}

.relief-meta .relief-station-core {
  fill: #d7a52d;
}

.relief-station.is-active .relief-station-ring {
  stroke: #e74b38;
  stroke-width: 6;
  animation: relief-station-pulse 2.4s ease-in-out infinite;
}

.relief-city-halo {
  fill: rgba(255, 251, 240, 0.96);
  stroke: rgba(28, 61, 57, 0.68);
  stroke-width: 3;
  filter: drop-shadow(0 3px 3px rgba(88, 61, 31, 0.24));
}

.relief-city.is-past .relief-city-halo {
  stroke: #e74b38;
  stroke-width: 4;
}

.relief-city.is-next .relief-city-halo {
  stroke: #e74b38;
  stroke-width: 5;
  transform-box: fill-box;
  transform-origin: center;
  animation: relief-station-pulse 2.4s ease-in-out infinite;
}

.relief-city-name {
  fill: #173d39;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.12em;
  paint-order: stroke;
  stroke: rgba(250, 246, 232, 0.96);
  stroke-width: 7px;
  stroke-linejoin: round;
}

.relief-city-number {
  fill: #173d39;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(250, 246, 232, 0.94);
  stroke-width: 2px;
  stroke-linejoin: round;
}

.relief-station text {
  fill: #173d39;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  paint-order: stroke;
  stroke: rgba(250, 246, 232, 0.96);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.relief-station-level {
  fill: white !important;
  font-size: 17px;
  font-weight: 900;
  text-anchor: middle;
  stroke-width: 0;
}

.relief-station-city {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.relief-station-progress {
  fill: rgba(31, 71, 66, 0.7) !important;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.relief-travel-beam {
  stroke: rgba(221, 62, 44, 0.72);
  stroke-width: 2.5;
  stroke-dasharray: 2 6;
  filter: drop-shadow(0 1px 3px rgba(179, 57, 40, 0.3));
}

.relief-travel-pulse {
  fill: rgba(255, 219, 114, 0.12);
  stroke: rgba(255, 219, 114, 0.78);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: travel-radar 2.3s ease-out infinite;
}

.relief-travel-ring {
  fill: rgba(5, 13, 15, 0.96);
  stroke: #ffdc72;
  stroke-width: 5;
  filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.72));
}

.relief-travel-core {
  fill: white;
}

.relief-travel-beacon {
  fill: #fffaf0;
  stroke: #e74b38;
  stroke-width: 3;
  filter:
    drop-shadow(0 0 3px white)
    drop-shadow(0 3px 8px rgba(179, 57, 40, 0.34));
}

.relief-travel-label {
  fill: #d73f2f;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.14em;
  paint-order: stroke;
  stroke: rgba(250, 246, 232, 0.96);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.poland-route-map {
  display: none;
  position: absolute;
  inset: 4% -2% auto auto;
  width: 104%;
  height: 91%;
  transition: transform 500ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.route-poster:hover .poland-route-map {
  transform: scale(1.025) rotate(-0.35deg);
}

.map-country-shadow {
  fill: rgba(87, 28, 17, 0.32);
  filter: url("#poland-paper-shadow");
  transform: translate(4px, 6px);
}

.map-country {
  fill: #f0dfbd;
  stroke: rgba(255, 249, 232, 0.92);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.map-river,
.map-contour,
.map-fold {
  fill: none;
  stroke: rgba(143, 66, 43, 0.18);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.map-river {
  stroke: rgba(66, 136, 168, 0.62);
  stroke-width: 2.2;
  stroke-dasharray: 2 4;
}

.map-fold {
  stroke: rgba(118, 56, 38, 0.13);
  stroke-dasharray: 4 6;
}

.city-road-network {
  fill: none;
  stroke: rgba(125, 82, 56, 0.27);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 260ms ease;
}

.route-poster:hover .city-road-network {
  stroke: rgba(125, 82, 56, 0.42);
}

.regional-cities {
  opacity: 0.76;
  transition: opacity 260ms ease;
}

.route-poster:hover .regional-cities {
  opacity: 1;
}

.map-city circle {
  fill: #9c4a34;
  stroke: #f0dfbd;
  stroke-width: 1.5;
}

.map-city text {
  fill: #754131;
  font-size: 6.2px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.baltic-mark {
  fill: rgba(255, 246, 224, 0.72);
  stroke: rgba(255, 246, 224, 0.44);
  stroke-width: 1.2;
}

.baltic-mark text {
  stroke: none;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.local-icon {
  fill: none;
  stroke: #9f4933;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
  transition: opacity 240ms ease, transform 400ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.route-poster:hover .local-icon {
  opacity: 1;
}

.local-icon text,
.pierogi-stamp text,
.tatry-mark text {
  fill: #8b3e2d;
  stroke: none;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.local-icon .icon-accent {
  stroke: #d45234;
}

.pierogi-stamp {
  fill: none;
  stroke: rgba(143, 66, 43, 0.54);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}

.pierogi-stamp text {
  text-anchor: middle;
}

.tatry-mark {
  fill: none;
  stroke: rgba(111, 76, 52, 0.64);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-shadow,
.route-main {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-shadow {
  stroke: rgba(101, 44, 28, 0.2);
  stroke-width: 16;
  transform: translate(3px, 4px);
}

.route-main {
  stroke: #d34f32;
  stroke-width: 8;
  stroke-dasharray: 3 14;
  animation: route-dash 16s linear infinite;
}

.map-station circle {
  fill: var(--red);
  stroke: var(--white);
  stroke-width: 5;
  transition: r 200ms ease;
}

.route-poster:hover .map-station circle {
  r: 26px;
}

.map-station > text:not(.station-city, .station-progress) {
  fill: white;
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-anchor: middle;
}

.station-a2 circle {
  fill: var(--blue);
}

.station-b1 circle {
  fill: var(--green);
}

.station-a2 > text:not(.station-city, .station-progress),
.station-b1 > text:not(.station-city, .station-progress) {
  fill: white;
}

.station-city {
  fill: #7e3828;
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.station-progress {
  fill: rgba(100, 54, 38, 0.7);
  font-family: "Manrope", sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.travel-dot {
  fill: #ffd75d;
  stroke: white;
  stroke-width: 4;
  transform-box: fill-box;
  transform-origin: center;
  animation: travel-pulse 1.8s ease-in-out infinite;
}

.poster-word {
  position: absolute;
  top: 38px;
  left: 30px;
  z-index: 2;
  font-family: "Newsreader", Georgia, serif;
  font-size: 24px;
  font-style: italic;
}

.poster-kicker {
  position: absolute;
  top: 23px;
  left: 31px;
  z-index: 2;
  color: rgba(34, 74, 69, 0.62);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.map-legend,
.poster-open {
  position: absolute;
  z-index: 2;
  bottom: 23px;
  font-size: 11px;
  font-weight: 700;
}

.map-legend {
  left: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-legend i {
  width: 25px;
  height: 2px;
  background: var(--white);
}

.poster-open {
  right: 28px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.poster-open b {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

@keyframes route-dash {
  to {
    stroke-dashoffset: -280;
  }
}

@keyframes relief-route-dash {
  to {
    stroke-dashoffset: -320;
  }
}

@keyframes relief-station-pulse {
  50% {
    transform: scale(1.14);
    opacity: 0.82;
  }
}

@keyframes travel-radar {
  0% {
    opacity: 0.9;
    transform: scale(0.62);
  }
  75%,
  100% {
    opacity: 0;
    transform: scale(1.65);
  }
}

@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.enter-up {
  animation: enter-up 620ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.home-section {
  margin-top: 72px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.text-button,
.text-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.text-button:hover,
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.level-lines {
  border-top: 1px solid var(--line);
}

.level-line {
  appearance: none;
  width: 100%;
  padding: 22px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 20px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: padding 180ms ease, background 180ms ease;
}

.level-line:hover {
  padding-left: 14px;
  padding-right: 14px;
  background: rgba(255, 255, 255, 0.35);
}

.level-badge,
.grammar-level {
  --level-color: var(--blue);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--level-color);
  color: white;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.level-line-copy {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: center;
  gap: 20px;
}

.level-line-copy strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
}

.level-line-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.slim-progress {
  grid-column: 1 / -1;
  height: 2px;
  background: var(--paper-deep);
}

.slim-progress i {
  display: block;
  height: 100%;
  background: var(--level-color);
  transition: width 500ms ease;
}

.level-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.compact-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.compact-stats > div {
  padding: 28px 24px;
  display: grid;
  border-right: 1px solid var(--line);
}

.compact-stats > div:last-child {
  border-right: 0;
}

.stat-number {
  font-family: "Newsreader", Georgia, serif;
  font-size: 44px;
  line-height: 1;
}

.stat-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Journey */

.journey-map-hero {
  --level-color: var(--blue);
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 26px;
  background: #f5eedf;
  color: #173d39;
  box-shadow:
    0 28px 70px rgba(80, 58, 31, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.72) inset;
  display: grid;
  grid-template-rows: minmax(520px, 1fr) auto;
  isolation: isolate;
}

.journey-map-hero::after {
  content: "";
  position: absolute;
  z-index: 6;
  inset: 0;
  border: 1px solid rgba(103, 78, 47, 0.2);
  border-radius: inherit;
  box-shadow:
    inset 0 0 70px rgba(113, 84, 47, 0.06),
    inset 0 -1px 0 rgba(87, 62, 34, 0.16);
  pointer-events: none;
}

.journey-map-canvas {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.journey-map-canvas > img,
.journey-map-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.journey-map-canvas > img {
  object-fit: contain;
  object-position: center;
  filter: saturate(0.96) contrast(1.02) brightness(1.02);
  transform: none;
  transition: filter 500ms ease;
}

.journey-map-hero:hover .journey-map-canvas > img {
  filter: saturate(1.03) contrast(1.03) brightness(1.03);
  transform: none;
}

.journey-map-vignette {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 251, 240, 0.54) 0, transparent 21%, transparent 78%, rgba(238, 222, 192, 0.32) 100%),
    linear-gradient(90deg, rgba(255, 251, 240, 0.3), transparent 24%, transparent 78%, rgba(255, 251, 240, 0.2));
}

.journey-game-brand,
.journey-game-progress {
  position: absolute;
  z-index: 4;
}

.journey-game-brand {
  top: 38px;
  left: 42px;
  display: grid;
  gap: 4px;
}

.journey-game-brand strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 30px;
  letter-spacing: 0.06em;
}

.journey-game-brand span,
.journey-game-progress > span,
.journey-game-stage > span,
.journey-game-next span {
  color: rgba(34, 74, 69, 0.62);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.journey-game-progress {
  top: 34px;
  right: 42px;
  width: 176px;
  text-align: right;
}

.journey-game-progress strong {
  margin-top: 2px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 52px;
  font-weight: 500;
  line-height: 0.9;
  display: block;
}

.journey-game-progress strong sup {
  margin-left: 2px;
  color: #db4130;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 13px;
  font-weight: 900;
  vertical-align: super;
}

.journey-game-progress > i {
  height: 2px;
  margin: 10px 0 7px;
  overflow: hidden;
  background: rgba(31, 71, 66, 0.2);
  display: block;
}

.journey-game-progress > i b {
  display: block;
  height: 100%;
  background: #e74b38;
  box-shadow: 0 2px 8px rgba(179, 57, 40, 0.28);
  transition: width 500ms ease;
}

.journey-game-progress small {
  color: rgba(34, 74, 69, 0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-game-stage {
  width: 310px;
}

.journey-game-stage > div {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.journey-game-stage > div > strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 66px;
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.05em;
}

.journey-game-stage > div > i {
  width: 30px;
  height: 1px;
  background: #e74b38;
}

.journey-game-stage h1 {
  margin: 0;
  font-size: 38px;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
}

.journey-game-stage p {
  margin: 12px 0 0;
  color: rgba(31, 71, 66, 0.72);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 800;
}

.journey-game-stage p i {
  color: #d83f2f;
  font-style: normal;
}

.journey-game-next {
  appearance: none;
  width: 220px;
  padding-left: 16px;
  border-left: 1px solid rgba(31, 71, 66, 0.22);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  color: #173d39;
  text-align: left;
  cursor: pointer;
}

.journey-game-next strong {
  margin: 5px 0 4px;
  color: #d83f2f;
  font-size: 21px;
  letter-spacing: 0.08em;
  display: block;
}

.journey-game-next small {
  color: rgba(31, 71, 66, 0.6);
  font-size: 11px;
}

.journey-game-next:hover strong {
  color: #a92d20;
}

.journey-infographic-dock {
  position: relative;
  z-index: 5;
  min-height: 146px;
  padding: 26px 38px 24px;
  border-top: 1px solid rgba(52, 82, 71, 0.18);
  background:
    linear-gradient(90deg, rgba(205, 176, 119, 0.08), transparent 30%, transparent 70%, rgba(205, 176, 119, 0.08)),
    #fffaf0;
  display: grid;
  grid-template-columns: minmax(285px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 42px;
}

.level-tabs {
  width: fit-content;
  margin-bottom: 28px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  gap: 3px;
}

.heading-level-row {
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: end;
  gap: clamp(24px, 3vw, 48px);
}

.heading-level-row .page-heading {
  min-width: 0;
  margin: 10px 0 0;
}

.heading-level-row .level-tabs {
  margin: 0 0 5px;
}

.heading-level-row .level-tabs button {
  min-width: 116px;
  padding: 9px 13px;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.heading-level-row .level-tabs button small {
  white-space: nowrap;
}

.level-tabs.journey-level-tabs {
  position: relative;
  z-index: 1;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 26px;
  transform: none;
}

.level-tabs.journey-level-tabs button {
  position: relative;
  min-width: 70px;
  padding: 8px 0 12px;
  border-radius: 0;
  color: rgba(31, 71, 66, 0.62);
  display: grid;
  gap: 2px;
  text-align: left;
}

.level-tabs.journey-level-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(31, 71, 66, 0.22);
  transition: height 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.level-tabs.journey-level-tabs button span {
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.level-tabs.journey-level-tabs button small {
  color: rgba(31, 71, 66, 0.52);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.level-tabs.journey-level-tabs button.is-active {
  background: transparent;
  color: #173d39;
  box-shadow: none;
}

.level-tabs.journey-level-tabs button.is-active::after {
  height: 3px;
  background: #e74b38;
  box-shadow: 0 2px 8px rgba(179, 57, 40, 0.28);
}

.level-tabs.journey-level-tabs button.is-active small {
  color: rgba(31, 71, 66, 0.76);
}

/* Editorial journey hero */

.journey-editorial-hero {
  --editorial-red: #df3429;
  --editorial-blue: #14344d;
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-radius: 28px;
  background: #f8efdc;
  color: var(--editorial-blue);
  box-shadow:
    0 28px 70px rgba(72, 53, 33, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.58);
  isolation: isolate;
  animation: editorial-hero-arrive 620ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.journey-editorial-hero::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  border: 1px solid rgba(24, 31, 33, 0.17);
  border-radius: inherit;
  box-shadow: inset 0 0 70px rgba(93, 64, 31, 0.06);
  pointer-events: none;
}

.editorial-hero-art,
.editorial-hero-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.editorial-hero-art {
  z-index: -2;
  object-fit: cover;
  object-position: center;
  transform: scale(1.012);
  transition: transform 1100ms cubic-bezier(0.2, 0.72, 0.2, 1), filter 500ms ease;
  animation: editorial-art-arrive 900ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.journey-editorial-hero:hover .editorial-hero-art {
  filter: saturate(1.04) contrast(1.015);
  transform: scale(1.035);
}

.editorial-hero-wash {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(249, 239, 219, 0.99) 0%, rgba(249, 239, 219, 0.95) 28%, rgba(249, 239, 219, 0.46) 45%, transparent 63%),
    linear-gradient(0deg, rgba(13, 31, 43, 0.2), transparent 25%);
  pointer-events: none;
}

.editorial-hero-copy {
  position: absolute;
  z-index: 2;
  top: clamp(46px, 5vw, 62px);
  left: clamp(38px, 5vw, 58px);
  width: min(43%, 460px);
}

.editorial-hero-kicker,
.editorial-course-progress > span,
.editorial-next-copy small {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.editorial-hero-kicker {
  color: var(--editorial-blue);
}

.editorial-hero-copy h1 {
  margin: 14px 0 0;
  color: var(--editorial-red);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(78px, 8.2vw, 106px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

.editorial-hero-copy h1 span {
  width: 430px;
  max-width: 100%;
  margin: 13px 0 0 4px;
  color: var(--editorial-blue);
  display: block;
  font-size: clamp(28px, 3vw, 37px);
  font-style: italic;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-transform: none;
}

.editorial-hero-copy > p {
  max-width: 350px;
  margin: 29px 0 0;
  color: #354750;
  font-size: 14px;
  line-height: 1.58;
}

.editorial-course-progress {
  position: absolute;
  z-index: 2;
  top: 48px;
  right: 48px;
  width: 132px;
  color: white;
  text-align: right;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.editorial-course-progress > span,
.editorial-course-progress small {
  display: block;
}

.editorial-course-progress strong {
  margin-top: 5px;
  display: block;
  font-family: "Newsreader", Georgia, serif;
  font-size: 52px;
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.editorial-course-progress strong sup {
  margin-left: 2px;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 13px;
  vertical-align: super;
}

.editorial-course-progress > i {
  height: 3px;
  margin: 14px 0 8px;
  background: rgba(255, 255, 255, 0.38);
  display: block;
  overflow: hidden;
}

.editorial-course-progress > i b {
  height: 100%;
  background: white;
  display: block;
  transition: width 500ms ease;
}

.editorial-course-progress small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editorial-next {
  position: absolute;
  z-index: 3;
  left: clamp(38px, 5vw, 58px);
  bottom: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
  cursor: pointer;
}

.editorial-next-action {
  padding: 16px 22px;
  border-radius: 999px;
  background: var(--editorial-red);
  color: white;
  box-shadow: 0 12px 28px rgba(174, 38, 29, 0.25);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.editorial-next:hover .editorial-next-action {
  background: #bd271e;
  box-shadow: 0 15px 34px rgba(174, 38, 29, 0.34);
  transform: translateY(-2px);
}

.editorial-next-action b {
  margin-left: 8px;
}

.editorial-next-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.editorial-next-copy small {
  color: rgba(20, 52, 77, 0.66);
  font-size: 8px;
}

.editorial-next-copy strong {
  max-width: 260px;
  overflow: hidden;
  color: var(--editorial-blue);
  font-family: "Newsreader", Georgia, serif;
  font-size: 23px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editorial-level-tabs {
  position: absolute;
  z-index: 3;
  right: 38px;
  bottom: 36px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.editorial-level-tabs button {
  appearance: none;
  width: 72px;
  height: 72px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(11, 34, 50, 0.84);
  color: white;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  transition: width 220ms ease, height 220ms ease, background 180ms ease, transform 180ms ease;
}

.editorial-level-tabs button:hover {
  background: rgba(11, 34, 50, 0.95);
  transform: translateY(-3px);
}

.editorial-level-tabs button.is-active {
  width: 88px;
  height: 88px;
  border-color: transparent;
  background: var(--editorial-red);
}

.editorial-level-tabs button strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 29px;
  line-height: 0.9;
}

.editorial-level-tabs button small {
  overflow: hidden;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes editorial-hero-arrive {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes editorial-art-arrive {
  from {
    opacity: 0.45;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1.012);
  }
}

.journey-route-section {
  margin-top: 78px;
}

.journey-route-section .route-list {
  max-width: 980px;
  margin-top: 10px;
}

.journey-route-section .route-step {
  min-height: 116px;
}

.level-tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  min-width: 96px;
  padding: 10px 17px;
  border-radius: 999px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.level-tabs button span {
  font-weight: 800;
}

.level-tabs button small {
  color: var(--muted);
  font-size: 9px;
}

.level-tabs button.is-active {
  background: var(--ink);
  color: var(--white);
}

.level-tabs button.is-active small {
  color: rgba(255, 255, 255, 0.6);
}

.level-intro {
  position: relative;
  min-height: 210px;
  padding: 36px 40px;
  border-top: 4px solid var(--level-color);
  background: rgba(255, 255, 255, 0.38);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  overflow: hidden;
}

.level-intro::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -50px;
  width: 220px;
  height: 220px;
  border: 45px solid color-mix(in srgb, var(--level-color), transparent 86%);
  border-radius: 50%;
}

.level-intro h2 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.level-intro p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.level-progress-large {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: right;
}

.level-progress-large strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 48px;
  line-height: 1;
}

.level-progress-large span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.route-list {
  margin: 34px 0 0 30px;
}

.route-step {
  position: relative;
  appearance: none;
  width: 100%;
  min-height: 105px;
  padding: 17px 20px 17px 66px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, padding 180ms ease;
}

.route-step:hover {
  padding-right: 30px;
  background: rgba(255, 255, 255, 0.42);
}

.step-track {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  display: flex;
  justify-content: center;
}

.step-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.step-track i {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  margin-top: 37px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
}

.route-step.is-complete .step-track i {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.route-step.is-next .step-track i {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  box-shadow: 0 0 0 7px rgba(49, 88, 214, 0.12);
}

.route-step.is-review {
  background: rgba(27, 29, 28, 0.035);
}

.route-step.is-review .step-track i {
  border-radius: 9px;
}

.route-step.is-vocabulary {
  background: color-mix(in srgb, var(--blue), transparent 96%);
}

.route-step.is-vocabulary .step-track i {
  border-color: color-mix(in srgb, var(--blue), transparent 55%);
  border-radius: 50% 50% 50% 8px;
  color: var(--blue);
  transform: rotate(-4deg);
}

.route-step.is-vocabulary .step-kind {
  color: var(--blue);
}

.step-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.step-meta,
.step-kind {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step-copy strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 25px;
  line-height: 1.15;
}

.step-copy small {
  color: var(--muted);
  font-size: 11px;
}

.step-kind b {
  margin-left: 8px;
  color: var(--ink);
  font-size: 16px;
}

/* Lesson */

.lesson-page {
  --level-color: var(--blue);
  width: 100%;
  padding-bottom: 80px;
}

.lesson-toolbar {
  position: sticky;
  top: 0;
  z-index: 18;
  min-height: 66px;
  padding: 0 max(4vw, 32px);
  background: rgba(244, 241, 233, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.lesson-toolbar-progress {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.lesson-toolbar-progress i {
  width: 150px;
  height: 3px;
  background: var(--paper-deep);
}

.lesson-toolbar-progress b {
  display: block;
  height: 100%;
  background: var(--level-color);
}

.lesson-hero {
  position: relative;
  min-height: 350px;
  padding: 60px max(8vw, 70px) 52px;
  background: var(--level-color);
  color: white;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 45px;
  align-items: start;
  overflow: hidden;
}

.lesson-hero::before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  border: 90px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  right: -130px;
  top: -170px;
}

.lesson-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.lesson-number {
  font-family: "Newsreader", Georgia, serif;
  font-size: 27px;
  border-top: 2px solid currentColor;
  padding-top: 8px;
}

.lesson-hero > div:nth-child(2) {
  position: relative;
  z-index: 1;
  max-width: 850px;
}

.lesson-hero .lesson-code {
  color: rgba(255, 255, 255, 0.65);
}

.lesson-hero h1 {
  margin: 14px 0 0;
  max-width: 960px;
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.lesson-subtitle {
  margin: 17px 0 30px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  font-weight: 700;
}

.lesson-goal {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.7;
}

.completed-stamp {
  position: absolute;
  z-index: 2;
  right: 5vw;
  bottom: 52px;
  transform: rotate(-7deg);
  padding: 8px 14px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  font-family: "Newsreader", Georgia, serif;
  font-size: 16px;
}

.lesson-content,
.quiz-section,
.review-intro,
.lesson-neighbors {
  width: min(940px, calc(100% - 80px));
  margin-left: auto;
  margin-right: auto;
}

.learning-block {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 35px;
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.block-index {
  padding-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.situation-block h2 {
  max-width: 720px;
  margin: 12px 0 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.rule-lead {
  margin: 17px 0 26px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(25px, 3.3vw, 38px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.reading-guide {
  margin: 36px 0;
  border-top: 1px solid var(--line);
}

.reading-guide-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) 1fr;
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.reading-guide-row > strong {
  color: var(--level-color);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 650;
  letter-spacing: -0.025em;
}

.reading-guide-row > div {
  display: grid;
  gap: 5px;
}

.reading-guide-row span {
  font-size: 13px;
  font-weight: 800;
}

.reading-guide-row p {
  max-width: 610px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.reading-guide-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.pattern-strip {
  padding: 18px 22px;
  background: var(--ink);
  color: var(--white);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.6;
}

.example-list {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.example-row {
  min-height: 82px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: center;
}

.example-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.example-row strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 20px;
}

.example-row span {
  color: var(--muted);
  font-size: 14px;
}

.speaker-button {
  appearance: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.speaker-button svg,
.speaker-large svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.speaker-button svg path:nth-child(n + 2),
.speaker-large svg path:nth-child(n + 2) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.speaker-button:hover,
.speaker-button.is-speaking {
  background: var(--level-color, var(--blue));
  border-color: transparent;
  color: white;
  transform: scale(1.06);
}

.pitfall {
  margin-top: 28px;
  padding: 22px 25px;
  border-left: 3px solid var(--red);
  background: rgba(229, 74, 46, 0.07);
}

.pitfall span {
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pitfall p {
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 1.65;
}

.review-intro {
  padding: 90px 0 50px;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 40px;
}

.review-mark {
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Newsreader", Georgia, serif;
  font-size: 38px;
}

.review-intro h2 {
  margin: 10px 0;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1;
}

.review-intro p {
  color: var(--muted);
  line-height: 1.65;
}

.review-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.review-topics span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.quiz-section {
  padding: 84px 0;
}

.quiz-heading {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 35px;
  margin-bottom: 28px;
}

.quiz-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
}

.quiz-card {
  margin-left: 105px;
  padding: clamp(28px, 4.5vw, 52px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(27, 29, 28, 0.08);
}

.quiz-card.quiz-stage-summary {
  border-top: 4px solid var(--level-color);
}

.quiz-card.quiz-stage-retry {
  border-top: 4px solid var(--red);
}

.quiz-stage-summary .quiz-progress span {
  color: var(--level-color);
}

.quiz-stage-retry .quiz-progress span {
  color: var(--red);
}

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quiz-progress i {
  width: 120px;
  height: 3px;
  background: var(--paper-deep);
}

.quiz-progress b {
  display: block;
  height: 100%;
  background: var(--level-color);
  transition: width 250ms ease;
}

.question-source {
  display: inline-block;
  margin-top: 28px;
  color: var(--level-color);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-scenario {
  max-width: 720px;
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 3px solid var(--level-color);
  background: color-mix(in srgb, var(--level-color), transparent 95%);
}

.task-scenario span {
  color: var(--level-color);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-scenario p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.quiz-card h3 {
  max-width: 720px;
  margin: 32px 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.25;
}

.question-source + h3 {
  margin-top: 10px;
}

.task-scenario + h3 {
  margin-top: 18px;
}

.answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.answer-option {
  appearance: none;
  min-height: 72px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: border 180ms ease, background 180ms ease, transform 180ms ease;
}

.answer-option:hover:not(:disabled) {
  border-color: var(--level-color);
  transform: translateY(-2px);
}

.answer-option > span {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
}

.answer-option strong {
  font-size: 14px;
  line-height: 1.45;
}

.answer-option.is-selected {
  border-color: var(--level-color);
  background: color-mix(in srgb, var(--level-color), transparent 93%);
}

.answer-option.is-selected > span {
  border-color: var(--level-color);
  background: var(--level-color);
  color: white;
}

.answer-option.is-correct {
  border-color: var(--green);
  background: rgba(13, 123, 103, 0.08);
}

.answer-option.is-correct > span {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.answer-option.is-wrong {
  border-color: var(--red);
  background: rgba(229, 74, 46, 0.07);
}

.answer-option.is-wrong > span {
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.answer-feedback {
  margin-top: 18px;
  padding: 18px 20px;
  border-left: 3px solid currentColor;
  background: rgba(13, 123, 103, 0.06);
}

.answer-feedback.is-correct {
  color: var(--green);
}

.answer-feedback.is-wrong {
  color: var(--red);
  background: rgba(229, 74, 46, 0.06);
}

.answer-feedback strong {
  font-size: 13px;
}

.answer-feedback p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.answer-feedback small {
  display: block;
  margin-top: 9px;
  color: currentColor;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quiz-actions {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
}

.quiz-result {
  margin-left: 105px;
  padding: 45px;
  border-top: 4px solid var(--green);
  background: var(--white);
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 30px;
}

.quiz-result.is-retry {
  border-top-color: var(--red);
}

.result-score {
  font-family: "Newsreader", Georgia, serif;
  font-size: 58px;
}

.quiz-result h3 {
  margin: 8px 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 30px;
}

.quiz-result p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.result-actions {
  grid-column: 2;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lesson-neighbors {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.lesson-neighbors button {
  appearance: none;
  min-height: 110px;
  padding: 24px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  text-align: left;
  cursor: pointer;
}

.lesson-neighbors button:last-child {
  border-right: 0;
  text-align: right;
  align-items: flex-end;
}

.lesson-neighbors button:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lesson-neighbors span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lesson-neighbors strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 18px;
}

.lesson-dialogue-preview {
  width: min(940px, calc(100% - 80px));
  margin: 0 auto;
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.dialogue-preview-heading {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 35px;
}

.dialogue-preview-heading h2 {
  margin: 10px 0;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1;
}

.dialogue-preview-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.dialogue-preview-lines {
  margin: 30px 0 24px 105px;
  border-top: 1px solid var(--line);
}

.dialogue-preview-lines > div {
  min-height: 76px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 5px 18px;
  align-content: center;
}

.dialogue-preview-lines span {
  grid-row: 1 / 3;
  color: var(--level-color);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialogue-preview-lines strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 18px;
}

.dialogue-preview-lines small {
  color: var(--muted);
  font-size: 10px;
}

.lesson-dialogue-preview > .primary-button {
  margin-left: 105px;
  background: var(--level-color);
}

/* Dialogues */

.dialogues-heading {
  max-width: 980px;
}

.conversation-level-tabs {
  margin-top: -12px;
}

.conversation-stage {
  --level-color: var(--red);
  min-height: 410px;
  padding: clamp(34px, 4.2vw, 56px);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 25%, color-mix(in srgb, var(--level-color) 65%, transparent), transparent 36%),
    linear-gradient(135deg, #171d1b, #202925);
  color: white;
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
  box-shadow: var(--shadow);
}

.conversation-stage-copy {
  position: relative;
  z-index: 2;
}

.conversation-stage .lesson-code {
  color: rgba(255, 255, 255, 0.62);
}

.conversation-stage h2 {
  max-width: 570px;
  margin: 14px 0 12px;
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 0.96;
  letter-spacing: -0.048em;
}

.conversation-stage-copy > p {
  max-width: 500px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.65;
}

.conversation-stage-meta {
  margin: 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.conversation-stage .primary-button {
  background: white;
  color: var(--ink);
}

.conversation-stage-script {
  position: relative;
  display: grid;
  gap: 14px;
}

.conversation-stage-script::before {
  content: "“";
  position: absolute;
  top: -105px;
  right: -10px;
  color: rgba(255, 255, 255, 0.08);
  font-family: "Newsreader", Georgia, serif;
  font-size: 260px;
  line-height: 1;
}

.conversation-stage-script > div {
  position: relative;
  transform: translateX(calc(var(--line-index) * 18px));
  padding: 19px 22px;
  border-left: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: enter-up 480ms both;
  animation-delay: calc(var(--line-index) * 90ms);
}

.conversation-stage-script span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.conversation-stage-script strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 19px;
  line-height: 1.25;
}

.conversation-stage-script small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  line-height: 1.5;
}

.conversation-library {
  margin-top: 76px;
}

.conversation-list {
  border-top: 1px solid var(--line);
}

.conversation-row {
  appearance: none;
  width: 100%;
  min-height: 108px;
  padding: 18px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 45px 135px minmax(210px, 0.8fr) minmax(280px, 1fr) 74px;
  gap: 18px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, padding 180ms ease;
}

.conversation-row:hover {
  padding-inline: 14px;
  background: rgba(255, 255, 255, 0.4);
}

.conversation-row-index,
.conversation-row-place,
.conversation-row-state {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.conversation-row-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.conversation-row-copy strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 23px;
  line-height: 1.05;
}

.conversation-row-copy small,
.conversation-row-goal {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.conversation-row-state {
  justify-self: end;
  color: var(--ink);
}

.conversation-row.is-complete .conversation-row-state {
  color: var(--green);
}

.dialogue-page {
  --level-color: var(--red);
  width: 100%;
  padding-bottom: 80px;
}

.dialogue-toolbar {
  position: sticky;
  top: 0;
  z-index: 18;
  min-height: 66px;
  padding: 0 max(4vw, 32px);
  background: rgba(244, 241, 233, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialogue-toolbar > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.dialogue-hero {
  position: relative;
  min-height: 370px;
  padding: 68px max(8vw, 70px) 58px;
  overflow: hidden;
  background: var(--level-color);
  color: white;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 70px;
  align-items: end;
}

.dialogue-hero::before {
  content: "“ ”";
  position: absolute;
  top: -85px;
  right: 4vw;
  color: rgba(255, 255, 255, 0.09);
  font-family: "Newsreader", Georgia, serif;
  font-size: 260px;
  line-height: 1;
}

.dialogue-hero > div {
  position: relative;
  z-index: 1;
}

.dialogue-hero h1 {
  max-width: 980px;
  margin: 14px 0 0;
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.dialogue-translation {
  margin: 16px 0 25px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 800;
}

.dialogue-hero div:first-child > p:last-child {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.65;
}

.dialogue-cast {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dialogue-cast .eyebrow {
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 5px;
}

.dialogue-cast strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 20px;
}

.dialogue-transcript,
.dialogue-phrases > header,
.dialogue-phrases > div,
.dialogue-quiz-section,
.dialogue-neighbors {
  width: min(940px, calc(100% - 80px));
  margin-left: auto;
  margin-right: auto;
}

.dialogue-transcript {
  padding: 90px 0 80px;
}

.dialogue-transcript > header h2,
.dialogue-phrases h2 {
  max-width: 720px;
  margin: 10px 0 28px;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1;
}

.dialogue-lines {
  border-top: 1px solid var(--line);
}

.dialogue-line {
  min-height: 108px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 46px 110px 1fr 44px;
  gap: 18px;
  align-items: center;
}

.dialogue-line-number,
.dialogue-speaker {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dialogue-speaker {
  color: var(--level-color);
}

.dialogue-line > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dialogue-line strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
}

.dialogue-line small {
  color: var(--muted);
  font-size: 13px;
}

.dialogue-phrases {
  padding: 78px 0;
  background: var(--ink);
  color: white;
}

.dialogue-phrases > div {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.dialogue-phrases article {
  min-height: 170px;
  padding: 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.dialogue-phrases article:last-child {
  border-right: 0;
}

.dialogue-phrases .speaker-button {
  border-color: rgba(255, 255, 255, 0.3);
}

.dialogue-phrases strong {
  margin-top: auto;
  font-family: "Newsreader", Georgia, serif;
  font-size: 21px;
}

.dialogue-phrases article > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.dialogue-quiz-section {
  padding: 84px 0;
}

.dialogue-quiz-card {
  margin-left: 105px;
}

/* Grammar */

.grammar-heading {
  margin-bottom: 30px;
}

.grammar-tools {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 14px 0;
  background: rgba(244, 241, 233, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.search-field {
  width: min(520px, 100%);
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-field span {
  font-family: "Newsreader", Georgia, serif;
  font-size: 21px;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.filter-buttons {
  display: flex;
  gap: 5px;
}

.filter-buttons button {
  appearance: none;
  min-width: 46px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.filter-buttons button.is-active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.grammar-count {
  margin: 24px 0 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.grammar-list {
  border-top: 1px solid var(--line);
}

.grammar-item {
  border-bottom: 1px solid var(--line);
}

.grammar-item summary {
  min-height: 90px;
  padding: 17px 6px;
  list-style: none;
  display: grid;
  grid-template-columns: 50px 1fr 30px;
  align-items: center;
  gap: 18px;
  cursor: pointer;
}

.grammar-item summary::-webkit-details-marker {
  display: none;
}

.grammar-item summary:hover {
  background: rgba(255, 255, 255, 0.34);
}

.grammar-level {
  width: 36px;
  height: 36px;
  font-size: 9px;
}

.grammar-item summary > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.grammar-item summary strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
}

.grammar-item summary small {
  color: var(--muted);
  font-size: 10px;
}

.grammar-item summary i {
  font-style: normal;
  font-size: 24px;
  transition: transform 180ms ease;
}

.grammar-item[open] summary i {
  transform: rotate(45deg);
}

.grammar-detail {
  padding: 8px 70px 42px 68px;
}

.grammar-detail > p {
  max-width: 850px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(21px, 2.6vw, 29px);
  line-height: 1.42;
}

.grammar-detail .pattern-strip {
  max-width: 850px;
  margin: 20px 0;
}

.grammar-examples {
  max-width: 850px;
  border-top: 1px solid var(--line);
}

.grammar-examples > div {
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
}

.grammar-examples > div > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.grammar-examples strong {
  font-size: 15px;
}

.grammar-examples small {
  color: var(--muted);
  font-size: 13px;
}

.grammar-detail .pitfall {
  max-width: 850px;
  margin-bottom: 22px;
}

/* Optional media */

.media-heading p {
  max-width: 760px;
}

.media-level-tabs {
  margin-top: 24px;
}

.media-video-stage {
  min-height: 440px;
  margin-top: 24px;
  background: #181b1a;
  color: var(--white);
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(480px, 1.15fr);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(27, 29, 28, 0.18);
}

.media-video-copy {
  padding: clamp(38px, 5vw, 66px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.media-video-copy .lesson-code {
  color: rgba(255, 255, 255, 0.55);
}

.media-video-copy h2 {
  max-width: 530px;
  margin: 18px 0 16px;
  font-size: clamp(32px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.media-video-copy > p {
  max-width: 560px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  line-height: 1.6;
}

.media-video-copy > p strong {
  color: var(--white);
}

.media-topic {
  padding-bottom: 18px;
  color: rgba(255, 255, 255, 0.48);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 13px;
  line-height: 1.55;
}

.media-watch-guide {
  margin: 26px 0 30px;
}

.media-watch-guide > span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.media-watch-guide ol {
  margin: 14px 0 0;
  padding-left: 19px;
  color: rgba(255, 255, 255, 0.77);
  font-size: 14px;
  line-height: 1.6;
}

.media-watch-guide li + li {
  margin-top: 7px;
}

.media-external-button {
  margin-top: auto;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

.media-player-shell {
  min-width: 0;
  margin: 28px 28px 28px 0;
  background: #060707;
  align-self: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.media-player-shell iframe,
.media-player-launch {
  width: 100%;
  height: 100%;
  border: 0;
}

.media-player-launch {
  appearance: none;
  position: relative;
  padding: 0;
  background: #060707;
  color: var(--white);
  cursor: pointer;
  overflow: hidden;
}

.media-player-launch img,
.media-player-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media-player-launch img {
  object-fit: cover;
  opacity: 0.78;
  transform: scale(1.015);
  transition: transform 300ms ease, opacity 300ms ease;
}

.media-player-shade {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.55));
}

.media-play-disc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  padding-left: 5px;
  border-radius: 50%;
  background: var(--level-color);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  font-size: 20px;
  transition: transform 220ms ease;
}

.media-player-launch small {
  position: absolute;
  left: 24px;
  bottom: 22px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.media-player-launch:hover img {
  opacity: 0.9;
  transform: scale(1.045);
}

.media-player-launch:hover .media-play-disc {
  transform: translate(-50%, -50%) scale(1.08);
}

.media-video-library,
.media-reading-library {
  margin-top: 76px;
}

.media-video-list,
.media-reading-list {
  border-top: 1px solid var(--line);
}

.media-video-row {
  appearance: none;
  width: 100%;
  min-height: 96px;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 44px minmax(260px, 1fr) minmax(160px, 0.45fr) 90px;
  gap: 22px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, padding 180ms ease;
}

.media-video-row:hover,
.media-video-row.is-active {
  padding-left: 28px;
  background: rgba(27, 29, 28, 0.045);
}

.media-video-row.is-active {
  box-shadow: inset 3px 0 0 var(--level-color);
}

.media-video-row > span,
.media-video-row > em,
.media-video-row > i {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.media-video-row > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.media-video-row strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
}

.media-video-row small {
  color: var(--muted);
  font-size: 13px;
}

.media-video-row > i {
  text-align: right;
  font-weight: 800;
}

.media-reading-row {
  min-height: 132px;
  padding: 22px 18px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  display: grid;
  grid-template-columns: 44px 120px minmax(280px, 1fr) minmax(170px, 0.55fr) 135px;
  gap: 20px;
  align-items: center;
  text-decoration: none;
  transition: background 180ms ease, padding 180ms ease;
}

.media-reading-row:hover {
  padding-left: 26px;
  background: rgba(27, 29, 28, 0.045);
}

.media-reading-row > span,
.media-reading-row > small,
.media-reading-row > b,
.media-reading-row > i {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.5;
}

.media-reading-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.media-reading-row strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 23px;
}

.media-reading-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.media-reading-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.media-reading-row > i {
  color: var(--level-color);
  text-align: right;
  font-weight: 800;
}

.media-source-note {
  max-width: 760px;
  margin-top: 70px;
  padding: 25px 0 0;
  border-top: 1px solid var(--line);
}

.media-source-note span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.media-source-note p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

/* Pronunciation */

.pronunciation-layout {
  min-height: 520px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 330px 1fr;
}

.phrase-list {
  padding: 28px 24px 28px 0;
  border-right: 1px solid var(--line);
}

.phrase-list > .eyebrow {
  display: block;
  margin: 0 0 18px 4px;
}

.phrase-list button {
  appearance: none;
  width: 100%;
  min-height: 73px;
  padding: 12px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 32px 1fr 28px;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.phrase-list button > span,
.phrase-list button small {
  color: var(--muted);
  font-size: 9px;
}

.phrase-list button strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 15px;
  line-height: 1.25;
}

.phrase-list button.is-active {
  background: var(--ink);
  color: var(--white);
}

.phrase-list button.is-active > span,
.phrase-list button.is-active small {
  color: rgba(255, 255, 255, 0.55);
}

.speech-stage {
  position: relative;
  padding: 60px clamp(34px, 6vw, 82px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

.sound-orbit {
  position: absolute;
  width: 430px;
  height: 430px;
  right: -160px;
  top: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.sound-orbit::before,
.sound-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.sound-orbit::before {
  width: 300px;
  height: 300px;
}

.sound-orbit::after {
  width: 170px;
  height: 170px;
}

.sound-orbit i {
  position: absolute;
  width: 5px;
  border-radius: 99px;
  background: var(--red);
  animation: waveform 1.3s ease-in-out infinite alternate;
}

.sound-orbit i:nth-child(1) {
  height: 35px;
  transform: translateX(-28px);
}

.sound-orbit i:nth-child(2) {
  height: 74px;
  transform: translateX(-14px);
  animation-delay: -0.5s;
}

.sound-orbit i:nth-child(3) {
  height: 105px;
  animation-delay: -0.9s;
}

.sound-orbit i:nth-child(4) {
  height: 58px;
  transform: translateX(14px);
  animation-delay: -0.2s;
}

.sound-orbit i:nth-child(5) {
  height: 27px;
  transform: translateX(28px);
  animation-delay: -0.7s;
}

@keyframes waveform {
  to {
    height: 18px;
  }
}

.speech-stage > *:not(.sound-orbit) {
  position: relative;
  z-index: 1;
}

.speech-stage h2 {
  max-width: 660px;
  margin: 12px 0 15px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.042em;
}

.speech-stage > p {
  max-width: 580px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.speech-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.speaker-large svg {
  width: 19px;
  height: 19px;
}

.record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(229, 74, 46, 0.13);
}

.is-listening .record-dot,
.listening-state .record-dot {
  animation: pulse-record 1s ease infinite;
}

@keyframes pulse-record {
  50% {
    box-shadow: 0 0 0 10px rgba(229, 74, 46, 0.04);
  }
}

.speech-result {
  width: 100%;
  max-width: 650px;
  min-height: 92px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.speech-privacy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.result-placeholder,
.speech-error {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.speech-error {
  color: var(--red);
}

.listening-state {
  display: grid;
  grid-template-columns: 15px 1fr;
  gap: 4px 10px;
  align-items: center;
}

.listening-state small {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
}

.transcript-result {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  align-items: center;
}

.transcript-result p {
  margin: 7px 0 4px;
  font-size: 12px;
  line-height: 1.5;
}

.transcript-result small {
  color: var(--muted);
  font-size: 9px;
}

.transcript-score {
  --score: 0deg;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--score), var(--paper-deep) 0);
  display: grid;
  place-items: center;
}

.transcript-score::before {
  content: "";
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--paper);
  position: absolute;
}

.transcript-score strong {
  position: relative;
  font-size: 11px;
}

.speech-note {
  margin-top: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.speech-note > div {
  padding: 38px 38px 10px 0;
}

.speech-note > div + div {
  padding-left: 38px;
  border-left: 1px solid var(--line);
}

.speech-note h2 {
  margin: 9px 0 12px;
  font-size: 30px;
  line-height: 1.05;
}

.speech-note p,
.speech-note li {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.speech-note ol {
  padding-left: 17px;
}

/* Program */

.program-heading {
  max-width: 950px;
}

.program-numbers {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.program-numbers > div {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  display: grid;
}

.program-numbers > div:last-child {
  border-right: 0;
}

.program-numbers strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 42px;
}

.program-numbers span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.principles-section,
.skill-tracks-section,
.syllabus-section,
.scope-note {
  margin-top: 90px;
}

.principle-list {
  border-top: 1px solid var(--line);
}

.principle-list article {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
}

.principle-list article > span {
  color: var(--muted);
  font-size: 10px;
}

.principle-list h3 {
  margin: 0 0 6px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 26px;
}

.principle-list p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.skill-track-list {
  border-top: 1px solid var(--ink);
}

.skill-track-list article {
  min-height: 94px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 54px minmax(150px, 0.65fr) 1.6fr 130px;
  gap: 22px;
  align-items: center;
}

.skill-track-list article > span {
  width: 30px;
  height: 30px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 8px;
}

.skill-track-list h3,
.skill-track-list p {
  margin: 0;
}

.skill-track-list h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 25px;
}

.skill-track-list p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.skill-track-list em {
  justify-self: end;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-aside {
  max-width: 380px;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.syllabus-level {
  --level-color: var(--blue);
  margin-top: 36px;
  border-top: 4px solid var(--level-color);
}

.syllabus-level > header {
  min-height: 175px;
  padding: 30px 26px;
  background: rgba(255, 255, 255, 0.34);
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 22px;
  align-items: start;
}

.syllabus-level > header .level-badge {
  background: var(--level-color);
}

.syllabus-level h3 {
  margin: 7px 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 35px;
}

.syllabus-level header p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.syllabus-level ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.syllabus-level li {
  min-height: 70px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
}

.syllabus-level li.is-review {
  background: color-mix(in srgb, var(--level-color), transparent 94%);
}

.syllabus-level li.is-vocabulary {
  background: color-mix(in srgb, var(--level-color), transparent 96%);
}

.syllabus-level li.is-vocabulary em {
  color: var(--level-color);
}

.syllabus-level li > span,
.syllabus-level li em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.syllabus-level li > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.syllabus-level li strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 18px;
}

.syllabus-level li small {
  color: var(--muted);
  font-size: 10px;
}

.scope-note {
  padding: 45px;
  background: var(--ink);
  color: var(--white);
}

.scope-note .eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.scope-note h2 {
  max-width: 850px;
  margin: 10px 0 16px;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1;
}

.scope-note p {
  max-width: 820px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.75;
}

/* Utility */

.toast {
  position: fixed;
  left: calc(var(--sidebar-width) + 50%);
  bottom: 28px;
  z-index: 60;
  transform: translate(-50%, 18px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-state {
  padding: 80px 20px;
  text-align: center;
}

.empty-state > span {
  color: var(--red);
  font-family: "Newsreader", Georgia, serif;
  font-size: 52px;
}

.empty-state h2,
.empty-state h1 {
  margin: 8px 0;
  font-size: 34px;
}

.empty-state p {
  color: var(--muted);
  font-size: 12px;
}

.full-page {
  min-height: 100vh;
  display: grid;
  place-content: center;
}

@media (max-width: 1040px) {
  .heading-level-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .heading-level-row .level-tabs {
    margin: 0;
  }
}

@media (max-width: 1060px) {
  .today-panel {
    grid-template-columns: 60% 40%;
  }

  .today-copy {
    padding: 45px;
  }

  .level-line-copy {
    grid-template-columns: 220px 1fr;
  }

  .pronunciation-layout {
    grid-template-columns: 280px 1fr;
  }

  .program-numbers {
    grid-template-columns: repeat(2, 1fr);
  }

  .program-numbers > div:nth-child(2),
  .program-numbers > div:nth-child(4) {
    border-right: 0;
  }

  .program-numbers > div:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .program-numbers > div:last-child {
    grid-column: 1 / -1;
  }

  .conversation-row {
    grid-template-columns: 40px 110px minmax(200px, 1fr) minmax(220px, 0.9fr) 70px;
    gap: 12px;
  }

  .media-video-stage {
    grid-template-columns: 1fr;
  }

  .media-player-shell {
    width: calc(100% - 56px);
    margin: 0 28px 28px;
  }

  .media-reading-row {
    grid-template-columns: 40px 100px minmax(260px, 1fr) 150px;
  }

  .media-reading-row > i {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    width: min(330px, 88vw);
    transform: translateX(-102%);
    transition: transform 240ms ease;
    box-shadow: 30px 0 70px rgba(0, 0, 0, 0.18);
  }

  .menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 24;
    height: 64px;
    padding: 0 20px;
    background: rgba(252, 250, 244, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-header .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 25px;
  }

  .mobile-header .brand strong {
    font-size: 23px;
  }

  .menu-button {
    appearance: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    display: grid;
    place-content: center;
    gap: 5px;
  }

  .menu-button span {
    display: block;
    width: 17px;
    height: 1px;
    background: var(--ink);
  }

  #app {
    margin-left: 0;
  }

  .page {
    width: min(100% - 36px, 760px);
    padding-top: 24px;
  }

  .today-panel {
    min-height: 650px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 360px;
  }

  .today-copy {
    padding: 40px;
  }

  .route-poster {
    min-height: 360px;
  }

  .journey-map-hero {
    min-height: 0;
    grid-template-rows: minmax(430px, 1fr) auto;
  }

  .journey-map-canvas {
    min-height: 430px;
  }

  .journey-game-brand {
    top: 30px;
    left: 30px;
  }

  .journey-game-progress {
    top: 28px;
    right: 30px;
  }

  .journey-game-stage {
    width: auto;
  }

  .journey-game-next {
    width: auto;
  }

  .journey-infographic-dock {
    padding-inline: 26px;
    grid-template-columns: minmax(190px, 1fr) auto minmax(135px, 1fr);
    gap: 24px;
  }

  .level-tabs.journey-level-tabs {
    gap: 18px;
  }

  .level-tabs.journey-level-tabs button {
    min-width: 60px;
  }

  .poland-route-map {
    inset: 0 2% auto auto;
    width: 82%;
    height: 100%;
  }

  .poster-word {
    top: 30px;
    left: 22px;
    font-size: 20px;
  }

  .poster-kicker {
    top: 16px;
    left: 22px;
  }

  .map-legend {
    left: 22px;
    bottom: 17px;
  }

  .poster-open {
    right: 20px;
    bottom: 15px;
  }

  .level-line-copy {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .lesson-toolbar {
    top: 64px;
  }

  .lesson-hero {
    padding: 70px 38px 60px;
    grid-template-columns: 70px 1fr;
    gap: 25px;
  }

  .lesson-content,
  .quiz-section,
  .review-intro,
  .lesson-neighbors,
  .lesson-dialogue-preview,
  .dialogue-transcript,
  .dialogue-phrases > header,
  .dialogue-phrases > div,
  .dialogue-quiz-section,
  .dialogue-neighbors {
    width: min(100% - 44px, 720px);
  }

  .learning-block,
  .quiz-heading {
    grid-template-columns: 48px 1fr;
    gap: 20px;
  }

  .quiz-card,
  .quiz-result {
    margin-left: 68px;
  }

  .conversation-stage {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .conversation-stage-script {
    max-width: 620px;
  }

  .conversation-row {
    grid-template-columns: 40px 100px minmax(220px, 1fr) 72px;
  }

  .conversation-row-goal {
    display: none;
  }

  .media-video-copy {
    padding: 46px 38px;
  }

  .media-video-row {
    grid-template-columns: 40px minmax(230px, 1fr) 150px 80px;
    gap: 14px;
  }

  .media-reading-row {
    grid-template-columns: 40px 100px minmax(230px, 1fr) 135px;
    gap: 14px;
  }

  .dialogue-hero {
    padding: 70px 38px 60px;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 38px;
  }

  .dialogue-quiz-card {
    margin-left: 68px;
  }

  .pronunciation-layout {
    grid-template-columns: 1fr;
  }

  .phrase-list {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .phrase-list > .eyebrow {
    grid-column: 1 / -1;
  }

  .speech-stage {
    min-height: 520px;
  }

  .speech-note {
    grid-template-columns: 1fr;
  }

  .speech-note > div + div {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .page-topline {
    align-items: center;
  }

  .progress-ring {
    width: 72px;
    height: 72px;
  }

  .progress-ring::before {
    width: 58px;
    height: 58px;
  }

  .progress-ring strong {
    font-size: 14px;
  }

  .today-panel {
    border-radius: 22px;
    grid-template-rows: auto 300px;
  }

  .route-poster {
    min-height: 300px;
  }

  .poster-word {
    max-width: 195px;
    line-height: 1.02;
  }

  .journey-map-hero {
    min-height: 0;
    border-radius: 22px;
    grid-template-rows: minmax(320px, 1fr) auto;
  }

  .journey-map-canvas {
    min-height: 320px;
  }

  .journey-map-canvas > img {
    object-fit: contain;
    object-position: center;
    transform: none;
  }

  .journey-map-vignette {
    background:
      linear-gradient(180deg, rgba(255, 251, 240, 0.86) 0, rgba(255, 251, 240, 0.42) 20%, transparent 36%, transparent 72%, rgba(239, 224, 194, 0.38) 100%);
  }

  .journey-game-brand {
    top: 22px;
    left: 22px;
  }

  .journey-game-brand strong {
    font-size: 20px;
  }

  .journey-game-brand span {
    font-size: 8px;
  }

  .journey-game-progress {
    top: 20px;
    right: 22px;
    width: 105px;
  }

  .journey-game-progress strong {
    font-size: 34px;
  }

  .journey-game-progress > i {
    margin-top: 8px;
  }

  .journey-game-stage {
    width: auto;
  }

  .journey-game-stage > div {
    gap: 8px;
  }

  .journey-game-stage > div > strong {
    font-size: 42px;
  }

  .journey-game-stage > div > i {
    width: 17px;
  }

  .journey-game-stage h1 {
    font-size: 24px;
  }

  .journey-game-stage p {
    margin-top: 8px;
    font-size: 9px;
  }

  .journey-game-next {
    width: auto;
    padding-left: 11px;
  }

  .journey-game-next strong {
    font-size: 16px;
  }

  .journey-game-next small {
    font-size: 8px;
  }

  .journey-map-hero .relief-city-name,
  .journey-map-hero .relief-station-city {
    font-size: 31px;
  }

  .journey-map-hero .relief-station-progress,
  .journey-map-hero .relief-travel-label {
    font-size: 19px;
  }

  .journey-map-hero .relief-route-map {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  .journey-infographic-dock {
    min-height: 0;
    padding: 18px 18px 16px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 14px;
  }

  .journey-game-stage {
    grid-column: 1;
    grid-row: 1;
  }

  .journey-game-next {
    grid-column: 2;
    grid-row: 1;
  }

  .level-tabs.journey-level-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    gap: 18px;
    justify-content: space-between;
    transform: none;
  }

  .level-tabs.journey-level-tabs button {
    min-width: 0;
    width: 30%;
    padding-inline: 0;
  }

  .journey-route-section {
    margin-top: 56px;
  }

  .journey-route-section .section-aside {
    max-width: none;
  }

  .poland-route-map {
    inset: 0 -2% auto auto;
    width: 104%;
  }

  .today-copy {
    padding: 34px 26px;
  }

  .today-copy h2 {
    font-size: 42px;
  }

  .meta-row {
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .level-line {
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
  }

  .level-badge {
    width: 40px;
    height: 40px;
  }

  .compact-stats {
    grid-template-columns: 1fr;
  }

  .compact-stats > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .compact-stats > div:last-child {
    border-bottom: 0;
  }

  .level-tabs {
    width: 100%;
  }

  .level-tabs button {
    min-width: 0;
    flex: 1;
  }

  .media-video-stage {
    margin-top: 22px;
  }

  .media-video-copy {
    padding: 36px 24px 40px;
  }

  .media-video-copy h2 {
    font-size: 34px;
  }

  .media-player-shell {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
  }

  .media-play-disc {
    width: 60px;
    height: 60px;
    font-size: 16px;
  }

  .media-player-launch small {
    left: 16px;
    bottom: 15px;
    font-size: 8px;
  }

  .media-video-library,
  .media-reading-library {
    margin-top: 58px;
  }

  .media-video-row {
    min-height: 92px;
    padding: 16px 8px;
    grid-template-columns: 32px minmax(0, 1fr) 74px;
    gap: 10px;
  }

  .media-video-row:hover,
  .media-video-row.is-active {
    padding-left: 12px;
  }

  .media-video-row > em {
    display: none;
  }

  .media-video-row strong {
    font-size: 20px;
  }

  .media-reading-row {
    min-height: 0;
    padding: 20px 8px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .media-reading-row:hover {
    padding-left: 12px;
  }

  .media-reading-row > small,
  .media-reading-row > b,
  .media-reading-row > i {
    display: none;
  }

  .media-reading-row strong {
    font-size: 21px;
  }

  .level-intro {
    padding: 28px 24px;
    align-items: flex-start;
    flex-direction: column;
  }

  .level-progress-large {
    text-align: left;
  }

  .route-list {
    margin-left: 10px;
  }

  .route-step {
    padding-left: 52px;
    grid-template-columns: 1fr;
  }

  .step-kind {
    display: none;
  }

  .lesson-toolbar {
    padding: 0 18px;
  }

  .lesson-toolbar-progress i {
    width: 70px;
  }

  .lesson-hero {
    min-height: 360px;
    padding: 36px 24px 42px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .lesson-number {
    width: fit-content;
  }

  .lesson-hero h1 {
    font-size: 40px;
  }

  .completed-stamp {
    right: 24px;
    bottom: 30px;
  }

  .lesson-content,
  .quiz-section,
  .review-intro,
  .lesson-neighbors,
  .lesson-dialogue-preview,
  .dialogue-transcript,
  .dialogue-phrases > header,
  .dialogue-phrases > div,
  .dialogue-quiz-section,
  .dialogue-neighbors {
    width: min(100% - 32px, 560px);
  }

  .learning-block,
  .quiz-heading,
  .review-intro {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 55px 0;
  }

  .block-index {
    padding-top: 0;
  }

  .reading-guide-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 19px 0;
  }

  .reading-guide-row > strong {
    font-size: 26px;
  }

  .quiz-section {
    padding-top: 55px;
  }

  .quiz-card,
  .quiz-result {
    margin-left: 0;
    padding: 26px 20px;
  }

  .dialogue-preview-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dialogue-preview-lines {
    margin-left: 0;
  }

  .dialogue-preview-lines > div {
    grid-template-columns: 78px 1fr;
    gap: 5px 12px;
  }

  .lesson-dialogue-preview > .primary-button {
    width: 100%;
    margin-left: 0;
  }

  .dialogues-heading h1 {
    font-size: clamp(36px, 11vw, 44px);
  }

  .conversation-stage {
    padding: 30px 24px;
    border-radius: 22px;
  }

  .conversation-stage h2 {
    font-size: 40px;
  }

  .conversation-stage-script > div {
    transform: none;
  }

  .conversation-row {
    min-height: 102px;
    grid-template-columns: 32px 1fr 62px;
    gap: 10px;
  }

  .conversation-row-place {
    grid-column: 2;
    grid-row: 1;
  }

  .conversation-row-index {
    grid-row: 1 / 3;
  }

  .conversation-row-copy {
    grid-column: 2;
    grid-row: 2;
  }

  .conversation-row-state {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .dialogue-toolbar {
    top: 64px;
    padding: 0 18px;
  }

  .dialogue-hero {
    min-height: 380px;
    padding: 36px 24px 42px;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .dialogue-hero h1 {
    font-size: 40px;
  }

  .dialogue-cast {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .dialogue-cast .eyebrow {
    grid-column: 1 / -1;
  }

  .dialogue-transcript {
    padding: 60px 0;
  }

  .dialogue-line {
    grid-template-columns: 30px 1fr 40px;
    gap: 8px 12px;
  }

  .dialogue-line-number {
    grid-row: 1 / 3;
  }

  .dialogue-speaker {
    grid-column: 2;
  }

  .dialogue-line > div {
    grid-column: 2;
  }

  .dialogue-line > .speaker-button {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .dialogue-phrases > div {
    grid-template-columns: 1fr;
  }

  .dialogue-phrases article {
    min-height: 138px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .dialogue-quiz-card {
    margin-left: 0;
  }

  .answer-grid {
    grid-template-columns: 1fr;
  }

  .quiz-result {
    grid-template-columns: 1fr;
  }

  .result-actions {
    grid-column: 1;
  }

  .lesson-neighbors {
    grid-template-columns: 1fr;
  }

  .lesson-neighbors button,
  .lesson-neighbors button:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    align-items: flex-start;
  }

  .grammar-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .grammar-heading h1 {
    font-size: 36px;
  }

  .filter-buttons button {
    flex: 1;
  }

  .grammar-detail {
    padding: 8px 8px 36px;
  }

  .grammar-item summary {
    grid-template-columns: 42px 1fr 22px;
    gap: 10px;
  }

  .grammar-item summary strong {
    font-size: 18px;
  }

  .phrase-list {
    grid-template-columns: 1fr;
  }

  .speech-stage {
    padding: 54px 20px;
  }

  .speech-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .sound-orbit {
    right: -280px;
    opacity: 0.7;
  }

  .speech-note > div {
    padding-right: 0;
  }

  .program-numbers {
    grid-template-columns: 1fr 1fr;
  }

  .principle-list article {
    grid-template-columns: 40px 1fr;
  }

  .skill-track-list article {
    grid-template-columns: 40px 1fr;
    gap: 8px 14px;
  }

  .skill-track-list p,
  .skill-track-list em {
    grid-column: 2;
  }

  .skill-track-list em {
    justify-self: start;
    margin-top: 4px;
  }

  .syllabus-level > header {
    grid-template-columns: 50px minmax(0, 1fr);
    padding: 25px 16px;
  }

  .syllabus-level > header > div {
    min-width: 0;
  }

  .syllabus-level h3,
  .syllabus-level header p {
    overflow-wrap: anywhere;
  }

  .syllabus-level li {
    grid-template-columns: 40px 1fr;
  }

  .syllabus-level li em {
    display: none;
  }

  .scope-note {
    padding: 32px 24px;
  }

  .toast {
    left: 50%;
    width: max-content;
    max-width: calc(100% - 40px);
    text-align: center;
  }
}

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

/* Case trainer */
.cases-page {
  --case-accent: var(--level-color, var(--blue));
}

.cases-heading {
  max-width: 760px;
}

.cases-summary {
  margin: 34px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.cases-summary > div {
  min-height: 106px;
  padding: 23px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cases-summary > div:last-child {
  border-right: 0;
}

.cases-summary strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 42px;
  line-height: 1;
}

.cases-summary span {
  max-width: 150px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.case-level-tabs {
  margin-bottom: 10px;
}

.case-group-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
  overflow-x: auto;
}

.case-group-tabs button {
  appearance: none;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  min-width: 190px;
  padding: 17px 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.case-group-tabs button.is-active {
  border-bottom-color: var(--case-accent);
  color: var(--ink);
}

.case-group-tabs small {
  color: inherit;
  font-size: 10px;
}

.case-trainer {
  position: relative;
  margin: 36px 0 52px;
  padding: 38px 42px 42px;
  overflow: hidden;
  border: 1px solid rgba(27, 29, 28, 0.12);
  border-top: 4px solid var(--case-accent);
  border-radius: 28px;
  background: #ebe6dc;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(38, 40, 35, 0.09);
  animation: case-trainer-enter 420ms ease both;
}

.case-trainer::after {
  content: "M.  D.  C.  B.  N.  Ms.  W.";
  position: absolute;
  right: -16px;
  bottom: -20px;
  color: rgba(27, 29, 28, 0.035);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
}

@keyframes case-trainer-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.case-trainer .eyebrow,
.case-trainer .case-question-meta > span,
.case-trainer .case-question-task > span {
  color: var(--muted);
}

.case-trainer-topline,
.case-trainer-controls,
.case-question,
.case-feedback {
  position: relative;
  z-index: 1;
}

.case-trainer-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.case-trainer-topline h2 {
  margin: 6px 0 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 0.98;
}

.case-trainer-score {
  display: flex;
  gap: 20px;
}

.case-trainer-score span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.case-trainer-score strong {
  margin-left: 5px;
  color: var(--ink);
  font-size: 14px;
}

.case-trainer-controls {
  margin-top: 28px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.case-trainer-controls > div {
  display: flex;
  gap: 4px;
}

.case-trainer-controls button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.case-trainer-controls button.is-active {
  background: var(--ink);
  color: var(--white);
}

.case-question {
  min-height: 170px;
  padding: 38px 0 26px;
  display: grid;
  grid-template-columns: 104px 230px 1fr;
  align-items: center;
  gap: 28px;
}

.case-question-code {
  color: var(--case-accent);
  font-family: "Newsreader", Georgia, serif;
  font-size: 78px;
  font-weight: 800;
  line-height: 0.85;
}

.case-question-meta,
.case-question-task {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-question-meta > span,
.case-question-task > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.case-question-meta > strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px;
}

.case-question-task > strong {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 600;
  line-height: 1.25;
}

.case-write-answer {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.case-write-answer label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.case-write-answer input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid rgba(27, 29, 28, 0.28);
  background: transparent;
  padding: 10px 0 14px;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(30px, 4vw, 52px);
}

.case-write-answer input::placeholder {
  color: rgba(27, 29, 28, 0.28);
}

.case-choice-answer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.case-choice-answer button {
  appearance: none;
  min-height: 64px;
  border: 1px solid rgba(27, 29, 28, 0.16);
  border-radius: 14px;
  background: rgba(255, 254, 249, 0.58);
  padding: 14px 18px;
  color: var(--ink);
  text-align: left;
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.case-choice-answer button:hover,
.case-choice-answer button.is-selected {
  border-color: var(--case-accent);
  background: color-mix(in srgb, var(--case-accent), var(--white) 91%);
  transform: translateY(-1px);
}

.case-choice-answer button.is-correct {
  border-color: var(--green);
  background: rgba(13, 123, 103, 0.12);
}

.case-choice-answer button.is-wrong {
  border-color: var(--red);
  background: rgba(229, 74, 46, 0.12);
}

.case-check-button {
  position: relative;
  z-index: 1;
  margin-top: 22px;
}

.case-feedback {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) 1.2fr auto;
  align-items: center;
  gap: 22px;
}

.case-feedback > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.case-feedback > strong {
  color: var(--case-accent);
  font-family: "Newsreader", Georgia, serif;
  font-size: 30px;
}

.case-feedback-examples p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.case-feedback-examples ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.case-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.case-set-list {
  position: sticky;
  top: 24px;
  display: grid;
  border-top: 1px solid var(--line);
}

.case-set-list > .eyebrow {
  padding: 15px 8px;
  border-bottom: 1px solid var(--line);
}

.case-set-list button {
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  min-height: 76px;
  padding: 12px 8px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.case-set-list button > span,
.case-set-list button > em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.case-set-list button > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-set-list button strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 19px;
}

.case-set-list button small {
  color: var(--muted);
  font-size: 10px;
}

.case-set-list button.is-active {
  background: var(--ink);
  color: var(--white);
  padding-right: 13px;
  padding-left: 13px;
}

.case-set-list button.is-active > span,
.case-set-list button.is-active > em,
.case-set-list button.is-active small {
  color: rgba(255, 255, 255, 0.55);
}

.case-table-sheet {
  background: var(--white);
  box-shadow: var(--shadow);
}

.case-table-sheet > header {
  padding: 30px 34px 26px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 5px 24px;
}

.case-table-sheet > header .lesson-code,
.case-table-sheet > header p {
  grid-column: 1;
}

.case-table-sheet > header h2 {
  grid-column: 1;
  margin: 4px 0 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(32px, 3.7vw, 50px);
  line-height: 1;
}

.case-table-sheet > header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.case-table-sheet > header button {
  grid-column: 2;
  grid-row: 1 / 4;
}

.case-form-table > button {
  appearance: none;
  width: 100%;
  min-height: 94px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 48px 170px minmax(170px, 0.75fr) minmax(220px, 1fr) 20px;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, padding 150ms ease;
}

.case-form-table > button:hover {
  background: color-mix(in srgb, var(--case-accent) 7%, var(--white));
  padding-left: 30px;
}

.case-form-table > button.is-unavailable {
  opacity: 0.48;
  cursor: default;
}

.case-code {
  color: var(--case-accent);
  font-family: "Newsreader", Georgia, serif;
  font-size: 25px;
  font-weight: 800;
}

.case-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-name strong {
  font-size: 14px;
}

.case-name small,
.case-example {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.case-form {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
}

.case-form-table i {
  color: var(--muted);
  font-style: normal;
}

.case-reference {
  margin-top: 64px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
}

.case-reference h2 {
  margin: 6px 0 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 34px;
}

.case-reference ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
}

.case-reference li {
  min-height: 78px;
  padding: 13px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.case-reference li span {
  color: var(--case-accent);
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
  font-weight: 800;
}

.case-reference li strong {
  font-size: 10px;
}

.case-reference li small {
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 1040px) {
  .case-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
  }

  .case-form-table > button {
    grid-template-columns: 42px 140px minmax(150px, 1fr) 20px;
  }

  .case-example {
    display: none;
  }

  .case-question {
    grid-template-columns: 90px 210px 1fr;
  }
}

@media (max-width: 820px) {
  .cases-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .cases-summary > div:nth-child(2) {
    border-right: 0;
  }

  .cases-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .case-trainer {
    padding: 30px;
  }

  .case-trainer-topline,
  .case-trainer-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .case-trainer-controls > div {
    width: 100%;
  }

  .case-trainer-controls button {
    flex: 1;
  }

  .case-question {
    grid-template-columns: 76px 1fr;
  }

  .case-question-task {
    grid-column: 1 / -1;
  }

  .case-feedback {
    grid-template-columns: 1fr 1fr;
  }

  .case-feedback-examples {
    grid-column: 1 / -1;
  }

  .case-workspace {
    grid-template-columns: 1fr;
  }

  .case-set-list {
    position: static;
    grid-template-columns: repeat(2, 1fr);
  }

  .case-set-list > .eyebrow {
    grid-column: 1 / -1;
  }

  .case-set-list button:nth-of-type(odd) {
    border-right: 1px solid var(--line);
  }

  .case-reference {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .case-group-tabs button {
    min-width: 160px;
  }

  .case-trainer {
    margin-right: -10px;
    margin-left: -10px;
    padding: 26px 22px 30px;
    border-radius: 20px;
  }

  .case-trainer-score {
    justify-content: space-between;
  }

  .case-trainer-controls > div {
    flex-direction: column;
  }

  .case-question {
    min-height: 0;
    padding-top: 28px;
  }

  .case-question-code {
    font-size: 62px;
  }

  .case-question-meta > strong {
    font-size: 23px;
  }

  .case-choice-answer {
    grid-template-columns: 1fr;
  }

  .case-feedback {
    grid-template-columns: 1fr;
  }

  .case-feedback-examples {
    grid-column: auto;
  }

  .case-feedback .primary-button {
    width: 100%;
  }

  .case-set-list {
    grid-template-columns: 1fr;
  }

  .case-set-list button:nth-of-type(odd) {
    border-right: 0;
  }

  .case-table-sheet > header {
    grid-template-columns: 1fr;
    padding: 26px 22px;
  }

  .case-table-sheet > header button {
    grid-column: 1;
    grid-row: auto;
    margin-top: 13px;
  }

  .case-form-table > button {
    min-height: 112px;
    padding: 15px 16px;
    grid-template-columns: 38px 1fr 18px;
    gap: 9px;
  }

  .case-name {
    grid-column: 2;
  }

  .case-form {
    grid-column: 2;
    font-size: 20px;
  }

  .case-form-table i {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .case-reference ol {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-trainer {
    animation: none;
  }

  .case-choice-answer button,
  .case-form-table > button {
    transition: none;
  }
}

/* Learning system v2 */

.learning-today {
  padding-top: 74px;
}

.skill-progress-lines {
  border-top: 1px solid var(--line);
}

.skill-progress-lines > div {
  min-height: 82px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(220px, 1fr) 55px;
  align-items: center;
  gap: 24px;
}

.skill-progress-lines span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skill-progress-lines strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
}

.skill-progress-lines small,
.skill-progress-lines em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.skill-progress-lines i {
  height: 4px;
  overflow: hidden;
  background: var(--line);
}

.skill-progress-lines i b {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: width 500ms ease;
}

.course-line {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}

.lesson-mastery-strip {
  min-height: 54px;
  padding: 0 max(40px, calc((100% - 940px) / 2));
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lesson-mastery-strip span.is-done {
  color: var(--green);
}

.lesson-mastery-strip strong {
  margin-left: auto;
  color: var(--ink);
}

.lesson-outline {
  position: sticky;
  top: 0;
  z-index: 18;
  min-height: 58px;
  padding: 0 max(40px, calc((100% - 940px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 239, 0.94);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.lesson-outline > span {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lesson-outline > div {
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.lesson-outline button {
  appearance: none;
  min-height: 58px;
  padding: 0 13px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.lesson-outline button i {
  color: var(--level-color);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.lesson-outline button:hover,
.lesson-outline button:focus-visible {
  color: var(--ink);
  background: rgba(27, 29, 28, 0.045);
  outline: none;
}

.rule-block,
.review-intro,
.lesson-vocabulary,
.lesson-reading,
.lesson-media-section,
.quiz-section {
  scroll-margin-top: 78px;
}

.lesson-vocabulary,
.lesson-reading {
  width: min(940px, calc(100% - 80px));
  margin: 0 auto;
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.learning-section-heading {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 35px;
  align-items: start;
}

.learning-section-heading h2 {
  margin: 8px 0 10px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1;
}

.learning-section-heading p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.learning-section-heading > strong {
  padding-top: 8px;
  color: var(--level-color);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vocabulary-lines {
  margin: 32px 0 0 105px;
  border-top: 1px solid var(--line);
}

.vocabulary-lines button {
  appearance: none;
  width: 100%;
  min-height: 66px;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 42px minmax(180px, 0.7fr) minmax(220px, 1fr) 70px;
  align-items: center;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  transition: padding 180ms ease, background 180ms ease;
}

.vocabulary-lines button:hover {
  padding-left: 10px;
  background: rgba(255, 255, 255, 0.45);
}

.vocabulary-lines button.is-mastered {
  color: var(--green);
}

.vocabulary-lines button > span,
.vocabulary-lines button em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.vocabulary-lines button small {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.vocabulary-lines button small i {
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.vocabulary-lines button strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
}

.vocabulary-lines button em {
  justify-self: end;
  font-weight: 800;
  text-transform: uppercase;
}

.reading-paper,
.reading-task {
  margin-left: 105px;
}

.reading-paper {
  margin-top: 32px;
  padding: clamp(30px, 5vw, 58px);
  background: var(--white);
  box-shadow: 0 18px 45px rgba(38, 40, 35, 0.07);
}

.reading-paper p {
  max-width: 720px;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.3;
}

.reading-task {
  padding-top: 30px;
}

.reading-question {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.reading-question:first-child {
  padding-top: 0;
  border-top: 0;
}

.reading-question-index {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reading-task h3 {
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.reading-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reading-options button {
  appearance: none;
  min-height: 68px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.reading-options button span {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
}

.reading-options button strong {
  font-size: 14px;
  line-height: 1.4;
}

.reading-options button.is-selected {
  border-color: var(--level-color);
  background: color-mix(in srgb, var(--level-color), transparent 94%);
}

.reading-options button.is-correct {
  border-color: var(--green);
  background: rgba(13, 123, 103, 0.08);
}

.reading-options button.is-wrong {
  border-color: var(--red);
  background: rgba(229, 74, 46, 0.07);
}

.reading-task > .primary-button,
.reading-task > .secondary-button {
  margin-top: 22px;
}

.reading-explanations {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.reading-explanations p {
  margin: 0;
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 8px;
}

.reading-explanations span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.lesson-media-section {
  width: min(940px, calc(100% - 80px));
  margin: 0 auto;
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-source-reading {
  min-height: 250px;
  margin: 34px 0 0 105px;
  padding: 34px 0;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 170px;
  gap: 28px;
  align-items: start;
}

.lesson-source-number,
.lesson-source-copy > span,
.lesson-source-video-copy > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lesson-source-copy h3,
.lesson-source-video-copy h3 {
  margin: 9px 0 5px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.lesson-source-copy > strong,
.lesson-source-video-copy > strong {
  display: block;
  color: var(--level-color);
  font-size: 13px;
}

.lesson-source-copy p,
.lesson-source-video-copy p {
  max-width: 620px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.lesson-source-copy blockquote {
  max-width: 640px;
  margin: 20px 0 0;
  padding: 18px 0 18px 22px;
  border-left: 3px solid var(--level-color);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(20px, 2.6vw, 29px);
  line-height: 1.25;
}

.lesson-source-copy ol,
.lesson-source-video-copy ol {
  margin: 19px 0 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
}

.lesson-source-copy li + li,
.lesson-source-video-copy li + li {
  margin-top: 6px;
}

.lesson-source-reading > a,
.lesson-source-video-copy > a {
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.lesson-source-reading > a {
  justify-self: end;
  padding-top: 2px;
}

.lesson-source-reading > a:hover,
.lesson-source-video-copy > a:hover {
  color: var(--level-color);
}

.lesson-source-video {
  margin: 54px 0 0 105px;
  background: #181b1a;
  color: var(--white);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
}

.lesson-source-player {
  min-width: 0;
  background: #050606;
  aspect-ratio: 16 / 9;
  align-self: center;
}

.lesson-source-player iframe,
.lesson-source-player button {
  width: 100%;
  height: 100%;
  border: 0;
}

.lesson-source-player button {
  appearance: none;
  position: relative;
  padding: 0;
  background: #050606;
  color: var(--white);
  cursor: pointer;
  overflow: hidden;
}

.lesson-source-player button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.68));
}

.lesson-source-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 260ms ease, opacity 260ms ease;
}

.lesson-source-player button:hover img {
  opacity: 0.94;
  transform: scale(1.035);
}

.lesson-source-player button > span {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 66px;
  padding-left: 4px;
  border-radius: 50%;
  background: var(--level-color);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
}

.lesson-source-player button small {
  position: absolute;
  z-index: 1;
  left: 20px;
  bottom: 17px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-source-video-copy {
  padding: clamp(28px, 4vw, 44px);
}

.lesson-source-video-copy > span,
.lesson-source-video-copy p {
  color: rgba(255, 255, 255, 0.58);
}

.lesson-source-video-copy > strong {
  color: rgba(255, 255, 255, 0.82);
}

.lesson-source-video-copy ol {
  color: rgba(255, 255, 255, 0.76);
}

.lesson-source-video-copy > a {
  display: inline-block;
  margin-top: 22px;
  color: var(--white);
}

.lesson-media-rights {
  margin: 28px 0 0 105px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.review-heading {
  max-width: 860px;
}

.review-summary {
  margin: 42px 0 80px;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.review-summary > div {
  min-height: 125px;
  padding: 25px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.review-summary > div:last-child {
  border-right: 0;
}

.review-summary strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 48px;
}

.review-summary span {
  color: var(--muted);
  font-size: 10px;
}

.mistake-list {
  border-top: 1px solid var(--line);
}

.mistake-row {
  min-height: 160px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) 120px;
  gap: 25px;
}

.mistake-index {
  color: var(--muted);
  font-size: 11px;
}

.mistake-row h3 {
  margin: 10px 0 18px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(24px, 3vw, 36px);
}

.mistake-context {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.mistake-answer {
  margin: 15px 0;
  padding: 18px;
  border-left: 3px solid var(--green);
  background: rgba(13, 123, 103, 0.06);
}

.mistake-answer strong {
  font-size: 15px;
}

.mistake-answer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.mistake-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.mistake-open {
  align-self: start;
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.review-empty {
  padding: 70px 30px;
  text-align: center;
}

.review-empty > span {
  display: block;
  font-family: "Newsreader", Georgia, serif;
  font-size: 70px;
  color: var(--green);
}

.review-empty h3 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 34px;
}

.review-empty p {
  color: var(--muted);
  font-size: 11px;
}

.future-reviews {
  margin-top: 70px;
  border-top: 1px solid var(--line);
}

.future-reviews > .eyebrow {
  display: block;
  padding: 22px 0;
}

.future-reviews > div {
  min-height: 54px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.future-reviews strong {
  font-size: 12px;
}

.future-reviews span {
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 860px) {
  .lesson-mastery-strip {
    padding: 0 24px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .lesson-mastery-strip::-webkit-scrollbar,
  .lesson-outline > div::-webkit-scrollbar {
    display: none;
  }

  .lesson-outline {
    top: 64px;
    min-height: 52px;
    padding: 0 16px;
  }

  .lesson-outline > span {
    display: none;
  }

  .lesson-outline > div {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .lesson-outline button {
    min-height: 52px;
    padding: 0 12px;
    flex: 0 0 auto;
  }

  .rule-block,
  .review-intro,
  .lesson-vocabulary,
  .lesson-reading,
  .lesson-media-section,
  .quiz-section {
    scroll-margin-top: 132px;
  }

  .lesson-source-reading,
  .lesson-source-video {
    margin-left: 0;
  }

  .lesson-source-reading {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .lesson-source-reading > a {
    grid-column: 2;
    justify-self: start;
  }

  .lesson-source-video {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .lesson-mastery-strip strong {
    display: none;
  }

  .skill-progress-lines > div {
    grid-template-columns: 1fr 48px;
    gap: 8px 14px;
    padding: 16px 0;
  }

  .skill-progress-lines i {
    grid-column: 1 / 3;
  }

  .skill-progress-lines em {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .lesson-vocabulary,
  .lesson-reading,
  .lesson-media-section {
    width: calc(100% - 32px);
    padding: 58px 0;
  }

  .learning-section-heading {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 16px;
  }

  .learning-section-heading > strong {
    grid-column: 2;
  }

  .vocabulary-lines,
  .reading-paper,
  .reading-task {
    margin-left: 0;
  }

  .vocabulary-lines button {
    grid-template-columns: 32px minmax(0, 1fr) 58px;
    gap: 9px;
  }

  .vocabulary-lines button small {
    grid-column: 2 / 4;
  }

  .reading-options {
    grid-template-columns: 1fr;
  }

  .reading-paper {
    padding: 28px 22px;
  }

  .lesson-source-reading {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lesson-source-reading > a {
    grid-column: 1;
  }

  .lesson-source-video-copy {
    padding: 28px 22px 34px;
  }

  .lesson-source-player button > span {
    width: 56px;
    height: 56px;
  }

  .lesson-source-player button small {
    left: 15px;
    bottom: 13px;
  }

  .lesson-media-rights {
    margin-left: 0;
  }

  .review-summary {
    grid-template-columns: 1fr;
  }

  .review-summary > div {
    min-height: 90px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mistake-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .mistake-open {
    grid-column: 2;
  }
}

/* Thematic vocabulary */

.words-page {
  --level-color: var(--blue);
}

.words-heading {
  min-height: 0;
  padding: 24px 30px;
  border-top: 3px solid var(--red);
  border-bottom: 1px solid var(--line);
  background: #f6eee6;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 32px;
  align-items: center;
}

.words-heading .eyebrow {
  color: var(--muted);
}

.words-heading h1 {
  max-width: 780px;
  margin: 7px 0 8px;
  font-size: clamp(34px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.038em;
}

.words-heading p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.due-words-button {
  appearance: none;
  min-height: 108px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--level-color), transparent 58%);
  border-radius: 18px;
  background: var(--level-color);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.due-words-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.due-words-button:disabled {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  cursor: default;
}

.due-words-button span,
.due-words-button small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.due-words-button strong {
  margin: 2px 0 4px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 38px;
  line-height: 0.9;
}

.words-summary {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.words-summary > div {
  min-height: 68px;
  padding: 12px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.words-summary > div:last-child {
  border-right: 0;
}

.words-summary strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.words-summary span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.words-heading .words-level-tabs {
  width: min(100%, 520px);
  margin: 14px 0 0;
  padding: 3px;
  border: 1px solid rgba(27, 29, 28, 0.18);
  border-radius: 999px;
  display: flex;
  gap: 3px;
}

.words-heading .words-level-tabs button {
  min-width: 0;
  min-height: 42px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.words-heading .words-level-tabs button span {
  font-family: "Newsreader", Georgia, serif;
  font-size: 21px;
  line-height: 1;
}

.words-heading .words-level-tabs button small {
  color: inherit;
  font-size: 9px;
  text-transform: uppercase;
}

.words-heading .words-level-tabs button.is-active {
  background: var(--level-color);
  color: white;
}

.vocabulary-trainer {
  margin-top: 42px;
  padding: clamp(28px, 5vw, 64px);
  background: var(--white);
  box-shadow: var(--shadow);
  animation: vocabulary-arrive 280ms ease both;
}

.trainer-topline {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trainer-progress,
.theme-progress-line {
  height: 3px;
  margin-top: 12px;
  background: var(--paper-deep);
  overflow: hidden;
}

.trainer-progress i,
.theme-progress-line i {
  display: block;
  height: 100%;
  background: var(--level-color);
  transition: width 280ms ease;
}

.trainer-question {
  min-height: 180px;
  padding: 55px 0 35px;
  text-align: center;
}

.trainer-question > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trainer-question h2 {
  margin: 12px 0 0;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 0.95;
}

.trainer-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.trainer-options button {
  appearance: none;
  min-height: 84px;
  padding: 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, padding 160ms ease;
}

.trainer-options button:hover:not(:disabled),
.trainer-options button.is-selected {
  padding-left: 24px;
  background: color-mix(in srgb, var(--level-color), transparent 94%);
}

.trainer-options button.is-correct {
  background: rgba(13, 123, 103, 0.1);
}

.trainer-options button.is-wrong {
  background: rgba(229, 74, 46, 0.09);
}

.trainer-options button span {
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
}

.trainer-options button strong {
  font-size: 14px;
  line-height: 1.4;
}

.trainer-check {
  margin-top: 24px;
}

.trainer-feedback {
  margin-top: 24px;
  padding: 22px 24px;
  border-left: 3px solid var(--green);
  background: rgba(13, 123, 103, 0.06);
  display: grid;
  gap: 6px;
}

.trainer-feedback.is-wrong {
  border-left-color: var(--red);
  background: rgba(229, 74, 46, 0.06);
}

.trainer-feedback > span,
.trainer-rating > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trainer-feedback strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 24px;
}

.trainer-feedback p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.trainer-rating {
  margin-top: 24px;
}

.trainer-rating > div {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.trainer-rating button {
  appearance: none;
  min-height: 70px;
  padding: 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.trainer-rating button:hover {
  background: var(--ink);
  color: white;
}

.trainer-rating button small {
  color: var(--muted);
  font-size: 8px;
}

.vocabulary-trainer.is-finished {
  min-height: 420px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.trainer-kicker {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vocabulary-trainer.is-finished > strong {
  margin: 8px 0;
  color: var(--level-color);
  font-family: "Newsreader", Georgia, serif;
  font-size: 82px;
  line-height: 0.9;
}

.vocabulary-trainer.is-finished h2 {
  margin: 5px 0 12px;
  font-size: clamp(30px, 3.8vw, 46px);
}

.vocabulary-trainer.is-finished p {
  max-width: 580px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.trainer-finish-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.words-workspace {
  margin-top: 28px;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 54px;
}

.word-theme-list {
  padding-top: 25px;
  border-right: 1px solid var(--line);
}

.word-theme-list > .eyebrow {
  display: block;
  margin-bottom: 18px;
}

.word-theme-list button {
  appearance: none;
  width: 100%;
  min-height: 84px;
  padding: 12px 18px 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 28px 1fr 35px;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: padding 180ms ease, color 180ms ease;
}

.word-theme-list button:hover,
.word-theme-list button.is-active {
  padding-left: 8px;
  color: var(--level-color);
}

.word-theme-list button > span,
.word-theme-list button em,
.word-theme-list button small {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.word-theme-list button div {
  display: grid;
  gap: 4px;
}

.word-theme-list button strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 19px;
}

.word-theme-list button em {
  justify-self: end;
}

.word-theme-sheet {
  padding-top: 38px;
  animation: vocabulary-arrive 260ms ease both;
}

.word-theme-sheet > header {
  max-width: 720px;
  padding-bottom: 26px;
}

.word-theme-sheet h2 {
  margin: 10px 0 8px;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 0.98;
}

.word-theme-sheet header p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.word-theme-sheet .theme-progress-line {
  max-width: 420px;
  margin: 24px 0;
}

.theme-word-lines {
  border-top: 1px solid var(--line);
}

.theme-word-lines > div {
  min-height: 94px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 36px minmax(190px, 0.9fr) minmax(150px, 0.8fr) 90px;
  gap: 18px;
  align-items: center;
}

.theme-word-lines > div > span,
.theme-word-lines em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.theme-word-lines small {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

.theme-word-lines > div > div {
  display: grid;
  gap: 4px;
}

.theme-word-lines strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 24px;
}

.theme-word-lines p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.theme-word-lines em {
  justify-self: end;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.theme-word-lines .is-known em {
  color: var(--green);
}

.theme-word-lines .is-due em {
  color: var(--red);
}

.custom-words-section {
  margin-top: 100px;
  padding-top: 42px;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: clamp(45px, 8vw, 110px);
}

.custom-words-copy h2 {
  margin: 9px 0 12px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 0.95;
}

.custom-words-copy > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.custom-word-list {
  margin-top: 25px;
  border-top: 1px solid var(--line);
}

.custom-word-list > div {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 0.8fr 1fr 24px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.custom-word-list > p {
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.custom-word-list span {
  color: var(--muted);
}

.custom-word-list button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.custom-words-form {
  padding: 30px;
  background: var(--white);
  box-shadow: 0 20px 55px rgba(38, 40, 35, 0.08);
}

.custom-words-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-words-form textarea {
  width: 100%;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  resize: vertical;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
}

.custom-words-form > div {
  margin-top: 14px;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

@keyframes vocabulary-arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .program-numbers > div:nth-child(2n) {
    border-right: 0;
  }

  .program-numbers > div:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .program-numbers > div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .words-heading {
    grid-template-columns: 1fr 130px;
  }

  .due-words-button {
    min-height: 96px;
  }

  .words-workspace {
    grid-template-columns: 235px minmax(0, 1fr);
    gap: 28px;
  }

  .theme-word-lines > div {
    grid-template-columns: 30px 1fr 75px;
  }

  .theme-word-lines p {
    grid-column: 2 / 4;
  }
}

@media (max-width: 720px) {
  .words-heading {
    min-height: 0;
    padding: 22px 20px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .due-words-button {
    width: 100%;
    min-height: 52px;
    padding: 10px 14px;
    border-radius: 14px;
    justify-self: stretch;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
  }

  .due-words-button strong {
    margin: 0;
    font-size: 28px;
  }

  .due-words-button small {
    margin-left: auto;
    text-align: right;
  }

  .words-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .words-summary > div {
    min-height: 62px;
    padding: 9px 7px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    align-items: center;
    text-align: center;
  }

  .words-summary > div:last-child {
    border-right: 0;
  }

  .words-summary strong {
    font-size: 26px;
  }

  .words-summary span {
    font-size: 8px;
    line-height: 1.2;
  }

  .trainer-options,
  .trainer-rating > div {
    grid-template-columns: 1fr;
  }

  .trainer-rating button {
    border-left: 1px solid var(--line);
  }

  .words-workspace,
  .custom-words-section {
    grid-template-columns: 1fr;
  }

  .word-theme-list {
    border-right: 0;
    padding: 18px 0 14px;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .word-theme-list > .eyebrow {
    display: none;
  }

  .word-theme-list button {
    flex: 0 0 230px;
    min-height: 76px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    scroll-snap-align: start;
  }

  .word-theme-list button:hover,
  .word-theme-list button.is-active {
    padding-left: 12px;
    background: color-mix(in srgb, var(--level-color), transparent 94%);
  }

  .word-theme-sheet {
    padding-top: 20px;
  }

  .custom-words-section {
    gap: 28px;
  }
}

@media (max-width: 520px) {
  .words-page {
    width: calc(100% - 24px);
  }

  .words-heading h1 {
    font-size: 34px;
  }

  .words-heading .words-level-tabs button {
    min-height: 48px;
    padding-inline: 5px;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  .words-heading .words-level-tabs button span {
    font-size: 20px;
  }

  .words-heading .words-level-tabs button small {
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .vocabulary-trainer {
    padding: 24px 18px;
  }

  .trainer-question {
    min-height: 145px;
    padding: 42px 0 25px;
  }

  .trainer-question h2 {
    font-size: 36px;
  }

  .theme-word-lines > div {
    grid-template-columns: 28px 1fr 70px;
    gap: 9px;
  }

  .theme-word-lines > div > span,
  .theme-word-lines > div > div,
  .theme-word-lines em {
    grid-row: 1;
  }

  .theme-word-lines > div > div {
    grid-column: 2;
  }

  .theme-word-lines em {
    grid-column: 3;
    align-self: start;
  }

  .theme-word-lines p {
    grid-column: 2 / 4;
  }

  .theme-word-lines strong {
    font-size: 21px;
  }

  .custom-words-form {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vocabulary-trainer,
  .word-theme-sheet {
    animation: none;
  }
}

@media (max-width: 1060px) {
  .journey-editorial-hero {
    min-height: 620px;
  }

  .editorial-hero-copy {
    top: 42px;
    left: 36px;
    width: 47%;
  }

  .editorial-hero-copy h1 {
    font-size: clamp(72px, 9vw, 90px);
  }

  .editorial-hero-copy h1 span {
    font-size: 29px;
  }

  .editorial-course-progress {
    top: 36px;
    right: 30px;
  }

  .editorial-next {
    left: 36px;
    bottom: 38px;
    gap: 14px;
  }

  .editorial-next-action {
    padding: 14px 18px;
  }

  .editorial-next-copy strong {
    max-width: 190px;
    font-size: 21px;
  }

  .editorial-level-tabs {
    right: 26px;
    bottom: 26px;
    gap: 6px;
  }

  .editorial-level-tabs button {
    width: 62px;
    height: 66px;
    padding: 9px;
  }

  .editorial-level-tabs button.is-active {
    width: 78px;
    height: 80px;
  }
}

@media (max-width: 760px) {
  .journey-editorial-hero {
    min-height: 680px;
  }

  .editorial-hero-art {
    object-position: 62% center;
  }

  .editorial-hero-wash {
    background:
      linear-gradient(90deg, rgba(249, 239, 219, 0.99) 0%, rgba(249, 239, 219, 0.94) 38%, rgba(249, 239, 219, 0.48) 61%, transparent 84%),
      linear-gradient(0deg, rgba(13, 31, 43, 0.32), transparent 35%);
  }

  .editorial-hero-copy {
    top: 34px;
    left: 26px;
    width: calc(100% - 52px);
  }

  .editorial-hero-copy h1 {
    width: 360px;
    max-width: 72%;
    font-size: 76px;
  }

  .editorial-hero-copy h1 span {
    width: 330px;
    font-size: 29px;
  }

  .editorial-hero-copy > p {
    max-width: 300px;
    font-size: 13px;
  }

  .editorial-course-progress {
    top: 28px;
    right: 24px;
    width: 104px;
  }

  .editorial-course-progress strong {
    font-size: 43px;
  }

  .editorial-next {
    left: 24px;
    bottom: 124px;
  }

  .editorial-level-tabs {
    right: 20px;
    bottom: 18px;
    left: 20px;
  }

  .editorial-level-tabs button,
  .editorial-level-tabs button.is-active {
    width: auto;
    flex: 1;
  }
}

@media (max-width: 620px) {
  .journey-editorial-hero {
    min-height: 720px;
    border-radius: 22px;
  }

  .editorial-hero-art {
    object-position: 65% center;
  }

  .editorial-hero-copy {
    top: 28px;
    left: 22px;
    width: calc(100% - 44px);
  }

  .editorial-hero-kicker {
    font-size: 8px;
  }

  .editorial-hero-copy h1 {
    width: 310px;
    max-width: 76%;
    font-size: clamp(58px, 15vw, 72px);
  }

  .editorial-hero-copy h1 span {
    margin-top: 10px;
    font-size: 25px;
  }

  .editorial-hero-copy > p {
    max-width: 270px;
    margin-top: 22px;
    font-size: 12px;
  }

  .editorial-course-progress {
    top: auto;
    right: 22px;
    bottom: 142px;
    width: 82px;
  }

  .editorial-course-progress > span,
  .editorial-course-progress small {
    font-size: 7px;
  }

  .editorial-course-progress strong {
    font-size: 38px;
  }

  .editorial-next {
    left: 22px;
    bottom: 139px;
    gap: 12px;
  }

  .editorial-next-action {
    padding: 13px 17px;
    font-size: 10px;
  }

  .editorial-next-copy small {
    display: none;
  }

  .editorial-next-copy strong {
    max-width: 160px;
    color: #fff7e6;
    font-size: 19px;
    text-shadow: 0 2px 10px rgba(4, 18, 28, 0.72);
  }

  .editorial-level-tabs button {
    height: 70px;
  }

  .editorial-level-tabs button.is-active {
    height: 82px;
  }

  .editorial-level-tabs button strong {
    font-size: 25px;
  }
}

@media (max-width: 460px) {
  .journey-page {
    padding-top: 18px;
  }

  .journey-editorial-hero {
    min-height: 760px;
  }

  .editorial-hero-art {
    object-position: 69% center;
  }

  .editorial-hero-wash {
    background:
      linear-gradient(180deg, rgba(249, 239, 219, 0.98) 0%, rgba(249, 239, 219, 0.9) 33%, rgba(249, 239, 219, 0.26) 55%, rgba(13, 31, 43, 0.28) 100%),
      linear-gradient(90deg, rgba(249, 239, 219, 0.99) 0%, rgba(249, 239, 219, 0.88) 54%, rgba(249, 239, 219, 0.22) 88%, transparent 100%);
  }

  .editorial-hero-copy h1 {
    max-width: 100%;
  }

  .editorial-hero-copy h1 span {
    width: 270px;
    font-size: 23px;
  }

  .editorial-course-progress {
    right: 20px;
    bottom: 232px;
    width: 74px;
  }

  .editorial-next {
    right: 20px;
    bottom: 132px;
    left: 20px;
  }

  .editorial-next-copy {
    flex: 1;
  }

  .editorial-next-copy strong {
    max-width: 100%;
  }

  .editorial-level-tabs {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }

  .editorial-level-tabs button,
  .editorial-level-tabs button.is-active {
    padding: 8px;
  }

  .editorial-level-tabs button small {
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .journey-editorial-hero,
  .editorial-hero-art {
    animation: none;
  }

  .journey-editorial-hero:hover .editorial-hero-art {
    transform: scale(1.012);
  }
}
