/*
 * Tienda Admiral One (demo en HTML + JS). Estilos propios de esta carpeta: no depende de
 * nada del sitio. Colores del tema «dw» de admiralone.cl en su variante sobria.
 */

@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/albert-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/albert-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --night: #001133;
  --navy: #1d2f74;
  --ink: #0d1c77;
  --text: #001133;
  --muted: #52617a;
  --accent: #3a4ef2;
  --select: #1d2f74;
  --select-soft: #eef0f8;
  --sky: #38bdf8;
  --page: #f8f9ff;
  --soft: #ebedff;
  --line: #e3e6f8;
  --line-2: #c9cfdf;
  --surface: #ffffff;
  --ok: #0f7b4f;
  --ok-soft: #e3f6ec;
  --warn: #8a5a00;
  --warn-bar: #d99a00;
  --warn-soft: #fff3d6;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --r-btn: 8px;
  --r-input: 10px;
  --r-card: 16px;
  --r-panel: 18px;
  --shadow-card: 0 2px 8px rgba(13, 28, 119, 0.06);
  --shadow-raised: 0 12px 30px -12px rgba(13, 28, 119, 0.2);
  --font: "Albert Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
p { margin: 0; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { display: inline-block; vertical-align: -0.15em; flex-shrink: 0; max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.xs { font-size: 0.75rem; }
.ok { color: var(--ok); }
.danger { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.stack { display: grid; gap: 1rem; }
.stack-sm { display: grid; gap: 0.5rem; }
.stack-lg { display: grid; gap: 1.5rem; }
.row { display: flex; align-items: center; gap: 0.75rem; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.hidden { display: none !important; }

/* ── Aviso de demo ─────────────────────────────────────────────────────── */
.demo-bar {
  background: repeating-linear-gradient(-45deg, #fff3d6, #fff3d6 12px, #ffecbf 12px, #ffecbf 24px);
  color: var(--warn);
  font-size: 0.8125rem;
  text-align: center;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid #f1d58f;
}
.demo-bar strong { font-family: var(--mono); letter-spacing: 0.08em; }
.demo-bar button { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font-weight: 600; }

/* ── Encabezado, navegación y pie ──────────────────────────────────────── */
.site-header { background: var(--night); color: #fff; }
.site-header .inner { max-width: 72rem; margin: 0 auto; padding: 0.9rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: #fff; text-decoration: none; }
.brand img { height: 26px; width: auto; }
.brand span { padding-left: 0.75rem; border-left: 1px solid rgba(255, 255, 255, 0.25); font-weight: 600; font-size: 0.95rem; }
.header-actions { display: flex; align-items: center; gap: 1rem; font-size: 0.875rem; }
.header-actions a, .header-actions button { color: rgba(255, 255, 255, 0.8); text-decoration: none; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0; }
.header-actions a:hover, .header-actions button:hover { color: #fff; }
.header-user { color: rgba(255, 255, 255, 0.7); }
@media (max-width: 640px) { .header-user, .hide-sm { display: none; } }

.nav { background: var(--night); border-top: 1px solid rgba(255, 255, 255, 0.08); }
.nav .inner { max-width: 72rem; margin: 0 auto; padding: 0 1rem; display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.nav a { color: rgba(255, 255, 255, 0.72); text-decoration: none; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.7rem 0.75rem; font-size: 0.9rem; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--sky); }
.nav .balance { margin-left: auto; color: #fff; font-weight: 600; padding: 0.7rem 0.25rem; white-space: nowrap; font-size: 0.9rem; }
@media (max-width: 640px) { .nav .balance { display: none; } }

main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
.site-footer { background: var(--night); color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; }
.site-footer .inner { max-width: 72rem; margin: 0 auto; padding: 1.4rem 1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: rgba(255, 255, 255, 0.75); text-decoration: none; margin-left: 1rem; }

/* ── Piezas ─────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 1.25rem; }
@media (min-width: 768px) { .card { padding: 1.5rem; } }
.eyebrow { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.page-head { margin-bottom: 1.5rem; }
.page-head p { margin-top: 0.4rem; color: var(--muted); max-width: 42rem; }
.back { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; text-decoration: none; margin-bottom: 1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.5rem; padding: 0.5rem 1rem; border-radius: var(--r-btn); border: 1px solid transparent; font-weight: 600; font-size: 0.9375rem; text-decoration: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--night); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-secondary:not(:disabled):hover { border-color: var(--line-2); background: var(--page); }
.btn-ghost { background: none; color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn-block { width: 100%; }
.btn-lg { padding: 0.8rem 1rem; }
.btn .spinner { width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--accent); font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.875rem; font-weight: 600; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field .hint { font-size: 0.8125rem; color: var(--muted); }
.control { display: block; width: 100%; border: 1px solid var(--line); border-radius: var(--r-input); background: var(--surface); padding: 0.55rem 0.75rem; }
.control::placeholder { color: rgba(82, 97, 122, 0.7); }
.control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 78, 242, 0.15); }
.control[aria-invalid="true"] { border-color: var(--danger); }
textarea.control { resize: vertical; }
.code-input { text-align: center; font-family: var(--mono); font-size: 1.6rem; letter-spacing: 0.4em; padding: 0.6rem 0.5rem; }

.note { display: flex; gap: 0.6rem; align-items: flex-start; border: 1px solid; border-radius: var(--r-input); padding: 0.65rem 0.9rem; font-size: 0.875rem; }
.note svg { flex-shrink: 0; margin-top: 2px; width: 16px; height: 16px; }
.note-ok { border-color: rgba(15, 123, 79, 0.3); background: var(--ok-soft); color: var(--ok); }
.note-warn { border-color: rgba(138, 90, 0, 0.3); background: var(--warn-soft); color: var(--warn); }
.note-danger { border-color: rgba(180, 35, 24, 0.3); background: var(--danger-soft); color: var(--danger); }
.note-info { border-color: rgba(58, 78, 242, 0.25); background: var(--soft); color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--soft); color: var(--accent); }
.badge-neutral { background: var(--page); color: var(--muted); }

.progress { display: flex; height: 8px; width: 100%; overflow: hidden; border-radius: 999px; background: var(--line); }
.progress span { display: block; height: 100%; transition: width 0.4s; }
.progress .done { background: var(--ok); }
.progress .failed { background: var(--danger); }

.empty { text-align: center; padding: 2rem 1rem; border: 1px dashed var(--line-2); border-radius: var(--r-card); background: var(--surface); }
.empty p:first-child { font-weight: 600; color: var(--ink); }
.empty p + p { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.loading { display: grid; place-items: center; padding: 3rem 0; color: var(--muted); }
.loading .spinner { width: 1.5rem; height: 1.5rem; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 1rem; font-size: 0.875rem; color: var(--muted); }

dl { margin: 0; }
dd { margin: 0; }
.summary { display: grid; gap: 0.6rem; font-size: 0.9rem; }
.summary > div { display: flex; justify-content: space-between; gap: 0.75rem; }
.summary dt { color: var(--muted); }
.summary .total { border-top: 1px solid var(--line); padding-top: 0.6rem; font-weight: 600; font-size: 1rem; }
.summary .total dt { color: var(--text); }
.summary .discount, .summary .discount dt { color: var(--ok); }

/* ── Acceso ─────────────────────────────────────────────────────────────── */
.access { display: grid; gap: 2.5rem; align-items: start; padding-top: 0.5rem; }
@media (min-width: 900px) { .access { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); padding-top: 2rem; } }
.access .aside { display: none; }
@media (min-width: 900px) { .access .aside { display: block; } }
.access .form-card { padding: 1.5rem; }
@media (min-width: 768px) { .access .form-card { padding: 2rem; } }
.form-title { margin-bottom: 1.25rem; }
.form-title h2 { font-size: 1.5rem; }
.form-title p { margin-top: 0.4rem; color: var(--muted); }
.pitch h1 { font-size: 2.4rem; margin-top: 0.75rem; max-width: 32rem; }
.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.85rem; max-width: 32rem; }
.steps li { display: flex; gap: 0.9rem; }
.steps .n { flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--night); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 0.875rem; }
.steps .icon { flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: var(--r-input); border: 1px solid var(--line); background: var(--surface); color: var(--navy); display: grid; place-items: center; }
.steps p:first-child { font-weight: 600; color: var(--ink); }
.steps p + p { font-size: 0.875rem; color: var(--muted); }
.divider-top { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }

/* ── Cupón: vale impreso ────────────────────────────────────────────────── */
.ticket { position: relative; display: flex; overflow: hidden; border-radius: 14px; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 1px 2px rgba(0, 17, 51, 0.06); color: var(--text); }
.ticket .stub { flex-shrink: 0; width: 5.25rem; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.45rem; padding: 1rem 0.5rem; }
.ticket .stub svg { width: 22px; height: 22px; opacity: 0.9; }
.ticket .stub span { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.ticket .perf { position: relative; width: 0; }
.ticket .perf::before, .ticket .perf::after { content: ""; position: absolute; left: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--notch, var(--page)); border: 1px solid var(--line-2); z-index: 1; }
.ticket .perf::before { top: -10px; }
.ticket .perf::after { bottom: -10px; }
.ticket .perf i { position: absolute; top: 12px; bottom: 12px; left: -1px; border-left: 2px dotted var(--line-2); }
.ticket .body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.2rem; padding: 0.9rem 1.1rem 0.95rem 1.25rem; }
.ticket .t-kicker { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ticket .title { font-size: 1.15rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.ticket .title span { font-weight: 500; color: var(--ok); }
.ticket .value { font-size: 0.82rem; color: var(--muted); }
.ticket .value s { text-decoration-thickness: 1px; }
.ticket .value b { color: var(--text); }
.ticket .code-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.ticket .t-label { font-size: 0.7rem; color: var(--muted); }
.ticket .code { font-family: var(--mono); font-weight: 700; letter-spacing: 0.18em; font-size: 0.85rem; color: var(--navy); border: 1px dashed var(--navy); border-radius: 6px; padding: 0.05rem 0.55rem; background: var(--select-soft); }

/* ── Saldo ──────────────────────────────────────────────────────────────── */
.home-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); } }
.balance-card { position: relative; overflow: hidden; border-radius: var(--r-panel); background: var(--night); color: #fff; padding: 1.6rem; box-shadow: var(--shadow-raised); }
.balance-card > * { position: relative; }
.balance-card .amount { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 0.25rem; }
@media (min-width: 768px) { .balance-card { padding: 2rem; } .balance-card .amount { font-size: 3rem; } }
.balance-card .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn-white { background: #fff; color: var(--night); }
.btn-white:hover { background: #e8ecf6; }
.btn-outline-white { border-color: rgba(255, 255, 255, 0.35); color: #fff; background: none; }
.btn-outline-white:hover { background: rgba(255, 255, 255, 0.1); }
.list { list-style: none; margin: 0; padding: 0; }
.list-divided > li + li { border-top: 1px solid var(--line); }
.movement { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0; }
.movement .what { min-width: 0; }
.movement .what p:first-child { font-weight: 500; }
.movement .what p + p { font-size: 0.875rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movement .amount { text-align: right; flex-shrink: 0; }
.movement .amount p:first-child { font-weight: 600; }
.movement .amount p + p { font-size: 0.75rem; color: var(--muted); }
.order-link { display: block; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: var(--r-input); padding: 0.85rem 1rem; }
.order-link:hover { border-color: var(--line-2); background: var(--page); }
.order-link + .order-link { margin-top: 0.75rem; }

/* ── Compra ─────────────────────────────────────────────────────────────── */
.buy-grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1024px) { .buy-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); } .buy-grid aside { position: sticky; top: 1.5rem; } }
.product-option { display: flex; gap: 0.75rem; border: 1px solid var(--line); border-radius: var(--r-card); padding: 1rem; cursor: pointer; background: var(--surface); }
.product-option.selected { border-color: var(--select); background: var(--select-soft); box-shadow: inset 0 0 0 1px var(--select); }
.product-option input { accent-color: var(--accent); margin-top: 0.25rem; }
.counts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.875rem; }
.counts span { display: inline-flex; align-items: center; gap: 0.35rem; }
.counts svg { width: 16px; height: 16px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.coupon-entry { display: flex; gap: 0.5rem; }
.coupon-entry .control { text-transform: uppercase; }

/* ── Órdenes ────────────────────────────────────────────────────────────── */
.order-row { display: grid; gap: 0.6rem; padding: 1rem 0; }
.order-row a { text-decoration: none; color: inherit; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; font-size: 0.875rem; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats dt { color: var(--muted); }
.stats dd { font-size: 1.15rem; font-weight: 600; }
.stats dd + dd { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.live { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.25rem; font-size: 0.875rem; color: var(--muted); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; background: var(--page); border-radius: var(--r-input); padding: 0.25rem; width: fit-content; }
.tabs button { border: 0; background: none; padding: 0.35rem 0.8rem; border-radius: var(--r-btn); cursor: pointer; font-size: 0.875rem; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); font-weight: 600; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.85rem 0; flex-wrap: wrap; }
.item .rut { font-family: var(--mono); font-weight: 600; }
.item .why { font-size: 0.8rem; color: var(--muted); }

/* ── Recarga y pasarela simulada ───────────────────────────────────────── */
.amounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
@media (min-width: 640px) { .amounts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.amounts button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-input); padding: 0.75rem; font-weight: 600; cursor: pointer; }
.amounts button[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); color: var(--ink); box-shadow: 0 0 0 3px rgba(58, 78, 242, 0.15); }
.gateway { max-width: 28rem; margin: 1rem auto; }
.gateway .head { background: #2b2b2b; color: #fff; border-radius: var(--r-card) var(--r-card) 0 0; padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; }
.gateway .card { border-radius: 0 0 var(--r-card) var(--r-card); }
.result-icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; }
.result-icon svg { width: 28px; height: 28px; }

/* ── Informe DDQ de ejemplo ────────────────────────────────────────────── */
.ddq { color: var(--text); overflow: hidden; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-raised); margin: 0; }
.ddq .cover { position: relative; background: var(--night); color: #fff; padding: 1.25rem; overflow: hidden; }
.ddq .cover > * { position: relative; }
.ddq .kicker { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sky); }
.ddq .name { font-size: 1.15rem; font-weight: 600; margin-top: 0.35rem; }
.ddq .sub { font-size: 0.875rem; color: rgba(255, 255, 255, 0.7); }
.ddq .pdf-tag { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.06em; background: rgba(255, 255, 255, 0.1); border-radius: var(--r-btn); padding: 0.25rem 0.5rem; color: rgba(255, 255, 255, 0.8); }
.ddq .content { display: grid; gap: 1.25rem; padding: 1.25rem; }
.ddq .label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-top: 0.6rem; }
.meter div > span { display: block; height: 8px; border-radius: 999px; background: var(--line); }
.meter p { font-size: 0.7rem; color: var(--muted); margin-top: 0.25rem; }
.meter .on-bajo > span { background: var(--ok); }
.meter .on-monitoreo > span { background: var(--warn-bar); }
.meter .on-alto > span { background: var(--danger); }
.meter .on-bajo p { color: var(--ok); font-weight: 600; }
.meter .on-monitoreo p { color: var(--warn); font-weight: 600; }
.meter .on-alto p { color: var(--danger); font-weight: 600; }
.band { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.band::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.band-bajo { color: var(--ok); background: var(--ok-soft); }
.band-bajo::before { background: var(--ok); }
.band-monitoreo { color: var(--warn); background: var(--warn-soft); }
.band-monitoreo::before { background: var(--warn-bar); }
.band-alto { color: var(--danger); background: var(--danger-soft); }
.band-alto::before { background: var(--danger); }
.malla { margin-top: 0.5rem; border-radius: var(--r-input); background: var(--page); padding: 0.5rem; }
.factors { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.5rem; }
.factors li { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; border: 1px solid var(--line); border-radius: var(--r-input); padding: 0.6rem 0.75rem; }
.factors li p:first-child { font-size: 0.875rem; font-weight: 500; }
.factors li p + p { font-size: 0.75rem; color: var(--muted); }
.ai { border-left: 3px solid var(--navy); background: var(--select-soft); color: var(--ink); border-radius: var(--r-input); padding: 0.75rem 1rem; font-size: 0.875rem; margin: 0; }
.ai .label { color: var(--navy); margin-bottom: 0.25rem; }
.ddq figcaption { border-top: 1px solid var(--line); background: var(--page); padding: 0.6rem 1.25rem; font-size: 0.75rem; color: var(--muted); }

/* ── Ventana emergente ─────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); background: var(--night); color: #fff; padding: 0.7rem 1rem; border-radius: var(--r-input); box-shadow: var(--shadow-raised); font-size: 0.9rem; z-index: 50; max-width: calc(100% - 2rem); }

/* ── Informe completo (pantalla final e informe.html) ─────────────────── */
.sheet { position: relative; max-width: 52rem; margin: 0 auto; background: #fff; box-shadow: var(--shadow-raised); border-radius: 6px; overflow: hidden; }
.sheet::after { content: "DEMO"; position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); font-size: 9rem; font-weight: 700; letter-spacing: 0.15em; color: rgba(13, 28, 119, 0.04); pointer-events: none; }
/* Un informe real (tienda conectada a la API) no lleva la marca de agua. */
.sheet.is-real::after { content: none; }
.r-cover { position: relative; background: var(--night); color: #fff; padding: 2rem 2.25rem; overflow: hidden; }
.r-cover > * { position: relative; }
.r-cover img { height: 26px; width: auto; }
.r-cover h1 { color: #fff; font-size: 1.9rem; margin-top: 1.75rem; }
.r-cover .meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin-top: 1.5rem; font-size: 0.85rem; }
.r-cover .meta dt { color: rgba(255,255,255,.6); font-size: 0.7rem; letter-spacing: .14em; text-transform: uppercase; }
.r-cover .meta dd { font-weight: 600; margin-top: .15rem; }
.r-body { padding: 1.75rem 2.25rem 2.25rem; display: grid; gap: 2rem; }
.r-sec h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; padding-bottom: .5rem; border-bottom: 2px solid var(--soft); margin-bottom: .9rem; }
.r-sec h2 span { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--night); color: #fff; font-size: .75rem; }
.sheet table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.sheet th { text-align: left; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: .5rem .6rem; background: var(--page); }
.sheet td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem 1.5rem; font-size: .9rem; }
.kv dt { color: var(--muted); font-size: .8rem; }
.kv dd { font-weight: 500; }
.legal { font-size: .75rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }
@media (max-width: 640px) { .r-cover, .r-body { padding-left: 1.25rem; padding-right: 1.25rem; } .sheet { margin: 0; border-radius: 0; } }

/* ── Portada pública (promo ETM) ──────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: var(--night); color: #fff; }
.hero .inner { position: relative; max-width: 72rem; margin: 0 auto; padding: 2.5rem 1rem 3rem; display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .hero .inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 4rem 1rem 4.5rem; } }
.hero .tag { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--sky); }
.hero h1 { color: #fff; font-size: 2.2rem; margin-top: 1rem; letter-spacing: -0.02em; }
@media (min-width: 768px) { .hero h1 { font-size: 3.1rem; } }
.hero h1 em { font-style: normal; color: var(--sky); }
.hero .lead { margin-top: 1rem; color: rgba(255, 255, 255, 0.78); font-size: 1.05rem; max-width: 34rem; }
.hero .price { display: flex; align-items: baseline; gap: 0.75rem; margin-top: 1.5rem; }
.hero .price s { color: rgba(255, 255, 255, 0.55); font-size: 1.15rem; }
.hero .price b { font-size: 2.2rem; }
.hero .price span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn-cta { background: #fff; color: var(--night); padding: 0.85rem 1.4rem; font-size: 1rem; }
.btn-cta:hover { background: #e8ecf6; }
.hero .visual { position: relative; }
.hero .visual .ddq { transform: none; }
.hero .visual .ticket { position: absolute; left: -0.75rem; bottom: -1.25rem; width: min(22rem, 90%); transform: none; }
@media (max-width: 899px) { .hero .visual .ticket { position: relative; left: 0; bottom: 0; transform: none; width: 100%; margin-top: 1rem; } .hero .visual .ddq { transform: none; } }
.section { max-width: 72rem; margin: 0 auto; padding: 3rem 1rem 0; }
.section h2.big { font-size: 1.6rem; }
.section > p.lead { color: var(--muted); margin-top: 0.4rem; max-width: 40rem; }
.features { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.25rem; box-shadow: var(--shadow-card); }
.feature .ic { width: 2.5rem; height: 2.5rem; border-radius: var(--r-input); background: var(--select-soft); color: var(--navy); display: grid; place-items: center; }
.feature h3 { font-size: 1rem; margin-top: 0.85rem; }
.feature p { font-size: 0.875rem; color: var(--muted); margin-top: 0.3rem; }
.howto { counter-reset: step; display: grid; gap: 1rem; margin-top: 1.5rem; list-style: none; padding: 0; }
@media (min-width: 768px) { .howto { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.howto li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.25rem 1.25rem 1.25rem 3.75rem; }
.howto li::before { counter-increment: step; content: counter(step); position: absolute; left: 1.1rem; top: 1.2rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--night); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 0.85rem; }
.howto b { color: var(--ink); display: block; }
.howto span { font-size: 0.85rem; color: var(--muted); }
.final-cta { margin: 3rem auto 0; max-width: 72rem; padding: 0 1rem 1rem; }
.final-cta .box { border-radius: var(--r-panel); background: var(--navy); color: #fff; padding: 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.final-cta h2 { color: #fff; font-size: 1.4rem; }
.final-cta p { color: rgba(255, 255, 255, 0.8); }
main.flush { max-width: none; padding: 0 0 3rem; }

/* ── Carrito ──────────────────────────────────────────────────────────── */
.cart-icon { position: relative; }
.cart-icon .count { position: absolute; top: -6px; right: -8px; background: var(--sky); color: var(--night); border-radius: 999px; font-size: 0.65rem; font-weight: 700; min-width: 1rem; height: 1rem; display: grid; place-items: center; padding: 0 0.25rem; }
.cart-line { display: flex; gap: 1rem; align-items: center; }
.cart-line .thumb { flex-shrink: 0; width: 4rem; height: 5rem; border-radius: var(--r-input); background: var(--night); position: relative; overflow: hidden; display: grid; place-items: center; color: var(--sky); }
.cart-line .thumb svg { position: relative; }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .info p:first-child { font-weight: 600; color: var(--ink); }

/* ── Pasos de la compra ───────────────────────────────────────────────── */
.checkout { max-width: 34rem; margin: 0 auto; }
.stepper { display: flex; gap: 0.35rem; margin-bottom: 1.5rem; }
.stepper span { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.stepper span.done { background: var(--select); }
.stepper span.now { background: var(--select); opacity: 0.45; }
.step-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.4rem; }
.mini-cart { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; background: var(--soft); border: 1px solid rgba(58, 78, 242, 0.2); border-radius: var(--r-input); padding: 0.6rem 0.85rem; font-size: 0.875rem; margin-bottom: 1.25rem; color: var(--ink); }
.choices { display: grid; gap: 0.75rem; }
@media (min-width: 480px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: grid; gap: 0.35rem; border: 1px solid var(--line); border-radius: var(--r-card); padding: 1rem; cursor: pointer; background: var(--surface); }
.choice:hover { border-color: var(--line-2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .ic { width: 2.4rem; height: 2.4rem; border-radius: var(--r-input); background: var(--page); color: var(--navy); display: grid; place-items: center; }
.choice b { color: var(--ink); }
.choice span { font-size: 0.8125rem; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--select); background: var(--select-soft); box-shadow: inset 0 0 0 1px var(--select); }
.choice:has(input:checked) .ic { background: var(--select); color: #fff; }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.review { display: grid; gap: 0.75rem; }
.review > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
.review dt { color: var(--muted); }
.review dd { text-align: right; font-weight: 500; }
.review .grand { border: 0; padding: 0; font-size: 1.05rem; font-weight: 600; }
.review .grand dt { color: var(--text); }

/* ── Generando el informe ─────────────────────────────────────────────── */
.generating { max-width: 34rem; margin: 0 auto; text-align: center; }
.orb { width: 3.5rem; height: 3.5rem; margin: 0 auto 1.25rem; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--navy); animation: spin 0.9s linear infinite; }
.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.6rem; text-align: left; }
.checklist li { display: flex; align-items: center; gap: 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input); padding: 0.7rem 0.9rem; font-size: 0.9rem; color: var(--muted); transition: color 0.3s, border-color 0.3s; }
.checklist li .dot { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex-shrink: 0; }
.checklist li.done { color: var(--text); border-color: rgba(15, 123, 79, 0.25); }
.checklist li.done .dot { border-color: var(--ok); background: var(--ok); color: #fff; }
.checklist li.now .dot { border-color: var(--accent); border-right-color: transparent; animation: spin 0.8s linear infinite; }
.success-head { max-width: 52rem; margin: 0 auto 1.5rem; display: grid; gap: 1rem; }
.success-head .banner { display: flex; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid rgba(15, 123, 79, 0.25); border-radius: var(--r-card); padding: 1rem 1.25rem; box-shadow: var(--shadow-card); }
.success-head .banner .ic { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex-shrink: 0; }
.success-head .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.after-report { max-width: 52rem; margin: 1.5rem auto 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }

/* ── Banca digital: detalles de uso ───────────────────────────────────── */
.btn { transition: background-color 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s; }
.btn:not(:disabled):active { transform: scale(0.98); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main { animation: fade-in 0.25s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.toast { display: flex; align-items: center; gap: 0.5rem; animation: toast-in 0.25s ease-out; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34d399; flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
body.no-scroll { overflow: hidden; }

.avatar { width: 2rem; height: 2rem; border-radius: 50%; display: inline-grid !important; place-items: center; background: var(--navy); color: #fff !important; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.02em; text-decoration: none; }
.avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; flex-shrink: 0; }
.greeting { display: flex; align-items: center; gap: 0.9rem; }
.greeting h1 { font-size: 1.6rem; }

.balance-card .eye { background: rgba(255, 255, 255, 0.1); border: 0; color: #fff; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.balance-card .eye:hover { background: rgba(255, 255, 255, 0.18); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-top: 1.5rem; }
.quick a { display: grid; justify-items: center; gap: 0.4rem; color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 0.8rem; font-weight: 500; }
.quick a span { width: 3rem; height: 3rem; border-radius: 1rem; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14); transition: background 0.15s; }
.quick a:hover span { background: rgba(255, 255, 255, 0.2); }

/* Pestañas abajo (teléfono) */
.tabbar { display: none; }
@media (max-width: 767px) {
  .nav { display: none; }
  body.has-tabbar { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-top: 1px solid var(--line); padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 0.15rem; padding: 0.35rem 0; color: var(--muted); text-decoration: none; font-size: 0.68rem; font-weight: 500; border-radius: var(--r-input); }
  .tabbar a[aria-current="page"] { color: var(--navy); font-weight: 700; }
}

/* Compra */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; padding: 0.3rem; background: var(--page); border: 1px solid var(--line); border-radius: 14px; }
.segmented button { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 0.5rem; text-align: left; border: 0; background: none; padding: 0.65rem 0.8rem; border-radius: 11px; cursor: pointer; font-weight: 600; color: var(--muted); }
.segmented button span { grid-column: 2; font-size: 0.72rem; font-weight: 400; }
.segmented button svg { grid-row: span 2; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 10px -2px rgba(13, 28, 119, 0.18); }
.segmented button[aria-selected="true"] svg { color: var(--select); }
.rut-field { position: relative; }
.rut-input { font-size: 1.35rem; letter-spacing: 0.04em; padding: 0.75rem 7.5rem 0.75rem 0.9rem; }
.rut-state { position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 0.2rem 0.6rem; }
.rut-state.is-ok { background: var(--ok-soft); color: var(--ok); }
.rut-state.is-bad { background: var(--danger-soft); color: var(--danger); }
details.more summary { cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--accent); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+ "; }
details.more[open] summary::before { content: "− "; }
.balance-pill { display: grid; justify-items: end; gap: 0.05rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 0.6rem 0.9rem; box-shadow: var(--shadow-card); }
.balance-pill b { font-size: 1.15rem; color: var(--ink); }
.low-balance { display: grid; gap: 0.75rem; border-radius: var(--r-card); padding: 1rem; background: var(--warn-soft); border: 1px solid #f1d58f; color: var(--warn); }
.low-balance p b { color: #6b4500; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 0.35rem; font-size: 0.75rem; color: var(--muted); text-align: center; }
.paybar { display: none; }
@media (max-width: 1023px) {
  .hide-on-mobile { display: none !important; }
  .paybar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; bottom: 0; margin: 1.5rem -1rem 0; padding: 0.75rem 1rem; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(13, 28, 119, 0.35); z-index: 20; }
  body.has-tabbar .paybar { bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
  .paybar > div { display: grid; }
  .paybar b { font-size: 1.25rem; color: var(--ink); }
  .paybar .btn { padding: 0.75rem 1.1rem; }
}

/* Recarga */
.amount-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.amount-chip { display: grid; gap: 0.1rem; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 0.8rem 0.9rem; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.amount-chip b { font-size: 1.1rem; color: var(--ink); }
.amount-chip span { font-size: 0.75rem; color: var(--muted); }
.amount-chip:hover { border-color: var(--line-2); }
.amount-chip[aria-checked="true"] { border-color: var(--select); background: var(--select-soft); box-shadow: inset 0 0 0 1px var(--select); }
.pay-chip { gap: 0.4rem; align-content: start; }
.pay-logo { height: 1.75rem; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.pay-chip:disabled { cursor: not-allowed; background: var(--page); border-style: dashed; }
.pay-chip:disabled:hover { border-color: var(--line); }
.pay-chip:disabled .pay-logo { filter: grayscale(1); opacity: 0.45; }
.money { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-input); background: var(--surface); padding-left: 0.9rem; }
.money:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 78, 242, 0.15); }
.money span { font-size: 1.4rem; font-weight: 600; color: var(--muted); }
.money .control { border: 0; box-shadow: none !important; font-size: 1.4rem; font-weight: 600; padding: 0.7rem 0.6rem; }
.topup-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.topup-preview > div { display: grid; gap: 0.1rem; background: var(--page); border-radius: var(--r-input); padding: 0.7rem 0.85rem; }
.topup-preview b { font-size: 1.05rem; color: var(--ink); }
.mini-balance { display: grid; gap: 0.15rem; }
.mini-balance b { font-size: 1.9rem; color: var(--ink); letter-spacing: -0.02em; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; font-size: 0.875rem; }
.perks li { display: flex; gap: 0.5rem; align-items: flex-start; }
.perks svg { color: var(--ok); margin-top: 0.15rem; }
.result-card { max-width: 30rem; margin: 0 auto; text-align: center; }
.result-icon.is-ok { background: var(--ok-soft); color: var(--ok); }
.result-icon.is-bad { background: var(--danger-soft); color: var(--danger); }
.result-amount { font-size: 2.2rem; font-weight: 700; color: var(--ok); margin-top: 0.5rem; letter-spacing: -0.02em; }

/* Hoja que sube desde abajo */
.sheet-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 17, 51, 0); display: flex; align-items: flex-end; justify-content: center; transition: background 0.2s; }
.sheet-overlay.open { background: rgba(0, 17, 51, 0.45); }
.sheet-overlay.closing { background: rgba(0, 17, 51, 0); }
.sheet-panel { width: 100%; max-width: 32rem; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 0.75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1); box-shadow: 0 -20px 40px -20px rgba(0, 17, 51, 0.4); }
.sheet-overlay.open .sheet-panel { transform: none; }
.sheet-overlay.closing .sheet-panel { transform: translateY(100%); }
.sheet-grip { width: 2.5rem; height: 4px; border-radius: 999px; background: var(--line-2); margin: 0 auto 0.75rem; }
@media (min-width: 768px) {
  .sheet-overlay { align-items: center; }
  .sheet-panel { border-radius: 22px; padding: 1.5rem; transform: translateY(16px) scale(0.98); opacity: 0; transition: transform 0.2s, opacity 0.2s; }
  .sheet-overlay.open .sheet-panel { transform: none; opacity: 1; }
  .sheet-grip { display: none; }
}
.icon-btn { width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 0; background: var(--page); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Las grillas de una columna no se ensanchan por una línea larga (evita desborde en el teléfono). */
.stack, .stack-sm, .stack-lg { grid-template-columns: minmax(0, 1fr); }
.home-grid > *, .buy-grid > * { min-width: 0; }
.hint { font-size: 0.8125rem; color: var(--muted); }

/* ── Portada v2: hero compacto, franja de confianza, fuentes y ejemplo ── */
.hero .inner { align-items: start; padding: 2rem 1rem 2.5rem; gap: 1.5rem; }
@media (min-width: 900px) { .hero .inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); padding: 3rem 1rem 3.25rem; align-items: center; } }
.hero h1 { margin-top: 0.85rem; }
@media (min-width: 768px) { .hero h1 { font-size: 2.9rem; } }
.hero .price { margin-top: 1.1rem; }
.hero .cta { margin-top: 1.25rem; }
.hero .visual { display: none; }
@media (min-width: 900px) {
  .hero .visual { display: block; max-width: 22rem; justify-self: end; padding-bottom: 2.5rem; }
  .hero .visual .ddq { transform: none; }
  .hero .visual .ticket { position: absolute; left: -2.5rem; right: auto; bottom: 0; width: 19rem; transform: none; }
}
.hero-ticket-mobile { margin-top: 1.5rem; }
@media (min-width: 900px) { .hero-ticket-mobile { display: none; } }

.trust { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust .inner { max-width: 72rem; margin: 0 auto; padding: 0.9rem 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 1.5rem; font-size: 0.875rem; font-weight: 500; color: var(--ink); }
.trust span { display: inline-flex; align-items: center; gap: 0.45rem; }
.trust svg { color: var(--navy); }

.sample-section { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .sample-section { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); } }
.sample-visual { max-width: 26rem; width: 100%; justify-self: center; }
@media (min-width: 900px) { .hero .visual { padding-bottom: 5.25rem; } .hero .visual .ticket { width: 17.5rem; } .sample-section { align-items: start; } .sample-copy { position: sticky; top: 2rem; padding-top: 2rem; } }
@media (max-width: 639px) { .trust .inner { display: grid; grid-template-columns: 1fr 1fr; font-size: 0.8rem; } }

/* ── Logos de las fuentes (pantalla del informe) ──────────────────────── */
.trust { border-top: 0; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 0.6rem; }
.src-tile { height: 3.75rem; border: 1px solid var(--line); border-radius: var(--r-input); background: #fff; display: grid; place-items: center; padding: 0.5rem 0.75rem; }
.src-tile img { max-height: 100%; max-width: 100%; object-fit: contain; }
.src-tile img { height: 2.6rem; width: auto; }
@media (min-width: 900px) { .hero .visual { padding-bottom: 0; } .hero .visual .ticket { position: static; width: 100%; margin-top: 0.75rem; transform: none; } }

/* Casillas «A mí» / «A mi empresa» en el paso del RUT a revisar */
.own-checks { display: grid; gap: 0.5rem; }
.own-check { display: flex; align-items: center; gap: 0.7rem; border: 1px solid var(--line); border-radius: var(--r-input); padding: 0.7rem 0.85rem; cursor: pointer; background: var(--surface); font-size: 0.925rem; }
.own-check:hover { border-color: var(--line-2); }
.own-check input { position: absolute; opacity: 0; pointer-events: none; }
.own-check .box { width: 1.25rem; height: 1.25rem; border-radius: 5px; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; flex-shrink: 0; transition: background 0.15s, border-color 0.15s; }
.own-check:has(input:checked) { border-color: var(--select); background: var(--select-soft); }
.own-check:has(input:checked) .box { background: var(--select); border-color: var(--select); color: #fff; }
.own-check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.control[readonly] { background: var(--page); color: var(--ink); }

/* ── Recorrido de compra v2 ──────────────────────────────────────────── */
.phases { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; counter-reset: none; }
.phases li { display: grid; justify-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 600; color: var(--muted); text-align: center; position: relative; }
.phases li > span { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 0.75rem; position: relative; z-index: 1; }
.phases li::before { content: ""; position: absolute; top: 0.8rem; left: -50%; right: 50%; height: 2px; background: var(--line); }
.phases li:first-child::before { display: none; }
.phases li.done, .phases li.now { color: var(--ink); }
.phases li.done > span { background: var(--select); border-color: var(--select); color: #fff; }
.phases li.done::before, .phases li.now::before { background: var(--select); }
.phases li.now > span { border-color: var(--select); color: var(--select); box-shadow: 0 0 0 3px var(--select-soft); }
.target-box { display: grid; gap: 0.5rem; border: 1px solid var(--line); border-radius: var(--r-card); padding: 1rem; background: var(--page); }
.target-title { font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.target-box .rut-input { padding-right: 0.9rem; }
.target-box .control:disabled { background: var(--line); color: var(--muted); }
.field-label { font-size: 0.875rem; font-weight: 600; }
.consent { align-items: flex-start; }
.consent .box { margin-top: 0.1rem; }
.buyer-chip { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; background: var(--page); border: 1px solid var(--line); border-radius: var(--r-input); padding: 0.7rem 0.85rem; }
.buyer-chip p { font-weight: 600; color: var(--ink); font-size: 0.9rem; }

/* ── Causas judiciales del informe ─────────────────────────────────────── */
.ai-note { margin-top: 0.6rem; font-size: 0.75rem; font-style: italic; color: var(--muted); line-height: 1.5; }
.cause-note { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.85rem; padding: 0.7rem 0.9rem; border-radius: var(--r-input); background: var(--warn-soft); color: var(--ink); font-size: 0.8rem; line-height: 1.5; }
.cause-note svg { flex-shrink: 0; margin-top: 0.15rem; color: var(--warn); }
.cause-help { margin-top: 0.75rem; }
.cause-help dl { display: grid; gap: 0.6rem; margin-top: 0.6rem; padding: 0.85rem 1rem; border-radius: var(--r-input); background: var(--page); font-size: 0.85rem; }
.cause-help dt { font-weight: 600; color: var(--ink); }
.cause-help dd { margin: 0.1rem 0 0; color: var(--muted); }
.cause-groups { display: grid; gap: 1.5rem; margin-top: 1.25rem; }
.cause-groups[hidden], .cause-group[hidden] { display: none; }
.cause-group h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); }
.cause-group h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cause-count { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.45rem; border-radius: 999px; background: var(--soft); color: var(--navy); font-size: 0.75rem; letter-spacing: 0; }
.cause-group [data-cause-list] { margin-top: 0.7rem; }
.cause-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.cause { border: 1px solid var(--line); border-radius: var(--r-input); padding: 0.85rem 1rem; background: var(--surface); }
.cause-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.cause-rol { font-weight: 600; color: var(--ink); }
.cause-date { margin-left: auto; font-size: 0.8rem; color: var(--muted); }
.cause-title { margin-top: 0.3rem; font-size: 0.9rem; overflow-wrap: anywhere; }
.cause-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.5rem 1.25rem; margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line); font-size: 0.85rem; }
.cause-meta dt { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cause-meta dd { margin: 0.1rem 0 0; overflow-wrap: anywhere; }
.cause-closed { margin-top: 1.5rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--page); }
.cause-closed > .tabs { margin-top: 0.8rem; }
.cause-closed .cause-groups { margin-top: 1rem; }
.cause-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cause-tab { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.cause-tab:hover { border-color: var(--navy); }
.cause-tab:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.cause-tab[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cause-tab[aria-pressed="true"] .cause-count { background: rgba(255, 255, 255, 0.18); color: #fff; }
.cause-pick > [data-pick-hint] { margin-top: 0.75rem; }
.cause-pick .cause-group { margin-top: 0.9rem; }
.cause-pick .cause-group h3 { display: none; }
.cause-pick .cause-group [data-cause-list] { margin-top: 0; }

/* ── Fuentes no disponibles ────────────────────────────────────────────── */
.source-off-box { padding: 0.9rem 1.1rem; border-radius: var(--r-input); border: 1px solid rgba(138, 90, 0, 0.3); background: var(--warn-soft); color: var(--ink); font-size: 0.85rem; line-height: 1.5; }
.source-off-title { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.source-off-title svg, .source-off svg { flex-shrink: 0; color: var(--warn); }
.source-off-box ul { margin: 0.4rem 0 0.5rem 1.75rem; padding: 0; }
.source-off { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.9rem; border-radius: var(--r-input); background: var(--warn-soft); color: var(--ink); font-size: 0.875rem; }
