/* Pithy Academy · estilos */
:root {
  --ink: #0F2B33;
  --ink-2: #16394300;
  --ink-soft: #1B3C46;
  --paper: #F3F6F7;
  --surface: #FFFFFF;
  --line: #DCE4E7;
  --line-2: #C6D3D8;
  --text: #14262C;
  --text-2: #3E555D;
  --muted: #64787F;
  --brand: #00B4C8;
  --brand-deep: #00788A;
  --brand-wash: #E3F6F8;
  --ok: #1E9E6A;
  --ok-wash: #E4F5EC;
  --mid: #C27F12;
  --mid-wash: #FCF1DC;
  --bad: #CF3F55;
  --bad-wash: #FCE8EB;
  --r-s: 8px;
  --r: 14px;
  --r-l: 22px;
  --shadow: 0 1px 2px rgba(15, 43, 51, .06), 0 8px 24px -12px rgba(15, 43, 51, .18);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-deep); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(22px, 2.6vw, 28px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- botones y campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background .18s, border-color .18s, transform .18s var(--ease), box-shadow .18s;
}
.btn .ic { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); box-shadow: 0 6px 18px -8px rgba(15, 43, 51, .6); }
.btn-brand { background: var(--brand); color: var(--ink); }
.btn-brand:hover { background: #22C6D8; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-2); background: var(--surface); }
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255, 255, 255, .24); }
.btn-danger { background: transparent; border-color: rgba(207, 63, 85, .45); color: var(--bad); }
.btn-danger:hover { background: var(--bad-wash); }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-deep); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand-deep); box-shadow: 0 0 0 4px var(--brand-wash); }
textarea.input { min-height: 180px; resize: vertical; line-height: 1.55; }
.form-err { color: var(--bad); font-size: 14px; min-height: 22px; margin: 0 0 10px; font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--paper); color: var(--text-2); border: 1px solid var(--line);
}
.chip .ic { width: 14px; height: 14px; }
.chip-ok { background: var(--ok-wash); color: var(--ok); border-color: transparent; }
.chip-mid { background: var(--mid-wash); color: var(--mid); border-color: transparent; }
.chip-bad { background: var(--bad-wash); color: var(--bad); border-color: transparent; }
.chip-brand { background: var(--brand-wash); color: var(--brand-deep); border-color: transparent; }
.chip-dark { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .22); }

