/* ============================================================
   Global FMM · Learn — design exacto de manual-v3
   Fuente: globalfmm.com/internal/advance-knowledge/manual-v3
   ============================================================ */

:root {
  --bg:          #17191d;
  --panel:       #1f2329;
  --panel2:      #242a31;
  --text:        #edf2f7;
  --muted:       #b9c2cf;
  --line:        #303845;
  --line-soft:   #3b4554;
  --blue:        #3ba7ff;
  --cyan:        #59d0ff;
  --notice:      #123852;
  --notice-line: #1f6aa5;
  --accent:      #7fd8ff;
  --shadow:      0 12px 28px rgba(0,0,0,.18);
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, rgba(59,167,255,.08), transparent 32%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.62;
}

a { color: var(--blue); text-decoration: none; transition: all .15s ease; }
a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   HEADER SUPERIOR
══════════════════════════════════════════ */
.top {
  height: 52px;
  background: #111418;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
  line-height: 0;
  text-decoration: none;
}

.app-brand img {
  display: block;
  width: auto;
  object-fit: contain;
  image-rendering: auto;
}

.logo-symbol {
  display: block;
  height: 30px;
  max-width: none;
}

.app-title {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
}

.app-title-desktop { display: inline; }
.app-title-mobile { display: none; }

.top .right {
  margin-left: auto;
  color: #98a6b8;
  font-size: 13px;
  white-space: nowrap;
}

/* Botón hamburguesa — solo mobile */
#mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #98a6b8;
  padding: 6px;
  border-radius: 5px;
  flex-shrink: 0;
}
#mobile-menu-btn:hover { color: #fff; background: rgba(255,255,255,.07); }

/* ══════════════════════════════════════════
   BARRA DE PRODUCTO
══════════════════════════════════════════ */
.product {
  min-height: 50px;
  background: #171b20;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  flex-wrap: wrap;
  row-gap: 8px;
  position: sticky;
  top: 52px;
  z-index: 999;
}

.product-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  margin-right: 8px;
}

.product a {
  font-size: 14px;
  color: #c7d0dc;
  white-space: nowrap;
  transition: color .15s ease;
}
.product a:hover { color: #fff; text-decoration: none; }
.product a.product-active { color: var(--blue); }
.product-links {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

#manual-view {
  display: none;
}

.sidebar-area {
  border-bottom: 1px solid rgba(48,56,69,.75);
  padding: 4px 0 12px;
  margin-bottom: 6px;
}

.sidebar-area-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #dfe6ef;
  margin-bottom: 4px;
}

.sidebar-area-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  border: 1px solid #4a5567;
  border-radius: 8px;
  background: #1b2026;
  padding: 0 10px;
  margin-bottom: 10px;
}

.sidebar-search-icon {
  color: #90a0b5;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-search input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #edf2f7;
  font-size: 13px;
  font: inherit;
}

.sidebar-search input::placeholder {
  color: #8f9bad;
}

.sidebar-area-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.sidebar-area-switch::after {
  content: '→';
  font-size: 14px;
  line-height: 1;
}

.sidebar-empty {
  padding: 10px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

/* ══════════════════════════════════════════
   AVISO
══════════════════════════════════════════ */
.notice {
  background: linear-gradient(90deg, #10354f, #123f61);
  border-bottom: 1px solid var(--notice-line);
  color: #d7ecff;
  padding: 11px 40px;
  font-size: 13.5px;
}

/* ══════════════════════════════════════════
   LAYOUT 3 COLUMNAS
══════════════════════════════════════════ */
.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 840px) 260px;
  gap: 46px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 12px 24px 80px;
}

/* ══════════════════════════════════════════
   SIDEBAR IZQUIERDO
══════════════════════════════════════════ */
.left {
  position: sticky;
  top: 114px;
  align-self: start;
  height: calc(100vh - 130px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding-right: 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-soft) transparent;
}
.left::-webkit-scrollbar { width: 3px; }
.left::-webkit-scrollbar-thumb { background: var(--line-soft); border-radius: 2px; }

.search {
  height: 36px;
  border: 1px solid #566274;
  border-radius: 8px;
  display: flex;
  align-items: center;
  color: #b8c2ce;
  padding: 0 12px;
  margin: 18px 0;
  font-size: 13px;
  background: #1d2228;
  cursor: pointer;
  user-select: none;
}

