/* ============================================================
   edoo · ui/legal-misc.css — páginas públicas sueltas.
   1. Documentos legales (privacidad, términos): cabecera blanca con la
      marca y "Volver", índice a la izquierda en escritorio, texto a 68ch
      con titulares serif como la landing. Referencias: Moodle/D2L
      (documento sobrio, titular serif), Canvas (índice lateral fijo).
   2. Tarjetas de acceso (error, enlace vencido, nueva contraseña):
      tarjeta blanca de 440 px sobre la banda de marca, etiquetas sobre
      los campos y un botón ancho (Pearson).
   3. Métricas del fundador: tablero sobrio con cifras y tablas del
      sistema (.table, .alert, .pill).
   Solo tokens de tokens.css.
   ============================================================ */

/* ---------- 1. Documentos legales ---------- */
.lg-body { background: var(--surface); }
.lg-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.lg-head { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border-light); }
.lg-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.lg-brand { font-family: var(--font-serif); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; color: var(--text); line-height: 1; }
.lg-brand:hover { text-decoration: none; }
.lg-hero { padding-top: 48px; }
.lg-hero > :last-child { padding-bottom: 32px; border-bottom: 1px solid var(--border-light); }
.lg-hero .lg-lead { max-width: 60ch; }
.lg-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 40px; padding-bottom: 72px; }
.lg-toc { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow: auto; }
.lg-toc__label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; list-style: none; cursor: default; }
.lg-toc__label::-webkit-details-marker { display: none; }
.lg-toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.lg-toc li { margin: 0; }
.lg-toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.35; color: var(--text-secondary); }
.lg-toc a:hover { color: var(--primary); border-left-color: var(--primary); text-decoration: none; }
.lg-doc { max-width: 68ch; font-size: 16px; line-height: 1.7; color: var(--text); }
.lg-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin: 0 0 12px; }
.lg-hero h1 { font-family: var(--font-serif); font-size: 44px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.12; margin: 0; }
.lg-meta { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.lg-lead { margin: 24px 0 0; font-size: 18px; color: var(--text-secondary); }
.lg-doc > p { margin-top: 0; }
.lg-doc > p + section:first-of-type { padding-top: 24px; }
.lg-doc section { padding-top: 32px; scroll-margin-top: 84px; }
.lg-doc section:first-of-type { padding-top: 0; }
.lg-doc > p:first-child { margin-top: 0 !important; }
.lg-doc section + section { margin-top: 0; }
.lg-doc h2 { font-family: var(--font-serif); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; margin: 0 0 12px; padding-top: 24px; border-top: 1px solid var(--border-light); }
.lg-doc section:first-of-type h2 { border-top: 0; padding-top: 0; }
.lg-num { color: var(--muted); font-weight: 400; margin-right: 4px; }
.lg-doc h3 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
.lg-doc p { margin: 0 0 12px; }
.lg-doc ul, .lg-doc ol { margin: 0 0 12px; padding-left: 1.25em; }
.lg-doc li { margin: 0 0 8px; }
.lg-doc li::marker { color: var(--muted); }
.lg-doc a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.lg-doc strong { font-weight: 700; }
.lg-doc .info-box, .lg-doc .warning-box { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--border); border-left: 4px solid var(--info); border-radius: var(--radius); background: var(--info-bg); font-size: 15px; }
.lg-doc .warning-box { border-left-color: var(--warning); background: var(--warning-bg); }
.lg-doc .info-box p, .lg-doc .warning-box p { margin: 0; }
.lg-doc table { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: 14px; }
.lg-doc th, .lg-doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.lg-doc th { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--border); }
.lg-foot { border-top: 1px solid var(--border-light); background: var(--bg); }
.lg-foot__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 64px; padding-top: 16px; padding-bottom: 16px; font-size: 13px; color: var(--muted); }
.lg-foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.lg-foot a { color: var(--text-secondary); }
@media (max-width: 1023px) {
    .lg-hero { padding-top: 32px; }
    .lg-hero > :last-child { padding-bottom: 24px; }
    .lg-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; }
    .lg-toc { position: static; max-height: none; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
    .lg-toc__box { padding: 12px 16px; }
    .lg-toc__label { margin: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
    .lg-toc__label::after { content: "+"; font-size: 18px; font-weight: 400; color: var(--muted); }
    .lg-toc__box[open] .lg-toc__label { margin-bottom: 12px; }
    .lg-toc__box[open] .lg-toc__label::after { content: "−"; }
    .lg-toc ol { columns: 2; column-gap: 24px; border-left: 0; }
    .lg-toc a { padding: 4px 0; border-left: 0; margin: 0; }
    .lg-toc a:hover { border-left: 0; }
}
@media (max-width: 600px) {
    .lg-wrap { padding-left: 20px; padding-right: 20px; }
    .lg-head__inner { min-height: 60px; }
    .lg-brand { font-size: 24px; }
    .lg-doc { font-size: 15px; }
    .lg-hero h1 { font-size: 32px; }
    .lg-doc h2 { font-size: 21px; }
    .lg-toc ol { columns: 1; }
    .lg-foot__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- 2. Tarjetas de acceso (Pearson) ---------- */
.ac-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--band); }
.ac-card { width: 100%; max-width: 440px; padding: 40px 36px 32px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.ac-brand { display: inline-block; margin-bottom: 28px; font-family: var(--font-serif); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; color: var(--text); line-height: 1; }
.ac-brand:hover { text-decoration: none; }
.ac-card h1 { font-family: var(--font-serif); font-size: 28px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.2; margin: 0 0 12px; }
.ac-card > p, .ac-card .subtitle { margin: 0 0 24px; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
.ac-form { display: flex; flex-direction: column; gap: 16px; }
.ac-form .field + .field { margin-top: 0; }
.ac-form input { min-height: 44px; font-size: 15px; }
.ac-btn { min-height: 48px; border-radius: 999px; font-size: 16px; margin-top: 8px; }
.ac-card .msg { display: none; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); border-left: 4px solid var(--info); font-size: 14px; background: var(--info-bg); }
.ac-card .msg.success { border-left-color: var(--success); background: var(--success-bg); color: var(--text); }
.ac-card .msg.error { border-left-color: var(--danger); background: var(--danger-bg); color: var(--text); }
.ac-foot { margin: 24px 0 0 !important; padding-top: 16px; border-top: 1px solid var(--border-light); font-size: 13px !important; color: var(--muted) !important; }
@media (max-width: 600px) {
    .ac-card { padding: 32px 20px 24px; }
    .ac-card h1 { font-size: 24px; }
}

/* ---------- 3. Métricas del fundador ---------- */
.mt-body { background: var(--bg); }
.mt-body .wrap { max-width: var(--content-max); margin: 0 auto; padding: 40px 32px 72px; }
.mt-body header { margin-bottom: 8px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.mt-body h1 { font-size: var(--fs-h1); font-weight: var(--fw-title); margin: 0; }
.mt-body h1 small { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 400; color: var(--muted); }
.mt-body h2 { font-size: var(--fs-h2); font-weight: 400; margin: 40px 0 8px; }
.mt-body h2 + .muted, .mt-body .muted { display: block; margin: 0 0 16px; font-size: 13px; color: var(--muted); max-width: 80ch; }
.mt-body .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.mt-body .pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 700; }
.mt-body .pill:hover { border-color: var(--border-strong); text-decoration: none; }
.mt-body .pill.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.mt-body .sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.mt-body form.pick { display: inline-flex; align-items: center; gap: 8px; }
.mt-body form.pick label { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.mt-body form.pick input { width: auto; min-height: 32px; padding: 4px 8px; }
.mt-body form.pick button { min-height: 32px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 13px; font-weight: 700; }
.mt-body .period { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 18px; font-weight: 700; }
.mt-body .period a.arrow { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 16px; }
.mt-body .period a.arrow:hover { border-color: var(--border-strong); text-decoration: none; }
.mt-body .period .arrow.off { visibility: hidden; }
.mt-body .state { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700; color: var(--text); }
.mt-body .state.open { background: var(--success-bg); }
.mt-body .state.closed { background: var(--warning-bg); }
.mt-body .alert { margin: 16px 0; }
.mt-body .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.mt-body .mt-stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.mt-body .mt-stat .n { font-size: 28px; font-weight: 300; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.mt-body .mt-stat .l { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--text-secondary); line-height: 1.3; }
.mt-body .mt-stat .s { margin-top: 4px; font-size: 12px; color: var(--muted); }
.mt-body .mt-stat.hi { border-color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }
.mt-body .mt-stat.empty { text-align: center; color: var(--muted); font-size: 14px; }
.mt-body .tw { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.mt-body .tw .table { margin: 0; }
.mt-body .table td.empty { padding: 20px; text-align: center; color: var(--muted); }
.mt-body .table tr.link { cursor: pointer; }
.mt-body td a.day { color: var(--primary); font-weight: 700; }
.mt-body .bar { position: relative; height: 8px; min-width: 80px; border-radius: 4px; background: var(--border-light); }
.mt-body .bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--primary); }
.mt-body a.c { color: var(--primary); }
.mt-body .help { margin-top: 40px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.mt-body code { font-size: 12px; padding: 1px 4px; border-radius: 3px; background: var(--surface-2); }
@media (max-width: 600px) {
    .mt-body .wrap { padding: 24px 16px 48px; }
    .mt-body .sep { display: none; }
}
