html{color-scheme:light}body{margin:0}img{max-width:100%}[hidden]{display:none!important}
/* Ink on paper. Black is print, blue is Levi's pen, red is "careful", green is the one WhatsApp link. */
:root {
  --bg: #FFFFFF;
  --ink: #141414;
  --ink-2: #55585E;
  --rule: #DCDCD8;
  --ph: #9EA1A6;
  --pen: #1D3FB8;
  --red: #B3261E;
  --wa: #25D366;
  --wa-ink: #0A2915;
  --f: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;
  --f-type: "Courier Prime", "Courier New", Courier, monospace;
  --head: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131416; --ink: #EDEDEA; --ink-2: #A7A9AE; --rule: #2F3135; --ph: #6E7176; --pen: #93AAFF; --red: #FF8A80;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131416; --ink: #EDEDEA; --ink-2: #A7A9AE; --rule: #2F3135; --ph: #6E7176; --pen: #93AAFF; --red: #FF8A80;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--head) + 12px); }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--f); -webkit-font-smoothing: antialiased; }
#app[data-lang="es"] [lang="en"], #app[data-lang="en"] [lang="es"] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p, ul, ol, figure { margin: 0; }
a { color: var(--pen); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
b { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; left: 16px; top: 8px; width: auto; height: auto; clip: auto; background: var(--bg); padding: 8px 12px; z-index: 50; }
.small { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.status { font-size: 15px; color: var(--pen); margin-left: 8px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 8px; height: var(--head);
  padding-inline: max(16px, calc((100% - 720px) / 2));
  background: var(--bg); border-bottom: 1px solid var(--rule);
}
@media (min-width: 900px) { .top { padding-inline: max(16px, calc((100% - 1040px) / 2)); } }
.brand { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; margin-right: auto; }
.lang { min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--ink); font: 600 15px var(--f); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.wa-head {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 4px;
  background: var(--wa); color: var(--wa-ink); font: 700 15px var(--f); text-decoration: none;
  visibility: hidden; opacity: 0;
}
.wa-head.is-on { visibility: visible; opacity: 1; transition: opacity .12s ease; }
.wa-head svg { width: 18px; height: 18px; }

/* ---------- parts ---------- */
main { padding-inline: 16px; }
.part { max-width: 720px; margin-inline: auto; padding-block: 36px 40px; border-top: 1px solid var(--rule); display: flow-root; }
.part > * + * { margin-top: 14px; }
#top { border-top: 0; padding-top: 28px; }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 19px; line-height: 1.3; margin-top: 32px !important; }
.price { font-size: 24px; font-weight: 700; line-height: 1.25; }
.big { font-size: 20px; line-height: 1.4; }
@media (min-width: 720px) { h1 { font-size: 44px; } h2 { font-size: 28px; } }

.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; width: 100%;
  border-radius: 4px; background: var(--wa); color: var(--wa-ink); font: 700 18px var(--f); text-decoration: none;
  margin-top: 24px !important;
}
.wa-btn svg { width: 22px; height: 22px; }
@media (min-width: 720px) { .wa-btn { width: auto; display: inline-flex; padding: 0 28px; } }
.pen-link { display: inline-block; min-height: 44px; padding-top: 10px; }

.pen-btn { border: 0; background: none; padding: 10px 0; min-height: 44px; color: var(--pen); font: 400 17px var(--f); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.fig { font-weight: 700; }

/* ---------- hero portrait: Levi lifted off the studio backdrop onto a warm panel ---------- */
.hero-portrait { margin: -28px -16px 24px !important; }
.hero-portrait .panel { position: relative; aspect-ratio: 1 / 1; max-height: 420px; background: #E1DCD3; overflow: hidden; }
.hero-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.hero-portrait figcaption { padding: 8px 16px 0; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.hero-portrait figcaption b { font-weight: 600; color: var(--ink); }
@media (min-width: 900px) {
  #top { max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 56px; align-content: start; }
  #top > * { grid-column: 1; }
  #top > .hero-portrait { grid-column: 2; grid-row: 1 / span 6; margin: 0 !important; align-self: start; }
  #top > .hero-portrait .panel { aspect-ratio: auto; height: 440px; max-height: none; }
  #top > .hero-portrait figcaption { padding-inline: 0; }
}

.growth-fig { clear: both; padding-top: 18px; }
.growth { display: block; width: 100%; max-width: 360px; height: auto; overflow: visible; }
.growth .base { stroke: var(--rule); stroke-width: 1; }
.growth path { fill: var(--pen); }
.growth .v { fill: var(--ink); font: 600 15px var(--f); }
.growth .yr { fill: var(--ink-2); font: 400 13px var(--f); }
.growth .hit { fill: transparent; }
.growth .col:hover path { opacity: .8; }
.growth-fig figcaption, .lunch figcaption { font-size: 15px; color: var(--ink-2); margin-top: 6px; }
.lunch img { display: block; width: 100%; max-width: 360px; height: auto; border: 1px solid var(--rule); }

/* ---------- scam signs ---------- */
.flags { list-style: none; padding: 0; }
.flags li { padding: 10px 0; border-top: 1px solid var(--rule); }
.flags li:last-child { border-bottom: 1px solid var(--rule); }
.flags b { color: var(--red); font-weight: 600; margin-right: 4px; }

/* ---------- steps ---------- */
.steps { padding-left: 1.4em; }
.steps li { padding-left: 4px; }
.steps li + li { margin-top: 8px; }
.steps li::marker { font-weight: 700; }

/* ---------- W-2 ---------- */
.w2 { border: 1.5px solid var(--ink); margin-top: 20px !important; }
.w2-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-bottom: 1.5px solid var(--ink); font-weight: 700; font-size: 15px; }
.w2-title span { font-weight: 400; color: var(--ink-2); font-size: 13px; }
.w2-title em { margin-left: auto; font-style: normal; font-size: 13px; color: var(--ink-2); }
.w2-grid { display: grid; grid-template-columns: 1fr 1fr; }
.w2-grid.state { grid-template-columns: .7fr 1fr 1fr; border-top: 1.5px solid var(--ink); }
.box { position: relative; min-height: 72px; padding: 6px 8px 8px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; border-right: 1px solid var(--ink-2); border-bottom: 1px solid var(--ink-2); }
.w2-grid > .box:nth-child(2n) { border-right: 0; }
.w2-grid:not(.state) > .box:nth-last-child(-n + 2) { border-bottom: 0; }
.w2-grid.state > .box { border-bottom: 0; border-right: 1px solid var(--ink-2); }
.w2-grid.state > .box:last-child { border-right: 0; }
.lbl { font-size: 11px; line-height: 1.2; color: var(--ink-2); position: relative; z-index: 1; }
.lbl b { font-size: 13px; font-weight: 700; color: var(--ink); }
.val { font: 400 17px var(--f-type); text-align: right; color: var(--ink); position: relative; z-index: 1; }
input.val { width: 100%; min-height: 36px; border: 0; border-bottom: 1px dashed var(--pen); background: transparent; padding: 2px 0; border-radius: 0; }
input.val::placeholder { color: var(--ph); }
input.val:focus { outline: none; border-bottom: 2px solid var(--pen); }
.loop { position: absolute; inset: -5px -6px; width: calc(100% + 12px); height: calc(100% + 10px); overflow: visible; pointer-events: none; }
.loop path { fill: none; stroke: var(--pen); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 640; stroke-dashoffset: 0; }
.w2-grid > .ringed:nth-child(2) .loop { transform: rotate(-1.5deg); }
.w2-grid > .ringed:nth-child(4) .loop { transform: rotate(1deg); }
.w2-grid > .ringed:nth-child(6) .loop { transform: rotate(2deg); }
.w2.draw .loop path { animation: draw .7s ease-out both; }
.w2.draw .ringed:nth-child(4) .loop path { animation-delay: .15s; }
.w2.draw .ringed:nth-child(6) .loop path { animation-delay: .3s; }
@keyframes draw { from { stroke-dashoffset: 640; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .w2.draw .loop path { animation: none; } }
.pen-note { color: var(--pen); font-style: italic; font-weight: 500; font-size: 16px; padding: 8px 10px 0; margin: 0 !important; }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 10px; }
.selects label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
select, #res-form input { width: 100%; min-height: 44px; padding: 8px 10px; font: 400 16px var(--f); color: var(--ink); background: var(--bg); border: 1px solid var(--ink-2); border-radius: 4px; }
.answer { margin-top: 16px !important; }
.answer .say { color: var(--pen); font-style: italic; font-weight: 500; font-size: 21px; line-height: 1.3; }
.answer .say .amt { font-style: normal; font-weight: 700; }
.answer p + p, .answer ul, .answer ol { margin-top: 8px; }
.answer ul, .answer ol { padding-left: 1.3em; }
.answer li + li { margin-top: 4px; }
.answer .pill { display: block; color: var(--pen); font-weight: 700; font-size: 15px; }
.answer h4 { margin: 4px 0 0; font-size: 20px; line-height: 1.25; }
.answer .calc { font-size: 15px; color: var(--ink-2); }

/* ---------- residency checker ---------- */
.more { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 24px !important; }
.more > summary, .acc summary { list-style: none; cursor: pointer; padding: 14px 32px 14px 0; position: relative; font-weight: 600; color: var(--ink); }
.more > summary::-webkit-details-marker, .acc summary::-webkit-details-marker { display: none; }
.more > summary::after, .acc summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-weight: 400; font-size: 22px; color: var(--ink-2); }
.more[open] > summary::after, .acc details[open] summary::after { content: "–"; }
#res-form { display: grid; gap: 14px; padding-bottom: 8px; }
#res-form .row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#res-form .row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#res-form .field { display: grid; gap: 4px; align-content: start; }
#res-form .field > label, #res-form .field > .lab { font-weight: 600; font-size: 15px; }
#res-form .hint { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
@media (max-width: 400px) { #res-form .row, #res-form .row.two { grid-template-columns: minmax(0, 1fr); } }
.more .answer { padding-bottom: 12px; }
.more > .small { padding-bottom: 14px; }

/* ---------- checklist ---------- */
.checks { list-style: none; padding: 0; }
.checks li { border-top: 1px solid var(--rule); }
.checks li:last-child { border-bottom: 1px solid var(--rule); }
.checks label { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 11px 0; cursor: pointer; align-items: start; }
.checks input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 2px 0 0; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--bg); display: grid; place-items: center; cursor: pointer; }
.checks input:checked::after { content: ""; width: 7px; height: 12px; border: solid var(--pen); border-width: 0 2.5px 2.5px 0; transform: translateY(-2px) rotate(40deg); }
.checks .item b { font-weight: 400; }
.checks .item span span { display: block; color: var(--ink-2); font-size: 15px; margin-top: 2px; }

/* ---------- refund routes ---------- */
.route { list-style: none; padding: 0; margin-top: 18px !important; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.route li { font-weight: 600; font-size: 16px; }
.route li i { font-style: normal; font-weight: 400; color: var(--ink-2); }
.route li + li::before { content: "→"; color: var(--pen); font-weight: 400; margin: 0 8px; }
.route li.warn i { color: var(--red); }

/* ---------- accordions ---------- */
.acc { margin-top: 20px !important; border-top: 1px solid var(--rule); }
.acc details { border-bottom: 1px solid var(--rule); }
.acc .body { padding: 0 0 16px; display: grid; gap: 10px; color: var(--ink); }
.acc .body > div { display: grid; gap: 10px; }
.acc .body ul { padding-left: 1.2em; display: grid; gap: 6px; }
.tel { font-weight: 600; white-space: nowrap; }

/* ---------- contact ---------- */
.number { font-size: 26px; font-weight: 700; letter-spacing: .01em; }
#contacto .pen-btn { display: block; }

footer { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-2); display: grid; gap: 8px; }
footer b { color: var(--ink); }
footer .pen-btn { font-size: 15px; padding: 6px 0; }

.nw { white-space: nowrap; }

/* residency calculator: visible, framed like the W-2 */
.calc { border: 1.5px solid var(--ink); padding: 14px 12px 12px; margin-top: 28px !important; display: grid; gap: 12px; }
.calc h3 { margin: 0 !important; }
.calc .answer { margin-top: 4px !important; }

/* /subir and /admin (added after styles.css) */
.part.up, .part.adm { border-top: 0; padding-top: 28px; }
.field { display: grid; gap: 6px; margin-top: 22px; }
.field > label, .field > .lab { font-weight: 600; font-size: 16px; }
.field i { font-style: normal; font-weight: 400; color: var(--ink-2); }
.hint { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.up input[type="text"], .up textarea, .adm input[type="password"], .adm input[type="search"] {
  width: 100%; min-height: 48px; padding: 10px 12px; font: 400 17px var(--f); color: var(--ink);
  background: var(--bg); border: 1px solid var(--ink-2); border-radius: 4px;
}
.up textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.drop {
  display: grid; gap: 2px; place-items: center; text-align: center; padding: 22px 14px; cursor: pointer;
  border: 1.5px dashed var(--pen); border-radius: 6px; color: var(--pen);
}
.drop .hint { font-weight: 400; }
.drop-main { font-weight: 600; font-size: 18px; text-decoration: underline; text-underline-offset: 3px; }
#up-files:focus-visible + .drop { outline: 2px solid var(--pen); outline-offset: 2px; }
#up-files:disabled + .drop { opacity: .5; cursor: default; }
.drop.over { background: color-mix(in srgb, var(--pen) 8%, transparent); border-style: solid; }
.files { list-style: none; padding: 0; }
.files li, .sub-files li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); min-height: 44px; }
.files li:first-child { border-top: 1px solid var(--rule); }
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsize { font: 400 14px var(--f-type); color: var(--ink-2); white-space: nowrap; }
.rm { border: 0; background: none; color: var(--red); font: 400 15px var(--f); padding: 8px 0 8px 6px; min-height: 40px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rm:disabled { opacity: .4; cursor: default; }
.ink-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; width: 100%; margin-top: 26px;
  padding: 0 28px; border: 0; border-radius: 4px; background: var(--ink); color: var(--bg); font: 700 18px var(--f); cursor: pointer;
}
.ink-btn:disabled { opacity: .55; cursor: progress; }
@media (min-width: 720px) { .ink-btn { width: auto; } }
.progress { margin-top: 16px; display: grid; gap: 6px; }
.progress progress { width: 100%; height: 8px; accent-color: var(--pen); }
.up-err { margin-top: 14px; color: var(--red); font-weight: 500; }
.up-note { padding: 12px 14px; border: 1.5px solid var(--ink); }
.done { margin-top: 0 !important; }
.done-title { font-size: 30px; line-height: 1.15; }
@media (min-width: 720px) { .done-title { font-size: 44px; } }
.done:focus { outline: none; }
.done > * + * { margin-top: 12px; }
.code { font: 700 34px/1.1 var(--f-type); letter-spacing: .06em; color: var(--pen); }
.done .pen-btn { display: block; }
.up .more { margin-top: 36px !important; }
.up .more .small { padding-bottom: 14px; display: grid; gap: 8px; }

/* admin */
.admin-top .brand { margin-right: 4px; }
.admin-tag { font-size: 15px; color: var(--ink-2); margin-right: auto; }
.lock-btn { font-size: 15px; }
.ad-login { display: grid; gap: 10px; max-width: 420px; }
.ad-login label { font-weight: 600; margin-top: 8px; }
.ad-login .ink-btn { margin-top: 8px; }
.ad-bar { display: grid; gap: 8px; margin-bottom: 18px; }
.subs { list-style: none; padding: 0; display: grid; gap: 16px; }
.sub { border: 1.5px solid var(--ink); padding: 12px 14px; display: grid; gap: 6px; }
.sub-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.sub-name { font-size: 18px; }
.sub-code { font: 700 15px var(--f-type); color: var(--pen); letter-spacing: .04em; }
.sub-note { white-space: pre-wrap; border-left: 2px solid var(--pen); padding-left: 10px; font-size: 15px; }
.sub-files { list-style: none; padding: 0; }
.sub-files .pen-btn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 0; }
.sub-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.small-btn { min-height: 44px; margin-top: 6px; font-size: 16px; padding: 0 18px; width: auto; }
.del { color: var(--red); }
.up .intro { display: grid; gap: 14px; }
.inline-btn { font-size: 15px; padding: 0; min-height: 0; margin-left: 6px; }
.orphans { margin-top: 20px; display: grid; gap: 4px; }
