: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,
input,
select { font: inherit; }

button,
a,
input,
select { border-radius: 8px; }

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

button { cursor: pointer; }

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  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;
  overflow: hidden;
}

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

.header-actions,
.language-control,
.quiet-button,
.language-switch {
  display: flex;
  align-items: center;
}

.header-actions { gap: 10px; }

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

.quiet-button { gap: 7px; padding: 8px 12px; }

.quiet-button > span[aria-hidden] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yellow);
}

.language-control {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.language-switch { 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;
}

.welcome {
  max-width: 880px;
  margin-bottom: 30px;
}

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

h1,
h2,
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;
}

.welcome p,
.finder-heading 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;
}

.quiet-button .ui-it,
.quiet-button .ui-en,
.language-control > .ui-it,
.language-control > .ui-en,
.resource-links .ui-it,
.resource-links .ui-en { display: inline; }

.quiet-button .ui-en,
.language-control > .ui-en,
.resource-links .ui-en { margin-left: 4px; }

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

.section-heading,
.finder-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 16px;
}

.total-progress {
  min-width: 190px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.volume-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.volume-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #bfd0e4;
  border-top: 7px solid var(--volume-accent, var(--blue));
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.cover-link {
  display: block;
  padding: 16px 16px 0;
  background: var(--soft);
  text-align: center;
}

.cover-link img {
  display: block;
  width: min(100%, 265px);
  aspect-ratio: 595.5 / 842.25;
  margin: 0 auto;
  border: 1px solid #cbd7e6;
  border-radius: 4px 4px 0 0;
  background: #fff;
  box-shadow: 0 12px 24px rgba(20, 35, 58, .14);
  object-fit: cover;
}

.volume-card-body {
  display: grid;
  gap: 13px;
  padding: 17px;
}

.volume-title-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.volume-title-row h3 {
  margin: 0;
  color: var(--blue-ink);
  font-size: 22px;
  line-height: 1.15;
}

.level-badge {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid #cad8e9;
  border-radius: 6px;
  background: #f2f7fd;
  color: var(--blue-ink);
  font-size: 11px;
  font-weight: 900;
}

.volume-description {
  min-height: 58px;
  margin: 0;
  color: #4e5f77;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8f4;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--volume-accent, var(--green));
}

.continue-button,
.lesson-open,
.quick-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.continue-button {
  width: 100%;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  text-align: center;
}

.continue-button .ui-en { color: rgba(255, 255, 255, .82); }

.quick-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.quick-select label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c9d6e7;
  background: #fff;
  color: var(--ink);
}

select { padding: 8px 34px 8px 10px; }
input { padding: 9px 11px; }

.quick-go { min-width: 46px; padding: 8px 12px; }

.finder {
  margin-top: 40px;
  padding: 25px;
  border-top: 8px solid var(--blue);
  background: #fff;
  box-shadow: var(--shadow);
}

.finder-heading p { max-width: 430px; font-size: 14px; }

.finder-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, .7fr));
  gap: 10px;
}

.finder-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.finder-controls label > span { min-height: 14px; }
.finder-controls label .ui-it,
.finder-controls label .ui-en { display: inline; }
.finder-controls label .ui-en { margin-left: 3px; }

.finder-summary {
  margin: 17px 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.lesson-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lesson-result {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.lesson-result:hover { border-color: #91b5e7; background: #f7fbff; }

.result-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff2c1;
  color: #725100;
  font-size: 11px;
  font-weight: 900;
}

.result-copy { min-width: 0; }
.result-copy strong { display: block; color: var(--blue-ink); font-size: 13px; line-height: 1.25; }
.result-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 800; line-height: 1.3; }
.result-arrow { color: var(--blue); font-size: 20px; }

.empty-results {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px dashed #b9c9dd;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.more-resources {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 26px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #bfcfe1;
}

.more-resources h2 { font-size: 24px; }

.resource-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.resource-links a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #cbd8e8;
  background: rgba(255, 255, 255, .72);
  text-decoration: none;
}

.resource-links strong { color: var(--blue-ink); font-size: 12px; }
.resource-links span { color: var(--muted); font-size: 10px; font-weight: 800; text-align: right; }

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

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

.guide-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.guide-head h2 { font-size: 27px; }

.close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f2f5f9;
  color: var(--blue-ink);
  font-size: 25px;
}

.guide-content { padding: 20px; }

.guide-content ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

.guide-content li {
  counter-increment: guide;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 11px;
}

.guide-content li::before {
  content: counter(guide);
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 900;
}

.guide-content strong,
.guide-content p { grid-column: 2; }
.guide-content strong { color: var(--blue-ink); font-size: 15px; }
.guide-content p { margin: 0; color: #4d5d74; font-size: 13px; font-weight: 700; line-height: 1.5; }

@media (max-width: 900px) {
  .volume-grid { gap: 12px; }
  .cover-link { padding: 10px 10px 0; }
  .volume-card-body { padding: 13px; }
  .finder-controls { grid-template-columns: repeat(3, 1fr); }
  .search-field { grid-column: 1 / -1; }
  .more-resources { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 4px;
    min-height: 0;
    padding: 8px;
  }

  .home-brand { width: 270px; height: 68px; }
  .header-actions { width: 100%; justify-content: center; }
  .language-control > .ui-it,
  .language-control > .ui-en { display: none; }
  .quiet-button,
  .language-switch { min-height: 38px; }

  main {
    width: min(100% - 16px, 1180px);
    padding: 20px 0 32px;
  }

  .welcome { margin-bottom: 22px; text-align: center; }
  .eyebrow { font-size: 10px; }
  h1 { margin-top: 5px; font-size: 30px; line-height: 1.08; }
  h2 { font-size: 24px; }
  .welcome p { font-size: 14px; }

  .section-heading,
  .finder-heading { display: block; margin-bottom: 12px; }
  .total-progress { margin-top: 8px; text-align: left; }

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

  .volume-card {
    display: grid;
    grid-template-columns: 134px minmax(0, 1fr);
    min-height: 205px;
  }

  .cover-link {
    display: flex;
    align-items: flex-start;
    padding: 10px 0 10px 10px;
  }

  .cover-link img {
    width: 124px;
    margin: 0;
    border-radius: 4px;
  }

  .volume-card-body { align-content: start; gap: 8px; padding: 11px; }
  .volume-title-row h3 { font-size: 18px; }
  .volume-description { min-height: 0; font-size: 11px; }
  .progress-copy { font-size: 10px; }
  .continue-button { min-height: 38px; font-size: 11px; }
  .quick-select { display: none; }

  .finder { margin-top: 28px; padding: 16px; border-top-width: 6px; }
  .finder-heading p { margin-top: 7px; font-size: 13px; }
  .finder-controls { grid-template-columns: 1fr 1fr; gap: 8px; }
  .search-field { grid-column: 1 / -1; }
  .finder-controls label:last-child { grid-column: 1 / -1; }
  .lesson-results { grid-template-columns: 1fr; }
  .lesson-result { min-height: 62px; }

  .more-resources { margin-top: 28px; padding-top: 22px; }
  .resource-links { grid-template-columns: 1fr; }

  .student-guide { max-height: calc(100vh - 16px); }
  .guide-head,
  .guide-content { padding: 15px; }
  .guide-head h2 { font-size: 22px; }
}
