:root {
  color-scheme: light;
  --ink: #253151;
  --ink-strong: #1f2d4e;
  --muted: #7b8398;
  --soft-muted: #a3a8b7;
  --paper: #fbf8f1;
  --card: #fffefa;
  --line: #e9e7df;
  --blue: #425da9;
  --blue-dark: #243b80;
  --blue-soft: #edf1fc;
  --orange: #e9844f;
  --orange-soft: #fff0e4;
  --gold: #efc76e;
  --green: #47856b;
  --shadow-soft: 0 20px 60px rgba(38, 53, 94, .09), 0 3px 10px rgba(38, 53, 94, .04);
  --shadow-card: 0 9px 25px rgba(38, 53, 94, .07), 0 2px 5px rgba(38, 53, 94, .04);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

img, svg, video { max-width: 100%; }
button, a, input, select, textarea { touch-action: manipulation; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 4% 18%, rgba(248, 220, 174, .19), transparent 27%),
    radial-gradient(ellipse at 92% 10%, rgba(214, 224, 249, .38), transparent 29%),
    var(--paper);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #6d8be8; outline-offset: 3px; }

.page-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .19;
  background-image: radial-gradient(rgba(54, 69, 111, .11) .7px, transparent .7px);
  background-size: 13px 13px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.site-shell { width: min(1190px, calc(100% - 56px)); margin: 0 auto; }

.topbar {
  min-height: 89px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(52, 66, 106, .09);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; }
.brand-mark svg { display: block; width: 44px; height: 44px; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font: 800 19px/1 'Inter', sans-serif; letter-spacing: -.04em; }
.brand-copy small { color: #858ca0; font-size: 8px; font-weight: 700; letter-spacing: .12em; }

.topnav { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 13px; }
.topnav a { color: inherit; text-decoration: none; transition: color .2s ease; }
.topnav a:hover { color: var(--blue-dark); }
.nav-dot { width: 4px; height: 4px; border-radius: 50%; background: #bbc1d1; }
.nav-note { color: #9aa0af; }
.top-actions { display: flex; align-items: center; gap: 13px; }
.student-dashboard-link { color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.student-dashboard-link.hidden { display: none; }
.student-dashboard-link:hover { color: var(--blue-dark); text-decoration: underline; }
.admin-back-link { color: var(--blue); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.admin-back-link.hidden { display: none; }
.admin-back-link:hover { color: var(--blue-dark); text-decoration: underline; }
.login-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s ease, opacity .2s ease;
}
.login-link:hover { opacity: .92; transform: translateY(-1px); }
.login-link.hidden { display: none; }

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #e8e5dc;
  border-radius: 999px;
  background: rgba(255, 254, 250, .78);
  color: #777e91;
  font-size: 11px;
  font-weight: 700;
}
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #dba858; box-shadow: 0 0 0 3px #fff3d7; }
.connection-pill.is-connected { border-color: #cce5d7; color: #3f765f; }
.connection-pill.is-connected .connection-dot { background: #4a9b71; box-shadow: 0 0 0 3px #e3f3e9; }
.language-switch {
  min-width: 48px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid #e5e3dc;
  border-radius: 14px;
  background: var(--card);
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: background .2s ease, transform .2s ease;
}
.language-switch:hover { background: var(--blue-soft); transform: translateY(-1px); }
.language-switch:disabled { cursor: wait; opacity: .65; transform: none; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(400px, .97fr);
  align-items: center;
  gap: 30px;
  min-height: 544px;
  padding: 49px 0 37px;
}
.hero-copy { position: relative; z-index: 1; padding: 5px 0 14px 8px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6475ad;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.eyebrow-mark { width: 20px; height: 2px; background: var(--orange); border-radius: 2px; }
.hero h1 {
  max-width: 610px;
  margin: 19px 0 17px;
  color: var(--ink-strong);
  font: 800 clamp(40px, 5vw, 62px)/1.09 'Inter', sans-serif;
  letter-spacing: -.058em;
}
.hero h1 .highlight { position: relative; z-index: 0; white-space: nowrap; }
.hero h1 .highlight::after {
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: 5px;
  left: -2px;
  height: 15px;
  border-radius: 10px;
  background: #f4d794;
  content: '';
  transform: rotate(-1.4deg);
}
.hero-description { max-width: 470px; margin: 0; color: #737c91; font-size: 16px; line-height: 1.75; }
.hero-cta-row { display: flex; align-items: center; gap: 18px; margin-top: 29px; }
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 17px;
  background: var(--blue-dark);
  box-shadow: 0 9px 18px rgba(36, 59, 128, .2), inset 0 1px 0 rgba(255,255,255,.17);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.primary-button:hover { background: #304b99; box-shadow: 0 12px 22px rgba(36, 59, 128, .24); transform: translateY(-2px); }
.primary-button:active { transform: translateY(0) scale(.985); }
.primary-button svg { width: 17px; height: 17px; }
.time-note { display: inline-flex; align-items: center; gap: 7px; color: #9096a6; font-size: 12px; }
.time-note svg { width: 15px; height: 15px; color: #a7adbd; }
.hero-trust { display: flex; align-items: center; gap: 10px; margin-top: 27px; color: #9298a6; font-size: 11px; }
.trust-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 8px; background: #e6f1e8; color: #538468; }
.trust-icon svg { width: 13px; height: 13px; }

.hero-art {
  position: relative;
  width: 100%;
  max-width: 555px;
  margin-left: auto;
  padding: 13px 0;
}
.hero-art > img { display: block; width: 100%; filter: drop-shadow(0 20px 28px rgba(35, 51, 94, .11)); }
.art-note {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 15px;
  background: rgba(255, 254, 251, .92);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  animation: float 5s ease-in-out infinite;
}
.art-note span:first-child { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: var(--blue-dark); }
.art-note span:last-child { display: grid; gap: 2px; }
.art-note small { color: #9399a8; font-size: 9px; font-weight: 500; }
.art-note svg { width: 15px; height: 15px; }
.note-one { top: 24px; right: -5px; animation-delay: .7s; }
.note-one span:first-child { background: #e8edfc; }
.note-two { bottom: 36px; left: 1px; animation-delay: 1.3s; }
.note-two span:first-child { background: #fff0df; color: #c57443; }
.art-sparkle { position: absolute; display: grid; place-items: center; color: #e3a951; }
.art-sparkle svg { width: 17px; height: 17px; }
.sparkle-one { top: 15%; left: 12%; }
.sparkle-two { right: 13%; bottom: 20%; color: #879ad1; }

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin: 10px 0 72px;
}
.benefit-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-height: 106px;
  padding: 20px 20px 17px;
  border: 1px solid rgba(55, 67, 105, .08);
  border-radius: 19px;
  background: rgba(255, 254, 250, .72);
}
.benefit-icon { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: 12px; }
.benefit-icon svg { width: 18px; height: 18px; }
.benefit-icon.blue { background: #e9edfc; color: #516cad; }
.benefit-icon.peach { background: #fff0e4; color: #c77a50; }
.benefit-icon.green { background: #e7f2e9; color: #54866b; }
.benefit-icon.gold { background: #fff3d8; color: #b38336; }
.benefit-icon.teal { background: #e4f5f2; color: #3f8d82; }
.benefit-icon.rose { background: #fbe9ee; color: #b7657e; }
.benefit-icon.indigo { background: #e9e8fb; color: #6866a9; }
.benefit-card h3 { margin: 1px 0 5px; font: 700 13px/1.3 'Inter', sans-serif; color: var(--ink-strong); }
.benefit-card p { margin: 0; color: #858c9c; font-size: 11px; line-height: 1.55; }

.section-title { display: flex; justify-content: space-between; align-items: end; margin: 0 0 19px; }
.section-title h2 { margin: 0; font: 800 24px/1.2 'Inter', sans-serif; letter-spacing: -.045em; color: var(--ink-strong); }
.section-title p { margin: 0; color: #888fa1; font-size: 12px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 78px; }
.how-card { padding: 21px; border: 1px solid rgba(55, 67, 105, .08); border-radius: 19px; background: rgba(255, 254, 250, .65); }
.how-number { color: #c3a563; font: 800 11px 'Inter', sans-serif; letter-spacing: .1em; }
.how-card h3 { margin: 12px 0 6px; color: var(--ink-strong); font: 700 14px 'Inter', sans-serif; }
.how-card p { margin: 0; color: #81889b; font-size: 12px; line-height: 1.65; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  border-top: 1px solid rgba(52, 66, 106, .09);
  color: #979cab;
  font-size: 10px;
}
.footer-mark { display: inline-flex; align-items: center; gap: 8px; }
.footer-mark > span:first-child { width: 6px; height: 6px; border-radius: 50%; background: #88ad91; }

.quiz-page { padding: 33px 0 68px; }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: #737d96;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.text-button:hover { color: var(--blue-dark); }
.text-button svg { width: 17px; height: 17px; }
.quiz-counter { color: #8990a1; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.progress-track { height: 6px; overflow: hidden; border-radius: 99px; background: #e9e9e5; }
.progress-value { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e8a65a, #edca7a); transition: width .3s ease; }
.quiz-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.quiz-aside {
  position: sticky;
  top: 18px;
  padding: 22px;
  border: 1px solid rgba(58, 70, 108, .09);
  border-radius: 21px;
  background: rgba(255, 254, 250, .82);
  box-shadow: 0 4px 12px rgba(36, 53, 93, .025);
}
.aside-label { margin: 0 0 15px; color: #a1a5b1; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.step-list { display: grid; gap: 9px; }
.step-item { display: flex; align-items: center; gap: 10px; color: #9a9eab; font-size: 11px; font-weight: 600; }
.step-bubble { display: grid; flex: 0 0 24px; place-items: center; width: 24px; height: 24px; border: 1px solid #e6e5e1; border-radius: 9px; background: #fff; color: #a3a7b2; font-size: 9px; font-weight: 800; }
.step-item.is-active { color: var(--ink-strong); }
.step-item.is-active .step-bubble { border-color: #eecb7d; background: #fff3d4; color: #936e2d; }
.step-item.is-complete .step-bubble { border-color: #d6eadc; background: #e8f4ec; color: #56846a; }
.aside-divider { height: 1px; margin: 19px 0; background: #eeece6; }
.aside-tip { padding: 13px; border-radius: 13px; background: #f5f3ed; color: #858b98; font-size: 10px; line-height: 1.6; }
.aside-tip strong { display: block; margin-bottom: 5px; color: #5a6684; font-size: 10px; }
.aside-mascot { display: flex; justify-content: flex-end; margin: 9px 2px -4px 0; color: #c3924e; }
.aside-mascot svg { width: 39px; height: 39px; }
.question-card {
  min-height: 487px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(58, 70, 108, .09);
  border-radius: 24px;
  background: rgba(255, 254, 250, .95);
  box-shadow: var(--shadow-card);
}
.question-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: #be8850; font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.question-kicker span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 8px; background: #fff0d9; }
.question-kicker svg { width: 13px; height: 13px; }
.question-card h1 { max-width: 660px; margin: 0; color: var(--ink-strong); font: 800 clamp(24px, 3.4vw, 35px)/1.2 'Inter', sans-serif; letter-spacing: -.045em; }
.question-description { margin: 10px 0 23px; color: #838a9b; font-size: 13px; line-height: 1.6; }
.options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.option-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 72px;
  padding: 14px 14px 13px;
  border: 1px solid #e9e8e2;
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.option-card:hover { border-color: #c8d2f1; box-shadow: 0 5px 12px rgba(44, 62, 113, .06); transform: translateY(-1px); }
.option-card[aria-pressed="true"] { border-color: #7187c6; background: #f2f5ff; box-shadow: 0 0 0 2px rgba(92, 116, 184, .12); }
.option-mark { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #f3f3f0; color: #6e7994; }
.option-card:nth-child(4n+2) .option-mark { background: #fff2e6; color: #bd754a; }
.option-card:nth-child(4n+3) .option-mark { background: #e9f2ea; color: #53846a; }
.option-card:nth-child(4n) .option-mark { background: #f0ebfa; color: #7d68aa; }
.option-mark svg { width: 15px; height: 15px; }
.option-text { display: grid; gap: 3px; padding-top: 1px; }
.option-text strong { color: #35415f; font-size: 12px; font-weight: 700; line-height: 1.35; }
.option-text small { color: #969ba8; font-size: 10px; line-height: 1.4; }
.check-indicator { position: absolute; top: 11px; right: 11px; display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid #e1e1dc; border-radius: 50%; background: white; color: transparent; }
.check-indicator svg { width: 10px; height: 10px; }
.option-card[aria-pressed="true"] .check-indicator { border-color: var(--blue); background: var(--blue); color: white; }
.optional-field { margin-top: 18px; }
.optional-field label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-strong); font-size: 12px; font-weight: 700; }
.optional-field label small { color: #9298a7; font-size: 10px; font-weight: 600; }
.optional-field textarea { display: block; width: 100%; min-height: 88px; margin-top: 8px; padding: 12px 14px; border: 1px solid #e5e7ed; border-radius: 13px; background: #fffefa; color: var(--ink-strong); font: inherit; font-size: 13px; line-height: 1.5; resize: vertical; }
.optional-field textarea:focus-visible { outline: 3px solid rgba(92, 116, 184, .2); border-color: var(--blue); }
.optional-field p { margin: 6px 0 0; color: #858c9e; font-size: 10px; line-height: 1.5; }
.quiz-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 23px; }
.selection-hint { color: #a0a4ae; font-size: 10px; }
.quiz-controls { display: flex; gap: 9px; }
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid #e5e5e1;
  border-radius: 14px;
  background: white;
  color: #737d93;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background .18s ease, border-color .18s ease;
}
.secondary-button:hover { border-color: #cbd3ea; background: #f8f9fc; }
.secondary-button svg { width: 15px; height: 15px; }
.quiz-next { min-height: 46px; padding: 0 18px; border-radius: 14px; font-size: 12px; }
.quiz-next:disabled { box-shadow: none; background: #d2d6e0; color: #fff; cursor: not-allowed; transform: none; }

.result-page { padding: 32px 0 74px; }
.result-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 23px 0 20px; }
.result-heading h1 { margin: 0; color: var(--ink-strong); font: 800 clamp(29px, 4vw, 42px)/1.1 'Inter', sans-serif; letter-spacing: -.05em; }
.result-heading p { max-width: 590px; margin: 9px 0 0; color: #7f8798; font-size: 13px; line-height: 1.65; }
.result-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.result-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 19px;
  overflow: hidden;
  min-height: 136px;
  padding: 23px 26px;
  border: 1px solid #d9e0f2;
  border-radius: 22px;
  background: linear-gradient(112deg, #e9eefc 0%, #f1f2fb 65%, #faf0dc 100%);
}
.result-hero::after { position: absolute; top: -60px; right: -20px; width: 205px; height: 205px; border: 1px solid rgba(83, 105, 169, .14); border-radius: 50%; box-shadow: 0 0 0 21px rgba(255,255,255,.16), 0 0 0 44px rgba(255,255,255,.13); content: ''; }
.result-illustration { position: relative; z-index: 1; display: grid; flex: 0 0 63px; place-items: center; width: 63px; height: 63px; border-radius: 22px; background: #fff; box-shadow: 0 7px 19px rgba(36, 54, 103, .09); color: #526db4; }
.result-illustration svg { width: 34px; height: 34px; }
.result-hero-copy { position: relative; z-index: 1; max-width: 700px; }
.result-hero-copy span { color: #697dad; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.result-hero-copy p { margin: 7px 0 0; color: #3c4a6f; font: 600 15px/1.55 'Inter', sans-serif; }
.result-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 30px 0 13px; }
.result-section-head h2 { margin: 0; color: var(--ink-strong); font: 800 20px 'Inter', sans-serif; letter-spacing: -.04em; }
.result-section-head p { margin: 0; color: #989dac; font-size: 10px; }
.career-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.career-card {
  display: flex;
  flex-direction: column;
  min-height: 347px;
  padding: 18px;
  border: 1px solid rgba(55, 67, 105, .09);
  border-radius: 20px;
  background: rgba(255, 254, 250, .94);
  box-shadow: 0 4px 13px rgba(39, 55, 98, .04);
}
.career-card:nth-child(2) { background: #fffaf3; }
.career-card:nth-child(3) { background: #f9fbf7; }
.career-card-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.career-number { color: #a1a6b2; font-size: 9px; font-weight: 800; letter-spacing: .11em; }
.match-pill { padding: 6px 8px; border-radius: 9px; background: #eaf3eb; color: #4c8260; font-size: 9px; font-weight: 800; }
.career-icon { display: grid; place-items: center; width: 43px; height: 43px; margin: 15px 0 11px; border-radius: 14px; background: #e9edfc; color: #526cad; }
.career-card:nth-child(2) .career-icon { background: #ffeddc; color: #bb7649; }
.career-card:nth-child(3) .career-icon { background: #e5f1e8; color: #4e8064; }
.career-icon svg { width: 22px; height: 22px; }
.career-card h3 { margin: 0 0 8px; color: #2c3858; font: 800 17px/1.25 'Inter', sans-serif; letter-spacing: -.035em; }
.career-why { min-height: 61px; margin: 0; color: #7a8294; font-size: 11px; line-height: 1.65; }
.career-divider { height: 1px; margin: 13px 0; background: rgba(54, 70, 108, .1); }
.career-label { margin: 0 0 7px; color: #999eaa; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.career-tag { padding: 5px 7px; border-radius: 7px; background: rgba(231, 235, 247, .78); color: #657292; font-size: 9px; font-weight: 600; }
.career-card:nth-child(2) .career-tag { background: #fff0df; color: #927351; }
.career-card:nth-child(3) .career-tag { background: #eaf2e8; color: #64816a; }
.career-next-step { margin-top: auto; padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.76); color: #68718a; font-size: 10px; line-height: 1.55; }
.career-next-step strong { display: block; margin-bottom: 4px; color: #475573; font-size: 9px; }
.result-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; padding: 13px 15px; border: 1px solid #efe5cf; border-radius: 14px; background: #fff9e9; color: #867757; font-size: 10px; line-height: 1.6; }
.result-note svg { flex: 0 0 16px; width: 16px; height: 16px; color: #c39a4d; }
.result-note.is-success { border-color: #cce5d7; background: #eff9f1; color: #3f765f; }
.result-note.is-success svg { color: #4a9b71; }
.result-note.is-error { border-color: #f0d0cb; background: #fff3f0; color: #a6554d; }
.result-note.is-error svg { color: #b34d4d; }
.demo-banner { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; color: #a4793f; font-size: 10px; font-weight: 700; }
.demo-banner svg { width: 14px; height: 14px; }
.privacy-short { display: flex; align-items: flex-start; gap: 7px; max-width: 730px; margin: 17px auto 0; color: #999eaa; font-size: 10px; line-height: 1.55; }
.privacy-short svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 1px; color: #779780; }
.loading-screen { display: grid; place-items: center; min-height: 480px; padding: 28px; text-align: center; }
.loading-card { max-width: 400px; padding: 35px 38px; border: 1px solid rgba(55, 67, 105, .1); border-radius: 24px; background: var(--card); box-shadow: var(--shadow-card); }
.loading-orbit { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 19px; border: 2px solid #e4e8f5; border-radius: 50%; color: #5069ae; animation: spin 5s linear infinite; }
.loading-orbit svg { width: 35px; height: 35px; }
.loading-card h2 { margin: 0 0 8px; color: var(--ink-strong); font: 800 21px 'Inter', sans-serif; }
.loading-card p { margin: 0; color: #858c9e; font-size: 12px; line-height: 1.6; }
.loading-dots { display: flex; justify-content: center; gap: 5px; margin-top: 18px; }
.loading-dots span { width: 6px; height: 6px; border-radius: 50%; background: #8394ca; animation: pulse 1s infinite ease-in-out; }
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }
.error-box { margin-top: 16px; padding: 13px 15px; border: 1px solid #f0cbc0; border-radius: 13px; background: #fff5f1; color: #995d4c; font-size: 11px; line-height: 1.55; }
.error-box button { margin-left: 8px; border: 0; background: none; color: #6a493e; cursor: pointer; font: inherit; font-weight: 800; text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-4px); } }

@media (max-width: 980px) {
  .site-shell { width: min(100% - 38px, 820px); }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(310px, .85fr); gap: 10px; min-height: 470px; }
  .hero h1 { font-size: clamp(39px, 6vw, 54px); }
  .hero-art { margin-right: -14px; }
  .benefit-card { padding: 17px 14px; }
  .quiz-shell { grid-template-columns: 210px minmax(0,1fr); }
  .quiz-aside { padding: 18px; }
  .career-card { padding: 15px; }
}

@media (max-width: 720px) {
  .site-shell { width: calc(100% - 34px); }
  .topbar { min-height: 73px; }
  .topnav { display: none; }
  .brand-mark, .brand-mark svg { width: 39px; height: 39px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy small { font-size: 7px; }
  .top-actions { gap: 8px; }
  .connection-pill { min-height: 31px; padding: 0 9px; font-size: 9px; }
  .language-switch { min-width: 43px; min-height: 39px; border-radius: 12px; }
  .login-link { min-height: 39px; padding: 0 12px; border-radius: 12px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: auto; padding: 42px 0 24px; }
  .hero-copy { padding: 0; }
  .hero h1 { max-width: 540px; margin-top: 16px; font-size: clamp(39px, 10vw, 55px); }
  .hero h1 .highlight { white-space: normal; }
  .hero-description { max-width: 520px; font-size: 14px; }
  .hero-cta-row { flex-wrap: wrap; gap: 12px; margin-top: 22px; }
  .primary-button { min-height: 53px; padding: 0 18px; font-size: 13px; }
  .hero-trust { margin-top: 17px; }
  .hero-art { width: min(100%, 480px); margin: 0 auto; padding: 8px 0; }
  .note-one { top: 7%; right: -1%; }
  .note-two { bottom: 11%; left: 0; }
  .benefits { grid-template-columns: 1fr; gap: 9px; margin: 12px 0 50px; }
  .benefit-card { min-height: auto; padding: 14px; }
  .benefit-card p { font-size: 11px; }
  .section-title { display: block; }
  .section-title h2 { font-size: 22px; }
  .section-title p { margin-top: 6px; line-height: 1.5; }
  .how-grid { grid-template-columns: 1fr; gap: 9px; margin-bottom: 50px; }
  .how-card { padding: 16px 18px; }
  .how-card h3 { margin-top: 8px; }
  .site-footer { min-height: 61px; font-size: 9px; }
  .quiz-page { padding: 20px 0 48px; }
  .quiz-topline { margin-bottom: 12px; }
  .quiz-shell { display: block; margin-top: 13px; }
  .quiz-aside { position: static; display: none; }
  .question-card { min-height: auto; padding: 23px 18px 18px; border-radius: 20px; }
  .question-card h1 { font-size: 26px; }
  .question-description { margin: 8px 0 17px; font-size: 12px; }
  .options-grid { grid-template-columns: 1fr; gap: 8px; }
  .option-card { min-height: 61px; padding: 12px; border-radius: 13px; }
  .option-text strong { font-size: 12px; }
  .quiz-footer { align-items: flex-start; flex-direction: column; margin-top: 17px; }
  .quiz-controls { width: 100%; }
  .quiz-controls button { flex: 1; }
  .selection-hint { order: 1; }
  .result-page { padding: 20px 0 50px; }
  .result-heading { align-items: flex-start; flex-direction: column; margin: 20px 0 16px; }
  .result-heading h1 { font-size: 32px; }
  .result-heading p { font-size: 12px; }
  .result-heading .result-actions { width: 100%; }
  .result-heading .result-actions button { flex: 1; }
  .result-hero { align-items: flex-start; gap: 12px; min-height: 0; padding: 17px; border-radius: 18px; }
  .result-illustration { flex-basis: 46px; width: 46px; height: 46px; border-radius: 16px; }
  .result-illustration svg { width: 27px; height: 27px; }
  .result-hero-copy p { font-size: 12px; }
  .result-section-head { align-items: flex-start; flex-direction: column; margin-top: 23px; }
  .result-section-head h2 { font-size: 19px; }
  .privacy-short { font-size: 9px; }
  .career-grid { grid-template-columns: 1fr; gap: 9px; }
  .career-card { min-height: 0; padding: 17px; }
  .career-why { min-height: 0; }
  .career-next-step { margin-top: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ───────────── AI Study Assistant ───────────── */
:root { --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace; }

.hero-secondary { min-height: 56px; padding: 0 18px; border-radius: 17px; font-size: 13px; color: var(--blue-dark); }
.hero-secondary svg { width: 17px; height: 17px; }

/* Topics */
.topics-section { scroll-margin-top: 20px; margin-bottom: 30px; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.topic-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(55, 67, 105, .09);
  border-radius: 22px;
  background: rgba(255, 254, 250, .92);
  box-shadow: 0 4px 13px rgba(39, 55, 98, .04);
}
.topic-card.topic-peach { background: #fffaf3; }
.topic-card.topic-green { background: #f9fbf7; }
.topic-card.topic-violet { background: #faf7ff; }
.topic-card.topic-gold { background: #fffaf0; }
.topic-card.topic-teal { background: #f6fcfb; }
.topic-card.topic-rose { background: #fff8fa; }
.topic-card.topic-indigo { background: #f8f8ff; }
.topic-head { display: flex; align-items: flex-start; gap: 13px; }
.topic-head .benefit-icon { flex-basis: 44px; width: 44px; height: 44px; border-radius: 14px; }
.topic-head .benefit-icon svg { width: 22px; height: 22px; }
.topic-head h3 { margin: 2px 0 4px; color: var(--ink-strong); font: 800 19px/1.2 'Inter', sans-serif; letter-spacing: -.035em; }
.topic-head p { margin: 0; color: #7f8798; font-size: 12px; line-height: 1.55; }
.level-list { display: grid; gap: 8px; }
.level-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid #e9e8e2;
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.level-button:hover { border-color: #c8d2f1; box-shadow: 0 5px 12px rgba(44, 62, 113, .07); transform: translateY(-1px); }
.level-button > svg { width: 16px; height: 16px; margin-left: auto; color: #a3a8b7; transition: transform .18s ease, color .18s ease; }
.level-button:hover > svg { color: var(--blue-dark); transform: translateX(2px); }
.level-copy { display: grid; gap: 2px; }
.level-copy strong { color: #35415f; font-size: 13px; font-weight: 700; }
.level-copy small { display: inline-flex; align-items: center; gap: 4px; color: #969ba8; font-size: 10px; }
.level-copy .level-best { color: #a4793f; font-weight: 700; }
.level-best svg { width: 12px; height: 12px; }
.level-bars { display: flex; align-items: flex-end; gap: 3px; width: 28px; height: 28px; padding: 6px 5px; border-radius: 9px; background: #f3f3f0; }
.level-bars i { flex: 1; border-radius: 2px; background: #dcdcd6; }
.level-bars i:nth-child(1) { height: 40%; }
.level-bars i:nth-child(2) { height: 70%; }
.level-bars i:nth-child(3) { height: 100%; }
.topic-blue .level-bars i.is-on { background: #6d85c9; }
.topic-peach .level-bars i.is-on { background: #e0935f; }
.topic-green .level-bars i.is-on { background: #5f9a79; }
.topic-violet .level-bars i.is-on { background: #8a6ec4; }
.topic-gold .level-bars i.is-on { background: #c49445; }
.topic-teal .level-bars i.is-on { background: #55a59a; }
.topic-rose .level-bars i.is-on { background: #bd7187; }
.topic-indigo .level-bars i.is-on { background: #7875bc; }

/* Theory */
.theory-section { margin: 0 0 26px; }
.theory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.theory-card { display: flex; align-items: flex-start; gap: 12px; min-height: 132px; padding: 18px; border: 1px solid rgba(55, 67, 105, .08); border-radius: 18px; background: rgba(255, 254, 250, .78); }
.theory-card.theory-blue { background: #f5f7ff; }
.theory-card.theory-peach { background: #fffaf3; }
.theory-card.theory-green { background: #f7fbf7; }
.theory-card.theory-gold { background: #fffaf0; }
.theory-card.theory-teal { background: #f6fcfb; }
.theory-card.theory-rose { background: #fff8fa; }
.theory-card.theory-indigo { background: #f8f8ff; }
.theory-icon { display: grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #e8edfc; color: var(--blue-dark); }
.theory-peach .theory-icon { background: #fff0df; color: #bd754b; }
.theory-green .theory-icon { background: #e7f2e9; color: #54866b; }
.theory-gold .theory-icon { background: #fff3d8; color: #b38336; }
.theory-teal .theory-icon { background: #e4f5f2; color: #3f8d82; }
.theory-rose .theory-icon { background: #fbe9ee; color: #b7657e; }
.theory-indigo .theory-icon { background: #e9e8fb; color: #6866a9; }
.theory-icon svg { width: 17px; height: 17px; }
.theory-card h3 { margin: 1px 0 6px; color: var(--ink-strong); font: 700 13px/1.3 'Inter', sans-serif; }
.theory-card p { margin: 0; color: #737d91; font-size: 12px; line-height: 1.6; }

/* Mentor banner */
.mentor-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  margin: 26px 0 72px;
  padding: 26px 28px;
  border: 1px solid #d9e0f2;
  border-radius: 24px;
  background: linear-gradient(112deg, #e9eefc 0%, #f1f2fb 62%, #faf0dc 100%);
}
.mentor-banner::after { position: absolute; top: -70px; right: 180px; width: 205px; height: 205px; border: 1px solid rgba(83, 105, 169, .12); border-radius: 50%; box-shadow: 0 0 0 21px rgba(255,255,255,.16), 0 0 0 44px rgba(255,255,255,.12); content: ''; pointer-events: none; }
.mentor-banner-copy { position: relative; z-index: 1; flex: 1; }
.mentor-banner-copy h2 { margin: 0 0 6px; color: var(--ink-strong); font: 800 21px/1.25 'Inter', sans-serif; letter-spacing: -.04em; }
.mentor-banner-copy p { max-width: 600px; margin: 0; color: #5f6a88; font-size: 13px; line-height: 1.6; }
.mentor-banner .primary-button { position: relative; z-index: 1; flex: 0 0 auto; }

/* Code blocks */
.code-block { overflow: hidden; margin: 16px 0 20px; border-radius: 15px; background: #1f2a47; box-shadow: 0 8px 20px rgba(31, 42, 71, .14); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 8px 7px 14px; background: #283559; color: #9fb0db; font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.code-copy { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: #b8c5e8; cursor: pointer; font: 600 10px 'Inter', sans-serif; letter-spacing: 0; text-transform: none; }
.code-copy:hover { background: rgba(255,255,255,.08); color: #fff; }
.code-copy svg { width: 13px; height: 13px; }
.code-block pre { margin: 0; padding: 14px 16px 16px; overflow-x: auto; }
.code-block code { color: #eef1fb; font: 400 13px/1.65 var(--mono); white-space: pre; tab-size: 4; }

/* Quiz */
.counter-total { color: #c1c4cc; }
.question-spacer { height: 20px; }
.answer-card { align-items: center; min-height: 58px; }
.answer-card .option-mark { font: 800 12px 'Inter', sans-serif; }
.answer-card .option-text strong { font-family: inherit; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-card:disabled { cursor: default; transform: none; box-shadow: none; }
.answer-card.is-correct { border-color: #7fbf9b; background: #eef8f1; box-shadow: 0 0 0 2px rgba(79, 154, 112, .14); }
.answer-card.is-correct .option-mark { background: #4a9b71; color: #fff; }
.answer-card.is-correct .check-indicator { border-color: #4a9b71; background: #4a9b71; color: #fff; }
.answer-card.is-wrong { border-color: #e9a58a; background: #fff3ee; box-shadow: 0 0 0 2px rgba(213, 110, 80, .12); }
.answer-card.is-wrong .option-mark { background: #d8704f; color: #fff; }
.answer-card.is-wrong .check-indicator { border-color: #d8704f; background: #d8704f; color: #fff; }
.answer-card.is-dim { opacity: .55; }
.step-item.is-wrong .step-bubble { border-color: #f1d0c2; background: #fff0ea; color: #c8674a; }
.step-bubble svg { width: 12px; height: 12px; }
.aside-topic { display: flex; align-items: center; gap: 11px; }
.aside-topic .benefit-icon { flex-basis: 38px; width: 38px; height: 38px; }
.aside-topic div { display: grid; gap: 2px; }
.aside-topic strong { color: var(--ink-strong); font: 800 15px 'Inter', sans-serif; }
.aside-topic small { color: #8f95a4; font-size: 11px; font-weight: 600; }
.aside-tip svg { width: 14px; height: 14px; color: #779780; }

.feedback { margin-top: 18px; padding: 17px 18px; border: 1px solid; border-radius: 17px; outline: none; }
.feedback.is-good { border-color: #cfe6d6; background: #f0f8f2; }
.feedback.is-bad { border-color: #f1dcc8; background: #fff8f0; }
.feedback-title { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; color: var(--ink-strong); font: 800 15px 'Inter', sans-serif; letter-spacing: -.02em; }
.feedback-title span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; }
.feedback-title svg { width: 15px; height: 15px; }
.feedback.is-good .feedback-title span { background: #d9efe1; color: #3f7e5c; }
.feedback.is-bad .feedback-title span { background: #fbe1d5; color: #c0603f; }
.feedback p { margin: 0 0 8px; color: #5d6882; font-size: 13px; line-height: 1.65; }
.feedback .feedback-answer { color: #3f7e5c; }
.feedback-answer strong { color: #2f6a4b; }
.feedback-label { display: flex; align-items: center; gap: 6px; margin: 12px 0 5px !important; color: #a0805a !important; font-size: 10px !important; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.feedback-label svg { width: 14px; height: 14px; }
.feedback .code-block { margin: 6px 0 12px; }
.ai-button { margin-top: 6px; color: var(--blue-dark); }
.ai-box { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 14px 16px; border: 1px solid #dfe5f5; border-radius: 14px; background: #fff; color: #6b7590; font-size: 12px; }
.ai-box .loading-dots { margin: 0; }
.ai-box.is-done { display: block; }
.ai-box.is-done .feedback-label { margin-top: 0 !important; color: #5a6fae !important; }
.ai-offline { display: flex; align-items: center; gap: 7px; margin: 8px 0 0 !important; color: #9a8f7a !important; font-size: 11px !important; }
.ai-offline svg { flex: 0 0 14px; width: 14px; height: 14px; }

/* Markdown */
.markdown { color: #45506d; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.markdown p { margin: 0 0 9px; color: inherit; font-size: inherit; }
.markdown h4 { margin: 12px 0 6px; color: var(--ink-strong); font: 800 14px 'Inter', sans-serif; }
.markdown ul, .markdown ol { margin: 0 0 10px; padding-left: 20px; }
.markdown li { margin: 3px 0; }
.markdown code { padding: 1px 5px; border-radius: 5px; background: #eef1f9; color: #34488a; font: 12px var(--mono); }
.markdown .code-block code { padding: 0; background: none; color: #eef1fb; font-size: 12.5px; }
.markdown .code-block { margin: 8px 0 12px; }
.markdown > :last-child { margin-bottom: 0; }

/* Result */
.score-ring {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 92px;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(#4a9b71 calc(var(--score) * 1%), rgba(255,255,255,.8) 0);
  box-shadow: 0 7px 19px rgba(36, 54, 103, .09);
}
.score-ring::before { position: absolute; inset: 9px; border-radius: 50%; background: #fff; content: ''; }
.score-ring strong { position: relative; color: var(--ink-strong); font: 800 22px 'Inter', sans-serif; letter-spacing: -.04em; }
.review-list { display: grid; gap: 10px; }
.review-item { display: flex; gap: 13px; padding: 16px 18px; border: 1px solid rgba(55, 67, 105, .09); border-radius: 17px; background: rgba(255, 254, 250, .94); }
.review-mark { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border-radius: 9px; }
.review-mark svg { width: 15px; height: 15px; }
.review-item.is-good .review-mark { background: #e3f3e9; color: #3f7e5c; }
.review-item.is-bad .review-mark { background: #fde6dc; color: #c0603f; }
.review-item h3 { margin: 3px 0 6px; color: var(--ink-strong); font: 700 14px/1.4 'Inter', sans-serif; }
.review-item p { margin: 0 0 4px; color: #6c7590; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.review-item s { color: #c0735a; }
.review-item .review-explain { margin-top: 6px; color: #858c9c; }
.result-bottom-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }

/* Chat */
.chat-aside { display: block; }
.topic-chip-list { display: grid; gap: 7px; }
.topic-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #e9e8e2;
  border-radius: 12px;
  background: #fff;
  color: #5c6680;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}
.topic-chip svg { width: 15px; height: 15px; }
.topic-chip:hover { border-color: #c8d2f1; }
.topic-chip[aria-pressed="true"] { border-color: #7187c6; background: #f2f5ff; color: var(--blue-dark); }
.suggestion-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.suggestion-list.is-compact { flex-direction: column; }
.suggestion {
  padding: 9px 13px;
  border: 1px solid #e3e6ef;
  border-radius: 12px;
  background: #fff;
  color: #4b5778;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  transition: border-color .18s ease, background .18s ease;
}
.suggestion:hover { border-color: #b9c6ec; background: #f6f8ff; }
.chat-card { display: flex; flex-direction: column; min-height: 600px; }
.chat-header { padding-bottom: 4px; }
.chat-header .question-description { margin-bottom: 12px; }
.chat-offline { margin: 0 0 12px; }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 14px; min-height: 280px; max-height: 62vh; margin: 0 -6px; padding: 8px 6px 14px; overflow-y: auto; }
.chat-empty { display: grid; justify-items: center; gap: 4px; margin: auto; padding: 22px 8px; text-align: center; }
.chat-empty .result-illustration { margin-bottom: 8px; background: #eef2fd; box-shadow: none; }
.chat-empty h2 { margin: 0; color: var(--ink-strong); font: 800 20px 'Inter', sans-serif; letter-spacing: -.03em; }
.chat-empty p { margin: 0 0 14px; color: #858c9e; font-size: 12px; }
.msg { display: flex; align-items: flex-start; gap: 10px; }
.msg.is-user { justify-content: flex-end; }
.msg-avatar { display: grid; flex: 0 0 32px; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: #e9edfc; color: #526cad; }
.msg-avatar svg { width: 17px; height: 17px; }
.msg-bubble { max-width: min(640px, 88%); padding: 12px 15px; border-radius: 17px; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.msg.is-user .msg-bubble { border-bottom-right-radius: 6px; background: var(--blue-dark); color: #fff; }
.msg.is-mentor .msg-bubble { border: 1px solid #ebeae4; border-top-left-radius: 6px; background: #fff; }
.msg-bubble.thinking { display: flex; align-items: center; gap: 10px; color: #858c9e; font-size: 12px; }
.msg-bubble.thinking .loading-dots { margin: 0; }
.chat-error { margin: 0; }
.composer { display: flex; align-items: flex-end; gap: 9px; margin-top: 10px; padding: 8px; border: 1px solid #e5e7ed; border-radius: 18px; background: #fffefa; transition: border-color .18s ease, box-shadow .18s ease; }
.composer:focus-within { border-color: #9cacdc; box-shadow: 0 0 0 3px rgba(92, 116, 184, .12); }
.composer textarea { flex: 1; min-height: 44px; max-height: 200px; padding: 11px 8px; border: 0; background: transparent; color: var(--ink-strong); font: inherit; font-size: 13px; line-height: 1.5; resize: vertical; outline: none; }
.composer-send { flex: 0 0 46px; width: 46px; min-height: 46px; padding: 0; border-radius: 14px; }
.composer-send:disabled { background: #d2d6e0; box-shadow: none; cursor: wait; transform: none; }
.composer-hint { margin: 7px 4px 0; color: #a3a8b7; font-size: 10px; }

@media (max-width: 980px) {
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
  .topic-card .practice-entry-button { grid-column: 1 / -1; }
  .theory-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hero-secondary { min-height: 53px; }
  .topic-card { display: flex; padding: 17px; }
  .mentor-banner { flex-direction: column; align-items: flex-start; gap: 13px; margin-bottom: 50px; padding: 20px; }
  .mentor-banner .primary-button { width: 100%; }
  .code-block code { font-size: 12px; }
  .result-heading .result-actions { flex-wrap: wrap; }
  .score-ring { flex-basis: 72px; width: 72px; height: 72px; }
  .score-ring strong { font-size: 18px; }
  .result-bottom-actions button { flex: 1; }
  .quiz-aside.chat-aside { display: block; margin-bottom: 12px; padding: 14px; }
  .chat-aside .topic-chip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-aside .aside-divider, .chat-aside .suggestion-list, .chat-aside .aside-tip { display: none; }
  .chat-card { min-height: 0; }
  .chat-log { max-height: none; min-height: 240px; }
  .msg-bubble { max-width: 100%; }
  .msg-avatar { display: none; }
}

.md-table { max-width: 100%; margin: 6px 0 12px; overflow-x: auto; border: 1px solid #e6e8ef; border-radius: 12px; }
.md-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.md-table th, .md-table td { padding: 7px 11px; border-bottom: 1px solid #eef0f5; text-align: left; white-space: nowrap; }
.md-table th { background: #f4f6fb; color: var(--ink-strong); font-weight: 700; }
.md-table tr:last-child td { border-bottom: 0; }
.chat-log { position: relative; }

/* AI question generation */
.topics-section .section-title { gap: 16px; }
.topics-section .section-title p { margin-top: 6px; }
.source-toggle { display: grid; justify-items: end; gap: 6px; flex: 0 0 auto; }
.source-label { color: #a1a5b1; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.source-options { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid #e6e4dc; border-radius: 14px; background: #fff; }
.source-options button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #737d93;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background .18s ease, color .18s ease;
}
.source-options button svg { width: 14px; height: 14px; }
.source-options button:hover:not(:disabled) { color: var(--blue-dark); }
.source-options button[aria-pressed="true"] { background: var(--blue-dark); color: #fff; box-shadow: 0 4px 10px rgba(36, 59, 128, .18); }
.source-options button[data-source-toggle="ai"][aria-pressed="true"] { background: linear-gradient(120deg, #3a4fa0, #7a5bc0); }
.source-options button:disabled { cursor: not-allowed; opacity: .45; }
.source-hint { max-width: 260px; color: #a3a8b7; font-size: 10px; text-align: right; }
.level-copy .level-ai { color: #7a5bc0; font-weight: 700; }
.level-ai svg { width: 12px; height: 12px; }
.ai-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 3px 8px; border-radius: 8px; background: #f0ebfa; color: #7a5bc0; font-style: normal; letter-spacing: .08em; }
.question-kicker .ai-badge svg { width: 11px; height: 11px; }
.ai-tip { margin-top: 10px; background: #f4f0fb; color: #7d6f9a; }
.gen-kicker { margin: 0 0 6px !important; color: #7a5bc0 !important; font-size: 10px !important; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.loading-orbit.is-still { animation: none; color: #c0603f; border-color: #f3dcd0; }
.gen-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.gen-cancel { margin-top: 12px; }

@media (max-width: 720px) {
  .source-toggle { justify-items: start; margin-top: 14px; }
  .source-hint { text-align: left; }
  .question-kicker { flex-wrap: wrap; }
}
.result-bottom-actions .ai-button { margin-top: 0; }

.connection-pill { white-space: nowrap; }
@media (max-width: 480px) {
  .site-shell { width: calc(100% - 24px); }
  .topbar { gap: 8px; }
  .brand { min-width: 0; }
  .brand-copy { min-width: 0; }
  .brand-copy strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .brand-copy small { display: none; }
  .top-actions { flex: 0 0 auto; gap: 6px; }
  .student-dashboard-link, .admin-back-link { max-width: 150px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: clamp(34px, 10.5vw, 46px); }
  .hero-cta-row { align-items: stretch; flex-direction: column; }
  .hero-cta-row .primary-button, .hero-cta-row .hero-secondary { width: 100%; }
  .question-card h1 { overflow-wrap: anywhere; }
  .quiz-topline { align-items: flex-start; flex-direction: column; gap: 4px; }
  .composer textarea { font-size: 16px; }
  .connection-pill { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  #connection-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .brand-copy small { line-height: 1.35; }
}

/* Accessibility and interaction polish */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }
.text-button { min-height: 44px; }
.code-copy, .topic-chip, .suggestion, .source-options button { min-height: 44px; }
.table-action { min-height: 44px; padding: 8px 4px; }
.connection-pill { min-height: 44px; }
.connection-pill .connection-dot { flex: 0 0 7px; }
.section-title p, .benefit-card p, .how-card p, .topic-head p, .theory-card p { font-size: 13px; }
.level-copy small, .selection-hint, .source-hint, .composer-hint { font-size: 11px; }
.site-footer { font-size: 11px; }
.topic-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 16px 0 18px; }
.topic-search { display: block; flex: 1; max-width: 420px; }
.topic-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid #e2e4ea;
  border-radius: 14px;
  outline: 0;
  background: rgba(255, 254, 250, .9);
  color: var(--ink-strong);
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.topic-search input::placeholder { color: #7b8497; }
.topic-search input:focus { border-color: #7187ca; box-shadow: 0 0 0 3px rgba(113, 135, 202, .15); }
.topic-empty { margin: 0; padding: 28px 20px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.topic-card[hidden], .topic-empty[hidden] { display: none; }
.score-ring small { position: relative; margin-top: 45px; color: #5a6a8f; font-size: 10px; font-weight: 800; }

/* Python code practice */
.practice-entry-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid #cbd6f2;
  border-radius: 13px;
  background: #f5f7ff;
  color: var(--blue-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.practice-entry-button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.practice-entry-button svg:last-child { width: 15px; margin-left: auto; }
.practice-entry-button:hover { border-color: #8da4e1; box-shadow: 0 6px 16px rgba(55, 79, 145, .1); transform: translateY(-1px); }
.practice-page { padding: 38px 0 70px; }
.practice-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.practice-back { margin-bottom: 17px; }
.practice-header h1 { margin: 0; color: var(--ink-strong); font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; }
.practice-header p:not(.eyebrow) { max-width: 650px; margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.practice-progress { display: grid; min-width: 125px; padding: 16px 18px; border: 1px solid #dce3f4; border-radius: 16px; background: #f7f9ff; color: var(--blue-dark); text-align: center; }
.practice-progress strong { font-size: 24px; letter-spacing: -.03em; }
.practice-progress span { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.practice-difficulty-list { display: flex; gap: 8px; margin-bottom: 16px; padding: 6px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 254, 250, .8); }
.practice-difficulty { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 15px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; }
.practice-difficulty small { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #f0f1f4; color: #7c8493; font-size: 11px; }
.practice-difficulty.is-active { background: var(--blue-dark); color: #fff; box-shadow: 0 5px 12px rgba(41, 63, 123, .17); }
.practice-difficulty.is-active small { background: rgba(255, 255, 255, .18); color: #fff; }
.practice-layout { display: grid; grid-template-columns: minmax(190px, .48fr) minmax(280px, .9fr) minmax(380px, 1.2fr); gap: 14px; align-items: start; }
.practice-task-list, .practice-task-card, .practice-editor-card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-card); }
.practice-task-list { padding: 10px; }
.practice-list-heading { display: flex; align-items: center; justify-content: space-between; padding: 9px 9px 12px; color: var(--ink-strong); font-size: 13px; }
.practice-list-heading span { color: var(--muted); font-size: 12px; }
.practice-task-button { display: grid; grid-template-columns: 27px minmax(0, 1fr) 18px; align-items: center; gap: 7px; width: 100%; min-height: 48px; padding: 7px 8px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; text-align: left; }
.practice-task-button > span { color: #9ba4b7; font-family: var(--mono); font-size: 10px; }
.practice-task-button strong { overflow: hidden; color: inherit; font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.practice-task-button em { color: var(--green); font-style: normal; }
.practice-task-button em svg { width: 16px; height: 16px; }
.practice-task-button:hover { background: #f7f8fb; color: var(--ink-strong); }
.practice-task-button.is-active { border-color: #c8d5f3; background: #f3f6ff; color: var(--blue-dark); }
.practice-task-button.is-solved:not(.is-active) { color: #5d7e69; }
.practice-task-card { padding: 25px; }
.practice-task-kicker { color: #7185bb; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.practice-task-card h2 { margin: 10px 0 12px; color: var(--ink-strong); font-size: 24px; letter-spacing: -.025em; }
.practice-description { margin: 0 0 22px; color: #4e596e; font-size: 14px; line-height: 1.7; }
.practice-detail { padding-top: 16px; border-top: 1px solid #ececf0; }
.practice-detail + .practice-detail { margin-top: 17px; }
.practice-detail > strong { color: var(--ink-strong); font-size: 12px; }
.practice-detail p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.practice-examples { display: grid; gap: 8px; margin-top: 9px; }
.practice-example { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; border-radius: 9px; background: #f7f8fb; color: #8a92a2; font-size: 11px; }
.practice-example code { min-width: 0; overflow: hidden; color: #344261; font-family: var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.practice-example code:last-child { color: #4f735f; }
.practice-editor-card { overflow: hidden; border-color: #202b43; background: #182238; box-shadow: 0 12px 28px rgba(23, 35, 64, .2); }
.practice-editor-head { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 16px; background: #202d49; color: #edf2ff; font-size: 12px; }
.practice-editor-head > div { display: flex; align-items: center; gap: 8px; }
.practice-editor-dot { width: 9px; height: 9px; border-radius: 50%; background: #6cdb9c; box-shadow: 0 0 0 4px rgba(108, 219, 156, .12); }
.practice-runtime { overflow: hidden; max-width: 190px; color: #aab7d2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
#practice-code { display: block; width: 100%; min-height: 350px; padding: 19px; resize: vertical; border: 0; outline: 0; background: #182238; color: #e7edff; caret-color: #8eb0ff; font: 13px/1.65 var(--mono); tab-size: 4; }
#practice-code:focus { box-shadow: inset 0 0 0 2px #6988d9; }
.practice-editor-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 12px 14px; background: #202d49; }
.practice-editor-actions .primary-button { min-height: 42px; padding: 0 14px; }
.practice-editor-actions .secondary-button { min-height: 42px; border-color: rgba(255, 255, 255, .15); background: transparent; color: #d5ddf3; }
.practice-editor-actions .secondary-button:hover { border-color: rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .06); }
.practice-output { margin: 14px; padding: 13px 14px; border: 1px solid rgba(166, 183, 220, .16); border-radius: 12px; background: #111a2d; }
.practice-output-title { display: flex; align-items: center; gap: 7px; color: #aab7d2; font-size: 11px; font-weight: 800; }
.practice-output-title svg { width: 15px; height: 15px; }
.practice-output pre { min-height: 20px; margin: 9px 0 0; color: #d9e1f6; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }
.practice-output.is-success { border-color: rgba(98, 210, 143, .5); background: rgba(38, 92, 62, .25); }
.practice-output.is-success .practice-output-title, .practice-output.is-success pre { color: #a7e9bd; }
.practice-output.is-error { border-color: rgba(245, 139, 120, .45); background: rgba(112, 47, 43, .25); }
.practice-output.is-error .practice-output-title, .practice-output.is-error pre { color: #ffc1b4; }
.practice-output.is-loading pre { color: #afc0e8; }
.practice-login-hint { display: flex; gap: 7px; align-items: flex-start; margin: 0 14px 14px; color: #aab7d2; font-size: 11px; line-height: 1.45; }
.practice-login-hint svg { width: 15px; height: 15px; flex: 0 0 auto; }
.teacher-practice-card h3 { margin: 0 0 4px; color: var(--ink-strong); font-size: 16px; }
.teacher-practice-card td small { display: block; color: var(--muted); font-size: 10px; }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 0; }
  .topnav { display: flex; order: 3; flex: 0 0 100%; justify-content: center; gap: 12px; padding-top: 9px; border-top: 1px solid rgba(52, 66, 106, .09); }
  .topic-tools { align-items: stretch; flex-direction: column; gap: 12px; }
  .topic-search { max-width: none; }
  .source-toggle { margin-top: 0; }
}

@media (max-width: 1080px) {
  .practice-layout { grid-template-columns: minmax(180px, .45fr) minmax(280px, .9fr); }
  .practice-editor-card { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .practice-page { padding-top: 24px; }
  .practice-header { align-items: flex-start; flex-direction: column; gap: 18px; }
  .practice-progress { align-self: stretch; display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .practice-difficulty-list { overflow-x: auto; }
  .practice-difficulty { flex: 0 0 auto; }
  .practice-layout { display: flex; flex-direction: column; }
  .practice-task-list, .practice-task-card, .practice-editor-card { width: 100%; }
  .practice-task-list { display: flex; flex-wrap: wrap; gap: 5px; }
  .practice-list-heading { width: 100%; }
  .practice-task-button { flex: 1 1 calc(50% - 5px); }
  #practice-code { min-height: 300px; font-size: 14px; }
}

@media (max-width: 480px) {
  .topnav { font-size: 12px; }
  .topic-search input { min-height: 50px; font-size: 16px; }
}
