/* ==========================================================================
   Retribus — sistema de diseño
   Una sola familia (Inter variable, autoalojada), interfaz neutra y un único acento:
   el verde del dinero recuperado. Sin frameworks.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f6f6f3;
  --bg-sunk: #efefea;
  --ink: #0c1424;
  --text: #1f2633;
  --muted: #586070;
  --faint: #667080;
  --line: #e6e6e0;
  --line-strong: #d3d3cb;
  --accent: #0e6a4e;
  --accent-hover: #0a573f;
  --accent-soft: #e7f2ec;
  --accent-ink: #0a573f;
  --bad: #b42318;
  --bad-soft: #fcefed;
  --warn: #8f5304;
  --warn-soft: #fbf3e4;
  --info: #2d50b8;
  --info-soft: #edf1fb;
  --gold: #8a6a1f;
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(12, 20, 36, 0.05);
  --shadow-md: 0 1px 2px rgba(12, 20, 36, 0.04), 0 10px 28px -12px rgba(12, 20, 36, 0.14);
  --shadow-lg: 0 2px 6px rgba(12, 20, 36, 0.04), 0 28px 56px -20px rgba(12, 20, 36, 0.22);
  --wrap: 1200px;
  --gut: 32px;
  --nav: 68px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav) + 16px); }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: color .15s, text-decoration-color .15s; }
a:hover { text-decoration-color: currentColor; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li + li { margin-top: .3em; }
strong, b { font-weight: 600; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; font-weight: 650; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 4.6vw, 4rem); line-height: 1.04; letter-spacing: -0.036em; }
h2 { font-size: clamp(1.875rem, 3.2vw, 2.75rem); line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.015em; font-weight: 620; }
h4 { font-size: 1.0625rem; line-height: 1.35; letter-spacing: -0.01em; font-weight: 620; }
small, .small { font-size: .875rem; line-height: 1.5; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.lead { font-size: clamp(1.125rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--muted); max-width: 62ch; text-wrap: pretty; }
.num, .tnum, td, .price, .kpi .v, .amt { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: #cfe6db; color: var(--ink); }
/* !important en el tamaño: los estilos de los campos (width: 100%) no deben agrandar un elemento oculto */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0 !important; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.narrow { max-width: calc(800px + var(--gut) * 2); }
.section { padding: 112px 0; }
.section-sm { padding: 64px 0; }
.section.alt, .alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.section-head .lead { margin-bottom: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 560; color: var(--accent-ink); margin-bottom: 14px; letter-spacing: 0; }
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.mt0 { margin-top: 0 !important; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 16px; } .mt3 { margin-top: 24px; } .mt4 { margin-top: 40px; } .mt5 { margin-top: 64px; }
.mb0 { margin-bottom: 0 !important; } .mb1 { margin-bottom: 8px; } .mb2 { margin-bottom: 16px; } .mb3 { margin-bottom: 24px; } .mb4 { margin-bottom: 40px; }

