:root {
  --page: #f7f7f4; --surface: #ffffff; --surface-2: #f1f0ec; --ink: #0b0b0b; --ink-2: #52514e; --muted: #898781;
  --border: rgba(11,11,11,.10); --accent: #1c5cab; --accent-2: #2a78d6; --accent-bg: #eaf2fc;
  --good: #0a7d0a; --bad: #c43535; --warn-bg: #fff4dc;
  --radius: 12px;
  --grid: #e1e0d9; --axis: #c3c2b7;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --st-good: #0ca30c; --st-warn: #fab219; --st-bad: #d03b3b;
  --st-good-bg: #e7f6e7; --st-warn-bg: #fff4dc; --st-bad-bg: #fbe9e9;
}

/* ---------- página privada (acceso) ---------- */
.app { font-size: 14px; line-height: 1.45; }
.app h1 { font-size: 26px; margin: 0 0 4px; line-height: 1.2; }
.app h2 { font-size: 15px; margin: 0 0 10px; }
.app .card { padding: 16px; }
.app .sub { color: var(--ink-2); }
.app .muted { color: var(--muted); }
.app .grid { display: grid; gap: 14px; }
.app .charts { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); margin-bottom: 14px; }
@media (max-width: 600px) { .app .charts { grid-template-columns: 1fr; } }
.app .chart { position: relative; }
.app .chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.app .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.app .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.app .tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.15); white-space: nowrap; z-index: 5; display: none; }
.app .tip b { display: block; margin-bottom: 3px; }
.app .tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.app .tablewrap { overflow: auto; max-width: 100%; }
.app table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.app th, .app td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.app th:first-child, .app td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.app thead th { color: var(--ink-2); font-weight: 600; font-size: 12px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.app thead th:first-child { z-index: 3; }
.app tr.tot td { font-weight: 650; }
.app tr.sec td { background: var(--surface-2); font-weight: 700; color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.app td.name { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.app table.sticky-foot tfoot td { background: var(--surface-2); }
.app table.sticky-foot tfoot tr.stick td { position: sticky; bottom: 0; z-index: 2; }
.app table.sticky-foot tfoot tr.stick td:first-child { z-index: 3; }
.app .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
.app .pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--ink-2); }
.app .up { color: var(--good); } .app .down { color: var(--bad); }
.app .stat { font-size: 12px; white-space: nowrap; }
.app .loading { color: var(--muted); padding: 40px; text-align: center; }
.app .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 18px 0 14px; overflow-x: auto; scrollbar-width: none; }
.app .tabs a { padding: 10px 16px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; font-size: 15px; }
.app .tabs a:hover { color: var(--ink); }
.app .tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 650; }
.app .seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.app .seg button { font: inherit; border: 0; padding: 6px 11px; font-size: 12.5px; color: var(--ink-2); background: var(--surface); cursor: pointer; }
.app .seg button + button { border-left: 1px solid var(--border); }
.app .seg button.on { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.app .cbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 56px; gap: 8px; align-items: center; font-size: 12px; padding: 3px 0; }
.app .cbar .cl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .cbar .ct { height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.app .cbar .ct i { display: block; height: 100%; background: var(--s1); border-radius: 4px; }
.app .cbar .cv { text-align: right; font-variant-numeric: tabular-nums; }
.app .scores { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 16px; }
.app .score { border-left: 5px solid var(--axis); }
.app .score.good { border-left-color: var(--st-good); background: var(--st-good-bg); }
.app .score.warn { border-left-color: var(--st-warn); background: var(--st-warn-bg); }
.app .score.bad { border-left-color: var(--st-bad); background: var(--st-bad-bg); }
.app .score .lbl { color: var(--ink-2); font-size: 12px; }
.app .score .sv { font-size: 28px; font-weight: 700; margin: 2px 0 8px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.app .score .sb { font-size: 13px; font-weight: 650; }
.app .score.good .sb { color: var(--good); } .app .score.bad .sb { color: var(--bad); }
.app .shist { display: flex; gap: 6px; flex-wrap: wrap; }
.app .sh { font-size: 11px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; border-bottom: 3px solid var(--axis); }
.app .sh b { margin-left: 4px; color: var(--ink); }
.app .sh.good { border-bottom-color: var(--st-good); } .app .sh.warn { border-bottom-color: var(--st-warn); } .app .sh.bad { border-bottom-color: var(--st-bad); }
.app select { width: auto; min-width: 240px; padding: 8px 10px; }
.access-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--accent-bg); border: 1px solid rgba(28,92,171,.18); border-radius: 12px; padding: 12px 16px; margin: 20px 0 16px; font-size: 14px; }
.access-bar .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.access-bar .btn { padding: 9px 14px; font-size: 14px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { font-weight: 800; letter-spacing: .04em; color: var(--ink); text-decoration: none; font-size: 20px; white-space: nowrap; }
.logo span { font-weight: 400; color: var(--muted); letter-spacing: 0; font-size: 14px; margin-left: 6px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.top .search { margin-left: auto; width: 340px; }
@media (max-width: 860px) { .nav { display: none; } .top .search { width: auto; flex: 1; } .logo span { display: none; } }

/* search */
.search { position: relative; }
.search input { width: 100%; font: inherit; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); }
.search input:focus { outline: 2px solid var(--accent-2); outline-offset: 0; border-color: transparent; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.12); max-height: 420px; overflow: auto; z-index: 30; }
.sugg a { display: block; padding: 10px 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border); }
.sugg a:hover, .sugg a.act { background: var(--accent-bg); }
.sugg small { display: block; color: var(--muted); font-size: 12.5px; }
.search.big input { padding: 16px 18px; font-size: 18px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }

/* hero */
.hero { background: linear-gradient(180deg, #fff 0%, var(--page) 100%); padding: 64px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.15; margin: 0 auto 14px; max-width: 820px; letter-spacing: -.01em; }
.hero p.lead { color: var(--ink-2); font-size: 18px; max-width: 680px; margin: 0 auto 26px; }
.hero .search { max-width: 640px; margin: 0 auto; text-align: left; }
.hero .stats { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-top: 22px; color: var(--ink-2); font-size: 14px; }
.hero .stats b { color: var(--ink); font-size: 18px; display: block; }

section { padding: 40px 0; }
h2.sec { font-size: 26px; margin: 0 0 6px; text-align: center; }
p.sec { color: var(--ink-2); text-align: center; margin: 0 auto 26px; max-width: 640px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.product h3 { margin: 0 0 4px; font-size: 21px; }
.product .price { font-size: 32px; font-weight: 800; margin: 10px 0 2px; }
.product .price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.product ul, .includes { padding: 0; margin: 14px 0 18px; list-style: none; }
.product li, .includes li { padding: 6px 0 6px 28px; position: relative; color: var(--ink-2); }
.product li::before, .includes li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 12px; height: 7px;
  border-left: 2.5px solid var(--good); border-bottom: 2.5px solid var(--good); transform: rotate(-45deg); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-bg); padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase; }
.steps .n { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.steps h3 { margin: 0 0 4px; font-size: 17px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; padding: 12px 20px;
  border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: #164c8f; }
.btn.ghost { background: var(--surface); color: var(--accent); border-color: var(--border); }
.btn.ghost:hover { background: var(--accent-bg); }
.btn.block { width: 100%; }
label.f { display: block; font-size: 14px; color: var(--ink-2); margin: 12px 0 4px; }
input[type=email], input[type=text], select, textarea { width: 100%; font: inherit; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); }
textarea { resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); margin: 12px 0 14px; }
.check input { margin-top: 3px; }
.note { font-size: 13px; color: var(--muted); }
.alert { background: var(--warn-bg); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 12px 0; }

/* empresa */
.crumbs { font-size: 13.5px; color: var(--muted); margin: 22px 0 8px; }
.crumbs a { color: var(--ink-2); }
.emp-head h1 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; margin: 0 0 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-2); font-size: 15px; }
.meta b { color: var(--ink); }
.years { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.years span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.layout { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; margin: 22px 0 40px; }
.buy { position: sticky; top: 84px; }
@media (max-width: 920px) { .layout { grid-template-columns: 1fr; } .buy { position: static; } }
.locked { position: relative; overflow: hidden; }
.locked .blur { filter: blur(6px); user-select: none; pointer-events: none; opacity: .9; }
.locked .over { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(255,255,255,.25), rgba(255,255,255,.75)); }
.locked .over div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.08); max-width: 320px; }
.locked .over b { display: block; font-size: 16px; margin-bottom: 2px; }
.locked .over span { color: var(--ink-2); font-size: 14px; }
.lock-ico { width: 22px; height: 22px; margin: 0 auto 6px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.t th, table.t td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t thead th { color: var(--ink-2); font-size: 12.5px; }
.tw { overflow-x: auto; }
table.ficha td { text-align: left; white-space: normal; }
table.ficha td:first-child { color: var(--ink-2); width: 42%; }
.resumen li { color: var(--ink); }
.sample { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sample img { border: 1px solid var(--border); border-radius: 8px; background: #fff; }
@media (max-width: 700px) { .sample { grid-template-columns: 1fr; } }
.fake-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding: 10px 6px 0; border-bottom: 1px solid var(--border); }
.fake-chart i { flex: 1; background: var(--accent-2); border-radius: 4px 4px 0 0; }
.fake-chart i:nth-child(even) { background: #eb6834; }

/* listas */
.list { columns: 2 320px; column-gap: 28px; padding: 0; list-style: none; }
.list li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.list li small { color: var(--muted); display: block; font-size: 12.5px; }
.status { text-align: center; padding: 56px 16px; }
.status h1 { font-size: 30px; margin: 10px 0; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--accent-bg); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.legal { max-width: 820px; margin: 30px auto 60px; }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 19px; margin-top: 28px; }

/* footer */
footer { border-top: 1px solid var(--border); background: var(--surface); padding: 28px 0; color: var(--ink-2); font-size: 14px; margin-top: 30px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--ink-2); margin-right: 16px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 600; }
details p { color: var(--ink-2); margin: 8px 0 0; }
