/* Páginas secundarias (recarga, mi gasto, herramientas, guías, legales, 404).
   Se carga DESPUÉS de /styles.css y solo actúa bajo body.sec. No lo usa México. */
body.sec {
  --field: #fff; --field-b: #cfcabb; --soft: #fffaf0; --dk: #14171c; --dk2: #0a0c0f;
  --acc-ink: #8a5a00; --ring: #2b6cff; --dkt: #c9ced6;
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  body.sec { --field: #14181d; --field-b: #3a424d; --soft: #20201a; --acc-ink: #ffcf4d; --ring: #7aa2ff; --dkt: #b9bfc9; }
}
.sec :focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.sec .top :focus-visible, .sec .foot :focus-visible, .sec .res :focus-visible { outline-color: var(--acc); }
.sec .top { border-bottom: 3px solid var(--acc); position: sticky; top: 0; z-index: 50; }
.sec .toplink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.sec .toplink:hover, .sec .toplink[aria-current] { color: var(--acc); }
.sec a:not(.btn):not(.cta):not(.logo):not(.toplink):not(.go) { text-underline-offset: 3px; }

/* Contenedores */
.sec .app, .sec .wrap { max-width: 760px; padding: 0 16px 48px; }
.sec .hero { padding: 28px 0 14px; }
.sec .hero h1 { font-size: clamp(28px, 6.5vw, 44px); }
.sec .panel, .sec .tool {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 14px 30px -22px rgba(20,23,28,.35);
}
.sec section.panel, .sec .tool { margin-top: 16px; }
.sec h2 { letter-spacing: -.02em; text-wrap: balance; }
.sec .panel > h2:first-child { font-size: 19px; margin: 0 0 14px; }

/* Formularios: campos grandes y claros */
.sec label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink2); min-width: 0; }
.sec input:not([type=checkbox]):not([type=radio]):not([type=file]), .sec select, .sec textarea {
  min-height: 48px; padding: 10px 14px; font-size: 16px; line-height: 1.3; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--field-b); border-radius: 12px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.sec select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.sec input:hover, .sec select:hover { border-color: var(--ink2); }
.sec input:focus, .sec select:focus, .sec textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 28%, transparent); outline: none; }
.sec input:focus-visible, .sec select:focus-visible { outline: none; }
.sec input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--dk); flex: none; }
@media (prefers-color-scheme: dark) { .sec input[type=checkbox] { accent-color: var(--acc); } }
.sec .chk { min-height: 48px; display: flex; flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; }
.sec .hint, .sec .hint2 { color: var(--ink2); font-size: 13.5px; line-height: 1.45; margin: 8px 0 0; }
.sec fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.sec legend { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); font-weight: 800; padding: 0; margin: 0 0 8px; }
.sec .fg { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }

