:root {
  --blue: #0756b8;
  --blue-ink: #063b80;
  --red: #ef332f;
  --orange: #ef5b32;
  --yellow: #ffcf1c;
  --green: #06a961;
  --sky: #dcecf7;
  --ink: #172033;
  --muted: #667085;
  --line: #d7e1ee;
  --soft: #f5f8fc;
  --paper: #fff;
  --shadow: 0 14px 34px rgba(22, 32, 51, .09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--sky);
  font-family: "Kollektif", Arial, Helvetica, sans-serif;
}

button,
select,
input { font: inherit; }

button {
  border: 0;
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
  padding: 9px max(24px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(22, 32, 51, .05);
}

.home-brand {
  display: block;
  width: 252px;
  height: 64px;
}

.home-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.quiet-button,
.language-switch,
.header-link {
  min-height: 42px;
  border: 1px solid #cbd8e9;
  border-radius: 8px;
  background: #fff;
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 900;
}

.quiet-button,
.header-link { padding: 8px 12px; }

.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.header-link .ui-en {
  color: inherit;
  font-size: .82em;
}

.header-link.teacher-link {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
}

.switch-track {
  position: relative;
  width: 38px;
  height: 21px;
  border-radius: 999px;
  background: #b6c3d4;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  transition: transform .2s ease;
}

.language-switch[aria-checked="true"] .switch-track { background: var(--green); }
.language-switch[aria-checked="true"] .switch-thumb { transform: translateX(17px); }

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.hero {
  max-width: 900px;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { letter-spacing: 0; }

h1 {
  margin: 7px 0 10px;
  color: var(--blue-ink);
  font-size: 48px;
  line-height: 1.05;
}

h2 {
  margin: 5px 0 0;
  color: var(--blue-ink);
  font-size: 30px;
  line-height: 1.1;
}

h3 {
  margin: 0;
  color: var(--blue-ink);
  font-size: 24px;
}

.hero p,
.panel-heading p,
.category-heading p,
.guide-content p {
  margin: 0;
  color: #4d5d74;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.ui-en {
  display: block;
  color: var(--muted);
  font-size: .86em;
  font-style: italic;
  font-weight: 700;
}

.english-only .ui-it { display: none !important; }
.english-only .ui-en {
  display: inline;
  color: inherit;
  font-size: inherit;
  font-style: normal;
  font-weight: inherit;
}

.route-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.teacher-tools {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid #bed0e5;
  border-top: 7px solid var(--green);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow);
}

.teacher-tool-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.teacher-tool-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 12px;
  border: 1px solid #c7d7e9;
  border-radius: 8px;
  background: #fff;
}

.teacher-tool-card:hover {
  border-color: #9fc0e9;
  background: #f8fbff;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 54px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 900;
}

.teacher-tool-card strong {
  display: block;
  color: var(--blue-ink);
  font-size: 16px;
  line-height: 1.2;
}

.teacher-tool-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.route-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 134px;
  padding: 18px;
  border: 1px solid #bed0e5;
  border-top: 7px solid transparent;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.route-card.active {
  border-color: #9fc0e9;
  border-top-color: var(--orange);
  background: #fbfdff;
}

.route-icon,
.category-icon,
.level-pill,
.lesson-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 900;
}

.route-icon {
  width: 96px;
  height: 72px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--blue-ink);
  font-size: 18px;
}

.route-card strong {
  display: block;
  color: var(--blue-ink);
  font-size: 22px;
}

.route-card small {
  display: block;
  margin-top: 6px;
  color: #526278;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.route-panel {
  display: none;
  padding: 22px;
  border: 1px solid #bed0e5;
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
}

.route-panel.active { display: block; }

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 18px;
}

.panel-heading p {
  max-width: 500px;
}

.level-path {
  display: grid;
  gap: 10px;
}

.level-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.level-summary {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.level-summary[aria-expanded="true"] {
  background: #f7fbff;
}

.level-pill {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
}

.level-summary strong {
  color: var(--blue-ink);
  font-size: 18px;
}

.level-summary small {
  display: block;
  margin-top: 4px;
  color: #5b6a80;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.count {
  min-width: 42px;
  padding: 7px 9px;
  border-radius: 999px;
  background: #eef4fb;
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.level-lessons,
.category-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.lesson-link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 32px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e2e8f2;
  border-radius: 8px;
  background: #fff;
}

.lesson-link:hover {
  border-color: #aac5e8;
  background: #f8fbff;
}

.lesson-code {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff4cf;
  color: #7a5700;
  font-size: 12px;
  white-space: nowrap;
}

.lesson-main {
  min-width: 0;
}

.lesson-main strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.lesson-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.arrow {
  color: var(--blue);
  font-weight: 900;
  text-align: right;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 150px;
  padding: 14px;
  border: 1px solid #c6d6e9;
  border-top: 6px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 9px 20px rgba(22, 32, 51, .05);
}

.category-card.active {
  border-top-color: var(--green);
  background: #f8fffb;
}

.category-icon {
  width: fit-content;
  min-width: 72px;
  height: 48px;
  padding: 0 12px;
  border-radius: 8px;
  background: #e9f2ff;
  color: var(--blue-ink);
  font-size: 14px;
  letter-spacing: 0;
}

.category-card strong {
  color: var(--blue-ink);
  font-size: 15px;
  line-height: 1.25;
}

.category-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.category-lessons {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #c8d8e9;
  border-radius: 8px;
  background: #fff;
}

.category-heading {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.category-icon.large {
  width: fit-content;
  min-width: 96px;
  height: 66px;
  padding: 0 14px;
  background: var(--yellow);
  font-size: 16px;
}

.student-guide {
  width: min(680px, calc(100% - 24px));
  padding: 0;
  border: 1px solid #b8cae1;
  border-top: 8px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(15, 35, 65, .3);
}

.student-guide::backdrop { background: rgba(10, 26, 50, .58); }

.guide-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.close-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f2f5f9;
  color: var(--blue-ink);
  font-size: 22px;
  font-weight: 900;
}

.guide-content {
  display: grid;
  gap: 12px;
  padding: 18px 22px 22px;
}

@media (max-width: 920px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .route-choice,
  .category-grid,
  .teacher-tools,
  .teacher-tool-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  h1 { font-size: 38px; }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 20px, 1180px);
    padding-top: 22px;
  }

  .home-brand {
    width: 220px;
    height: 56px;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .route-choice,
  .category-grid,
  .teacher-tools,
  .teacher-tool-actions {
    grid-template-columns: 1fr;
  }

  .route-card {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 112px;
  }

  .route-icon {
    width: 72px;
    height: 56px;
    font-size: 14px;
  }

  h1 { font-size: 32px; }
  h2 { font-size: 25px; }

  .route-panel,
  .category-lessons {
    padding: 12px;
  }

  .level-summary {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .level-summary .count {
    grid-column: 2;
    justify-self: start;
  }

  .level-pill {
    width: 46px;
    height: 46px;
  }

  .lesson-link {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .lesson-link .arrow {
    display: none;
  }
}
