:root {
    font-family: "DM Sans", "Avenir Next", Inter, system-ui, sans-serif;
    color: #151743;
    background: #fbfaff;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --ink: #151743;
    --muted: #727392;
    --line: #e8e7f3;
    --purple: #7450e9;
    --purple-deep: #5e31d5;
    --blue: #3f9be8;
    --green: #5bbf87;
    --amber: #efb64b;
    --shadow: 0 18px 50px rgba(73, 51, 135, .08);
    --surface: #fff;
    --surface-soft: #fbfaff;
    --surface-muted: #f8f6ff;
    --surface-input: #fcfbff;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: #fbfaff; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #fbfaff; color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgba(116, 80, 233, .35); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 244px; padding: 30px 18px 22px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; flex-shrink: 0; }
.app-main { min-width: 0; flex: 1; }
.brand { display: inline-flex; gap: 9px; align-items: center; padding: 0 9px; }
.brand-mark { width: 30px; height: 31px; position: relative; color: var(--purple); display: inline-flex; align-items: flex-end; justify-content: center; }
.brand-mark i:first-child { position: absolute; top: -1px; right: 1px; color: var(--green); font-size: 16px; }
.brand-mark i:last-child { color: var(--purple); font-size: 24px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font: 800 22px/1 "Manrope", sans-serif; letter-spacing: -1px; white-space: nowrap; }
.brand-copy em { color: var(--purple); font-style: normal; }
.brand-copy small { margin-top: 6px; font-size: 7px; letter-spacing: 1.25px; color: var(--muted); font-weight: 700; }
.brand--compact { display: none; padding: 0; }

.sidebar__nav { margin-top: 76px; }
.sidebar__nav p { margin: 0 13px 13px; font-size: 10px; letter-spacing: 1.6px; color: #b2b3c4; font-weight: 800; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin: 4px 0; border-radius: 12px; color: #6d6e8e; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover { background: #f7f5ff; color: var(--purple); transform: translateX(2px); }
.nav-item--active { position: relative; color: var(--purple); background: #f0ebff; font-weight: 700; }
.nav-item--active::after { content: ""; width: 3px; height: 21px; background: var(--purple); position: absolute; left: 0; border-radius: 0 8px 8px 0; }
.sidebar__footer { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.mini-coach { display: flex; align-items: center; gap: 9px; flex: 1; padding: 11px; background: #f8f6ff; border: 1px solid #eeeaff; border-radius: 14px; }
.mini-coach > span { width: 28px; height: 28px; display: grid; place-items: center; background: #e9e0ff; color: var(--purple); border-radius: 9px; }
.mini-coach div { display: flex; flex-direction: column; gap: 3px; }
.mini-coach strong { font-size: 10px; }
.mini-coach small { color: var(--muted); font-size: 9px; line-height: 1.2; }
.sidebar-help { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); }

.topbar { height: 78px; display: flex; align-items: center; gap: 25px; padding: 0 42px; background: rgba(255, 255, 255, .82); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; backdrop-filter: blur(16px); }
.topbar__context { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.topbar__context span:first-child { color: var(--ink); font-weight: 700; }
.topbar__context i { font-size: 9px; color: #b5b4c7; }
.search-box { margin-left: auto; min-width: 320px; max-width: 390px; height: 40px; padding: 0 10px 0 14px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; color: #9d9eb7; background: #fff; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-box kbd { background: #f4f2fb; border: 1px solid var(--line); border-radius: 5px; color: #9697af; padding: 3px 5px; font-size: 10px; white-space: nowrap; }
.topbar-icon, .avatar-button { background: transparent; position: relative; color: var(--muted); padding: 3px; }
.topbar-icon b { width: 5px; height: 5px; background: #e97892; border: 2px solid #fff; border-radius: 50%; position: absolute; right: 1px; top: 0; }
.avatar-button span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #e8e0ff; color: var(--purple); font-size: 10px; font-weight: 800; }
.profile-menu { position: relative; }
.profile-menu summary { list-style: none; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu__panel { position: absolute; right: 0; top: 48px; z-index: 10; min-width: 210px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.profile-menu__panel strong, .profile-menu__panel small { display: block; }
.profile-menu__panel strong { font-size: 12px; }
.profile-menu__panel small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.profile-menu__panel form { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.profile-menu__panel button { padding: 0; background: transparent; color: var(--purple); font-size: 11px; font-weight: 700; }

.page-wrap { max-width: 1380px; margin: 0 auto; padding: 28px 42px 62px; }
.page { animation: fade-in .28s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { display: block; color: var(--purple); font-size: 9px; letter-spacing: 1.5px; font-weight: 800; text-transform: uppercase; }
.hero-heading, .page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero-heading h1, .page-title-row h1 { margin: 8px 0 0; font: 800 clamp(30px, 4vw, 39px)/1.08 "Manrope", sans-serif; letter-spacing: -1.8px; }
.hero-heading p, .page-title-row p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.hero-streak { min-width: 116px; padding: 13px 14px; display: grid; grid-template-columns: 25px 1fr; align-items: center; column-gap: 6px; border: 1px solid #f4dfc1; border-radius: 13px; background: #fffaf1; }
.hero-streak > i { grid-row: span 2; color: #efa947; font-size: 22px; }
.hero-streak strong { color: #a46d20; font-size: 12px; }
.hero-streak span { color: #c4934a; font-size: 10px; }
.progress-card { margin-top: 25px; padding: 18px 20px; border: 1px solid #e3d9ff; border-radius: 16px; background: linear-gradient(105deg, #fbf9ff, #f6f1ff); }
.progress-card__label, .progress-card__footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.progress-card__label span { color: var(--muted); font-size: 11px; }
.progress-card__label strong { color: var(--purple); font: 800 20px "Manrope", sans-serif; }
.progress-card__label small { color: var(--muted); font: 500 10px "DM Sans", sans-serif; }
.progress-card .progress-track { margin-top: 12px; }
.progress-card__footer { margin-top: 8px; color: var(--muted); font-size: 10px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(300px, .82fr); gap: 20px; margin-top: 20px; }
.home-grid__main, .home-grid__side { display: flex; flex-direction: column; gap: 20px; }
.panel { padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--purple); font-size: 9px; letter-spacing: 1px; font-weight: 800; }
.panel-kicker i { font-size: 13px; }
.panel h2, .listing-panel h2, .trail-overview h2 { margin: 8px 0 0; font: 800 19px/1.15 "Manrope", sans-serif; letter-spacing: -.5px; }
.panel-description { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.panel-date { color: var(--muted); font-size: 10px; }
.text-button, .icon-button { display: inline-flex; align-items: center; gap: 7px; color: var(--purple); background: transparent; font-size: 11px; font-weight: 700; }
.icon-button { width: 30px; height: 30px; justify-content: center; border: 1px solid var(--line); border-radius: 9px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 20px; }
.week-day { min-width: 0; padding: 9px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #a6a6ba; border: 1px solid #efedf5; border-radius: 11px; background: #fff; }
.week-day span, .week-day b { font-size: 10px; }
.week-day b { color: var(--ink); font-weight: 700; }
.week-day i { width: 21px; height: 21px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: #f0eff6; font-size: 10px; font-style: normal; }
.week-day--done i { background: var(--green); }
.week-day--active { border-color: #cbbcff; background: #faf8ff; }
.week-day--active span { color: var(--purple); font-weight: 700; }

.progress-track { width: 100%; height: 7px; display: block; overflow: hidden; border-radius: 99px; background: #eeedf5; }
.progress-track--compact { height: 5px; }
.progress-fill { height: 100%; display: block; border-radius: inherit; background: var(--purple); }
.progress-fill--purple { background: linear-gradient(90deg, #7f59ea, #b092ff); }
.progress-fill--blue { background: linear-gradient(90deg, #54a9e8, #8bcdf5); }
.progress-fill--green { background: linear-gradient(90deg, #4dbb80, #8bd6ac); }
.progress-fill--amber { background: linear-gradient(90deg, #e4a73e, #f2cf83); }

.mission-list { margin-top: 12px; }
.mission-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 3px; border-top: 1px solid #f0eff6; text-align: left; transition: background .18s ease, transform .18s ease; }
.mission-row:first-child { border-top: 0; }
.mission-row:hover { transform: translateX(3px); }
.mission-row__body { min-width: 0; flex: 1; }
.mission-row__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mission-row__top strong { font-size: 13px; }
.mission-row__top > i { color: #b7b6c7; font-size: 11px; }
.mission-row__description { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.mission-row__meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 10px; }
.mission-row__meta i { color: #bbbaca; font-style: normal; }
.mission-row__side { min-width: 115px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.icon-bubble { width: 41px; height: 41px; display: grid; place-items: center; flex-shrink: 0; border-radius: 12px; font-size: 17px; }
.icon-bubble--sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.icon-bubble--purple { color: #7651e5; background: #efeaff; }
.icon-bubble--blue { color: #328fd7; background: #e7f4ff; }
.icon-bubble--green { color: #42ad76; background: #e5f7ed; }
.icon-bubble--amber { color: #dba23b; background: #fff3d8; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-pill--available { color: #6b6d8c; background: #f1f0f6; }
.status-pill--progress { color: #7651e5; background: #efeaff; }
.status-pill--completed { color: #309362; background: #e5f7ed; }
.mission-row__side .progress-track { width: 100%; }
.panel-more { width: 100%; padding-top: 13px; color: var(--purple); border-top: 1px solid #f0eff6; background: transparent; font-size: 10px; font-weight: 700; }

.subject-path { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 22px; }
.subject-node { min-width: 0; display: flex; flex-direction: column; align-items: center; position: relative; gap: 7px; text-align: center; }
.subject-node__icon { z-index: 1; width: 53px; height: 53px; display: grid; place-items: center; border: 2px solid; border-radius: 50%; background: #fff; font-size: 21px; }
.subject-node__icon--blue { border-color: #66b8f1; color: #328fd7; }
.subject-node__icon--purple { border-color: #ad91ff; color: #7951e9; }
.subject-node__icon--green { border-color: #8bd6ac; color: #43af79; }
.subject-node__icon--amber { border-color: #f0c66c; color: #dca43e; }
.subject-node__line { position: absolute; z-index: 0; top: 26px; left: calc(50% + 22px); width: calc(100% - 44px); height: 2px; background: #ded8f4; }
.subject-node strong { font-size: 10px; line-height: 1.1; }
.subject-node small { color: var(--muted); font-size: 10px; }
.outline-button, .soft-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--purple); font-size: 11px; font-weight: 700; }
.outline-button:hover, .soft-button:hover { border-color: #cbbdff; background: #fbfaff; }
.outline-button--full { width: 100%; margin-top: 24px; }
.reinforcement-card { padding: 20px 21px; border: 1px solid #e7ddff; border-radius: 18px; background: #faf8ff; }
.reinforcement-card__top { display: flex; align-items: center; gap: 8px; color: var(--purple); font-size: 9px; letter-spacing: 1.1px; font-weight: 800; }
.reinforcement-card h3 { margin: 14px 0 0; font: 800 18px/1.2 "Manrope", sans-serif; }
.reinforcement-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.reinforcement-card a { display: inline-flex; align-items: center; gap: 7px; margin-top: 17px; color: var(--purple); font-size: 11px; font-weight: 700; }

.page-title-row { align-items: center; margin-bottom: 27px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 17px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #8059ee, #6531d1); box-shadow: 0 10px 18px rgba(105, 62, 220, .18); font-size: 12px; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 13px 22px rgba(105, 62, 220, .24); }
.primary-button--full { width: 100%; margin-top: 4px; }
.tabs { display: flex; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a { position: relative; padding: 0 0 13px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tabs a:hover { color: var(--purple); }
.tabs__item--active { color: var(--purple) !important; font-weight: 700; }
.tabs__item--active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: var(--purple); }
.listing-panel { margin-top: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.question-filter-panel { margin-top: 20px; padding: 21px; border: 1px solid #e3d9ff; border-radius: 18px; background: linear-gradient(105deg, #fbf9ff, #f6f1ff); }
.question-filter-panel__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.question-filter-panel__heading h2 { margin: 8px 0 0; font: 800 18px/1.15 "Manrope", sans-serif; letter-spacing: -.4px; }
.question-filter-panel__heading p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.question-filter-panel__icon { width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; border-radius: 11px; color: var(--purple); background: #e9e0ff; }
.question-filter { display: grid; grid-template-columns: .85fr 1fr 2fr .8fr auto; align-items: end; gap: 10px; margin-top: 19px; }
.question-filter__field { min-width: 0; }
.question-filter__field label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.question-filter__field select { width: 100%; height: 41px; padding: 0 11px; border: 1px solid #ded9ef; border-radius: 10px; outline: 0; color: var(--ink); background: #fff; font-size: 11px; }
.question-filter__field select:focus { border-color: #a991f5; box-shadow: 0 0 0 3px rgba(116, 80, 233, .1); }
.question-filter__submit { height: 41px; padding: 0 14px; white-space: nowrap; }
.listing-panel__intro { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.listing-panel__intro p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.listing-count { color: var(--muted); font-size: 10px; }
.mission-list--large .mission-row { padding: 17px 4px; }
.empty-state { min-height: 180px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--muted); text-align: center; }
.empty-state > i { color: var(--green); font-size: 28px; }
.empty-state strong { color: var(--ink); font-size: 14px; }
.empty-state span { font-size: 12px; }
.empty-state--panel { margin-top: 20px; border: 1px dashed var(--line); border-radius: 18px; background: #fff; }

.trail-overview { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.trail-overview__head { display: flex; justify-content: space-between; align-items: flex-start; }
.trail-overview__head > strong { color: var(--purple); font: 800 25px "Manrope", sans-serif; text-align: right; }
.trail-overview__head > strong small { display: block; margin-top: 2px; color: var(--muted); font: 500 10px "DM Sans", sans-serif; }
.trail-line { height: 7px; margin: 25px 0 21px; overflow: hidden; border-radius: 99px; background: #eeedf5; }
.trail-line span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7f59ea, #b092ff); }
.trail-subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.trail-subject { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid #efedf5; border-radius: 14px; background: #fff; text-align: left; }
.trail-subject:hover { border-color: #d6caff; background: #fbfaff; }
.trail-subject > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.trail-subject strong { font-size: 13px; }
.trail-subject small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.trail-subject b { color: var(--purple); font-size: 13px; }
.trail-subject > i { color: #b2b1c4; font-size: 12px; }
.trail-subject__icon { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; border-radius: 11px; font-size: 17px; }
.trail-subject__icon--blue { color: #328fd7; background: #e7f4ff; }
.trail-subject__icon--purple { color: #7951e9; background: #efeaff; }
.trail-subject__icon--green { color: #42ad76; background: #e5f7ed; }
.trail-subject__icon--amber { color: #dba23b; background: #fff3d8; }
.trail-focus { display: flex; justify-content: space-between; gap: 30px; margin-top: 20px; padding: 24px; border: 1px solid #e4dbff; border-radius: 18px; background: linear-gradient(105deg, #faf8ff, #f4efff); }
.trail-focus__copy { max-width: 500px; }
.trail-focus h2 { margin: 9px 0 0; font: 800 21px "Manrope", sans-serif; }
.trail-focus p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.trail-focus .primary-button { margin-top: 19px; }
.trail-focus__stat { width: 250px; align-self: center; }
.trail-focus__stat > span:first-child, .trail-focus__stat small { display: block; color: var(--muted); font-size: 11px; }
.trail-focus__stat strong { display: block; margin: 6px 0 10px; color: var(--purple); font: 800 31px "Manrope", sans-serif; }
.trail-focus__stat small { margin-top: 8px; font-size: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.stat-card { padding: 18px; display: grid; grid-template-columns: 40px 1fr; align-items: center; column-gap: 11px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.stat-card > span:nth-child(2) { color: var(--muted); font-size: 11px; }
.stat-card > strong { margin-top: 4px; font: 800 26px "Manrope", sans-serif; }
.stat-card > small { grid-column: 2; margin-top: 4px; color: #44aa76; font-size: 10px; }
.stat-card > .icon-bubble { grid-row: span 2; }
.performance-panel { margin-top: 19px; padding: 24px; }
.performance-score { color: var(--green); font-weight: 800; }
.performance-score small { color: var(--muted); font-weight: 500; }
.bar-chart { height: 180px; display: flex; align-items: flex-end; gap: 14px; margin-top: 26px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.chart-bar { flex: 1; max-width: 54px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.chart-bar span { width: 100%; max-width: 28px; min-height: 5px; border-radius: 8px 8px 0 0; background: #eeedf5; }
.chart-bar span.chart-bar--done { background: linear-gradient(180deg, #ad90ff, #7652e7); }
.chart-bar small { color: var(--muted); font-size: 10px; }
.performance-bottom { display: grid; grid-template-columns: 1.35fr .65fr; gap: 19px; margin-top: 19px; }
.performance-bottom > .panel { padding: 24px; }
.discipline-list { margin-top: 19px; display: flex; flex-direction: column; gap: 18px; }
.discipline-row { display: grid; grid-template-columns: 1fr 2.2fr 40px; align-items: center; gap: 15px; font-size: 11px; }
.discipline-row > strong { color: var(--purple); text-align: right; }
.discipline-row > small { grid-column: 2 / 4; margin-top: -10px; color: var(--muted); font-size: 10px; }
.reinforcement-card--small { display: flex; flex-direction: column; justify-content: center; }

.focus-layout { min-height: 100vh; background: #fbfaff; }
.mission-runner { min-height: 100vh; padding: 35px 6vw 50px; }
.focus-topbar, .question-progress, .question-layout { max-width: 920px; margin-right: auto; margin-left: auto; }
.focus-topbar { display: flex; align-items: center; gap: 15px; }
.focus-topbar > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.focus-topbar strong { font: 800 15px "Manrope", sans-serif; }
.question-timer { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; font-size: 11px; }
.question-progress { height: 8px; margin-top: 21px; margin-bottom: 28px; overflow: hidden; border-radius: 99px; background: #eeedf5; }
.question-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ae8bff, #7045e2); transition: width .25s ease; }
.question-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) 280px; gap: 21px; align-items: start; }
.question-card { padding: 27px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.question-card__meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.subject-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-weight: 700; }
.subject-chip--purple { color: #7047dd; background: #efeaff; }
.question-card h1 { max-width: 700px; margin: 21px 0 0; font: 800 clamp(20px, 3vw, 28px)/1.32 "Manrope", sans-serif; }
.question-context { margin-top: 18px; color: #555675; font-size: 12px; line-height: 1.65; }
.question-context img { max-width: 100%; height: auto; border-radius: 10px; }
.question-introduction { margin: 18px 0 0; color: #555675; font-size: 13px; line-height: 1.6; }
.answer-list { display: flex; flex-direction: column; gap: 9px; margin: 25px 0 0; padding: 0; border: 0; }
.answer-option { width: 100%; min-height: 49px; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 15px; border: 1px solid #e1e0ec; border-radius: 12px; background: #fff; text-align: left; transition: border .18s ease, background .18s ease, opacity .18s ease; }
.answer-option:hover { border-color: #b6a0ff; background: #fbfaff; }
.answer-option__choice { min-width: 0; flex: 1; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.answer-option__choice input { position: absolute; opacity: 0; pointer-events: none; }
.answer-option__choice:has(input:focus-visible) { outline: 3px solid rgba(116, 80, 233, .28); outline-offset: 3px; border-radius: 8px; }
.answer-option__letter { width: 24px; height: 24px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid #c8c8d7; border-radius: 50%; color: var(--muted); font-size: 11px; font-weight: 700; }
.answer-option:has(input:checked) { border-color: var(--purple); background: #f8f4ff; }
.answer-option:has(input:checked) .answer-option__letter { color: #fff; border-color: var(--purple); background: var(--purple); }
.answer-option__text { min-width: 0; flex: 1; font-size: 12px; font-weight: 600; }
.answer-option__eliminate { width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.answer-option__eliminate:hover { color: var(--purple); border-color: #d3c5ff; background: #f4efff; }
.answer-option__eliminate:focus-visible { color: var(--purple); border-color: var(--purple); outline: 3px solid rgba(116, 80, 233, .2); outline-offset: 2px; }
.answer-option--eliminated { opacity: .58; }
.answer-option--eliminated .answer-option__text { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.answer-option--eliminated .answer-option__eliminate { color: var(--purple); border-color: #d3c5ff; background: #f4efff; }
.answer-option__eliminate:disabled { cursor: not-allowed; opacity: .45; }
.answer-feedback { min-height: 0; margin-top: 16px; padding: 0; border-radius: 9px; font-size: 11px; }
.answer-feedback:not(:empty) { padding: 10px 12px; }
.answer-feedback--correct { color: #319868; background: #e9f8ee; }
.answer-feedback--try { color: #a36e1c; background: #fff6df; }
.answer-feedback--error { color: #a74c62; background: #fff0f3; }
.question-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.question-side { padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.question-side__header { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.question-side__header strong { color: var(--purple); font-size: 15px; }
.question-dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 16px; }
.question-dots span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #dcdbe7; border-radius: 50%; color: var(--muted); font-size: 10px; }
.question-dots .question-dot--done { color: #fff; border-color: var(--green); background: var(--green); }
.question-dots .question-dot--current { color: var(--purple); border: 2px solid #8e6bf0; }
.question-tip { margin-top: 22px; padding: 14px; border-radius: 12px; color: var(--purple); background: #faf8ff; }
.question-tip strong { display: block; margin-top: 9px; color: var(--ink); font-size: 12px; }
.question-tip p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.completion-view { min-height: 60vh; display: flex; flex-direction: column; align-items: center; padding-top: 35px; }
.completion-card { width: min(100%, 650px); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.completion-card__icon { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 21px; color: #fff; border-radius: 50%; background: linear-gradient(135deg, #7d5aed, #65c993); box-shadow: 0 12px 25px rgba(103, 76, 223, .18); font-size: 29px; }
.completion-card__icon--muted { color: var(--purple); background: #efeaff; box-shadow: none; }
.completion-card h1 { margin: 11px 0 0; font: 800 28px "Manrope", sans-serif; }
.completion-card > p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.completion-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin-top: 26px; }
.completion-metrics > div { padding: 16px; border: 1px solid #efedf5; border-radius: 14px; text-align: left; }
.completion-metrics span, .completion-metrics small { display: block; color: var(--muted); font-size: 10px; }
.completion-metrics strong { display: block; margin: 6px 0 3px; font: 800 25px "Manrope", sans-serif; }
.accent-text { color: var(--purple); }
.completion-recommendation { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; border-radius: 13px; background: #faf8ff; text-align: left; }
.completion-recommendation > div { flex: 1; }
.completion-recommendation > div > span { display: block; color: var(--purple); font-size: 9px; letter-spacing: 1px; font-weight: 800; }
.completion-recommendation strong { display: block; margin-top: 5px; font-size: 13px; }
.completion-recommendation p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.completion-recommendation > i { color: var(--purple); }
.completion-actions { display: flex; gap: 10px; margin-top: 22px; }
.completion-actions > * { flex: 1; }
.empty-focus { min-height: 100vh; display: grid; place-items: center; padding: 25px; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background: #fbfaff; }
.auth-page { width: min(100%, 440px); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 22px; }
.auth-brand strong { font: 800 27px "Manrope", sans-serif; letter-spacing: -1px; }
.auth-card { padding: 31px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.auth-card__heading h1 { margin: 9px 0 0; font: 800 25px/1.15 "Manrope", sans-serif; letter-spacing: -1px; }
.auth-card__heading p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 15px; margin-top: 24px; }
.auth-form label { display: flex; flex-direction: column; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }
.auth-form input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: #fcfbff; font-size: 12px; }
.auth-form input:focus { border-color: #b7a3ff; box-shadow: 0 0 0 3px rgba(116, 80, 233, .1); }
.auth-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 17px; color: var(--purple); font-size: 11px; font-weight: 700; }
.auth-card__footer { margin-top: 23px; padding-top: 18px; border-top: 1px solid #f0eff6; color: var(--muted); font-size: 11px; text-align: center; }
.auth-card__footer a { color: var(--purple); font-weight: 700; }
.form-alert { margin-top: 18px; padding: 10px 12px; border-radius: 9px; font-size: 11px; line-height: 1.4; }
.form-alert ul { margin: 0; padding-left: 17px; }
.form-alert--error { color: #a74c62; background: #fff0f3; }
.form-alert--success { color: #319868; background: #e9f8ee; }

.mobile-nav { display: none; }

@media (max-width: 1050px) {
    .sidebar { width: 210px; }
    .topbar { padding: 0 25px; gap: 16px; }
    .topbar__context { display: none; }
    .page-wrap { padding-inline: 25px; }
    .home-grid { grid-template-columns: 1fr; }
    .question-filter { grid-template-columns: repeat(3, 1fr); }
    .question-filter__field--subject { grid-column: span 2; }
    .home-grid__side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
    .reinforcement-card { height: 100%; }
    .question-layout { grid-template-columns: 1fr; }
    .question-side { display: none; }
}

@media (max-width: 760px) {
    body { background: #fbfaff; }
    .app-shell { display: block; }
    .sidebar { display: none; }
    .topbar { height: 66px; padding: 0 17px; justify-content: space-between; position: sticky; }
    .brand--compact { display: inline-flex; }
    .brand--compact .brand-mark { width: 27px; height: 28px; }
    .brand--compact .brand-copy strong { font-size: 19px; }
    .search-box, .topbar__context { display: none; }
    .topbar-icon { margin-left: auto; }
    .page-wrap { padding: 21px 16px 88px; }
    .hero-heading { align-items: flex-start; }
    .hero-heading h1, .page-title-row h1 { font-size: 32px; }
    .hero-heading p, .page-title-row p { max-width: 230px; font-size: 12px; line-height: 1.4; }
    .hero-streak { min-width: 100px; padding: 9px 10px; }
    .hero-streak strong { font-size: 11px; }
    .hero-streak span { font-size: 9px; }
    .progress-card { margin-top: 18px; }
    .progress-card__label { align-items: flex-start; flex-direction: column; gap: 5px; }
    .home-grid { display: flex; gap: 15px; margin-top: 15px; }
    .home-grid__main, .home-grid__side { gap: 15px; }
    .home-grid__side { display: flex; }
    .panel--week, .panel--missions, .panel--path { padding: 18px; }
    .panel-heading h2 { font-size: 17px; }
    .panel-date { display: none; }
    .week-strip { gap: 2px; margin-top: 16px; }
    .week-day { padding: 7px 1px; }
    .week-day span, .week-day b { font-size: 9px; }
    .week-day i { width: 19px; height: 19px; }
    .mission-row { gap: 9px; padding: 12px 0; }
    .mission-row__side { min-width: 75px; }
    .mission-row__description { font-size: 9px; }
    .mission-row__meta { flex-wrap: wrap; font-size: 9px; }
    .mission-row__top strong { font-size: 12px; }
    .status-pill { padding: 4px 6px; font-size: 8px; }
    .subject-path { gap: 2px; }
    .subject-node__icon { width: 47px; height: 47px; }
    .subject-node__line { left: calc(50% + 20px); width: calc(100% - 40px); }
    .subject-node strong, .subject-node small { font-size: 9px; }
    .reinforcement-card { padding: 17px; }
    .reinforcement-card h3 { font-size: 16px; }
    .page-title-row { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
    .page-title-row .primary-button, .page-title-row .soft-button { align-self: stretch; }
    .tabs { gap: 16px; }
    .tabs a { font-size: 11px; }
    .listing-panel { padding: 18px; }
    .listing-panel__intro { align-items: flex-start; }
    .question-filter-panel { padding: 18px; }
    .question-filter { grid-template-columns: 1fr 1fr; }
    .question-filter__field--subject { grid-column: 1 / -1; }
    .question-filter__submit { width: 100%; }
    .listing-count { display: none; }
    .trail-subject-grid { grid-template-columns: 1fr; }
    .trail-focus { flex-direction: column; gap: 24px; }
    .trail-focus__stat { width: 100%; }
    .stat-grid { grid-template-columns: 1fr; gap: 10px; }
    .performance-panel { padding: 18px; }
    .bar-chart { height: 145px; gap: 5px; }
    .performance-bottom { grid-template-columns: 1fr; }
    .discipline-row { grid-template-columns: .9fr 1.6fr 34px; gap: 8px; }
    .focus-topbar, .mission-runner { padding-top: 19px; }
    .mission-runner { padding-right: 16px; padding-left: 16px; }
    .focus-topbar { gap: 10px; }
    .focus-topbar strong { font-size: 13px; }
    .question-timer { padding: 7px 8px; font-size: 10px; }
    .question-card { padding: 20px 16px; border-radius: 17px; }
    .question-card h1 { font-size: 18px; }
    .answer-option { padding: 9px 8px 9px 11px; min-height: 47px; }
    .answer-option__choice { gap: 9px; }
    .answer-option__text { font-size: 11px; }
    .answer-option__eliminate { width: 34px; height: 34px; }
    .question-actions { flex-direction: column-reverse; }
    .question-actions > * { width: 100%; }
    .completion-card { padding: 24px 16px; }
    .completion-card h1 { font-size: 24px; }
    .completion-metrics { gap: 7px; }
    .completion-metrics > div { padding: 13px 11px; }
    .completion-metrics strong { font-size: 20px; }
    .completion-actions { flex-direction: column; }
    .mobile-nav { height: 70px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; position: fixed; right: 0; bottom: 0; left: 0; z-index: 5; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .95); backdrop-filter: blur(15px); }
    .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; }
    .mobile-nav a i { color: #777892; font-size: 18px; }
    .mobile-nav__item--active { color: var(--purple) !important; font-weight: 700; }
    .mobile-nav__item--active i { color: var(--purple); }
    .auth-card { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.theme-toggle { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: transparent; font-size: 13px; }
.theme-toggle:hover { color: var(--purple); border-color: #cbbdff; background: var(--surface-muted); }
.theme-toggle--floating { position: fixed; top: 20px; right: 20px; z-index: 20; background: var(--surface); box-shadow: var(--shadow); }

html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f4f0ff;
    --muted: #aaa6c2;
    --line: #37334d;
    --purple: #ad92ff;
    --purple-deep: #9675f0;
    --blue: #77c2f5;
    --green: #76d79f;
    --amber: #f3c76c;
    --shadow: 0 18px 50px rgba(0, 0, 0, .24);
    --surface: #211e35;
    --surface-soft: #17152a;
    --surface-muted: #292442;
    --surface-input: #1c1930;
    background: #17152a;
}

html[data-theme="dark"], html[data-theme="dark"] body,
html[data-theme="dark"] .auth-shell,
html[data-theme="dark"] .focus-layout { background: #17152a; color: var(--ink); }
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .listing-panel,
html[data-theme="dark"] .question-filter-panel,
html[data-theme="dark"] .trail-overview,
html[data-theme="dark"] .trail-subject,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .question-card,
html[data-theme="dark"] .question-side,
html[data-theme="dark"] .question-timer,
html[data-theme="dark"] .completion-card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .week-day,
html[data-theme="dark"] .profile-menu__panel,
html[data-theme="dark"] .outline-button,
html[data-theme="dark"] .soft-button { background: var(--surface); }
html[data-theme="dark"] .topbar { background: rgba(33, 30, 53, .88); }
html[data-theme="dark"] .mobile-nav { background: rgba(33, 30, 53, .95); }
html[data-theme="dark"] .brand-copy strong,
html[data-theme="dark"] .hero-heading h1,
html[data-theme="dark"] .page-title-row h1,
html[data-theme="dark"] .panel h2,
html[data-theme="dark"] .listing-panel h2,
html[data-theme="dark"] .trail-overview h2,
html[data-theme="dark"] .question-card h1,
html[data-theme="dark"] .completion-card h1,
html[data-theme="dark"] .auth-card__heading h1 { color: var(--ink); }
html[data-theme="dark"] .nav-item { color: #b8b3d0; }
html[data-theme="dark"] .nav-item:hover { color: var(--purple); background: #2a2444; }
html[data-theme="dark"] .nav-item--active { color: var(--purple); background: #302653; }
html[data-theme="dark"] .sidebar__nav p,
html[data-theme="dark"] .topbar__context,
html[data-theme="dark"] .panel-date,
html[data-theme="dark"] .listing-count { color: #8984a7; }
html[data-theme="dark"] .topbar__context span:first-child { color: var(--ink); }
html[data-theme="dark"] .topbar__context i,
html[data-theme="dark"] .mission-row__top > i,
html[data-theme="dark"] .trail-subject > i { color: #797495; }
html[data-theme="dark"] .search-box { color: #8d88a8; }
html[data-theme="dark"] .search-box input { color: var(--ink); }
html[data-theme="dark"] .search-box kbd { color: #aaa6c2; background: #292442; border-color: var(--line); }
html[data-theme="dark"] .profile-menu__panel button,
html[data-theme="dark"] .profile-menu__panel strong { color: var(--ink); }
html[data-theme="dark"] .profile-menu__panel form { border-color: var(--line); }
html[data-theme="dark"] .topbar-icon b { border-color: var(--surface); }
html[data-theme="dark"] .question-filter-panel { border-color: #4d3b7a; background: linear-gradient(105deg, #241d3e, #2b2350); }
html[data-theme="dark"] .question-filter-panel__icon { background: #352b58; }
html[data-theme="dark"] .question-filter__field select { color: var(--ink); border-color: #47415f; background: var(--surface-input); }
html[data-theme="dark"] .mini-coach { background: #27223f; border-color: #3a315a; }
html[data-theme="dark"] .mini-coach > span { background: #3a2d63; }
html[data-theme="dark"] .sidebar-help { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .hero-streak { background: #302719; border-color: #69502c; }
html[data-theme="dark"] .hero-streak strong { color: #f0c774; }
html[data-theme="dark"] .hero-streak span { color: #c4a466; }
html[data-theme="dark"] .progress-card { border-color: #4d3b7a; background: linear-gradient(105deg, #241d3e, #2b2350); }
html[data-theme="dark"] .week-day { color: #8f89a7; border-color: #3a3650; }
html[data-theme="dark"] .week-day b { color: var(--ink); }
html[data-theme="dark"] .week-day i { background: #343047; }
html[data-theme="dark"] .week-day--active { border-color: #6a54a6; background: #2b2346; }
html[data-theme="dark"] .progress-track { background: #353048; }
html[data-theme="dark"] .mission-row { border-color: #343047; }
html[data-theme="dark"] .mission-row:hover { background: #27223e; }
html[data-theme="dark"] .mission-row__meta i { color: #797495; }
html[data-theme="dark"] .icon-bubble--purple { color: #beaaff; background: #352b58; }
html[data-theme="dark"] .icon-bubble--blue { color: #8ed0fa; background: #203d56; }
html[data-theme="dark"] .icon-bubble--green { color: #8de1b2; background: #204c39; }
html[data-theme="dark"] .icon-bubble--amber { color: #f5cc76; background: #50401f; }
html[data-theme="dark"] .status-pill--available { color: #b5b0c8; background: #363247; }
html[data-theme="dark"] .status-pill--progress { color: #c3b1ff; background: #352b58; }
html[data-theme="dark"] .status-pill--completed { color: #91e1b4; background: #204c39; }
html[data-theme="dark"] .panel-more { border-color: #343047; }
html[data-theme="dark"] .subject-node__icon { background: var(--surface); }
html[data-theme="dark"] .subject-node__line { background: #4b426b; }
html[data-theme="dark"] .outline-button:hover,
html[data-theme="dark"] .soft-button:hover { border-color: #6b55a9; background: #2a2444; }
html[data-theme="dark"] .reinforcement-card { border-color: #4a3a76; background: #251d40; }
html[data-theme="dark"] .trail-line,
html[data-theme="dark"] .chart-bar span { background-color: #353048; }
html[data-theme="dark"] .empty-state--panel { background: var(--surface); }
html[data-theme="dark"] .trail-subject { border-color: #3a3650; }
html[data-theme="dark"] .trail-subject:hover { border-color: #6b55a9; background: #2a2444; }
html[data-theme="dark"] .trail-subject__icon--blue { color: #8ed0fa; background: #203d56; }
html[data-theme="dark"] .trail-subject__icon--purple { color: #beaaff; background: #352b58; }
html[data-theme="dark"] .trail-subject__icon--green { color: #8de1b2; background: #204c39; }
html[data-theme="dark"] .trail-subject__icon--amber { color: #f5cc76; background: #50401f; }
html[data-theme="dark"] .trail-focus { border-color: #4a3a76; background: linear-gradient(105deg, #251d40, #2d2450); }
html[data-theme="dark"] .question-progress { background: #353048; }
html[data-theme="dark"] .question-context,
html[data-theme="dark"] .question-introduction { color: #c2bdd4; }
html[data-theme="dark"] .subject-chip--purple { color: #c2b2ff; background: #352b58; }
html[data-theme="dark"] .answer-option { border-color: #47415f; background: var(--surface); }
html[data-theme="dark"] .answer-option:hover { border-color: #8068c2; background: #2a2444; }
html[data-theme="dark"] .answer-option:has(input:checked) { border-color: var(--purple); background: #302653; }
html[data-theme="dark"] .answer-option__letter { border-color: #625b79; }
html[data-theme="dark"] .answer-option__eliminate:hover,
html[data-theme="dark"] .answer-option--eliminated .answer-option__eliminate { border-color: #6f5aab; background: #352b58; }
html[data-theme="dark"] .answer-option__eliminate:focus-visible { border-color: var(--purple); }
html[data-theme="dark"] .answer-option--eliminated { opacity: .62; }
html[data-theme="dark"] .question-tip,
html[data-theme="dark"] .completion-recommendation { background: #292244; }
html[data-theme="dark"] .question-dots span { border-color: #514a6b; }
html[data-theme="dark"] .completion-metrics > div { border-color: #3a3650; }
html[data-theme="dark"] .completion-card__icon--muted { background: #352b58; }
html[data-theme="dark"] .auth-form input { color: var(--ink); background: var(--surface-input); border-color: #47415f; }
html[data-theme="dark"] .auth-form input:focus { border-color: #8068c2; }
html[data-theme="dark"] .auth-card__footer { border-color: #3a3650; }
html[data-theme="dark"] .form-alert--error { color: #ffb1c0; background: #4a2531; }
html[data-theme="dark"] .form-alert--success { color: #9be6bb; background: #204c39; }
html[data-theme="dark"] .theme-toggle { color: #c8baff; border-color: #514a6b; }
html[data-theme="dark"] .theme-toggle:hover { background: #2a2444; border-color: #8068c2; }
