:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #201a36;
  background: #f8f7fc;
  font-synthesis: none;
  color-scheme: light;
  --ink: #201a36;
  --muted: #6b657e;
  --purple: #6e51db;
  --purple-dark: #5638c4;
  --lavender: #eee9ff;
  --orange: #ffb48f;
  --line: #eeebf4;
  --panel: #fff;
  --shadow: 0 3px 14px #29176406;
  --sidebar: 242px;
  --header: 70px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #8b6df6; outline-offset: 3px; }
svg { display: block; flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 3vw, 2.7rem); line-height: 1.14; font-weight: 750; letter-spacing: -.055em; }
h2 { font-size: 1.22rem; line-height: 1.26; font-weight: 725; letter-spacing: -.035em; }
h3 { font-size: 1rem; }
p { line-height: 1.52; }
small { font-size: .83rem; }
.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; }
.shell { min-height: 100dvh; }
.sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar); display: flex; flex-direction: column; z-index: 5; padding: 25px 18px 17px; background: #fff; border-inline-end: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; padding: 0; margin: 0 0 35px 9px; width: max-content; min-width: 0; max-width: 100%; border: 0; background: transparent; color: var(--ink); }
.sidebar .brand { max-width: calc(100% - 9px); }
.brand strong { font-size: 1.35rem; line-height: 1.12; letter-spacing: -.055em; font-weight: 825; text-align: start; }
.brand strong span { display: inline-block; white-space: nowrap; color: var(--purple); }
.brand-mark { display: block; flex: 0 0 auto; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.navigation { display: grid; gap: 25px; }
.nav-group { display: grid; gap: 5px; }
.nav-group p { font-size: .69rem; letter-spacing: .12em; font-weight: 750; color: #777187; margin: 0 0 5px 13px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; border: 0; border-radius: 11px; padding: 9px 12px; background: transparent; text-align: start; color: #655e77; font-size: .91rem; font-weight: 620; }
.nav-item:hover { background: #f6f3fd; color: var(--purple-dark); }
.nav-item.selected { background: #eee8ff; color: #5d42c5; font-weight: 720; }
.side-bottom { margin-block-start: auto; padding-block-start: 18px; display: grid; gap: 13px; }
.side-language, .side-user { width: 100%; display: flex; align-items: center; gap: 10px; text-align: start; }
.side-language { background: #f7f5fe; padding: 11px; border: 1px solid #efebfa; border-radius: 14px; }
.side-user { background: transparent; border: 0; border-block-start: 1px solid var(--line); padding: 13px 2px 0; color: var(--ink); }
.side-user > svg { margin-inline-start: auto; color: #878097; }
.side-user strong, .side-language strong { display: block; text-transform: capitalize; font-size: .91rem; line-height: 1.25; }
.side-user small, .side-language small { display: block; color: var(--muted); font-size: .75rem; margin-block: 2px; }
.flag-frame, .avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; }
.flag-frame { background: #fff; box-shadow: 0 1px 5px #26104a14; color: var(--purple); }
.flag-es { position: relative; display: inline-block; width: 23px; height: 16px; flex: 0 0 auto; border-radius: 3px; background: linear-gradient(#dd433e 0 25%, #ffcf49 25% 75%, #dd433e 75%); box-shadow: 0 1px 2px #27123622; }
.flag-es::after { position: absolute; content: ""; inset: 6px auto auto 6px; width: 3px; height: 4px; border-radius: 1px; background: #bd4941; }
.avatar { background: #ffe8dd; color: #994625; font-size: .84rem; font-weight: 800; border: 0; border-radius: 50%; }
.main-layout { margin-inline-start: var(--sidebar); }
.top-bar { min-height: var(--header); background: #ffffffdc; border-block-end: 1px solid var(--line); }
.top-inner { min-height: var(--header); max-width: 1370px; margin: 0 auto; padding-inline: 35px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top-title, .top-actions { display: flex; align-items: center; gap: 11px; }
.top-title { min-width: 0; }
.breadcrumb { font-size: .94rem; font-weight: 690; }
.top-create { min-height: 39px !important; padding: 8px 13px !important; font-size: .88rem !important; }
.top-language { display: flex; gap: 8px; align-items: center; color: var(--muted); text-transform: capitalize; }
.top-language.language-trigger { min-height: 39px; padding: 0 10px; background: #f7f5fe; border: 1px solid #efebfa; border-radius: 10px; }
.side-language.language-trigger > svg { margin-inline-start: auto; }
.language-trigger:hover { border-color: #d9cdfb; color: var(--purple-dark); }
.mobile-menu, .mobile-brand, .bottom-nav, .menu-overlay { display: none !important; }
.main-content { max-width: 1370px; margin-inline: auto; padding: 29px 35px 36px; }
.greeting { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-block-end: 23px; }
.greeting p, .page-title p { margin-block-start: 7px; color: var(--muted); }
.wave { font-size: .69em; display: inline-block; vertical-align: 10%; margin-inline-start: 4px; }
.language-pill, .level-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #ebe6f4; padding: 7px 12px; border-radius: 999px; background: #fff; color: #49405d; font-size: .86rem; font-weight: 675; white-space: nowrap; text-transform: capitalize; }
.language-pill { margin-block-end: 3px; }
.hero { position: relative; isolation: isolate; display: flex; align-items: stretch; min-height: 254px; border-radius: 24px; overflow: hidden; background: #1c1536; color: white; box-shadow: 0 7px 16px #42217b16; }
.hero-image { position: absolute; z-index: -1; inset: 0 0 0 38%; background: url('/hero.webp') center 48% / cover no-repeat; }
.hero-image::after { position: absolute; content: ""; inset: 0; background: linear-gradient(90deg, #1c1536 0%, #1c1536e8 11%, #1c153658 30%, transparent 58%); }
[dir="rtl"] .hero-image { inset: 0 38% 0 0; }
[dir="rtl"] .hero-image::after { transform: scaleX(-1); }
.hero-content { max-width: 65%; padding: 29px 34px 31px; display: flex; flex-direction: column; align-items: start; justify-content: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 7px; background: #a58bff24; color: #e4d9ff; font-size: .71rem; letter-spacing: .105em; font-weight: 735; }
.hero h2 { font-size: clamp(1.85rem, 3.5vw, 3.05rem); margin: 12px 0 8px; line-height: 1.06; font-weight: 750; letter-spacing: -.06em; text-wrap: balance; }
.hero p { color: #e0d9ee; max-width: 400px; font-size: .98rem; }
.hero .hero-button { background: var(--orange); color: #28152c; margin-top: 19px; }
.hero .hero-button:hover { background: #ffc8ae; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 9px 15px; border-radius: 10px; border: 1px solid transparent; color: var(--ink); font-size: .9rem; font-weight: 690; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.primary { background: var(--purple); color: #fff; box-shadow: 0 2px 6px #3c1d961d; }
.primary:hover { background: var(--purple-dark); }
.secondary { background: #fff; color: var(--purple-dark); border-color: #e5dcfa; }
.secondary:hover { background: #f3eefc; }
.subtle { background: #f2edff; color: #5b3bbb; }
.subtle:hover { background: #e8defe; }
.ghost { color: #54496c; background: transparent; }
.ghost:hover { background: #f3eefc; color: var(--purple-dark); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; margin-block-start: 22px; }
.panel { border: 1px solid #ebe8f2; background: var(--panel); border-radius: 19px; box-shadow: var(--shadow); min-width: 0; }
.path-panel, .stats-panel { padding: 17px 18px 16px; }
.panel-heading { display: flex; align-items: center; gap: 11px; margin-block-end: 14px; }
.panel-heading p { color: var(--muted); margin-top: 3px; font-size: .85rem; }
.panel-heading p, .mini-stats small { line-height: 1.28; }
.panel-heading > .button, .panel-heading > .level-pill { margin-inline-start: auto; flex: 0 0 auto; }
.path-link { font-size: .80rem; min-height: 35px; padding: 6px 10px; }
.card-icon { width: 40px; height: 40px; border-radius: 11px; display: inline-grid; place-items: center; flex: 0 0 auto; }
.card-icon.violet { background: #eee8ff; color: #6d4dd8; }
.card-icon.mint { background: #e7f8ef; color: #19845e; }
.card-icon.peach { background: #ffede3; color: #b65328; }
.path-list { display: grid; gap: 7px; }
.path-row { display: flex; width: 100%; align-items: center; gap: 9px; min-height: 60px; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid #efedf4; border-radius: 12px; text-align: start; }
.path-row.done:hover, .path-row.current:hover { border-color: #bca9f5; }
.path-row.current { background: #f5f1ff; border-color: #e4d9ff; }
.path-row.locked { background: #faf9fc; color: #605873; }
.path-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; }
.path-icon.done { color: #1b885d; background: #e6f6ed; }
.path-icon.current { color: #fff; background: #7658e2; }
.path-icon.locked { color: #827992; background: #efedf4; }
.path-name { min-width: 0; }
.path-name small { display: block; color: var(--muted); font-size: .73rem; line-height: 1.2; }
.path-name strong { display: block; font-size: .92rem; line-height: 1.25; margin-block-start: 2px; overflow-wrap: anywhere; }
.path-status { margin-inline-start: auto; flex: 0 0 auto; border-radius: 999px; font-size: .72rem; font-weight: 675; padding: 4px 7px; }
.path-status.done { color: #19754e; background: #e6f6ed; }
.path-status.current { color: #5b3bc1; background: #eae0ff; }
.path-status.locked { color: #726980; background: #f0edf4; }
.path-spacer { width: 17px; flex: 0 0 auto; }
.ring-row { display: flex; align-items: center; gap: 13px; padding: 8px 2px 14px; }
.ring { position: relative; display: grid; place-items: center; width: 79px; height: 79px; flex: 0 0 auto; }
.ring svg { position: absolute; inset: 0; width: 100%; }
.ring > strong { font-size: 1rem; letter-spacing: -.035em; }
.count { font-size: 1.8rem; letter-spacing: -.06em; line-height: 1.12; }
.count span { font-size: 1.07rem; color: #79718c; }
.ring-row p { color: var(--muted); font-size: .86rem; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 11px; border-block-start: 1px solid var(--line); padding-top: 13px; }
.mini-stats > div { flex: 1 1 115px; display: flex; align-items: center; gap: 7px; min-width: 0; }
.mini-stats .card-icon { width: 33px; height: 33px; border-radius: 9px; }
.mini-stats .card-icon svg { width: 17px; height: 17px; }
.mini-stats strong, .mini-stats small { display: block; }
.mini-stats small { color: var(--muted); font-size: .75rem; margin-block-start: 1px; }
.tutor-strip { margin-block-start: 19px; display: flex; align-items: center; gap: 13px; padding: 13px 17px; background: #f0ebff; border: 1px solid #eae2ff; border-radius: 17px; }
.tutor-strip p { color: #675a82; font-size: .88rem; margin-block-start: 2px; }
.tutor-strip .button { margin-inline-start: auto; }
.tutor-orb { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 20% 8%, #c19eff, #855fea 53%, #6443ca); color: white; flex: 0 0 auto; box-shadow: 0 3px 8px #6844cf2e; }
.icon-button { border: 1px solid transparent; display: inline-grid; place-items: center; background: transparent; color: var(--purple-dark); width: 41px; min-width: 41px; height: 41px; border-radius: 10px; }
.icon-button:hover { background: #f2ecff; }
.page-title { display: flex; align-items: start; gap: 13px; margin: 5px 0 24px; }
.page-title .card-icon { width: 49px; height: 49px; margin-block-start: 2px; }
.page-title h1 { font-size: clamp(1.85rem, 3vw, 2.65rem); }
.inner-panel { padding: 22px; margin-block-end: 16px; }
.inner-panel > h2 + p { margin-block-start: 6px; color: var(--muted); }
.panel-header h2 { text-transform: capitalize; }
.panel-footer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.empty-box { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 13px; padding: 24px 12px; color: var(--muted); min-height: 170px; }
.empty-box h2 { color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); gap: 18px; align-items: start; }
.history-item { display: grid; gap: 8px; margin-block-start: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; overflow-wrap: anywhere; }
.history-item > div:first-child { display: flex; flex-wrap: wrap; gap: 5px 11px; justify-content: space-between; }
.history-item small { color: var(--muted); }
.history-scores { display: flex; flex-wrap: wrap; gap: 7px; }
.score-tag { background: #f1ebff; color: #583fa7; border-radius: 8px; font-size: .83rem; padding: 4px 8px; }
.history-item p, .result-panel > p { color: var(--muted); white-space: pre-wrap; }
.result-panel > p { margin-block-start: 11px; }
.certification > p { margin-block-end: 12px; }
.profile-panel { max-width: 700px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.course-card { padding: 17px; display: flex; flex-direction: column; gap: 12px; min-height: 156px; }
.course-card h2 { text-transform: capitalize; }
.course-card > p { color: var(--muted); font-size: .9rem; }
.course-card > .panel-heading { margin: 0; }
.course-card > .button { align-self: start; margin-block-start: auto; }
.course-add { display: grid; place-items: center; border: 1px dashed #cbbafa; border-radius: 19px; background: #f4effe; }
.course-add > .button { align-self: center; }
.user-heading { display: flex; align-items: center; gap: 13px; }
.user-heading .avatar { width: 57px; height: 57px; font-size: 1.13rem; }
.user-heading p { color: var(--muted); overflow-wrap: anywhere; }
.profile-details { display: grid; gap: 0; }
.profile-details > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.profile-details dt { color: var(--muted); font-size: .89rem; }
.profile-details dd { margin: 3px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.profile-id { display: flex; align-items: center; justify-content: space-between; }
.profile-id code { font-size: .9rem; }
.profile-details small { color: var(--muted); }
.language-setting { max-width: 440px; margin-block: 18px; }
.language-setting .field { margin-block-end: 4px; }
.chat-panel { overflow: hidden; }
.chat-heading { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-block-end: 1px solid var(--line); }
.chat-heading p { color: var(--muted); font-size: .88rem; }
.chat-messages { height: clamp(280px, 43vh, 555px); overflow-y: auto; padding: 20px; display: grid; align-content: start; gap: 14px; }
.message { display: flex; align-items: start; gap: 8px; max-width: min(85%, 650px); }
.message.user { justify-self: end; }
.chat-avatar { width: 29px; height: 29px; display: grid; place-items: center; background: #ece3ff; color: var(--purple-dark); border-radius: 9px; flex: 0 0 auto; }
.chat-bubble { padding: 11px 13px; background: #f2edff; border-radius: 4px 14px 14px 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.52; }
.user .chat-bubble { background: var(--purple-dark); color: #fff; border-radius: 14px 4px 14px 14px; }
.speaker { width: 30px; min-width: 30px; height: 30px; margin-block-start: 3px; }
.speaker svg { width: 16px; height: 16px; }
.typing { color: var(--muted); font-size: .9rem; }
.chat-footer { padding: 13px 17px; background: #fbfaff; border-block-start: 1px solid var(--line); }
.chat-footer form { display: flex; align-items: center; gap: 7px; }
.chat-footer textarea { flex: 1 1 auto; min-width: 0; resize: vertical; padding: 11px 12px; min-height: 45px; }
.chat-footer small { display: block; color: var(--muted); margin-block-start: 5px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 8px; }
.suggestions button { min-height: 33px; padding: 5px 9px; font-size: .78rem; }
.send { background: var(--purple); color: #fff; }
.send:hover { background: var(--purple-dark); color: #fff; }
.notice { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 11px 13px; border: 1px solid #e8defb; background: #f4effe; color: #574482; border-radius: 11px; line-height: 1.43; }
.notice > button { margin-inline-start: auto; }
.notice-ai, .loading { margin-block-end: 16px; }
.notice-ai { background: #fff4e9; color: #7f452a; border-color: #f7e5d5; }
.lesson-copy p { color: #4e465f; white-space: pre-line; }
.lesson-copy p + p, .lesson-copy h2, .lesson-copy .notice { margin-block-start: 13px; }
.exercise-panel > p { color: var(--muted); margin-block-start: 6px; }
.test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block-start: 15px; }
.test-card { padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.test-card h3 { display: flex; align-items: center; gap: 7px; color: var(--purple-dark); }
.test-card p { margin-block: 8px; white-space: pre-line; }
.test-card small { display: block; color: var(--muted); margin-top: 9px; }
.test-card textarea { width: 100%; padding: 10px; resize: vertical; }
.transcript { margin-block-start: 8px; padding: 8px 10px; background: #f4f0fc; border-radius: 8px; }
.transcript p { margin: 3px 0 0; overflow-wrap: anywhere; }
.recording { background: #ffebe8; border-color: #ffd5cc; color: #a63a35; }
.recording:hover { background: #ffddd8; color: #92332f; }
.checkbox-line { display: flex; align-items: start; gap: 6px; margin-block-start: 8px; font-size: .88rem; color: var(--muted); }
.checkbox-line input { margin-block-start: 3px; accent-color: var(--purple); }
dialog { position: fixed; max-height: min(90dvh, 820px); width: min(460px, calc(100% - 30px)); color: var(--ink); padding: 25px; border: 1px solid #eae5f3; border-radius: 20px; box-shadow: 0 20px 65px #28175538; }
dialog.review-dialog { width: min(660px, calc(100% - 30px)); }
.review-dialog .lesson-copy { margin-block: 12px; }
.review-dialog .lesson-copy p { margin-block: 9px; white-space: pre-wrap; }
.account-data { border-block-start: 1px solid var(--line); margin-block-start: 25px; padding-block-start: 17px; }
.account-data .panel-footer { margin-block-start: 10px; }
.account-data a.button { text-decoration: none; }
.verification-screen .verification-panel { max-width: 600px; padding: clamp(20px, 5vw, 36px); margin: 0 auto; }
.verification-panel h1 { font-size: clamp(1.85rem, 5vw, 2.7rem); margin-block: 12px; }
.verification-panel > p:not([role]) { color: var(--muted); margin-block: 10px; }
.verification-panel .verification-address { color: var(--ink); overflow-wrap: anywhere; font-weight: 700; }
.verification-screen .verification-panel button { flex-wrap: wrap; }
.verification-panel .notice, .verification-panel .form-error, .verification-panel form { margin-block-start: 16px; }
.button.danger { color: #a52746; border-color: #f1cbd5; background: #fff4f6; }
.button.danger:hover { background: #f9dce5; }
.module-notice { margin-block-start: 14px; }
.archived-modules details { margin-block-start: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 11px; }
.archived-modules summary { cursor: pointer; font-weight: 680; }
.archived-modules details[open] summary { margin-block-end: 10px; }
.archived-modules summary .level-pill { margin-inline-start: 6px; }
dialog::backdrop { background: #26193a78; backdrop-filter: blur(3px); }
.dialog-close { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; color: var(--muted); }
.dialog-heading { padding-inline-end: 22px; margin-block-end: 16px; }
.dialog-heading h2 { font-size: 1.65rem; margin-block-start: 9px; }
.dialog-heading p, .form-help { color: var(--muted); font-size: .9rem; margin-block-start: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.field { display: grid; gap: 5px; margin-block-end: 11px; min-width: 0; font-size: .88rem; font-weight: 680; }
.field input, .field select, textarea { background: #fff; border: 1px solid #ded8eb; border-radius: 9px; color: var(--ink); }
.field input, .field select { width: 100%; min-height: 43px; padding: 8px 10px; font-size: 1rem; font-weight: 500; }
.field input::placeholder, textarea::placeholder { color: #807890; }
.select-wrap { position: relative; min-width: 0; }
.select-wrap select { appearance: none; padding-inline-end: 32px; text-overflow: ellipsis; }
.select-wrap svg { position: absolute; inset-inline-end: 10px; top: 13px; pointer-events: none; color: var(--purple-dark); }
.dialog-actions { display: flex; justify-content: end; align-items: center; flex-wrap: wrap; gap: 9px; margin-block-start: 15px; }
.auth-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-block-start: 12px; color: var(--muted); font-size: .87rem; }
.auth-switch .button { min-height: 33px; padding: 4px 9px; }
.form-error { margin-block-start: 11px; padding: 9px; border-radius: 8px; color: #9b3040; background: #fff0f2; font-size: .88rem; }
.form-status { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.mic-check { display: grid; min-height: 100dvh; place-items: center; padding: 16px; }
.mic-check main { width: min(100%, 520px); margin: 0; padding: clamp(20px, 5vw, 32px); }
.mic-brand { display: flex; align-items: center; gap: 10px; margin-block-end: 20px; }
.mic-check h1 { font-size: clamp(1.8rem, 6vw, 2.45rem); }
.mic-check p { margin-block: 12px; color: var(--muted); }
.mic-check audio { max-width: 100%; }
.mic-check a { display: block; color: var(--purple-dark); font-weight: 700; margin-block-start: 16px; }
.recovery-code { display: block; color: var(--ink); background: #f4f0fb; border-radius: 8px; padding: 12px; margin-block: 12px; overflow-wrap: anywhere; user-select: all; }
.welcome { max-width: 1280px; margin-inline: auto; padding: 26px clamp(22px, 5vw, 70px) 42px; }
.welcome-loading { min-height: 100dvh; display: grid; place-items: center; }
.welcome-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 13px; margin-block-end: clamp(26px, 7vh, 74px); }
.welcome-header .brand { margin: 0; }
.welcome-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .96fr); align-items: stretch; gap: clamp(24px, 6vw, 84px); }
.welcome-grid.welcome-register { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(20px, 4vw, 55px); }
.welcome-body { align-self: center; min-width: 0; padding-block: 10px; }
.welcome h1 { font-size: clamp(2.6rem, 5.4vw, 5rem); line-height: .99; letter-spacing: -.07em; text-wrap: balance; }
.welcome-register h1 { font-size: clamp(2.25rem, 4vw, 3.75rem); letter-spacing: -.06em; }
.welcome-copy { max-width: 410px; margin-block-start: 15px; color: var(--muted); font-size: 1.05rem; }
.welcome-art { min-height: 510px; border-radius: 27px; background: #1c1536 url('/hero.webp') center / cover no-repeat; box-shadow: 0 12px 30px #2b175428; }
.welcome-register .welcome-art { min-height: 450px; }
.country-card, .signup-form { background: white; border: 1px solid var(--line); border-radius: 17px; margin-block-start: 25px; padding: 20px; box-shadow: var(--shadow); }
.country-card h2 { font-size: 1.45rem; }
.country-card p { color: var(--muted); margin-block: 5px 14px; }
.country-card form > .field { margin-block-end: 12px; }
.country-card .button { width: 100%; }
.signup-form .dialog-actions { justify-content: space-between; }
.signup-form input:disabled, .signup-form select:disabled { color: var(--muted); background: #f8f7fc; }
.welcome .form-status { margin-block-start: 10px; }
.welcome-demo { margin-block-start: 10px; padding-inline: 0; }
.welcome-demo:hover { background: transparent; text-decoration: underline; }
.app-footer { margin-block-start: 26px; padding-block-start: 12px; border-top: 1px solid var(--line); }
.app-footer nav, .public-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.app-footer a, .terms-consent a, .public-copy a, .public-nav a { color: var(--purple-dark); text-underline-offset: .2em; }
.app-footer a, .public-nav a { display: inline-flex; align-items: center; min-height: 40px; font-size: .9rem; }
.terms-consent { margin-block: 14px; font-size: .9rem; }
.terms-consent p { margin-block-end: 8px; }
.welcome.public-page { max-width: 940px; }
.public-header { margin-block-end: 15px; flex-wrap: wrap; }
.public-header a { text-decoration: none; }
.public-nav { margin-block-end: 16px; gap: 4px 8px; }
.public-nav a { padding: 4px 10px; border-radius: 9px; }
.public-nav a[aria-current="page"] { background: #eee7fc; font-weight: 720; text-decoration: none; }
.public-nav .public-language { margin-inline-start: auto; }
.public-copy { padding: clamp(17px, 5vw, 38px); overflow-wrap: anywhere; }
.public-page .public-copy h1 { font-size: clamp(2rem, 7vw, 3.75rem); letter-spacing: -.05em; line-height: 1.08; }
.public-copy h2 { margin-block-end: 9px; font-size: clamp(1.13rem, 3vw, 1.4rem); }
.public-copy p { line-height: 1.62; }
.public-copy p + p { margin-block-start: 9px; }
.public-copy .notice, .public-revision { margin-block-start: 15px; }
.public-revision { color: var(--muted); font-size: .9rem; }
.public-copy section { margin-block-start: 22px; padding-block-start: 18px; border-top: 1px solid var(--line); }
.spinner { display: inline-block; width: 17px; height: 17px; border: 2px solid #d9cef4; border-top-color: var(--purple-dark); border-radius: 50%; animation: rotate .8s linear infinite; }
@keyframes rotate { 100% { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 15; inset-inline-end: 18px; inset-block-end: 18px; padding: 11px 15px; max-width: min(410px, calc(100% - 36px)); border-radius: 10px; color: white; background: #2a2041; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .17s ease; pointer-events: none; box-shadow: 0 5px 18px #1e12264a; }
.toast.shown { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-height: 660px) and (min-width: 901px) { .sidebar { overflow: auto; } .sidebar .brand { margin-block-end: 20px; } .navigation { gap: 13px; } }
@media (max-width: 1150px) {
  :root { --sidebar: 218px; }
  .top-inner { padding-inline: 25px; }
  .main-content { padding-inline: 25px; }
  .dashboard-grid { gap: 14px; }
  .path-panel, .stats-panel { padding-inline: 13px; }
}
@media (max-width: 900px) {
  :root { --header: 62px; --sidebar: 240px; }
  .sidebar { visibility: hidden; transform: translateX(-100%); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.menu-visible { visibility: visible; transform: translateX(0); }
  .main-layout { margin-inline-start: 0; }
  .mobile-brand { display: inline-flex !important; margin: 0; gap: 7px; }
  .mobile-brand .brand-mark { width: 38px; height: 38px; border-radius: 9px; }
  .mobile-brand strong { font-size: clamp(1rem, 3.1vw, 1.25rem); }
  .mobile-menu { display: inline-grid !important; width: 34px; min-width: 34px; }
  .breadcrumb { display: none; }
  .menu-overlay { display: block !important; position: fixed; inset: 0; border: 0; background: #21153170; z-index: 4; }
  .bottom-nav { display: flex !important; position: fixed; z-index: 3; inset-inline: 0; inset-block-end: 0; background: #fff; border-top: 1px solid var(--line); padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); justify-content: center; }
  .bottom-nav .nav-item { width: min(20%, 125px); flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3px; font-size: .74rem; line-height: 1.12; padding: 5px 3px; }
  .bottom-nav .nav-item.selected { background: #f0eaff; }
  .main-content { padding-block-end: calc(82px + env(safe-area-inset-bottom)); }
  .toast { inset-block-end: calc(66px + env(safe-area-inset-bottom)); }
  .welcome-grid, .welcome-grid.welcome-register { gap: 20px; }
  .welcome-grid.welcome-register { grid-template-columns: minmax(0, 1fr); max-width: 680px; margin-inline: auto; }
  .welcome-register .welcome-art { display: none; }
}
@media (max-width: 600px) {
  .top-inner, .main-content { padding-inline: 14px; }
  .top-title, .top-actions { gap: 5px; }
  .sign-in { display: none; }
  .top-create svg { display: none; }
  .top-language { display: none; }
  .main-content { padding-block-start: 21px; }
  .greeting { margin-block-end: 16px; }
  .greeting h1 { font-size: 2rem; }
  .greeting p, .page-title p { font-size: .94rem; }
  .language-pill { display: none; }
  .hero { min-height: 276px; border-radius: 19px; }
  .hero-content { max-width: 79%; padding: 21px 16px; }
  .hero-image { inset-inline-start: 25%; background-position: 59% center; }
  .hero-image::after { background: linear-gradient(90deg, #1c1536 0%, #1c1536d9 23%, #1c15366b 58%, #1c153618 100%); }
  .hero h2 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .hero p { font-size: .905rem; }
  .hero .button { margin-block-start: 13px; }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; gap: 12px; margin-block-start: 13px; }
  .tutor-strip { margin-block-start: 12px; flex-wrap: wrap; gap: 9px; padding: 12px; }
  .tutor-strip > div:nth-child(2) { flex: 1; }
  .tutor-strip .button { width: 100%; }
  .inner-panel { padding: 15px; }
  .page-title { gap: 9px; margin-block-end: 16px; }
  .page-title .card-icon { width: 39px; height: 39px; }
  .test-grid { grid-template-columns: 1fr; }
  .chat-messages { padding: 12px; }
  .chat-footer { padding: 9px 12px; }
  .chat-footer textarea, .test-card textarea { font-size: 1rem; }
  .message { max-width: 94%; }
  dialog { padding: 17px; }
  .welcome { padding: 16px 16px 24px; }
  .welcome-header { margin-block-end: 24px; }
  .welcome-header .brand-mark { width: 38px; height: 38px; }
  .welcome-grid { grid-template-columns: 1fr; gap: 12px; }
  .welcome h1 { font-size: clamp(2.25rem, 11vw, 3.5rem); }
  .welcome-art { min-height: 180px; border-radius: 18px; background-position: center 47%; }
  .welcome-copy { font-size: .98rem; margin-block-start: 11px; }
  .country-card, .signup-form { margin-block-start: 18px; padding: 15px; }
  .signup-form .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
  .form-grid { grid-template-columns: 1fr; }
  .hero-content { max-width: 93%; }
  .path-status { font-size: .68rem; }
  .path-row { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