/* Botones */
.sec .btn, .sec .copybtn, .sec .cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  font: inherit; font-weight: 800; font-size: 16px; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
}
.sec .btn.primary, .sec .copybtn, .sec .cta { background: var(--acc); color: #14171c; box-shadow: 0 6px 16px -10px rgba(255,184,0,.9); }
.sec .btn.sec, .sec .btn.mas { background: transparent; color: var(--ink); border-color: var(--field-b); }
.sec .btn.dng { background: transparent; color: var(--bad); border-color: var(--field-b); }
@media (prefers-color-scheme: dark) { .sec .btn.dng { color: #ff8f80; } }
.sec .btn.sec:hover, .sec .btn.mas:hover, .sec .btn.dng:hover { border-color: var(--ink); }
.sec .btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.sec .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.sec .row .btn.primary { flex: 1 1 200px; }
.sec .go { display: inline-flex; align-items: center; min-height: 44px; }
.sec .msg { min-height: 1.3em; font-size: 14px; color: var(--ink2); margin: 10px 0 0; }
.sec .msg.err { color: var(--bad); font-weight: 600; }
@media (prefers-color-scheme: dark) { .sec .msg.err { color: #ff8f80; } }
@media (max-width: 640px) { .sec .row .btn { width: 100%; } .sec .where .btn { width: 100%; } }

/* Lo avanzado, plegado */
.sec details.adv { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.sec details.adv > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; font-weight: 700; font-size: 15px; border-radius: 14px; }
.sec details.adv > summary::-webkit-details-marker { display: none; }
.sec details.adv > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; flex: none; }
.sec details.adv[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.sec details.adv > summary small { font-weight: 500; color: var(--ink2); font-size: 13px; }
.sec details.adv > .adv-b { padding: 4px 14px 16px; }
.sec details.adv fieldset:last-child { margin-bottom: 0; }

/* Resultado destacado (herramientas): tarjeta negra con cifra amarilla */
.sec .res { min-height: 0; background: var(--dk); color: #fff; border: 1px solid #000; border-radius: 18px; padding: 20px 18px; margin-top: 16px; box-shadow: 0 18px 36px -22px rgba(20,23,28,.7); }
@media (prefers-color-scheme: dark) { .sec .res { background: var(--dk2); border-color: var(--line); } }
.sec .res .big { color: var(--acc); font-size: clamp(30px, 9vw, 46px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin: 0 0 6px; text-wrap: balance; }
.sec .res p { color: #e7eaee; }
.sec .res b { color: #fff; }
.sec .res small, .sec .res .hint2 { color: var(--dkt); }
.sec .res a { color: var(--acc); }
.sec .res h2 { color: #fff; }
.sec .res .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.sec .res .kpis div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px; }
.sec .res .kpis b { display: block; font-size: 21px; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.sec .res .kpis span { font-size: 13px; color: var(--dkt); }
.sec .res .chart .bg { fill: rgba(255,255,255,.14); }
.sec .res .chart text { fill: #fff; font-family: var(--f); }
.sec .res .legend { font-size: 14.5px; margin-top: 12px; }
.sec .res .legend span.v { color: #fff; }
.sec .res .tbl { margin-top: 14px; border-radius: 12px; }
.sec .res table { background: transparent; border: 0; color: #fff; font-size: 14px; }
.sec .res th { background: transparent; color: var(--dkt); border-bottom: 1px solid rgba(255,255,255,.2); }
.sec .res td { border-bottom: 1px solid rgba(255,255,255,.1); }
.sec .res .warn { background: rgba(255,255,255,.08); color: #fff; border-left-color: var(--acc); }
.sec .res .copybtn { margin-top: 10px; }
.sec textarea.out { background: var(--field); border: 1.5px solid var(--field-b); }
.sec .warn { border-left: 4px solid var(--acc); background: var(--card); padding: 10px 14px; border-radius: 0 12px 12px 0; font-size: 14px; }
.sec .res .num-in { animation: numin .5s ease both; }
@keyframes numin { from { opacity: .35; transform: translateY(4px); } }
.sec .res.upd { animation: resin .35s ease both; }
@keyframes resin { from { opacity: .6; transform: translateY(4px); } }

/* Recarga: tarjetas de puntos */
.sec .ev .pt, .sec .pt { border-radius: 16px; padding: 16px; }
.sec .ev .pt .dist { color: var(--ink); font-size: 22px; }
.sec .ev .b { border-radius: 20px; padding: 4px 10px; font-size: 13px; }
.sec .ev .b.kw { color: #14171c; }
.sec .ev .pt:hover { border-color: var(--ink2); }
.sec .ev .lista .pt { animation: up .3s ease both; }
.sec .ev .row { margin-top: 0; }
.sec .ev .row .btn.primary { flex: 0 0 auto; }
.sec .ev .row .search { flex: 1 1 240px; }
@media (max-width: 640px) { .sec .ev .row .btn.primary { flex: 1 1 100%; } .sec .or { display: block; text-align: center; width: 100%; } }
.sec .ev .mas { width: 100%; }
.sec .src { font-size: 13px; color: var(--ink2); line-height: 1.5; }

/* Mi gasto: números destacados */
.sec .mg .kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sec .mg .kpi { border-radius: 14px; padding: 14px; background: var(--bg); border: 1px solid var(--line); }
.sec .mg .kpi:first-child { background: var(--dk); border-color: var(--dk); color: #fff; }
.sec .mg .kpi:first-child .v { color: var(--acc); font-size: 28px; }
.sec .mg .kpi:first-child .k, .sec .mg .kpi:first-child .s { color: var(--dkt); }
.sec .mg .kpi .k { font-size: 13px; }
.sec .mg .kpi .v { font-size: 24px; font-weight: 800; letter-spacing: -.025em; }
.sec .mg .kpi .s { font-size: 13px; }
@media (min-width: 600px) { .sec .mg .kpis { grid-template-columns: repeat(4, 1fr); } .sec .mg .kpi:first-child { grid-column: span 1; } }
.sec .mg .btn.sm, .sec .mg .cur button { min-height: 44px; min-width: 44px; }
.sec .mg td .btn, .sec .mg td button { min-height: 44px; min-width: 44px; }
.sec .mg .est, .sec .est { border-left: 4px solid var(--acc); background: var(--soft); border-radius: 0 12px 12px 0; }
.sec .fileb { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }

/* Pie */
.sec .foot { max-width: 760px; font-size: 13.5px; line-height: 1.6; }
.sec .foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.sec .foot-nav { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 6px 0 0; }

/* Guías */
.sec .wrap.city, .sec .wrap { max-width: 760px; }
.sec .wrap > p, .sec .wrap > ul, .sec .wrap > ol, .sec .wrap > h3, .sec .wrap > h2 { max-width: 68ch; }
.sec .wrap p, .sec .wrap li { line-height: 1.7; }
.sec .wrap > p { margin: 0 0 1em; }
.sec .wrap ul, .sec .wrap ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.sec .wrap li { margin-bottom: .45em; }
.sec .wrap h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.1; letter-spacing: -.03em; margin: 8px 0 12px; text-wrap: balance; }
.sec .wrap h2 { font-size: clamp(21px, 4.2vw, 26px); line-height: 1.2; margin: 2em 0 .5em; scroll-margin-top: 76px; }
.sec .wrap h3 { font-size: 18px; line-height: 1.3; margin: 1.5em 0 .3em; scroll-margin-top: 76px; }
.sec .lede { font-size: 18px; line-height: 1.6; color: var(--ink2); }
.sec .crumb { font-size: 14px; margin: 18px 0 0; }
.sec .crumb a { display: inline-block; padding: 8px 0; }
.sec .meta { font-size: 14px; color: var(--ink2); margin: 0 0 18px; }
.sec .toc { max-width: 68ch; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px 8px; margin: 0 0 24px; }
.sec .toc > b { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); margin-bottom: 6px; }
.sec .toc ol { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.sec .toc li { counter-increment: t; margin: 0; }
.sec .toc a { display: flex; gap: 10px; align-items: baseline; min-height: 44px; align-content: center; padding: 8px 0; text-decoration: none; border-top: 1px solid var(--line); font-weight: 600; line-height: 1.35; }
.sec .toc li:first-child a { border-top: 0; }
.sec .toc a::before { content: counter(t); flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--acc); color: #14171c; font-size: 12.5px; font-weight: 800; }
.sec .toc a:hover { text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 2px; }
.sec .dato { max-width: 68ch; background: var(--soft); border: 1px solid var(--line); border-left: 5px solid var(--acc); border-radius: 0 14px 14px 0; padding: 14px 16px; font-size: 17px; line-height: 1.5; margin: 1em 0 1.2em; }
.sec .dato b { font-weight: 800; }
.sec .cta-box { max-width: 68ch; margin: 2.2em 0 1.4em; background: var(--dk); color: #fff; border-radius: 18px; padding: 20px; }
@media (prefers-color-scheme: dark) { .sec .cta-box { background: var(--dk2); border: 1px solid var(--line); } }
.sec .cta-box p { margin: 0 0 12px; color: var(--dkt); line-height: 1.5; }
.sec .cta-box p b { display: block; color: #fff; font-size: 20px; letter-spacing: -.02em; margin-bottom: 2px; }
.sec .cta-box .cta { margin: 0; }
.sec .cta-top { max-width: 68ch; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 22px; font-size: 15px; color: var(--ink2); }
.sec .cta-top a { font-weight: 800; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--acc); padding: 8px 0; }
.sec .note { max-width: 68ch; font-size: 13.5px; line-height: 1.6; }
.sec table { font-size: 15px; }
.sec .wrap .tablewrap, .sec .tablewrap { overflow-x: auto; margin: 1em 0 1.4em; -webkit-overflow-scrolling: touch; }
.sec .tablewrap table { min-width: 520px; }
.sec th, .sec td { padding: 10px 12px; }
.sec .res:empty { display: none; }
.sec .wrap > .glist { max-width: none; padding: 0; }
.sec .glist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; max-width: none; }
.sec .glist li { margin: 0; }
.sec .glist a { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease; }
.sec .glist a:hover { border-color: var(--ink2); transform: translateY(-2px); box-shadow: 0 14px 28px -20px rgba(20,23,28,.5); }
.sec .glist b { display: block; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; margin-bottom: 4px; }
.sec .glist small { display: block; font-size: 14.5px; line-height: 1.5; color: var(--ink2); }
.sec .glist .more { display: inline-block; margin-top: 8px; font-weight: 800; font-size: 14px; border-bottom: 2px solid var(--acc); }
.sec .tools-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }

/* Legales */
.sec .legal { max-width: 68ch; }
.sec .legal h2 { font-size: 20px; margin: 1.8em 0 .4em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.sec .legal h2:first-of-type { border-top: 0; padding-top: 0; }
.sec .legal p, .sec .legal li { font-size: 16px; }
.sec .legal table { font-size: 14.5px; }

/* 404 */
.sec .e404 { text-align: center; padding: 48px 0 24px; }
.sec .e404 .code { font-size: clamp(72px, 24vw, 140px); font-weight: 800; letter-spacing: -.06em; line-height: 1; margin: 0; color: var(--ink); }
.sec .e404 .code span { color: var(--acc); }
.sec .e404 h1 { margin: 6px 0 8px; }
.sec .e404 .lede { margin: 0 auto 20px; max-width: 46ch; }
.sec .e404 .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 18px; }
.sec .e404 .links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .sec *, .sec *::before, .sec *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .sec .glist a:hover { transform: none; }
}
@media print { .sec .top, .sec .toc, .sec .cta-box, .sec .foot { display: none; } }
.sec .fg label { justify-content: flex-end; }
.sec .logo { display: inline-flex; align-items: center; min-height: 44px; }
.sec .fg label.chk, .sec .chk { justify-content: flex-start; }
.sec .mg .kpi .v, .sec .mg .kpi:first-child .v { font-size: clamp(20px, 6.2vw, 26px); }
.sec .mg .kpi:first-child .v { white-space: nowrap; }
.sec .tw, .sec .tbl, .sec .tablewrap { position: relative; }
.sec .fileb { display: inline-flex !important; width: auto; }
@media (max-width: 640px) { .sec .fileb { width: 100%; } }
.sec .mg svg.ch { max-height: 240px; }
.sec .wrap > p.crumb, .sec .crumb { line-height: 1.4; margin-bottom: 4px; }
.sec .legal .tablewrap table { min-width: 0; }
