/* =========================================================
   LabsAutomation · sitio educativo
   Diseño profesional, sin dependencias externas.
   ========================================================= */

:root {
  /* Tema oscuro (base) — paleta azul + cian */
  --bg: #0b1020;
  --bg-2: #0f1630;
  --surface: #141c38;
  --surface-2: #1a2342;
  --line: #273255;
  --text: #e8ecf8;
  --muted: #9aa6c7;
  --primary: #5b8cff;
  --primary-2: #7a5cff;
  --accent: #35e0c8;
  --primary-rgb: 91,140,255;
  --primary2-rgb: 122,92,255;
  --accent-rgb: 53,224,200;
  --cta: #5b8cff;
  --cta-2: #7a5cff;
  --ok: #37d67a;
  --warn: #ffb454;
  --danger: #ff6b7d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(3, 8, 24, .45);
  --maxw: 1120px;
  --glass: rgba(255,255,255,.04);
  --glass-brd: rgba(255,255,255,.10);
  --font-head: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --font: "Open Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(var(--primary2-rgb), .20), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(var(--accent-rgb), .14), transparent 55%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; font-family: var(--font-head); font-weight: 700; letter-spacing: -.01em; }
.brand-name { font-family: var(--font-head); }

/* Accesibilidad: foco visible (crítico) + movimiento reducido */
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.muted { color: var(--muted); font-weight: 500; }
.grad {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(11, 16, 32, .72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.15);
}
.brand-name strong { color: var(--accent); }
.topnav { display: flex; gap: 22px; margin-left: 8px; }
.topnav a { color: var(--muted); font-weight: 600; font-size: 14px; }
.topnav a:hover { color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar-progress { display: flex; align-items: center; gap: 10px; }
.admin-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 13.5px; cursor: pointer;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); transition: .2s; }
.admin-btn:hover { border-color: var(--primary); color: var(--primary); }
.admin-btn.on { background: rgba(var(--accent-rgb),.12); border-color: var(--accent); color: var(--accent); }
.mini-bar { width: 120px; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .5s ease; }
.mini-text { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 7vw, 86px) clamp(16px, 4vw, 40px) 40px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 6px 12px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: rgba(var(--accent-rgb),.10);
  border: 1px solid rgba(var(--accent-rgb),.25); border-radius: 99px;
}
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 28px rgba(var(--primary-rgb),.35); }
.btn-primary:hover { box-shadow: 0 14px 34px rgba(var(--primary-rgb),.5); }
.btn-cta { color: #fff; background: linear-gradient(135deg, var(--cta), var(--cta-2));
  box-shadow: 0 10px 28px rgba(var(--primary2-rgb),.38); }
.btn-cta:hover { box-shadow: 0 16px 38px rgba(var(--primary2-rgb),.55); }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--primary); }
.hero-stats { display: flex; gap: 36px; margin: 0; }
.hero-stats dt { font-size: 28px; font-weight: 800; }
.hero-stats dd { margin: 0; color: var(--muted); font-size: 13.5px; }

