/* Simple Suite — estilos de las páginas nuevas (apps, guías, descargas, licencias).
   Se carga DESPUÉS de site.css y usa sus tokens: misma paleta, tipografías y componentes. */

/* ---------- Selector de idioma (details nativo: funciona sin JS) ---------- */
.lang-pick { position: relative; }
.lang-pick summary {
  list-style: none; cursor: pointer; min-height: 40px; min-width: 44px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--ink); border-radius: var(--r-md); font-weight: 600; font-size: .9375rem;
}
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary::after { content: ""; width: 6px; height: 6px; margin-left: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.lang-pick[open] summary { background: var(--sand); }
.lang-pick ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 170px;
  list-style: none; margin: 0; padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-2);
}
.lang-pick a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; border-radius: var(--r-sm); }
.lang-pick a:hover { background: var(--sand); }
.lang-pick a[aria-current] { font-weight: 700; }
.lang-pick a[aria-current]::after { content: "✓"; margin-left: auto; color: var(--ok); }
/* Ingresar: en pantallas muy angostas pasa al menú para que entren marca + idioma + Menú. */
.nav-list .nav-signin { display: none; }
@media (max-width: 419.98px) {
  .header-actions .signin-btn { display: none; }
  .nav.is-open .nav-list .nav-signin { display: block; }
}
/* Entre 900 y 1099 px el botón "Ver precios" del encabezado repite el enlace del menú: se oculta para que entre todo. */
@media (min-width: 900px) and (max-width: 1099.98px) { .header-actions .btn-primary { display: none; } }

/* ---------- Íconos de app ---------- */
.app-icon { width: 40px; height: 40px; flex: none; border-radius: 10px; }
.app-icon-lg { width: 72px; height: 72px; border-radius: 16px; }
.uses-list .app-icon { width: 32px; height: 32px; margin-bottom: var(--s1); }
.acc-title-row { display: flex; align-items: center; gap: var(--s3); }
.acc-title-row .app-icon { width: 32px; height: 32px; }