/* ---------- login ---------- */
.login {
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background: var(--ink); color: #fff;
}
.login-media { position: relative; overflow: hidden; }
.login-media > video, .login-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(15, 43, 51, .2), rgba(15, 43, 51, .92) 78%); }
.login-copy { position: absolute; z-index: 2; left: clamp(24px, 5vw, 64px); right: clamp(24px, 5vw, 64px); bottom: clamp(28px, 6vw, 72px); }
.login-copy img { height: 30px; margin-bottom: 36px; }
.login-copy h1 { font-size: clamp(36px, 5.4vw, 68px); line-height: 1; max-width: 12ch; }
.login-copy p { color: rgba(255, 255, 255, .78); font-size: 18px; max-width: 46ch; margin: 18px 0 0; }
.login-depts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.login-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--paper); color: var(--text); }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { margin-bottom: 6px; }
.login-card .lead { color: var(--muted); margin-bottom: 26px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  background: var(--ink); color: #fff; padding: 22px 14px;
}
.side-logo { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px 22px; text-decoration: none; color: #fff; }

.side-logo img { height: 22px; width: auto; align-self: flex-start; }
.side-logo span { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; color: var(--brand); }
.nav-group { font-size: 12.5px; color: rgba(255, 255, 255, .5); padding: 16px 12px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 600; font-size: 15px; position: relative;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.on { background: rgba(0, 180, 200, .16); color: #fff; }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.nav .badge { margin-left: auto; background: var(--brand); color: var(--ink); font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.side-user b { display: block; font-size: 14px; line-height: 1.2; }
.side-user small { color: rgba(255, 255, 255, .6); font-size: 12.5px; }
.side-user button { margin-left: auto; background: none; border: 0; color: rgba(255, 255, 255, .7); padding: 6px; border-radius: 8px; }
.side-user button:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.avatar {
  --h: 188; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: hsl(var(--h) 60% 42%); color: #fff; font-weight: 800; font-family: var(--display); font-size: 15px;
}
.avatar.xl { width: 84px; height: 84px; font-size: 32px; }
.main { min-width: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: 32px clamp(16px, 3.5vw, 44px) 96px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }
.topbar { display: none; }
.tabbar { display: none; }
.view-in { animation: viewIn .4s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- tarjetas y secciones ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; }
.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--line-2); }
.loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero de inicio ---------- */
.hero {
  position: relative; border-radius: 28px; overflow: hidden; color: #fff; background: var(--ink);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); min-height: 300px;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15, 43, 51, .97) 30%, rgba(15, 43, 51, .55) 70%, rgba(15, 43, 51, .2)); }
.hero > div { position: relative; z-index: 2; }
.hero-copy { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; justify-content: flex-end; }
.hero-copy .chip-dark { align-self: flex-start; margin-bottom: 18px; }
.hero-copy h1 { color: #fff; }
.hero-copy p { color: rgba(255, 255, 255, .78); margin: 12px 0 0; max-width: 44ch; font-size: 17px; }
.hero-next { padding: clamp(18px, 3vw, 32px); display: flex; align-items: flex-end; justify-content: flex-end; }
.next-card {
  width: 100%; max-width: 380px; background: rgba(255, 255, 255, .96); color: var(--text); border-radius: 20px; padding: 20px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5);
}
.next-card small { color: var(--muted); font-weight: 600; font-size: 13px; }
.next-card h3 { margin: 6px 0 4px; font-size: 20px; }
.next-card .meta { display: flex; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.next-card .meta span { display: inline-flex; gap: 5px; align-items: center; }
.next-card .meta .ic { width: 16px; height: 16px; }
.next-card .btn { width: 100%; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.stat-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand-deep); flex: none; }
.stat-ic.fire { background: #FFF0E3; color: #E06A1B; }
.stat-ic.ok { background: var(--ok-wash); color: var(--ok); }
.stat-ic.star { background: #F0EBFF; color: #6B4BD8; }
.stat b { display: block; font-family: var(--display); font-size: 24px; line-height: 1.1; }
.stat span { font-size: 13.5px; color: var(--muted); }
.xpbar { height: 6px; border-radius: 999px; background: var(--line); margin-top: 6px; overflow: hidden; width: 100%; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #6B4BD8, var(--brand)); border-radius: inherit; }

/* ---------- la ruta (línea de metro) ---------- */
.section-head .chip { white-space: nowrap; }
.c0-details { margin-top: 12px; }
.c0-details > summary { cursor: pointer; display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: var(--brand-deep); padding: 10px 4px; list-style: none; }
.c0-details > summary::-webkit-details-marker { display: none; }
.c0-details > summary .ic { width: 18px; height: 18px; }
.c0-dhead { font-size: 15px; margin: 18px 16px 6px; color: var(--muted); }
.c0-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: 0 24px 50px -40px rgba(15, 43, 51, .5); }
.c0-card-head { display: flex; gap: 20px; align-items: center; }
.c0-card h2 { margin: 8px 0 4px; }
.c0-card p { margin: 0; color: var(--muted); }
.c0-badge { flex: none; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; }
.c0-badge .ic { width: 32px; height: 32px; }
.c0-badge.sm { width: 48px; height: 48px; border-radius: 14px; }
.c0-badge.sm .ic { width: 24px; height: 24px; }
.c0-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 14px; color: var(--muted); font-weight: 600; }
.c0-meta span { display: inline-flex; gap: 6px; align-items: center; }
.c0-meta .ic { width: 16px; height: 16px; }
.c0-meta.dark { color: rgba(255, 255, 255, .8); }
.c0-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 20px; }
.c0-part-mini { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--paper); text-decoration: none; color: inherit; border: 1px solid transparent; }
.c0-part-mini:hover { border-color: var(--line-2); }
.c0-part-mini b { font-size: 14.5px; line-height: 1.25; min-height: 2.5em; }
.c0-part-mini small { color: var(--muted); font-size: 12.5px; }
.c0-part-mini.done { background: var(--ok-wash); }
.c0-pn { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-deep); }
.c0-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; background: var(--ink); color: #fff; border-radius: 28px; padding: clamp(24px, 4vw, 44px); margin-bottom: 20px; }
.c0-hero h1 { color: #fff; margin: 14px 0 10px; }
.c0-hero p { color: rgba(255, 255, 255, .78); max-width: 62ch; margin: 0; }
.c0-hero-ring { display: grid; justify-items: center; gap: 8px; }
.c0-hero-ring small { color: rgba(255, 255, 255, .7); }
.c0-part .section-head h2 { margin: 2px 0 4px; }
.tour { text-align: center; }
.tour .lead { margin: 10px auto 18px; max-width: 46ch; }
.tour-ic { width: 76px; height: 76px; margin: 4px auto 14px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; }
.tour-ic .ic { width: 38px; height: 38px; }
.tour-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.tour-dots i.on { width: 24px; border-radius: 8px; background: var(--brand-deep); }
.tour .modal-actions { justify-content: center; }
@media (max-width: 760px) { .c0-hero { grid-template-columns: minmax(0, 1fr); } .c0-card-head { flex-wrap: wrap; } }
.m0-list { padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 4px 12px; }
.m0-row { display: grid; grid-template-columns: 34px 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: inherit; }
.m0-row:hover { background: var(--paper); }
.m0-n { grid-row: 1 / 3; font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--muted); text-align: center; }
.m0-ic { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: hsl(var(--h) 70% 95%); color: hsl(var(--h) 65% 35%); }
.m0-ic .ic { width: 20px; height: 20px; }
.m0-row b { font-size: 15px; line-height: 1.25; }
.m0-row small { color: var(--muted); font-size: 13px; }
.m0-row.done .m0-ic { background: var(--ok-wash); color: var(--ok); }
.m0-row.locked { opacity: .55; }
.route { position: relative; padding: 26px 8px 8px; overflow-x: auto; scrollbar-width: thin; }
.route-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); min-width: max-content; }
.route-line { position: absolute; top: 28px; height: 8px; border-radius: 8px; background: var(--line); pointer-events: none; }
.route-line i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand-deep), var(--brand)); animation: grow 1.4s var(--ease) .25s forwards; }
@keyframes grow { to { width: var(--w); } }
@media (prefers-reduced-motion: reduce) { .route-line i { width: var(--w); } }
.station { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 8px; text-decoration: none; color: inherit; }
.station-dot {
  --c: hsl(var(--h) 65% 42%);
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface);
  border: 4px solid var(--line-2); color: var(--muted); position: relative; z-index: 1; transition: transform .25s var(--ease);
  animation: pop .5s var(--ease) both; animation-delay: calc(var(--i) * 90ms + .1s);
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.station:hover .station-dot { transform: translateY(-3px); }
.station-dot .ic { width: 26px; height: 26px; }
.station.done .station-dot { background: var(--c); border-color: var(--c); color: #fff; }
.station.now .station-dot { border-color: var(--c); color: var(--c); box-shadow: 0 0 0 0 hsl(var(--h) 65% 42% / .45); animation: pop .5s var(--ease) both, pulse 2.2s ease-out 1.2s infinite; animation-delay: calc(var(--i) * 90ms + .1s), 1.4s; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 hsl(var(--h) 65% 42% / .45); } 80%, 100% { box-shadow: 0 0 0 16px hsl(var(--h) 65% 42% / 0); } }
.station.locked .station-dot { background: var(--paper); border-style: dashed; }
.station-check { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; border: 3px solid var(--paper); }
.station-check .ic { width: 12px; height: 12px; stroke-width: 3.5; }
.station-num { font-size: 12.5px; color: var(--muted); margin-top: 12px; font-weight: 700; }
.station-name { font-weight: 700; font-size: 14.5px; line-height: 1.25; margin-top: 2px; max-width: 16ch; }
.station-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.station.now .station-name { color: var(--text); }
.station.locked .station-name { color: var(--muted); }

