/* Asyento — quiet, editorial fintech. Paper background, ink type, one green for "cuadra",
   amber/red only where something needs attention. Numbers in Geist Mono, headlines in Instrument Serif. */
:root {
  --paper: #f6f5f1;
  --surface: #ffffff;
  --sunken: #f1efe9;
  --ink: #15171a;
  --ink-2: #474c54;
  --ink-3: #8a8e96;
  --line: #e6e3db;
  --line-2: #d9d5cb;
  --brand: #0d5c4a;
  --brand-ink: #ffffff;
  --brand-soft: #e3f0eb;
  --amber: #a8540a;
  --amber-soft: #fbf0e1;
  --red: #b42318;
  --red-soft: #fcebea;
  --green: #12734a;
  --green-soft: #e6f4ec;
  --blue: #2b5a9e;
  --blue-soft: #e8eef8;
  --shadow: 0 1px 2px rgba(21, 23, 26, .04), 0 8px 24px -12px rgba(21, 23, 26, .12);
  --shadow-pop: 0 12px 40px -8px rgba(21, 23, 26, .22), 0 2px 6px rgba(21, 23, 26, .06);
  --r: 14px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e0f11; --surface: #16181b; --sunken: #1c1f23; --ink: #eceae4; --ink-2: #b4b3ad; --ink-3: #7d7f84;
    --line: #26292e; --line-2: #33373d; --brand: #5fc4a2; --brand-ink: #062a20; --brand-soft: #12302a;
    --amber: #f0b062; --amber-soft: #33240f; --red: #f59a92; --red-soft: #3a1815; --green: #6fd3a0; --green-soft: #10291d;
    --blue: #8fb3ec; --blue-soft: #15233a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
    --shadow-pop: 0 16px 48px -8px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 15px/1.55 var(--sans); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mono { font-size: .92em; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
h2 { font-size: 1.15rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; margin-bottom: 12px; }
h4 { font-size: .95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1180px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.02em; font-size: 1.02rem; flex-shrink: 0; }
.pickers { display: flex; gap: 6px; min-width: 0; flex: 1; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.link { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.link:hover { color: var(--ink); }

/* dropdown menus (details/summary, no JS needed) */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.picker > summary { display: grid; grid-template-columns: auto 14px; grid-template-rows: auto auto; column-gap: 8px;
  padding: 6px 12px; border-radius: 10px; border: 1px solid transparent; min-width: 0; max-width: 340px; transition: background .15s, border-color .15s; }
.picker > summary:hover, .picker[open] > summary { background: var(--surface); border-color: var(--line); }
.picker-k { grid-column: 1; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); font-weight: 600; line-height: 1.3; }
.picker-v { grid-column: 1; font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.picker .chev { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--ink-3); transition: transform .2s; }
.picker[open] .chev { transform: rotate(180deg); }
.menu-pop { position: absolute; top: calc(100% + 8px); left: 0; min-width: 300px; max-height: 70vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px;
  animation: pop .14s ease-out; z-index: 30; }
.menu-pop.right { left: auto; right: 0; min-width: 240px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-item { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px;
  text-decoration: none; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.menu-item small { color: var(--ink-3); font-size: .78rem; }
.menu-item:hover { background: var(--sunken); }
.menu-item.on { background: var(--brand-soft); }
.menu-item.on span::after { content: " ✓"; color: var(--brand); }
.menu-item.add span { color: var(--brand); font-weight: 600; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-head { padding: 8px 12px; display: grid; }
.menu-head small { color: var(--ink-3); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: .9rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: 500 .92rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .12s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--sunken); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--brand)); }
.btn-sm { height: 34px; padding: 0 13px; font-size: .86rem; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }

/* ---------- layout ---------- */
.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px 20px 64px; }
.foot { max-width: 1180px; width: 100%; margin: 0 auto; padding: 22px 20px 34px; display: flex; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; color: var(--ink-3); font-size: .8rem; border-top: 1px solid var(--line); }
.foot a { color: var(--ink-3); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.sec-head p { margin: 0; font-size: .9rem; }
section + section, .callout + section { margin-top: 48px; }

.rise { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .07s; } .d2 { animation-delay: .14s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .rise, .menu-pop { animation: none; } html { scroll-behavior: auto; } }

/* ---------- hero ---------- */
.eyebrow { margin: 0 0 14px; color: var(--ink-3); font-size: .84rem; font-weight: 500; }
.eyebrow .dot { margin: 0 6px; }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.04; letter-spacing: -.02em; max-width: 18ch; }
.lede { max-width: 66ch; font-size: 1.06rem; color: var(--ink-2); margin: 16px 0 0; }
.lede strong { color: var(--ink); font-family: var(--mono); font-weight: 600; font-size: .96em; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 36px 0 0; border-top: 1px solid var(--line); }
.stats > div { padding: 16px 0 0; }
.stats > div + div { padding-left: 20px; border-left: 1px solid var(--line); margin-left: -1px; }
.stats > div:not(:first-child) { padding-left: 20px; }
.stats dt { font-size: .78rem; color: var(--ink-3); margin-bottom: 4px; }
.stats dd { margin: 0; font-size: 1.35rem; font-weight: 500; }

.callout { margin-top: 32px; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r);
  background: var(--amber-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--amber) 22%, transparent); }