/* ---------- Página de app ---------- */
.app-hero { padding: clamp(32px, 6vw, 80px) 0 var(--s7); }
.app-hero-head { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s5); }
.app-hero h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem); overflow-wrap: anywhere; }
.app-hero .lead { margin-bottom: var(--s5); }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: var(--s5); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--line); }
.crumbs a { color: var(--muted); }
.facts { display: grid; gap: var(--s3); list-style: none; margin-bottom: var(--s5); }
.facts li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s3); align-items: start; }
.facts .icon { color: var(--accent); margin-top: 3px; }
.app-cols { display: grid; gap: var(--s7); }
@media (max-width: 899.98px) { .app-cols > .app-side { order: -1; } }
@media (min-width: 900px) {
  .app-cols { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); }
  .app-cols > .app-main { grid-column: 1 / span 7; }
  .app-cols > .app-side { grid-column: 9 / span 4; }
  .app-side .dl-card { position: sticky; top: 88px; }
}
.app-main h2, .app-side h2 { font-size: 1.75rem; margin-bottom: var(--s4); }
.app-main section + section { margin-top: var(--s8); }
.privacy { border-left: 3px solid var(--ok); padding: var(--s1) 0 var(--s1) var(--s4); }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--s4); list-style: none; }
.gallery a { display: block; color: var(--ink); text-decoration: none; border-radius: var(--r-md); }
.gallery .shot-frame { display: block; border-radius: var(--r-md); box-shadow: var(--sh-1); background: var(--surface); }
.gallery img { width: 100%; height: auto; }
.gallery .shot-cap { display: block; margin-top: var(--s2); font-size: .875rem; color: var(--muted); }
.gallery a:hover .shot-cap { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
dialog.lightbox {
  border: 0; padding: var(--s4); border-radius: var(--r-md); background: var(--ink); color: var(--paper);
  width: min(1480px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto;
}
dialog.lightbox::backdrop { background: rgba(23,23,26,.8); }
.lightbox figure { margin: 0; }
.lightbox img { width: 100%; height: auto; max-height: calc(100dvh - 140px); object-fit: contain; background: var(--ink); }
.lightbox figcaption { margin-top: var(--s3); font-size: .9375rem; color: var(--muted-on-dark); }
.lb-bar { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: flex-end; margin-top: var(--s3); }
.lightbox .btn-secondary { color: var(--paper); border-color: var(--paper); }
.lightbox .btn-secondary:hover { background: #2A2A30; }
.lightbox :focus-visible { outline-color: #8FB0FF; }

/* ---------- Novedades ---------- */
.changes { display: grid; gap: var(--s5); }
.changes h3 { font-size: 1.125rem; margin-bottom: var(--s3); }
.changes h3 .mono { color: var(--muted); font-weight: 400; margin-left: var(--s2); }
.changes ul { padding-left: 1.2em; display: grid; gap: var(--s2); }

/* ---------- Bloque de descarga ---------- */
.dl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); padding: var(--s5); }
.dl-card h2, .dl-card h3 { font-size: 1.375rem; margin-bottom: var(--s3); }
.dl-card > * + * { margin-top: var(--s3); }
.dl-box { min-height: 3em; }
.dl-box > * + * { margin-top: var(--s3); }
.dl-kv { grid-template-columns: max-content minmax(0, 1fr); font-size: .9375rem; }
.dl-kv .sha { font-size: .8125rem; user-select: all; word-break: break-all; }
.dl-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.dl-actions .btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 8px; }
.dl-item > * + * { margin-top: var(--s3); }
.dl-item h4 { font: 600 1rem/1.3 var(--f-text); margin: 0; }
.dl-portable { border-top: 1px solid var(--line); padding-top: var(--s4); }
.dl-error { border-left: 3px solid var(--accent); padding: var(--s2) var(--s3); background: #FBF0EC; margin: 0; }
.dl-soon { font: 700 1.5rem/1.2 var(--f-display); margin: 0; }
.dl-win { margin: 0; }
.dl-list { display: grid; gap: var(--s5); list-style: none; }
.dl-list .dl-card { display: grid; gap: var(--s4); }
.dl-head { display: flex; align-items: center; gap: var(--s3); }
.dl-head h2 { margin: 0; font-size: 1.375rem; }
.dl-head p { margin: 0; font-size: .875rem; color: var(--muted); }
@media (min-width: 900px) { .dl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Guías (Markdown convertido) ---------- */
.guide { display: grid; gap: var(--s7); padding-block: var(--s7) var(--s9); }
.guide-toc ul { list-style: none; display: grid; gap: var(--s1); }
.guide-toc a { display: inline-block; padding: 6px 0; color: var(--ink); text-decoration: none; }
.guide-toc a:hover { text-decoration: underline; }
.prose { min-width: 0; }
.prose h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin-bottom: var(--s4); }
.prose h2 { font-size: 1.75rem; margin: var(--s8) 0 var(--s4); padding-top: var(--s5); border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.25rem; margin: var(--s6) 0 var(--s3); }
.prose h4, .prose h5 { font-size: 1.0625rem; margin: var(--s5) 0 var(--s2); }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: var(--s4); max-width: 70ch; }
.prose li { margin-bottom: var(--s2); }
.prose li > ul, .prose li > ol { margin: var(--s2) 0 0; }
.prose code { font-family: var(--f-mono); font-size: .875em; background: var(--sand); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s4); overflow-x: auto; max-width: 100%; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0 0 var(--s4); border-left: 3px solid var(--mustard); padding: var(--s1) var(--s4); color: var(--muted); }
.table-wrap { overflow-x: auto; max-width: 100%; margin-bottom: var(--s4); }
.prose table { border-collapse: collapse; font-size: .9375rem; min-width: 50%; }
.prose th, .prose td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--muted); }
@media (min-width: 900px) {
  .guide { grid-template-columns: 3fr 9fr; }
  .guide-toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; }
}

/* ---------- Licencias de terceros ---------- */
.notices details { border-top: 1px solid var(--line); padding: var(--s3) 0; }
.notices summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.notices pre { font: .75rem/1.5 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s4); max-height: 420px; overflow: auto; }