/* ---------- botones ---------- */
.btn {
  --b-bg: var(--accent); --b-fg: #fff; --b-bd: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--r-pill);
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  font: inherit; font-size: 1rem; font-weight: 580; line-height: 1.2; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s, transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { --b-bg: var(--accent-hover); --b-bd: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(14, 106, 78, .55); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-accent { /* alias del botón principal */ }
.btn-ghost, .btn-secondary { --b-bg: #fff; --b-fg: var(--ink); --b-bd: var(--line-strong); }
.btn-ghost:hover, .btn-secondary:hover { --b-bg: #fff; --b-bd: var(--ink); --b-fg: var(--ink); box-shadow: none; }
.btn-dark { --b-bg: var(--ink); --b-fg: #fff; --b-bd: var(--ink); }
.btn-dark:hover { --b-bg: #1d2638; --b-bd: #1d2638; box-shadow: 0 6px 16px -8px rgba(12, 20, 36, .5); }
.btn-light { --b-bg: #fff; --b-fg: var(--ink); --b-bd: #fff; }
.btn-light:hover { --b-bg: #f1f1ec; --b-bd: #f1f1ec; box-shadow: none; }
.btn-danger { --b-bg: #fff; --b-fg: var(--bad); --b-bd: #e7c3bf; }
.btn-danger:hover { --b-bg: var(--bad); --b-fg: #fff; --b-bd: var(--bad); box-shadow: none; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .9375rem; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.btn-link:hover { text-decoration-color: currentColor; }
.btn-google { --b-bg: #fff; --b-fg: #1f1f1f; --b-bd: #c9cbd1; font-weight: 560; }
.btn-google:hover { --b-bg: #f8f9fb; --b-bd: #9aa0a6; --b-fg: #1f1f1f; box-shadow: none; }
.btn-google svg { width: 20px; height: 20px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--bg-alt); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 560; text-decoration: none; color: var(--accent-ink); }
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 40; height: var(--nav); background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 680; font-size: 1.1875rem; letter-spacing: -0.025em; flex: none; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.nav-main { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-main a { position: relative; padding: 8px 12px; border-radius: var(--r-sm); color: var(--text); font-size: .9375rem; font-weight: 520; text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.nav-main a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-main a[aria-current="page"] { color: var(--ink); }
.nav-main a[aria-current="page"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -14px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-actions .nav-signin { color: var(--text); font-weight: 540; font-size: .9375rem; text-decoration: none; padding: 8px 10px; border-radius: var(--r-sm); }
.nav-actions .nav-signin:hover { background: var(--bg-alt); color: var(--ink); }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .875rem; font-weight: 640; text-transform: uppercase; flex: none; text-decoration: none; }
.account-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 560; font-size: .9375rem; padding: 4px 12px 4px 4px; border-radius: var(--r-pill); border: 1px solid var(--line); transition: border-color .15s; }
.account-link:hover { border-color: var(--line-strong); }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer; place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }
.mobile-sheet { display: none; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 96px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero h1 { margin-bottom: 22px; max-width: 16ch; }
.hero .lead { margin-bottom: 30px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .9375rem; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.hero-facts svg { width: 18px; height: 18px; color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: var(--r-pill); background: var(--bg-alt); border: 1px solid var(--line); font-size: .875rem; font-weight: 520; color: var(--text); margin-bottom: 22px; text-decoration: none; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pill b { font-weight: 620; }

/* Ventana de producto (interfaz real en HTML) */
.stage { position: relative; border-radius: 28px; background: radial-gradient(120% 90% at 85% 0%, #e3efe8 0%, rgba(227,239,232,0) 55%), linear-gradient(180deg, #f4f4f0, #ecece6); padding: 36px; border: 1px solid var(--line); }
.stage-photo { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.stage-photo img { width: 100%; height: 100%; object-fit: cover; }
.frame { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.frame-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #fbfbf9; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e2dc; }
.frame-tag { font-size: .75rem; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 1px 9px; }
.frame-bar .url { margin: 0 auto; padding: 3px 12px; border-radius: var(--r-xs); background: var(--bg-alt); font-size: .75rem; color: var(--muted); letter-spacing: .01em; }
.frame-body { padding: 22px 22px 18px; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.result-head .label { font-size: .8125rem; color: var(--muted); margin-bottom: 2px; }
.result-head .title { font-weight: 620; color: var(--ink); font-size: .9375rem; line-height: 1.35; }
.result-big { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.result-big > div { background: var(--accent-soft); border-radius: var(--r-md); padding: 14px 16px; }
.result-big .k { font-size: .8125rem; color: var(--accent-ink); font-weight: 520; }
.result-big .v { font-size: 1.75rem; font-weight: 680; color: var(--accent-ink); letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.result-lines { list-style: none; margin: 0; padding: 0; }
.result-lines li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9375rem; margin: 0; }
.result-lines .amt { font-weight: 600; color: var(--ink); font-size: .875rem; white-space: nowrap; }
.result-lines .amt.ok { color: var(--accent-ink); }
.result-lines .amt.rev { color: var(--warn); }
.result-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }

/* Iconos de estado */
.ico { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none; }
.ico svg { width: 14px; height: 14px; }
.ico-ok { background: var(--accent-soft); color: var(--accent); }
.ico-err { background: var(--bad-soft); color: var(--bad); }
.ico-rev { background: var(--warn-soft); color: var(--warn); }
.ico-info { background: var(--info-soft); color: var(--info); }

/* ---------- franja de datos ---------- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 30px 24px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact .k { font-size: 1.5rem; font-weight: 660; color: var(--ink); letter-spacing: -0.025em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.fact .v { font-size: .9375rem; color: var(--muted); margin-top: 4px; }
/* compatibilidad con la franja antigua */
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-item .k { font-weight: 650; color: var(--ink); }
.trust-item .v { color: var(--muted); font-size: .9375rem; }

/* ---------- tarjetas ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.card-soft { background: var(--bg-alt); border-radius: var(--r-lg); padding: 24px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child, .card-soft p:last-child { margin-bottom: 0; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
a.card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.feature-icon svg { width: 22px; height: 22px; }

/* Comprobaciones */
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 26px 24px 26px 0; border-bottom: 1px solid var(--line); }
.check > svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.check h4 { margin-bottom: 4px; }
.check p { margin: 0; color: var(--muted); font-size: .9688rem; line-height: 1.55; }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; }
.step .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .875rem; font-weight: 640; margin-bottom: 16px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin-bottom: 20px; }
.step .mini { margin-top: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-alt); padding: 14px; font-size: .875rem; }
.mini-drop { display: grid; place-items: center; gap: 6px; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); padding: 18px 10px; background: #fff; color: var(--muted); }
.mini-drop svg { width: 22px; height: 22px; color: var(--accent); }
.mini-field { display: flex; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.mini-field + .mini-field { margin-top: 6px; }
.mini-field span { color: var(--muted); }
.mini-field b { font-weight: 600; color: var(--ink); }
.mini-result { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.mini-result .v { font-size: 1.25rem; font-weight: 680; color: var(--accent-ink); letter-spacing: -0.02em; }

/* Sectores con fotografía */
.sectors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sector { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.sector .ph { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-sunk); }
.sector .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.sector:hover .ph img { transform: scale(1.03); }
.sector .tx { padding: 18px 20px 20px; }
.sector h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.sector p { color: var(--muted); font-size: .9375rem; margin: 0; line-height: 1.5; }

/* Área de cliente en la portada */
.showcase { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); margin: 0; }
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list svg { width: 20px; height: 20px; color: var(--accent); margin-top: 3px; }
.feature-list b { display: block; font-weight: 600; color: var(--ink); }
.feature-list span { color: var(--muted); font-size: .9688rem; }
.mock-app { display: grid; grid-template-columns: 160px 1fr; min-height: 380px; font-size: .8125rem; }
.mock-side { border-right: 1px solid var(--line); padding: 14px 10px; background: #fbfbf9; }
.mock-side .it { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--muted); }
.mock-side .it.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.mock-side .it svg { width: 14px; height: 14px; }
.mock-main { padding: 18px; }
.mock-main .mock-title { margin: 0 0 12px; font-size: 1rem; color: var(--ink); font-weight: 640; letter-spacing: -0.01em; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mock-kpis div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.mock-kpis .k { color: var(--muted); font-size: .75rem; }
.mock-kpis .v { font-size: 1.125rem; font-weight: 680; color: var(--ink); letter-spacing: -0.02em; }
.mock-kpis .v.g { color: var(--accent-ink); }
.mock-alert { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; color: #5f3a05; margin-bottom: 12px; }
.mock-alert svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.mock-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 9px 2px; border-top: 1px solid var(--line); }
.mock-row .tag { font-size: .6875rem; padding: 2px 8px; border-radius: var(--r-pill); font-weight: 560; }

/* Ley */
.law { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.law .card { padding: 28px; }
.law .art { font-size: .8125rem; font-weight: 560; color: var(--gold); margin-bottom: 12px; }
.law p { color: var(--muted); }

/* ---------- precios ---------- */
.billing-toggle { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--bg-sunk); border: 1px solid var(--line); margin: 0 auto 40px; position: relative; }
.billing-toggle button { position: relative; z-index: 1; border: 0; background: none; font: inherit; font-size: .9375rem; font-weight: 560; color: var(--muted); padding: 9px 20px; border-radius: var(--r-pill); cursor: pointer; transition: color .2s, background .2s, box-shadow .2s; display: inline-flex; align-items: center; gap: 8px; }
.billing-toggle button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.billing-toggle .save { font-size: .75rem; font-weight: 620; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 8px; border-radius: var(--r-pill); }
.toggle-wrap { text-align: center; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plans.p3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1080px; margin: 0 auto; }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 30px 26px 26px; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.plan:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.plan.featured { border: 1.5px solid var(--ink); box-shadow: var(--shadow-lg); }
.plan .ribbon { position: absolute; top: -13px; left: 26px; background: var(--ink); color: #fff; font-size: .8125rem; font-weight: 600; padding: 4px 12px; border-radius: var(--r-pill); }
.plan .name { font-size: 1.0625rem; font-weight: 620; color: var(--ink); margin-bottom: 4px; letter-spacing: -0.01em; }
.plan .for { font-size: .9375rem; color: var(--muted); min-height: 3em; margin-bottom: 18px; line-height: 1.45; }
.plan .price { font-size: 2.75rem; font-weight: 680; color: var(--ink); letter-spacing: -0.04em; line-height: 1; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan .price small { font-size: .9375rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .price-note { font-size: .8125rem; color: var(--muted); margin: 10px 0 22px; min-height: 2.5em; line-height: 1.45; }
.plan .btn { width: 100%; margin-bottom: 22px; }
.plan ul { list-style: none; padding: 0; margin: 0; font-size: .9375rem; }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 7px 0; margin: 0; line-height: 1.45; }
.plan li svg { width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }
.plan li.no { color: var(--faint); }
.plan li.no svg { color: var(--line-strong); }
.plan .sep { height: 1px; background: var(--line); margin: 4px 0 14px; }
.price-legal { text-align: center; color: var(--muted); font-size: .875rem; margin-top: 28px; }
[data-interval="year"] .only-month, [data-interval="month"] .only-year { display: none; }
/* compatibilidad */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---------- tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8125rem; font-weight: 600; color: var(--muted); background: #fbfbf9; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.n, th.n, .r { text-align: right; }
/* Tabla salarial de cada convenio: grupo como título de sección y pluses bajo la categoría */
.tabla-salarial .grupo-fila th { padding-top: 18px; padding-bottom: 8px; background: #fff; color: var(--ink); font-size: .8125rem; font-weight: 640; white-space: normal; }
.tabla-salarial td.n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla-salarial td:first-child { overflow-wrap: anywhere; }
.tabla-salarial .anual-movil { display: none; }
@media (max-width: 640px) {
  .tabla-salarial .col-anual { display: none; }
  .tabla-salarial .anual-movil { display: block; margin-top: 4px; font-size: .8125rem; font-weight: 400; color: var(--muted); }
}
.cat-pluses { display: block; margin-top: 4px; font-size: .8125rem; color: var(--muted); }
/* Móvil: celdas más compactas y nombres cortos («Nivel 1.1») en una sola línea */
@media (max-width: 640px) {
  th, td { padding: 12px 12px; }
  th { white-space: normal; }
  .table-wrap td:not(.n) { min-width: 6.5rem; }
}
.compare th.us, .compare td.us { background: var(--accent-soft); }
.compare th.us { color: var(--accent-ink); }
.compare td.yes { color: var(--ink); }
.compare td.no-c { color: var(--faint); }
.compare td:first-child { font-weight: 520; color: var(--ink); min-width: 220px; }

/* ---------- preguntas ---------- */
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.faq-item { padding: 24px 0; border-top: 1px solid var(--line); }
.faq-item h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.faq-item p { color: var(--muted); margin: 0; font-size: .9688rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 600; color: var(--ink); font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* ---------- llamada final ---------- */
.cta-band { background: var(--ink); color: #c9cfdb; border-radius: 28px; padding: 64px; display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 40px; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { margin: 0; font-size: 1.125rem; max-width: 46ch; }
.cta-band .row { justify-content: flex-end; }

/* ---------- cabecera de página interior ---------- */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.125rem, 3.6vw, 3rem); margin-bottom: 14px; max-width: 22ch; }
.page-head .lead { margin-bottom: 0; }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* ---------- pie ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 72px 0 36px; margin-top: 0; font-size: .9375rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.site-footer h2, .site-footer h4 { font-size: .875rem; font-weight: 620; color: var(--ink); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 10px; }
.site-footer a:not(.btn), .site-footer .btn-link { color: var(--text); text-decoration: none; font-size: .9375rem; }
.site-footer a:not(.btn):hover, .site-footer .btn-link:hover { color: var(--ink); text-decoration: underline; }
.site-footer .disclaimer { color: var(--muted); font-size: .875rem; max-width: 40ch; margin-top: 16px; line-height: 1.55; }
.legal-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; font-size: .8125rem; color: var(--muted); }
.legal-line a { color: var(--muted); }

/* ---------- formularios ---------- */
label { display: block; font-size: .875rem; font-weight: 560; color: var(--ink); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], input[type="month"], input[type="tel"], input[type="url"], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.4; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23586070' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
textarea { min-height: 110px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #b9b9b0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 106, 78, .16); }
input::placeholder, textarea::placeholder { color: #9aa0aa; }
input:disabled, select:disabled { background: var(--bg-alt); color: var(--faint); cursor: not-allowed; }
input[aria-invalid="true"] { border-color: var(--bad); }
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.hint { font-size: .8125rem; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.field-error { font-size: .8125rem; color: var(--bad); margin-top: 6px; }
.fields { display: grid; gap: 16px; }
/* Dos filas de campos seguidas: el último campo de cada fila no lleva margen, así que lo pone la fila */
.fields:not(:last-child) { margin-bottom: 18px; }
.f2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.f3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 38px; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9375rem; pointer-events: none; }
input.money { text-align: right; font-variant-numeric: tabular-nums; }
.checkbox { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: .9375rem; font-weight: 400; color: var(--text); cursor: pointer; line-height: 1.5; }
.checkbox input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.fieldset { border: 0; padding: 0; margin: 0 0 32px; }
.fieldset legend { font-size: 1.0625rem; font-weight: 620; color: var(--ink); padding: 0; margin-bottom: 14px; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); cursor: pointer; margin: 0; font-weight: 400; }
.switch b { display: block; font-weight: 600; color: var(--ink); font-size: .9688rem; }
.switch span { color: var(--muted); font-size: .875rem; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; min-height: 0; padding: 0; border: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:disabled { opacity: .6; }
.divider-text { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: .875rem; margin: 22px 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.or { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: .875rem; margin: 22px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- avisos y etiquetas ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: .9375rem; line-height: 1.5; border: 1px solid transparent; }
.alert > svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert-info { background: var(--info-soft); color: #23397a; border-color: #dbe3f8; }
.alert-ok { background: var(--accent-soft); color: #0a4d38; border-color: #cfe5da; }
.alert-warn { background: var(--warn-soft); color: #5f3a05; border-color: #f0e0bf; }
.alert-bad { background: var(--bad-soft); color: #7a1a12; border-color: #f2d2cd; }
.alert a:not(.btn) { color: inherit; font-weight: 560; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: .8125rem; font-weight: 560; background: var(--bg-alt); color: var(--text); border: 1px solid var(--line); white-space: nowrap; line-height: 1.5; }
.badge-ok { background: var(--accent-soft); color: var(--accent-ink); border-color: #cfe5da; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: #f0e0bf; }
.badge-bad { background: var(--bad-soft); color: var(--bad); border-color: #f2d2cd; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: #dbe3f8; }
.badge-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- asistente de revisión ---------- */
.tool { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.tool-steps { list-style: none; padding: 0; margin: 0; position: sticky; top: calc(var(--nav) + 24px); }
.tool-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 12px 0; margin: 0; color: var(--muted); font-weight: 560; font-size: .9688rem; }
.tool-steps .n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: .875rem; font-weight: 640; background: #fff; }
.tool-steps .sub { display: block; font-size: .8125rem; font-weight: 400; color: var(--faint); }
.tool-steps li.active { color: var(--ink); }
.tool-steps li.active .n { background: var(--ink); border-color: var(--ink); color: #fff; }
.tool-steps li.done .n { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 36px; box-shadow: var(--shadow-sm); }
.panel > h2 { font-size: 1.625rem; letter-spacing: -0.025em; margin-bottom: 8px; }
.dropzone { display: grid; place-items: center; gap: 10px; text-align: center; padding: 48px 24px; border: 1.5px dashed var(--line-strong); border-radius: 18px; background: var(--bg-alt); cursor: pointer; margin: 22px 0 0; transition: border-color .2s, background .2s; font-weight: 400; }
.dropzone svg { width: 34px; height: 34px; color: var(--accent); }
.dropzone strong { font-size: 1.0625rem; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.privacy-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 26px; padding: 16px; border-radius: var(--r-md); background: var(--bg-alt); font-size: .9063rem; color: var(--muted); }
.privacy-note svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }
.lines-table td { padding: 6px 8px 6px 0; border: 0; vertical-align: middle; }
.lines-table td:last-child { padding-right: 0; width: 40px; }
.autocomplete { position: relative; }
.ac-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); max-height: 340px; overflow-y: auto; }
.ac-list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; margin: 0; font-size: .9375rem; color: var(--ink); line-height: 1.35; }
.ac-list li small { display: block; color: var(--muted); font-size: .8125rem; margin-top: 2px; }
.ac-list li:hover, .ac-list li[aria-selected="true"] { background: var(--bg-alt); }
.ac-list li[aria-disabled="true"] { cursor: default; color: var(--muted); }
.selected-chip { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); border: 1px solid #cfe5da; color: var(--ink); font-weight: 560; }
.verdict { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 26px; }
.verdict .big-ico .ico { width: 48px; height: 48px; }
.verdict .big-ico .ico svg { width: 24px; height: 24px; }
.verdict h2 { font-size: 1.75rem; margin-bottom: 6px; letter-spacing: -0.025em; }
.verdict p { color: var(--muted); margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; background: #fff; }
.kpi .k { font-size: .8125rem; color: var(--muted); font-weight: 520; }
.kpi .v { font-size: 1.75rem; font-weight: 680; color: var(--ink); letter-spacing: -0.03em; line-height: 1.2; margin-top: 2px; }
.kpi .v.accent { color: var(--accent-ink); }
.kpi .s { font-size: .8125rem; color: var(--faint); margin-top: 2px; }
.findings { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.findings li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
.findings .t { font-weight: 600; color: var(--ink); }
.findings .d { font-size: .9063rem; color: var(--muted); margin-top: 2px; }
.findings .a { font-weight: 620; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.blur { filter: blur(5px); user-select: none; }
.unlock { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 28px; padding: 28px; border-radius: 20px; background: var(--bg-alt); border: 1px solid var(--line); }
.unlock h3 { margin-bottom: 12px; font-size: 1.375rem; letter-spacing: -0.02em; }
.unlock ul { list-style: none; padding: 0; margin: 0; }
.unlock li { position: relative; padding-left: 28px; margin: 0 0 10px; color: var(--text); }
.unlock li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e6a4e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 18px 18px; }
.unlock .price { font-size: 2.25rem; font-weight: 680; color: var(--ink); letter-spacing: -0.035em; line-height: 1.1; }
.unlock-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.unlock-options { display: grid; gap: 10px; }
.save-box { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }
.save-box p { margin: 0; color: var(--muted); font-size: .9375rem; }

/* ---------- informe ---------- */
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; background: #fff; }
.stat .k { font-size: .8125rem; color: var(--muted); }
.stat .v { font-size: 1.625rem; font-weight: 680; letter-spacing: -0.03em; color: var(--ink); line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .v.accent { color: var(--accent-ink); }
.toc { position: sticky; top: calc(var(--nav) + 24px); }
/* Enlaces del índice lateral; los botones (.btn) conservan su estilo propio */
.toc a:not(.btn) { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: .9375rem; }
.toc a:not(.btn):hover { color: var(--ink); }
.toc .btn { width: 100%; margin-top: 4px; }

/* ---------- convenios ---------- */
.conv-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.conv-group + .conv-group { margin-top: 48px; }
.conv-group-title { font-size: 1.25rem; margin-bottom: 16px; }
.conv-group-title span { margin-left: 6px; color: var(--faint); font-weight: 500; }
.conv-card { display: block; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; color: inherit; text-decoration: none; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.conv-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.conv-card h3 { font-size: 1.0625rem; margin-bottom: 6px; line-height: 1.4; }
.conv-card .meta { font-size: .875rem; color: var(--muted); }
.search-bar { display: flex; gap: 10px; max-width: 640px; }
.search-bar input { flex: 1; }
.empty { text-align: center; padding: 56px 24px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted); background: #fff; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty .feature-icon { margin: 0 auto 16px; }

/* ---------- textos largos ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 48px 0 14px; }
.prose h3 { font-size: 1.1875rem; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { margin: 18px 0 24px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; }
.prose .note { background: var(--bg-alt); border-radius: var(--r-md); padding: 16px 18px; font-size: .9375rem; color: var(--muted); }
.legal-meta { font-size: .875rem; color: var(--muted); margin-bottom: 28px; }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.legal-nav { position: sticky; top: calc(var(--nav) + 32px); font-size: .9375rem; }
.legal-nav a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.legal-nav a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.legal-nav a[aria-current="page"] { color: var(--ink); border-left-color: var(--ink); font-weight: 560; }

/* ---------- acceso (entrar / registro) ---------- */
.auth { min-height: calc(100vh - var(--nav)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 56px var(--gut); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 2rem; letter-spacing: -0.03em; margin-bottom: 8px; }
.auth-card .lead { font-size: 1.0625rem; margin-bottom: 28px; }
.auth-card form .btn { width: 100%; }
.auth-side { position: relative; background: var(--bg-sunk); overflow: hidden; }
.auth-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-side .quote { position: absolute; left: 40px; right: 40px; bottom: 40px; background: rgba(255, 255, 255, .96); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-md); }
.auth-side .quote b { display: block; color: var(--ink); font-size: 1.0625rem; margin-bottom: 4px; }
.auth-side .quote span { color: var(--muted); font-size: .9375rem; }
.auth-foot { margin-top: 24px; font-size: .9375rem; color: var(--muted); text-align: center; }
.auth-legal { margin-top: 16px; font-size: .8125rem; color: var(--muted); line-height: 1.5; text-align: center; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font: inherit; font-size: .8125rem; font-weight: 560; padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { color: var(--ink); background: var(--bg-alt); }

/* ---------- área de cliente ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - var(--nav)); background: var(--bg-alt); }
.app-side { background: #fff; border-right: 1px solid var(--line); padding: 24px 16px; position: sticky; top: var(--nav); height: calc(100vh - var(--nav)); overflow-y: auto; display: flex; flex-direction: column; }
.app-user { display: flex; align-items: center; gap: 12px; padding: 6px 10px 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.app-user .who { min-width: 0; }
.app-user b { display: block; font-size: .9375rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-user span { display: block; font-size: .8125rem; color: var(--muted); }
.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-size: .9375rem; font-weight: 520; transition: background .15s, color .15s; }
.app-nav a svg { width: 18px; height: 18px; color: var(--faint); flex: none; transition: color .15s; }
.app-nav a:hover { background: var(--bg-alt); color: var(--ink); }
.app-nav a[aria-current="page"] { background: var(--bg-alt); color: var(--ink); font-weight: 600; }
.app-nav a[aria-current="page"] svg { color: var(--accent); }
.app-nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 620; display: grid; place-items: center; }
.app-side-foot { margin-top: auto; padding-top: 20px; }
.plan-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; background: var(--bg-alt); }
.plan-card b { display: block; color: var(--ink); font-size: .9375rem; }
.plan-card span { display: block; color: var(--muted); font-size: .8125rem; margin: 2px 0 12px; }
.plan-card .btn { width: 100%; }
.app-main { padding: 40px 48px 72px; min-width: 0; }
.app-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.app-head h1 { font-size: 2rem; letter-spacing: -0.03em; margin: 0; }
.app-head p { margin: 6px 0 0; color: var(--muted); }
.app-grid { display: grid; gap: 20px; }
.app-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.app-kpis .kpi { padding: 20px; border-radius: var(--r-lg); }
.app-kpis .kpi .v { font-size: 1.875rem; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.box-head h2 { font-size: 1.0625rem; letter-spacing: -0.01em; margin: 0; }
.box-body { padding: 22px; }
.box .table-wrap { border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.box table th:first-child, .box table td:first-child { padding-left: 22px; }
.box table th:last-child, .box table td:last-child { padding-right: 22px; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line); margin: 0; }
.list > li:first-child { border-top: 0; }
.list .t { font-weight: 560; color: var(--ink); font-size: .9688rem; }
.list .d { font-size: .8125rem; color: var(--muted); }
.deadline { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; }
.deadline .days { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 1.125rem; line-height: 1; text-align: center; }
.deadline .days small { display: block; font-size: .625rem; font-weight: 600; margin-top: 2px; }
.deadline.urgent .days { background: var(--bad-soft); color: var(--bad); }
.deadline.calm .days { background: var(--accent-soft); color: var(--accent-ink); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 18px 24px; margin: 0; background: linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 2px 100%; }
.timeline li:last-child { background: none; padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -5px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.timeline .when { font-size: .8125rem; color: var(--muted); }
.timeline .what { font-weight: 560; color: var(--ink); font-size: .9375rem; }
.timeline .note { color: var(--muted); font-size: .875rem; }
.progress { height: 8px; border-radius: 4px; background: var(--bg-sunk); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.chart { width: 100%; height: auto; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.app-mobile-nav { display: none; }

/* ---------- banner de cookies ---------- */
.cookie { position: fixed; z-index: 60; left: 20px; bottom: 20px; width: min(440px, calc(100vw - 40px)); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 22px; font-size: .9375rem; }
.cookie h4 { margin-bottom: 6px; }
.cookie p { color: var(--muted); margin-bottom: 0; font-size: .9063rem; }
.cookie .toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .875rem; }
.cookie .toggle b { display: block; color: var(--ink); }
.cookie .toggle span { color: var(--muted); }
.cookie .toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.cookie-prefs { margin-top: 12px; }

/* ---------- utilidades varias ---------- */
.topbar { display: none; }
.key { display: inline-block; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 5px; font-size: .8125rem; background: #fff; }
.no-print { }
.hide-sm { }
.photo { border-radius: var(--r-lg); overflow: hidden; background: var(--bg-sunk); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
a.photo:hover img { transform: scale(1.03); }
.split-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split-media .photo { aspect-ratio: 4 / 3; }

/* ---------- panel de administración (estructura) ---------- */
.admin-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; background: var(--bg-alt); }
.admin-nav { background: var(--ink); color: #c7cdd8; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-nav .logo { color: #fff; margin: 0 8px 22px; }
.admin-nav a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 8px; color: #c7cdd8; text-decoration: none; font-size: .9375rem; }
.admin-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-nav a.active { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.admin-nav .count { background: var(--accent); color: #fff; border-radius: 10px; font-size: .75rem; padding: 1px 8px; }
.admin-main { padding: 32px 40px 64px; min-width: 0; }
.admin-main h1 { font-size: 1.75rem; letter-spacing: -0.025em; }
.editor-table td { padding: 6px; vertical-align: middle; }
.editor-table input { min-height: 38px; padding: 6px 10px; font-size: .9375rem; }

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-main { padding: 32px 32px 64px; }
  .app-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  :root { --gut: 28px; }
  .nav-main, .nav-actions .nav-signin { display: none; }
  .menu-btn { display: grid; margin-left: 0; }
  .nav-actions { gap: 8px; }
  .mobile-sheet { position: fixed; inset: var(--nav) 0 0 0; z-index: 39; background: #fff; padding: 12px var(--gut) 32px; overflow-y: auto; display: none; }
  .mobile-sheet.open { display: block; }
  .mobile-sheet a:not(.btn) { display: flex; align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 1.125rem; font-weight: 560; }
  .mobile-sheet .btn { margin-top: 20px; width: 100%; }
  body.menu-open { overflow: hidden; }
  .hero-grid, .showcase, .split-media, .two-col { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero h1 { max-width: 16ch; }
  .tool { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tool-steps { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tool-steps li { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 6px; padding: 0; }
  .law, .steps { grid-template-columns: minmax(0, 1fr); }
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .site-footer .cols { grid-template-columns: repeat(3, 1fr); }
  .site-footer .cols > div:first-child { grid-column: 1 / -1; }
  .cta-band { grid-template-columns: minmax(0, 1fr); padding: 48px; }
  .cta-band .row { justify-content: flex-start; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .legal-nav a { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 14px; }
  .legal-nav a[aria-current="page"] { border-color: var(--ink); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-side { display: none; }
  .app-mobile-nav { display: flex; gap: 6px; overflow-x: auto; padding: 12px var(--gut); background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: var(--nav); z-index: 30; scrollbar-width: none; }
  .app-mobile-nav::-webkit-scrollbar { display: none; }
  .app-mobile-nav a { flex: none; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .9063rem; font-weight: 540; white-space: nowrap; }
  .app-mobile-nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-nav .logo { width: 100%; }
  .unlock { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --gut: 20px; --nav: 60px; }
  body { font-size: 16px; }
  .section { padding: 80px 0; }
  .section-sm { padding: 48px 0; }
  .section-head { margin-bottom: 36px; }
  .hero { padding: 40px 0 64px; }
  .hero-cta .btn { width: 100%; }
  .stage { padding: 14px; border-radius: 22px; }
  .frame-body { padding: 16px 14px 14px; }
  .result-big .v { font-size: 1.375rem; }
  .g2, .g3, .g4, .f2, .f3, .f4, .conv-list, .faq-grid, .checks { grid-template-columns: minmax(0, 1fr); }
  .check { padding-right: 0; }
  .plans, .plans.p3 { grid-template-columns: minmax(0, 1fr); }
  .sectors { grid-template-columns: minmax(0, 1fr); }
  .kpis, .app-kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .panel { padding: 22px 18px; border-radius: 20px; }
  .card { padding: 22px; }
  .cta-band { padding: 36px 24px; border-radius: 22px; }
  .cta-band .row .btn { width: 100%; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .legal-line { flex-direction: column; }
  .page-head { padding: 40px 0 28px; }
  .mock-app { grid-template-columns: minmax(0, 1fr); }
  .mock-side { display: none; }
  .app-main { padding: 24px var(--gut) 56px; }
  .app-head h1 { font-size: 1.625rem; }
  .list > li { padding: 14px 16px; flex-wrap: wrap; }
  .box-head, .box-body { padding: 16px; }
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .fact { padding: 20px 14px; }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact .k { font-size: 1.25rem; }
  .cookie { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .tool-steps .sub { display: none; }
  .search-bar { flex-direction: column; }
  .unlock { padding: 18px; }
  th, td { padding: 12px 14px; }
}
@media (max-width: 420px) {
  .site-footer .cols { grid-template-columns: minmax(0, 1fr); }
  .result-big { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .nav-actions .btn { padding: 0 14px; font-size: .9375rem; }
}

/* ---------- impresión ---------- */
@media print {
  .site-header, .site-footer, .cookie, .no-print, .app-side, .app-mobile-nav, .menu-btn { display: none !important; }
  body { font-size: 11pt; }
  .app { display: block; background: #fff; }
  .app-main { padding: 0; }
  .box, .card, .stat, .kpi { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- ajustes finos ---------- */
.check h3 { font-size: 1.0625rem; margin-bottom: 4px; letter-spacing: -0.01em; }
.consent-box { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg-alt); border: 1px solid var(--line); font-size: .9063rem; }
.consent-box a { white-space: nowrap; }
.panel.center .ico svg, .ico[style*="56px"] svg { width: 26px; height: 26px; }
.plan form { margin: 0; }
.plan form .checkbox { color: var(--muted); line-height: 1.45; }
.plan form .checkbox a { color: inherit; }
.box-head .row { flex-wrap: nowrap; }
.legal-meta { margin-bottom: 20px; }
.prose th[scope="row"] { white-space: nowrap; color: var(--ink); background: #fbfbf9; }
.stack > .card h3 { display: flex; align-items: center; gap: 8px; }
@media (max-width: 520px) {
  .hide-xs { display: none; }
  .account-link { padding: 3px; }
}
.result-big .v, .kpi .v, .stat .v, .mini-result .v, .mock-kpis .v { white-space: nowrap; }
.result-big .v { font-size: clamp(1.25rem, 2.1vw, 1.75rem); }

/* Etiqueta de imagen generada con IA (Reglamento de IA, art. 50.4) */
.ph, .photo, .auth-side { position: relative; }
.ai-tag { position: absolute; z-index: 2; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: var(--r-pill); background: rgba(12, 20, 36, .72); color: #fff; font-size: .75rem; font-weight: 560; line-height: 1.4; pointer-events: none; }
.auth-side .ai-tag { top: 16px; bottom: auto; left: 16px; }
