/* Layout: barra superior navy fija + índice del curso a la izquierda + columna de lectura de ~68 caracteres. */
:root {
  --navy: #0A3A63;
  --blue: #0065A3;
  --cyan: #12B0F1;

  --bg: #FFFFFF;
  --surface: #F3F8FC;
  --surface2: #E6F1F9;
  --rule: #D9E5EF;
  --ink: #33404B;
  --ink2: #5B6975;
  --head: #0A3A63;
  --accent: #0065A3;
  --accent-hover: #0A3A63;
  --on-accent: #FFFFFF;
  --link: #0065A3;
  --header-bg: #0A3A63;
  --header-fg: #FFFFFF;
  --header-sub: #9FC8E6;
  --header-line: #2A5C86;
  --player-bg: #0A3A63;
  --player-fg: #CFE3F2;
  --ok: #2F7D54;
  --ok-bg: #F3F8F4;
  --warn: #9A6D0E;
  --warn-bg: #FCF8EE;
  --bad: #B23A32;
  --bad-bg: #FBF4F3;
  --wm: rgba(10, 58, 99, 0.065);
  --key-bg: #0A3A63;
  --key-fg: #E6F1F9;
  --shadow: 0 1px 2px rgba(10, 58, 99, .06), 0 4px 16px rgba(10, 58, 99, .06);

  --font: "Carlito", Calibri, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --read: 1.075rem;
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1722; --surface: #102232; --surface2: #15304A; --rule: #22405C;
    --ink: #D5E2EC; --ink2: #9DB2C3; --head: #E6F1F9;
    --accent: #3DB8EE; --accent-hover: #7FD0F4; --on-accent: #06121C; --link: #6CCBF5;
    --header-bg: #071A2B; --header-fg: #E6F1F9; --header-sub: #9FC8E6; --header-line: #1E4566;
    --player-bg: #061420; --player-fg: #CFE3F2;
    --ok: #62C291; --ok-bg: #12291F; --warn: #E3B552; --warn-bg: #2A2312; --bad: #E8837B; --bad-bg: #2C1716;
    --wm: rgba(159, 200, 230, 0.055); --key-bg: #15304A; --key-fg: #E6F1F9;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1722; --surface: #102232; --surface2: #15304A; --rule: #22405C;
  --ink: #D5E2EC; --ink2: #9DB2C3; --head: #E6F1F9;
  --accent: #3DB8EE; --accent-hover: #7FD0F4; --on-accent: #06121C; --link: #6CCBF5;
  --header-bg: #071A2B; --header-fg: #E6F1F9; --header-sub: #9FC8E6; --header-line: #1E4566;
  --player-bg: #061420; --player-fg: #CFE3F2;
  --ok: #62C291; --ok-bg: #12291F; --warn: #E3B552; --warn-bg: #2A2312; --bad: #E8837B; --bad-bg: #2C1716;
  --wm: rgba(159, 200, 230, 0.055); --key-bg: #15304A; --key-fg: #E6F1F9;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 50; background: var(--header-bg); }
a { color: var(--link); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--head); text-wrap: balance; line-height: 1.2; }
.muted { color: var(--ink2); }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
:root:not([data-theme="light"]) .eyebrow { color: var(--accent); }
/* Progreso del módulo en curso, fijo arriba */
.modprog { border-top: 1px solid var(--header-line); }
.mp-inner { display: flex; align-items: center; gap: .8rem; padding: .45rem max(16px, env(safe-area-inset-right, 0px)) .55rem max(16px, env(safe-area-inset-left, 0px)); font-size: .86rem; color: var(--header-sub); }
.mp-lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.mp-lab b { color: var(--header-fg); font-weight: 700; }
.mp-track { flex: 1; min-width: 70px; height: 9px; border-radius: 999px; background: var(--header-line); overflow: hidden; }
.mp-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), #5CCBF7); transition: width .45s ease; }
.modprog.done .mp-track i { background: #62C291; }
.mp-pct { font-weight: 700; color: var(--header-fg); font-variant-numeric: tabular-nums; min-width: 3.3em; text-align: right; }
.modprog.done .mp-pct { color: #8FD9AF; }
@media (max-width: 700px) { .mp-t { display: none; } .mp-lab { max-width: 55%; } }
/* Mapa del curso: módulos hechos, el actual y los que faltan */
.mp-map { display: flex; align-items: center; gap: 4px; flex: none; padding-right: .8rem; margin-right: .1rem; border-right: 1px solid var(--header-line); }
.mp-map .mp-k { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--header-sub); margin-right: .3rem; }
.mp-map a { display: grid; place-items: center; min-width: 24px; height: 22px; padding: 0 3px; border-radius: 6px; font-size: .74rem; font-weight: 700; text-decoration: none; color: var(--header-sub); border: 1px solid var(--header-line); font-variant-numeric: tabular-nums; }
.mp-map a.done { background: #62C291; border-color: #62C291; color: #06263F; }
.mp-map a.now { color: var(--header-fg); border-color: #5CCBF7; }
.mp-map a.cur { background: var(--cyan); border-color: var(--cyan); color: #06263F; }
.mp-map a.lock { opacity: .45; }
.mp-map a:hover { border-color: var(--header-fg); }
@media (max-width: 700px) { .mp-inner { flex-wrap: wrap; row-gap: .4rem; } .mp-map { width: 100%; border-right: 0; padding-right: 0; justify-content: space-between; } .mp-map .mp-k { display: none; } .mp-map a { flex: 1; } }
/* Aviso: falta marcar la actividad como completada */
.mark-hint { font-size: .9rem; color: var(--warn); margin: 0; }
.mark-alert { margin-top: 1rem; background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 10px; padding: .8rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.mark-alert p { margin: 0; flex: 1 1 100%; color: var(--ink); }
.mark-alert p b { color: var(--warn); }

/* Logo CGJD (noviembre 2026): azul #001FFF y #4458FF; en fondo oscuro, blanco y lavanda. */
:root { --lg-a: #001FFF; --lg-b: #4458FF; }
svg.lg { display: block; height: auto; aspect-ratio: 655.6 / 145.9; }
.on-dark { --lg-a: #FFFFFF; --lg-b: #B9C2FF; }
.topbar .logo { display: flex; align-items: center; gap: .7rem; }
.topbar .logo svg.lg { width: 132px; }
.topbar .logo .camp { border-left: 1px solid var(--header-line); padding-left: .7rem; font-size: .72rem; letter-spacing: .16em; color: var(--header-sub); font-weight: 600; }
.login-side svg.lg { width: min(260px, 70%); margin-bottom: 1.4rem; }
.login-card svg.lg { width: 190px; margin: 0 auto 1.6rem; }
:root[data-theme="dark"] .login-card, :root[data-theme="dark"] .login-card { --lg-a: #FFFFFF; --lg-b: #B9C2FF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .login-card { --lg-a: #FFFFFF; --lg-b: #B9C2FF; } }
@media (max-width: 760px) { .topbar .logo svg.lg { width: 108px; } .topbar .logo .camp { display: none; } }
@media (prefers-reduced-motion: reduce) { .mp-track i { transition: none; } }
.brandbar { height: 5px; background: linear-gradient(90deg, #0013A3 0 33.3%, #001FFF 33.3% 66.6%, #4458FF 66.6% 100%); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; gap: .5em; border: 1px solid transparent; border-radius: 8px; padding: .6em 1.1em; font-weight: 700; font-size: .98rem; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-ok { background: var(--ok); color: #fff; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------- marca de agua ---------- */
#wm { position: fixed; inset: 0; pointer-events: none; z-index: 40; background-repeat: repeat; }

/* ---------- login ---------- */
#view-login { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-side { background: var(--header-bg); color: var(--header-fg); padding-block: 3rem; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.login-side .wordmark { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--header-sub); }
.login-side h1 { color: var(--header-fg); font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: .4em 0 .3em; max-width: 18ch; }
.login-side p { color: #CFE3F2; max-width: 46ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--header-line); }
.facts div { padding: 1rem 1rem 0 0; }
.facts div + div { padding-left: 1rem; border-left: 1px solid var(--header-line); }
.facts b { display: block; font-size: 1.6rem; color: var(--header-fg); font-variant-numeric: tabular-nums; }
.facts span { font-size: .85rem; color: var(--header-sub); }
.login-main { display: flex; align-items: center; justify-content: center; padding-block: 3rem; padding-left: 24px; padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.login-card { width: 100%; max-width: 400px; }
.tabs { display: flex; border-bottom: 1px solid var(--rule); margin-bottom: 1.25rem; }
.tabs button { background: none; border: 0; padding: .7em 1em; font-weight: 700; color: var(--ink2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--head); border-bottom-color: var(--cyan); }
.field { display: grid; gap: .3rem; margin-bottom: .9rem; }
.field label { font-size: .88rem; font-weight: 700; color: var(--head); }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; padding: .6em .75em; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 25%, transparent); }
.hint { font-size: .85rem; color: var(--ink2); }
.demo-note { background: var(--warn-bg); color: var(--ink); border-radius: 8px; padding: .7rem .9rem; font-size: .9rem; margin-top: 1rem; }
.demo-note b { color: var(--warn); }

/* ---------- shell ---------- */
#app { min-height: 100%; display: grid; grid-template-rows: auto 1fr; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--header-bg); color: var(--header-fg); }
.topbar-inner { display: flex; align-items: center; gap: 1rem; padding-block: .6rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.topbar .logo { font-weight: 700; letter-spacing: .14em; font-size: .82rem; text-transform: uppercase; color: var(--header-fg); text-decoration: none; white-space: nowrap; }
.topbar .logo small { display: block; letter-spacing: .08em; color: var(--header-sub); font-weight: 400; font-size: .72rem; }
.topbar .course { flex: 1; min-width: 0; color: var(--header-sub); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid var(--header-line); padding-left: 1rem; }
.menu-btn { display: inline-flex; background: transparent; color: var(--header-fg); border: 1px solid var(--header-line); border-radius: 8px; padding: .4em .7em; }
.user { position: relative; margin-left: auto; }
.user > button { background: transparent; color: var(--header-fg); border: 1px solid var(--header-line); border-radius: 999px; padding: .35em .5em .35em .35em; display: flex; align-items: center; gap: .5em; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--cyan); color: #06121C; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); min-width: 240px; padding: .4rem; }
.user-menu .who { padding: .5rem .7rem .6rem; border-bottom: 1px solid var(--rule); margin-bottom: .3rem; font-size: .9rem; }
.user-menu .who b { color: var(--head); display: block; }
.user-menu button, .user-menu a { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .55rem .7rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.user-menu button:hover, .user-menu a:hover { background: var(--surface); }
.proto-strip { background: var(--warn-bg); color: var(--ink); font-size: .85rem; padding-block: .35rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--rule); }
.proto-strip b { color: var(--warn); }

.body { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }
/* Índice del curso: oculto por defecto en todas las pantallas; se abre con el botón «Índice» (pedido de Jorge, 20/11/2026). */
.side { border-right: 1px solid var(--rule); background: var(--surface); padding: 1.2rem 0 2rem; overflow-y: auto; position: fixed; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); z-index: 60; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); padding-top: calc(1rem + env(safe-area-inset-top, 0px)); padding-left: env(safe-area-inset-left, 0px); }
.side.open { transform: none; }
.side-head { position: sticky; top: -1rem; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: -1rem 0 .8rem; padding: .9rem 1rem .8rem; background: var(--surface); border-bottom: 1px solid var(--rule); }
.side-head span { font-weight: 700; color: var(--head); font-size: .95rem; }
.side-close { background: transparent; color: var(--head); border: 1px solid var(--rule); border-radius: 8px; padding: .35em .7em; font: inherit; font-size: .9rem; cursor: pointer; }
.side-close:hover { background: var(--surface2); }
.side-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
.side .home-link { display: block; margin: 0 1rem 1rem; padding: .55rem .7rem; border-radius: 8px; text-decoration: none; color: var(--head); font-weight: 700; }
.side .home-link[aria-current="page"] { background: var(--surface2); }
.mod { border-top: 1px solid var(--rule); }
.mod > button { width: 100%; background: none; border: 0; text-align: left; padding: .8rem 1rem .8rem 1.2rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .5rem; color: var(--head); }
.mod > button .mt { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.mod > button .mh { font-size: .8rem; color: var(--ink2); grid-column: 1; }
.mod > button .chev { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--ink2); transition: transform .15s; }
.mod[data-open="true"] > button .chev { transform: rotate(90deg); }
.mod.locked > button { color: var(--ink2); }
.mod ul { list-style: none; margin: 0 0 .6rem; padding: 0; }
.mod[data-open="false"] ul { display: none; }
.mod li a { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: .6rem; align-items: start; padding: .45rem 1rem .45rem 1.4rem; color: var(--ink); text-decoration: none; font-size: .93rem; line-height: 1.3; border-left: 3px solid transparent; }
.mod li a:hover { background: var(--surface2); }
.mod li a[aria-current="page"] { background: var(--surface2); border-left-color: var(--cyan); color: var(--head); font-weight: 700; }
.st { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--rule); margin-top: 1px; display: grid; place-items: center; }
.st.done { background: var(--ok); border-color: var(--ok); }
.st.done::after { content: ""; width: 7px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.st.lock { border: 0; border-radius: 0; }
.st.lock::after { content: ""; width: 10px; height: 8px; background: var(--ink2); border-radius: 2px; box-shadow: 0 -5px 0 -2px var(--surface), 0 -5px 0 0 var(--ink2); margin-top: 5px; }

main { min-width: 0; padding-block: 2rem 4rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.page { max-width: calc(var(--measure) + 4rem); margin: 0 auto; padding: 0 1rem; }
.page-head { margin-bottom: 1.8rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: .35rem 0 .4rem; }
.page-head .meta { color: var(--ink2); font-size: .95rem; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }

/* ---------- lectura ---------- */
.reading { font-size: var(--read); line-height: 1.62; }
.reading > * { max-width: var(--measure); }
.reading h2 { font-size: 1.45rem; margin: 2.2rem 0 .7rem; }
.reading h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
.reading p { margin: 0 0 1rem; }
.reading ul, .reading ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.reading li { margin-bottom: .4rem; }
.reading strong { color: var(--head); }
.def { background: var(--surface); border-left: 3px solid var(--cyan); border-radius: 0 8px 8px 0; padding: .8rem 1.1rem; margin: 1.2rem 0; font-size: 1rem; }
.def p { margin: 0; }
.reading blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--ink2); }
.tbl { overflow-x: auto; margin: 1.2rem 0 1.4rem; max-width: 100% !important; border: 1px solid var(--rule); border-radius: 8px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.4; }
.tbl th { background: var(--surface2); color: var(--head); text-align: left; font-weight: 700; padding: .55rem .75rem; }
.tbl td { padding: .55rem .75rem; border-top: 1px solid var(--rule); vertical-align: top; min-width: 6rem; }
.callout { border-radius: 10px; padding: 1.1rem 1.3rem .4rem; margin: 2rem 0; position: relative; }
.callout h2 { font-size: 1.12rem !important; margin: 0 0 .6rem !important; display: flex; align-items: center; gap: .5rem; }
.callout.evidence { background: var(--surface); border: 1px solid var(--rule); }
.callout.evidence h2::before { content: ""; width: 10px; height: 10px; background: var(--blue); border-radius: 2px; }
.callout.cgjd { background: var(--header-bg); color: #E6F1F9; }
.callout.cgjd h2 { color: #FFFFFF !important; }
.callout.cgjd h2::before { content: ""; width: 10px; height: 10px; background: var(--cyan); border-radius: 50%; }
.callout.cgjd strong { color: #FFFFFF; }
.callout.cgjd.pending { background: var(--warn-bg); color: var(--ink); border: 1px dashed var(--warn); }
.callout.cgjd.pending h2 { color: var(--head) !important; }
.callout.cgjd.pending strong { color: var(--head); }
.badge { position: absolute; top: 1rem; right: 1rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--warn); border: 1px solid var(--warn); border-radius: 999px; padding: .1em .6em; }
.callout.deep { border-top: 3px solid var(--cyan); background: transparent; padding-left: 0; padding-right: 0; border-radius: 0; }
details.biblio, details.transcript { border: 1px solid var(--rule); border-radius: 8px; margin: 1.6rem 0; background: var(--bg); }
details summary { cursor: pointer; padding: .75rem 1rem; font-weight: 700; color: var(--head); }
details[open] summary { border-bottom: 1px solid var(--rule); }
details > :not(summary) { padding-left: 1rem; padding-right: 1rem; }
details.biblio ol, details.biblio ul { font-size: .92rem; line-height: 1.45; padding-left: 2.4rem; margin: 1rem 0; overflow-wrap: anywhere; }
details.biblio p { font-size: .95rem; margin-top: 1rem; }

/* ---------- video ---------- */
.video { margin: 1.8rem 0; max-width: var(--measure); }
.player { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: var(--player-bg); border-radius: 10px; overflow: hidden; color: var(--player-fg); display: grid; place-items: center; text-align: center; }
.player .play { width: 68px; height: 68px; border-radius: 50%; border: 2px solid var(--cyan); display: grid; place-items: center; margin: 0 auto .8rem; }
.player .play::after { content: ""; border-left: 20px solid var(--cyan); border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.player .pt { font-size: 1.15rem; color: #FFFFFF; font-weight: 700; padding: 0 1.5rem; }
.player .ps { font-size: .88rem; margin-top: .3rem; color: var(--player-fg); }
.player .vwm { position: absolute; font-size: .78rem; color: rgba(255,255,255,.35); white-space: nowrap; animation: drift 24s linear infinite alternate; pointer-events: none; }
@keyframes drift { 0% { left: 4%; top: 8%; } 33% { left: 52%; top: 70%; } 66% { left: 10%; top: 78%; } 100% { left: 55%; top: 12%; } }
@media (prefers-reduced-motion: reduce) { .player .vwm { animation: none; left: 6%; top: 8%; } }
.video figcaption { font-size: .92rem; color: var(--ink2); margin-top: .5rem; }
.video .vlabel { font-weight: 700; color: var(--head); }
.video .dur { white-space: nowrap; }
.video .dur::before { content: "· "; }
dl.tr { margin: 1rem 0; display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: .4rem 1rem; font-size: .95rem; }
dl.tr dt { color: var(--ink2); font-variant-numeric: tabular-nums; font-size: .85rem; padding-top: .15rem; }
dl.tr dd { margin: 0; }
.tr-part { font-weight: 700; color: var(--head); margin-top: 1rem !important; }

/* ---------- multiple choice ---------- */
.practice { margin: 2.6rem 0 1rem; padding-top: 1.4rem; border-top: 3px solid var(--navy); }
:root:not([data-theme="light"]) .practice { border-top-color: var(--accent); }
.practice h2 { margin-top: 0 !important; }
.mc { margin: 1.4rem 0 1.8rem; }
.mc .q { font-weight: 700; color: var(--head); margin: 0 0 .7rem; display: grid; grid-template-columns: 2rem minmax(0, 1fr); }
.mc .q .n { color: var(--blue); font-variant-numeric: tabular-nums; }
:root:not([data-theme="light"]) .mc .q .n { color: var(--accent); }
.opts { list-style: none; padding: 0 0 0 2rem !important; margin: 0; display: grid; gap: .45rem; }
.opts li { margin: 0 !important; }
.opt { width: 100%; text-align: left; background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: .6rem .8rem; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .3rem; font-size: 1rem; line-height: 1.4; }
.opt:hover:not(:disabled) { border-color: var(--accent); background: var(--surface); }
.opt:disabled { cursor: default; }
.opt .l { font-weight: 700; color: var(--ink2); }
.opt.sel { border-color: var(--accent); background: var(--surface2); }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.right .l { color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .l { color: var(--bad); }
.expl { font-size: .93rem; color: var(--ink2); padding: .35rem .8rem 0 2.4rem; line-height: 1.45; }
.expl b.ok { color: var(--ok); }
.expl b.no { color: var(--bad); }

/* ---------- formularios del curso ---------- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 1.3rem 1.4rem; margin: 2rem 0; }
.panel h2 { margin-top: 0 !important; }
.wq { margin: 1.4rem 0; }
.wq .qtxt { font-weight: 700; color: var(--head); margin-bottom: .5rem; display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); }
.wq textarea { min-height: 11rem; resize: vertical; line-height: 1.5; }
.wc { font-size: .85rem; color: var(--ink2); font-variant-numeric: tabular-nums; text-align: right; }
.wc.in { color: var(--ok); }
.wc.over { color: var(--bad); }
.confirm { background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 10px; padding: .9rem 1rem; margin-top: 1rem; }
.confirm p { margin: 0 0 .7rem; }
.submitted { background: var(--ok-bg); border: 1px solid var(--ok); border-radius: 10px; padding: .9rem 1.1rem; margin: 1.5rem 0; }
.submitted b { color: var(--ok); }
.answer-ro { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; padding: .8rem 1rem; font-size: .98rem; }
.model { border-left: 4px solid var(--cyan); padding-left: 1.2rem; margin-top: 1.4rem; }
.ethics-text { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 1.2rem 1.4rem; }
.check { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .5rem; align-items: start; margin: 1rem 0; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; accent-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }

/* ---------- inicio y notas ---------- */
.hello h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: .3rem 0 .4rem; }
.progress { height: 8px; background: var(--surface2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--cyan); border-radius: 999px; }
.status-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: center; border: 1px solid var(--rule); border-radius: 12px; padding: 1.2rem 1.4rem; margin: 1.6rem 0 2.2rem; background: var(--surface); }
.status-card.pass { border: 2px solid var(--ok); background: var(--ok-bg); }
.status-card.pass .eyebrow, .status-card.pass .score, .status-card.pass .big { color: var(--ok); }
.status-card.retry { border: 2px solid var(--accent); background: var(--surface2); }
.status-card.retry .eyebrow, .status-card.retry .score, .status-card.retry .big { color: var(--accent); }
.status-card .big { font-size: 1.25rem; font-weight: 700; margin: .5rem 0 0; }
.final-card .nf-score { font-size: 3rem; font-weight: 700; line-height: 1; margin-top: .4rem; color: var(--ok); font-variant-numeric: tabular-nums; }
.final-card .nf-score small { font-size: 1.1rem; font-weight: 600; color: var(--muted, #5B6B78); }
.kv.escala span:nth-child(odd) { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Certificado: siempre en colores claros, hoja A4 apaisada (297 × 210). */
.cert-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.2rem; }
.cert-wrap { container-type: inline-size; width: min(1040px, calc(100vw - 32px)); position: relative; left: 50%; transform: translateX(-50%); margin: 0 0 2rem; }
.cert-sheet { --lg-a: #001FFF; --lg-b: #4458FF; aspect-ratio: 297 / 210; width: 100%; background: #FFFFFF; color: #23313D; box-shadow: 0 2px 18px rgba(10, 58, 99, .14); padding: 2.4cqw; box-sizing: border-box; font-family: inherit; }
.cert-frame { height: 100%; box-sizing: border-box; border: .25cqw solid #0A3A63; outline: .08cqw solid #12B0F1; outline-offset: -.9cqw; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 3cqw 5cqw 2.4cqw; }
.cert-top { display: flex; flex-direction: column; align-items: center; gap: .6cqw; }
.cert-logo { width: 22cqw; height: 4.9cqw; }
.cert-campus { font-size: 1.25cqw; letter-spacing: .32em; text-transform: uppercase; color: #0065A3; font-weight: 600; }
.cert-kicker { margin-top: 2.4cqw; font-size: 3.4cqw; font-weight: 700; letter-spacing: .06em; color: #0A3A63; text-transform: uppercase; }
.cert-lead { margin: 1.5cqw 0 0; font-size: 1.9cqw; color: #4A5B69; }
.cert-name { margin-top: .4cqw; font-size: 4.2cqw; font-weight: 700; color: #0A3A63; border-bottom: .12cqw solid #D9E5EF; padding: 0 3cqw .4cqw; }
.cert-id { margin: .7cqw 0 0; font-size: 1.65cqw; color: #4A5B69; }
.cert-course { margin-top: .4cqw; font-size: 2.6cqw; font-weight: 700; color: #0065A3; max-width: 70cqw; line-height: 1.25; }
.cert-detail { margin: 1.3cqw 0 0; font-size: 1.85cqw; color: #23313D; }
.cert-dist { margin-top: 1.2cqw; display: inline-block; font-size: 1.5cqw; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #FFFFFF; background: #0A3A63; padding: .5cqw 1.6cqw; border-radius: 99px; }
.cert-foot { margin-top: auto; width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 2cqw; font-size: 1.35cqw; color: #4A5B69; }
.cert-place { text-align: left; }
.cert-sign { display: flex; flex-direction: column; align-items: center; gap: .2cqw; }
.cert-sign strong { color: #0A3A63; font-size: 1.65cqw; }
.cert-firma { width: 15cqw; height: auto; margin-bottom: -1.6cqw; position: relative; z-index: 1; }
.cert-line { width: 22cqw; border-top: .1cqw solid #33404B; margin-bottom: .5cqw; }
.cert-code { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: .15cqw; }
.cert-code strong { font-family: ui-monospace, Menlo, Consolas, monospace; color: #0A3A63; font-size: 1.45cqw; letter-spacing: .05em; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; height: 210mm !important; overflow: hidden !important; }
  body * { visibility: hidden !important; }
  #cert-sheet, #cert-sheet * { visibility: visible !important; }
  .cert-wrap { position: fixed; left: 0; top: 0; width: 297mm; max-width: none; margin: 0; transform: none; }
  #cert-sheet { width: 297mm; height: 210mm; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.retry-msg { margin: .9rem 0 .3rem; padding: .8rem 1rem; background: var(--accent); color: var(--on-accent); border-radius: 10px; font-size: 1.05rem; }
.retry-msg a, .retry-msg strong { color: inherit; font-weight: 700; }
.ev-timer { position: sticky; top: 7rem; z-index: 5; font-variant-numeric: tabular-nums; }
.ev-timer.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.rule-box { margin: 1.2rem 0; padding: .9rem 1.1rem; border-left: 4px solid var(--accent); background: var(--surface2); border-radius: 0 10px 10px 0; font-size: 1.05rem; }
.rule-box strong { color: var(--head); }
ol.req li { margin: .35rem 0; }
.mails { margin: 0 0 1.8rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.mails summary { cursor: pointer; padding: .7rem 1rem; font-weight: 700; color: var(--head); }
.mail { border-top: 1px solid var(--rule); padding: .8rem 1rem; }
.mail .mh { margin: 0 0 .5rem; font-size: .95rem; }
.mail .mh span { display: inline-block; min-width: 4.5rem; color: var(--ink2); font-size: .85rem; }
.mail pre { margin: 0; white-space: pre-wrap; font-family: var(--font); font-size: .95rem; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; padding: .7rem .9rem; }
.status-card .pct { font-size: 2.2rem; font-weight: 700; color: var(--head); font-variant-numeric: tabular-nums; line-height: 1; }
.segbar { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin-top: .2rem; }
.segbar .seg { height: 10px; border-radius: 999px; background: var(--rule); overflow: hidden; }
.segbar .seg i { display: block; height: 100%; background: var(--cyan); border-radius: 999px; }
.segbar .seg.done i { background: var(--ok); }
.segbar .lab { font-size: .7rem; color: var(--ink2); text-align: center; margin-top: .25rem; white-space: nowrap; }
.panel.consulta { border: 2px solid var(--cyan); margin-top: 2rem; }
.panel.consulta ul { margin: 0; padding-left: 1.1rem; }
.panel.consulta li { margin: .35rem 0; }
.mrow .cnt { font-size: .8rem; color: var(--ink2); }
.mods { display: grid; gap: 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.mrow { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: center; padding: .9rem 1.2rem; text-decoration: none; color: var(--ink); background: var(--bg); }
.mrow + .mrow { border-top: 1px solid var(--rule); }
a.mrow:hover { background: var(--surface); }
.mrow .num { font-size: 1.5rem; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
:root:not([data-theme="light"]) .mrow .num { color: var(--accent); }
.mrow.locked .num, .mrow.locked .t { color: var(--ink2); }
.mrow .t { font-weight: 700; color: var(--head); }
.mrow .h { font-size: .88rem; color: var(--ink2); }
.pill { font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .2em .7em; white-space: nowrap; }
.pill.done { color: var(--ok); background: var(--ok-bg); }
.pill.now { color: var(--blue); background: var(--surface2); }
:root:not([data-theme="light"]) .pill.now { color: var(--accent); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.mc .q .pill { margin-left: .4rem; vertical-align: 2px; }
ol.tq { padding-left: 1.4rem; margin: .8rem 0 1.2rem; }
ol.tq li { margin-bottom: .5rem; }
.steps { display: grid; gap: 1rem; margin: 1.2rem 0 1.4rem; }
.step { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .8rem; align-items: start; }
.step .sn { width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface2); color: var(--head); font-weight: 700; display: grid; place-items: center; }
.step p { margin: .15rem 0 .5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pill.lock { color: var(--ink2); background: var(--surface); }
.score { font-size: 3rem; font-weight: 700; color: var(--head); font-variant-numeric: tabular-nums; line-height: 1; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-top: 1px solid var(--rule); }
.kv > * { padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.kv > :nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--head); padding-left: 1rem; }

.pager { display: block; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.pg-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.pg-nav .row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.pg-mark { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.pg-mark.ok { justify-content: flex-start; }
.donebar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 2.5rem; padding: 1rem 1.2rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--rule); }
.donebar p { margin: 0; flex: 1; min-width: 12rem; }
.lockbox { text-align: left; border: 1px solid var(--rule); border-radius: 12px; padding: 1.6rem; background: var(--surface); }
.lockbox ul { list-style: none; padding: 0; }
.lockbox li { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .5rem; margin: .5rem 0; }

/* ---------- figuras y recuadros ---------- */
.fig { margin: 1.8rem 0; max-width: var(--measure); }
.fig svg { display: block; width: 100%; height: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 10px; }
.fig figcaption { font-size: .92rem; color: var(--ink2); margin-top: .5rem; line-height: 1.45; }
.fig figcaption strong { color: var(--head); }
.fig .t { fill: var(--ink); font-size: 14px; }
.fig .t-m { fill: var(--ink2); font-size: 12.5px; }
.fig .t-h { fill: var(--head); font-size: 14px; font-weight: 700; }
.fig .t-eb { fill: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
:root:not([data-theme="light"]) .fig .t-eb { fill: var(--accent); }
.fig .t-big { fill: var(--head); font-size: 34px; font-weight: 700; }
.fig .t-big2 { fill: var(--head); font-size: 18px; font-weight: 700; }
.fig .t-hl { fill: #06263F; font-size: 15px; font-weight: 700; }
.fig .t-cell { fill: var(--head); font-size: 22px; font-weight: 700; }
.fig .t-inv { fill: #FFFFFF; font-size: 18px; font-weight: 700; }
.fig .t-inv2 { fill: #06263F; font-size: 12px; font-weight: 700; }
.fig .t-tag { fill: #06263F; font-size: 9px; font-weight: 700; }
.fig .bx { fill: var(--bg); stroke: var(--rule); stroke-width: 1.5; }
.fig .bx2 { fill: var(--bg); stroke: var(--rule); stroke-width: 1.2; stroke-dasharray: 4 3; }
.fig .bx-acc { fill: var(--surface2); stroke: var(--cyan); stroke-width: 1.5; }
.fig .bx-nv { fill: var(--navy); }
:root:not([data-theme="light"]) .fig .bx-nv { fill: var(--blue); }
.fig .cell { fill: var(--bg); stroke: var(--rule); }
.fig .hl { fill: var(--cyan); }
.fig .chr { fill: var(--surface2); stroke: var(--rule); stroke-width: 1.5; }
.fig .band { fill: var(--rule); }
.fig .mark { stroke: var(--cyan); stroke-width: 3; }
.fig .ln { stroke: var(--ink2); stroke-width: 1.6; fill: none; }
.fig .ln-d { stroke: var(--ink2); stroke-width: 1.4; fill: none; stroke-dasharray: 5 4; }
.fig .ln-acc { stroke: var(--cyan); stroke-width: 2; fill: none; }
.fig .mk { fill: var(--ink2); }
.fig .mk-acc { fill: var(--cyan); }
.fig .ax { stroke: var(--ink2); stroke-width: 1.5; }
.fig .pq-a { fill: var(--surface2); }
.fig .pq-b { fill: color-mix(in srgb, var(--cyan) 35%, var(--bg)); }
.fig .pq-c { fill: color-mix(in srgb, var(--cyan) 70%, var(--bg)); }
.fig .frame { fill: none; stroke: var(--head); stroke-width: 1.5; }
.fig .zone-a { fill: color-mix(in srgb, var(--bad) 14%, var(--bg)); stroke: var(--bad); stroke-width: 1.2; }
.fig .zone-b { fill: color-mix(in srgb, var(--cyan) 18%, var(--bg)); stroke: var(--cyan); stroke-width: 1.2; }
.fig .zone-c { fill: color-mix(in srgb, var(--warn) 16%, var(--bg)); stroke: var(--warn); stroke-width: 1.2; }
.fig .dot { fill: var(--rule); }
.fig .dot-b { fill: var(--head); }
.fig .dot-x { fill: var(--cyan); }
.fig .pair { stroke: var(--rule); stroke-width: 2; }
.fig .pair-hl { stroke: var(--cyan); stroke-width: 3; }
.fig .dna { stroke: var(--blue); stroke-width: 3; fill: none; }
:root:not([data-theme="light"]) .fig .dna { stroke: var(--accent); }
.fig .hist { fill: var(--surface2); stroke: var(--head); stroke-width: 1.4; }
.fig .tail { stroke: var(--ink2); stroke-width: 1.4; }
.fig .ac { fill: var(--cyan); }
.fig .me { fill: #E3B552; }
.fig .num { fill: var(--cyan); }
.fig .sep { stroke: var(--rule); stroke-dasharray: 4 4; }
aside.fact { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .8rem; background: color-mix(in srgb, var(--cyan) 10%, var(--bg)); border: 1px solid color-mix(in srgb, var(--cyan) 45%, var(--bg)); border-radius: 12px; padding: 1rem 1.1rem; margin: 1.6rem 0; font-size: 1rem; }
aside.fact p { margin: 0; }
aside.fact .fact-k { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--cyan); color: #06263F; font-weight: 700; font-size: 1.2rem; display: grid; place-items: center; }
aside.key { margin: 1.8rem 0; padding: 1.1rem 1.3rem; background: var(--key-bg); color: var(--key-fg); border-radius: 12px; font-size: 1.08rem; }
aside.key p { margin: 0; }
aside.key strong { color: var(--cyan); display: block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .35rem; }
em[lang="en"] { color: var(--ink2); }
aside.quote { margin: 1.8rem 0; padding: 1.1rem 1.3rem 1.1rem 3.2rem; position: relative; background: var(--surface); border-radius: 12px; font-size: 1.05rem; font-style: italic; }
aside.quote::before { content: "«"; position: absolute; left: 1rem; top: .35rem; font-size: 2.6rem; line-height: 1; color: var(--cyan); font-style: normal; font-weight: 700; }
aside.quote p { margin: 0; }
.callout.cgjd aside, .callout.cgjd blockquote { background: rgba(255,255,255,.07); color: #E6F1F9; border-color: rgba(255,255,255,.18); }
.callout.cgjd aside strong { color: #FFFFFF; }
.rv-tag { display: inline-block; margin-left: .6rem; padding: .05rem .5rem; border-radius: 999px; background: var(--ok); color: #fff; font-size: .78rem; font-weight: 700; font-style: normal; white-space: nowrap; }
.rv-n { display: inline-block; margin-left: .5rem; font-size: .75rem; color: var(--ink2); font-weight: 400; }
.review-bar { background: var(--ok-bg); color: var(--ink); border-bottom: 2px solid var(--ok); padding: .5rem 1rem; font-size: .92rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.review-bar b { color: var(--ok); }
.review-bar button { margin-left: auto; }
.bank-all { margin: 2rem 0; border: 2px solid var(--ok); border-radius: 12px; padding: .2rem 1.1rem; background: var(--surface); }
.bank-all summary { cursor: pointer; padding: .8rem 0; font-weight: 700; color: var(--head); }
.bank-all .bq { border-top: 1px solid var(--rule); padding: 1rem 0 .9rem; }
.bank-all .bq .q { margin: 0 0 .5rem; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); font-weight: 700; color: var(--head); line-height: 1.45; }
.bank-all .bq .q .n { color: var(--blue); font-variant-numeric: tabular-nums; }
:root:not([data-theme="light"]) .bank-all .bq .q .n { color: var(--accent); }
.bank-all .bq-body { padding-left: 2.2rem; }
.bank-all ol { list-style: none; padding: 0; margin: 0 0 .5rem; }
.bank-all li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); padding: .2rem 0; line-height: 1.45; }
.bank-all li.ok { font-weight: 700; color: var(--head); }
.bank-all li .rv-tag { margin-left: .5rem; }
.bank-all .rx { margin: .35rem 0 0; font-size: .95rem; color: var(--ink2); line-height: 1.5; }
@media (max-width: 520px) { .bank-all { padding: .2rem .8rem; } .bank-all .bq .q { grid-template-columns: 1.8rem minmax(0, 1fr); } .bank-all .bq-body { padding-left: 0; } }
aside.quote strong { font-style: normal; color: var(--head); display: block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .3rem; }
aside.clinic { border-left: 4px solid var(--ok); background: var(--ok-bg); border-radius: 0 10px 10px 0; padding: .85rem 1.1rem; margin: 1.6rem 0; font-size: 1rem; }
aside.clinic p { margin: 0; }
aside.clinic strong:first-child { color: var(--ok); }
.fb { font-size: .95rem; line-height: 1.5; margin: .7rem 0 0 2rem; padding: .7rem .9rem; border-radius: 8px; }
.fb.ok { background: var(--ok-bg); }
.fb.no { background: var(--bad-bg); }
.fb.ok > b { color: var(--ok); }
.fb.no > b { color: var(--bad); }
.rv { border: 1px solid var(--rule); border-left: 4px solid var(--ok); border-radius: 0 10px 10px 0; padding: .9rem 1.1rem .2rem; margin: 1rem 0; }
.rv.no { border-left-color: var(--bad); }
.rv .q { margin: 0 0 .5rem; display: grid; grid-template-columns: 2rem minmax(0, 1fr); font-weight: 700; color: var(--head); }
.rv .q .n { color: var(--blue); }
:root:not([data-theme="light"]) .rv .q .n { color: var(--accent); }
.rv-body { padding-left: 2rem; font-size: .98rem; }
.rv-body p { margin: 0 0 .6rem; }
.rv-body .pill { margin-right: .4rem; }
.rv .rx { color: var(--ink2); }
@media (max-width: 520px) { .fb, .rv-body { margin-left: 0; padding-left: .9rem; } }

@media (max-width: 900px) {
  #view-login { grid-template-columns: minmax(0, 1fr); }
  .login-side { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 2rem; }
  .body { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 88vw); max-height: none; z-index: 60; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); padding-top: calc(1rem + env(safe-area-inset-top, 0px)); padding-left: env(safe-area-inset-left, 0px); }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  .topbar-inner { flex-wrap: wrap; row-gap: .35rem; }
  .topbar .course { order: 5; flex: 1 0 100%; border-left: 0; padding-left: 0; font-size: .8rem; white-space: normal; line-height: 1.3; }
  .page { padding: 0; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .facts b { font-size: 1.3rem; }
  .user > button .uname { display: none; }
  .status-card { grid-template-columns: minmax(0, 1fr); }
  dl.tr { grid-template-columns: minmax(0, 1fr); }
  dl.tr dt { padding-top: .6rem; }
  .opts { padding-left: 0 !important; }
  .expl { padding-left: .8rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.ex-part { margin: 2rem 0 .8rem; padding-top: 1rem; border-top: 2px solid var(--rule); font-size: 1.25rem; }
.caso-v { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--blue); border-radius: 10px; padding: 1rem 1.2rem; margin: 1.6rem 0 1rem; }
.caso-v h3 { margin: .25rem 0 .5rem; font-size: 1.08rem; }
.caso-v p:last-child { margin-bottom: 0; }