.callout a { color: var(--amber); font-weight: 600; }
.callout-ico { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--amber); color: var(--surface);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* ---------- status colors ---------- */
.st-explicada { --st: var(--amber); --st-soft: var(--amber-soft); }
.st-revisar { --st: var(--red); --st-soft: var(--red-soft); }
.st-ok { --st: var(--green); --st-soft: var(--green-soft); }
.st-corregida { --st: var(--green); --st-soft: var(--green-soft); }
.comp-note { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--sunken); font-size: .86rem; color: var(--ink-2); }
.comp-note.bad { background: var(--red-soft); color: var(--red); }
.st-sin-declaracion { --st: var(--ink-3); --st-soft: var(--sunken); }
.st-en-curso { --st: var(--blue); --st-soft: var(--blue-soft); }

/* month strip */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 6px; margin-bottom: 14px; }
.cell { text-decoration: none; display: grid; gap: 2px; padding: 10px 10px 9px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.cell::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--st); }
.cell:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cell-m { font-size: .76rem; color: var(--ink-3); font-weight: 500; }
.cell-v { font-size: .88rem; font-weight: 600; color: var(--st); }
.st-sin-declaracion .cell-v, .st-en-curso .cell-v { color: var(--ink-3); font-weight: 400; }

/* month rows */
.mlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow > summary { list-style: none; cursor: pointer; display: grid; align-items: center; gap: 16px;
  grid-template-columns: minmax(150px, 1.1fr) repeat(3, minmax(120px, 1fr)) 128px 16px; padding: 14px 20px; transition: background .15s; }
.mrow > summary::-webkit-details-marker { display: none; }
.mrow > summary:hover { background: var(--sunken); }
.mrow[open] > summary { background: var(--sunken); }
.m-name { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.pip { width: 8px; height: 8px; border-radius: 50%; background: var(--st); flex-shrink: 0; }
.m-col { display: grid; justify-items: end; }
.m-col small { font-size: .72rem; color: var(--ink-3); }
.m-col .num { font-size: .95rem; }
.m-col em { font-style: normal; color: var(--ink-3); font-family: var(--sans); font-size: .88rem; }
.m-col.diff .num { color: var(--st); font-weight: 600; }
.st-ok .m-col.diff .num, .st-sin-declaracion .m-col.diff .num, .st-en-curso .m-col.diff .num { color: var(--ink-3); font-weight: 400; }
.badge { justify-self: end; font-size: .76rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--st-soft); color: var(--st); white-space: nowrap; }
.mrow .chev, .fold .chev { color: var(--ink-3); transition: transform .2s; }
.mrow[open] > summary .chev, .fold[open] > summary .chev { transform: rotate(180deg); }

.m-body { padding: 8px 20px 22px; border-top: 1px solid var(--line); animation: rise .25s ease-out; }
.m-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; margin: 16px 0 8px; }
.ledger { background: var(--sunken); border-radius: 12px; padding: 18px 18px 8px; }
.lg-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line-2);
  text-decoration: none; color: var(--ink-2); font-size: .92rem; }
.lg-row b { display: inline-block; width: 18px; font-family: var(--mono); font-weight: 600; }
.lg-row .num { color: var(--ink); white-space: nowrap; }
a.lg-row:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.lg-row.plus b, .lg-row.plus .num { color: var(--amber); }
.lg-row.minus b, .lg-row.minus .num { color: var(--blue); }
.lg-row.unexpl, .lg-row.unexpl .num { color: var(--red); font-weight: 600; }
.lg-row.round { color: var(--ink-3); font-size: .84rem; }
.lg-row.round .num { color: var(--ink-3); }
.lg-row.total { border-bottom: 0; border-top: 1.5px solid var(--ink); margin-top: 4px; color: var(--ink); font-weight: 600; }
.lg-row.total .num { font-size: 1.05rem; font-weight: 600; }
.fix { padding: 18px 4px 4px; }
.fix ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--ink-2); font-size: .92rem; }
.fix li::marker { color: var(--ink-3); font-family: var(--mono); }
.fix strong { color: var(--ink); font-family: var(--mono); font-size: .95em; }
.fix p { color: var(--ink-2); margin: 0; }
.ok-line { color: var(--green); font-weight: 500; margin: 16px 0; }

