:root {
  color-scheme: light;
  --page: #f4f7fc;
  --sidebar: #ffffff;
  --surface: #ffffff;
  --surface-raised: #edf3fe;
  --field: #f8faff;
  --ink: #10213c;
  --text: #283c58;
  --muted: #4f617e;
  --line: #dce5f1;
  --control-border: #7689a4;
  --accent: #204fbc;
  --accent-soft: #eaf2ff;
  --focus: #2863d5;
  --button: #2459cf;
  --button-hover: #1946b0;
  --button-text: #fff;
  --success: #0a6651;
  --success-soft: #e6f6ef;
  --warn: #875216;
  --warn-soft: #fff2df;
  --radius: 18px;
  --shadow: 0 6px 20px #1a3e7110;
  --side-width: 228px;
  --gutter: clamp(20px, 3.4vw, 52px);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-padding-block: 18px 82px; }
body { margin: 0; background: var(--page); color: var(--ink); line-height: 1.56; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { opacity: .52; cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.24; letter-spacing: -.026em; }
h1 { font-size: clamp(1.85rem, 3.4vw, 2.65rem); }
h2 { font-size: 1.23rem; }
h3 { font-size: 1.08rem; }
ul { margin: .65rem 0 0; padding-left: 1.3rem; }
small { font-size: .84rem; }
svg { display: block; flex: none; }
#main:focus { outline: none; }
.skip-link { position: fixed; z-index: 12; top: 0; left: .6rem; transform: translateY(-120%); padding: .75rem; background: var(--surface-raised); }
.skip-link:focus { transform: translateY(.65rem); }

.shell { display: grid; grid-template-columns: var(--side-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; height: 100dvh; position: sticky; top: 0; background: var(--sidebar); border-right: 1px solid var(--line); padding: 26px 16px 20px; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 0 44px; padding: 0 8px; width: fit-content; }
.brand-mark { width: 40px; height: 40px; flex: none; display: grid; grid-auto-flow: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid #2e61d1; border-radius: 12px; background: linear-gradient(148deg, #4686e6, #234bb6 76%); box-shadow: inset 0 1px #eaf5ff55, 0 4px 12px #2459cf30; }
.brand-mark i { width: 3px; height: 15px; border-radius: 4px; background: #eff9ff; transform: translateY(0) rotate(28deg); }
.brand-mark i:nth-child(1) { height: 9px; transform: translateY(4px) rotate(28deg); }
.brand-mark i:nth-child(3) { height: 21px; transform: translateY(-4px) rotate(28deg); }
.brand-text { font-weight: 800; font-size: 1.35rem; line-height: 1.08; letter-spacing: -.045em; }
.brand-text > span { color: var(--accent); }
.brand-text small { display: block; margin-top: 4px; color: var(--muted); font-weight: 550; letter-spacing: 0; }
.navigation { display: grid; gap: 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 47px; padding: 8px 11px; color: var(--muted); border: 1px solid transparent; border-radius: 10px; font-size: .91rem; font-weight: 650; transition: background .18s, color .18s, border-color .18s; }
.nav-item:hover { color: var(--ink); background: var(--surface-raised); }
.nav-item[aria-current="page"] { color: var(--accent); background: var(--accent-soft); border-color: #cbdcfe; }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -1px; height: 19px; width: 3px; border-radius: 3px; background: var(--button); }
.nav-compact { display: none; }
.page { min-width: 0; }
.topbar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px var(--gutter); background: var(--sidebar); border-bottom: 1px solid var(--line); }
#breadcrumb { color: var(--muted); font-weight: 650; font-size: .9rem; }
.account { display: flex; align-items: center; gap: 9px; max-width: 50%; padding: 4px 12px 4px 5px; min-height: 41px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--text); font-size: .88rem; font-weight: 650; }
.account:hover { border-color: var(--accent); color: var(--ink); }
.account span:last-child { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.avatar { flex: none; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
main { max-width: 1480px; margin: 0 auto; padding: 30px var(--gutter) 54px; }
.stack { display: grid; gap: 20px; min-width: 0; }
.tight { display: grid; gap: 11px; min-width: 0; }
.muted, .subtle { color: var(--muted); }
.subtle { font-size: .92rem; }
.heading { display: grid; gap: 6px; margin-bottom: 24px; max-width: 840px; min-width: 0; overflow-wrap: anywhere; }
.heading p { color: var(--muted); }
.stack > .heading, .heading-row .heading { margin-bottom: 0; }
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; font-size: .94rem; text-align: center; line-height: 1.35; transition: background .18s, border-color .18s, color .18s; }
.primary, .button.light { color: var(--button-text); background: var(--button); border-color: var(--button); }
.primary:hover, .button.light:hover { background: var(--button-hover); }
.secondary { color: var(--accent); background: var(--surface); border-color: var(--control-border); }
.secondary:hover { background: var(--accent-soft); border-color: var(--accent); }
.ghost { color: var(--muted); background: transparent; }
.ghost:hover { background: var(--accent-soft); color: var(--ink); }

.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: 286px; overflow: hidden; border: 1px solid #d4e2f8; border-radius: 23px; background: linear-gradient(112deg, #ffffff 4%, #f4f8ff 54%, #eaf2ff); box-shadow: var(--shadow); }
.hero-body { position: relative; z-index: 1; display: grid; gap: 13px; justify-items: start; width: min(59%, 600px); padding: clamp(24px, 4.3vw, 52px); }
.hero h2 { max-width: 15ch; font-size: clamp(2rem, 4.1vw, 3.65rem); line-height: 1.13; letter-spacing: -.048em; text-wrap: balance; }
.hero-body p { max-width: 43ch; color: var(--muted); }
.hero-body .actions { margin-top: 4px; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: 57%; pointer-events: none; background: url("./hero-learning-light.webp") center 51% / cover no-repeat; mask-image: linear-gradient(90deg, transparent, #000 30%); mix-blend-mode: multiply; }
.card, .stat { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: clamp(16px, 2.35vw, 25px); align-content: start; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 15px 18px 16px; }
.stat-label { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin-bottom: 9px; }
.stat strong { display: block; font-size: clamp(1.75rem, 3.2vw, 2.45rem); line-height: 1.1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: .88rem; font-weight: 650; }
.icon-tile { width: 37px; height: 37px; flex: none; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid #cbdcfe; border-radius: 9px; }
.stat-book .icon-tile { color: #5e43ab; background: #f1eaff; border-color: #e0d5fb; }
.stat-check .icon-tile, .stat-chart .icon-tile { color: var(--success); background: var(--success-soft); border-color: #cce8dc; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dashboard-columns { grid-template-columns: minmax(0, .9fr) minmax(0, 1.15fr); align-items: stretch; }
.profile-columns { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); }
.section-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.section-head .subtle { margin-top: 4px; }
hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.journey { display: grid; gap: 8px; }
.journey-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 13px; padding: 11px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--field); }
.journey-row:hover { border-color: var(--control-border); background: var(--surface-raised); }
.journey-row strong { font-size: .98rem; }
.journey-row p { color: var(--muted); font-size: .89rem; }
.pill { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; padding: 4px 9px; border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-size: .84rem; font-weight: 700; line-height: 1.4; }
.pill.success { color: var(--success); background: var(--success-soft); }
.pill.warning { color: var(--warn); background: var(--warn-soft); }
.pill.neutral { color: var(--muted); background: var(--surface-raised); }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; }
.industry-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.industry-option { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px 9px; min-height: 46px; min-width: 0; padding: 7px 10px; border: 1px solid #a7bfed; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: .9rem; font-weight: 700; text-align: left; }
.industry-option:enabled { grid-column: 1/-1; }
.industry-option:enabled:hover { border-color: var(--accent); background: #dceaff; }
.industry-option:disabled { opacity: 1; border-color: var(--line); background: var(--field); color: var(--text); font-weight: 550; }
.industry-status { flex: none; padding: 2px 6px; border-radius: 5px; background: var(--success-soft); color: var(--success); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.industry-option:disabled .industry-status { background: var(--surface-raised); color: var(--muted); }

.form { display: grid; gap: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; align-content: start; gap: 7px; min-width: 0; font-weight: 650; color: var(--text); }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 46px; padding: 8px 11px; color: var(--ink); background: var(--surface); border: 1px solid var(--control-border); border-radius: 9px; font-weight: 500; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
.field select:disabled { opacity: .68; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 96px; }
.whole { grid-column: 1/-1; }
.fieldset { min-width: 0; margin: 0; padding: 10px 14px 14px; border: 1px solid var(--line); border-radius: 11px; }
.fieldset legend { padding: 0 5px; font-weight: 700; }
.check-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.check-line { display: flex; align-items: flex-start; gap: 7px; color: var(--text); font-size: .9rem; }
.check-line input, .option input { accent-color: var(--button); }
.notice { padding: 11px 13px; border: 1px solid #c4d7fa; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: .92rem; }
.notice.error { background: #fff0f2; color: #992f42; border-color: #edbcc6; }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 2.9fr) minmax(215px, 1fr); gap: 18px; align-items: start; }
.question-card { min-height: 430px; }
.question-card .section-head { align-items: center; }
.question-card .section-head strong { flex: none; color: var(--accent); font-variant-numeric: tabular-nums; }
.quiz-panel { position: sticky; top: 18px; }
.callout { padding: 14px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.question-context { padding: 14px 16px; border-inline-start: 3px solid #4a78d6; }
.option-list { display: grid; gap: 8px; margin: 2px 0; padding: 0; border: 0; min-width: 0; }
.option-list legend { padding: 0 0 8px; }
.option { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--text); background: var(--field); transition: border-color .18s, background .18s; }
.option:hover { border-color: var(--control-border); }
.option:has(input:checked) { background: var(--accent-soft); border-color: var(--focus); }
.option input { margin: 6px 0 0; flex: none; }
.option:has(.option-key) input { order: 2; margin-inline-start: auto; }
.option-key { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--surface-raised); border: 1px solid var(--line); color: var(--muted); font-size: .83rem; font-weight: 750; }
.option:has(input:checked) .option-key { background: var(--button); border-color: var(--button); color: var(--button-text); }
.progress-bar { height: 8px; border-radius: 999px; background: #e0e9f7; overflow: hidden; }
.progress-bar > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2459cf, #157d9c); transition: width .25s ease; }
.quiz-controls { justify-content: space-between; }
.question-tray { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.question-tray button { min-height: 35px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--muted); font-size: .88rem; font-weight: 700; }
.question-tray button:hover { border-color: var(--accent); }
.question-tray button.done { color: var(--success); background: var(--success-soft); }
.question-tray button[aria-current="step"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--ink); }

table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: 12px 11px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .88rem; white-space: nowrap; background: var(--field); }
tbody tr:last-child td { border-bottom: 0; }
td { font-size: .94rem; }
td a:hover { color: var(--accent); text-decoration: underline; }
.table-scroll { overflow: auto; overscroll-behavior-inline: contain; }
.result-list { display: grid; gap: 10px; }
details.card { padding: 0; }
details.card > summary { padding: 14px 17px; cursor: pointer; font-weight: 700; }
.result-group > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; list-style: none; }
.result-group > summary::-webkit-details-marker { display: none; }
.result-group > summary::before { content: ""; width: 7px; height: 7px; margin-right: 4px; flex: none; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.result-group[open] > summary::before { transform: rotate(45deg); }
.result-group > summary > .pill { margin-left: auto; }
.result-group > summary:hover { color: var(--accent); }
details.card > div { padding: 0 16px 12px; }
.skill-note { display: block; margin-top: 3px; max-width: 58ch; }
.skill-score { min-width: 108px; font-weight: 700; font-variant-numeric: tabular-nums; }
.skill-score .progress-bar { height: 4px; margin-top: 6px; }
.course-list { display: grid; gap: 13px; }
.course-row { display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; align-items: start; gap: 14px; }
.course-row .button { align-self: center; }
.empty { min-height: 220px; display: grid; align-content: center; justify-items: start; gap: 10px; }
.empty .button { margin-top: 5px; }
.lesson-text { color: var(--text); max-width: 78ch; }
.impact-comparison { border: 1px solid var(--line); padding: 14px; border-radius: 10px; }
.impact-comparison .progress-bar { margin-top: 6px; }
.impact-comparison > :first-child .progress-bar > div { background: #4c6bb3; }
.impact-comparison > :last-child .progress-bar > div { background: linear-gradient(90deg, #157d9c, #08796a); }
dialog { width: min(calc(100% - 28px), 535px); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 72px #10213c45; }
dialog::backdrop { background: #10213c75; }
.dialog-body { padding: 22px; }
.toast { position: fixed; z-index: 8; bottom: 22px; right: max(14px, env(safe-area-inset-right)); max-width: min(470px, calc(100% - 28px)); padding: 12px 15px; background: var(--surface); color: var(--ink); border: 1px solid #a7bfed; border-radius: 12px; box-shadow: 0 15px 32px #183a6a28; }
.noscript { padding: 1rem; }

@media (max-width: 1010px) {
  :root { --side-width: 192px; --gutter: 24px; }
  .sidebar { padding-inline: 11px; }
  .hero-body { width: 63%; }
  .hero-art { width: 55%; }
  .profile-columns, .quiz-layout { grid-template-columns: minmax(0, 1fr); }
  .quiz-panel { position: static; }
}

@media (max-width: 780px) {
  :root { --gutter: 16px; }
  .shell { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
  .sidebar, .page { display: contents; }
  .brand { grid-area: 1 / 1; width: 100%; height: 64px; margin: 0; padding: 0 0 0 var(--gutter); border-bottom: 1px solid var(--line); background: var(--sidebar); }
  .brand-mark { width: 34px; height: 34px; }
  .brand-text { font-size: 1.16rem; }
  .brand-text small { font-size: .78rem; }
  .topbar { grid-area: 1 / 2; height: 64px; min-height: 0; justify-content: end; }
  #breadcrumb { display: none; }
  .account { max-width: 150px; }
  main { grid-area: 2 / 1 / 3 / 3; width: 100%; padding-block: 24px calc(95px + env(safe-area-inset-bottom)); }
  .navigation { position: fixed; z-index: 6; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 6px 5px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--sidebar); }
  .nav-item { flex-direction: column; justify-content: center; gap: 4px; min-width: 0; min-height: 55px; padding: 4px 2px; font-size: .76rem; text-align: center; line-height: 1.2; }
  .nav-item svg { width: 18px; height: 18px; }
  .nav-item[aria-current="page"]::before { display: none; }
  .nav-item:has(.nav-compact) .nav-label { display: none; }
  .nav-compact { display: inline; }
  .toast { bottom: calc(85px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .overview { gap: 16px; }
  .hero { min-height: 0; }
  .hero-body { width: 100%; padding: 23px 20px; }
  .hero h2 { max-width: 13ch; font-size: clamp(1.95rem, 8.5vw, 2.65rem); }
  .hero-body p { max-width: 32ch; }
  .hero-art { width: 66%; opacity: .34; mask-image: linear-gradient(90deg, transparent, #000 68%); }
  .stats { gap: 6px; }
  .stat { border-radius: 12px; padding: 10px 8px; }
  .stat-label { align-items: flex-start; min-height: 33px; margin-bottom: 4px; }
  .stat small { font-size: .81rem; line-height: 1.28; }
  .stat .icon-tile { display: none; }
  .form-grid, .check-group { grid-template-columns: minmax(0, 1fr); }
  .quiz-panel h2, .quiz-panel small { display: none; }
  .quiz-panel .question-tray { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .question-card { min-height: 0; }
  .course-row { grid-template-columns: 34px minmax(0, 1fr); gap: 11px; }
  .course-row .button { grid-column: 2; justify-self: start; }
  .course-row .icon-tile { width: 34px; height: 34px; }
  .result-group > summary > .pill { margin-left: 0; }
}

@media (max-width: 360px) {
  .brand { gap: 8px; }
  .brand-text small { font-size: .72rem; white-space: nowrap; }
  .account { max-width: 116px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
