:root {
  color-scheme: dark;
  --bg: #0c0d17;
  --surface: #141622;
  --surface-raised: #191b2b;
  --line: #292b3e;
  --text: #f4f3fd;
  --muted: #aaaac0;
  --purple: #b9a5ff;
  --primary: #8054ef;
  --violet: #bb9cff;
  --cyan: #65dfde;
  --blue: #91b3ff;
  --green: #86dfba;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
:focus-visible { outline: 2px solid #c5b4ff; outline-offset: 4px; }
:target { scroll-margin-top: 24px; }
h1, h2, h3, p { margin-top: 0; }
p { line-height: 1.65; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 20; top: 10px; left: 10px; padding: 10px 15px; background: var(--surface-raised); }
.header { border-bottom: 1px solid #222435; background: #10111c; }
.header-inner { width: min(1332px, calc(100% - 88px)); min-height: 75px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; line-height: 1; white-space: nowrap; letter-spacing: -.04em; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; background: #8054ef; color: white; box-shadow: 0 4px 16px #8054ef43; }
.brand-mark svg { width: 22px; height: 22px; }
.brand small { display: block; margin-top: 5px; color: #b0afc3; font-size: 9px; font-weight: 650; letter-spacing: .16em; }
.brand-accent { color: #a687fb; }
.top-nav { align-self: stretch; display: flex; align-items: stretch; gap: 34px; }
.top-nav a { display: grid; place-items: center; position: relative; color: var(--muted); font-size: 14px; white-space: nowrap; font-weight: 550; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--text); }
.top-nav a[aria-current]::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: #ad89ff; border-radius: 4px 4px 0 0; }
.search-trigger { width: 139px; padding: 8px 10px; background: #191b28; border: 1px solid #2a2c40; color: #c4c3d6; border-radius: 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.search-trigger kbd { margin-left: auto; background: #222435; padding: 2px 6px; border-radius: 4px; font-size: 11px; color: var(--muted); }
svg { width: 19px; height: 19px; display: block; flex: none; }
.layout { width: min(1332px, calc(100% - 88px)); margin: 32px auto 56px; display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; gap: 32px; min-height: calc(100vh - 225px); }
#principal { min-width: 0; }
#principal:focus { outline: none; }
.side-progress { padding: 17px 16px 16px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg, #19172b, #151622 76%); margin-bottom: 26px; }
.side-progress h2 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; font-size: 14px; }
.side-progress strong { color: var(--purple); font-size: 13px; }
.progress { overflow: hidden; background: #2a2942; border-radius: 10px; height: 6px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8054ef, #bd9dff); }
.side-progress small { display: block; margin-top: 10px; font-size: 11px; color: var(--muted); }
.side-label { display: block; margin: 0 0 9px 9px; color: #a3a1bc; font-size: 10px; font-weight: 760; letter-spacing: .15em; text-transform: uppercase; }
.side-links { display: grid; gap: 3px; }
.side-links a { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 9px; min-height: 42px; padding: 7px 8px; color: #c2c2d7; border-radius: 8px; font-size: 12px; font-weight: 590; border: 1px solid transparent; }
.side-links a:hover, .side-links a[aria-current] { background: #1d1932; color: #e2d7ff; border-color: #35284f; }
.side-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #202132; color: #b5a8d5; font-size: 10px; font-weight: 700; }
.side-links a[aria-current] .side-num { background: #3a2863; color: #e6d8ff; }
.side-guide { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 15px; padding: 16px 7px 5px; color: var(--muted); font-size: 12px; }
.side-guide:hover { color: var(--purple); }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 348px; display: grid; align-items: center; border: 1px solid #382b53; border-radius: 19px; background: #151429; }
.hero::before { content: ""; position: absolute; z-index: -2; inset: 0 0 0 30%; background: url("./escudo.webp") center right / cover no-repeat; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #17152b 0%, #17152bf5 33%, #17152b3d 63%, #17152b00 100%); }
.hero-copy { padding: 36px; max-width: 650px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 15px; color: #c5b2ff; font-size: 10px; font-weight: 790; letter-spacing: .13em; text-transform: uppercase; }
.hero .eyebrow { padding: 6px 10px; border-radius: 25px; border: 1px solid #61488b; background: #2d2147bb; }
.eyebrow svg { width: 13px; height: 13px; }
.hero h1 { margin-bottom: 14px; font-size: clamp(40px, 4.1vw, 63px); line-height: .99; letter-spacing: -.06em; }
.hero h1 span { color: #c0a8ff; }
.hero p { max-width: 405px; margin-bottom: 23px; color: #c4bfd8; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button, .button-alt, .icon-button { border-radius: 8px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 9px 14px; font-size: 13px; font-weight: 700; }
.button { background: var(--primary); color: #fff; border: 1px solid #996fff; box-shadow: 0 4px 20px #753ef033; }
.button:hover { background: #9067f6; }
.button-alt, .icon-button { color: #e2def1; background: #242138; border: 1px solid #3b3553; }
.button-alt:hover, .icon-button:hover:hover { border-color: #9875f0; }
.button svg, .button-alt svg { width: 16px; height: 16px; }
button:disabled { opacity: .48; cursor: default; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 33px; }
.stat { min-width: 0; min-height: 70px; padding: 13px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.stat strong { display: block; font-size: 19px; line-height: 1.1; }
.stat small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.icon-tile { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid color-mix(in srgb, var(--tone, var(--violet)) 29%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--tone, var(--violet)) 12%, #181826); color: var(--tone, var(--violet)); flex: none; }
.violet { --tone: var(--violet); }
.cyan { --tone: var(--cyan); }
.blue { --tone: var(--blue); }
.green { --tone: var(--green); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: 29px; letter-spacing: -.04em; margin: 0 0 5px; }
.section-head p { color: var(--muted); margin: 0; font-size: 13px; }
.domain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.domain-card { display: flex; flex-direction: column; min-height: 166px; padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s, transform .15s; }
.domain-card:hover { border-color: #7957b6; background: #1b1930; transform: translateY(-2px); }
.domain-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 12px; }
.domain-top small { color: #b6b2cd; font-size: 11px; text-align: right; }
.domain-card h3 { font-size: 15px; margin: 0 0 6px; line-height: 1.25; }
.domain-card p { color: var(--muted); font-size: 12px; margin: 0 0 11px; line-height: 1.4; }
.domain-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; color: var(--tone); font-size: 11px; }
.domain-bottom svg { width: 15px; height: 15px; }
.view-header { padding: 24px 0 18px; }
.view-header h1 { font-size: clamp(34px, 5vw, 55px); letter-spacing: -.055em; line-height: 1.02; margin: 0 0 12px; }
.view-header p { color: var(--muted); max-width: 650px; margin-bottom: 0; }
.breadcrumb { color: var(--purple); display: inline-block; margin-bottom: 16px; font-size: 13px; }
.domain-heading { padding: 24px; margin-bottom: 20px; border-radius: 16px; background: linear-gradient(140deg, #211936, var(--surface) 70%); border: 1px solid #382e50; }
.domain-heading .view-header { padding: 0; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.lesson-grid.with-calculator { grid-template-columns: minmax(0, 1fr) 248px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 20px; }
.panel h2 { font-size: 20px; letter-spacing: -.025em; margin-bottom: 12px; }
.lesson { padding: 0; overflow: hidden; margin-bottom: 10px; }
.lesson summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; padding: 16px; font-weight: 700; list-style: none; }
.lesson summary::-webkit-details-marker { display: none; }
.lesson summary::after { content: "+"; color: var(--purple); font-size: 19px; font-weight: 500; }
.lesson[open] summary::after { content: "−"; }
.lesson[open] summary { border-bottom: 1px solid var(--line); }
.lesson summary:focus-visible { outline-offset: -4px; }
.lesson-body { padding: 17px; }
.lesson-body h3 { margin: 0 0 5px; font-size: 14px; color: #e9e3ff; }
.lesson-body p, .panel > p { color: #c7c6d8; font-size: 14px; }
.lesson-body p:last-of-type { margin-bottom: 0; }
.completed { color: var(--green); font-weight: 650; }
.lesson-done { margin-top: 16px; }
.diagram { margin: 0 0 16px; }
.diagram h2 { display: flex; align-items: center; gap: 9px; color: var(--tone); margin-bottom: 14px; }
.diagram-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); align-items: center; gap: 18px; }
.diagram-layout img { display: block; width: 100%; height: auto; border-radius: 9px; background: #10111c; }
.diagram-controls { align-self: center; }
.diagram-nodes { display: grid; gap: 6px; }
.node { padding: 7px 8px; min-height: 33px; border-radius: 7px; text-align: left; border: 1px solid #3a3557; background: #1d1c31; color: #d9d2ee; font-size: 12px; }
.node[aria-pressed="true"] { border-color: #a47df7; background: #332353; }
.node span { display: inline-block; margin-right: 5px; color: #d2baff; font-weight: 800; }
.node-detail { margin: 10px 0 0; min-height: 80px; color: #c7c6d8; font-size: 12px; line-height: 1.55; }
.calculator { margin: 0 0 16px; }
.calculator form { display: grid; gap: 8px; }
.calculator label { color: var(--muted); font-size: 12px; }
.calculator input { width: 100%; display: block; margin-top: 4px; padding: 6px 9px; }
.calculator output { color: var(--purple); font-weight: 700; display: block; font-size: 12px; line-height: 1.6; }
input, select { color: var(--text); background: #10121f; border: 1px solid #3a3b51; border-radius: 8px; padding: 9px 11px; min-height: 38px; }
label select { display: block; margin-top: 6px; max-width: 100%; }
.practice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 16px; align-items: start; }
.question { padding: 23px; }
.question .progress { margin-bottom: 17px; }
.question .scenario { color: #d4cde7; background: #211a35; padding: 13px 15px; border-left: 3px solid #a47df7; border-radius: 6px; margin: 0 0 16px; }
.question fieldset { border: 0; padding: 0; margin: 0 0 13px; min-width: 0; }
.question legend { font-weight: 720; font-size: 19px; margin-bottom: 14px; }
.choice { display: flex; align-items: flex-start; gap: 9px; padding: 11px; margin: 0 0 8px; border: 1px solid #35364d; border-radius: 8px; background: #191b2c; cursor: pointer; font-size: 14px; line-height: 1.45; }
.choice:has(input:checked) { border-color: #a580fb; }
.choice.correct { border-color: #3f9d77; background: #182d2a; }
.choice.incorrect { border-color: #c97189; background: #302030; }
.choice input { min-height: auto; accent-color: var(--primary); margin: 3px 0 0; }
.feedback { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: #242039; font-size: 14px; line-height: 1.5; }
.feedback:empty { display: none; }
.quiz-controls { display: grid; gap: 12px; align-items: start; }
.quiz-controls label { font-size: 13px; color: var(--muted); }
.flash { max-width: 710px; }
.flash-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.flash-face { width: 100%; min-height: 215px; border: 1px solid #674d94; border-radius: 14px; padding: 22px; color: var(--text); background: radial-gradient(ellipse at 10% 20%, #332451, #1a1a2b 72%); display: grid; justify-items: center; align-content: center; gap: 10px; }
.flash-face strong { font-size: clamp(22px, 3vw, 34px); letter-spacing: -.03em; }
.flash-face small { color: #c7b6ee; }
.flash-face p { margin: 0; max-width: 490px; }
.flash .actions { margin-top: 12px; }
.flash-count { color: var(--muted); font-size: 13px; }
.guide { max-width: 710px; display: grid; gap: 12px; }
.guide p:last-child { margin-bottom: 0; }
.guide a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
footer { border-top: 1px solid #222435; font-size: 12px; color: var(--muted); }
footer > div { width: min(1332px, calc(100% - 88px)); min-height: 55px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
footer a { color: #c9b5ff; }
dialog { background: var(--surface); color: var(--text); border: 1px solid #544575; border-radius: 14px; padding: 16px; width: min(550px, calc(100% - 28px)); box-shadow: 0 15px 100px #0009; }
dialog::backdrop { background: #070713cb; }
.dialog-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.dialog-top h2 { margin: 0; font-size: 20px; }
.dialog-top button { min-height: 33px; width: 34px; padding: 3px; font-size: 20px; }
dialog input { width: 100%; margin: 14px 0 9px; }
#search-results { max-height: 52vh; overflow: auto; }
#search-results a { display: block; padding: 10px 8px; border-radius: 7px; font-size: 14px; }
#search-results a:hover { background: #292043; }
#search-results small, #search-results p { color: var(--muted); font-size: 12px; display: block; margin: 3px 0; }
@media (max-width: 1100px) {
  .layout, .header-inner, footer > div { width: calc(100% - 48px); }
  .layout { grid-template-columns: 190px minmax(0, 1fr); gap: 21px; }
  .hero-copy { padding: 28px; }
  .lesson-grid.with-calculator, .practice-layout { grid-template-columns: minmax(0, 1fr) 205px; }
}
@media (max-width: 850px) {
  .layout { grid-template-columns: 1fr; margin-top: 20px; }
  #sidebar { display: none; }
  .header-inner { min-height: 65px; }
  .top-nav { gap: 18px; }
  .search-trigger { width: auto; }
  .search-trigger kbd { display: none; }
}
@media (max-width: 600px) {
  .layout, .header-inner, footer > div { width: calc(100% - 28px); }
  .header-inner { flex-wrap: wrap; gap: 0 10px; padding-top: 10px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 33px; height: 33px; }
  .top-nav { width: 100%; order: 3; justify-content: space-between; gap: 10px; min-height: 43px; }
  .top-nav a { font-size: 12px; }
  .hero { min-height: 323px; }
  .hero-copy { padding: 22px 16px; }
  .hero::before { left: 8%; background-position: 71% center; }
  .hero::after { background: linear-gradient(90deg, #151429fa 0%, #151429e8 40%, #15142952 100%); }
  .hero h1 { font-size: 40px; }
  .hero p { max-width: 282px; font-size: 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
  .stat { padding: 9px; min-height: 60px; }
  .domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .domain-card { padding: 10px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .lesson-grid.with-calculator, .practice-layout, .diagram-layout { grid-template-columns: minmax(0, 1fr); }
  .quiz-controls { grid-row: 1; }
  .question, .diagram { padding: 15px; }
  .diagram-layout { gap: 12px; }
  footer > div { flex-wrap: wrap; padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.review-list { margin-top: 16px; }
.missed { color: #f3a1b6; font-size: 12px; }
.review-list .completed { font-size: 12px; }
.lesson summary [data-lesson-mark] { margin-left: auto; }
.flash-face span { max-width: 480px; line-height: 1.55; }
.diagram-nodes { gap: 9px; }
.node { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px; }
.node:not(:last-child)::after { content: ""; position: absolute; top: 100%; left: 17px; height: 11px; width: 1px; background: #5d5277; pointer-events: none; }
.node span { display: grid; flex: 0 0 21px; min-height: 21px; place-items: center; margin: 0; border-radius: 5px; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, #1d1c31); }
.node[aria-pressed="true"] { border-color: var(--tone); }
.node-detail { padding: 10px; border-radius: 7px; border-left: 2px solid var(--tone); background: #1d1b30; }

.route-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.route-links .button-alt { min-height: 36px; }
.lesson-heading { margin: 18px 0 10px; font-size: 19px; letter-spacing: -.025em; }
.objective-code { color: var(--purple); font-variant-numeric: tabular-nums; font-weight: 750; }
.objective-practice { display: block; width: fit-content; margin-top: 12px; color: var(--purple); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.outline-note { color: var(--muted); font-size: 14px; }
.outline-note a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.outline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 13px; }
.outline-domain ul, .domain-results { margin: 0; padding: 0; list-style: none; }
.outline-domain li + li, .domain-results li + li { border-top: 1px solid var(--line); }
.outline-domain a { display: flex; gap: 10px; align-items: baseline; padding: 9px 2px; font-size: 14px; }
.outline-domain a .objective-code { min-width: 2.3em; }
.outline-domain a:hover, .domain-results a:hover { color: var(--purple); }
.domain-results { margin-bottom: 16px; }
.domain-results li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 13px; }
.question-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
#exam-clock { color: var(--purple); font-weight: 750; font-variant-numeric: tabular-nums; }
.end-exam { margin: 5px 0 5px 8px; }
.quiz-controls select { width: 100%; }
@media (max-width: 650px) {
  .outline-grid { grid-template-columns: minmax(0, 1fr); }
}

.study-weeks { margin: 0; padding-left: 22px; }
.study-weeks li { padding: 8px 0; font-size: 14px; }
.study-weeks li + li { border-top: 1px solid var(--line); }
.study-weeks small { display: block; color: var(--muted); margin-top: 4px; }
