/* Estética "editorial" de las páginas públicas de Peón (pedido de Nahuel, 25/10/2026, ver
   Linear PEO-45): colores fríos (fondo claro gris frío como la app, tarjetas con línea fina, botones negros; el crema se sacó el 26/10/2026), con
   las fuentes del manual de marca (Baloo 2 + Inter). El azul de marca queda como acento. Lo usan legal.html, el blog y las secciones nuevas de la
   landing y /empresas. Tema oscuro con [data-theme="dark"] en <html>. */

:root {
  --ed-bg: #F5F7FA;
  --ed-panel: #FFFFFF;
  --ed-ink: #10151C;
  --ed-soft: #556070;
  /* --ed-faint y --ed-accent oscurecidos el 25/10/2026 para llegar a 4.5:1 sobre el fondo claro. */
  --ed-faint: #626C7A;
  --ed-hair: rgba(16, 21, 28, .10);
  --ed-hair-strong: rgba(16, 21, 28, .18);
  --ed-accent: #0B6FC8;
  --ed-btn-bg: #0B0D10;
  --ed-btn-ink: #F5F7FA;
  --ed-chip: #EEF1F5;
  --ed-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ed-display: 'Baloo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ed-mono: ui-monospace, Menlo, monospace;
  --ed-radius: 14px;
  --ed-gutter: clamp(16px, 5vw, 48px);
  color-scheme: light;
}

html[data-theme="dark"] {
  --ed-bg: #0B0D10;
  --ed-panel: #13161A;
  --ed-ink: #ECEEF2;
  --ed-soft: #AEB4BE;
  --ed-faint: #8E95A1;
  --ed-accent: #5AB0EE;
  --ed-hair: rgba(236, 238, 242, .10);
  --ed-hair-strong: rgba(236, 238, 242, .20);
  --ed-btn-bg: #ECEEF2;
  --ed-btn-ink: #0B0D10;
  --ed-chip: #1D2127;
  color-scheme: dark;
}

.ed, .ed * { box-sizing: border-box; }
body.ed {
  margin: 0;
  background: var(--ed-bg);
  color: var(--ed-ink);
  font-family: var(--ed-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.ed a { color: inherit; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.ed-nav-wrap { position: sticky; top: 0; z-index: 20; padding: 14px var(--ed-gutter) 0; }
.ed-nav {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px 12px 22px;
  background: color-mix(in srgb, var(--ed-panel) 82%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--ed-hair); border-radius: 999px;
  box-shadow: 0 10px 40px rgba(16, 21, 28, .06);
}
.ed-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.ed-brand img { height: 26px; width: auto; }
.ed-brand span { font-family: var(--ed-display); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: -.02em; }
.ed-nav-links { display: flex; align-items: center; gap: 6px; }
.ed-nav-links a {
  font-family: var(--ed-sans); font-weight: 600; font-size: 15px; color: var(--ed-soft);
  text-decoration: none; padding: 6px 10px; border-radius: 999px;
  transition: color .2s ease;
}
.ed-nav-links a:hover { color: var(--ed-ink); }
.ed-tt {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--ed-hair); background: transparent; color: var(--ed-soft);
  font-size: 14px; cursor: pointer; flex-shrink: 0;
}
@media (max-width: 560px) {
  .ed-nav { padding: 10px 10px 10px 16px; }
  .ed-nav-links a.ed-hide-sm { display: none; }
  .ed-nav-links a { font-size: 17px; padding: 6px 7px; }
}

/* ── Tipografía ──────────────────────────────────────────────────────── */
.ed-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 500; color: var(--ed-soft);
  background: var(--ed-chip); border-radius: 6px; padding: 4px 10px; margin: 0 0 18px;
}
.ed-h1 {
  font-family: var(--ed-display); font-weight: 800; font-size: clamp(34px, 6vw, 56px); line-height: 1.05;
  letter-spacing: -.025em; margin: 0 0 18px; text-wrap: balance;
}
.ed-h2 {
  font-family: var(--ed-display); font-weight: 800; font-size: clamp(27px, 4.2vw, 40px); line-height: 1.1;
  letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance;
}
.ed-muted { color: var(--ed-faint); }
.ed-lead { font-size: clamp(16px, 1.6vw, 18px); color: var(--ed-soft); max-width: 620px; margin: 0 0 26px; }

/* ── Botones ─────────────────────────────────────────────────────────── */
.ed-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ed-btn-bg); color: var(--ed-btn-ink); text-decoration: none;
  font: 500 15px/1 var(--ed-sans); padding: 7px 7px 7px 16px; border-radius: 9px; border: 0;
  cursor: pointer; transition: transform .15s ease, opacity .15s ease;
}
.ed-btn::after {
  content: "›"; display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 6px; background: var(--ed-btn-ink); color: var(--ed-btn-bg); font-size: 18px;
}
.ed-btn:hover { opacity: .9; }
.ed-btn:active { transform: scale(.98); }
.ed-btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font: 500 15px/1 var(--ed-sans); color: var(--ed-ink); padding: 12px 16px; border-radius: 9px;
  border: 1px solid var(--ed-hair-strong); background: transparent; cursor: pointer;
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.ed-wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--ed-gutter); }
.ed-narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--ed-gutter); }
.ed-section { padding: clamp(56px, 9vw, 112px) 0; }
.ed-hero { position: relative; overflow: hidden; padding: clamp(64px, 12vw, 140px) 0 clamp(48px, 8vw, 96px); }
.ed-hero > .ed-narrow, .ed-hero > .ed-wrap { position: relative; z-index: 1; }

