* { box-sizing: border-box; }
:root {
  --ink: #12212a;
  --muted: #4e616d;
  --navy: #0f1629;
  --blue: #303fcb;
  --lavender: #eef0ff;
  --line: #d9e2e8;
  --surface: #fff;
  color: var(--ink);
  font: 16px/1.55 system-ui, sans-serif;
}
body { margin: 0; background: #f4f6f7; }
header {
  background: var(--navy); color: #fff; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; padding: 14px max(16px, calc((100% - 1160px) / 2));
}
header img { max-width: 48%; height: auto; }
header span { text-align: right; font-size: .875rem; }
main { max-width: 1200px; margin: auto; padding: clamp(16px, 3vw, 32px) 16px; }
.intro {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center;
  gap: clamp(16px, 4vw, 52px); padding: clamp(20px, 4vw, 44px);
  border-radius: 20px; background-color: #10182c;
  background-image: linear-gradient(90deg, #10182c 2%, transparent 78%),
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20640%20340%22%20fill%3D%22none%22%3E%3Cdefs%3E%3Cpattern%20id%3D%22grid%22%20width%3D%2228%22%20height%3D%2228%22%20patternUnits%3D%22userSpaceOnUse%22%3E%3Cpath%20d%3D%22M28%200H0V28%22%20stroke%3D%22%23aabaff%22%20stroke-opacity%3D%22.19%22%2F%3E%3C%2Fpattern%3E%3ClinearGradient%20id%3D%22fade%22%3E%3Cstop%20stop-color%3D%22%23fff%22%20stop-opacity%3D%220%22%2F%3E%3Cstop%20offset%3D%22.37%22%20stop-color%3D%22%23fff%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23fff%22%20stop-opacity%3D%22.16%22%2F%3E%3C%2FlinearGradient%3E%3Cmask%20id%3D%22m%22%3E%3Cpath%20fill%3D%22url(%23fade)%22%20d%3D%22M0%200h640v340H0z%22%2F%3E%3C%2Fmask%3E%3C%2Fdefs%3E%3Cg%20mask%3D%22url(%23m)%22%3E%3Cpath%20fill%3D%22url(%23grid)%22%20d%3D%22M0%200h640v340H0z%22%2F%3E%3Cg%20stroke%3D%22%23b3c0ff%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M66%20249h83l58-58h78l52-52h79l70-70h108M118%20304h80l74-74h75l72-72h114l54-54M171%20134h61l56-56h83l50-50h86M300%20301h67l55-55h78l73-73h42%22%20opacity%3D%22.66%22%2F%3E%3Cpath%20d%3D%22M207%20191v-45l33-33h61l35-35m86%20168v-42l45-46%22%20opacity%3D%22.38%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%23c3cdff%22%3E%3Ccircle%20cx%3D%22207%22%20cy%3D%22191%22%20r%3D%224%22%2F%3E%3Ccircle%20cx%3D%22288%22%20cy%3D%2278%22%20r%3D%224%22%2F%3E%3Ccircle%20cx%3D%22337%22%20cy%3D%22139%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%22419%22%20cy%3D%22158%22%20r%3D%224%22%2F%3E%3Ccircle%20cx%3D%22422%22%20cy%3D%22246%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%22486%22%20cy%3D%2269%22%20r%3D%224%22%2F%3E%3Ccircle%20cx%3D%22272%22%20cy%3D%22230%22%20r%3D%223%22%2F%3E%3C%2Fg%3E%3Cg%20stroke%3D%22%23c3cdff%22%20opacity%3D%22.36%22%3E%3Ccircle%20cx%3D%22337%22%20cy%3D%22139%22%20r%3D%2211%22%2F%3E%3Ccircle%20cx%3D%22422%22%20cy%3D%22246%22%20r%3D%2211%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E"),
    linear-gradient(120deg, #10182c, #202960);
  background-position: center, right 34% center, center;
  background-size: cover, min(62%, 680px) auto, cover;
  background-repeat: no-repeat; color: white;
  margin-bottom: 24px;
}
.intro-copy > p:last-child { max-width: 52ch; margin-bottom: 0; color: #e1e6fb; }
.eyebrow { font-size: .875rem; font-weight: 750; color: var(--blue); margin: 0 0 8px; }
.intro .eyebrow { color: #bfc8ff; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; margin: 0; }
h2 { line-height: 1.22; margin: 0 0 12px; }
.progress-card { min-width: 0; padding: 16px; border-radius: 14px; background: var(--surface); color: var(--ink); }
.progress-card label { font-size: .875rem; font-weight: 700; }
progress { display: block; width: 100%; height: 12px; margin: 8px 0; accent-color: var(--blue); }
#progress-text { margin: 0 0 12px; font-size: .875rem; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.35fr); gap: 20px; align-items: start; }
#modules { display: grid; gap: 8px; }
#modules h2 { font-size: 1.125rem; margin: 0 0 4px; }
#modules details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
#modules details[open] { border-color: #a8b2ec; }
#modules summary { cursor: pointer; padding: 11px 12px; font-size: .9rem; font-weight: 700; }
#modules summary::marker { color: var(--blue); }
.route-modules { display: grid; gap: 4px; padding: 0 6px 6px; }
button {
  min-height: 44px; max-width: 100%; padding: 9px 14px; font: inherit; font-weight: 700;
  border-radius: 10px; border: 1px solid var(--blue); color: var(--blue); background: var(--surface); cursor: pointer;
}
.route-modules button { text-align: left; font-size: .875rem; border-color: transparent; color: var(--ink); }
.route-modules button[aria-current="step"] { background: var(--lavender); border-color: #c6cdf5; color: var(--blue); }
#resume, button[type="submit"] { background: var(--blue); color: white; }
button:focus-visible, input:focus-visible, summary:focus-visible, .lesson:focus-visible { outline: 3px solid #5868ea; outline-offset: 3px; }
.lesson { min-width: 0; padding: clamp(16px, 3vw, 34px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lesson h2 { font-size: clamp(1.45rem, 3vw, 2rem); overflow-wrap: anywhere; }
.scenario { background: var(--lavender); border-radius: 10px; padding: 14px 16px; margin: 18px 0; }
.scenario h3, .scenario p { margin: 0; }
.scenario h3 { font-size: .9rem; color: var(--blue); }
.scenario p { margin-top: 6px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 750; margin-bottom: 4px; }
label.option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
label.option:has(input:checked) { border-color: var(--blue); background: var(--lavender); }
label.option input { flex: none; margin: .32rem 0 0; accent-color: var(--blue); }
.feedback { color: var(--blue); font-weight: 650; }
.feedback:empty { margin: 0; }
.note { color: var(--muted); font-size: .875rem; margin-top: 18px; }
@media (hover: hover) {
  .route-modules button:hover, label.option:hover { background: #f2f4ff; }
  #resume:hover, button[type="submit"]:hover { background: #2534ad; }
}
@media (max-width: 720px) {
  .intro, .workspace { grid-template-columns: minmax(0, 1fr); }
  .intro { margin-bottom: 16px; }
  .workspace { gap: 14px; }
}

.mission { margin-top: 24px; scroll-margin-top: 16px; }

.mission #mission-panel { margin-top: 16px; }
.mission .mission-choices { display: grid; gap: 8px; }
.mission .mission-choices button { text-align: left; }
.mission .mission-choices button:disabled { opacity: .65; cursor: default; }
.mission-result { border-left: 4px solid var(--blue); padding: 10px 14px; margin: 14px 0; background: var(--lavender); }
.mission-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mission-heading:focus { outline: 2px solid var(--blue); outline-offset: 3px; }
.mission-actions[hidden] { display: none; }
.role-filter { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.role-filter label { display: block; margin-bottom: 4px; font-size: .85rem; font-weight: 700; }
.role-filter select { width: 100%; min-height: 44px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font: inherit; }
.role-filter select:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.route-recommendation { display: block; margin-left: 16px; color: var(--blue); font-size: .78rem; font-weight: 650; }

.progress-actions { display: grid; gap: 8px; }
.progress-actions > * { text-align: center; font-size: .9rem; }
.mission-link {
  display: grid; place-items: center; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--lavender);
  color: var(--blue); font-weight: 700; text-decoration: none;
}
.mission-link:hover { border-color: var(--blue); }
.mission-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.role-hint { margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
#modules summary { min-height: 44px; }
.lesson { scroll-margin-top: 16px; }

.challenge-note { border-radius: 10px; background: var(--lavender); color: var(--blue); font-weight: 700; padding: 10px 12px; }
.question-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 8px 0 16px; }
.question-steps li { display: grid; place-items: center; min-width: 34px; min-height: 34px; border: 1px solid var(--line); border-radius: 50%; font-size: .85rem; font-weight: 700; }
.question-steps li[aria-current="step"] { background: var(--blue); border-color: var(--blue); color: white; }
.step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.mission-table { overflow-x: auto; margin: 16px 0; }
.mission-table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mission-table caption { text-align: left; font-weight: 700; margin-bottom: 6px; }
.mission-table th, .mission-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.mission-table th { background: var(--lavender); }
.mission-form label { display: grid; gap: 4px; font-weight: 650; margin-top: 12px; }
.mission-form select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.mission-form select:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.mission-deliverables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.mission-deliverables section { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.mission-deliverables h4 { margin: 0 0 8px; }
.mission-summary dt { font-weight: 700; }
.mission-summary dd { margin: 0 0 8px; color: var(--muted); }

.intro { padding: clamp(16px, 3vw, 28px); gap: 16px; margin-bottom: 18px; }
.intro h1 { font-size: clamp(1.7rem, 4vw, 2.45rem); }
.intro-copy > p:last-child { margin-top: 8px; }
.progress-card { padding: 12px; }
.progress-actions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 152px), 1fr)); }
.learning > h2 { font-size: 1.2rem; margin-bottom: 10px; }
#modules h2 { font-size: .95rem; }
.mission { margin-top: 16px; padding: 0; }
.mission > summary { cursor: pointer; padding: 14px 16px; }
.mission > summary > span { display: inline-grid; gap: 2px; vertical-align: middle; }
.mission > summary .eyebrow { margin: 0; }
.mission > summary::marker { color: var(--blue); }
.mission > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.mission-body { padding: 0 clamp(14px, 3vw, 24px) 18px; }
.mission-body > p:first-child { margin-top: 0; }

.header-actions, .language-switch { display: flex; align-items: center; gap: 8px; }
.language-switch a { display: grid; min-width: 38px; min-height: 38px; place-items: center; color: white; border-radius: 8px; font-size: .85rem; text-decoration: none; }
.language-switch a[aria-current] { background: #e9edff; color: #12212a; font-weight: 750; }
.language-switch a:focus-visible { outline: 2px solid white; outline-offset: 2px; }
@media (max-width: 430px) { .header-actions > span { display: none; } }

.achievements { margin-top: 10px; border-top: 1px solid var(--line); font-size: .85rem; }
.achievements summary { cursor: pointer; padding: 10px 2px 4px; font-weight: 700; color: var(--blue); }
.achievements ul, .mission-timeline { list-style: none; padding: 0; margin: 8px 0; }
.achievements li { display: grid; gap: 2px; padding: 6px 2px; }
.achievements li span, .mission-timeline span { color: var(--muted); font-size: .8rem; }
.mission-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 8px; margin-bottom: 16px; }
.mission-timeline li { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; }
.mission-timeline li[aria-current] { border-color: var(--blue); background: var(--lavender); }

@media (max-width: 720px) {
  .intro { background-size: cover, auto 80%, cover; background-position: center, right top, center; }
}
.demo-trigger { margin-top: 8px; border-color: var(--line); font-size: .85rem; }
.demo-dialog { width: min(880px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: clamp(12px, 3vw, 22px); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; }
.demo-dialog::backdrop { background: #0f1629b8; }
.demo-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.demo-header h2 { margin: 0; font-size: clamp(1.05rem, 3vw, 1.4rem); }
.demo-dialog video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 8px; background: var(--navy); }
#demo-status:empty { display: none; }
#demo-practice { margin-top: 12px; }

.training-offer { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; background: var(--lavender); }
.training-offer h3, .training-offer p { margin: 0 0 8px; }
.training-offer h3 { font-size: 1rem; }
.training-offer a { color: var(--blue); font-weight: 700; display: inline-block; padding-block: 4px; }
