:root {
  --bg: #f7f7fb; --surface: #ffffff; --surface-2: #f0f0f7; --text: #1b1b2f; --muted: #6b6b80;
  --border: #e3e3ee; --primary: #5b4bdb; --primary-ink: #ffffff; --primary-text: var(--primary); --ok: #1f9d55; --bad: #d64545;
  --radius: 14px; --shadow: 0 1px 2px rgba(20,20,50,.06), 0 4px 16px rgba(20,20,50,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12121c; --surface: #1b1b29; --surface-2: #242436; --text: #ececf5; --muted: #a0a0b8;
    --border: #2e2e44; --primary: #8b7dff; --primary-ink: #12121c; --shadow: none;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 2rem; line-height: 1.2; margin: .3em 0; }
h2 { font-size: 1.35rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.5rem; padding: .7rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand-mark { color: var(--primary-text); }
.nav { display: flex; gap: .3rem; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: .35rem .6rem; border-radius: 8px; white-space: nowrap; }
@media (max-width: 1240px) { .topbar { gap: 1rem; } .nav a { padding: .35rem .45rem; } }
.nav a.active, .nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.account { display: flex; align-items: center; gap: .6rem; }
.account form { margin: 0; }
.chip { background: var(--surface-2); padding: .2rem .6rem; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 700; }
.avatar.xl { width: 72px; height: 72px; font-size: 1.8rem; }
.avatar:hover { text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.footer { text-align: center; color: var(--muted); padding: 2rem 1rem; font-size: .85rem; }

.btn { display: inline-block; background: var(--primary); color: var(--primary-ink); border: 0; border-radius: 10px; padding: .6rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-sm { padding: .35rem .8rem; font-size: .9rem; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn.wide { width: 100%; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; }
.icon-btn { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--primary-text); }

.messages { display: grid; gap: .5rem; margin-bottom: 1rem; }
.msg { padding: .7rem 1rem; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--primary); }
.msg-success { border-color: var(--ok); }
.msg-error { border-color: var(--bad); }

.hero { padding: 2.5rem 0 1rem; }
.hero h1 { font-size: 2.6rem; max-width: 40rem; }
.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; align-items: center; }
.hero-actions form { margin: 0; }
.pill-row { display: flex; gap: .5rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 1rem 0; }
.pill-row li, .pill { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .3rem .8rem; font-size: .9rem; color: var(--text); }
.pill.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.pill small { opacity: .7; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.grid-tools { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); }
.card.pad { padding: 1.2rem; margin-bottom: 1rem; }
a.card:hover { text-decoration: none; border-color: var(--primary); }
.course-card { display: flex; flex-direction: column; overflow: hidden; }
.cover { height: 110px; display: grid; place-items: center; font-size: 3rem; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #000)); }
.card-body { padding: 1rem; }
.card-body p { margin: .3rem 0 .7rem; font-size: .95rem; }
.meta { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--muted); }
.tag { background: var(--surface-2); color: var(--text); border-radius: 6px; padding: .1rem .5rem; font-weight: 600; font-size: .8rem; }
.tag.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tool-card { display: flex; flex-wrap: wrap; align-items: flex-start; padding: 1rem; gap: .5rem; }
.tool-course { flex: 1 1 100%; display: block; margin-top: .4rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.tool-course:hover { text-decoration: none; border-color: var(--accent); }
.tool-course img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #f4f4f8; }
.tool-course-icon { display: grid; place-items: center; aspect-ratio: 16 / 9; font-size: 2.6rem; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #000)); }
.tool-course-label { display: block; padding: .55rem .75rem; font-weight: 600; font-size: .95rem; }
.tool-course-label small { display: block; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; }
.course-section { margin-top: 2.5rem; }
.tool-link { display: flex; gap: .9rem; flex: 1; color: var(--text); }
.tool-link:hover { text-decoration: none; }
.tool-link p { margin: .1rem 0 .5rem; font-size: .92rem; }
.save-form { margin: 0; }
.tool-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.tool-icon.xl { width: 96px; height: 96px; font-size: 3rem; border-radius: 22px; }

.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: .4rem 0 .2rem; }
.bar.big { height: 12px; max-width: 420px; }
.bar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .3s; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1rem 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; display: flex; flex-direction: column; }
.stat-value { font-size: 1.6rem; font-weight: 800; }
.stat.goal { flex-direction: row; align-items: center; gap: 1rem; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring span { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }

.list { display: grid; gap: .7rem; }
.row-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; }
.empty { padding: 1.5rem; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); text-align: center; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0 .5rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .5rem .7rem; }
.filters input[type=search] { flex: 1; min-width: 200px; }

.back { display: inline-block; margin-bottom: .5rem; color: var(--muted); }
.detail-head { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1rem; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: .25rem 0 .25rem 1.6rem; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.syllabus { margin: .5rem 0 0; padding-left: 1.4rem; }
.syllabus li { padding: .35rem 0; }
.syllabus li span { font-size: .85rem; margin-left: .4rem; }
.syllabus li.done { list-style: none; margin-left: -1.4rem; }
.syllabus li.done::before { content: "✓ "; color: var(--ok); font-weight: 700; margin-right: .3rem; }
.syllabus li.current a { font-weight: 700; color: var(--text); }
.syllabus.compact li { padding: .2rem 0; font-size: .92rem; }

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.2rem; }
.prose pre { background: var(--surface-2); padding: 1rem; border-radius: 10px; overflow-x: auto; }
.prose code { background: var(--surface-2); padding: .1rem .3rem; border-radius: 4px; font-size: .92em; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1rem 0; padding: .6rem 1rem; border-left: 4px solid var(--primary); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.prose img { display: block; max-width: 100%; height: auto; margin: 1rem auto; border-radius: 12px; }
@media (max-width: 600px) {   /* illustrations keep a readable size; they scroll sideways inside their paragraph */
  .prose p:has(> img) { overflow-x: auto; }
  .prose p > img { width: 620px; max-width: none; }
}
.prose table { border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--border); padding: .4rem .7rem; }

.lesson-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 2rem; }
@media (max-width: 860px) { .lesson-layout { grid-template-columns: 1fr; } .sidebar { order: 2; } }
.sidebar { position: sticky; top: 4.5rem; align-self: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; max-height: calc(100vh - 6rem); overflow-y: auto; }
.sidebar h4 { margin: 1rem 0 .2rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.quiz { margin-top: 2rem; }
.question { border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1rem; }
.question.right { border-color: var(--ok); }
.question.wrong { border-color: var(--bad); }
.question legend { font-weight: 600; padding: 0 .3rem; }
.choice { display: block; padding: .4rem .5rem; border-radius: 8px; cursor: pointer; }
.choice:hover { background: var(--surface-2); }
.choice.is-correct { background: color-mix(in srgb, var(--ok) 15%, transparent); }
.explain { margin: .5rem 0 0; font-size: .92rem; color: var(--muted); }
.result { margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px; font-weight: 600; }
.result.pass { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.result.fail { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.badge { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; display: flex; flex-direction: column; gap: .2rem; }
.badge-icon { font-size: 2rem; }
.badge.locked { opacity: .45; filter: grayscale(1); }

.heatmap { display: flex; gap: 4px; overflow-x: auto; }
.hm-week { display: flex; flex-direction: column; gap: 4px; }
.hm-day { width: 14px; height: 14px; border-radius: 3px; background: var(--surface-2); }
.hm-day.l1 { background: color-mix(in srgb, var(--primary) 30%, var(--surface-2)); }
.hm-day.l2 { background: color-mix(in srgb, var(--primary) 55%, var(--surface-2)); }
.hm-day.l3 { background: color-mix(in srgb, var(--primary) 80%, var(--surface-2)); }
.hm-day.l4 { background: var(--primary); }
.hm-day.future { opacity: .3; }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.table th, .table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.table .num { text-align: right; font-weight: 700; }
.table tr.me { background: color-mix(in srgb, var(--primary) 12%, transparent); }

.auth { max-width: 440px; margin: 2rem auto; }
.auth form p { display: flex; flex-direction: column; gap: .3rem; }
.auth .helptext, .auth ul { font-size: .82rem; color: var(--muted); }
.errorlist { color: var(--bad) !important; padding-left: 1rem; }
.goal-choices { border: 1px solid var(--border); border-radius: 10px; margin: 0 0 1rem; }
.goal-choices div div, .goal-choices label { display: block; padding: .2rem 0; }

.certificate { max-width: 720px; margin: 2rem auto; text-align: center; padding: 3rem 2rem; background: var(--surface); border: 8px double var(--primary); border-radius: 6px; }
.certificate h1 { font-size: 2.4rem; }
.cert-mark { font-weight: 800; color: var(--primary-text); font-size: 1.2rem; }
.cert-code { font-size: .8rem; color: var(--muted); margin-top: 2rem; word-break: break-all; }
@media print { .topbar, .footer, .no-print, .messages { display: none; } body { background: #fff; } }
@media (max-width: 600px) { .hero h1 { font-size: 1.9rem; } .topbar { gap: .7rem; padding: .6rem 1rem; } }

.grid-tracks { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.track-card { overflow: hidden; display: flex; flex-direction: column; }
.track-cover { height: 140px; display: grid; place-items: center; font-size: 4rem; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 45%, color-mix(in srgb, var(--accent) 40%, #000)); }
.track-hero { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; padding: 1.5rem; margin-bottom: 1.5rem; border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface)); border: 1px solid var(--border); }
.track-hero-icon { font-size: 4rem; width: 110px; height: 110px; display: grid; place-items: center; border-radius: 26px; background: color-mix(in srgb, var(--accent) 25%, transparent); }
.levels { list-style: none; padding: 0; margin: 0; position: relative; }
.levels::before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.level { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; position: relative; }
.level-dot { flex: none; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); border: 2px solid var(--border); color: var(--muted); }
.level.is-active .level-dot { border-color: var(--accent); color: var(--accent); }
.level.is-done .level-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.level-card { flex: 1; padding: 1rem 1.2rem; }
.level-card p { margin: .2rem 0 .5rem; }

.tag.lab { background: color-mix(in srgb, #f59e0b 22%, transparent); }
.tag.exam { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.small { font-size: .85rem; }
.q-text p { margin: .2rem 0 .6rem; }
.q-text { font-weight: 500; }
.question legend .tag { font-size: .72rem; }
.numeric input { width: 12rem; }
.locked-box { border-style: dashed; }
.topics { margin: 1rem 0; }
.topics .low { color: var(--bad); }
.lab textarea { width: 100%; font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; margin: .4rem 0 1rem; }
.lab input[type=url] { width: 100%; margin: .4rem 0 1rem; }
.lab label { display: block; }
.rubric { border: 1px solid var(--border); border-radius: 10px; margin: 0 0 1rem; }
.submission-status { padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1rem; background: var(--surface-2); }
.status-approved { background: color-mix(in srgb, var(--ok) 15%, transparent); }
.status-changes { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.feedback { margin-top: .5rem; }

/* Python exercises */
.code-lab .CodeMirror, .code-input { height: auto; min-height: 260px; border: 1px solid var(--border); border-radius: 10px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-input { width: 100%; padding: .7rem; background: var(--surface-2); color: var(--text); }
.code-lab .CodeMirror { background: var(--surface-2); color: var(--text); }
.code-lab .CodeMirror-gutters { background: var(--surface); border-right: 1px solid var(--border); }
.code-lab .CodeMirror-linenumber { color: var(--muted); }
.code-lab .CodeMirror-cursor { border-left-color: var(--text); }
.code-actions, .run-bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .8rem 0; }
.py-output, .prose .py-output { background: #10101a; color: #e6e6f0; border-radius: 10px; padding: .8rem 1rem; white-space: pre-wrap; max-height: 360px; overflow: auto; font-size: .88rem; }
.py-output.has-error { border-left: 4px solid var(--bad); }
.tests-title { margin-top: 1rem; }
.test-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.test-list li { padding: .4rem .6rem; border-radius: 8px; margin-bottom: .3rem; background: var(--surface-2); }
.test-list li.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.test-list li.ko { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.test-list .why { font-size: .85rem; color: var(--muted); margin: .2rem 0 0 1.3rem; white-space: pre-wrap; }
.solution { background: var(--surface-2); padding: 1rem; border-radius: 10px; overflow-x: auto; font-size: .88rem; }
.code-success details { margin: .8rem 0; }
@media (prefers-color-scheme: dark) { .cm-s-default .cm-keyword { color: #c792ea; } .cm-s-default .cm-string { color: #c3e88d; } .cm-s-default .cm-def, .cm-s-default .cm-variable-2 { color: #82aaff; } .cm-s-default .cm-number { color: #f78c6c; } .cm-s-default .cm-comment { color: #8a8aa0; } .cm-s-default .cm-builtin { color: #ffcb6b; } }

html.letra-grande { font-size: 120%; }
html.letra-grande .prose, html.letra-grande .q-text { line-height: 1.75; }
.text-size { border: 1px solid var(--border); cursor: pointer; color: var(--text); font: inherit; font-size: .85rem; }
.module summary { cursor: pointer; display: grid; gap: .3rem; list-style: none; }
.module summary::-webkit-details-marker { display: none; }
.module-title { font-weight: 700; font-size: 1.05rem; }
.module summary .bar { max-width: 320px; }
.section-title { margin: 1rem 0 .2rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sidebar-section { list-style: none; margin: .6rem 0 .1rem -1.2rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.syllabus.compact li.sidebar-section::before { content: none; }

@media (max-width: 600px) {
  .detail-head { gap: .8rem; }
  .tool-icon.xl { width: 56px; height: 56px; font-size: 1.8rem; border-radius: 14px; }
  .detail-head h1 { font-size: 1.6rem; }
}

.token-counter { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.tc-label { font-weight: 600; display: block; margin-bottom: .4rem; }
.tc-input { width: 100%; font: inherit; }
.tc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-top: .8rem; }
.tc-stats div { background: var(--surface-2); border-radius: 10px; padding: .6rem .8rem; display: flex; flex-direction: column; }
.tc-stats strong { font-size: 1.5rem; }
.tc-stats span { font-size: .8rem; color: var(--muted); }

/* Quiz challenge */
.quiz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.stars { color: #f5a524; letter-spacing: 2px; }
.big-stars { font-size: 1.8rem; }
.result { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.result-score { display: flex; flex-direction: column; align-items: center; }
.result-score .big { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.review { list-style: none; padding: 0; margin: 1rem 0; }
.review .question { margin-bottom: .8rem; }
.review-choices { list-style: none; padding-left: .4rem; margin: .3rem 0; }
.review-choices li { padding: .25rem .5rem; border-radius: 8px; }
.review-choices li.picked { font-weight: 600; }
.review-choices li.is-correct { background: color-mix(in srgb, var(--ok) 15%, transparent); }
.quiz-actions, .quiz-nav { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.quiz-progress { display: grid; gap: .3rem; margin-bottom: 1rem; }
.quiz-form .question legend { font-size: .9rem; color: var(--muted); }
.quiz-form .q-text { font-size: 1.08rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Interactive course map */
.roadmap { display: grid; gap: 1.5rem; margin: 1rem 0 2rem; }
.rm-banner { background: var(--primary); color: var(--primary-ink); border-radius: var(--radius); padding: 1rem 1.2rem; }
.rm-banner.completo { background: var(--ok); }
.rm-banner h3 { margin: .2rem 0 .5rem; font-size: 1.15rem; }
.rm-step { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.rm-progress { display: flex; align-items: center; gap: .6rem; }
.rm-progress .bar { flex: 1; max-width: 260px; background: rgba(255, 255, 255, .3); margin: 0; }
.rm-progress .bar span { background: var(--primary-ink); }
.rm-path { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2.2rem; padding: 2rem 0 1rem; --zig: 1; }
.rm-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rm-lines .tramo { fill: none; stroke: var(--border); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 14; }
.rm-lines .tramo.hecho { stroke: var(--ok); stroke-dasharray: none; opacity: .6; }
.rm-node-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; max-width: 220px; text-align: center; z-index: 1; }
.rm-node-wrap.z0 { transform: translateX(0); }
.rm-node-wrap.z1 { transform: translateX(calc(80px * var(--zig))); }
.rm-node-wrap.z2 { transform: translateX(calc(130px * var(--zig))); }
.rm-node-wrap.z3 { transform: translateX(calc(-80px * var(--zig))); }
.rm-node-wrap.z4 { transform: translateX(calc(-130px * var(--zig))); }
.rm-node { width: 78px; height: 78px; border-radius: 50%; border: 0; cursor: pointer; font-size: 2rem; display: grid; place-items: center;
           background: var(--surface-2); color: var(--muted); box-shadow: 0 7px 0 color-mix(in srgb, var(--surface-2) 60%, #000); transition: transform .12s; }
.rm-node:hover { transform: translateY(-2px); }
.rm-node:active { transform: translateY(4px); box-shadow: 0 3px 0 color-mix(in srgb, var(--surface-2) 60%, #000); }
.rm-node.hecho { background: var(--ok); color: #fff; box-shadow: 0 7px 0 color-mix(in srgb, var(--ok) 65%, #000); }
.rm-node.actual { background: var(--primary); color: var(--primary-ink); box-shadow: 0 7px 0 color-mix(in srgb, var(--primary) 60%, #000); animation: latido 1.8s infinite; }
.rm-node.bloqueado { opacity: .75; font-size: 1.5rem; }
.rm-node:focus-visible { outline: 3px solid var(--primary-text); outline-offset: 4px; }
@keyframes latido { 0%, 100% { outline: 0 solid color-mix(in srgb, var(--primary) 40%, transparent); } 50% { outline: 10px solid color-mix(in srgb, var(--primary) 18%, transparent); } }
.rm-here { position: absolute; top: -1.9rem; background: var(--surface); border: 2px solid var(--primary); color: var(--primary-text); font-weight: 800; font-size: .72rem; padding: .15rem .5rem; border-radius: 8px; white-space: nowrap; }
.rm-label { font-size: .9rem; font-weight: 600; line-height: 1.25; }
.rm-meta { font-size: .78rem; color: var(--muted); }
a.rm-node, a.rm-node:hover { text-decoration: none; }
.rm-node.bloqueado { cursor: not-allowed; }
.rm-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 20; background: var(--text); color: var(--bg); padding: .7rem 1.1rem; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: calc(100% - 2rem); text-align: center; }
.map-page { max-width: 760px; margin: 0 auto; }
.map-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.map-head h1 { margin: 0; font-size: 1.6rem; }
@media (max-width: 600px) { .rm-path { --zig: .45; } }
@media (prefers-reduced-motion: reduce) { .rm-node.actual { animation: none; } }

/* Module dots inside a guided lesson */
.guided-dots { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.guided-dots ol { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0; }
.guided-dots li a, .guided-dots li span { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border); }
.guided-dots li.hecho a { background: var(--ok); border-color: var(--ok); }
.guided-dots li.actual a { border-color: var(--primary); }
.guided-dots li.aqui a { background: var(--primary); border-color: var(--primary); transform: scale(1.25); }

/* Read-aloud player */
.narrador { padding: .9rem 1rem; margin: 0 0 1.2rem; position: sticky; top: 4.5rem; z-index: 4; }
.nar-main, .nar-opts { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.nar-opts { margin-top: .5rem; gap: 1rem; color: var(--muted); }
.nar-opts select { max-width: 240px; padding: .3rem .4rem; }
.nar-bar { margin-top: .6rem; }
.prose .leyendo { background: color-mix(in srgb, #f5a524 22%, transparent); border-radius: 8px; box-shadow: 0 0 0 6px color-mix(in srgb, #f5a524 22%, transparent); transition: background .2s; }
.quiz-gate { text-align: center; padding: 1rem; border: 2px dashed var(--border); border-radius: var(--radius); margin: 1rem 0; }
.btn.pulse { animation: latido 1.4s infinite; }

/* Slide lessons: one card at a time, teaching and questions */
.deck { max-width: 720px; margin: 0 auto; }
.deck-top { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.deck-top .bar { flex: 1; margin: 0; height: 12px; }
.deck-close { font-size: 1.4rem; line-height: 1; color: var(--muted); padding: .2rem .4rem; }
.deck-count { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); min-width: 4.5ch; text-align: right; }
.deck-audio { white-space: nowrap; }
.deck-audio[aria-pressed="false"] { opacity: .7; }
.deck-player { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: -.3rem 0 1rem; }
.deck-play { min-width: 8.5rem; }
.velocidades { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.chip { font: inherit; font-size: .85rem; font-weight: 600; padding: .3rem .6rem; border-radius: 999px; cursor: pointer;
        background: var(--surface); color: var(--text); border: 1.5px solid var(--border); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.deck-player select { max-width: 220px; padding: .25rem .4rem; }
@media (max-width: 600px) { .velocidades { margin-left: 0; } }
.slide { padding: 1.6rem 1.6rem 1.3rem; min-height: 420px; display: flex; flex-direction: column; animation: entrar .25s ease-out; }
.slide .prose { flex: 1; font-size: 1.12rem; }
.slide h2 { margin: .2rem 0 1rem; font-size: 1.5rem; line-height: 1.25; }
.slide-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-text); }
.slide-kicker.pregunta { color: #c27c0e; }
.slide-foot { display: flex; gap: .6rem; align-items: center; margin-top: 1.4rem; }
.slide-foot .grow { text-align: center; }
.slide-foot .btn-big { margin-left: auto; }
.btn-big { font-size: 1.1rem; padding: .85rem 1.6rem; border-radius: 14px; }
.slide.slide-cover { text-align: center; justify-content: center; align-items: center; gap: .6rem; }
.slide.slide-cover .cover-icon { font-size: 3.5rem; }
.slide.slide-cover .stars { font-size: 1.6rem; }
.answers { display: grid; gap: .7rem; margin: 1rem 0 0; }
.answer { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; font: inherit; font-size: 1.05rem; color: var(--text); cursor: pointer;
          background: var(--surface); border: 2px solid var(--border); border-radius: 14px; padding: .9rem 1rem; box-shadow: 0 4px 0 var(--border); transition: transform .08s, border-color .15s; }
.answer:hover:not(:disabled) { border-color: var(--primary); }
.answer:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--border); }
.answer .letra { flex: none; width: 2rem; height: 2rem; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; border: 2px solid var(--border); color: var(--muted); }
.answer[aria-pressed="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.answer[aria-pressed="true"] .letra { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.answer:disabled { cursor: default; }
.answer.acierto { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); box-shadow: 0 4px 0 color-mix(in srgb, var(--ok) 45%, transparent); }
.answer.acierto .letra { background: var(--ok); border-color: var(--ok); color: #fff; }
.answer.fallo { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); box-shadow: 0 4px 0 color-mix(in srgb, var(--bad) 40%, transparent); }
.answer.fallo .letra { background: var(--bad); border-color: var(--bad); color: #fff; }
.numeric-answer { display: flex; gap: .6rem; align-items: center; margin-top: 1rem; font-size: 1.1rem; }
.numeric-answer input { font: inherit; padding: .7rem .9rem; border-radius: 12px; border: 2px solid var(--border); width: 12rem; background: var(--surface); color: var(--text); }
.verdict { margin-top: 1.1rem; padding: .9rem 1rem; border-radius: 14px; animation: entrar .2s ease-out; }
.verdict strong { display: block; font-size: 1.1rem; }
.verdict.bien { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.verdict.bien strong { color: var(--ok); }
.verdict.mal { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.verdict.mal strong { color: var(--bad); }
.slide.final .big-score { font-size: 3rem; font-weight: 800; line-height: 1; }
.slide.final ul { list-style: none; padding: 0; margin: .5rem 0; }
.slide-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.deck-hint { text-align: center; margin-top: .8rem; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .slide { padding: 1.2rem 1rem 1rem; min-height: 360px; } .slide h2 { font-size: 1.25rem; } .deck-audio .txt { display: none; } }
@media (prefers-reduced-motion: reduce) { .slide, .verdict { animation: none; } }
.slide [tabindex="-1"]:focus { outline: none; }

/* Free sample and premium access */
.tag.premium { background: color-mix(in srgb, #8b5cf6 18%, transparent); color: #7c3aed; }
.free-banner { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.rm-banner.premium { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.rm-node.premium { background: color-mix(in srgb, #8b5cf6 16%, var(--surface)); color: #7c3aed; font-size: 1.6rem;
                   box-shadow: 0 7px 0 color-mix(in srgb, #8b5cf6 35%, transparent); }
.rm-unlock { position: relative; z-index: 1; margin-top: .5rem; }
.pricing-head { text-align: center; margin: 1rem auto 2rem; }
.pricing-head .lead { margin: 0 auto; }
.free-banner.premium { border-color: color-mix(in srgb, #8b5cf6 45%, var(--border)); }

/* Product code and cart */
.codigo-producto { display: flex; flex-direction: column; gap: .5rem; max-width: 560px; }
.codigo-producto label { display: flex; flex-direction: column; gap: .1rem; }
.codigo-fila { display: flex; gap: .5rem; flex-wrap: wrap; }
.codigo-fila input { flex: 1; min-width: 10rem; font: inherit; font-size: 1.05rem; padding: .6rem .8rem; border-radius: 10px;
                     border: 2px solid var(--border); background: var(--surface); color: var(--text); text-transform: uppercase; letter-spacing: .05em; }
.codigo-fila input:focus { outline: none; border-color: var(--primary-text); }
.carrito { max-width: 760px; margin: 0 auto; }
.carrito-lista { padding: .4rem 1.2rem; margin-bottom: 1rem; }
.carrito-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.carrito-item p { margin: .3rem 0; }
.carrito-precio { font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.carrito-total { display: flex; justify-content: space-between; padding: 1rem 0; font-size: 1.15rem; }
.carrito-pago { text-align: center; }

/* Course panel */
.rm-node.abierto { background: var(--surface-2); color: var(--text); box-shadow: 0 7px 0 color-mix(in srgb, var(--surface-2) 60%, #000); }
.panel-cabeza { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-cabeza h1 { margin: 0; }
.panel-tabla { overflow-x: auto; margin-bottom: 1rem; }
.panel-tabla table { width: 100%; border-collapse: collapse; }
.panel-tabla th, .panel-tabla td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.panel-tabla tr:last-child td { border-bottom: 0; }
.panel-acciones { white-space: nowrap; text-align: right; }
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.2rem; align-items: start; padding-bottom: 5rem; }
.ed-principal { min-width: 0; }
.ed-principal section { margin-bottom: 1rem; }
.ed-principal h2 { margin: 0 0 .8rem; }
.ed-lateral { position: sticky; top: 5rem; max-height: calc(100vh - 11rem); overflow-y: auto; }
.ed-lateral h3 { margin-bottom: .6rem; }
.ed-comando { display: block; font-size: .78rem; padding: .5rem; border-radius: 8px; background: var(--surface-2); overflow-wrap: anywhere; }
.ed-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; display: flex; align-items: center; gap: .6rem; padding: .7rem 1.5rem; background: var(--surface); border-top: 1px solid var(--border); }
.ed-campo { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .7rem; flex: 1; min-width: 150px; font-weight: 600; font-size: .9rem; }
.ed-campo small { font-weight: 400; }
.ed-campo.corto { flex: 0 1 130px; min-width: 110px; }
.ed-campo input, .ed-campo textarea, .ed-campo select, .ed-opcion input[type="text"], .ed-tarjeta-cabeza select {
  font: inherit; font-weight: 400; padding: .5rem .6rem; border: 1.5px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
.ed-tarjeta-cabeza select { width: auto; }
.ed-campo input[type="color"] { padding: .15rem; height: 2.4rem; }
.ed-campo textarea { resize: vertical; }
.ed-fila { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-start; }
.ed-casilla { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .6rem; }
.ed-chips { display: flex; flex-wrap: wrap; gap: .1rem 1rem; font-weight: 400; }
.ed-bloque { border: 1px solid var(--border); border-radius: 12px; margin-bottom: .6rem; background: var(--surface); }
.ed-bloque > summary { cursor: pointer; padding: .6rem .8rem; list-style-position: inside; }
.ed-bloque .ed-bloque { background: var(--bg); }
.ed-resumen { display: inline-flex; align-items: center; gap: .6rem; width: calc(100% - 1.5rem); flex-wrap: wrap; vertical-align: middle; }
.ed-cuerpo { padding: .4rem .8rem .8rem; border-top: 1px solid var(--border); }
.ed-cuerpo h4 { margin: 1rem 0 .4rem; }
.ed-orden { display: inline-flex; gap: .2rem; }
.ed-orden .btn, .ed-opcion .btn { padding: .15rem .5rem; }
.ed-quitar { background: transparent; color: var(--bad); }
.btn.btn-primary { background: var(--primary); color: var(--primary-ink); }
.ed-tarjeta { border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; margin-bottom: .6rem; background: var(--surface); }
.ed-tarjeta-cabeza { display: flex; align-items: center; gap: .6rem; justify-content: space-between; margin-bottom: .5rem; flex-wrap: wrap; }
.ed-pregunta { border-left: 4px solid #c27c0e; }
.ed-guion { margin-top: .4rem; }
.ed-guion summary { cursor: pointer; font-size: .9rem; margin-bottom: .4rem; }
.ed-alerta { color: #b45309; font-weight: 600; }
.ed-opciones { margin: .4rem 0; }
.ed-opcion { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.ed-opcion input[type="radio"], .ed-opcion input[type="checkbox"] { width: 1.15rem; height: 1.15rem; flex: none; }
.ed-agregar { display: inline-flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; }
.ed-importar { display: flex; flex-direction: column; gap: .3rem; border-style: dashed; }
.ed-aviso { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1rem; background: color-mix(in srgb, #f5a524 18%, transparent); }
.ed-errores { border-color: var(--bad); }
.ed-errores ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.ed-enlace { background: none; border: 0; padding: .1rem 0; font: inherit; color: var(--bad); cursor: pointer; text-align: left; text-decoration: underline; }
.ed-marcado { outline: 3px solid #f5a524; outline-offset: 2px; }
.ed-mapa-modulo { margin-bottom: .8rem; }
.ed-mapa-banner { color: #fff; font-size: .8rem; font-weight: 700; padding: .4rem .6rem; border-radius: 8px; margin-bottom: .4rem; }
.ed-nodo { display: flex; align-items: center; gap: .4rem; width: 100%; background: none; border: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; padding: .15rem 0; }
.ed-nodo.z1, .ed-nodo.z3 { padding-left: .9rem; }
.ed-nodo.z2 { padding-left: 1.8rem; }
.ed-nodo-punto { flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--surface-2); font-size: .75rem; }
@media (max-width: 900px) { .ed { grid-template-columns: minmax(0, 1fr); } .ed-lateral { position: static; max-height: none; } }
.ed-chips .ed-casilla span { white-space: nowrap; }

/* Interface chooser */
.portales { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.portal-card { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1.5rem; border-top: 6px solid var(--accent); }
.portal-card:hover { text-decoration: none; border-color: var(--accent); }
.portal-card strong { font-size: 1.2rem; }
.portal-card .muted { flex: 1; }
.portal-icono { font-size: 2.6rem; line-height: 1; }

/* Socials Club logo */
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-logo { border-radius: 50%; object-fit: cover; flex: none; }
.portada-logo { display: block; margin: 0 auto .6rem; }
.cert-mark { display: flex; align-items: center; justify-content: center; gap: .6rem; }

/* Each interface themes the whole page from its color (see the <style> block in base.html) */
.con-interfaz .topbar { background: var(--portal); border-bottom-color: var(--portal); color: var(--portal-ink); }
.con-interfaz .brand, .con-interfaz .account a:not(.btn):not(.avatar), .con-interfaz .account .link { color: var(--portal-ink); }
.con-interfaz .nav a { color: var(--portal-ink); }
.con-interfaz .nav a.active, .con-interfaz .nav a:hover { color: var(--portal-ink); background: color-mix(in srgb, var(--portal-ink) 18%, transparent); }
.con-interfaz .topbar .chip { background: color-mix(in srgb, var(--portal-ink) 16%, transparent); border-color: transparent; color: var(--portal-ink); }
.con-interfaz .topbar .chip[aria-pressed="true"] { background: var(--portal-ink); color: var(--portal); }
.con-interfaz .topbar .btn { background: var(--portal-ink); color: var(--portal); }
.con-interfaz .topbar .avatar { background: var(--portal-ink); color: var(--portal); }
.con-interfaz .brand-logo { box-shadow: 0 0 0 2px var(--portal-ink); }
.con-interfaz .topbar a:focus-visible, .con-interfaz .topbar button:focus-visible { outline: 2px solid var(--portal-ink); outline-offset: 2px; }

/* Profile: recommended course per interface */
.recomendado { border-top: 4px solid var(--accent, var(--border)); color: var(--text); gap: .3rem; }
a.recomendado:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.recomendado .stat-value { font-size: 1.15rem; line-height: 1.3; }

/* Sign-in pages */
.cuenta-pagina { max-width: 480px; }
.cuenta-pagina form p { margin: 0 0 .8rem; }
.cuenta-pagina label { display: block; font-weight: 600; margin-bottom: .25rem; }
.cuenta-pagina input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%; font: inherit; padding: .65rem .8rem; border: 2px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.cuenta-pagina input:focus { outline: none; border-color: var(--primary-text); }
.cuenta-pagina button[type="submit"]:not(.btn-google):not(.btn), .cuenta-pagina form button:not(.btn):not(.btn-google) {
  font: inherit; font-weight: 600; background: var(--primary); color: var(--primary-ink); border: 0; border-radius: 10px; padding: .6rem 1.1rem; cursor: pointer; }
.cuenta-pagina .errorlist { list-style: none; padding: 0; margin: 0 0 .4rem; color: var(--bad); font-size: .92rem; }
.cuenta-pagina ul:not(.errorlist) { padding-left: 1.2rem; }
.auth-enlaces { margin: 1rem 0 0; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: .7rem; width: 100%; font: inherit; font-weight: 600; padding: .65rem 1rem; cursor: pointer;
              background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 10px; }
.btn-google:hover { background: #f2f2f2; }
.auth-separador { display: flex; align-items: center; gap: .7rem; margin: 1.1rem 0; color: var(--muted); font-size: .9rem; }
.auth-separador::before, .auth-separador::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* Contacto, solicitudes y páginas de error */
.campo-oculto { position: absolute; left: -9999px; }
.btn.centrado { text-align: center; box-sizing: border-box; }
.error-pagina { max-width: 480px; margin: 3rem auto; text-align: center; }
.error-codigo { display: block; font-size: 3rem; font-weight: 800; color: var(--primary-text); line-height: 1; }

/* Mi cuenta */
.cuenta-bloque { margin-bottom: 1rem; }
.cuenta-bloque h2 { margin: 0 0 .8rem; font-size: 1.1rem; }
.cuenta-datos { margin: 0; }
.cuenta-datos > div { padding: .5rem 0; border-top: 1px solid var(--border); }
.cuenta-datos > div:first-child { border-top: 0; padding-top: 0; }
.cuenta-datos dt { color: var(--muted); font-size: .85rem; }
.cuenta-datos dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
.cuenta-fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.cuenta-bloque h2 + .cuenta-fila { border-top: 0; padding-top: 0; }
.cuenta-fila .btn { flex: none; }
.cuenta-salir { margin: 0 0 1rem; }
.cuenta-volver { display: inline-block; margin-bottom: .8rem; }
.cuenta-gestion h1 { font-size: 1.5rem; margin-top: 0; }
.cuenta-gestion form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.cuenta-gestion form.cuenta-fila { padding: .8rem 1rem; }
.btn-peligro { background: var(--bad); color: #fff; }
.rm-dia { font-weight: 700; color: var(--primary-text); }

/* Compra desde la página del curso */
.curso-compra { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .8rem 0; }
.curso-precio { font-size: 1.4rem; }

/* Hoy te toca */
.hoy-card { border-left: 5px solid var(--primary); margin: 1rem 0; }
.hoy-card.listo { border-left-color: var(--ok); }
.hoy-cabeza { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.hoy-cabeza h2 { margin: 0; font-size: 1.25rem; }
.hoy-cabeza p { margin: .2rem 0 0; }
.hoy-niveles { list-style: none; margin: .9rem 0 0; padding: 0; }
.hoy-niveles li { display: flex; align-items: baseline; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--border); }
.hoy-niveles li.actual { font-weight: 600; }
.hoy-niveles li.hecho { color: var(--muted); }
.hoy-linea { margin-top: .35rem; font-size: .9rem; font-weight: 600; }

/* Pantalla de acceso: formulario a la izquierda, logo grande a la derecha */
.account { margin-left: auto; }
.pantalla-acceso { display: grid; min-height: 100vh; min-height: 100dvh; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
.acceso-barra { grid-column: 1; padding: 1rem 1.5rem 0; }
.pantalla-acceso > main { grid-column: 1; align-self: center; width: 100%; max-width: 480px; padding: 1.5rem 1rem; justify-self: center; }
.pantalla-acceso > .footer { grid-column: 1; padding: 1rem; }
.pantalla-acceso .auth { margin: 0; }
.acceso-logo { grid-column: 2; grid-row: 1 / -1; display: grid; place-items: center; padding: 2rem; background: #ffffff; }
.acceso-logo img { display: block; width: min(72%, 460px); height: auto; }
@media (max-width: 820px) {
  .pantalla-acceso { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; }
  .acceso-logo { grid-column: 1; grid-row: 1; padding: 1.25rem; }
  .acceso-logo img { width: 120px; }
  .acceso-barra { grid-row: 2; padding: .75rem 1rem 0; }
  .pantalla-acceso > main { grid-row: 3; align-self: start; }
  .pantalla-acceso > .footer { grid-row: 4; }
}