/* ── Texto largo (legales, blog) ─────────────────────────────────────── */
.ed-prose { font-size: 16.5px; color: var(--ed-soft); }
.ed-prose h2 {
  color: var(--ed-ink); font-family: var(--ed-display); font-weight: 700; font-size: clamp(21px, 2.6vw, 26px);
  letter-spacing: -.02em; line-height: 1.25; margin: 44px 0 12px;
}
.ed-prose h3 { color: var(--ed-ink); font-weight: 500; font-size: 17.5px; margin: 28px 0 8px; }
.ed-prose p, .ed-prose li { margin: 0 0 14px; }
.ed-prose ul, .ed-prose ol { padding-left: 22px; margin: 0 0 18px; }
.ed-prose li { margin-bottom: 9px; }
.ed-prose strong, .ed-prose b { color: var(--ed-ink); font-weight: 500; }
.ed-prose a { color: var(--ed-ink); text-decoration: underline; text-decoration-color: var(--ed-hair-strong); text-underline-offset: 3px; }
.ed-prose a:hover { text-decoration-color: var(--ed-ink); }
.ed-prose table { width: 100%; border-collapse: collapse; margin: 6px 0 22px; font-size: 15px; }
.ed-prose th, .ed-prose td { text-align: left; vertical-align: top; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--ed-hair); }
.ed-prose th { color: var(--ed-ink); font-weight: 500; }
.ed-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ed-note, .ed-prose .note {
  background: var(--ed-panel); border: 1px solid var(--ed-hair); border-radius: var(--ed-radius);
  padding: 18px 20px; margin: 26px 0; font-size: 15px;
}
.ed-note > :last-child, .ed-prose .note > :last-child { margin-bottom: 0; }
.ed-tldr { list-style: none; padding: 0 !important; margin: 0; }
.ed-tldr li { position: relative; padding-left: 26px; }
.ed-tldr li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ed-ink); font-weight: 500; }
/* .qa / .note: clases que ya usan los textos de FAQ y Términos (routes/core.py). */
.ed-qa, .ed-prose .qa { border-bottom: 1px solid var(--ed-hair); padding: 18px 0; }
.ed-qa h2, .ed-qa h3, .ed-prose .qa h2 { margin: 0 0 8px; }
.ed-back { display: inline-flex; gap: 7px; font-size: 14px; color: var(--ed-faint); text-decoration: none; margin-bottom: 26px; }
.ed-back:hover { color: var(--ed-ink); }
.ed-updated { font-size: 13.5px; color: var(--ed-faint); margin: -6px 0 34px; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.ed-foot { border-top: 1px solid var(--ed-hair); margin-top: 40px; }
.ed-foot-in {
  max-width: 1080px; margin: 0 auto; padding: 44px var(--ed-gutter) 36px;
  display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px;
}
.ed-foot h4 { font-size: 13px; font-weight: 500; color: var(--ed-ink); margin: 0 0 12px; }
.ed-foot a { display: block; font-size: 14px; color: var(--ed-soft); text-decoration: none; margin-bottom: 8px; }
.ed-foot a:hover { color: var(--ed-ink); }
.ed-foot-tag { font-family: var(--ed-display); font-weight: 700; font-size: 20px; line-height: 1.2; color: var(--ed-ink); margin: 12px 0 0; max-width: 260px; }
.ed-foot-copy a.creador { color: var(--ed-ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--ed-hair-strong); }
.ed-foot-copy a.creador:hover { border-bottom-color: var(--ed-ink); }
.ed-foot-copy { max-width: 1080px; margin: 0 auto; padding: 0 var(--ed-gutter) 30px; font-size: 13px; color: var(--ed-faint); }
@media (max-width: 720px) { .ed-foot-in { grid-template-columns: 1fr 1fr; } .ed-foot-in > :first-child { grid-column: 1 / -1; } }


/* ── Sección "Sin Peón / Con Peón" (sin-con.js, templates/_sin_con.html) ── */
.sc { font-family: var(--ed-sans); color: var(--ed-ink); }
.sc .sc-h { max-width: 680px; }
.sc-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 10px 0 26px; border-radius: 11px; background: var(--ed-chip); }
.sc-tab {
  font: 500 14.5px/1 var(--ed-sans); color: var(--ed-soft); background: transparent; border: 0;
  padding: 10px 16px; border-radius: 8px; cursor: pointer; transition: background .2s ease, color .2s ease;
}
.sc-tab[aria-pressed="true"] { background: var(--ed-btn-bg); color: var(--ed-btn-ink); }
.sc-marco {
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px;
  border: 1px solid var(--ed-hair); border-radius: 18px; background: var(--ed-panel); padding: 18px;
}
.sc-escena-wrap { position: relative; min-height: 380px; border-radius: 12px; background: var(--ed-bg); padding: 46px 18px 18px; overflow: hidden; }
.sc-lado { position: absolute; top: 14px; left: 18px; font-family: var(--ed-mono); font-size: 12px; color: var(--ed-faint); }
.sc-escena { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.sc[data-lado="con"] .sc-escena { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
.sc-card {
  background: var(--ed-panel); border: 1px solid var(--ed-hair); border-radius: 12px; padding: 14px;
  font-size: 13.5px; opacity: 0; transform: translateY(10px) scale(.98);
  transition: opacity .45s ease, transform .55s cubic-bezier(.23, 1, .32, 1);
}
.sc-card.on { opacity: 1; transform: none; }
.sc-card-t { font-weight: 500; font-size: 13px; margin-bottom: 10px; }
.sc-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-top: 1px solid var(--ed-hair); }
.sc-row-t { font-weight: 500; }
.sc-row-s { grid-column: 1 / -1; color: var(--ed-faint); font-size: 12.5px; }
.sc-tag { font-size: 11px; color: var(--ed-soft); background: var(--ed-chip); border-radius: 5px; padding: 2px 7px; align-self: start; white-space: nowrap; }
.sc-lab { font-size: 12px; color: var(--ed-faint); margin: 8px 0 4px; }
.sc-inp { border: 1px solid var(--ed-hair); border-radius: 8px; padding: 8px 10px; min-height: 34px; color: var(--ed-soft); }
.sc-inp-alto { min-height: 64px; }
.sc-fbtn { margin-top: 10px; text-align: center; border-radius: 8px; padding: 9px; background: var(--ed-chip); color: var(--ed-soft); font-weight: 500; }
.sc-toast { grid-column: 1 / -1; justify-self: center; border-radius: 999px; padding: 9px 16px; font-weight: 500; }
.sc-mail, .sc-aviso { grid-column: 1 / -1; }
.sc-mail-de { font-size: 12px; color: var(--ed-faint); margin-bottom: 4px; }
.sc-mail-tx { font-size: 14px; }
.sc-aviso { border-color: var(--ed-hair-strong); }
.sc-aviso .sc-mail-de { color: var(--ed-accent); font-weight: 500; }
.sc-chk { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--ed-hair); font-size: 14px;
  opacity: 0; transform: translateX(-6px); transition: opacity .4s ease, transform .4s ease; transition-delay: calc(var(--i) * .45s + .2s); }
