/* RR INTEC · Academia Comercial — interfaz compartida (Windows y web). Identidad aprobada: navy/azul RR, Manrope + DM Sans. */
@font-face { font-family: "Manrope"; src: url("assets/manrope-latin-variable.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("assets/dmsans-latin-variable.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --navy: #172638; --navy-2: #1f3249; --rr: #145BC4; --cta: #1762CE; --accent: #68A3D9;
  --body: #3E5167; --muted: #61738D; --border: #D5DDE8; --light: #E1E7EF;
  --bg: #F3F7FB; --soft: #ECF2FB; --card: #fff;
  --amber: #A8691D; --wash: #FDF5E6; --green: #2F7D62; --green-wash: #EAF5F0; --red: #8E1F18; --red-wash: #FBEDEC;
  --r: 14px; --shadow: 0 1px 2px rgba(23,38,56,.06), 0 6px 20px rgba(23,38,56,.06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: "DM Sans", system-ui, sans-serif; color: var(--body); background: var(--bg); font-size: 15px; line-height: 1.45;
  -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
h1, h2, h3, h4 { font-family: Manrope, sans-serif; color: var(--navy); letter-spacing: -.02em; margin: 0; line-height: 1.15; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video, canvas { -webkit-user-drag: none; user-select: none; }

/* ---------- barra superior ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 12px;
  padding-top: max(10px, env(safe-area-inset-top)); }
.top .logo { height: 30px; flex: none; cursor: pointer; }
.top .brand { font-family: Manrope; font-weight: 700; font-size: 13px; letter-spacing: .02em; color: #C9D6E6; white-space: nowrap; }
.top .search { flex: 1; max-width: 520px; margin-left: auto; position: relative; }
.top .search input { width: 100%; border: 0; border-radius: 10px; padding: 9px 12px 9px 36px; font: inherit; font-size: 15px; background: rgba(255,255,255,.12); color: #fff; outline: none; }
.top .search input::placeholder { color: #9FB2C9; }
.top .search input:focus { background: #fff; color: var(--navy); }
.top .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; stroke: #9FB2C9; }
.top .user { font-size: 12px; color: #9FB2C9; white-space: nowrap; }
.top .user button { background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 8px; padding: 4px 9px; margin-left: 6px; font-size: 12px; }
@media (max-width: 640px) { .top .brand, .top .user span { display: none; } }

main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 90px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--rr); font-weight: 600; }
.page-title { font-size: 26px; font-weight: 800; margin: 2px 0 6px; }
.page-sub { color: var(--muted); margin: 0 0 18px; max-width: 760px; }

/* ---------- inicio ---------- */
.hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: 18px; padding: 22px 22px 20px; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero h1 { color: #fff; font-size: 24px; font-weight: 800; }
.hero p { color: #C9D6E6; margin: 6px 0 0; max-width: 640px; }
.hero .narr { margin-top: 12px; font-family: Manrope; font-weight: 700; font-size: 13px; color: var(--accent); letter-spacing: .02em; }
.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1000px) { .areas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .areas { grid-template-columns: 1fr; } }
.area { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--light); display: flex; flex-direction: column; gap: 8px; min-height: 150px; transition: transform .12s, border-color .12s; }
.area:hover { transform: translateY(-2px); border-color: var(--accent); }
.area .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; }
.area .ico svg { width: 22px; height: 22px; stroke: var(--rr); }
.area h2 { font-size: 18px; }
.area p { margin: 0; font-size: 14px; color: var(--muted); }
.area .n { margin-top: auto; font-size: 12px; font-weight: 700; color: var(--rr); font-family: Manrope; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 800px) { .row2 { grid-template-columns: 1fr; } }
.panel { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--light); }
.panel h3 { font-size: 17px; margin-bottom: 4px; }
.panel .hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.weeks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 520px) { .weeks { grid-template-columns: repeat(2, 1fr); } }
.week { background: var(--soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.week b { font-family: Manrope; font-size: 12px; color: var(--rr); letter-spacing: .08em; text-transform: uppercase; }
.week span { font-size: 13.5px; color: var(--navy); font-weight: 600; line-height: 1.25; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { background: var(--soft); color: var(--navy); border: 1px solid transparent; border-radius: 99px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; }
.chip:hover, .chip.on { border-color: var(--rr); color: var(--rr); background: #fff; }

/* ---------- empieza aquí ---------- */
.start { background: var(--card); border: 1px solid var(--light); border-left: 5px solid var(--rr); border-radius: 18px; padding: 18px 20px 16px; box-shadow: var(--shadow); margin-bottom: 18px; }
.start .eyebrow { font-family: Manrope; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--rr); }
.start h2 { font-size: 20px; margin: 3px 0 14px; }
.start-b { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.start-b.solo { grid-template-columns: 1fr; }
@media (max-width: 800px) { .start-b { grid-template-columns: 1fr; gap: 16px; } }
.start-v { display: flex; flex-direction: column; gap: 8px; }
.start-v .thumb { border-radius: 12px; }
.start-v b { font-family: Manrope; color: var(--navy); font-size: 14.5px; }
.start-v:hover b { color: var(--rr); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--rr); color: #fff; font-family: Manrope; font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.steps a { font-family: Manrope; font-weight: 700; color: var(--navy); font-size: 15px; }
.steps a:hover { color: var(--rr); }
.steps p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.steps .more { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--rr); }
.start-g { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--rr); }
.start-g svg { width: 16px; height: 16px; stroke: var(--rr); }

/* ---------- las dos áreas: estudio (azul) y recursos de venta (verde) ---------- */
.tabs { display: flex; gap: 6px; flex: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; font-family: Manrope; font-weight: 700; font-size: 13.5px; color: #C9D6E6; border: 1px solid rgba(255,255,255,.18); }
.tabs a svg { width: 15px; height: 15px; stroke: currentColor; }
.tabs a.t-study.on { background: var(--rr); color: #fff; border-color: var(--rr); }
.tabs a.t-res.on { background: var(--green); color: #fff; border-color: var(--green); }
@media (max-width: 760px) { .tabs a span { display: none; } .tabs a { padding: 7px 9px; } }
.hello { margin: 4px 0 16px; }
.hello h1 { font-size: 26px; font-weight: 800; }
.hello p { margin: 6px 0 0; color: var(--body); font-size: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.big { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--light); border-top: 6px solid var(--rr); display: flex; flex-direction: column; gap: 10px; }
.big.res { border-top-color: var(--green); }
.big h2 { font-size: 22px; }
.big p { margin: 0; color: var(--muted); }
.big h3 { font-size: 15px; margin-top: 4px; }
.atag { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; font-family: Manrope; font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--rr); background: var(--soft); padding: 5px 12px 5px 5px; border-radius: 99px; }
.atag b { width: 22px; height: 22px; border-radius: 50%; background: var(--rr); color: #fff; display: grid; place-items: center; font-size: 12px; letter-spacing: 0; }
.res .atag, .atag.res { color: var(--green); background: var(--green-wash); }
.res .atag b, .atag.res b { background: var(--green); }
.prog { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.prog div { height: 100%; background: var(--rr); border-radius: 99px; }
.progt { color: var(--muted); font-size: 13px; }
.progt b { color: var(--green); }
.big-btn { justify-content: center; text-align: center; padding: 14px 16px; font-size: 15.5px; white-space: normal; }
.lnk { color: var(--rr); font-weight: 700; font-size: 14px; }
.big.res .chip:hover { border-color: var(--green); color: var(--green); }
.quick { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; }
.quick a { color: var(--green); font-weight: 700; font-size: 14px; }
.ahead { border-radius: 18px; padding: 18px 20px; margin-bottom: 8px; background: var(--soft); border-left: 6px solid var(--rr); }
.ahead.res { background: var(--green-wash); border-left-color: var(--green); }
.ahead h1 { font-size: 24px; margin-top: 10px; }
.ahead p { margin: 6px 0 0; max-width: 760px; }
.ahead .atag { background: #fff; }
.section.sep { margin-top: 30px; border-top: 1px solid var(--border); padding-top: 18px; }
.lessons { display: grid; gap: 8px; }
.lesson { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--light); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.lesson:hover { border-color: var(--rr); }
.lesson .ln { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--rr); font-family: Manrope; font-weight: 800; }
.lesson.done .ln { background: var(--rr); color: #fff; }
.lesson b { font-family: Manrope; color: var(--navy); font-size: 15px; display: block; }
.lesson small { color: var(--muted); font-size: 13px; }
.lhead { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
.lhead small { color: var(--muted); font-weight: 700; }
.lbody { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 800px) { .lbody { grid-template-columns: 1fr; } }
.task { background: var(--wash); border-left: 5px solid var(--amber); border-radius: 12px; padding: 14px 16px; }
.task h3 { font-size: 15px; color: #7A4C12; text-transform: uppercase; letter-spacing: .06em; }
.task p { margin: 6px 0 0; color: var(--navy); font-size: 16px; }
.reads { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.reads h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.reads a { color: var(--rr); font-weight: 600; font-size: 14px; }
.lnav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- secciones y tarjetas ---------- */
.section { margin: 22px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section h2 { font-size: 18px; }
.section span { font-size: 12.5px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 9px; } }
.card { background: var(--card); border-radius: 12px; border: 1px solid var(--light); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .12s, border-color .12s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.thumb { aspect-ratio: 16/9; background: var(--navy); position: relative; display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.doc { background: var(--soft); }
.thumb.doc img { object-fit: contain; object-position: top; padding: 8px 8px 0; }
.thumb .kind { position: absolute; left: 8px; bottom: 8px; background: rgba(23,38,56,.82); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; font-family: Manrope; }
.thumb .play { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; }
.thumb .play svg { width: 18px; height: 18px; fill: var(--rr); margin-left: 3px; }
.card .meta { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 5px; }
.card .meta h4 { font-size: 14px; line-height: 1.25; }
.card .meta p { margin: 0; font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-family: Manrope; font-weight: 800; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px; border-radius: 5px; }
.t-int { background: var(--red-wash); color: var(--red); } .t-ext { background: var(--green-wash); color: #1F5E48; } .t-demo { background: var(--wash); color: #7A4C12; }
.t-lock { background: #EEF1F6; color: #4A5B70; }

/* ---------- kits por industria ---------- */
.kits { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.kit { background: var(--card); border: 1px solid var(--light); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); font-family: Manrope; font-weight: 700; color: var(--navy); font-size: 14.5px; display: flex; align-items: center; gap: 10px; min-height: 64px; }
.kit:hover { border-color: var(--accent); }
.kit i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.kitgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.kitstep { background: var(--card); border: 1px solid var(--light); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.kitstep:hover { border-color: var(--accent); }
.kitstep b { font-family: Manrope; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--rr); }
.kitstep span { font-weight: 700; color: var(--navy); }
.kitstep small { color: var(--muted); }

/* ---------- ruta ---------- */
.wk { background: var(--card); border: 1px solid var(--light); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.wk header { background: var(--navy); color: #fff; padding: 14px 16px; }
.wk header b { font-family: Manrope; font-size: 12px; letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
.wk header h3 { color: #fff; font-size: 18px; margin-top: 3px; }
.wk header small { color: #9FB2C9; }
.wk .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; }
.wk .col { padding: 12px 16px 14px; border-top: 1px solid var(--light); }
.wk .col h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--rr); margin-bottom: 6px; }
.wk .col a { display: block; padding: 5px 0; color: var(--navy); font-weight: 600; font-size: 14px; border-bottom: 1px dashed var(--light); }
.wk .col a:hover { color: var(--rr); }
.wk .col li { font-size: 14px; margin: 4px 0; }
.wk .meta { background: var(--soft); padding: 10px 16px; font-size: 13.5px; color: var(--navy); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ---------- mensajes ---------- */
.msgsec { margin: 18px 0 6px; }
.msgsec h3 { font-size: 16px; }
.msgsec p { margin: 3px 0 8px; font-size: 13px; color: var(--muted); }
.msg { background: var(--card); border: 1px solid var(--light); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.msg h4 { font-size: 13.5px; margin-bottom: 5px; color: var(--rr); }
.msg div { white-space: pre-wrap; font-size: 14.5px; color: var(--navy); -webkit-user-select: text; user-select: text; }
.msg button { margin-top: 8px; }

/* ---------- botones ---------- */
.btn { border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 14px; background: var(--rr); color: #fff; display: inline-flex; align-items: center; gap: 7px; }
.btn.ghost { background: #fff; color: var(--rr); border: 1px solid var(--border); }
.btn.dark { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; }

/* ---------- visor ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: #0D1724; display: flex; flex-direction: column; }
.viewer .vbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #fff; background: #0D1724; border-bottom: 1px solid rgba(255,255,255,.08); padding-top: max(10px, env(safe-area-inset-top)); }
.viewer .vbar h3 { color: #fff; font-size: 15px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer .vbody { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: auto; }
.viewer video { max-width: 100%; max-height: 100%; background: #000; }
.viewer .imgv { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .note { color: #C9D6E6; font-size: 12.5px; padding: 8px 14px; background: #13202F; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.viewer .note .tag { flex: none; }
.pdfwrap { position: absolute; inset: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 8px 80px; }
.pdfwrap canvas { background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.4); max-width: 100%; height: auto !important; }
.pdfwrap.slides { justify-content: center; padding: 8px; }
.pdftools { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(13,23,36,.92); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 6px; display: flex; gap: 6px; align-items: center; color: #fff; z-index: 3; }
.pdftools input { width: 52px; text-align: center; border: 0; border-radius: 7px; padding: 6px; font: inherit; }
.pdftools span { font-size: 13px; color: #C9D6E6; padding: 0 4px; }
.fmt { display: flex; gap: 4px; }
.loading { color: #9FB2C9; font-size: 14px; }

/* ---------- activación / login ---------- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(135deg, var(--navy), #0F1B2A); }
.gate .box { background: #fff; border-radius: 18px; padding: 26px 22px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.gate .box img { height: 40px; margin-bottom: 14px; }
.gate h1 { font-size: 22px; margin-bottom: 6px; }
.gate p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.gate label { display: block; font-size: 12.5px; font-weight: 700; color: var(--navy); margin: 12px 0 5px; }
.gate input, .gate textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 15px; outline: none; -webkit-user-select: text; user-select: text; }
.gate textarea { min-height: 92px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.gate input:focus, .gate textarea:focus { border-color: var(--rr); }
.gate .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; font-weight: 700; color: var(--navy); background: var(--soft); border-radius: 10px; padding: 12px; text-align: center; letter-spacing: .06em; -webkit-user-select: all; user-select: all; }
.gate .err { color: var(--red); font-size: 13.5px; margin-top: 10px; min-height: 18px; }
.gate .btn { width: 100%; justify-content: center; margin-top: 14px; padding: 12px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 99; box-shadow: var(--shadow); }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 30px; }