.sub { margin-top: 22px; }
.sub h4 { margin-bottom: 10px; }
.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h4 { margin: 0; }
.fold[open] > summary { margin-bottom: 10px; }
.count { font-family: var(--mono); font-size: .74rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); }
.count.soft { background: var(--sunken); color: var(--ink-2); }

/* tables */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.t { width: 100%; border-collapse: collapse; font-size: .86rem; }
.t th { text-align: left; font-weight: 500; font-size: .74rem; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: color-mix(in srgb, var(--sunken) 70%, transparent); }
.t .r, .t td.n { text-align: right; white-space: nowrap; }
.t td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.t .strong { font-weight: 600; }
.t td small { display: block; font-size: .76rem; }
.who { display: block; font-weight: 500; max-width: 280px; }
.late { color: var(--amber); font-weight: 500; white-space: nowrap; }
.chip { display: inline-block; padding: 1px 7px; margin: 0 4px 4px 0; border-radius: 6px; background: var(--sunken); border: 1px solid var(--line); font-size: .8rem; white-space: nowrap; }
.uuid { font: 500 .78rem var(--mono); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-2); cursor: copy; white-space: nowrap; }
.uuid::after { content: "…⧉"; margin-left: 2px; color: var(--ink-3); }
.uuid:hover { border-color: var(--ink-3); color: var(--ink); }
.uuid.copied { background: var(--green-soft); color: var(--green); border-color: transparent; }
.uuid.copied::after { content: " ✓"; color: var(--green); }

.m-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.formula { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--ink-3); }
.formula b { color: var(--ink-2); font-weight: 500; }
.decl-src { margin: 0; color: var(--ink-2); line-height: 1.6; }
.src-tag { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .02em; padding: 1px 7px; border-radius: 99px;
  background: var(--green-soft); color: var(--green); margin-right: 4px; vertical-align: 1px; }
.decls { margin-top: 48px; }
.decls tr.muted td { color: var(--ink-3); }
.decl-up { margin-top: 16px; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.decl-up label { display: grid; gap: 4px; font-size: .74rem; color: var(--ink-3); font-weight: 500; }
.decl-up p { flex: 1 1 100%; margin: 0; }
form.inline { display: inline; margin-left: 8px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink-3); font: inherit; text-decoration: underline; cursor: pointer; }
.nowrap { white-space: nowrap; }
.decl { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.decl label { display: grid; gap: 4px; font-size: .74rem; color: var(--ink-3); font-weight: 500; }
.decl input { width: 200px; }

input, select { font: 400 .92rem var(--mono); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px;
  height: 40px; padding: 0 12px; max-width: 100%; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--ink-3); font-family: var(--sans); }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=file] { font-family: var(--sans); padding: 8px; height: auto; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }

/* other checks */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.check { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.check:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.check-n { font-size: 1.5rem; font-weight: 500; color: var(--amber); }
.check-t { font-size: .84rem; color: var(--ink-2); line-height: 1.3; }
.check.zero .check-n { color: var(--ink-3); }
.check.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.panel { margin-top: 16px; }
.dt-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.dt-bar input { width: 100%; max-width: 360px; font-family: var(--sans); }
.dt-pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: .82rem; color: var(--ink-3); }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--ink); }
.t th.asc::after { content: " ↑"; } .t th.desc::after { content: " ↓"; }
.empty-t { color: var(--ink-3); padding: 18px 0; }

.tops { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tops h2 { margin-bottom: 12px; }

/* ---------- cards / forms (other pages) ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; box-shadow: var(--shadow); }
.narrow { max-width: 560px; margin: 0 auto; }
.card h1 { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1.1; margin-bottom: 8px; }
.card > p.sub-t { color: var(--ink-2); margin: 0 0 22px; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .88rem; }
.form label.check-l { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink-2); }
.form .btn { justify-self: start; }
.hint { color: var(--ink-3); font-size: .84rem; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin: 0 0 16px; }
.alert.bad { background: var(--red-soft); color: var(--red); }
.alert.ok { background: var(--green-soft); color: var(--green); }
.alert.warn { background: var(--amber-soft); color: var(--amber); }
.stack { display: grid; gap: 20px; }
.danger-zone { border-color: color-mix(in srgb, var(--red) 30%, var(--line)); }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { display: grid; gap: 4px; font-size: .78rem; color: var(--ink-3); }

/* drop zone for e.firma files */
.drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--line-2); border-radius: 12px;
  background: var(--sunken); transition: border-color .15s, background .15s; cursor: pointer; }