/* Nav section labels */
.nav-section-label {
  padding: 18px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}
.nav-section-label:first-child { padding-top: 10px; }

/* Items de navegación */
.nav-item {
  display: block;
  color: #d7dde7;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
  border-left: 2px solid transparent;
  line-height: 1.4;
}
.nav-item:hover {
  background: #202833;
  text-decoration: none;
  color: #fff;
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(74,163,255,.18), transparent);
  color: #fff;
  border-left: 3px solid #4aa3ff;
}

/* ══════════════════════════════════════════
   CONTENIDO PRINCIPAL
══════════════════════════════════════════ */
.main { padding-top: 0; }

.crumb {
  font-size: 13px;
  color: #97a5b7;
  margin-bottom: 18px;
}

/* Loading */
#loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  padding: 40px 0;
}
.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid var(--line-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Headings ── */
#content-wrapper h1 {
  font-size: 34px;
  line-height: 1.18;
  margin: 0 0 24px;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.01em;
  scroll-margin-top: 132px;
}

#content-wrapper h2 {
  font-size: 1.6rem;
  line-height: 1.35;
  margin: 32px 0 12px;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.005em;
  border-bottom: 1px solid #303845;
  padding-bottom: 8px;
  scroll-margin-top: 132px;
}

#content-wrapper h3 {
  font-size: 18px;
  margin: 28px 0 10px;
  color: #e8f0f8;
  font-weight: 700;
  scroll-margin-top: 132px;
}

#content-wrapper h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 22px 0 6px;
  scroll-margin-top: 132px;
}

/* ── Párrafos y texto ── */
#content-wrapper p {
  margin: 0 0 18px;
  color: #d9e0ea;
}

#content-wrapper {
  width: 100%;
  min-height: 100vh;
}

/* ── In-content visual header ── */
.content-hero-banner {
  position: relative;
  min-height: 118px;
  margin: 0 0 30px;
  border: 1px solid rgba(106, 219, 197, .16);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 15, 17, .96) 0%, rgba(8, 34, 35, .92) 43%, rgba(15, 91, 78, .74) 100%),
    radial-gradient(circle at 70% 48%, rgba(101, 226, 196, .24), transparent 42%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.05);
  isolation: isolate;
}

.content-hero-banner::before,
.content-hero-banner::after {
  content: "";
  position: absolute;
  inset: -42% -8% -38% 34%;
  pointer-events: none;
  z-index: -1;
}

.content-hero-banner::before {
  background:
    repeating-radial-gradient(ellipse at 100% 50%, transparent 0 28px, rgba(139, 246, 220, .16) 29px 30px, transparent 31px 54px);
  transform: rotate(-11deg);
  opacity: .72;
}

.content-hero-banner::after {
  background:
    linear-gradient(116deg, transparent 0 35%, rgba(130, 255, 222, .18) 36%, transparent 38%),
    linear-gradient(112deg, transparent 0 48%, rgba(82, 206, 184, .22) 49%, transparent 51%),
    linear-gradient(108deg, transparent 0 61%, rgba(210, 255, 245, .12) 62%, transparent 64%);
  filter: blur(.2px);
  opacity: .82;
}

.content-hero-copy {
  position: relative;
  display: flex;
  min-height: inherit;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 24px 34px;
  background: linear-gradient(90deg, rgba(4, 10, 12, .28), transparent 68%);
}

.content-hero-eyebrow {
  color: #b9f3e5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.content-hero-title {
  color: #f0fff9;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-shadow: 0 1px 12px rgba(0,0,0,.28);
}

/* Primer párrafo de metadatos del .md — atenuado */
#content-wrapper > p:first-of-type > code,
#content-wrapper > p:nth-child(2) {
  font-size: 13px;
  color: #566274;
}

#content-wrapper strong { color: #edf2f7; font-weight: 600; }
#content-wrapper em { color: var(--muted); font-style: italic; }

/* ── Listas ── */
#content-wrapper ul,
#content-wrapper ol {
  margin: 0 0 20px 22px;
}
#content-wrapper li {
  margin: 6px 0;
  color: #d9e0ea;
}
#content-wrapper li > ul,
#content-wrapper li > ol {
  margin-top: 4px;
  margin-bottom: 4px;
}

