:root {
  color-scheme: dark;
  --bg: #101316;
  --surface: #191e23;
  --ink: #f0f1ed;
  --muted: #b0b9c1;
  --line: #343d45;
  --orange: #ff794b;
  --burnt: #ffa587;
  --soft-orange: #35241f;
  --sage: #21352e;
  --sage-ink: #a8dbbe;
  --sand: #372e22;
  --sand-ink: #f0cd94;
  --shadow: 0 1px 2px rgb(0 0 0 / .16);
  --body: Inter, "Segoe UI", system-ui, sans-serif;
  --display: "Barlow Condensed", Bahnschrift, "Arial Narrow", var(--body);
  font: 16px/1.55 var(--body);
}
*,*::before,*::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button,input,textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex: none; vertical-align: middle; }
h1,h2,h3,p,figure { margin: 0; }
:focus-visible { outline: 3px solid #d74816; outline-offset: 3px; }
.sr,.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 8; left: 1rem; top: 1rem; background: var(--surface); padding: .75rem; }
h1:focus, main:focus { outline: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 222px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); z-index: 2; padding: 29px 17px 23px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 28px; font-weight: 870; line-height: .97; letter-spacing: -1.4px; width: fit-content; }
.sidebar .brand { margin: 2px 0 0 10px; }
.brand > span > span { color: var(--burnt); }
.brand small { display: block; color: var(--muted); font-size: 8px; letter-spacing: 1.15px; line-height: 1.25; margin-top: 6px; font-weight: 800; }
.mark { width: 36px; height: 36px; background: var(--orange); border-radius: 9px; display: inline-grid; grid-auto-flow: column; place-content: center; align-items: end; gap: 3px; flex: none; }
.mark i { display: block; width: 3.6px; height: 12px; background: #271911; transform: skewX(-21deg); border-radius: 1px; }
.mark i:nth-child(2) { height: 17px; }
.mark i:nth-child(3) { height: 22px; }
.rail-nav { display: grid; gap: 5px; margin-top: 46px; }
.nav-link { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 650; color: var(--muted); border-radius: 10px; min-height: 46px; padding: 0 12px; }
.nav-link:hover { background: #262d34; color: var(--ink); }
.nav-link.active { background: var(--soft-orange); color: var(--burnt); font-weight: 750; }
.rail-bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 16px 9px 4px; display: grid; gap: 2px; }
.rail-bottom span { font-size: 11px; color: var(--muted); margin-left: 26px; }
.install { display: flex; min-height: 38px; align-items: center; padding: 0; gap: 9px; background: transparent; border: 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.install:hover { color: var(--burnt); }
.workspace { margin-left: 222px; }
.topbar { min-height: 73px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 0 clamp(23px,3.2vw,50px); }
.top-mobile,.dock { display: none; }
.top-right { display: flex; gap: 18px; align-items: center; }
.top-stat { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 800; }
.top-stat small { font-size: 10px; }
.top-flame svg { color: var(--burnt); }
.top-bolt svg { color: var(--sand-ink); }
.profile { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px 4px 5px; min-height: 40px; font-size: 12px; font-weight: 750; }
.profile:hover { border-color: #ad9c8e; }
.avatar { width: 28px; height: 28px; border-radius: 7px; display: inline-grid; place-items: center; font-weight: 850; font-size: 13px; }
.avatar.decouverte { background: var(--soft-orange); color: var(--burnt); }
.avatar.mecatronique { background: var(--sage); color: var(--sage-ink); }

#main { max-width: 1480px; margin: auto; padding: 34px clamp(23px,3.2vw,50px) 45px; min-height: calc(100dvh - 73px); }
.page-intro { margin-bottom: 25px; }
.page-intro h1,.reading h1 { font-weight: 840; font-size: clamp(30px,3.05vw,47px); letter-spacing: -.061em; line-height: 1.13; }
.page-intro p { font-size: 14px; color: var(--muted); margin-top: 7px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; border: 1px solid transparent; border-radius: 8px; padding: 8px 13px; font-size: 13px; font-weight: 780; width: fit-content; }
.primary { background: var(--orange); color: #21150f; }
.primary:hover { background: #ff784a; }
.secondary { background: var(--surface); border-color: var(--line); }
.secondary:hover { border-color: #aa9688; }
.button:disabled { opacity: .65; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.symbol { display: inline-grid; place-items: center; width: 43px; height: 43px; border-radius: 10px; flex: none; }
.orange { background: var(--soft-orange); color: var(--burnt); }
.sage { background: var(--sage); color: var(--sage-ink); }
.sand { background: var(--sand); color: var(--sand-ink); }
.meter-label { display: flex; justify-content: space-between; gap: 9px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 680; }
progress,meter { display: block; width: 100%; height: 8px; border: 0; border-radius: 15px; overflow: hidden; background: #364049; appearance: none; }
progress::-webkit-progress-bar { background: #364049; }
progress::-webkit-progress-value { background: var(--orange); border-radius: 15px; }
progress::-moz-progress-bar { background: var(--orange); border-radius: 15px; }
meter::-webkit-meter-bar { border: 0; background: #364049; }
meter::-webkit-meter-optimum-value { background: var(--orange); border-radius: 15px; }
meter::-moz-meter-bar { background: var(--orange); border-radius: 15px; }
meter[hidden] { display: none; }
.text-link { color: var(--burnt); font-size: 13px; font-weight: 760; display: inline-flex; align-items: center; gap: 4px; }
.text-link:hover { text-decoration: underline; }
.course-link:hover { border-color: #c4b9ab; }
.course-link small { font-size: 11px; color: var(--muted); font-weight: 650; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill { display: inline-flex; min-height: 37px; align-items: center; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 40px; padding: 6px 12px; font-size: 12px; font-weight: 730; }
.pill:hover { border-color: #a99883; }
.pill.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip { display: inline-flex; padding: 3px 7px; font-size: 11px; align-items: center; font-weight: 700; white-space: nowrap; border-radius: 5px; }
.chip:not(.sage,.sand,.orange) { background: #29323a; color: var(--muted); }
.course-list { max-width: 900px; list-style: none; padding: 0; margin: 17px 0 0; display: grid; gap: 9px; }
.course-link { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px; }
.course-link h2 { font-size: 16px; font-weight: 790; }
.course-link p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.course-status { display: flex; gap: 8px; align-items: center; color: var(--burnt); }
.reading { max-width: 830px; margin: auto; }
.back { margin-bottom: 13px; }
.reading-head,.article,.quiz-panel { padding: clamp(17px,3vw,32px); margin-bottom: 14px; }
.reading-head .filters { margin-bottom: 9px; }
.reading-head p { color: var(--muted); margin-top: 10px; }
.article section+section { margin-top: 21px; }
.article h2 { font-size: 19px; letter-spacing: -.3px; }
.article h3 { font-size: 17px; }
.article p { margin-top: 5px; color: var(--muted); max-width: 73ch; }
.article .button { margin-top: 14px; }
.sources { margin-top: 21px; font-size: 13px; }
.sources summary { cursor: pointer; color: var(--burnt); font-weight: 750; padding-bottom: 5px; }
.source { display: flex; align-items: center; gap: 6px; color: var(--burnt); font-size: 13px; font-weight: 710; margin-top: 9px; width: fit-content; }
.source:hover { text-decoration: underline; }
.reading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.quiz-panel h1 { font-size: clamp(25px,4vw,37px); letter-spacing: -.045em; margin: 20px 0 15px; }
.quiz-panel progress { margin-top: 8px; }
.answers { display: grid; gap: 8px; }
.answer { display: grid; grid-template-columns: 1fr auto; min-height: 46px; align-items: center; text-align: left; gap: 10px; background: var(--surface); border: 1px solid var(--line); padding: 9px 13px; border-radius: 8px; }
.answer:hover:not(:disabled) { border-color: #a9937e; }
.answer.right,.feedback.right { background: #22372e; border-color: #59856e; }
.answer.wrong,.feedback.wrong { background: #3b2b25; border-color: #915d4a; }
.feedback { border: 1px solid; border-radius: 8px; padding: 10px; margin: 12px 0; }
.feedback p,.result p { color: var(--muted); }
.result p { margin: 0 0 17px; }
.result .symbol { width: 57px; height: 57px; }
.garage-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.search { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; color: var(--muted); width: min(100%,350px); }
.search:focus-within { outline: 2px solid var(--burnt); }
.search input { background: transparent; border: 0; min-width: 0; width: 100%; outline: none; }
.results-count { margin: 15px 0 8px; color: var(--muted); font-size: 13px; }
.car-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.car-tile { position: relative; overflow: hidden; }
.car-card-link { display: block; min-height: 146px; padding: 14px; }
.car-card-link:hover { background: #262d34; }
.car-card-link:focus-visible { outline-offset: -4px; }
.car-meta { display: flex; gap: 4px; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); }
.car-name { margin-top: 10px; padding-right: 31px; }
.car-name small { color: var(--burnt); font-weight: 800; font-size: 12px; }
.car-name h2 { font-size: 19px; letter-spacing: -.5px; line-height: 1.2; }
.car-name p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.icon-button { display: inline-grid; place-items: center; width: 39px; height: 39px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.icon-button:hover { border-color: #ad9c8e; }
.car-tile .bookmark { position: absolute; right: 11px; bottom: 13px; }
.bookmark[aria-pressed="true"] { color: var(--burnt); border-color: #f0ad90; background: var(--soft-orange); }
.bookmark[aria-pressed="true"] svg { fill: #f8956d; }
.car-hero { margin-bottom: 14px; }
.car-hero img { width: 100%; max-height: 330px; border-radius: 8px; object-fit: contain; background: var(--bg); }
.car-hero figcaption { color: var(--muted); font-size: 11px; margin-top: 4px; }
.empty { font-size: 14px; color: var(--muted); margin: 6px 0; grid-column: 1 / -1; }
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 1000px; }
.lab { padding: clamp(17px,2.5vw,25px); }
.lab h2,.assistant-panel h2 { font-size: 18px; }
.lab p { color: var(--muted); font-size: 14px; margin: 5px 0 14px; }
.slider { margin-bottom: 17px; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; align-items: center; font-size: 13px; font-weight: 680; }
.slider output { color: var(--burnt); font-variant-numeric: tabular-nums; }
.slider input { grid-column: 1 / -1; width: 100%; min-height: 27px; margin: 0; accent-color: var(--burnt); }
.lab-top { display: flex; gap: 10px; align-items: center; }
.lab-top p { margin: 0; }
.load-amount { display: block; font-size: clamp(30px,4vw,49px); line-height: 1.1; font-weight: 850; letter-spacing: -.055em; margin: 15px 0 5px; font-variant-numeric: tabular-nums; }
.formula { font-family: "IBM Plex Mono",monospace; font-size: 14px; color: var(--muted); }
.lab-bars { margin: 20px 0; display: grid; gap: 6px; }
.lab-bars meter + .meter-label { margin-top: 7px; }
.assistant-panel,.assistant-results { max-width: 820px; padding: clamp(16px,2.6vw,26px); }
.assistant-panel form { display: grid; gap: 7px; margin: 16px 0; }
.assistant-panel label { font-size: 13px; font-weight: 750; }
.assistant-panel textarea { resize: vertical; width: 100%; border: 1px solid #cbc3b9; border-radius: 8px; padding: 9px; }
.ask-buttons,.suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-note { color: var(--muted); font-size: 12px; margin-top: 12px; }
.assistant-results { padding-inline: 0; }
.assistant-results h2 { font-size: 19px; margin-bottom: 8px; }
.generated-answer .text-link,.answer-excerpt .text-link { margin-top: 10px; }
.answer-excerpt .sources { margin-top: 8px; }

dialog { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 20px; width: min(430px,calc(100% - 28px)); color: var(--ink); }
dialog::backdrop { background: rgb(24 22 18 / .50); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dialog-head h2 { font-size: 20px; }
dialog p { margin-bottom: 8px; color: var(--muted); }
.profile-options { display: grid; gap: 7px; margin-top: 12px; }
.profile-option { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px; }
.profile-option:hover,.profile-option[aria-current] { border-color: #e89c7c; }
.profile-option svg { color: var(--burnt); }
.toast:not(:empty) { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: calc(100% - 44px); padding: 10px 15px; border-radius: 8px; background: #22201c; color: white; font-size: 13px; box-shadow: 0 4px 15px #22170f33; pointer-events: none; }
@media (max-width: 1150px) {
  .sidebar { width: 185px; }
  .workspace { margin-left: 185px; }
  .car-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 920px) {
  .sidebar { width: 155px; padding-inline: 10px; }
  .workspace { margin-left: 155px; }
  .sidebar .brand { margin-left: 3px; font-size: 24px; }
  .sidebar .brand small { font-size: 7px; letter-spacing: .78px; }
}
@media (max-width: 680px) {
  .sidebar { display: none; }
  .workspace { margin: 0; }
  .topbar { padding: 0 14px; min-height: 61px; }
  .top-mobile { display: block; }
  .top-mobile .brand { font-size: 24px; gap: 7px; }
  .top-mobile .brand small { display: none; }
  .top-mobile .mark { width: 30px; height: 30px; }
  .top-right { gap: 10px; }
  .profile-name { display: none; }
  .profile { gap: 3px; }
  .dock { position: fixed; inset: auto 0 0; z-index: 2; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); grid-auto-flow: column; padding: 4px 4px max(4px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
  .dock .nav-link { margin: 0 2px; padding: 4px 1px; justify-content: center; gap: 2px; flex-direction: column; font-size: 10px; }
  #main { padding: 23px 14px calc(65px + env(safe-area-inset-bottom)); min-height: calc(100dvh - 61px); }
  .page-intro { margin-bottom: 17px; }
  .page-intro h1,.reading h1 { font-size: clamp(27px,6.3vw,39px); }
  .lab-grid { grid-template-columns: 1fr; gap: 9px; }
  .car-grid { gap: 7px; }
  .car-card-link { padding: 8px; min-height: 155px; }
  .car-name h2 { font-size: 16px; }
  .car-name { padding: 0 0 28px; }
  .car-tile .bookmark { right: 7px; bottom: 7px; width: 35px; height: 35px; }
  .course-status > svg { display: none; }
  .toast:not(:empty) { bottom: calc(59px + env(safe-area-inset-bottom)); }
}
@media (max-width: 340px) {
  .top-flame { display: none; }
  .car-grid { grid-template-columns: 1fr; }
  .course-link { gap: 7px; padding: 9px; }
}


.photo-credit { display: inline; font-size: 11px; color: var(--muted); }
.photo-credit a { color: var(--burnt); text-decoration: underline; }
.image-source { display: inline-block; }
.image-source summary,.deep-reading summary { cursor: pointer; color: var(--burnt); font-weight: 750; }
.image-source .photo-credit { display: block; }
.vehicle-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.vehicle-gallery .car-hero:only-child { grid-column: 1 / -1; }
.deep-reading { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.deep-reading section { margin-top: 13px; }
.spring-lab { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.spring-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: 14px; margin-top: 14px; align-items: start; }
#spring-plot { display: block; width: 100%; height: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.spring-readings { display: block; color: var(--ink); font-size: 13px; margin: 7px 0; font-variant-numeric: tabular-nums; }
.profile-option small { display: block; color: var(--muted); font-size: 11px; }
.dialog-followup { margin-top: 15px; }
.detail-excerpt h3 { margin-top: 13px; font-size: 15px; }
.reading-head .editorial-status { color: var(--sand-ink); font-size: 13px; }
.assistant-panel textarea { background: var(--surface); }
.training-gallery { margin-top: 18px; }
.training-gallery img { width: 100%; aspect-ratio: 4 / 3; }
.training-gallery figcaption strong { color: var(--ink); }
.exercise-context { padding: 12px; margin-bottom: 14px; background: var(--bg); border-inline-start: 3px solid var(--orange); border-radius: 6px; }
.quiz-form { display: grid; gap: 9px; }
.quiz-form fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.quiz-form legend { padding: 0; margin-bottom: 8px; color: var(--muted); }
.quiz-form small,.quiz-form > label { color: var(--muted); }
.numeric-row { display: flex; align-items: center; gap: 10px; }
.numeric-row input { width: min(180px,80%); min-height: 44px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); padding: 7px 10px; }
.quiz-error:empty { display: none; }
.quiz-error { color: var(--burnt); font-size: 13px; }
.multi-option { grid-template-columns: auto 1fr auto; cursor: pointer; }
.multi-option input { width: 19px; height: 19px; accent-color: var(--orange); }
.multi-option:has(input:checked):not(.right,.wrong) { border-color: var(--burnt); }

@media (max-width: 560px) {
  .spring-grid,.vehicle-gallery { grid-template-columns: 1fr; }
}


/* Univers et parcours */
.palette-copper { --accent: #ffa681; --undertone: #432820; }
.palette-mint { --accent: #95e3bd; --undertone: #19372d; }
.palette-violet { --accent: #c5b6ff; --undertone: #32294e; }
.palette-gold { --accent: #f6cf83; --undertone: #3c3021; }
.palette-rose { --accent: #ff9eaf; --undertone: #422632; }
.palette-sky { --accent: #92d6f4; --undertone: #1e3543; }
.palette-lilac { --accent: #e2b4f9; --undertone: #3b2949; }

.universe-picker,.universe-option { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; text-align: left; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.universe-picker { padding: 5px 10px 5px 5px; min-height: 46px; min-width: min(230px,100%); }
.universe-option { padding: 8px 10px; width: 100%; min-height: 58px; }
.universe-picker:hover,.universe-option:hover,.universe-option[aria-current] { border-color: var(--accent); }
.universe-picker small,.universe-option small { color: var(--muted); display: block; font-size: 11px; line-height: 1.2; }
.universe-picker strong,.universe-option strong { display: block; font-size: 13px; line-height: 1.25; }
.universe-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; background: var(--undertone); color: var(--accent); }
.universe-options,.target-options { display: grid; gap: 7px; margin-top: 10px; }
.sync-state { color: var(--muted); font-size: 12px; font-weight: 680; }
.progress-file { display: grid; gap: 6px; margin-top: 15px; color: var(--muted); font-size: 13px; }
.progress-file input { max-width: 100%; }
.target-options .profile-option { grid-template-columns: 1fr auto; min-height: 45px; }
dialog { max-height: 90dvh; }

.path-page { max-width: 1130px; margin-inline: auto; }
.path-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 20px; border: 1px solid color-mix(in srgb,var(--accent) 33%,var(--undertone)); border-radius: 21px; padding: clamp(22px,3.6vw,42px); background: radial-gradient(ellipse at 83% 15%,color-mix(in srgb,var(--accent) 19%,var(--undertone)),transparent 58%), var(--undertone); }
.path-hero::after { content: ""; position: absolute; z-index: -1; right: -35px; top: -110px; height: 480px; width: 225px; border-inline: 2px solid color-mix(in srgb,var(--accent) 24%,transparent); transform: rotate(27deg); background: repeating-linear-gradient(90deg,transparent 0 19px,color-mix(in srgb,var(--accent) 9%,transparent) 19px 21px); }
.path-hero h1 { font-size: clamp(31px,4.15vw,55px); line-height: 1.02; letter-spacing: -.06em; font-weight: 880; margin: 9px 0 12px; }
.path-hero-copy > p:not(.path-hero-progress) { color: #f1e9e8; max-width: 48ch; font-size: 14px; }
.path-hero-progress { color: var(--accent); display: flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 800; }
.path-hero-actions { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 8px; margin-top: 19px; }
.path-hero-actions .primary { background: var(--accent); color: #201819; }
.path-hero-actions .primary:hover { filter: brightness(1.08); }
.path-hero-actions span { color: #f4eeec; font-size: 12px; font-weight: 650; }
.path-hero-emblem { display: grid; place-items: center; width: clamp(116px,16vw,174px); aspect-ratio: 1; border-radius: 32px; color: var(--accent); background: color-mix(in srgb,var(--accent) 8%,var(--undertone)); border: 1px solid color-mix(in srgb,var(--accent) 34%,var(--undertone)); transform: rotate(-9deg); }
.path-hero-emblem svg { width: 64%; height: 64%; stroke-width: 1.25; }

.path-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(224px,290px); gap: 22px; align-items: start; margin-top: 22px; }
.path-units,.path-sidebar { display: grid; gap: 15px; }
.path-unit { border: 1px solid var(--line); border-radius: 17px; background: #151a1e; padding: clamp(14px,2vw,22px); }
.path-unit-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 0 0 13px; border-bottom: 1px solid var(--line); }
.path-unit-head p { color: var(--accent); font-size: 11px; font-weight: 790; }
.path-unit-head h2 { font-size: clamp(17px,2.15vw,24px); line-height: 1.2; letter-spacing: -.038em; padding-top: 3px; }
.unit-count { border: 1px solid var(--line); border-radius: 8px; padding: 2px 7px; color: var(--muted); font-size: 12px; font-weight: 780; flex: none; }
.learning-track { margin: 16px 0 14px; padding: 0; list-style: none; display: grid; gap: 10px; }
.path-stage { position: relative; --zig: 0px; --link-angle: 27deg; }
.path-stage:nth-child(even) { --zig: clamp(15px,3vw,37px); --link-angle: -27deg; }
.path-stage + .path-stage::before { content: ""; position: absolute; top: -12px; left: calc(var(--zig) + 28px); height: 24px; border-left: 3px solid #3b4850; transform-origin: bottom; transform: rotate(var(--link-angle)); }
.path-activity { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; min-height: 75px; padding: 8px 9px; margin-inline-start: var(--zig); border: 1px solid var(--line); background: var(--surface); border-radius: 13px; }
.path-activity:hover { border-color: var(--accent); }
.path-node { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--undertone); color: var(--accent); box-shadow: 0 3px 0 #0b1014; }
.path-node.kind-lab { border-radius: 50%; }
.path-node.kind-challenge,.path-node.kind-assessment { border: 1px dashed currentColor; }
.path-node.kind-practice { border-radius: 9px; }
.path-node.kind-diagnosis { background: #2d2449; color: #d7caff; }
.path-activity-copy { display: grid; min-width: 0; }
.path-activity-copy strong { font-size: 15px; font-weight: 810; line-height: 1.26; overflow-wrap: anywhere; }
.path-activity-type,.path-status { color: var(--muted); font-size: 11px; }
.path-status { margin-top: 2px; }
.path-chevron { color: var(--muted); }
.path-stage.is-next .path-activity { border-color: var(--accent); background: color-mix(in srgb,var(--undertone) 49%,var(--surface)); }
.path-stage.is-next .path-node { background: var(--accent); color: #23191b; }
.path-stage.is-next .path-status { color: var(--accent); font-weight: 760; }
.path-stage.is-done .path-node { background: var(--sage); color: var(--sage-ink); }
.path-stage.is-done .path-status { color: var(--sage-ink); }
.path-milestone { display: flex; align-items: center; gap: 9px; border: 1px dashed var(--line); padding: 8px 11px; border-radius: 11px; color: var(--muted); font-size: 12px; }
.path-milestone strong,.path-milestone div span { display: block; }
.path-milestone strong { color: var(--ink); font-size: 13px; }
.path-milestone.earned { background: #292419; border-color: #aa894b; }
.path-milestone.earned .milestone-icon { color: var(--sand-ink); }
.milestone-icon { display: grid; place-items: center; width: 33px; height: 33px; background: #282729; border-radius: 8px; flex: none; }
.path-side-card { padding: 14px; }
.path-side-title { display: flex; align-items: center; gap: 9px; }
.path-side-title .symbol,.path-academy .symbol { width: 38px; height: 38px; }
.path-side-title h2 { font-size: 15px; font-weight: 830; }
.path-side-title p,.path-retention,.path-side-actions p { font-size: 12px; color: var(--muted); }
.path-side-card progress { margin-top: 12px; }
.path-side-card h3 { margin-top: 12px; font-size: 12px; }
.path-side-actions,.path-retention { margin-top: 9px; }
.path-goal-edit { margin-inline-start: auto; flex: none; width: 44px; height: 44px; }
.path-badges { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 5px; }
.path-badges li { display: flex; align-items: center; gap: 5px; border-radius: 6px; color: var(--sand-ink); background: #322b1d; padding: 4px 6px; font-size: 11px; font-weight: 720; }
.path-academy { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; }
.path-academy strong,.path-academy small { display: block; }
.path-academy small { color: var(--muted); }
.path-academy:hover { border-color: var(--accent); }
.symbol.mint { color: #a8dbbe; background: #21352e; }
.symbol.violet { color: #d2c2ff; background: #302744; }

@media (prefers-reduced-motion: no-preference) {
  .path-stage.is-next .path-node { animation: node-in 520ms cubic-bezier(.18,.76,.36,1.35) both; }
  .is-success > .symbol { animation: node-in 620ms cubic-bezier(.18,.76,.36,1.35) both; }
  @keyframes node-in { from { transform: scale(.77); opacity: .7; } to { transform: scale(1); opacity: 1; } }
}
@media (max-width: 920px) {
  .path-layout { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .path-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .topbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 9px; padding: 9px 14px 8px; }
  .top-mobile { grid-column: 1; grid-row: 1; }
  .top-right { grid-column: 2; grid-row: 1; }
  .universe-picker { grid-column: 1/-1; grid-row: 2; width: 100%; margin-top: 8px; }
  .sync-state,.app-update { grid-column: 1/-1; margin-top: 5px; }
  .path-hero { grid-template-columns: minmax(0,1fr); border-radius: 16px; gap: 0; padding: 19px 16px; }
  .path-hero-emblem { display: none; }
  .path-hero::after { right: -150px; }
  .path-hero h1 { font-size: clamp(28px,8.5vw,41px); max-width: 25ch; }
  .path-hero-copy > p:not(.path-hero-progress) { font-size: 13px; }
  .path-layout { margin-top: 13px; }
  .path-sidebar { gap: 9px; }
  .path-side-card { padding: 10px; }
  .path-side-title { gap: 7px; }
  .path-side-title .symbol,.path-academy .symbol { width: 32px; height: 32px; }
  .path-side-title h2 { font-size: 13px; }
  .path-side-title p { font-size: 11px; }
  .path-goal-edit { width: 40px; height: 40px; }
  .path-activity { gap: 8px; }
}
@media (max-width: 385px) {
  .path-sidebar { grid-template-columns: minmax(0,1fr); }
}

.demo-note { margin: 12px auto 0; padding: 0 16px; max-width: 1080px; color: var(--muted); font-size: .9rem; }