/* ruta vertical (perfil, móvil) */
.vroute { list-style: none; margin: 0; padding: 0; }
.vroute li { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; position: relative; padding: 10px 0; }
.vroute li::before { content: ''; position: absolute; left: 21px; top: 0; bottom: 0; width: 4px; background: var(--line); }
.vroute li:first-child::before { top: 50%; }
.vroute li:last-child::before { bottom: 50%; }
.vroute li.done::before { background: var(--brand); }
.vroute .vdot { --c: hsl(var(--h) 65% 42%); width: 46px; height: 46px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-2); display: grid; place-items: center; position: relative; color: var(--muted); }
.vroute li.done .vdot { background: var(--c); border-color: var(--c); color: #fff; }
.vroute li.now .vdot { border-color: var(--c); color: var(--c); }
.vroute .vdot .ic { width: 20px; height: 20px; }
.vroute a { color: inherit; text-decoration: none; font-weight: 700; }
.vroute small { display: block; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .6s var(--ease); }
.bar.ok i { background: var(--ok); }
.bar.mid i { background: var(--mid); }
.bar.bad i { background: var(--bad); }
.topics { display: grid; gap: 4px; padding: 10px 14px; }
.topic { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) 52px 96px; gap: 14px; align-items: center; padding: 10px 6px; border-radius: 10px; text-decoration: none; color: inherit; font-size: 15px; }
.topic:hover { background: var(--paper); }
.topic b { text-align: right; font-variant-numeric: tabular-nums; }
.topic small { color: var(--muted); }
@media (max-width: 600px) { .topic { grid-template-columns: minmax(0, 1fr) 52px; } .topic .bar { grid-column: 1 / -1; grid-row: 2; } .topic small { display: none; } }