/* ── Links ── */
#content-wrapper a { color: var(--blue); }
#content-wrapper a:hover { color: var(--cyan); }

/* ── HR ── */
#content-wrapper hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

/* ── Código inline ── */
#content-wrapper :not(pre) > code {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  color: #79c0ff;
  background: rgba(56,139,253,.1);
  border: 1px solid rgba(56,139,253,.18);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ── Bloques de código ── */
#content-wrapper pre {
  background: #161b22;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 18px 22px;
  overflow-x: auto;
  margin: 18px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
#content-wrapper pre code {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #c9d1d9;
  background: none;
  border: none;
  padding: 0;
}

/* ── Blockquote → callout NOTA ── */
#content-wrapper blockquote {
  position: relative;
  background: #162032;
  border-left: 3px solid #4aa3ff;
  border-radius: 6px;
  margin: 22px 0;
  padding: 14px 18px;
}
#content-wrapper blockquote::before {
  content: 'NOTA';
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--blue);
  margin-bottom: 6px;
}
#content-wrapper blockquote p {
  margin: 0;
  color: #aac8e8;
  font-size: 14px;
}

/* ── Card destacada ── */
.card {
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #222831, #1d2228);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 20px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 1px 0 rgba(255,255,255,.03) inset;
  color: #d9e0ea;
  font-size: 14.5px;
}
.card strong { color: #fff; }

/* ── Soporte ── */
.support-form {
  margin: 14px 0 26px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(59,167,255,.12), transparent 28%),
    linear-gradient(180deg, #222831, #1a1f25);
  box-shadow:
    0 18px 40px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.03);
}

.support-card {
  margin: 8px 0 8px;
}

.support-card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px 2px 0;
}

.support-card-head h2 {
  margin-top: 0;
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.support-card-head p {
  max-width: 760px;
  color: #d9e0ea;
  margin: 0;
}

.support-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.support-section {
  padding: 16px 16px 14px;
  border: 1px solid rgba(74,85,103,.45);
  border-radius: 14px;
  background: rgba(15,19,25,.42);
}

.support-section + .support-section {
  margin-top: 12px;
}

.support-section-head {
  margin-bottom: 12px;
}

.support-section-head h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.support-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.support-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #edf2f7;
  font-size: 13px;
}

.support-field span {
  font-weight: 600;
  color: #dfe6ef;
}

.support-field input,
.support-field textarea,
.support-field select {
  width: 100%;
  border: 1px solid #4a5567;
  border-radius: 12px;
  background: linear-gradient(180deg, #171c22, #151a20);
  color: #edf2f7;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .15s ease;
}

.support-field input::placeholder,
.support-field textarea::placeholder {
  color: #8090a4;
}

.support-field textarea {
  resize: vertical;
  min-height: 132px;
}

.support-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8fa2b9 50%),
    linear-gradient(135deg, #8fa2b9 50%, transparent 50%),
    linear-gradient(180deg, #171c22, #151a20);
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 12px) 52%,
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.support-field input:focus,
.support-field textarea:focus,
.support-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,167,255,.14);
  transform: translateY(-1px);
}

.support-field input:hover,
.support-field textarea:hover,
.support-field select:hover {
  border-color: #637086;
}

.support-field input[aria-invalid="true"],
.support-field textarea[aria-invalid="true"],
.support-field select[aria-invalid="true"] {
  border-color: rgba(255,126,126,.65);
  box-shadow: 0 0 0 3px rgba(255,126,126,.08);
}

.support-field-full {
  grid-column: 1 / -1;
}

.support-field-file {
  position: relative;
}

.support-field-file input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.support-file-visual {
  min-height: 54px;
  border: 1px dashed #5b6678;
  border-radius: 12px;
  background: rgba(24,29,36,.72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.support-file-visual strong {
  color: #edf2f7;
  font-size: 14px;
}

.support-file-name {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.support-field-file small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.support-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.support-submit {
  border: 1px solid rgba(59,167,255,.45);
  background: linear-gradient(180deg, rgba(59,167,255,.22), rgba(59,167,255,.12));
  color: #fff;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(59,167,255,.08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.support-submit:hover {
  border-color: rgba(59,167,255,.7);
  background: rgba(59,167,255,.18);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(59,167,255,.12);
}

.support-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,167,255,.16), 0 14px 28px rgba(59,167,255,.12);
}

.support-confirmation {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(127,216,255,.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(21,43,59,.92), rgba(16,31,43,.95));
  color: #dff4ff;
  font-size: 14px;
  line-height: 1.55;
  white-space: normal;
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}

.support-confirmation.is-error {
  border-color: rgba(255,126,126,.35);
  background: #35181a;
  color: #ffd9d9;
}

.support-confirmation h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 14px;
}