.drop:hover, .drop.has { border-color: var(--brand); }
.drop.has { background: var(--brand-soft); border-style: solid; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; height: 100%; }
.drop-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; font: 600 .7rem var(--mono); color: var(--ink-2); border: 1px solid var(--line); flex-shrink: 0; }
.drop-t { display: grid; }
.drop-t strong { font-weight: 600; font-size: .92rem; }
.drop-t small { color: var(--ink-3); font-size: .8rem; }
.privacy { display: flex; gap: 10px; padding: 12px 14px; background: var(--sunken); border-radius: 10px; font-size: .84rem; color: var(--ink-2); }

/* progress */
.steps { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 0; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 10px 0; color: var(--ink-3); position: relative; }
.steps li::before { content: ""; width: 18px; height: 18px; margin: 2px 0 0 4px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 32px; bottom: -8px; width: 2px; background: var(--line); }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 3px var(--surface); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now::before { border-color: var(--brand); border-right-color: transparent; animation: spin .9s linear infinite; }
.steps .sub-s { grid-column: 2; display: block; font-weight: 400; color: var(--ink-3); font-size: .84rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* landing */
.land { max-width: 900px; padding-top: 30px; }
.land .display { font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 16ch; }
.land-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.land-grid h3 { color: var(--ink); text-transform: none; letter-spacing: -.01em; font-size: 1rem; }
.land-grid p { margin: 0; color: var(--ink-2); font-size: .92rem; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .mrow > summary { grid-template-columns: 1fr auto 16px; gap: 6px 12px; }
  .mrow > summary .m-col { display: none; }
  .mrow > summary .m-col.diff { display: grid; grid-column: 1; grid-row: 2; justify-items: start; }
  .mrow > summary .badge { grid-column: 2; grid-row: 1 / 3; }
  .mrow > summary .chev { grid-column: 3; grid-row: 1 / 3; }
  .m-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .tops, .land-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .bar-in { height: auto; min-height: 60px; flex-wrap: wrap; padding: 8px 16px; gap: 8px; }
  .logo span { display: none; }
  .pickers { order: 3; flex-basis: 100%; overflow-x: auto; }
  .picker > summary { max-width: 220px; padding: 4px 8px; }
  .hide-sm { display: none; }
  .page { padding: 28px 16px 48px; }
  .mrow > summary, .m-body { padding-left: 14px; padding-right: 14px; }
  .decl input { width: 100%; }
  .decl label { flex: 1 1 100%; }
  .row2 { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .menu-pop { position: fixed; left: 12px; right: 12px; top: 64px; min-width: 0; }
}
.mt { margin-top: 16px; }
.slim { max-width: 440px; }
.display.sm { font-size: 2.4rem; }
.dtable .t td { white-space: nowrap; }
.dtable .t td:not(.n) { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.st-riesgo { --st: var(--red); --st-soft: var(--red-soft); }
.st-a-favor, .st-sin-cambios { --st: var(--green); --st-soft: var(--green-soft); }
.st-a-favor .m-col.diff .num, .st-sin-cambios .m-col.diff .num { color: var(--ink-3); font-weight: 400; }
.st-a-favor .cell-v, .st-sin-cambios .cell-v { color: var(--green); }
.ledger.est { background: repeating-linear-gradient(135deg, var(--sunken) 0 10px, color-mix(in srgb, var(--sunken) 70%, var(--surface)) 10px 20px); }
.lg-row.result { border-bottom: 0; color: var(--ink); font-weight: 600; }
.lg-row.result.bad .num { color: var(--red); } .lg-row.result.good .num { color: var(--green); }
.callout.info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 20%, transparent); }
.callout.info .callout-ico { background: var(--blue); font-family: var(--serif); font-style: italic; }
.ok-inline { color: var(--green) !important; font-family: var(--sans) !important; }

/* sales / purchases summary + switch */
.summary { margin-top: 22px; display: grid; gap: 8px; max-width: 820px; }
.sum-row { display: grid; grid-template-columns: 150px 1fr 16px; gap: 16px; align-items: center; padding: 14px 16px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .15s; }
.sum-row:hover { border-color: var(--ink-3); transform: translateX(2px); }
.sum-k { font-weight: 600; display: grid; line-height: 1.25; }
.sum-k small { font-weight: 400; color: var(--ink-3); font-size: .78rem; }
.sum-v { color: var(--ink-2); font-size: .92rem; }
.sum-v b { font-weight: 600; }
.tone-bad { color: var(--red); }
.tone-ok { color: var(--green); }
.chev-r { color: var(--ink-3); }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--sunken); border: 1px solid var(--line); gap: 2px; }
.seg-b { border: 0; background: transparent; font: 500 .88rem var(--sans); color: var(--ink-2); padding: 7px 14px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg-b.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.method { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; margin: -4px 0 16px; max-width: 900px; }
.info-dot { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center;
  font: italic 600 .8rem var(--serif); margin-top: 1px; }
.grp-t { margin: 22px 0 10px; }
.grp-t:first-of-type { margin-top: 0; }
@media (max-width: 680px) {
  .sum-row { grid-template-columns: 1fr 16px; }
  .sum-k { grid-column: 1 / -1; }
  .seg { width: 100%; } .seg-b { flex: 1; justify-content: center; padding: 7px 6px; font-size: .8rem; }
}

/* changes since the previous analysis */
.nov { margin: 40px 0 8px; padding: 20px 24px; border: 1px solid var(--line); border-left: 3px solid var(--amber);
  border-radius: var(--r); background: var(--surface); }
.nov h2 { font-size: 1.05rem; margin: 0 0 10px; }
.nov-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.nov-list li { padding-left: 16px; position: relative; line-height: 1.5; }
.nov-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.nov-list li.bad::before { background: var(--red); }
.nov-list a { font-weight: 600; }
.nov-list .uuid { margin-left: 4px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.nov-none { margin: 28px 0 0; display: flex; align-items: center; gap: 8px; }
.ok-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ---------- saldo a favor ---------- */
.saldo { margin-top: 48px; }
.saldo .clasif { margin-top: 28px; display: grid; gap: 10px; }
.saldo .clasif h3 { margin: 0; font-size: 1rem; }
.saldo .clasif .btn { justify-self: start; }
.saldo .fix ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .9rem; }

/* XML download options */
.xml-form { display: grid; gap: 14px; }
.xml-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 14px; margin: 0; min-width: 0; }
.xml-form legend { font-size: .85rem; font-weight: 600; padding: 0 6px; }
.xml-row { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.xml-row label { display: grid; gap: 4px; font-size: .85rem; min-width: 0; }
.xml-row select, .xml-row input { max-width: 100%; }
.xml-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.xml-preview { margin: 0; padding: 10px 12px; background: var(--sunken); border-radius: 8px; overflow-wrap: anywhere; }
.xml-form .btn-primary { justify-self: start; }

/* Month picker (replaces the native <input type=month> popup) */
.mp { position: relative; display: block; }
.mp-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-width: 11.5rem; height: 40px;
  padding: 0 12px; font: 400 .92rem var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 9px; cursor: pointer; text-align: left; }
