:root {
  /* Color Palette - Niveles del curso*/
  --nivel-1: #4085c6; /*A1 y A1+*/
  --nivel-2: #0FB2C0; /*A2 y A2+*/
  --nivel-3: #603881; /*B1 y B1+*/
  --nivel-4: #CF3558; /*B2 y B2+*/
  --nivel-5: #F07E31; /*C1 y C1+*/
  --nivel-6: #2F9638; /*C2 y C2+*/

  --accent: var(--nivel-3); /*Por defecto: #5B00FF*/
  --success: #10B981;
  --error: #EF4444;

  --fondo: #f7f7f7;
  --border: #e7e7e7;

  --cuerpo-texto: #434343;
  --muted: #666666;

  --panel: #F9FAFB;
  --panel-ink: #434343;

  --size-h1: 1.625rem;
  --size-h2: 1.20rem;
  --size-h3: 1.05rem;
  --size-body: 14px;

  --radius-frame: 1.125rem;
  --radius-card: 0.875rem;
  --radius-pill: 999px;

  --shadow-frame: 0 0.6rem 1.1rem rgba(30, 41, 68, 0.183);
  --shadow-chip: 0 4px 10px rgba(15, 23, 42, 0.12);

  --brand: var(--accent);
}

* {
  box-sizing: border-box;
  /* Scrollbar: thin and light for modern browsers */
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.14) transparent;
}

/* WebKit-based browsers (Chrome, Edge, Safari) */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}

*::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  border: 2px solid transparent;
  /* creates padding effect */
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.18);
}

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: var(--size-body);
  line-height: 1.4;
  color: var(--ink);
  overflow: hidden;
}

.nivel-1 {
  color: var(--nivel-1);
}

.nivel-2 {
  color: var(--nivel-2);
}

.nivel-3 {
  color: var(--nivel-3);
}

.nivel-4 {
  color: var(--nivel-4);
}

.nivel-5 {
  color: var(--nivel-5);
}

.nivel-6 {
  color: var(--nivel-6);
}

.bg-nivel-1 {
  background-color: color-mix(in srgb, var(--nivel-1) 15%, white);

}

.bg-nivel-2 {
  background-color: color-mix(in srgb, var(--nivel-2) 20%, white);
}

.bg-nivel-3 {
  background-color: color-mix(in srgb, var(--nivel-3) 20%, white);
}

.bg-nivel-4 {
  background-color: color-mix(in srgb, var(--nivel-4) 20%, white);
}

.bg-nivel-5 {
  background-color: color-mix(in srgb, var(--nivel-5) 20%, white);
}

.bg-nivel-6 {
  background-color: color-mix(in srgb, var(--nivel-6) 20%, white);
}

.template {
  color: var(--accent);
}

.bg-template {
  background-color: color-mix(in srgb, var(--accent) 15%, white);
}

h1 {
  font-size: var(--size-h1);
  font-weight: 700;
  margin: 0;
}

h2 {
  font-size: var(--size-h2);
  font-weight: 400;
  margin: 0;
}

h3 {
  font-size: var(--size-h3);
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  color: var(--muted);
}

a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.centerd-text {
  text-align: center;
}

.comp-header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

/* Caja genérica para resaltar texto (fondo suave) */

.highlight-box {
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  border-radius: 6px;
  margin: 26px 0 8px 0;
}

/* Texto dentro de la caja: afinamos espaciado */
.highlight-box p {
  margin: 4px 0;
}

.bg-accent {
  background: var(--brand);
  color: #fff;
}

.subtitle {
  color: var(--brand-600);
  letter-spacing: .04em;
}

.app-root {
  width: 100%;
  height: 100%;
  max-height: 540px;
}

.overflow-auto {
  overflow: auto !important;
}

.overflow-hidden {
  overflow: hidden;
}

.intensity-50 {
  opacity: 0.5;
}

.intensity-80 {
  opacity: 0.8;
}

.frame {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
}

.text-card {
  width: 100%;
  height: 100%;
  background: var(--fondo);
  border-radius: 4px;
  padding: 22px 24px 20px;
  overflow-y: auto;
  /* scroll interno */
  overflow-x: hidden;
  color: var(--muted);
}

.inner-card {
  position: relative;
  margin: 0;
  width: 100%;  
  height: 100%;
  flex: 1;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.top-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  padding: 0 0 12px 0;
  ;
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
  text-align: center;
}

.divider {
  height: 1px;
  width: 100%;
  background: var(--border);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.small-container {
  padding: 10px 0 0 0;
}

.app-content {
  flex: 1;
  padding: 0 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.app-subtitle {
  margin: 0;
  text-align: center;
}

.comp-wrap {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "head"
    "content";
  background: #fff;
}

.comp-wrap header {
  grid-area: head;
  padding: 8px 4px 6px 4px;
  border-bottom: 1px solid rgba(148, 163, 184, .15);
  background: #ffffff;
}

.comp-wrap .content {
  grid-area: content;
  height: 100%;
  padding: 10px 8px 10px;
}


.comp-wrap p.callout {
  margin: 4px 0 6px;
  font: 700 13px Arial, Helvetica, sans-serif;
  color: var(--accent);
}

.comp-wrap .dots{
  left: 50%;
  right: auto;
  transform: translateX(-50%);

  width: fit-content;
  padding: 8px 16px;

  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-chip);

  /* opcional: se ve bien sobre imágenes */
  backdrop-filter: blur(6px);
}

.accordion {
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid #e5e7eb;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html.embedded-mode,
html.embedded-mode body {
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  width: 100% !important;
  height: 100% !important;
}

html.embedded-mode .app-root {
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
  overflow-y: auto !important;
}

html.embedded-mode .frame {
  border-radius: var(--radius-frame) !important;
  box-shadow: none !important;
  padding: 10px !important;
  overflow-y: auto !important;
}

@media screen and (max-width: 700px) {
  .app-root {
    width: 100% !important;
    height: 540px;
  }

  .frame {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .inner-card {
    display: flex !important;
    flex-direction: column !important;
  }

  .app-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 10px 6px !important;
  }

  .comp-wrap .content {
    padding: 8px 4px 8px !important;
  }

}