/* ============================================================
   edoo · ui/base.css — base del sistema (app, portal del alumno,
   reproductores y páginas sueltas). Solo tokens de tokens.css.
   Referencias: Canvas (tipografía Lato, títulos ligeros, líneas
   finas), Blackboard (jerarquía de página), D2L (pestañas).
   Orden de carga: tokens.css → ui/base.css → ui/components.css →
   ui/shell.css (solo la app) → hoja de la página.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
[hidden], .hidden { display: none !important; }

/* ---- Tipografía ---- */
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-title); color: var(--text); line-height: 1.2; letter-spacing: 0; }
h1 { font-size: var(--fs-h1); font-weight: var(--fw-title); }
h2 { font-size: var(--fs-h2); font-weight: 400; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h4, h5, h6 { font-size: var(--fs-body); font-weight: 700; }
p { margin: 0; }
p + p { margin-top: 0.75em; }
small, .small { font-size: var(--fs-small); }
strong, b { font-weight: 700; }
.muted, .text-muted { color: var(--muted); }
.lead { font-size: var(--fs-body); color: var(--muted); line-height: 1.55; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.eyebrow i { font-size: 11px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding-left: 1.25em; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--section-gap, 24px) 0; }
code, kbd, pre { font-family: var(--font-mono); font-size: 0.92em; }
img, video, svg { max-width: 100%; height: auto; }
img, video { display: block; }
iframe { border: 0; }
table { border-collapse: collapse; border-spacing: 0; }

/* ---- Controles: herencia de fuente y foco visible ---- */
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
::placeholder { color: var(--muted-light); opacity: 1; }
::selection { background: var(--primary-tint-strong); color: var(--text); }

/* ---- Barras de desplazamiento discretas ---- */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border: 3px solid transparent; border-radius: 8px; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---- Utilidades (pocas; las páginas no inventan más) ---- */
.w-full, .full-width { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.clickable { cursor: pointer; }
.demo-only { display: none; }
.is-demo .demo-only { display: inline-flex; }

/* ---- Contenedor de página suelta (reproductores, legales, errores) ---- */
.page-doc { max-width: var(--content-max); margin: 0 auto; padding: var(--section-gap) var(--page-gutter); }
.page-doc--narrow { max-width: 760px; }

@media print {
    body { background: #fff; color: #000; }
    .no-print { display: none !important; }
}
