/* Ingreso U — sitio público (portada y páginas legales). Sin dependencias. */

:root {
    --primary: #1d3a8a;
    --primary-2: #2f5bd3;
    --accent: #f2b51b;
    --text: #1d2433;
    --muted: #5b6475;
    --bg: #f6f8fc;
    --card: #ffffff;
    --border: #e3e8f2;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: var(--primary-2); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Cabecera */
header.top {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
header.top .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 18px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
nav.menu { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
nav.menu a { text-decoration: none; color: var(--muted); font-weight: 600; }
nav.menu a:hover { color: var(--primary); }

/* Portada */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    padding: 56px 0 64px;
}
.hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 0 0 14px; }
.hero p { font-size: 18px; max-width: 680px; opacity: 0.95; margin: 0 0 26px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}
.btn.primary { background: var(--accent); color: #1d2433; }
.btn.ghost { border: 2px solid #fff; color: #fff; }

section { padding: 48px 0; }
section h2 { font-size: 26px; margin: 0 0 8px; }
section .lead { color: var(--muted); margin: 0 0 26px; max-width: 760px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.price { font-size: 26px; font-weight: 800; color: var(--primary); margin: 6px 0; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 14px 56px; position: relative; }
.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute; left: 16px; top: 14px;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}

.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

details { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
details summary { font-weight: 700; cursor: pointer; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Páginas legales */
.doc { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 28px; margin: 32px auto; }
.doc h1 { margin-top: 0; font-size: 28px; }
.doc h2 { font-size: 19px; margin-top: 28px; }
.doc .updated { color: var(--muted); font-size: 14px; }

/* Pie */
footer {
    background: #111a33;
    color: #c7cee0;
    padding: 30px 0;
    font-size: 14px;
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer a { color: #fff; text-decoration: none; margin-right: 16px; }

/* Exámenes de admisión (páginas generadas por tiktok-videos/scripts/paginas-seo.ts) */
.content { padding-top: 22px; padding-bottom: 40px; }
.content h1 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; margin: 6px 0 12px; }
.content .lead { color: var(--muted); font-size: 17px; max-width: 820px; margin: 0 0 22px; }
.content .muted { color: var(--muted); margin: 0 0 14px; }
.block { padding: 18px 0; }
.block h2 { font-size: 22px; margin: 0 0 12px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.card.link { display: block; text-decoration: none; color: var(--text); transition: border-color 120ms ease, transform 120ms ease; }
.card.link:hover { border-color: var(--primary-2); transform: translateY(-1px); }
.card.link h2 { font-size: 19px; margin: 0 0 4px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.grid.small .card { padding: 14px 16px; }
.grid.small h3 { font-size: 16px; margin: 0 0 2px; }

table.data { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 15px; }
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { background: #eef2fb; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
table.data tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; white-space: nowrap; }

ol.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ol.bars li { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(80px, 2fr) auto; align-items: center; gap: 12px; font-size: 15px; }
ol.bars .bar { height: 10px; background: #e7ecf7; border-radius: 99px; overflow: hidden; }
ol.bars .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: 99px; }
ol.bars .count { font-weight: 700; white-space: nowrap; }
ol.bars small { color: var(--muted); font-weight: 500; }

.question { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.q-meta { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--primary-2); text-transform: uppercase; letter-spacing: 0.02em; }
.q-meta a { text-transform: none; }
.q-body p { margin: 0 0 8px; }
.q-body img, .options img { max-width: 100%; height: auto; }
ol.options { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
ol.options li { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; }
.opt { font-weight: 800; color: var(--primary); margin-right: 4px; }
details.answer { margin: 12px 0 0; background: #f2f7ff; border-color: #d6e3fb; }
details.answer p { color: var(--text); }

.cta-box { margin: 26px 0; padding: 26px; border-radius: 16px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.cta-box h2 { margin: 0 0 6px; font-size: 22px; }
.cta-box p { margin: 0 0 16px; opacity: 0.95; max-width: 700px; }
.btn.outline { border: 2px solid #fff; color: #fff; }
.katex { font-size: 1.08em; }

@media (max-width: 640px) {
    header.top .wrap { flex-wrap: wrap; row-gap: 6px; }
    .brand { white-space: nowrap; }
    nav.menu { gap: 14px; font-size: 13px; flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
    nav.menu a { white-space: nowrap; }
    ol.bars li { grid-template-columns: 1fr auto; }
    ol.bars .bar { grid-column: 1 / -1; grid-row: 2; }
    table.data th, table.data td { padding: 8px 10px; }
    .question { padding: 14px; }
}