.support-confirmation p {
  margin: 0;
}

/* ── Blog ── */
.blog-index-intro {
  margin-bottom: 22px;
  color: #d9e0ea;
  max-width: 840px;
}

.blog-category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 28px;
}

.blog-category {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(74,85,103,.8);
  border-radius: 999px;
  background: rgba(24,29,36,.82);
  color: #dfe6ef;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.blog-featured {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.blog-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, #21262d, #191e24);
  padding: 18px 20px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.blog-card:hover {
  transform: translateY(-1px);
  border-color: rgba(59,167,255,.48);
  box-shadow: 0 14px 30px rgba(0,0,0,.24);
}

.blog-card-category {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.blog-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 19px;
}

.blog-card p {
  margin: 0 0 14px;
  color: #d9e0ea;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.blog-card-read {
  color: var(--blue);
  font-weight: 600;
  margin-left: auto;
}

/* ── Tablas ── */
#content-wrapper .table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 22px 0;
}

#content-wrapper .table-wrapper table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
#content-wrapper thead { background: var(--panel2); }
#content-wrapper th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line);
}
#content-wrapper th:last-child { border-right: none; }
#content-wrapper td {
  padding: 9px 14px;
  vertical-align: top;
  color: #d9e0ea;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--panel);
}
#content-wrapper td:last-child { border-right: none; }
#content-wrapper tr:last-child td { border-bottom: none; }
#content-wrapper tbody tr:hover td { background: rgba(59,167,255,.05); }

/* ══════════════════════════════════════════
   NAVEGACIÓN CAPÍTULOS (prev/next)
══════════════════════════════════════════ */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.chapter-nav-item {
  cursor: pointer;
  padding: 14px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  flex: 0 1 46%;
  transition: border-color .14s, background .14s, box-shadow .14s;
}
.chapter-nav-item:hover {
  border-color: var(--blue);
  background: rgba(59,167,255,.06);
  box-shadow: 0 0 0 1px rgba(59,167,255,.12);
  text-decoration: none;
}

.chapter-nav-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 4px;
}
.chapter-nav-item strong {
  display: block;
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
}

.chapter-nav-item.secondary { text-align: left; }
.chapter-nav-item:not(.secondary) { text-align: right; margin-left: auto; }

/* ══════════════════════════════════════════
   SIDEBAR DERECHO (TOC)
══════════════════════════════════════════ */
.rightnav {
  position: sticky;
  top: 114px;
  align-self: start;
}

.rightnav h3 {
  font-size: 15px;
  margin: 0 0 16px;
  color: #fff;
  font-weight: 700;
}

#toc-links a {
  display: block;
  color: #cfd7e2;
  font-size: 13px;
  padding: 6px 0;
  line-height: 1.4;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: color .12s, border-color .12s;
}
#toc-links a:hover {
  color: #fff;
  text-decoration: none;
  border-left-color: var(--line-soft);
}
#toc-links a.toc-active {
  color: var(--blue);
  border-left-color: var(--blue);
}
#toc-links a.toc-sub {
  padding-left: 20px;
  font-size: 12.5px;
  color: var(--muted);
}
#toc-links a.toc-sub.toc-active { color: var(--blue); }

.feedback {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 18px;
  font-size: 13px;
  color: #d3dce7;
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   OVERLAY MOBILE
══════════════════════════════════════════ */
#overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
  z-index: 90;
}
#overlay.open { display: block; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .rightnav { display: none; }
}