/* terminal del hero */
.hero-card { display: flex; justify-content: center; }
.term {
  width: 100%; max-width: 420px; border-radius: var(--radius);
  background: #070b18; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: #0c1226; border-bottom: 1px solid var(--line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #35406b; }
.term-bar i:nth-child(1){ background:#ff5f57; } .term-bar i:nth-child(2){ background:#febc2e; } .term-bar i:nth-child(3){ background:#28c840; }
.term-bar span { margin-left: auto; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.term-body { margin: 0; padding: 18px; font-family: var(--mono); font-size: 13px; color: #cdd6f4; white-space: pre-wrap; }
.c-prompt { color: var(--accent); } .c-dim { color: #5a6894; } .c-ok { color: var(--ok); } .c-cursor { color: var(--accent); animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- cómo funciona ---------- */
.how {
  max-width: var(--maxw); margin: 0 auto; padding: 10px clamp(16px, 4vw, 40px) 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.how-step { display: flex; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.how-num { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.how-step h3 { font-size: 15.5px; margin: 0 0 2px; }
.how-step p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- secciones ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 40px); }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.01em; }
.section-head p { color: var(--muted); margin: 0; max-width: 60ch; }

/* ---------- checklist setup ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.check-item {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .2s, background .2s;
}
.check-item:hover { border-color: #39477a; }
.check-item.done { background: rgba(55,214,122,.07); border-color: rgba(55,214,122,.4); }
.check-box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; margin-top: 2px; transition: .2s; }
.check-item.done .check-box { background: var(--ok); border-color: var(--ok); }
.check-box svg { width: 14px; height: 14px; opacity: 0; transform: scale(.5); transition: .2s; }
.check-item.done .check-box svg { opacity: 1; transform: scale(1); }
.check-title { font-weight: 700; font-size: 15px; }
.check-desc { color: var(--muted); font-size: 13px; }
.check-desc code { font-family: var(--mono); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12px; color: var(--accent); }

/* ---------- pestañas de nivel ---------- */
.level-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.level-tab {
  padding: 9px 18px; border-radius: 99px; font-weight: 700; font-size: 14px; cursor: pointer;
  color: var(--muted); background: var(--surface); border: 1px solid var(--line); transition: .2s;
}
.level-tab:hover { color: var(--text); border-color: #39477a; }
.level-tab.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; box-shadow: 0 8px 22px rgba(var(--primary-rgb),.3); }

/* encabezado de grupo de nivel */
.level-group { margin-bottom: 14px; }
.level-group-head { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; }
.level-chip { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 5px 12px; border-radius: 99px; }
.level-chip.basico { color: #6fe3a0; background: rgba(55,214,122,.12); border: 1px solid rgba(55,214,122,.35); }
.level-chip.medio { color: #ffc879; background: rgba(255,180,84,.12); border: 1px solid rgba(255,180,84,.35); }
.level-chip.avanzado { color: #ff9aa8; background: rgba(255,107,125,.12); border: 1px solid rgba(255,107,125,.35); }
.level-group-head h3 { margin: 0; font-size: 18px; }
.level-group-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.level-group-head .lg-text { display: flex; flex-direction: column; }

.lab-level { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; flex: none; }
.lab-level.basico { color: #6fe3a0; background: rgba(55,214,122,.12); }
.lab-level.medio { color: #ffc879; background: rgba(255,180,84,.12); }
.lab-level.avanzado { color: #ff9aa8; background: rgba(255,107,125,.12); }

/* ---------- roadmap ---------- */
.roadmap { position: relative; display: flex; flex-direction: column; gap: 16px; }
.roadmap::before {
  content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(var(--primary), var(--accent)); opacity: .35;
}
.node { position: relative; padding-left: 68px; }
.node-dot {
  position: absolute; left: 14px; top: 20px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--line); display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--muted); z-index: 1; transition: .25s;
}
.node.done .node-dot { background: var(--ok); border-color: var(--ok); color: #06240f; }
.lab-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.lab-card:hover { border-color: #39477a; }
.lab-card.open { box-shadow: var(--shadow); border-color: var(--primary); }
.lab-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; }
.lab-badge { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--primary); background: rgba(var(--primary-rgb),.12); border: 1px solid rgba(var(--primary-rgb),.3); padding: 4px 9px; border-radius: 99px; flex: none; }
.lab-titles { flex: 1; min-width: 0; }
.lab-titles h3 { font-size: 17px; margin: 0; }
.lab-goal { color: var(--muted); font-size: 13.5px; }
.lab-chevron { flex: none; width: 24px; height: 24px; color: var(--muted); transition: transform .25s; }
.lab-card.open .lab-chevron { transform: rotate(180deg); color: var(--primary); }
.lab-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.lab-card.open .lab-body { max-height: 2600px; }
.lab-inner { padding: 4px 20px 22px; border-top: 1px solid var(--line); }

.block-label { display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.block-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lab-inner p { margin: 0 0 6px; color: var(--text); }
.concept-list { margin: 0; padding-left: 18px; color: var(--muted); }
.concept-list code { font-family: var(--mono); color: var(--accent); font-size: 12.5px; }

.code-wrap { position: relative; margin: 6px 0 4px; }
.code-wrap pre { margin: 0; background: #070b18; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 16px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #cdd6f4; }
.code-wrap .copy-btn { position: absolute; top: 10px; right: 10px; }
.tok-key { color: #c792ea; } .tok-str { color: #c3e88d; } .tok-com { color: #5a6894; font-style: italic; } .tok-ann { color: #ffcb6b; } .tok-cls { color: #82aaff; }

.run-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.run-chip { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; color: var(--accent); }

.challenge { margin-top: 18px; padding: 16px 18px; background: rgba(255,180,84,.07); border: 1px solid rgba(255,180,84,.3); border-radius: var(--radius-sm); }
.challenge .block-label { color: var(--warn); margin-top: 0; }
.challenge .block-label::before { background: var(--warn); }
.challenge p { color: var(--text); margin: 0; }

.lab-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.site-link { color: var(--muted); font-size: 13px; }
.site-link a { color: var(--primary); font-weight: 700; }
.mark-done { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); transition: .2s; }
.mark-done:hover { border-color: var(--ok); }
.node.done .mark-done { background: rgba(55,214,122,.12); border-color: var(--ok); color: var(--ok); }

/* copy button genérico */
.copy-btn { font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; cursor: pointer; transition: .2s; }
.copy-btn:hover { color: var(--text); border-color: var(--primary); }

/* ---------- recursos ---------- */
.section-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.sub-h { font-size: 16px; margin: 28px 0 14px; color: var(--text); }
.sub-h .muted { font-weight: 500; font-size: 13.5px; }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.res-empty { grid-column: 1 / -1; padding: 28px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.res-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .15s; }
.res-card:hover { border-color: #39477a; transform: translateY(-2px); }
.res-thumb { height: 120px; background: #070b18 center/cover no-repeat; display: grid; place-items: center; border-bottom: 1px solid var(--line); color: var(--muted); }
.res-thumb .ic { width: 42px; height: 42px; opacity: .6; }
.res-pad { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.res-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.res-kind { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; color: var(--primary); background: rgba(var(--primary-rgb),.12); border: 1px solid rgba(var(--primary-rgb),.3); }
.res-card h4 { margin: 2px 0 0; font-size: 15.5px; }
.res-card .res-desc { color: var(--muted); font-size: 13.5px; margin: 0; flex: 1; }
.res-links { display: flex; align-items: center; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.res-links a { color: var(--primary); font-weight: 700; font-size: 13px; }
.res-del { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12.5px; }
.res-del:hover { color: var(--danger); }

/* chips de estado */
.status-chip { font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; }
.status-pendiente { color: #ffc879; background: rgba(255,180,84,.12); border: 1px solid rgba(255,180,84,.35); }
.status-aprobado { color: #6fe3a0; background: rgba(55,214,122,.12); border: 1px solid rgba(55,214,122,.35); }
.status-cambios { color: #ff9aa8; background: rgba(255,107,125,.12); border: 1px solid rgba(255,107,125,.35); }
.res-feedback { margin-top: 6px; padding: 10px 12px; background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 8px; font-size: 13px; color: var(--text); }
.res-feedback b { color: var(--accent); }

/* ---------- modales ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,8,22,.72); backdrop-filter: blur(4px); }
.modal-box { position: relative; width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; max-height: 88vh; overflow-y: auto; animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-sm { max-width: 420px; } .modal-lg { max-width: 720px; }
.modal-box h3 { font-size: 20px; margin: 0 0 4px; }
.modal-x { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.modal-x:hover { color: var(--text); border-color: var(--danger); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.note { font-size: 12px; color: var(--muted); margin: 8px 0 4px; }

/* formularios */
.field { width: 100%; padding: 11px 13px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-family: var(--font); font-size: 14px; }
.field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.18); }
textarea.field { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.field-row { display: flex; flex-direction: column; gap: 6px; }
.field-row > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field-full { grid-column: 1 / -1; }

/* panel admin */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.panel-tabs { display: flex; gap: 8px; }
.panel-tab { padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--muted); background: var(--surface); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 8px; }
.panel-tab.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; }
.pill { font-size: 11px; font-weight: 800; background: var(--danger); color: #fff; border-radius: 99px; padding: 1px 7px; min-width: 18px; text-align: center; }
.panel-tab.active .pill { background: rgba(255,255,255,.25); }

/* lista de revisión */
.review-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.review-card { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.review-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.review-top h4 { margin: 0; font-size: 15.5px; flex: 1; min-width: 120px; }
.review-meta { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.review-controls { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.review-controls .field-row { flex: 1; min-width: 160px; }

/* ---------- arquitectura: diagrama ---------- */
.arch-diagram { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.arch-layer { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); position: relative; }
.arch-layer .arch-num { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); font-size: 14px; }
.arch-layer .arch-info { flex: 1; }
.arch-layer h4 { margin: 0; font-size: 15.5px; }
.arch-layer h4 code { font-family: var(--mono); color: var(--accent); font-size: 13.5px; }
.arch-layer p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.arch-arrow { text-align: center; color: var(--muted); font-size: 18px; line-height: 1; margin: -4px 0; }

/* ---------- arquitectura: explorador ---------- */
.explorer { display: grid; grid-template-columns: 270px 1fr; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.explorer-tree { padding: 14px; border-right: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; max-height: 520px; }
.tree-group { margin-bottom: 12px; }
.tree-label { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.tree-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 13.5px; font-family: var(--mono); transition: .15s; }
.tree-file:hover { background: var(--surface-2); }
.tree-file.active { background: rgba(var(--primary-rgb),.15); color: var(--primary); }
.tree-file svg { width: 15px; height: 15px; flex: none; opacity: .7; }
.explorer-main { display: flex; flex-direction: column; min-width: 0; }
.explorer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.explorer-path { font-family: var(--mono); font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer-pre { margin: 0; padding: 16px; overflow: auto; max-height: 520px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #cdd6f4; background: #070b18; }

/* ---------- práctica: editor ---------- */
.play-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.play-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.play { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.editor-wrap { display: flex; background: #070b18; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; min-height: 360px; }
.editor-gutter { flex: none; padding: 16px 10px; text-align: right; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #44507e; background: #0a0f20; user-select: none; white-space: pre; }
.editor { flex: 1; border: 0; outline: 0; resize: vertical; padding: 16px; background: transparent; color: #cdd6f4; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; min-height: 360px; tab-size: 4; white-space: pre; overflow-wrap: normal; }
.play-side { display: flex; flex-direction: column; gap: 10px; }
.check-reqs { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check-reqs li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--muted); }
.check-reqs li .rq { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.check-reqs li.ok { color: var(--text); border-color: rgba(55,214,122,.4); }
.check-reqs li.ok .rq { background: var(--ok); color: #06240f; border-color: var(--ok); }
.check-reqs li.bad .rq { background: rgba(255,107,125,.15); color: var(--danger); border-color: rgba(255,107,125,.4); }
.console { font-family: var(--mono); font-size: 12.5px; padding: 14px; border-radius: 10px; background: #070b18; border: 1px solid var(--line); color: #9aa6c7; white-space: pre-wrap; min-height: 80px; }
.console .ok { color: var(--ok); } .console .bad { color: var(--danger); }

/* ---------- glosario ---------- */
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gl-item { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.gl-term { font-family: var(--mono); color: var(--accent); font-weight: 700; font-size: 14px; }
.gl-def { color: var(--muted); font-size: 13.5px; }

/* ---------- cierre ---------- */
.closing { max-width: 760px; margin: 0 auto; text-align: center; padding: clamp(40px, 6vw, 72px) 20px; }
.closing h2 { font-size: clamp(26px, 3.4vw, 36px); }
.closing p { color: var(--muted); }
.code-inline { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 10px 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.code-inline code { font-family: var(--mono); font-size: 13.5px; color: var(--accent); }

/* ---------- footer ---------- */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 24px clamp(16px,4vw,40px) 48px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.link-btn { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; }
.link-btn:hover { color: var(--danger); }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--primary); padding: 12px 20px; border-radius: 12px;
  box-shadow: var(--shadow); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .3s; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- skip link (accesibilidad de teclado) ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 700; }
.skip-link:focus { left: 0; }

/* ---------- menú móvil ---------- */
.nav-toggle { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-card { order: -1; }
  .how { grid-template-columns: repeat(2, 1fr); }
  .checklist, .glossary { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-grid; }
  .topnav {
    position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column; gap: 4px; align-items: stretch;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 10px; margin: 0; display: none; box-shadow: var(--shadow);
  }
  .topnav.open { display: flex; }
  .topnav a { padding: 12px 14px; border-radius: 10px; font-size: 15px; }
  .topnav a:hover { background: var(--surface); color: var(--text); }
}
@media (max-width: 560px) {
  .how { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .node { padding-left: 56px; }
  .roadmap::before { left: 21px; }
  .node-dot { left: 8px; }
}

/* =========================================================
   AuraMethod QA · tema claro, toggles, pricing, about, certificado
   ========================================================= */

/* ---- TEMA CLARO ---- */
body[data-theme="light"] {
  --bg: #f4f6fc; --bg-2: #ffffff; --surface: #ffffff; --surface-2: #eef1fa;
  --line: #d9deee; --text: #16203a; --muted: #5b678c;
  --primary: #4f7bf0; --accent: #12b5a0;
  --glass: rgba(var(--primary-rgb),.05); --glass-brd: rgba(var(--primary-rgb),.16);
  --shadow: 0 18px 44px rgba(40,60,120,.14);
}
body[data-theme="light"] {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(var(--primary2-rgb),.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(var(--accent-rgb),.10), transparent 55%),
    var(--bg);
}
body[data-theme="light"] .term,
body[data-theme="light"] .explorer-pre,
body[data-theme="light"] .editor-wrap,
body[data-theme="light"] .code-wrap pre,
body[data-theme="light"] .console { background: #0b1020; }
body[data-theme="light"] .editor { color: #cdd6f4; }
body[data-theme="light"] .topbar { background: rgba(255,255,255,.78); }

/* ---- toggles de barra ---- */
.icon-btn { display: inline-grid; place-items: center; min-width: 40px; height: 38px; padding: 0 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 800; font-size: 13px; cursor: pointer; transition: .2s; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---- encabezado centrado ---- */
.section-head.center { text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* ---- CTA certificado ---- */
.cert-cta { margin-top: 24px; }
.cert-banner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 22px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(var(--primary-rgb),.14), rgba(var(--accent-rgb),.12)); border: 1px solid var(--line); }
.cert-banner .cb-ic { font-size: 30px; }
.cert-banner .cb-txt { flex: 1; min-width: 200px; }
.cert-banner h3 { margin: 0 0 2px; font-size: 17px; }
.cert-banner p { margin: 0; color: var(--muted); font-size: 13.5px; }
.cert-banner.locked { opacity: .85; }

/* ---- PRICING ---- */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; max-width: 820px; margin: 0 auto; }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.plan.pro { border-color: var(--primary); box-shadow: 0 16px 40px rgba(var(--primary-rgb),.18); }
.plan-badge { position: absolute; top: -12px; right: 22px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); padding: 5px 12px; border-radius: 99px; }
.plan h3 { font-size: 20px; margin: 0 0 4px; }
.plan .price { font-size: 38px; font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan .plan-sub { color: var(--muted); font-size: 13.5px; margin: 2px 0 16px; }
.plan ul { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 800; flex: none; }
.plan li.off { color: var(--muted); } .plan li.off::before { content: "–"; color: var(--muted); }
.plan .btn { width: 100%; justify-content: center; }

/* ---- ABOUT ---- */
.about { display: flex; gap: 26px; align-items: center; max-width: 820px; margin: 0 auto; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); flex-wrap: wrap; }
.about-avatar { flex: none; width: 92px; height: 92px; border-radius: 22px; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.about-body { flex: 1; min-width: 240px; }
.about-body h2 { margin: 0 0 6px; }
.about-body p { color: var(--muted); margin: 0 0 14px; }
.about-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- certificado (modal) ---- */
.cert-preview-wrap { margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
#certCanvas { width: 100%; height: auto; display: block; }

@media (max-width: 760px) {
  .pricing { grid-template-columns: 1fr; }
}

/* =========================================================
   UI/UX Pro Max · glass, social proof, testimonios, CTA
   ========================================================= */

/* glassmorphism en tarjetas clave */
.plan, .about, .testi-card, .cert-banner { backdrop-filter: blur(14px); }
.plan.pro { background: linear-gradient(160deg, var(--glass), transparent), var(--surface); }

/* social proof del hero */
.hero-proof { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.hero-proof .stars { color: #fbbf24; letter-spacing: 2px; font-size: 15px; }
.hero-proof .avatars { display: inline-flex; }
.hero-proof .avatars span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); border: 2px solid var(--bg); margin-left: -10px; }
.hero-proof .avatars span:first-child { margin-left: 0; }

/* testimonios */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.testi-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.testi-quote { color: var(--text); font-size: 14.5px; line-height: 1.7; margin: 0; flex: 1; }
.testi-stars { color: #fbbf24; letter-spacing: 2px; font-size: 14px; }
.testi-who { display: flex; align-items: center; gap: 12px; }
.testi-av { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.testi-name { font-weight: 700; font-size: 14px; }
.testi-role { color: var(--muted); font-size: 12.5px; }

/* CTA de cierre */
.closing-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 22px 0 10px; }

@media (max-width: 860px) { .testimonials { grid-template-columns: 1fr; } }

.hero-proof .pchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 12.5px; font-weight: 600; }
.hero-proof .pchip b { color: var(--accent); }

/* =========================================================
   Selector de color de marca (popover)
   ========================================================= */
.brand-picker { position: relative; display: inline-flex; }
.brand-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px; width: 220px; animation: pop .18s ease; }
.brand-menu[hidden] { display: none; }
.brand-menu h5 { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.swatch { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 12.5px; font-weight: 600; transition: .15s; text-align: left; }
.swatch:hover { border-color: var(--primary); }
.swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.3) inset; }
.swatch .dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