/* ---------- Páginas de licencias por app ---------- */
.lic-page { padding-block: var(--s5) var(--s9); }
.lic-page h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); overflow-wrap: anywhere; }
.lic-body h2 { font-size: 1.5rem; margin: var(--s7) 0 var(--s3); }
.lic-body h3 { font-size: 1.125rem; margin: var(--s6) 0 var(--s3); }
.lic-body .table-wrap { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); -webkit-overflow-scrolling: touch; }
.lic-table { font-size: .8125rem; width: 100%; }
.lic-table th, .lic-table td { padding: 6px var(--s3); }
.lic-table td { overflow-wrap: anywhere; min-width: 9em; }
.lic-table td:first-child { min-width: 11em; font-weight: 500; }
.lic-table thead th { position: sticky; top: 0; background: var(--surface); }
.lic-body details pre { font: .75rem/1.5 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
.lic-body summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.gpl-offer { border-left: 3px solid var(--mustard); background: #FBF6EA; padding: var(--s3) var(--s4); border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: var(--s4) 0; }
.gpl-offer h2, .gpl-offer h4 { font-size: 1.125rem; margin: 0 0 var(--s2); }
.gpl-offer ul { padding-left: 1.2em; margin: 0; }
.gpl-offer li { overflow-wrap: anywhere; }
.lic-index { list-style: none; padding: 0 !important; display: grid; gap: var(--s2); }
.lic-index a { font-weight: 600; display: inline-flex; min-height: 44px; align-items: center; }

/* ---------- Varios ---------- */
.lang-note { font-size: .875rem; color: var(--muted); }
.section-tight { padding: var(--s8) 0; }

/* ---------- Desplegable "Apps" del encabezado (details nativo: funciona sin JS) ---------- */
.apps-pick { position: relative; }
.apps-pick summary {
  list-style: none; cursor: pointer; min-height: 40px; padding: 0 12px; display: inline-flex; align-items: center;
  border: 1.5px solid var(--ink); border-radius: var(--r-md); font-weight: 600; font-size: .9375rem; background: var(--paper);
}
.apps-pick summary::-webkit-details-marker { display: none; }
.apps-pick summary::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.apps-pick[open] summary { background: var(--sand); }
.apps-pick-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: min(320px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-2); padding: 8px;
}
.apps-pick ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.apps-pick li a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 600; }
.apps-pick li a:hover { background: var(--sand); }
.apps-pick li img { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.apps-pick-all { display: flex; align-items: center; min-height: 44px; padding: 0 10px; margin-top: 4px; border-top: 1px solid var(--line); font-weight: 600; }
@media (max-width: 599.98px) { .apps-pick-panel { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; } }
@media (max-width: 419.98px) {
  .brand svg { width: 112px; }
  .apps-pick summary, .lang-pick summary { padding: 0 8px; }
}

/* ---------- Precios: app sin precio propio (DiseñadorPublicidades) ---------- */
.plan.is-tbc .cur { display: none; }
.plan.is-tbc .num { font-size: 1.75rem; }

/* ---------- Carrusel del hero ---------- */
.carousel { position: relative; }
.car-frame { position: relative; aspect-ratio: 1460 / 952; background: var(--surface); overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; }
.car-frame.is-dragging { cursor: grabbing; }
/* Deslizamiento horizontal: js/fx.js mueve con transform la saliente y la entrante (la nueva entra desde la izquierda
   al avanzar). Solo transform y opacity; will-change lo pone el JS durante la animación. Sin zoom. */
.car-slide { position: absolute; inset: 0; margin: 0; transform: translateX(0); }
.car-slide.is-active { z-index: 1; }
.car-slide img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; pointer-events: none; }
.car-slide figcaption {
  position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); padding: 6px 12px; border-radius: var(--r-sm);
  background: rgba(23,23,26,.82); color: var(--paper); font-size: .875rem; line-height: 1.4;
}
.car-slide figcaption a { color: #FFFFFF; font-weight: 700; }
.car-controls { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s3); flex-wrap: wrap; }
.car-btn { min-width: 40px; min-height: 40px; border-radius: var(--r-md); border: 1.5px solid var(--ink); background: var(--paper); font-size: 1.125rem; line-height: 1; }
.car-btn:hover { background: var(--sand); }
.car-dots { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; justify-content: center; }
.car-dot { width: 24px; height: 24px; border: 0; padding: 0; background: none; position: relative; }
.car-dot::before { content: ""; position: absolute; left: 7px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background-color 300ms ease, transform 300ms ease; }
.car-dot[aria-current="true"]::before { background: var(--accent); transform: scale(1.3); }
@media (min-width: 900px) { .hero-media { padding-bottom: 0; } }
}
.account-apps { align-self: flex-end; margin-bottom: var(--s4); }

/* ---------- Video de la app ---------- */
.app-video .frame { aspect-ratio: 16 / 9; }
.app-video video { width: 100%; height: 100%; display: block; background: var(--ink); object-fit: contain; }
.app-video .note { margin-bottom: var(--s3); }

