/* Learning on the Go — Canada Dreams Education
   Paleta corporativa: Verde Canadá #003333 · Rojo Canadá #E90C1B
   Firma visual: la "escalera" de 4 niveles (Básico → Avanzado → Profesional → CEO) */
:root {
  --verde: #003333;
  --verde-2: #0B4D4D;
  --rojo: #E90C1B;
  --paper: #F3F6F5;
  --surface: #FFFFFF;
  --mint: #DDEAE7;
  --line: #C9D6D3;
  --muted: #4E6664;
  --ok: #1B7F4B;
  --warn: #A15C00;
  --radius: 14px;
  --font: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --tabbar: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.55 var(--font); color: var(--verde); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--verde); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .8em; max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Encabezado ---------- */
.topbar { background: var(--verde); color: #fff; position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px); }
.topbar-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 1.25rem; padding: .6rem 1.1rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand span { font-weight: 700; font-size: .95rem; border-left: 1px solid rgba(255,255,255,.35); padding-left: .75rem; white-space: nowrap; }
.topnav { display: flex; gap: .2rem; margin-left: auto; }
.topnav a { color: #fff; text-decoration: none; padding: .5rem .7rem; font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
.topnav a.on { border-bottom-color: var(--rojo); }
.langsel { width: auto; flex: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; padding: .3rem .4rem; font: inherit; font-size: .85rem; }
.langsel option { color: var(--verde); }
.topbar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }

/* ---------- Estructura ---------- */
main.page { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.1rem calc(var(--tabbar) + 2rem); }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.panel.flat { background: transparent; border: 0; padding: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2rem 0 .8rem; }
.loading { padding: 3rem 0; color: var(--muted); }
.empty { padding: 1.4rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.error { padding: 1rem 1.2rem; border-left: 4px solid var(--rojo); background: #fff; border-radius: 6px; }
.notice { padding: .8rem 1rem; background: var(--mint); border-radius: 8px; }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 700; font-size: .95rem; padding: .7rem 1.1rem; border-radius: 6px; border: 2px solid var(--verde); background: var(--verde); color: #fff; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--verde-2); border-color: var(--verde-2); }
.btn-red { background: var(--rojo); border-color: var(--rojo); }
.btn-red:hover { background: #C50A17; border-color: #C50A17; }
.btn-ghost { background: transparent; color: var(--verde); }
.btn-ghost:hover { background: var(--mint); }
.btn-sm { padding: .35rem .7rem; min-height: 34px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--verde); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
label { display: block; font-weight: 600; font-size: .9rem; margin: .8rem 0 .3rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--verde); padding: .65rem .75rem; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--verde); outline: none; box-shadow: 0 0 0 3px var(--mint); }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }

/* ---------- Firma: escalera de niveles ---------- */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; gap: 6px; margin-top: 1rem; }
.rung { display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; color: var(--verde); border-radius: 6px 6px 0 0; padding: .5rem .3rem; min-width: 0; background: var(--mint); border-top: 4px solid var(--verde); min-height: 64px; transition: background .15s; }
.rung:nth-child(2) { min-height: 88px; }
.rung:nth-child(3) { min-height: 112px; }
.rung:nth-child(4) { min-height: 136px; }
.rung:hover { background: #cfe0dc; }
.rung b { font-size: .8rem; line-height: 1.15; letter-spacing: -.015em; hyphens: auto; -webkit-hyphens: auto; }
.rung { overflow: hidden; }
.rung small { font-size: .75rem; color: var(--muted); }
.rung.done { background: var(--verde); color: #fff; border-top-color: var(--rojo); }
.rung.done small { color: #cfe; }
.rung.enrolled { border-top-color: var(--rojo); background: #fff; outline: 1.5px solid var(--verde); }
.rung.locked { opacity: .55; }
.ladder.lg .rung { min-height: 56px; }
.ladder.lg .rung:nth-child(2) { min-height: 76px; }
.ladder.lg .rung:nth-child(3) { min-height: 96px; }
.ladder.lg .rung:nth-child(4) { min-height: 116px; }
.rung.current { outline: 3px solid var(--rojo); outline-offset: -3px; }

.sector-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.1rem 0; display: flex; flex-direction: column; }
.sector-card h3 { margin-bottom: .2rem; }
.ceo-card { display: block; margin-top: 1.2rem; background: var(--verde); color: #fff; border-radius: var(--radius); padding: 1.4rem 1.6rem; text-decoration: none; border-left: 6px solid var(--rojo); }
.ceo-card h2 { margin: .6rem 0 .3rem; }
.ceo-card p { color: #d6e6e3; }
.ceo-card .btn-ghost { color: #fff; border-color: #fff; }

/* ---------- Curso y lecciones ---------- */
.course-head { background: var(--verde); color: #fff; border-radius: var(--radius); padding: 1.6rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: end; }
.course-head a { color: #fff; }
.course-head .ladder .rung { background: rgba(255,255,255,.08); color: #fff; border-top-color: rgba(255,255,255,.6); }
.course-head .ladder .rung small { color: #cde; }
.course-head .ladder .rung.done { background: #fff; color: var(--verde); }
.course-head .ladder .rung.done small { color: var(--muted); }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--mint); color: var(--verde); }
.tag.red { background: var(--rojo); color: #fff; }
.tag.ok { background: #DDF1E6; color: var(--ok); }
.tag.warn { background: #FBEBD3; color: var(--warn); }
.course-head .tag { background: rgba(255,255,255,.15); color: #fff; }
.layout-course { display: grid; grid-template-columns: 1fr 340px; gap: 1.2rem; margin-top: 1.2rem; align-items: start; }
.week { margin-bottom: 1.1rem; }
.week h3 { font-size: .95rem; color: var(--muted); margin-bottom: .4rem; }
.lesson-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; text-decoration: none; color: var(--verde); }
.lesson-row:hover { border-color: var(--verde); }
.lesson-row .kind { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--mint); font-size: .8rem; font-weight: 800; }
.lesson-row.done .kind { background: var(--verde); color: #fff; }
.lesson-row .grow { flex: 1; min-width: 0; }
.lesson-row.locked { opacity: .6; pointer-events: none; }
.progress { height: 8px; background: var(--mint); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--rojo); }
.gradelist { width: 100%; border-collapse: collapse; }
.gradelist td { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.gradelist td:last-child { text-align: right; font-weight: 700; }
.gradelist tr.total td { border-bottom: 0; font-size: 1.1rem; }
.lesson-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.lesson-body .content { max-width: 75ch; }
.lesson-body .content img { border-radius: 8px; }
.lesson-body .content figure { margin: 1rem 0 1.4rem; }
.lesson-body .content figure img { width: 100%; max-width: 760px; height: auto; }
.lesson-body .content h3 { margin-top: 1.4rem; }
.lesson-body .content table { border-collapse: collapse; width: 100%; margin: .6rem 0 1rem; font-size: .93rem; display: block; overflow-x: auto; }
.lesson-body .content th, .lesson-body .content td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
.lesson-body .content th { background: var(--paper); }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 1rem; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.q { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.q p { font-weight: 700; }
.opt { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border: 1.5px solid var(--line); border-radius: 8px; margin: .35rem 0; cursor: pointer; font-weight: 500; }
.opt:has(input:checked) { border-color: var(--verde); background: var(--mint); }
.q.right { border-left: 4px solid var(--ok); padding-left: .8rem; }
.q.wrong { border-left: 4px solid var(--rojo); padding-left: .8rem; }
.lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }

/* ---------- Tarjetas simples ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.card h3 { margin-bottom: .25rem; }
.list-item { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.date-chip { flex: none; width: 58px; text-align: center; border: 1.5px solid var(--verde); border-radius: 8px; padding: .25rem 0; line-height: 1.1; }
.date-chip b { display: block; font-size: 1.3rem; }
.date-chip small { font-size: .72rem; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--verde); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side img { width: 220px; }
.auth-side h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 14ch; }
.auth-main { display: grid; place-items: center; padding: 2rem 1.2rem; }
.auth-box { width: 100%; max-width: 400px; }
.tabs { display: flex; gap: .25rem; border-bottom: 1.5px solid var(--line); margin-bottom: 1rem; }
.tabs button { background: none; border: 0; font: inherit; font-weight: 700; color: var(--muted); padding: .6rem .8rem; border-bottom: 3px solid transparent; margin-bottom: -1.5px; cursor: pointer; }
.tabs button.on { color: var(--verde); border-bottom-color: var(--rojo); }

/* ---------- Barra inferior (móvil) ---------- */
.tabbar { display: none; }
@media (max-width: 820px) {
  .topnav { display: none; }
  .brand span { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabbar); text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 700; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--verde); box-shadow: inset 0 3px 0 var(--rojo); }
  .course-head { grid-template-columns: 1fr; }
  .layout-course { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { padding: 1.6rem; }
  .auth-side h1 { font-size: 1.6rem; }
}

/* ---------- Toast y modal ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 1rem); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--verde); color: #fff; padding: .8rem 1.1rem; border-radius: 8px; font-weight: 600; z-index: 100; transition: .2s; max-width: 92vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--rojo); }
.modal-bg { position: fixed; inset: 0; background: rgba(0,40,40,.45); z-index: 80; display: grid; place-items: center; padding: 1rem; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 720px; max-height: 90vh; overflow: auto; padding: 1.4rem; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* ---------- Portal de administración ---------- */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--verde); color: #fff; padding: 1.2rem .8rem; position: sticky; top: 0; height: 100vh; overflow: auto; }
.side img { width: 150px; margin: 0 .5rem 1.4rem; }
.side a { display: flex; justify-content: space-between; color: #fff; text-decoration: none; padding: .55rem .7rem; border-radius: 6px; font-weight: 600; font-size: .95rem; }
.side a.on { background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 var(--rojo); }
.side a:hover { background: rgba(255,255,255,.08); }
.side .count { background: var(--rojo); border-radius: 999px; font-size: .75rem; padding: 0 .45rem; }
.side .who { margin-top: 1.5rem; font-size: .82rem; opacity: .85; padding: 0 .7rem; }
.admin main { padding: 1.6rem 1.8rem 3rem; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.kpi b { display: block; font-size: 1.8rem; }
.kpi span { color: var(--muted); font-size: .88rem; }
.tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--paper); font-size: .82rem; color: var(--muted); font-weight: 700; position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
.filters > * { width: auto; min-width: 150px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: flex; flex-wrap: wrap; gap: .2rem; }
  .side img { width: 110px; margin-bottom: .5rem; flex-basis: 100%; }
  .admin main { padding: 1.2rem 1rem 3rem; }
}

/* ---------- Certificado (verify.html) ---------- */
.cert { background: #fff; max-width: 1000px; margin: 2rem auto; aspect-ratio: 11 / 8.5; border: 10px solid var(--verde); outline: 2px solid var(--rojo); outline-offset: -18px; padding: 4.5rem 5rem; display: flex; flex-direction: column; justify-content: space-between; }
.cert .who { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; border-bottom: 2px solid var(--verde); padding-bottom: .4rem; }
.cert-foot { display: flex; justify-content: space-between; align-items: end; gap: 2rem; font-size: .9rem; }
@media print {
  @page { size: letter landscape; margin: 0; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .cert { margin: 0; width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Selector de idioma «Español | English» */
.langswitch { display: inline-flex; flex: none; border: 1px solid var(--linea, #C9D6D3); border-radius: 999px; overflow: hidden; }
.langswitch button { border: 0; background: transparent; color: var(--verde, #003333); font: inherit; font-size: .85rem; padding: .32rem .8rem; cursor: pointer; line-height: 1.2; }
.langswitch button + button { border-left: 1px solid var(--linea, #C9D6D3); }
.langswitch button.on { background: var(--verde, #003333); color: #fff; font-weight: 600; }
.langswitch button:focus-visible { outline: 2px solid var(--rojo, #E90C1B); outline-offset: -2px; }
.langswitch.dark { border-color: rgba(255,255,255,.45); }
.langswitch.dark button { color: #fff; }
.langswitch.dark button + button { border-left-color: rgba(255,255,255,.45); }
.langswitch.dark button.on { background: #fff; color: var(--verde, #003333); }
.langswitch .l-short { display: none; }
@media (max-width: 640px) { .langswitch .l-long { display: none; } .langswitch .l-short { display: inline; } .langswitch button { padding: .3rem .6rem; } }

/* DreamsUp dentro de la lección */
.ds-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.4rem; padding: 1rem 1.2rem; border: 1px solid var(--linea, #C9D6D3); border-left: 4px solid var(--rojo, #E90C1B); border-radius: 10px; background: #fff; }
.ds-card h3 { margin: .4rem 0 .2rem; }
.ds-fallback { flex-basis: 100%; }
/* Cátedra de la Paz */
.paz-hero { background: linear-gradient(135deg, var(--verde, #003333), #0B4D4D); color: #fff; border-radius: 14px; padding: 1.6rem 1.6rem 1.4rem; }
.paz-hero h1 { color: #fff; margin: .5rem 0 .3rem; }
.paz-hero p { color: rgba(255,255,255,.88); max-width: 60ch; }
.paz-hero .tag { background: rgba(255,255,255,.15); color: #fff; }
.paz-tabs { display: flex; gap: .4rem; margin-top: 1rem; border-bottom: 1px solid var(--linea, #C9D6D3); overflow-x: auto; }
.paz-tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--verde, #003333); border-bottom: 3px solid transparent; white-space: nowrap; }
.paz-tabs a.on { border-bottom-color: var(--rojo, #E90C1B); font-weight: 600; }
.book-card { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--linea, #C9D6D3); border-radius: 12px; padding: 1rem; }
.book-cover { flex: none; width: 110px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--verde, #003333); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 600; font-size: .85rem; padding: .3rem; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-info h3 { margin: .4rem 0 .2rem; }
.reader { border: 1px solid var(--linea, #C9D6D3); border-radius: 10px; overflow: hidden; background: #f4f4f4; }
.reader iframe { width: 100%; height: 80vh; border: 0; display: block; }
@media (max-width: 640px) { .book-cover { width: 84px; } .reader iframe { height: 70vh; } }

/* ===== Radar de Empleabilidad ===== */
.rd-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.rd-brand .rd-logo { width: 64px; height: 64px; flex: none; }
.rd-brand.sm .rd-logo { width: 44px; height: 44px; }
.rd-title { font-weight: 800; font-size: 1.35rem; color: var(--verde, #003333); line-height: 1.15; }
.rd-brand.sm .rd-title { font-size: 1.1rem; }
.rd-sub { font-size: .88rem; color: #4A5E5C; }
.rd-lotg { height: 46px; margin-left: auto; }
.rd-brand.sm .rd-lotg { height: 34px; }
.rd-hero { background: linear-gradient(135deg, #062C2E, #0B4A4B); color: #fff; border-radius: 16px; padding: 1.6rem; }
.rd-hero h1 { color: #fff; font-size: 1.6rem; margin: 0 0 .5rem; }
.rd-hero p { color: rgba(255,255,255,.9); max-width: 70ch; }
.rd-steps { margin-top: 1rem; }
.rd-plan h3 { margin: .5rem 0 .3rem; }
.rd-progress { height: 6px; background: #E3ECEA; border-radius: 99px; overflow: hidden; margin-bottom: 1rem; }
.rd-progress span { display: block; height: 100%; background: var(--rojo, #E90C1B); transition: width .3s; }
.rd-opts { display: grid; gap: .6rem; margin-top: 1rem; }
.rd-opt { display: flex; gap: .8rem; align-items: flex-start; text-align: left; background: #fff; border: 1.5px solid #C9D6D3; border-radius: 12px; padding: .8rem 1rem; font: inherit; cursor: pointer; color: inherit; }
.rd-opt b { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: #E3ECEA; display: inline-flex; align-items: center; justify-content: center; color: var(--verde, #003333); }
.rd-opt:hover, .rd-opt:focus-visible { border-color: var(--verde, #003333); outline: none; }
.rd-opt.on { border-color: var(--rojo, #E90C1B); background: #FFF4F4; }
.rd-score { display: flex; align-items: baseline; gap: .3rem; margin: .3rem 0; }
.rd-score b { font-size: 3.2rem; color: var(--rojo, #E90C1B); line-height: 1; }
.rd-rec { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid #E3ECEA; }
.rd-rec h3 { margin: .4rem 0; }
.rd-chart { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rd-radar { width: 100%; max-width: 420px; height: auto; }
.rd-legend { display: flex; gap: 1rem; justify-content: center; }
.rd-legend i { display: inline-block; width: 14px; height: 4px; margin-right: .35rem; vertical-align: middle; border-radius: 2px; }
.rd-legend i.dash { background: repeating-linear-gradient(90deg, #0B4D4D 0 4px, transparent 4px 7px); }
.rd-tools { padding-left: 1rem; margin: .4rem 0 0; }
.rd-tools li { margin-bottom: .5rem; }
.rd-cta { margin-top: 1.2rem; border-left: 4px solid var(--rojo, #E90C1B); }
.rd-banner { display: flex; align-items: center; gap: .8rem; background: #fff; border: 1px solid #C9D6D3; border-left: 4px solid var(--rojo, #E90C1B); border-radius: 12px; padding: .7rem 1rem; margin: .8rem 0; text-decoration: none; color: var(--verde, #003333); }
.rd-banner img { width: 38px; height: 38px; flex: none; }
.rd-banner span { flex: 1; font-weight: 600; }
.rd-report { background: #fff; border: 1px solid #C9D6D3; border-radius: 14px; padding: 1.4rem; }
.rd-report section { margin-top: 1.4rem; }
.rd-report h2 { color: var(--verde, #003333); border-bottom: 2px solid #E3ECEA; padding-bottom: .3rem; }
.rd-rep-head { display: flex; align-items: center; gap: 1rem; border-bottom: 3px solid var(--rojo, #E90C1B); padding-bottom: .8rem; }
.rd-rep-head .rd-logo { width: 56px; height: 56px; }
.rd-foot { margin-top: 1.6rem; border-top: 1px solid #E3ECEA; padding-top: .8rem; }
@media (max-width: 640px) { .rd-lotg { display: none; } .rd-hero h1 { font-size: 1.3rem; } .rd-score b { font-size: 2.6rem; } }
@media print {
  .topbar, .tabbar, .topnav, .no-print, .toast, header.app-header, nav { display: none !important; }
  body { background: #fff !important; }
  main, .main, #main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .rd-report { border: 0; padding: 0; }
  .rd-report section { break-inside: avoid-page; }
  .rd-report table { font-size: 10pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; word-break: break-all; }
  @page { size: letter; margin: 14mm; }
}

/* Proyectos de Aplicación: informe imprimible (vertical) */
@media print { body.pj-print .topbar, body.pj-print .langswitch, body.pj-print footer { display: none !important; } body.pj-print details { display: block; } body.pj-print details > * { display: block; } }
/* Con 3 o más idiomas el selector muestra siempre «ES | EN | FR» (nombre completo en el título) */
.langswitch.many .l-long { display: none; } .langswitch.many .l-short { display: inline; } .langswitch.many button { padding: .3rem .65rem; }
@media (max-width: 640px) { .paz-tabs { gap: 0; } .paz-tabs a { padding: .55rem .55rem; font-size: .88rem; } }
/* Barra superior con 9 secciones + 4 idiomas: más ancha, enlaces compactos sin cortes de línea */
.topbar-in { max-width: 1400px; gap: .9rem; }
.topnav { gap: 0; flex-wrap: nowrap; }
.topnav a { padding: .5rem .5rem; font-size: .88rem; white-space: nowrap; }
.topbar-in > .langswitch { flex: none; }
@media (max-width: 1360px) { .topbar .brand span { display: none; } .topnav a { padding: .5rem .42rem; font-size: .84rem; } }
@media (max-width: 1180px) { .topnav a { font-size: .8rem; padding: .5rem .35rem; } }
.topbar .brand { flex: none; } .topbar .brand img { flex: none; }
.topnav { min-width: 0; overflow-x: auto; scrollbar-width: none; } .topnav::-webkit-scrollbar { display: none; }

/* ---------- App móvil (Android + iPhone) ---------- */
.offline-banner { background: #FFF4D6; color: #5A4300; text-align: center; font-weight: 700; font-size: .85rem; padding: .5rem 1rem; }
.offline-box { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .8rem 0; }
.danger-zone { border-color: #E9B7BA; }
.danger-zone h2 { color: var(--rojo); }
.native-reader { height: auto; min-height: 60vh; background: #E8ECEB; border-radius: 10px; padding: .5rem; overflow: hidden; }
.native-reader .pdf-tools { position: sticky; top: 0; z-index: 2; display: flex; justify-content: center; align-items: center; gap: .8rem; padding: .3rem; background: rgba(232,236,235,.95); }
.native-reader .pdf-pages { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.native-reader .pdf-page { width: 100%; display: flex; justify-content: center; }
.native-reader canvas { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); max-width: none; }
.bio-lock { position: fixed; inset: 0; z-index: 1000; background: var(--verde); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.bio-lock .bio-box { max-width: 320px; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.bio-lock img { width: 180px; height: auto; }
/* Android 15+ de borde a borde: Capacitor inyecta --safe-area-inset-* si el WebView no da env() */
html.native .topbar { padding-top: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px)); }
html.native .tabbar { padding-bottom: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px)); }
html.native body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }

/* ---------- The Global Architect Academy (paleta de la trilogía: Navy #1B2A4E · Gold #C9A961) ---------- */
.gaa-hero { background: #1B2A4E; color: #fff; border-radius: 14px; padding: 1.6rem 1.4rem; border-bottom: 4px solid #C9A961; }
.gaa-hero h1 { color: #fff; font-family: Georgia, 'Times New Roman', serif; margin: .5rem 0; }
.gaa-hero p { color: #E8D5A0; }
.tag.gold { background: #C9A961; color: #1B2A4E; }
.course-head.gaa { background: #1B2A4E; border-bottom: 4px solid #C9A961; }
.course-head.gaa h1 { font-family: Georgia, 'Times New Roman', serif; }
.gaa-card { border-top: 4px solid #C9A961; }