/* ---------- portadas de curso ---------- */
.cover { position: relative; overflow: hidden; background: hsl(var(--h) 60% 38%); color: #fff; }
.cover svg.art { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover .cover-ic { position: absolute; right: 18px; bottom: 14px; width: 56px; height: 56px; opacity: .95; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ccard {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  text-decoration: none; color: inherit; transition: transform .25s var(--ease), box-shadow .25s;
}
.ccard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ccard .cover { height: 128px; }
.ccard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ccard-body h3 { font-size: 17.5px; }
.ccard-body p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.ccard-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.ccard-foot .bar { flex: 1; }
.ccard.locked { opacity: .72; }
.ccard .lock-badge { position: absolute; top: 12px; left: 12px; z-index: 2; }

/* ---------- departamentos (catálogo) ---------- */
.dept-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; scrollbar-width: none; }
.dept-tab { text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; border: 1.5px solid var(--line-2);
  background: var(--surface); font-weight: 700; font-size: 14.5px; white-space: nowrap; color: var(--text-2);
}
.dept-tab .ic { width: 17px; height: 17px; }
.dept-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dept-banner { position: relative; border-radius: 24px; overflow: hidden; color: #fff; padding: clamp(22px, 4vw, 36px); margin-bottom: 22px; background: var(--ink); }
.dept-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.dept-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, hsl(var(--h) 55% 16% / .96) 35%, hsl(var(--h) 55% 22% / .55)); }
.dept-banner > * { position: relative; z-index: 2; }
.dept-banner h2 { color: #fff; font-size: clamp(26px, 3vw, 34px); }
.dept-banner p { color: rgba(255, 255, 255, .8); max-width: 56ch; margin: 8px 0 0; }

/* ---------- página de curso ---------- */
.course-hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: stretch; }
.course-cover { border-radius: 26px; min-height: 260px; padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; }
.course-cover > *:not(svg) { position: relative; z-index: 2; }
.course-cover h1 { color: #fff; max-width: 18ch; }
.course-cover p { color: rgba(255, 255, 255, .86); font-size: 17px; margin: 10px 0 0; max-width: 50ch; }
.course-cover .cover-ic { width: 110px; height: 110px; right: 26px; top: 26px; bottom: auto; opacity: .3; }
.course-side { display: flex; flex-direction: column; gap: 14px; }
.course-side .card { padding: 20px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kv div b { display: block; font-family: var(--display); font-size: 20px; }
.kv div span { font-size: 13px; color: var(--muted); }
.ring { --p: 0; --c: var(--brand); width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); position: relative; flex: none; }
.ring::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.ring > * { position: relative; text-align: center; line-height: 1.1; }
.ring b { font-family: var(--display); font-size: 30px; display: block; }
.ring small { font-size: 12.5px; color: var(--muted); }
.ring.sm { width: 64px; height: 64px; }
.ring.sm::before { inset: 6px; }
.ring.sm b { font-size: 16px; }
.course-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; margin-top: 32px; align-items: start; }
.lessons { list-style: none; margin: 0; padding: 0; }
.lessons li a {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px;
  border-radius: 16px; text-decoration: none; color: inherit; position: relative;
}
.lessons li a:hover { background: var(--surface); }
.lessons li + li { margin-top: 2px; }
.lnum { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-family: var(--display); border: 2px solid var(--line-2); color: var(--muted); background: var(--surface); }
.lessons li.done .lnum { background: var(--ok); border-color: var(--ok); color: #fff; }
.lessons li.next .lnum { border-color: var(--brand-deep); color: var(--brand-deep); }
.lessons b { display: block; font-size: 16px; }
.lessons small { color: var(--muted); font-size: 14px; display: block; line-height: 1.4; }
.lessons .ltime { color: var(--muted); font-size: 13.5px; display: flex; gap: 5px; align-items: center; }
.lessons .ltime .ic { width: 15px; height: 15px; }
.exam-card { background: var(--ink); color: #fff; border-radius: 22px; padding: 22px; position: relative; overflow: hidden; }
.exam-card h3 { color: #fff; font-size: 20px; }
.exam-card p { color: rgba(255, 255, 255, .75); font-size: 14.5px; margin: 6px 0 16px; }
.exam-card .btn { width: 100%; }
.exam-card .kv span { color: rgba(255, 255, 255, .6); }
.exam-card .kv { margin-bottom: 16px; }
.attempts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.attempts a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; font-size: 14px; }
.attempts a:hover { background: rgba(255, 255, 255, .13); }
.outcomes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.outcomes li { display: flex; gap: 10px; font-size: 15px; }
.outcomes .ic { color: var(--ok); width: 18px; height: 18px; margin-top: 3px; }
details.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-top: 18px; }
details.sheet summary { list-style: none; padding: 16px 20px; display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
details.sheet summary::-webkit-details-marker { display: none; }
details.sheet summary .ic:last-child { margin-left: auto; transition: transform .2s; }
details.sheet[open] summary .ic:last-child { transform: rotate(90deg); }
details.sheet .prose { padding: 0 20px 20px; font-size: 15px; }

/* ---------- lección ---------- */
.reader { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.outline { position: sticky; top: 24px; }
.outline a.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; font-size: 14.5px; margin-bottom: 16px; }
.outline ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.outline li a { display: block; padding: 8px 0 8px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.outline li a:hover { color: var(--text); }
.outline li.on a { border-left-color: var(--brand-deep); color: var(--text); font-weight: 700; }
.outline li.done a::after { content: ' ✓'; color: var(--ok); font-weight: 800; }
.lesson-top { position: sticky; top: 0; z-index: 30; height: 4px; background: transparent; }
.lesson-top i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .1s linear; }
.lesson-head { margin-bottom: 26px; }
.lesson-head .row { color: var(--muted); font-size: 14.5px; margin-bottom: 12px; }
.lesson-head p { font-size: 19px; color: var(--text-2); margin: 12px 0 0; max-width: 60ch; }
.lesson-banner { height: 120px; border-radius: 20px; margin-bottom: 26px; }

.prose { max-width: 70ch; font-size: 17px; line-height: 1.72; color: var(--text); }
.prose h2 { font-size: 25px; margin: 1.8em 0 .5em; }
.prose h3 { font-size: 20px; margin: 1.5em 0 .4em; }
.prose h4 { font-size: 17px; margin: 1.3em 0 .3em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--brand-deep); font-weight: 700; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--brand); color: var(--text-2); font-style: italic; }
.prose code { font-size: .88em; background: #E8EEF0; padding: 2px 6px; border-radius: 6px; }
.prose pre.code { background: var(--ink); color: #E3F6F8; padding: 16px 18px; border-radius: 14px; overflow-x: auto; font-size: 14px; line-height: 1.55; }
.prose pre.code code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose strong { font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th { text-align: left; background: var(--paper); font-weight: 700; color: var(--text-2); }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }

.callout { --cc: var(--brand-deep); --cw: var(--brand-wash); margin: 1.4em 0; border-radius: 16px; background: var(--cw); padding: 16px 20px; }
.callout-head { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--cc); font-size: 15px; margin-bottom: 6px; }
.callout-head svg { width: 19px; height: 19px; }
.callout-body { font-size: 16px; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-warn { --cc: var(--mid); --cw: var(--mid-wash); }
.callout-pithy { --cc: #fff; --cw: var(--ink); color: rgba(255, 255, 255, .9); }
.callout-pithy .callout-head { color: var(--brand); }
.callout-pithy code { background: rgba(255, 255, 255, .12); color: #fff; }
.callout-pithy a { color: var(--brand); }
.callout-example { --cc: #6B4BD8; --cw: #F0EBFF; }
.callout-key { --cc: var(--text); --cw: var(--surface); border: 2px solid var(--text); }
.callout-key li::marker { color: var(--brand-deep); }
.callout-bad { --cc: var(--bad); --cw: var(--bad-wash); }
.callout-good { --cc: var(--ok); --cw: var(--ok-wash); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 1.4em 0; }
.compare .callout { margin: 0; }
.steps { margin: 1.4em 0; }
.steps-title { font-weight: 800; margin-bottom: 10px; }
.steps ol { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 16px; margin: 0; }
.steps li:not(:last-child)::before { content: ''; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line-2); }
.step-n { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: var(--display); font-size: 15px; }
.steps li > div { padding-top: 4px; }
.chat-mock { margin: 1.4em 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); font-size: 15px; line-height: 1.5; }
.chat-head { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-weight: 800; background: #FBFCFC; }
.chat-hash { color: var(--muted); font-weight: 600; }
.chat-body { padding: 10px 6px; }
.chat-msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 6px 10px; border-radius: 8px; }
.chat-msg:hover { background: var(--paper); }
.chat-msg.cont { padding-top: 0; }
.chat-av { width: 36px; height: 36px; border-radius: 9px; background: hsl(var(--h) 55% 45%); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.chat-msg.cont .chat-av { height: 0; background: none; }
.chat-name { font-weight: 800; font-size: 14.5px; }
.chat-note { text-align: center; color: var(--muted); font-size: 13px; padding: 6px; }

/* mini-práctica */
.practice { margin-top: 44px; border-radius: 22px; background: var(--surface); border: 2px solid var(--ink); padding: 24px; max-width: 70ch; }
.practice-head { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--brand-deep); margin-bottom: 6px; }
.practice h3 { font-size: 20px; margin-bottom: 16px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: var(--surface); font-size: 16px; line-height: 1.45; transition: border-color .15s, background .15s, transform .15s var(--ease);
}
.opt:hover:not(:disabled) { border-color: var(--text-2); }
.opt:active:not(:disabled) { transform: scale(.99); }
.opt .mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; margin-top: 1px; font-size: 12px; font-weight: 800; color: var(--muted); }
.opt.square .mark { border-radius: 7px; }
.opt.sel { border-color: var(--ink); background: #F1F5F6; }
.opt.sel .mark { background: var(--ink); border-color: var(--ink); color: #fff; }
.opt.right { border-color: var(--ok); background: var(--ok-wash); }
.opt.right .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-wash); }
.opt.wrong .mark { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt:disabled { cursor: default; }
.feedback { margin-top: 14px; padding: 14px 16px; border-radius: 14px; font-size: 15.5px; animation: viewIn .35s var(--ease) both; }
.feedback.ok { background: var(--ok-wash); }
.feedback.no { background: var(--mid-wash); }
.feedback b { display: block; margin-bottom: 2px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; max-width: 70ch; flex-wrap: wrap; }

/* ---------- examen ---------- */
.exam-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.exam-top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; padding: 12px clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: 16px; }
.exam-top b { font-family: var(--display); font-size: 16px; }
.exam-top small { display: block; color: rgba(255, 255, 255, .6); font-size: 12.5px; }
.timer { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-variant-numeric: tabular-nums; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.timer.over { background: var(--mid); color: var(--ink); }
.qdots { display: flex; gap: 4px; padding: 14px clamp(16px, 3vw, 32px) 0; max-width: 860px; margin: 0 auto; width: 100%; flex-wrap: wrap; }
.qdots button { flex: 1; min-width: 18px; height: 8px; border-radius: 999px; border: 0; background: var(--line); padding: 0; }
.qdots button.ans { background: var(--brand); }
.qdots button.cur { background: var(--ink); }
.qwrap { max-width: 860px; width: 100%; margin: 0 auto; padding: 28px clamp(16px, 3vw, 32px) 120px; flex: 1; }
.qcount { color: var(--muted); font-weight: 700; font-size: 14.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qprompt { font-family: var(--display); font-size: clamp(21px, 2.4vw, 27px); line-height: 1.25; margin: 12px 0 18px; font-weight: 700; letter-spacing: -.01em; }
.qcontext { margin-bottom: 20px; }
.qcontext .prose { max-width: none; font-size: 15.5px; }
.qcontext > .prose { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }
.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.order-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line-2); transition: transform .2s var(--ease), border-color .2s; }
.order-list li.moved { border-color: var(--brand); }
.order-list .pos { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.order-list .mv { display: flex; gap: 4px; }
.order-list .mv button { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; }
.order-list .mv button:hover:not(:disabled) { border-color: var(--text-2); }
.order-list .mv button:disabled { opacity: .3; }
.order-list .mv .ic { width: 16px; height: 16px; }
.open-meta { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.exam-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(243, 246, 247, .94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.exam-bottom > div { max-width: 860px; margin: 0 auto; padding: 14px clamp(16px, 3vw, 32px); display: flex; justify-content: space-between; gap: 10px; }
.exam-intro { max-width: 640px; margin: 0 auto; padding: 48px 20px; }
.exam-intro .card { padding: 32px; }
.rules { list-style: none; padding: 0; margin: 20px 0 26px; display: grid; gap: 12px; }
.rules li { display: flex; gap: 12px; align-items: flex-start; }
.rules .ic { color: var(--brand-deep); margin-top: 2px; }
.review-list { display: grid; gap: 8px; margin: 18px 0; }
.review-list button { display: flex; justify-content: space-between; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.review-list button.miss { border-color: var(--mid); background: var(--mid-wash); }
.review-list button b { white-space: nowrap; }

/* resultado */
.result-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; padding: 32px; border-radius: 28px; color: #fff; background: var(--ink); position: relative; overflow: hidden; }
.result-hero.pass { background: linear-gradient(130deg, #0E5D4A, #0F2B33 70%); }
.result-hero h1 { color: #fff; }
.result-hero p { color: rgba(255, 255, 255, .8); margin: 10px 0 18px; max-width: 52ch; font-size: 17px; }
.result-hero .ring { width: 150px; height: 150px; --c: var(--brand); }
.result-hero.pass .ring { --c: #3DDC97; }
.result-hero .ring::before { background: var(--ink); }
.result-hero.pass .ring::before { background: #0F3D3A; }
.result-hero .ring b { font-size: 40px; color: #fff; }
.result-hero .ring small { color: rgba(255, 255, 255, .7); }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
.qresult { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: grid; gap: 8px; }
.qresult + .qresult { margin-top: 10px; }
.qresult-head { display: flex; gap: 12px; align-items: flex-start; }
.qresult-head .st { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.qresult-head .st .ic { width: 15px; height: 15px; stroke-width: 3; }
.st.ok { background: var(--ok); }
.st.no { background: var(--bad); }
.st.part { background: var(--mid); }
.st.wait { background: var(--muted); }
.qresult-head b { flex: 1; font-size: 16px; line-height: 1.4; }
.qresult-head span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.qresult .ans { font-size: 15px; color: var(--text-2); padding-left: 40px; }
.qresult .ans em { color: var(--muted); font-style: normal; font-weight: 600; }
.qresult .ans pre { white-space: pre-wrap; font: inherit; margin: 4px 0 0; background: var(--paper); border-radius: 10px; padding: 10px 12px; }

/* ---------- perfil ---------- */
.profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.profile-head h1 { font-size: clamp(28px, 3.4vw, 38px); }
.profile-head p { margin: 4px 0 0; color: var(--muted); }
.level-card { background: var(--ink); color: #fff; border-radius: 22px; padding: 20px 22px; min-width: 260px; }
.level-card small { color: rgba(255, 255, 255, .6); font-weight: 600; }
.level-card b { display: block; font-family: var(--display); font-size: 24px; }
.level-card .xpbar { background: rgba(255, 255, 255, .15); height: 8px; margin: 10px 0 6px; }
.level-card span { font-size: 13px; color: rgba(255, 255, 255, .7); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.badge-item { text-align: center; padding: 16px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.badge-medal { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: linear-gradient(140deg, #FFD36E, #F29D38); color: #5A3300; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.badge-medal .ic { width: 26px; height: 26px; }
.badge-item b { display: block; font-size: 14px; line-height: 1.2; }
.badge-item small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.badge-item.off .badge-medal { background: var(--paper); color: var(--line-2); box-shadow: none; border: 2px dashed var(--line-2); }
.badge-item.off b { color: var(--muted); }
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cert { border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.cert .cover { height: 76px; }
.cert div.body { padding: 14px 16px; }
.cert b { display: block; }
.cert small { color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 14px; padding: 8px 0; position: relative; font-size: 14.5px; }
.timeline li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 7px; }
.timeline li::after { content: ''; position: absolute; left: 4px; top: 22px; bottom: -8px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline small { display: block; color: var(--muted); font-size: 13px; }
.timeline .warnline::before { background: var(--mid); }

/* certificado imprimible */
.certificate { max-width: 900px; margin: 30px auto; background: #fff; border-radius: 8px; padding: 60px; position: relative; border: 1px solid var(--line); text-align: center; }
.certificate::before { content: ''; position: absolute; inset: 14px; border: 2px solid var(--ink); border-radius: 4px; pointer-events: none; }
.certificate .seal { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: var(--ink); color: var(--brand); }
.certificate .seal .ic { width: 44px; height: 44px; }
.certificate h1 { font-size: 46px; margin: 10px 0; }
.certificate .who { font-family: var(--display); font-size: 34px; color: var(--brand-deep); margin: 18px 0; }
.certificate .logo-dark { height: 26px; margin: 26px auto 0; background: var(--ink); padding: 8px 14px; border-radius: 8px; box-sizing: content-box; }

/* ---------- ayuda ---------- */
.search-big { position: relative; max-width: 640px; }
.search-big .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-big input { padding: 16px 18px 16px 48px; font-size: 17px; border-radius: 999px; }
.results { margin-top: 14px; display: grid; gap: 8px; max-width: 760px; }
.results a { display: block; padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.results a:hover { border-color: var(--line-2); }
.results small { color: var(--brand-deep); font-weight: 700; font-size: 13px; }
.results b { display: block; }
.results p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.results mark { background: #FFF1B8; color: inherit; border-radius: 3px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--text-2); }
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.sheet-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.sheet-card .cover { height: 64px; }
.sheet-card .cover .cover-ic { width: 34px; height: 34px; bottom: 14px; }
.sheet-card h3 { padding: 14px 18px 0; }
.sheet-card .prose { padding: 4px 18px 18px; font-size: 14.5px; line-height: 1.6; max-height: 340px; overflow: auto; }
.sheet-card .prose h2, .sheet-card .prose h3 { font-size: 16px; margin-top: 1em; }

/* ---------- panel admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.kpi b { display: block; font-family: var(--display); font-size: 32px; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 14px; }
.kpi.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.dark span { color: rgba(255, 255, 255, .7); }
.deptbars { display: grid; gap: 14px; }
.deptbar { display: grid; grid-template-columns: 34px minmax(0, 170px) minmax(0, 1fr) 46px; gap: 12px; align-items: center; font-size: 14.5px; }
.deptbar .dic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: hsl(var(--h) 60% 94%); color: hsl(var(--h) 60% 32%); }
.deptbar .dic .ic { width: 18px; height: 18px; }
.deptbar .bar { height: 10px; }
.deptbar .bar i { background: hsl(var(--h) 60% 42%); }
.deptbar em { font-style: normal; color: var(--muted); font-size: 13px; display: block; }
.deptbar b.v { text-align: right; font-variant-numeric: tabular-nums; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px; border-bottom: 1px solid var(--line); align-items: center; }
.toolbar .input { width: auto; padding: 9px 12px; border-radius: 10px; }
.toolbar .search { flex: 1; min-width: 200px; }
.tbl-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FBFCFC; }
.tbl th[data-sort] { cursor: pointer; user-select: none; }
.tbl th[data-sort]:hover { color: var(--text); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #F7FAFA; }
.who { display: flex; gap: 10px; align-items: center; }
.who b { display: block; line-height: 1.2; }
.who small { color: var(--muted); font-size: 13px; }
.who .avatar { width: 34px; height: 34px; font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.flag { color: var(--mid); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.flag .ic { width: 15px; height: 15px; }
.person-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.decision { display: inline-flex; border: 1.5px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); flex-wrap: wrap; }
.decision button { border: 0; background: none; padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--text-2); }
.decision button.on[data-v="avanza"] { background: var(--ok); color: #fff; }
.decision button.on[data-v="revision"] { background: var(--mid); color: #fff; }
.decision button.on[data-v="no_avanza"] { background: var(--bad); color: #fff; }
.decision button.on[data-v="pendiente"] { background: var(--ink); color: #fff; }
.pcourse { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pcourse:last-child { border-bottom: 0; }
.pcourse .cover { width: 52px; height: 52px; border-radius: 14px; }
.pcourse .cover .cover-ic { width: 24px; height: 24px; right: 14px; bottom: 14px; }
.pcourse small { color: var(--muted); display: block; font-size: 13.5px; }
.pcourse .att { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pcourse .att a { text-decoration: none; }
.integrity { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.integrity div { background: var(--paper); border-radius: 12px; padding: 12px; }
.integrity b { font-family: var(--display); font-size: 22px; display: block; }
.integrity span { font-size: 13px; color: var(--muted); }
.notes { display: grid; gap: 10px; margin-top: 12px; }
.note { background: var(--paper); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.note small { color: var(--muted); display: block; margin-top: 4px; }
.grade-box { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 10px; align-items: start; margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--brand-wash); }
.rubric { margin: 6px 0 0; padding-left: 20px; font-size: 14.5px; color: var(--text-2); }
.hard { font-size: 14px; color: var(--text-2); margin: 6px 0 0; padding-left: 18px; }

/* ---------- análisis: cursos, banco de preguntas y matriz ---------- */
a.deptbar { text-decoration: none; color: inherit; border-radius: 12px; padding: 4px; margin: -4px; }
a.deptbar:hover { background: var(--paper); }
.deptbar .dic { font-weight: 800; font-family: var(--display); }
.mini-cover { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.mini-cover .cover-ic { width: 22px; height: 22px; right: 11px; bottom: 11px; }
.mini-cover.lg { width: 84px; height: 84px; border-radius: 22px; }
.mini-cover.lg .cover-ic { width: 40px; height: 40px; right: 22px; bottom: 22px; }
.bank-group { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 14px; overflow: hidden; }
.bank-head { padding: 10px 18px; background: #FBFCFC; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 14px; color: var(--text-2); }
.bank-q { padding: 16px 18px; font-size: 15px; }
.bank-q + .bank-q { border-top: 1px dashed var(--line-2); }
.bank-opts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.bank-opts li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 10px; background: var(--paper); font-size: 14.5px; }
.bank-opts li.ok { background: var(--ok-wash); color: #11603F; font-weight: 600; }
.bank-opts .ic { width: 17px; height: 17px; color: var(--ok); margin-top: 2px; }
.bank-opts .dot { width: 17px; height: 17px; flex: none; display: grid; place-items: center; }
.bank-opts .dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.bank-order { margin: 10px 0 0; padding-left: 22px; font-size: 14.5px; }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.matrix thead th:first-child { background: #FBFCFC; }
.matrix tbody tr { cursor: default; }
.matrix th { white-space: normal; min-width: 92px; font-size: 12.5px; line-height: 1.25; }
.mx { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 58px; padding: 5px 8px; border-radius: 9px; font-weight: 800; font-size: 13.5px; text-decoration: none; font-variant-numeric: tabular-nums; }
.mx .ic { width: 14px; height: 14px; stroke-width: 3; }
.mx small { font-weight: 600; opacity: .75; margin-left: 2px; }
.mx.ok { background: var(--ok-wash); color: var(--ok); }
.mx.mid { background: var(--mid-wash); color: var(--mid); }
.mx.bad { background: var(--bad-wash); color: var(--bad); }
.mx.run { background: var(--brand-wash); color: var(--brand-deep); }
.mx.off { color: var(--line-2); }
.mx.sm { min-width: 0; padding: 2px 7px; font-size: 12px; }
.chip input { margin: 0; }

/* ---------- Google y "Ver como" ---------- */
.btn-google { width: 100%; background: var(--surface); border-color: var(--line-2); color: var(--text); text-decoration: none; }
.btn-google:hover { border-color: var(--text-2); box-shadow: var(--shadow); }
.btn-google .ic { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; margin: 20px 0 16px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.viewas { position: sticky; top: 0; z-index: 45; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px clamp(16px, 3vw, 32px); background: #6B4BD8; color: #fff; font-size: 14.5px; }
.viewas .ic { width: 18px; height: 18px; }
.viewas span { flex: 1; min-width: 200px; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); }
/* «Ver como otro rol» (solo admin) */
.side-viewas { display: flex; align-items: center; gap: 10px; margin: auto 0 8px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, .28); background: none; color: rgba(255, 255, 255, .85); font-weight: 600; font-size: 14.5px; text-align: left; }
.side-viewas:hover { background: rgba(107, 75, 216, .35); border-color: #9B84F0; color: #fff; }
.side-viewas + .side-user { margin-top: 0; }
.va-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.va-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--text-2); font-weight: 600; font-size: 14px; }
.va-tabs button span { font-size: 12px; font-weight: 800; background: rgba(0, 0, 0, .07); border-radius: 999px; padding: 0 7px; }
.va-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.va-tabs button.on span { background: rgba(255, 255, 255, .2); }
.va-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 12px; margin-bottom: 10px; color: var(--muted); }
.va-search input { border: 0; outline: 0; flex: 1; padding: 11px 0; font: inherit; background: none; color: var(--text); }
.va-search:focus-within { border-color: var(--brand-deep); }
.va-list { display: grid; gap: 4px; max-height: 46vh; overflow: auto; margin-bottom: 12px; }
.va-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 12px; border: 0; background: none; text-align: left; color: var(--text); }
.va-row:hover:not(:disabled) { background: var(--paper); }
.va-row .avatar { width: 34px; height: 34px; font-size: 13px; }
.va-row b { display: block; font-size: 15px; }
.va-row small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.va-row .grow { min-width: 0; }
.va-row > .ic { color: var(--muted); width: 16px; height: 16px; }
.va-row:disabled { cursor: default; }
.va-empty { padding: 18px 10px; margin: 0; }

.status-card { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; border-color: var(--mid); background: var(--mid-wash); font-size: 15px; }
.status-card > .ic { color: var(--mid); width: 22px; height: 22px; margin-top: 2px; flex: none; }
.status-card.ok { border-color: transparent; background: var(--ok-wash); }
.status-card.ok > .ic { color: var(--ok); }
.status-card.demo { border-color: transparent; background: #F0EBFF; margin-top: 4px; }
.status-card.demo > .ic { color: #6B4BD8; }
.status-card p { margin: 6px 0 0; }
.status-card code { background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 6px; font-size: 13.5px; word-break: break-all; }
.bad-text { color: var(--bad); font-weight: 600; }

/* ---------- bloques interactivos ---------- */
.ix { margin: 1.6em 0; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); padding: 18px 20px 20px; }
.ix-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--brand-deep); margin-bottom: 14px; }
.ix-head svg { width: 19px; height: 19px; }
.flip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.flip { border: 0; padding: 0; background: none; perspective: 900px; min-height: 130px; text-align: center; font: inherit; color: inherit; }
.flip-in { position: relative; display: block; width: 100%; height: 100%; min-height: 130px; transition: transform .5s var(--ease); transform-style: preserve-3d; }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip-front, .flip-back { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; border-radius: 16px; backface-visibility: hidden; line-height: 1.35; }
.flip-front { background: var(--ink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; }
.flip-front::after { content: "↻"; position: absolute; right: 10px; bottom: 6px; font-size: 14px; color: var(--brand); }
.flip-back { background: var(--brand-wash); color: var(--text); font-size: 14.5px; transform: rotateY(180deg); }
.sort-items { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; margin-bottom: 14px; }
.sort-item { border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 12px; padding: 9px 13px; font-size: 14.5px; font-weight: 600; text-align: left; line-height: 1.35; transition: transform .15s var(--ease), border-color .15s; }
.sort-item:hover { border-color: var(--text-2); }
.sort-item.picked { border-color: var(--brand-deep); background: var(--brand-wash); transform: translateY(-2px); box-shadow: 0 6px 16px -10px rgba(0, 120, 138, .6); }
.sort-item.right { border-color: var(--ok); background: var(--ok-wash); }
.sort-item.wrong { border-color: var(--bad); background: var(--bad-wash); }
.sort-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.sort-cat { border: 2px dashed var(--line-2); border-radius: 16px; padding: 10px; min-height: 110px; transition: border-color .15s, background .15s; }
.ix-sort.picking .sort-cat { border-color: var(--brand); background: #F2FBFC; cursor: pointer; }
.sort-cat-name { font-weight: 800; font-size: 14.5px; margin-bottom: 8px; color: var(--text-2); }
.sort-drop { display: flex; flex-direction: column; gap: 6px; }
.ix-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.sort-msg { font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.quiz-q { font-weight: 700; font-size: 17px; margin: 0 0 12px; }
.quiz-exp { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.quiz-exp.ok { background: var(--ok-wash); }
.quiz-exp.no { background: var(--mid-wash); }
.ix-reveal { padding: 0; }
.ix-reveal summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 20px; font-weight: 700; }
.ix-reveal summary::-webkit-details-marker { display: none; }
.ix-reveal summary svg { width: 20px; height: 20px; color: var(--brand-deep); flex: none; }
.ix-reveal summary em { margin-left: auto; font-style: normal; font-size: 13.5px; color: var(--brand-deep); white-space: nowrap; }
.ix-reveal[open] summary em { display: none; }
.reveal-body { padding: 0 20px 18px; animation: viewIn .35s var(--ease) both; }
.ix-video { margin: 1.4em 0; }
.ix-video video { width: 100%; border-radius: 18px; background: #000; display: block; box-shadow: 0 30px 60px -30px rgba(15, 43, 51, .6); }
.ix-buttons { margin: 1.2em 0; }
.ix-buttons-title { font-weight: 700; margin-bottom: 10px; }
.ix-buttons-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ix-buttons .btn { text-decoration: none; }
.ix-buttons .btn svg { width: 16px; height: 16px; }
.ix-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 60px -30px rgba(15, 43, 51, .6); }
.ix-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.team-ph { width: 100%; aspect-ratio: 1; border-radius: 18px; margin-bottom: 8px; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand-deep); font-family: var(--display); font-weight: 800; font-size: 34px; }
.ix-video figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.team-grid, .team-strip { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); margin: 1.2em 0; }
.team-strip { grid-auto-flow: column; grid-auto-columns: 132px; grid-template-columns: none; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.team-card { text-align: center; }
.team-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; display: block; margin-bottom: 8px; }
.team-card b { display: block; font-size: 13.5px; line-height: 1.25; }
.team-card span { display: block; font-size: 12.5px; color: var(--brand-deep); font-weight: 600; line-height: 1.3; margin-top: 2px; }
.welcome-video { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; background: var(--ink); color: #fff; border-radius: 26px; padding: 18px; }
.wv-thumb { position: relative; border: 0; padding: 0; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.wv-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.wv-thumb:hover img { transform: scale(1.04); }
.wv-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--brand); color: var(--ink); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(0, 180, 200, .25); }
.wv-play .ic { width: 30px; height: 30px; margin-left: 4px; }
.wv-copy h2 { color: #fff; margin: 12px 0 8px; }
.wv-copy p { color: rgba(255, 255, 255, .75); margin: 0 0 18px; }
.modal.modal-wide { max-width: 1100px; padding: 16px; }
.wv-modal video { width: 100%; border-radius: 14px; background: #000; display: block; }
@media (max-width: 860px) { .welcome-video { grid-template-columns: minmax(0, 1fr); } }

/* ---------- modal y toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(15, 43, 51, .55); display: grid; place-items: center; padding: 16px; animation: fade .2s both; backdrop-filter: blur(3px); }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 22px; padding: 26px; animation: viewIn .3s var(--ease) both; }
.modal h2 { margin-bottom: 6px; }
.modal .lead { color: var(--muted); margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.secret { background: var(--ink); color: #fff; border-radius: 14px; padding: 16px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; display: flex; gap: 10px; align-items: center; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); animation: viewIn .3s var(--ease) both; }
.toast.err { background: var(--bad); }
.toast .ic { color: var(--brand); }
.toast.err .ic { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .course-hero, .course-cols, .two-col { grid-template-columns: minmax(0, 1fr); }
  .reader { grid-template-columns: minmax(0, 1fr); }
  .outline { position: static; display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-media { min-height: 46vh; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; background: var(--ink); color: #fff; padding: 12px 16px; }
  .topbar img { height: 18px; }
  .topbar span { font-family: var(--display); font-weight: 700; color: var(--brand); }
  .topbar .avatar { margin-left: auto; width: 32px; height: 32px; font-size: 13px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 4px; }
  .tabbar a.on { color: var(--brand-deep); }
  .tabbar .ic { width: 22px; height: 22px; }
  .page { padding: 20px 16px 110px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-next { justify-content: stretch; padding-top: 0; }
  .next-card { max-width: none; }
  .profile-head, .person-head { grid-template-columns: auto minmax(0, 1fr); }
  .profile-head .level-card, .person-head > :last-child { grid-column: 1 / -1; }
  .result-hero { grid-template-columns: minmax(0, 1fr); text-align: left; padding: 24px; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .deptbar { grid-template-columns: 34px minmax(0, 1fr) 46px; }
  .deptbar .bar { grid-column: 2 / 4; grid-row: 2; }
  .grade-box { grid-template-columns: minmax(0, 1fr); }
  .integrity { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .stat { padding: 12px; gap: 10px; }
  .stat-ic { width: 36px; height: 36px; }
  .stat b { font-size: 20px; }
  .course-cover { padding: 22px; min-height: 220px; }
  .prose { font-size: 16.5px; }
  .practice { padding: 18px; }
  .certificate { padding: 34px 22px; }
  .certificate h1 { font-size: 32px; }
}

/* impresión: solo el certificado */
@media print {
  body { background: #fff; }
  .side, .topbar, .tabbar, .no-print { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; }
  .certificate { border: 0; margin: 0 auto; }
}
.c0-hero .ring { color: var(--text); }