@media (max-width: 768px) {
  .top {
    height: 40px;
    padding: 0 12px;
    gap: 10px;
  }
  .product {
    min-height: 32px;
    padding: 0 12px;
    gap: 10px;
    top: 40px;
  }

  /* Ocultar links de header en mobile */
  .top > a:not(.app-brand),
  .top .right { display: none; }

  .product-title { display: none; }

  /* Mostrar botón hamburguesa */
  #mobile-menu-btn {
    display: flex;
    padding: 4px;
    margin-left: -2px;
  }

  .logo-symbol { height: 20px; }
  .app-title { font-size: 13px; }
  .app-title-desktop { display: none; }
  .app-title-mobile { display: inline; }

  /* Sidebar: oculto por defecto, slide-in */
  .layout {
    display: block;
    padding: 8px 14px 48px;
  }

  .left {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    height: 100%;
    z-index: 100;
    background: var(--panel);
    border-right: 1px solid var(--line-soft);
    padding: 14px 14px 36px;
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.4,0,.2,1),
                box-shadow .24s ease;
    overflow-y: auto;
  }
  .left.open {
    transform: translateX(0);
    box-shadow: 6px 0 32px rgba(0,0,0,.55);
  }

  .main { padding-top: 0; }

  .crumb {
    margin-bottom: 8px;
    font-size: 11.5px;
    line-height: 1.45;
  }

  .content-hero-banner {
    min-height: 82px;
    margin-bottom: 22px;
  }

  .content-hero-banner::before,
  .content-hero-banner::after {
    inset: -55% -28% -45% 18%;
  }

  .content-hero-copy {
    padding: 18px 20px;
  }

  .content-hero-title {
    font-size: 20px;
  }

  #content-wrapper h1 {
    font-size: 26px;
    margin-top: 0;
    overflow-wrap: anywhere;
  }
  #content-wrapper h2 { font-size: 18px; }

  .chapter-nav { flex-direction: column; }
  .chapter-nav-item { flex: none; width: 100%; text-align: left !important; margin-left: 0 !important; }

  .support-form {
    padding: 14px;
  }

  .support-section {
    padding: 14px;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .support-form-actions {
    justify-content: stretch;
  }

  .support-submit {
    width: 100%;
  }

  .support-file-visual {
    flex-direction: column;
    align-items: flex-start;
  }

  .support-file-name {
    text-align: left;
  }

  .blog-card {
    padding: 16px;
  }

  .blog-card h3 {
    font-size: 17px;
  }

  .blog-card-read {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .logo-symbol { height: 20px; }
  .app-title { font-size: 13px; }
  .app-title-desktop { display: none; }
  .app-title-mobile { display: inline; }
  #content-wrapper h1 {
    font-size: 24px;
    margin-top: 0;
  }
  .product-links { gap: 10px; }
  .product a { font-size: 13px; }
}

/* Hero */
.hm-hero {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 56px 32px 60px;
}
.hm-hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 40px;
  align-items: center;
}
.hm-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.hm-hero-h1 {
  font-size: 44px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.hm-hero-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
}
.hm-hero-img {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.hm-hero-img img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  display: block;
}

/* Sections */
.hm-section {
  padding: 80px 32px;
}
.hm-section-alt {
  background: #111418;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hm-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.hm-section-h2 {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.hm-section-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
  max-width: 620px;
}

/* Cards */
.hm-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
}
.hm-card {
  background: var(--panel);
  cursor: pointer;
  transition: background .15s ease;
}
.hm-card:hover { background: #222831; }
.hm-card:hover .hm-card-link { color: var(--cyan); }
.hm-card-body {
  padding: 28px 26px 30px;
}
.hm-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.hm-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(59,167,255,.08);
  border: 1px solid rgba(59,167,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hm-card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--blue);
}
.hm-card-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.hm-card-body p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.62;
  margin: 0 0 18px;
}
.hm-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  transition: color .15s ease;
}

