:root {
  --sidebar-width: 248px;
  --topbar-height: 76px;
  --ink: #152238;
  --muted: #637084;
  --paper: #f8f6f1;
  --surface: #fffdfa;
  --surface-soft: #f0eee8;
  --line: #e7e3db;
  --lime: #d8ff65;
  --teal: #159d90;
  --coral: #f96b56;
  --blue: #6176f3;
  --yellow: #ffc965;
  --shadow: 0 18px 42px rgba(31, 43, 60, 0.09);
  --font: 'Noto Sans SC', 'Manrope', sans-serif;
  --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-height) + 16px); }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.58; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(21, 157, 144, 0.35); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
.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; }
.ambient { position: fixed; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(70px); opacity: .42; }
.ambient-one { width: 360px; height: 360px; top: -135px; right: 6%; background: #c8f0e5; }
.ambient-two { width: 280px; height: 280px; bottom: -80px; left: 18%; background: #fde3ae; }

.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 248px; padding: 28px 19px 19px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: rgba(255, 253, 250, .86); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 12px; margin: 4px 9px 48px; font-family: Manrope, sans-serif; font-size: 13px; line-height: .86; letter-spacing: 1.2px; text-transform: uppercase; }
.brand strong { font-size: 18px; letter-spacing: -.5px; }
.brand-mark { width: 29px; height: 32px; display: flex; align-items: flex-end; gap: 3px; }
.brand-mark i { display: block; width: 7px; border-radius: 3px; background: var(--ink); }
.brand-mark i:nth-child(1) { height: 12px; }
.brand-mark i:nth-child(2) { height: 23px; background: var(--teal); }
.brand-mark i:nth-child(3) { height: 31px; background: var(--coral); }
.main-nav { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #5c6879; font-size: 13px; font-weight: 700; transition: background .18s, color .18s, transform .18s; }
.nav-link > span { width: 18px; text-align: center; font-size: 18px; font-weight: 400; }
.nav-link b { margin-left: auto; padding: 2px 5px; border-radius: 4px; color: #4b6827; background: #e6f6d0; font: 500 9px var(--mono); }
.nav-link:hover, .nav-link.active { color: var(--ink); background: #e9e7e1; transform: translateX(2px); }
.sidebar-bottom { margin-top: auto; }
.streak-card { display: flex; justify-content: space-between; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaf6; }
.eyebrow { margin: 0; color: #727d8c; font: 500 10px var(--mono); letter-spacing: 1.2px; text-transform: uppercase; }
.streak-card strong { display: block; margin-top: 2px; font: 800 24px Manrope, sans-serif; }
.streak-card em { color: var(--muted); font: 500 10px var(--mono); font-style: normal; }
.flame { align-self: center; color: var(--coral); font-size: 22px; }
.theme-button { padding: 13px 10px 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.theme-button span { font-size: 15px; }

main { margin-left: var(--sidebar-width); padding-top: var(--topbar-height); }
.topbar { position: fixed; z-index: 15; top: 0; right: 0; left: var(--sidebar-width); height: var(--topbar-height); display: flex; align-items: center; justify-content: space-between; padding: 0 46px; border-bottom: 1px solid var(--line); background: var(--paper); }
.crumb { color: #778191; font: 500 10px var(--mono); letter-spacing: 1px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(21, 157, 144, .11); }
.top-actions { display: flex; align-items: center; gap: 13px; }
.icon-button { border: 0; background: transparent; color: var(--ink); font-size: 27px; line-height: 1; }
.avatar { width: 33px; height: 33px; border: 0; border-radius: 50%; color: var(--lime); background: var(--ink); font-weight: 800; }
.menu-button { display: none; }

.view { display: none; max-width: 1440px; min-height: calc(100vh - var(--topbar-height)); margin: 0 auto; padding: 56px 46px 76px; }
.view.active { display: block; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 44px; align-items: center; min-height: 446px; }
.hero-copy h1, .page-intro h1 { margin: 15px 0 16px; font-size: clamp(38px, 4.75vw, 68px); font-weight: 800; letter-spacing: -3.4px; line-height: 1.08; }
.hero-copy h1 span, .focus-card h2 span { color: var(--teal); }
.pulse { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(249, 107, 86, .12); }
.hero-text { max-width: 550px; margin: 0; color: var(--muted); font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 28px; }
.primary-button { padding: 12px 16px; border: 0; border-radius: 8px; color: #fff; background: var(--ink); box-shadow: 0 7px 12px rgba(21, 34, 56, .12); font-size: 14px; font-weight: 700; transition: transform .18s, box-shadow .18s; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 10px 18px rgba(21, 34, 56, .17); }
.primary-button span { margin-left: 13px; color: var(--lime); font-size: 19px; line-height: 0; }
.text-button, .link-button, .text-link-button { border: 0; color: var(--ink); background: transparent; font-size: 13px; font-weight: 800; }
.text-button:hover, .link-button:hover, .text-link-button:hover { color: var(--teal); }
.hero-meta { display: flex; gap: 31px; margin-top: 43px; }
.hero-meta div { display: grid; gap: 1px; }
.hero-meta strong { font: 800 20px Manrope, sans-serif; }
.hero-meta span { color: var(--muted); font-size: 11px; }
.hero-visual { min-height: 390px; padding: 22px 23px 16px; overflow: hidden; border-radius: 21px; color: #fff; background: #17283e; box-shadow: var(--shadow); }
.visual-kicker, .visual-foot { display: flex; justify-content: space-between; gap: 10px; color: #bdc8d6; font: 500 10px var(--mono); letter-spacing: 1px; }
.visual-kicker span { color: var(--lime); }
.growth-flow { position: relative; display: grid; grid-template-columns: 1fr 23px 1fr 23px 1fr 23px 1fr; align-items: center; min-height: 232px; padding: 18px 4px; }
.growth-flow:before { position: absolute; inset: 16px 0; border: 1px dashed rgba(255,255,255,.16); border-radius: 18px; content: ''; }
.flow-node { position: relative; z-index: 1; min-height: 84px; display: grid; align-content: center; gap: 4px; padding: 10px 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: #263b56; text-align: center; }
.flow-node:nth-of-type(3) { background: rgba(21,157,144,.28); }
.flow-node b { color: var(--lime); font: 500 10px var(--mono); }
.flow-node span { font-size: 12px; font-weight: 800; }
.growth-flow i { position: relative; z-index: 1; display: block; height: 1px; background: rgba(216,255,101,.55); }
.growth-flow i:after { float: right; margin-top: -4px; color: var(--lime); content: '›'; font-size: 13px; }
.signal-map { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 0 0 25px; }
.signal-map span { padding: 5px 8px; border-radius: 99px; color: #d7e0e9; border: 1px solid rgba(255,255,255,.13); font-size: 10px; }
.visual-foot { padding-top: 11px; border-top: 1px solid rgba(255,255,255,.11); }
.mono { font-family: var(--mono); }

.dashboard-section, .lab-section { margin-top: 58px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-heading h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.8px; }
.link-button { color: var(--teal); }
.start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.start-card { position: relative; min-height: 190px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: rgba(255,253,250,.82); text-align: left; transition: transform .18s, box-shadow .18s, border-color .18s; }
.start-card:hover { transform: translateY(-3px); border-color: #b8cec8; box-shadow: var(--shadow); }
.start-card .step { color: var(--teal); font: 500 10px var(--mono); }
.start-card h3 { margin: 20px 0 6px; font-size: 17px; line-height: 1.3; }
.start-card p { margin: 0; color: var(--muted); font-size: 12px; }
.start-card .card-arrow { position: absolute; right: 16px; bottom: 14px; color: var(--teal); font-size: 20px; }
.home-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.signal-card, .focus-card { min-height: 265px; padding: 24px; border-radius: 15px; }
.signal-card { border: 1px solid var(--line); background: rgba(255,253,250,.82); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-top h2 { margin: 3px 0; font-size: 20px; }
.status-chip { padding: 5px 7px; border-radius: 4px; color: #527730; background: #e5f5d9; font: 500 10px var(--mono); white-space: nowrap; }
.featured-brief { margin: 15px 0 17px; }
.featured-brief h3 { margin: 3px 0; font-size: 16px; }
.featured-brief p { margin: 3px 0; color: var(--muted); font-size: 12px; }
.brief-meta { color: #7b8490; font: 500 10px var(--mono); }
.radar-perspective { display: grid; gap: 6px; }
.radar-perspective > span { color: var(--teal); font: 600 9px var(--mono); letter-spacing: .7px; text-transform: uppercase; }
.underlined { padding: 0 0 2px; border: 0; border-bottom: 1px solid var(--ink); color: var(--ink); background: transparent; font-size: 12px; font-weight: 800; }
.focus-card { position: relative; overflow: hidden; color: #fff; background: var(--coral); }
.focus-card:after { position: absolute; right: -24px; bottom: -56px; color: rgba(255,255,255,.12); content: '✣'; font-size: 150px; }
.focus-header { display: flex; justify-content: space-between; font: 500 10px var(--mono); letter-spacing: .8px; }
.focus-header .eyebrow { color: #fff; }
.focus-card h2 { position: relative; z-index: 1; margin: 25px 0 8px; font-size: 25px; line-height: 1.2; letter-spacing: -1px; }
.focus-card h2 span { color: var(--ink); }
.focus-card p { position: relative; z-index: 1; max-width: 350px; font-size: 12px; opacity: .92; }
.mini-outline { position: relative; z-index: 1; padding: 7px 10px; border: 1px solid #fff; border-radius: 5px; color: #fff; background: transparent; font-size: 11px; font-weight: 800; }
.home-resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.mini-resource { padding: 17px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: rgba(255,253,250,.75); text-align: left; transition: transform .18s, box-shadow .18s; }
.mini-resource:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mini-resource span { color: var(--teal); font: 500 10px var(--mono); }
.mini-resource h3 { margin: 12px 0 5px; font-size: 15px; line-height: 1.3; }
.mini-resource p { margin: 0; color: var(--muted); font-size: 11px; }

.page-intro { max-width: 820px; margin-bottom: 34px; }
.page-intro h1 { margin-bottom: 13px; }
.page-intro > p:last-child { max-width: 720px; color: var(--muted); font-size: 15px; }
.course-summary { display: grid; grid-template-columns: minmax(200px,.8fr) 1.6fr; gap: 20px; align-items: center; margin-bottom: 22px; padding: 18px 20px; border: 1px solid #d8e4dc; border-radius: 13px; background: #e5f5ed; }
.course-summary strong { display: block; font: 800 20px Manrope, sans-serif; }
.course-summary p { margin: 2px 0 0; color: #41655d; font-size: 12px; }
.summary-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.summary-tags span { padding: 5px 8px; border-radius: 99px; color: #286d62; border: 1px solid #c3ddd4; background: rgba(255,255,255,.55); font-size: 11px; font-weight: 700; }
.path-rail { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 38px; }
.module-chip { min-height: 76px; padding: 10px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); background: #eeece6; text-align: left; transition: .18s; }
.module-chip:hover, .module-chip.active { transform: translateY(-2px); color: #fff; border-color: var(--ink); background: var(--ink); }
.module-chip.active .module-index, .module-chip:hover .module-index { color: var(--lime); }
.module-index { display: block; color: var(--teal); font: 500 10px var(--mono); }
.module-chip strong { display: block; margin-top: 5px; font-size: 12px; line-height: 1.28; }
.lesson-layout { display: grid; grid-template-columns: minmax(330px, .92fr) minmax(440px, 1.18fr); gap: 28px; align-items: start; }
.lesson-list-wrap { min-width: 0; }
.lesson-list-wrap .section-heading.compact { display: block; }
.lesson-list-wrap .module-count { display: block; max-width: 62ch; margin-top: 6px; white-space: normal; }
.compact { margin-bottom: 12px; }
.module-count { color: var(--muted); font: 500 10px var(--mono); white-space: nowrap; }
.lesson-list { display: grid; gap: 7px; }
.lesson-item { display: flex; gap: 11px; align-items: center; width: 100%; padding: 11px; border: 1px solid transparent; border-radius: 8px; color: var(--ink); background: transparent; text-align: left; transition: .16s; }
.lesson-item:hover, .lesson-item.active { border-color: #e2ded6; background: #ece9e2; }
.lesson-item .lesson-num { color: var(--teal); font: 500 10px var(--mono); }
.lesson-item strong { display: block; font-size: 13px; }
.lesson-item small { color: var(--muted); font-size: 10px; }
.lesson-item .done-mark { margin-left: auto; color: var(--teal); font-size: 14px; }
.lesson-preview { min-height: 390px; overflow: hidden; border-radius: 15px; color: #fff; background: #17283e; box-shadow: var(--shadow); }
.preview-top { display: flex; min-height: 145px; align-items: end; justify-content: space-between; padding: 24px; color: var(--ink); background: var(--lime); }
.preview-number { font: 800 76px Manrope, sans-serif; letter-spacing: -7px; line-height: .8; }
.preview-label { max-width: 170px; font: 800 12px Manrope, sans-serif; letter-spacing: .8px; line-height: 1.3; text-align: right; }
.preview-body { padding: 25px; }
.tag { display: inline-block; padding: 3px 7px; border-radius: 4px; color: #16796f; background: #d9f5ed; font-size: 10px; font-weight: 800; }
.tag.coral { color: #bd5040; background: #ffe1dc; }
.preview-body h2 { margin: 11px 0; font-size: 24px; line-height: 1.24; letter-spacing: -1px; }
.preview-body p { color: #c9d4df; font-size: 12px; }
.preview-body ul { padding: 0; list-style: none; font-size: 12px; line-height: 2; }
.preview-body li:before { margin-right: 8px; color: var(--lime); content: '↗'; }

.resource-intro { max-width: 870px; }
.resource-controls, .radar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: #fbfaf6; font-size: 11px; font-weight: 700; transition: .16s; }
.filter:hover { border-color: #a8c7be; color: var(--teal); }
.filter.active { color: #fff; border-color: var(--ink); background: var(--ink); }
.filter-count { display: inline-grid; min-width: 16px; height: 16px; place-items: center; padding: 0 3px; border-radius: 99px; color: currentColor; background: rgba(21, 34, 56, .08); font: 500 9px var(--mono); }
.filter.active .filter-count { background: rgba(255, 255, 255, .18); }
.inline-search { display: flex; align-items: center; gap: 7px; min-width: min(100%, 310px); padding: 4px 0; border-bottom: 1px solid var(--ink); }
.inline-search span { font-size: 18px; }
.inline-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.resource-roadmap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 25px 0 17px; }
.roadmap-stage { padding: 11px; border-radius: 9px; color: #42645d; background: #e5f5ed; font-size: 11px; font-weight: 700; }
.roadmap-stage b { display: block; margin-bottom: 2px; color: var(--teal); font: 500 10px var(--mono); }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.resource-card { min-height: 245px; display: flex; flex-direction: column; align-items: stretch; padding: 18px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: rgba(255,253,250,.82); text-align: left; transition: transform .18s, box-shadow .18s, border-color .18s; }
.resource-card:hover { transform: translateY(-3px); border-color: #a8c7be; box-shadow: var(--shadow); }
.resource-card .resource-meta { display: flex; flex-wrap: wrap; gap: 5px; color: #5a6e88; font: 500 9px var(--mono); }
.resource-card .resource-meta span { padding: 3px 5px; border-radius: 3px; background: #edf1ef; }
.resource-card h3 { margin: 20px 0 8px; font-size: 17px; line-height: 1.32; }
.resource-card p { margin: 0; color: var(--muted); font-size: 12px; }
.resource-card footer { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 15px; color: var(--teal); font-size: 11px; font-weight: 800; }
.resource-card footer small { color: var(--muted); font-size: 10px; font-weight: 500; }

.sync-text { color: var(--muted); font: 500 10px var(--mono); }
.radar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.radar-card { min-height: 225px; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: rgba(255,253,250,.82); transition: transform .18s, box-shadow .18s; }
.radar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.radar-card.featured { grid-column: span 2; color: #fff; border-color: #17283e; background: #17283e; }
.radar-card .card-meta { display: flex; justify-content: space-between; gap: 7px; color: #7d8793; font: 500 10px var(--mono); }
.radar-card.featured .card-meta { color: #b9c6d5; }
.radar-card h3 { margin: 20px 0 8px; font-size: 18px; line-height: 1.3; letter-spacing: -.5px; }
.radar-card p { margin: 0; color: var(--muted); font-size: 12px; }
.radar-card.featured p { color: #d0dbe7; }
.radar-card.featured .radar-perspective > span { color: var(--lime); }
.radar-card footer { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 16px; color: var(--teal); font-size: 11px; font-weight: 800; }
.radar-card.featured footer { color: var(--lime); }
.radar-empty { grid-column: 1 / -1; padding: 24px; border: 1px dashed #bcc7c1; border-radius: 12px; background: #f1f6f1; }
.radar-empty h3 { margin: 0 0 5px; font-size: 17px; }
.radar-empty p { margin: 0; color: var(--muted); font-size: 12px; }
.radar-empty button { margin-top: 12px; border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 800; }
.radar-archive { margin-top: 32px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,253,250,.72); }
.archive-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.archive-heading h2 { margin: 3px 0 0; font-size: 19px; }
.archive-heading > p { max-width: 510px; margin: 0; color: var(--muted); font-size: 12px; }
.archive-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.archive-date { min-width: 104px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fffdfa; font: 600 11px var(--mono); text-align: left; transition: .16s; }
.archive-date:hover { border-color: #8eb7ad; color: var(--teal); }
.archive-date.active { color: #fff; border-color: var(--ink); background: var(--ink); }
.archive-date small { display: block; margin-top: 3px; color: var(--muted); font: 500 9px var(--mono); }
.archive-date.active small { color: #c4d0df; }
.archive-empty { margin: 0; color: var(--muted); font-size: 12px; }
.source-rail { display: grid; grid-template-columns: .55fr 1fr auto; gap: 28px; align-items: center; margin-top: 35px; padding: 21px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.source-rail h2 { margin: 3px 0; font-size: 18px; }
.source-rail p { margin: 0; color: var(--muted); font-size: 12px; }
.source-rail a { color: var(--teal); font-size: 12px; font-weight: 800; text-decoration: underline; }

.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calculator, .results-card { padding: 23px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,253,250,.82); }
.calculator label { display: block; margin-top: 14px; font-size: 11px; font-weight: 800; }
.calculator label span { float: right; color: var(--muted); font: 500 10px var(--mono); }
.calculator input { width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid #d9d5cd; outline: 0; color: var(--ink); background: transparent; font: 600 20px Manrope, sans-serif; }
.full { width: 100%; margin-top: 22px; }
.calculator-icon { color: var(--teal); font-size: 24px; }
.results-card { border-color: #cbe5dc; background: #e5f5ed; }
.metric-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 30px 0; }
.metric-stack div { padding-right: 7px; border-right: 1px solid #bad9ce; }
.metric-stack div:last-child { border: 0; }
.metric-stack span, .metric-stack small { display: block; color: #56746b; font-size: 10px; }
.metric-stack strong { display: block; margin: 3px 0; font: 800 21px Manrope, sans-serif; }
.insight { padding: 11px; border-radius: 7px; color: #4c665f; background: #fffdf9; font-size: 11px; }
.text-link-button { margin-top: 14px; padding: 0; color: var(--teal); font-size: 12px; }
.diagnosis-grid, .skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.diagnosis-card, .skill-card { min-height: 200px; display: flex; flex-direction: column; align-items: stretch; padding: 18px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: rgba(255,253,250,.84); text-align: left; transition: transform .18s, box-shadow .18s; }
.diagnosis-card:hover, .skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.diagnosis-card .badge, .skill-card .badge { color: var(--blue); font: 500 10px var(--mono); }
.diagnosis-card h3, .skill-card h3 { margin: 15px 0 6px; font-size: 17px; line-height: 1.3; }
.diagnosis-card p, .skill-card p { margin: 0; color: var(--muted); font-size: 12px; }
.diagnosis-card footer, .skill-card footer { margin-top: auto; padding-top: 12px; color: var(--teal); font-size: 11px; font-weight: 800; }
.skill-card { min-height: 182px; border-color: #d4e7e0; background: #f0f8f4; }
.skill-card .badge { color: #2b766a; }

.glossary-search { display: flex; align-items: center; gap: 10px; max-width: 600px; margin: 15px 0 30px; padding: 5px 0; border-bottom: 1px solid var(--ink); }
.glossary-search span { font-size: 22px; }
.glossary-search input { width: 100%; padding: 8px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; }
.glossary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.term-card { min-height: 158px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: rgba(255,253,250,.78); text-align: left; transition: transform .18s, box-shadow .18s, border-color .18s; }
.term-card:hover { transform: translateY(-2px); border-color: #a8c7be; box-shadow: var(--shadow); }
.term-card strong { font: 800 18px Manrope, sans-serif; }
.term-card .term-type { display: block; margin: 3px 0 15px; color: var(--teal); font: 500 9px var(--mono); }
.term-card p { margin: 0; color: var(--muted); font-size: 11px; }
.term-action { display: block; margin-top: 14px; color: var(--teal); font-size: 11px; font-weight: 800; }

.progress-dashboard { display: grid; grid-template-columns: .82fr 1.18fr; gap: 18px; }
.progress-overview, .progress-modules { padding: 23px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,253,250,.8); }
.progress-overview strong { display: block; margin: 8px 0; font: 800 58px Manrope, sans-serif; letter-spacing: -4px; }
.progress-overview strong small { color: var(--muted); font: 600 17px var(--mono); letter-spacing: 0; }
.progress-bar { height: 9px; overflow: hidden; border-radius: 99px; background: #e6e4de; }
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .25s; }
.progress-overview p { color: var(--muted); font-size: 12px; }
.reset-button { margin-top: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--coral); background: transparent; font-size: 11px; font-weight: 800; }
.progress-modules h2 { margin-top: 0; font-size: 19px; }
.progress-module-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.progress-module-row:last-child { border-bottom: 0; }
.progress-module-row .progress-index { color: var(--teal); font: 500 10px var(--mono); }
.progress-module-row strong { flex: 1; font-size: 12px; }
.progress-module-row span { color: var(--muted); font: 500 10px var(--mono); }

.modal-backdrop, .search-overlay { position: fixed; z-index: 50; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(13,20,33,.58); backdrop-filter: blur(4px); }
.modal-backdrop.open, .search-overlay.open { display: flex; }
.lesson-modal, .search-panel { position: relative; width: min(870px, 100%); max-height: 89vh; border-radius: 17px; color: var(--ink); background: #fffdfa; box-shadow: 0 20px 80px rgba(0,0,0,.24); }
.lesson-modal { display: flex; flex-direction: column; overflow: hidden; }
.modal-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; min-height: 58px; padding: 8px 16px 0 20px; border-bottom: 1px solid var(--line); background: inherit; }
.modal-scroll { flex: 1 1 auto; min-height: 0; max-height: calc(89vh - 58px); overflow-y: auto; overscroll-behavior: contain; padding: 20px 30px 34px; scrollbar-gutter: stable; }
.modal-scroll:focus-visible { outline: 3px solid rgba(21, 157, 144, .45); outline-offset: -3px; }
.close-modal, .close-search { z-index: 3; border: 0; color: var(--ink); background: transparent; font-size: 29px; line-height: 1; }
.close-modal { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 8px; }
.close-modal:hover { color: var(--teal); background: #edf5f0; }
.close-search { position: absolute; top: 10px; right: 14px; }
.modal-hero { margin: 0 0 24px; padding: 21px; border-radius: 11px; color: #fff; background: var(--ink); }
.modal-hero .eyebrow { color: #b7c6d6; }
.modal-hero h1, .modal-hero h2 { margin: 9px 0; font-size: clamp(25px,3vw,34px); line-height: 1.2; letter-spacing: -1px; }
.modal-hero p { margin: 0; color: #d4dee9; font-size: 13px; }
.lesson-navigation { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.lesson-navigation a { padding: 5px 8px; border-radius: 99px; color: #48625e; background: #edf5f0; font-size: 10px; font-weight: 800; }
.lesson-block { margin: 20px 0; scroll-margin-top: 16px; }
.lesson-block h3 { margin: 0 0 8px; font-size: 18px; }
.lesson-block p { margin: 0; color: #536074; font-size: 13px; }
.framework-list, .steps-list, .mistake-list, .checklist { display: grid; gap: 8px; padding: 0; list-style: none; }
.framework-list li, .steps-list li { padding: 11px 12px; border-radius: 8px; color: #4e625d; background: #eef6f1; font-size: 12px; }
.framework-list li:before { margin-right: 7px; color: var(--teal); content: '◆'; }
.steps-list { counter-reset: steps; }
.steps-list li { color: var(--ink); background: #f0efe9; }
.steps-list li:before { display: inline-grid; width: 19px; height: 19px; margin-right: 8px; border-radius: 50%; color: var(--teal); background: #fff; content: counter(steps); counter-increment: steps; place-items: center; font: 500 10px var(--mono); }
.case-block { padding: 16px; border-left: 4px solid var(--coral); border-radius: 0 9px 9px 0; background: #fff0eb; }
.case-block h3 { color: #b55040; }
.mistake-list li { padding-left: 18px; color: #6a5360; font-size: 12px; }
.mistake-list li:before { display: inline-block; width: 13px; margin-left: -17px; color: var(--coral); content: '×'; font-weight: 900; }
.checklist { grid-template-columns: 1fr 1fr; }
.checklist label { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid #d8e4dc; border-radius: 8px; color: #455d58; background: #f5faf6; font-size: 12px; cursor: pointer; }
.checklist input { margin-top: 3px; accent-color: var(--teal); }
.lesson-resource-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.lesson-resource { display: block; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .16s, transform .16s; }
.lesson-resource:hover { transform: translateY(-1px); border-color: var(--teal); }
.lesson-resource small { display: block; color: var(--teal); font: 500 9px var(--mono); }
.lesson-resource strong { display: block; margin-top: 4px; font-size: 12px; line-height: 1.3; }
.self-check { padding: 16px; border-radius: 9px; background: #edf8e4; }
.self-check .eyebrow { color: #597547; }
.self-check strong { display: block; margin-top: 5px; font-size: 14px; }
.complete-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }
.complete-status { color: var(--muted); font-size: 12px; }
.resource-detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.resource-detail-meta span { padding: 4px 6px; border-radius: 4px; color: #4d6876; background: #edf2f2; font: 500 10px var(--mono); }
.external-button { display: inline-block; margin-top: 18px; padding: 11px 14px; border-radius: 7px; color: #fff; background: var(--ink); font-size: 13px; font-weight: 800; }
.external-button span { margin-left: 8px; color: var(--lime); }
.notice { padding: 10px 12px; border-radius: 7px; color: #765d2b; background: #fff4d9; font-size: 12px; }
.skill-output { padding: 12px; border-radius: 8px; color: #3f6860; background: #e5f5ed; font-size: 12px; }
.diagnosis-detail { display: grid; gap: 10px; }
.diagnosis-detail li { padding: 10px; border-radius: 7px; color: #4d5e72; background: #f1f4fa; font-size: 12px; }
.search-panel { width: min(650px, 100%); overflow: auto; padding: 33px; }
.search-panel h2 { margin: 5px 0 14px; font-size: 21px; }
.search-panel input { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--ink); outline: 0; color: var(--ink); background: transparent; font-size: 17px; }
.search-result { display: block; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.search-result span { color: var(--teal); font: 500 9px var(--mono); }
.search-result strong { display: block; font-size: 13px; }
.search-result p { margin: 2px 0; color: var(--muted); font-size: 11px; }

body.night { --paper: #111827; --surface: #17283e; --surface-soft: #263a52; --ink: #f4f2ea; --muted: #afbac8; --line: #2c3d52; background: #111827; }
.night .sidebar, .night .topbar { background: var(--paper); }
.night .nav-link:hover, .night .nav-link.active, .night .module-chip { background: #263a52; }
.night .streak-card, .night .start-card, .night .signal-card, .night .mini-resource, .night .resource-card, .night .radar-card, .night .calculator, .night .term-card, .night .progress-overview, .night .progress-modules, .night .diagnosis-card { border-color: #2c3d52; background: #17283e; }
.night .course-summary { border-color: #2e6e65; background: #173d3a; }
.night .course-summary p, .night .summary-tags span { color: #c3ded7; }
.night .summary-tags span { border-color: #2f756a; background: #1d4944; }
.night .lesson-item:hover, .night .lesson-item.active { background: #263a52; }
.night .inline-search input, .night .glossary-search input, .night .calculator input { color: var(--ink); }
.night .filter { border-color: #33475f; color: #c1ccd8; background: #17283e; }
.night .filter.active { border-color: #f4f2ea; color: #17283e; background: #f4f2ea; }
.night .roadmap-stage { color: #c5ddd6; background: #1a4742; }
.night .results-card { border-color: #2b6e64; background: #183d39; }
.night .insight { color: #cfdfdc; background: #142d2a; }
.night .radar-archive { border-color: #2c3d52; background: #17283e; }
.night .archive-date { border-color: #33475f; color: #dce5ed; background: #1b2d44; }
.night .archive-date small { color: #aebdcd; }
.night .archive-date.active { color: #17283e; border-color: #f4f2ea; background: #f4f2ea; }
.night .archive-date.active small { color: #45566a; }
.night .lesson-modal, .night .search-panel { color: #f4f2ea; background: #17283e; }
.night .close-modal, .night .close-search { color: #f4f2ea; }
.night .lesson-block p { color: #c6d1dd; }
.night .framework-list li { color: #d1e6df; background: #1d4944; }
.night .steps-list li { color: #e3e3dc; background: #263a52; }
.night .case-block { background: #482b27; }
.night .case-block h3 { color: #ffad9e; }
.night .mistake-list li { color: #e7c7cf; }
.night .checklist label { border-color: #2d655d; color: #cfe2dd; background: #183d39; }
.night .lesson-resource { border-color: #31465d; background: #263a52; }
.night .self-check { background: #344c2d; }
.night .notice { color: #f3d78d; background: #4b4024; }
.night .skill-card { border-color: #2b6e64; background: #183d39; }
.night .diagnosis-detail li { color: #d6deec; background: #263a52; }
.night .ambient { opacity: .12; }

@media (max-width: 1110px) {
  :root { --sidebar-width: 214px; }
  .sidebar { width: 214px; }
  .view { padding: 47px 31px 65px; }
  .lesson-layout { grid-template-columns: minmax(300px, .9fr) minmax(400px, 1.1fr); gap: 22px; }
  .path-rail { grid-template-columns: repeat(4, 1fr); }
  .resource-grid, .radar-grid { grid-template-columns: repeat(2, 1fr); }
  .glossary-grid { grid-template-columns: repeat(3, 1fr); }
  .home-resource-grid { grid-template-columns: repeat(2, 1fr); }
  .resource-roadmap { grid-template-columns: repeat(3, 1fr); }
  .archive-heading { align-items: start; flex-direction: column; gap: 6px; }
}

@media (min-width: 791px) and (max-width: 1000px) {
  .lesson-layout { grid-template-columns: 1fr; }
}

@media (max-width: 790px) {
  :root { --sidebar-width: 0px; --topbar-height: 62px; }
  .sidebar { width: 250px; transform: translateX(-101%); transition: transform .22s; box-shadow: 10px 0 30px rgba(0,0,0,.16); }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 18px; }
  .menu-button { display: block; border: 0; color: var(--ink); background: transparent; font-size: 21px; }
  .crumb { font-size: 8px; }
  .view { min-height: calc(100vh - 62px); padding: 34px 19px 52px; }
  .hero-grid, .home-grid, .lesson-layout, .lab-grid, .progress-dashboard { grid-template-columns: 1fr; gap: 23px; }
  .hero-visual { min-height: 330px; }
  .hero-copy h1, .page-intro h1 { letter-spacing: -2.2px; }
  .hero-meta { gap: 17px; margin-top: 30px; }
  .hero-meta strong { font-size: 17px; }
  .growth-flow { grid-template-columns: 1fr 15px 1fr 15px 1fr 15px 1fr; }
  .flow-node { min-height: 76px; padding: 7px 4px; }
  .flow-node span { font-size: 10px; }
  .dashboard-section, .lab-section { margin-top: 42px; }
  .start-grid, .home-resource-grid, .diagnosis-grid, .skill-grid { grid-template-columns: 1fr; }
  .path-rail { display: flex; overflow-x: auto; padding-bottom: 8px; }
  .module-chip { min-width: 115px; }
  .lesson-preview { min-height: auto; }
  .resource-controls, .radar-toolbar { align-items: stretch; flex-direction: column; }
  .inline-search { min-width: 100%; }
  .resource-roadmap { grid-template-columns: repeat(2, 1fr); }
  .resource-grid, .radar-grid { grid-template-columns: 1fr; }
  .radar-card.featured { grid-column: auto; }
  .radar-archive { padding: 18px; }
  .source-rail { grid-template-columns: 1fr; gap: 10px; }
  .metric-stack { grid-template-columns: 1fr; }
  .metric-stack div { padding: 0 0 8px; border-right: 0; border-bottom: 1px solid #bad9ce; }
  .metric-stack div:last-child { border-bottom: 0; }
  .glossary-grid { grid-template-columns: repeat(2, 1fr); }
  .course-summary { grid-template-columns: 1fr; }
  .lesson-modal, .search-panel { max-height: 91vh; }
  .modal-toolbar { min-height: 54px; padding: 6px 10px 0 14px; }
  .modal-scroll { max-height: calc(91vh - 54px); padding: 17px 18px 26px; }
  .search-panel { padding: 27px 19px; }
  .lesson-resource-list, .checklist { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .crumb { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 13px; }
  .hero-meta { gap: 13px; }
  .growth-flow { grid-template-columns: 1fr 1fr; gap: 8px; padding: 20px 8px; }
  .growth-flow i { display: none; }
  .signal-map { margin-bottom: 18px; }
  .resource-roadmap { grid-template-columns: 1fr; }
}