.mp-btn:hover { border-color: var(--ink-3); }
.mp-btn:focus-visible, .mp-btn[aria-expanded=true] { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.mp-ph { color: var(--ink-3); }
.mp-ico { width: 16px; height: 16px; flex: none; border: 1.6px solid var(--ink-3); border-radius: 4px; position: relative; }
.mp-ico::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1.6px solid var(--ink-3); }
.mp-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 280px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 12px; }
.mp-right .mp-pop { left: auto; right: 0; }
.mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mp-head strong { font: 600 1rem var(--sans); font-variant-numeric: tabular-nums; }
.mp-nav { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2);
  font-size: 1.3rem; line-height: 1; cursor: pointer; }
.mp-nav:hover:not(:disabled) { background: var(--sunken); color: var(--ink); }
.mp-nav:disabled { opacity: .3; cursor: default; }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mp-m { height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: 500 .9rem var(--sans); cursor: pointer; }
.mp-m:hover:not(:disabled) { background: var(--sunken); }
.mp-m.rng { background: var(--brand-soft); border-radius: 0; }
.mp-m.other { box-shadow: inset 0 0 0 1.5px var(--brand); }
.mp-m.now:not(.sel) { color: var(--brand); font-weight: 700; }
.mp-m.sel { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.mp-m:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
.mp-m:focus-visible, .mp-nav:focus-visible, .mp-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.mp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.mp-link { border: 0; background: transparent; color: var(--brand); font: 600 .85rem var(--sans); padding: 6px 8px; border-radius: 7px; cursor: pointer; }
.mp-link:hover:not(:disabled) { background: var(--brand-soft); }
.mp-link:disabled { color: var(--ink-3); cursor: default; }