.sc-card.on .sc-chk { opacity: 1; transform: none; }
.sc-chk-d { width: 18px; height: 18px; border-radius: 50%; background: var(--ed-btn-bg); flex-shrink: 0; position: relative; }
.sc-chk-d::after { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border: solid var(--ed-btn-ink); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.sc-contadores { display: flex; flex-direction: column; gap: 22px; padding: 12px 6px; }
.sc-num { display: block; font-family: var(--ed-display); font-weight: 800; font-size: clamp(44px, 5vw, 64px); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sc-cap { display: block; font-size: 13px; color: var(--ed-faint); margin-top: 6px; }
.sc-leyenda { margin: auto 0 0; font-size: 14px; color: var(--ed-soft); }
@media (max-width: 760px) {
  .sc-marco { grid-template-columns: 1fr; padding: 12px; }
  .sc-escena { grid-template-columns: 1fr; }
  .sc-escena-wrap { min-height: 0; }
  .sc-contadores { flex-direction: row; flex-wrap: wrap; gap: 14px 28px; padding: 4px 4px 8px; }
  .sc-leyenda { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-card, .sc-chk { transition: none; }
}
.sc.ed-section { padding-top: clamp(28px, 5vw, 56px); }

/* "Sin Peón / Con Peón" sobre fondo negro (sin_con(..., oscuro=True)): mismas piezas, variables oscuras. */
.sc--oscuro {
  --ed-bg: #0B0B0A; --ed-panel: #161A1E; --ed-ink: #ECEEF2; --ed-soft: #AEB4BE; --ed-faint: #8E95A1;
  --ed-hair: rgba(236, 238, 242, .10); --ed-hair-strong: rgba(236, 238, 242, .20);
  --ed-btn-bg: #ECEEF2; --ed-btn-ink: #0B0D10; --ed-chip: #1D2127; --ed-accent: #6BB6F0;
  background: #0B0D10; color: var(--ed-ink);
}
