:root {
  color-scheme: dark;
  --background: #111526;
  --panel: #1a2037;
  --raised: #222a44;
  --border: #3b4562;
  --text: #f4f3ff;
  --muted: #bec6e0;
  --accent: #c9b6ff;
  --area-color: var(--accent);
  --accent-strong: #ddd0ff;
  --on-accent: #211637;
  --focus: #f6d292;
  font: 100%/1.55 system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
  accent-color: var(--accent);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { color: var(--on-accent); background: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2.3rem, 4.7vw, 4.65rem); letter-spacing: -.038em; text-wrap: balance; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -.026em; }
h3 { font-size: 1.15rem; letter-spacing: -.015em; }
p { max-width: 69ch; }
button, textarea { font: inherit; }
.wrap { width: min(1120px, 100% - clamp(2rem, 9vw, 8rem)); margin-inline: auto; }
.skip { position: fixed; top: .6rem; left: .6rem; clip-path: inset(100%); padding: .6rem 1rem; background: var(--panel); z-index: 2; }
.skip:focus { clip-path: none; }
.site-header { border-bottom: 1px solid var(--border); }
.header-inner { display: flex; min-height: 4.6rem; align-items: center; justify-content: space-between; gap: .65rem; }
.wordmark { display: inline-flex; gap: .75rem; align-items: center; font-size: 1.18rem; font-weight: 760; line-height: 1.05; text-decoration: none; padding-block: .65rem; }
.emblem { flex: 0 0 1.5rem; height: 1.5rem; position: relative; display: grid; place-items: center; }
.emblem::before, .emblem::after { content: ''; position: absolute; width: .84rem; height: .84rem; border: 1.5px solid var(--accent); border-radius: 2px; transform: rotate(45deg); }
.emblem::after { width: .43rem; height: .43rem; background: var(--accent); }
.header-inner nav { display: flex; align-self: stretch; gap: clamp(.85rem, 3.5vw, 2.25rem); }
.header-inner nav a { display: flex; align-items: center; min-height: 2.75rem; box-shadow: inset 0 -2px transparent; color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 620; }
.header-inner nav a:hover, .header-inner nav a[aria-current] { color: var(--text); }
.header-inner nav a[aria-current] { box-shadow: inset 0 -2px var(--accent); }
main { min-height: 66vh; padding-block: clamp(1.6rem, 5vw, 4rem) clamp(2.75rem, 6vw, 5rem); }
.site-footer { border-top: 1px solid var(--border); padding-block: 1.25rem 2rem; display: flex; gap: .55rem 1.5rem; flex-wrap: wrap; justify-content: space-between; font-size: .87rem; color: var(--muted); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, .43fr); gap: 1.25rem; align-items: center; border: 1px solid #514970; border-radius: 16px; background: #1e2340; padding: clamp(1.45rem, 4.5vw, 4rem); }
.hero h1 { color: var(--text); max-width: 12ch; line-height: 1.01; text-wrap: initial; }
.hero-copy p { margin-block: 1.05rem .58rem; color: var(--muted); max-width: 45ch; font-size: clamp(1rem, 2vw, 1.13rem); }
.hero-mark { position: relative; width: min(100%, 16rem); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; color: #9184ce; }
.hero-mark::before, .hero-mark::after, .hero-mark span, .hero-mark span::after { content: ''; position: absolute; aspect-ratio: 1; border: 1px solid currentColor; border-radius: 12%; transform: rotate(45deg); }
.hero-mark::before { width: 68%; }
.hero-mark::after { width: 51%; color: #aa97ee; }
.hero-mark span { width: 30%; display: grid; place-items: center; background: #35305a; color: #c2b0ff; }
.hero-mark span::after { width: 35%; border: 0; border-radius: 2px; background: #c2b0ff; transform: none; }

.arrow { display: inline-block; flex: 0 0 .55rem; width: .55rem; height: .55rem; border-right: 2px solid; border-top: 2px solid; transform: rotate(45deg); }
.text-link { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; color: var(--accent); font-weight: 650; }
.button { display: inline-flex; min-height: 2.85rem; align-items: center; justify-content: center; gap: .65rem; padding: .6rem 1rem; border: 1px solid transparent; border-radius: 8px; background: var(--accent); color: var(--on-accent); text-align: center; text-decoration: none; font-weight: 700; cursor: pointer; }
.button:hover { background: var(--accent-strong); }
.button:disabled { background: var(--raised); border-color: var(--border); color: var(--muted); cursor: default; }

.resume { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(10rem, .8fr) auto; align-items: center; gap: 1rem clamp(1rem, 3vw, 2rem); padding-block: 1.45rem; border-bottom: 1px solid var(--border); }
.resume h2 { font-size: clamp(1.2rem, 2.4vw, 1.55rem); margin-block: .24rem; }
.resume p, .meter small { color: var(--muted); }
.resume p { font-size: .94rem; }
.resume .resume-label { color: var(--accent); font-size: .83rem; font-weight: 700; }
.meter { display: grid; gap: .45rem; font-variant-numeric: tabular-nums; }
progress { width: 100%; height: .48rem; border: 0; border-radius: .3rem; overflow: hidden; appearance: none; background: #343e5e; color: var(--accent); }
progress::-webkit-progress-bar { background: #343e5e; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }

.areas { margin-top: clamp(2.3rem, 5vw, 3.65rem); }
.area-list, .course-list { list-style: none; padding: 0; margin: 0; }
.area-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; }
.software { --area-color: #a8ceff; }
.ia { --area-color: #d3baff; }
.estudo { --area-color: #9ce0da; }
.area-list a { display: grid; height: 100%; grid-template-columns: minmax(0, 1fr) auto; align-content: center; gap: .22rem .7rem; padding: .95rem 1.1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); text-decoration: none; }
.area-list a:hover, .course-card:hover { background: var(--raised); border-color: var(--area-color); }
.area-list a small { grid-column: 1; color: var(--muted); }
.area-name { color: var(--area-color); font-weight: 690; }
.area-list .arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--area-color); margin-right: .2rem; }

.page-head { margin-bottom: clamp(1.3rem, 3vw, 2.15rem); }
.page-head h1 { max-width: 25ch; text-wrap: pretty; }
.page-head p:not(.sequence) { margin-top: .7rem; color: var(--muted); font-size: 1.05rem; }
.filters { display: flex; gap: .55rem; flex-wrap: wrap; padding-bottom: 1.4rem; border-bottom: 1px solid var(--border); }
.filters a { border: 1px solid var(--border); border-radius: 7px; padding: .58rem .8rem; color: var(--muted); text-decoration: none; font-weight: 650; }
.filters a:hover { background: var(--raised); color: var(--text); }
.filters a[aria-current] { background: var(--accent); color: var(--on-accent); }
.catalog-section { display: grid; grid-template-columns: minmax(11rem, 1fr) minmax(0, 2.65fr); gap: 1rem clamp(1.25rem, 4vw, 3.25rem); align-items: start; padding-block: 1.6rem; border-bottom: 1px solid var(--border); }
.area-intro h2 { color: var(--area-color); margin-bottom: .55rem; }
.area-intro p { color: var(--muted); font-size: .94rem; }
.course-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.course-card { display: flex; flex-direction: column; height: 100%; padding: 1.12rem 1.25rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); text-decoration: none; }
.course-card h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); margin-bottom: .45rem; }
.course-card p { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.course-meta { color: var(--area-color); font-weight: 700; margin-bottom: .6rem; font-variant-numeric: tabular-nums; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .72rem; border-top: 1px solid var(--border); color: var(--area-color); font-size: .91rem; }
.card-footer .arrow { margin-right: .2rem; }

.breadcrumbs { margin-bottom: 1rem; font-size: .92rem; color: var(--accent); }
.breadcrumbs a::before { content: '‹ '; }
.course-summary { display: flex; align-items: center; gap: .8rem 2rem; flex-wrap: wrap; padding: .95rem 1.15rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.course-summary .meter { flex: 1 1 15rem; }
.sequence-title { margin-top: 2.35rem; }
.modules { padding-left: 1.3rem; margin: 1.15rem 0 0; }
.modules > li { padding-left: .5rem; margin-bottom: 1.45rem; }
.modules > li::marker { color: var(--accent); font-weight: 700; }
.modules h3 { margin-bottom: .4rem; }
.lessons { padding-left: 1.65rem; }
.lessons li { border-bottom: 1px solid var(--border); }
.lessons li::marker { color: var(--muted); }
.lessons a { display: inline-block; padding-block: .65rem; }
.status { display: inline-block; margin: .3rem .5rem; padding: .1rem .5rem; color: var(--muted); background: var(--panel); border-radius: 4px; font-size: .8rem; }
.status.done { color: #adf0da; background: #203d40; }

.sequence { color: var(--muted); font-size: .93rem; margin-bottom: .45rem; }
.study { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(1.25rem, 4vw, 3rem); align-items: start; }
.study h2 { font-size: clamp(1.27rem, 2.3vw, 1.5rem); margin-bottom: .55rem; }
.lesson-content > p { margin-bottom: 1.35rem; overflow-wrap: anywhere; }
.practice, .notebook { padding: 1.15rem 1.25rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.practice h2 { color: var(--accent); }
.notebook > p { font-size: .91rem; color: var(--muted); }
textarea { display: block; width: 100%; margin-top: .75rem; padding: .7rem; border: 1px solid #687696; border-radius: 6px; background: #131a2e; color: var(--text); resize: vertical; }
.save-status { min-height: 1.45em; margin-top: .45rem; }
.lesson-actions { display: flex; gap: .55rem 1.15rem; flex-wrap: wrap; align-items: center; margin-top: 1.55rem; }
.lesson-actions > span { font-size: .85rem; color: var(--muted); }
.media { margin-bottom: 1.65rem; }
.media-empty { padding-bottom: .7rem; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .92rem; }
.player { display: grid; place-items: center; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: 12px; background: #0d1221; }
.player iframe { border: 0; width: 100%; height: 100%; border-radius: inherit; }
.media p { margin-top: .65rem; }
.media .media-source { margin: 0 0 .65rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 820px) {
  .catalog-section { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(4rem, .22fr); gap: .4rem; }
  .hero h1 { font-size: clamp(2.15rem, 9vw, 3.2rem); }
  .hero-mark { align-self: start; padding-top: 0; }
  .resume, .study, .area-list, .course-list { grid-template-columns: minmax(0, 1fr); }
  .resume { justify-items: start; }
  .resume .meter { width: 100%; }
  .lessons li { padding-block: .55rem; }
  .lessons a { display: inline; }
  .lessons .status { display: block; width: fit-content; margin: .3rem 0 0; }
  .wordmark { font-size: 1.07rem; }
  .header-inner { min-height: 4rem; }
}

.course-task { margin-top: 1.25rem; }
.course-task h2 { margin-bottom: .55rem; }
.media-guide, .references { margin-bottom: .9rem; }
.references { padding-inline-start: 1.4rem; overflow-wrap: anywhere; }
.data-table { width: 100%; max-width: 26rem; margin: 1rem 0; border-collapse: collapse; }
.data-table caption { text-align: left; font-weight: 650; margin-bottom: .4rem; }
.data-table th, .data-table td { padding: .25rem .45rem; border-bottom: 1px solid var(--border); text-align: right; }