/* ---------- Home: carrusel de capturas del hero más chico (pedido del dueño, 16/11/2026) ---------- */
.hero-media .carousel { max-width: 420px; margin-inline: auto; }
@media (min-width: 900px) {
  .hero-copy { grid-column: 1 / span 7; }
  .hero-media { grid-column: 8 / span 5; margin-right: 0; }
  .hero-media .carousel { max-width: 460px; margin-right: 0; }
}

/* ---------- Home: carrusel "Resultados" (js/resultados.js) ----------
   Capa .res-before (lo que entra) debajo de .res-after (resultado real), recortada con --p. Solo transform, opacity
   y clip-path (la caída de las entradas la anima el JS). Sin JS: se ven los seis paneles con el resultado completo, sin pestañas ni controles. */
.results { padding-top: 0; }
.res-tabs { display: none; gap: var(--s2); margin-bottom: var(--s5); overflow-x: auto; padding: 4px; margin-inline: -4px; scrollbar-width: none; }
.res-tabs::-webkit-scrollbar { display: none; }
html.js .res-tabs { display: flex; }
.res-tab {
  display: inline-flex; align-items: center; gap: var(--s2); flex: none; min-height: 44px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: transparent; color: var(--muted);
  font: 600 .9375rem/1 var(--f-text); white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.res-tab:hover { background: var(--sand); color: var(--ink); }
.res-tab[aria-selected="true"] { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.res-panel { display: grid; gap: var(--s5); align-items: center; }
.res-panel[hidden] { display: none; }
.res-panel + .res-panel { margin-top: var(--s7); }
html.js .res-panel + .res-panel { margin-top: 0; }
.res-stage { position: relative; aspect-ratio: 3 / 2; background: var(--surface); --p: 100%; }
.res-before, .res-after { position: absolute; inset: 0; }
.res-before { display: grid; place-items: center; padding: var(--s7) var(--s4) var(--s4); background: var(--paper); }
.res-drop { max-width: 100%; padding: var(--s4) var(--s5); border: 2px dashed var(--field-border); border-radius: var(--r-lg); text-align: center; }
.res-drop p { margin: 0 0 var(--s3); font-size: .875rem; color: var(--muted); }
.res-in { list-style: none; display: grid; gap: var(--s2); }
.res-in li {
  display: flex; align-items: center; gap: var(--s2); padding: 8px 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1);
  font-weight: 500; font-size: .9375rem; line-height: 1.3;
}
.res-in .icon { color: var(--accent); }
.res-after { background: var(--surface); clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.res-after img { width: 100%; height: 100%; object-fit: contain; padding: var(--s4); }
/* Piezas de concepto (SVG en línea de deploy/web-lib/conceptos.js): mismas medidas que la imagen, fuentes del sitio. */
.res-art { display: block; width: 100%; height: 100%; padding: var(--s4); font-family: var(--f-text); }
.res-art-b { font-family: var(--f-display); font-weight: 700; }
.res-art-m { font-family: var(--f-mono); }
.res-tag {
  position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: var(--r-sm);
  background: var(--ink); color: var(--paper); font: 600 .8125rem/1.4 var(--f-text); letter-spacing: .04em; text-transform: uppercase;
}
.res-tag-in { left: auto; right: 12px; background: var(--sand); color: var(--ink); }
.res-range, .res-handle { display: none; }
html.js .res-range { display: block; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
html.js .res-handle { display: block; position: absolute; top: 0; bottom: 0; left: clamp(20px, var(--p), calc(100% - 20px)); width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; }
.res-handle::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  display: grid; place-items: center; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink);
  font: 700 .875rem/1 var(--f-text); color: var(--ink); box-shadow: var(--sh-1);
}
.res-range:focus-visible + .res-handle::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.res-info h3 { margin-bottom: var(--s3); }
.res-info > p { margin: 0 0 var(--s4); color: var(--muted); max-width: 46ch; }
.res-actions { display: none; flex-wrap: wrap; gap: var(--s3); }
html.js .res-actions { display: flex; }
.res-info .figcap { margin-bottom: 0; }
@media (max-width: 599.98px) {
  .res-stage { aspect-ratio: 4 / 3; }
  .res-before { padding: var(--s7) var(--s3) var(--s3); }
  .res-drop { padding: var(--s3); }
  .res-after img, .res-art { padding: var(--s2); }
}
@media (min-width: 900px) {
  .res-panel { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s7); }
  .res-stage { grid-column: 1 / span 8; }
  .res-info { grid-column: 9 / span 4; }
}