/* Flow Diagram */
.hm-flow-wrap {
  margin-top: 40px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-soft) transparent;
}
.hm-flow-wrap::-webkit-scrollbar { height: 4px; }
.hm-flow-wrap::-webkit-scrollbar-thumb { background: var(--line-soft); border-radius: 2px; }
.hm-flow {
  display: flex;
  align-items: center;
  min-width: max-content;
  padding: 4px 2px 8px;
}
.hm-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 110px;
  cursor: default;
}
.hm-flow-n {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--faint, #8898aa);
  margin-bottom: 6px;
}
.hm-flow-label {
  font-size: 13px;
  font-weight: 700;
  color: #d9e0ea;
  margin-bottom: 4px;
  white-space: nowrap;
}
.hm-flow-desc {
  font-size: 11px;
  color: var(--faint, #8898aa);
  white-space: nowrap;
}
.hm-flow-arrow {
  color: var(--line);
  font-size: 16px;
  padding: 0 6px;
  flex-shrink: 0;
  line-height: 1;
  margin-bottom: 14px;
}

/* Home responsive */
@media (max-width: 960px) {
  .hm-hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hm-hero-h1 { font-size: 36px; }
  .hm-hero-img { justify-content: center; order: 1; }
  .hm-hero-img img { max-width: 100%; }
  .hm-cards {
    grid-template-columns: 1fr;
    border-radius: 10px;
  }
  .hm-card + .hm-card { border-top: 1px solid var(--line-soft); }
}

@media (max-width: 640px) {
  .hm-hero { padding: 40px 16px 48px; }
  .hm-section { padding: 56px 16px; }
  .hm-hero-h1 { font-size: 28px; }
  .hm-section-h2 { font-size: 24px; }
}

/* ══════════════════════════════════════════
   VIDEO PLACEHOLDER (Synthesia — en producción)
══════════════════════════════════════════ */
.video-placeholder {
  background: #111418;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 28px 0;
}
.video-placeholder-thumb {
  background: #0d1117;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: not-allowed;
}
.video-placeholder-play {
  width: 52px;
  height: 52px;
  background: rgba(59,167,255,.12);
  border: 1.5px solid rgba(59,167,255,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}
.video-placeholder-play svg { margin-left: 3px; }
.video-placeholder-meta {
  padding: 14px 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
}
.video-placeholder-info { flex: 1; }
.video-placeholder-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.video-placeholder-duration {
  font-size: 11px;
  color: var(--muted);
}
.video-placeholder-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   CALCULADORAS INLINE
══════════════════════════════════════════ */
.calc-tool {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 28px 0;
}
.calc-tool h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.calc-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 6px;
}
.calc-field select,
.calc-field input[type="number"] {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.calc-field select:focus,
.calc-field input:focus { border-color: var(--blue); }
.calc-btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 6px;
  transition: background .15s;
}
.calc-btn:hover { background: #5ab8ff; }
.calc-result {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(59,167,255,.07);
  border: 1px solid rgba(59,167,255,.18);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  display: none;
}
.calc-result.visible { display: block; }
.calc-result strong { color: var(--blue); font-size: 18px; }

/* Checklist interactivo */
.checklist-tool {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 28px 0;
}
.checklist-tool h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(48,56,69,.6);
  cursor: pointer;
  user-select: none;
}
.checklist-item:last-of-type { border-bottom: none; }
.checklist-item input[type="checkbox"] { display: none; }
.checklist-box {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid var(--line-soft);
  border-radius: 4px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s;
}
.checklist-item.checked .checklist-box {
  background: var(--blue);
  border-color: var(--blue);
}
.checklist-item.checked .checklist-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.checklist-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
  transition: color .15s;
}
.checklist-item.checked .checklist-text { color: var(--muted); text-decoration: line-through; }
.checklist-score {
  margin-top: 18px;
  padding: 12px 16px;
  background: var(--panel2);
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.checklist-score strong { color: var(--text); }

/* ── Embed mode — LearnWorkspace en Advance FM ───────────────────── */
html.embed-mode {
  --header-h: 0px;
}

/* Ocultar shell exterior */
html.embed-mode header.top,
html.embed-mode .product,
html.embed-mode #mobile-menu-btn {
  display: none !important;
}

html.embed-mode body {
  background: var(--bg);
  background-image: none;
  min-height: 100vh;
}

/* Resetear padding-top del layout (que era header-h + product-h) */
html.embed-mode .layout {
  padding-top: 0 !important;
}

/* Sidebar ocupa toda la altura desde arriba */
html.embed-mode .left {
  top: 0 !important;
  height: 100vh !important;
}

/* Contenido sin padding superior */
html.embed-mode .main {
  padding-top: 0 !important;
}

/* Breadcrumb del manual — Advance provee el suyo */
html.embed-mode .crumb {
  display: none !important;
}

/* Ocultar content-hero-banner (Advance lo reemplaza en header del workspace) */
html.embed-mode .content-hero-banner {
  display: none !important;
}

/* Sidebar compacta en embed */
html.embed-mode .sidebar-area {
  padding-top: 12px;
}

html.embed-mode .sidebar-area-switch {
  display: none;
}
