/* Public calculators (calculator.html, calculadora_sueldo_neto.html, calculadora_cuota_autonomos.html):
   the tool itself (.kc-*) on top of kuotia-site.css; the page around it uses the site's sections. */
.sec.sec-tool { padding-top: 24px; }
.sec-tool + .sec { border-top: 0; }
.kc-eyebrow { color: var(--accent-ink); font-size: .8125rem; font-weight: 650; margin: 0; }
.kc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.kc-card h2 { font-size: 1.125rem; line-height: 1.4; margin: 0 0 20px; letter-spacing: -.01em; }
.kc-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 16px; }
.kc-field { min-width: 0; }
.kc-wide { grid-column: 1 / -1; }
.kc-field label { display: block; color: var(--ink); font-size: .875rem; line-height: 1.5; font-weight: 600; margin-bottom: 8px; }
.kc-field input, .kc-field select { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-btn); color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.5; }
.kc-field input { font-weight: 600; text-align: left; }
.kc-field input::placeholder { color: var(--muted); font-size: .875rem; font-weight: 400; }
.kc-field input:focus-visible, .kc-field select:focus-visible, .kc-options summary:focus-visible { outline: none; box-shadow: var(--focus); }
.kc-field input[aria-invalid=true], .kc-field select[aria-invalid=true] { border-color: var(--danger-line); }
.kc-help { color: var(--muted); font-size: .8125rem; line-height: 1.6; margin: 8px 0 0; }
.kc-help a { color: var(--accent-ink); }
.kc-options { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 12px; }
.kc-options summary { cursor: pointer; font-size: .875rem; font-weight: 600; min-height: 44px; padding: 12px 0; }
.kc-options > .kc-fields, .kc-options > .kc-field { margin-top: 12px; }
.kc-check { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; line-height: 1.6; min-height: 44px; margin-top: 14px; }
.kc-check input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; accent-color: var(--accent); }
.kc-error { margin: 18px 0 12px; font-size: .875rem; line-height: 1.6; color: var(--danger-line); }
.kc-status { margin: 0 0 10px; min-height: 1.4em; font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.kc-tool [hidden] { display: none !important; }
@media (max-width: 520px) {
  .kc-card { padding: 20px; }
  .kc-fields { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

/* Cuota calculator: server-rendered result */
.kc-submit { margin-top: 22px; width: 100%; }
.kc-per { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.kc-table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow-x: auto; }
.kc-tramos { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.kc-tramos th, .kc-tramos td { padding: 12px 18px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; color: var(--ink-2); }
.kc-tramos th:first-child, .kc-tramos td:nth-child(2) { text-align: left; }
.kc-tramos thead th { background: var(--surface-2); font-weight: 600; white-space: normal; vertical-align: bottom; }
.kc-tramos tbody th { color: var(--ink); font-weight: 600; }
.kc-tramos tbody tr:last-child > * { border-bottom: 0; }
.kc-tramos tr.kc-group th { text-align: left; background: var(--bg-soft); color: var(--muted); font-size: var(--fs-xs); font-weight: 650; padding-top: 8px; padding-bottom: 8px; }
.kc-tramos tr.kc-mine > * { background: var(--accent-soft); color: var(--ink); font-weight: 650; }
.kc-tramos tr.kc-mine th { box-shadow: inset 3px 0 0 var(--accent); }
.kc-after-table { margin-top: 14px; font-size: var(--fs-sm); max-width: 80ch; }
@media (max-width: 600px) {
  .kc-tramos .kc-base { display: none; }
  .kc-tramos th, .kc-tramos td { padding: 10px 6px; font-size: .75rem; }
  .kc-tramos th:first-child { padding-left: 12px; }
  .kc-tramos tr > :last-child { padding-right: 12px; }
}

/* ───────────── Calculadora de cuota (calculadora_cuota_autonomos.html, .cq) ─────────────
   Head: the 15 tramos as a staircase of minimum cuotas (.cq-stairs). Tool: form + result card with the figure
   (counts up, js/calculadora_cuota.js), the scale of the 15 tramos with yours raised (.cq-scale), the minimum and
   maximum as bars (.cq-range). Then the step line from income to tramo (.cq-flow), the six change windows (.cq-win),
   the regularización timeline (.cq-tl), the tarifa plana card (.cq-tp) and link cards (.cq-links). Heights and widths
   come from the engine's figures (widthratio), never typed. Everything plays once on screen ([data-play]); without JS
   or with reduced motion the final state shows. */
.cq { --cq-red: color-mix(in srgb, var(--accent) 38%, var(--line-strong)); }
.cq-head h1 { max-width: 15ch; }
.page-head-pv .wrap > .cq-stairs { grid-column: 7 / -1; }
@media (max-width: 960px) { .page-head-pv .wrap > .cq-stairs { grid-column: 1; max-width: 560px; } }

.cq-stairs { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); padding: 20px 22px 16px; }
.cq-stairs-cap { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cq-stairs-cap b { font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.cq-stairs-cap small { color: var(--muted); font-size: var(--fs-xs); }
.cq-bars { list-style: none; margin: 0; padding: 44px 0 0; height: 250px; display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 5px; align-items: end; }
.cq-bars li { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.cq-bars li > i { display: block; height: var(--h); border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--accent) 55%, var(--surface)); transform-origin: 50% 100%; animation: cq-up .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--n) * 45ms + 150ms); }
.cq-bars li.is-red > i { background: var(--cq-red); }
.cq-bars li.is-mine > i { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.cq-bar-v { position: absolute; z-index: 1; padding: 1px 4px; border-radius: 5px; background: var(--surface); bottom: calc(var(--h) + 6px); left: 50%; translate: -50% 0; white-space: nowrap; font-size: 12.5px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.cq-bars li:first-child .cq-bar-v { left: 0; translate: 0 0; }
.cq-bars li:last-child .cq-bar-v { left: auto; right: 0; translate: 0 0; }
.cq-bar-you { position: absolute; bottom: calc(var(--h) + 6px); left: 50%; translate: -50% 0; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; white-space: nowrap; }
.cq-bars li:first-child .cq-bar-you, .cq-bars li:last-child .cq-bar-you { bottom: calc(var(--h) + 26px); }
.cq-axis { display: grid; grid-template-columns: 3fr 12fr; gap: 5px; margin-top: 8px; font-size: 11.5px; font-weight: 650; color: var(--muted); }
.cq-axis span { padding-top: 6px; border-top: 2px solid var(--cq-red); }
.cq-axis .cq-axis-gen { border-top-color: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.cq-stairs-foot { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line-strong); color: var(--muted); font-size: var(--fs-xs); }
.cq-stairs-foot span:nth-child(2) { color: var(--ink-2); font-weight: 600; text-align: center; }
@keyframes cq-up { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.sec.cq-stats-sec { padding: 0 0 var(--sec-y); border-top: 0; }
.cq-stats-sec .kstat { margin-top: 0 !important; }

/* Tool */
.cq-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--col-gap); align-items: start; }
.cq-form { position: sticky; top: calc(var(--head-h) + 24px); }
.cq-form-k { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; font-weight: 650; color: var(--ink); }
.cq-form-k .pv-i { width: 18px; height: 18px; color: var(--accent-ink); }
.cq-input { position: relative; }
.cq-input input { padding-right: 36px; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.cq-input span { position: absolute; right: 14px; top: 50%; translate: 0 -50%; color: var(--muted); font-weight: 600; pointer-events: none; }
.cq-private { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.cq-private .pv-i { width: 14px; height: 14px; color: var(--success); }
.cq-result { border-top: 3px solid var(--accent); box-shadow: var(--shadow-sheet); padding: 26px 28px; }
.cq-big { margin: 10px 0 0; font-size: clamp(2.4rem, 4.4vw, 3.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -.045em; color: var(--ink); font-variant-numeric: tabular-nums; }
.cq-big b { font-weight: 700; }
.cq-tramo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; color: var(--ink-2); font-size: var(--fs-sm); }
.cq-chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); font-weight: 650; font-size: var(--fs-xs); white-space: nowrap; }

.cq-scale { margin-top: 26px; padding: 44px 0 0; }
.cq-scale-g { display: grid; grid-template-columns: 3fr 12fr; gap: 4px; margin-top: 8px; font-size: 11px; font-weight: 650; color: var(--muted); }
.cq-segs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 4px; }
.cq-segs li { position: relative; height: 30px; display: grid; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink-2); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cq-segs li.is-red { background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
.cq-segs li.is-mine { background: var(--accent); color: var(--on-accent); transform: scaleY(1.25); box-shadow: 0 8px 18px -10px var(--accent); }
.cq-segs li.is-mine > span { transform: scaleY(.8); }
.cq-pin { position: absolute; bottom: calc(100% + 10px); left: 50%; translate: -50% 0; transform: scaleY(.8); transform-origin: 50% 100%; padding: 4px 9px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 650; white-space: nowrap; }
.cq-pin::after { content: ""; position: absolute; top: 100%; left: 50%; translate: -50% 0; border: 5px solid transparent; border-top-color: var(--ink); }
.cq-segs li.is-start .cq-pin { left: 0; translate: 0 0; } .cq-segs li.is-start .cq-pin::after { left: 10px; }
.cq-segs li.is-end .cq-pin { left: auto; right: 0; translate: 0 0; } .cq-segs li.is-end .cq-pin::after { left: auto; right: 4px; translate: 0 0; }
.cq-scale-ends { display: flex; justify-content: space-between; margin-top: 4px; color: var(--muted); font-size: var(--fs-xs); }

.cq-range { margin: 26px 0 0; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.cq-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.cq-r dt { color: var(--ink-2); font-size: var(--fs-sm); }
.cq-r dd { margin: 0; font-weight: 650; font-size: 1.25rem; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.cq-r-bar { grid-column: 1 / -1; height: 12px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.cq-r-bar i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: var(--accent); transform-origin: 0 50%; }
.cq-r.is-max .cq-r-bar i { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.cq-r small { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.cq-year { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); }
.cq-year b { color: var(--ink); font-size: 1.125rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cq-tp-link { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--ink-2); font-size: var(--fs-sm); text-decoration: none; }
.cq-tp-link:hover { background: var(--accent-soft); color: var(--ink); }
.cq-tp-link .pv-i { width: 18px; height: 18px; color: var(--accent-ink); flex: none; }
.cq-tp-link b { color: var(--ink); }

/* Result plays once on screen: the scale lights up tramo by tramo up to yours, the bars grow */
.cq-result[data-play-ready]:not(.is-playing) .cq-segs li.is-mine { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink-2); transform: none; box-shadow: none; }
.cq-result[data-play-ready]:not(.is-playing) :is(.cq-pin, .cq-r-bar i) { opacity: 0; }
.cq-result.is-playing .cq-segs li:not(.is-mine) { animation: cq-seg .5s ease both; animation-delay: calc(var(--n) * 40ms); }
.cq-result.is-playing .cq-segs li.is-mine { animation: cq-mine .55s cubic-bezier(.2, .8, .3, 1.4) both; animation-delay: .55s; }
.cq-result.is-playing .cq-pin { animation: who-in .45s ease both; animation-delay: .95s; }
.cq-result.is-playing .cq-r-bar i { animation: cmp-grow .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--n) * 120ms + .5s); }
@keyframes cq-seg { 0% { opacity: .35; } 100% { opacity: 1; } }
@keyframes cq-mine { from { transform: scaleY(1); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink-2); } to { transform: scaleY(1.25); } }

/* From income to tramo: one step per adjustment, joined by a line that fills */
.cq-flow { list-style: none; margin: 0; padding: 28px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); }
.cq-flow li { position: relative; min-width: 0; }
.cq-flow li:not(:last-child)::after { content: ""; position: absolute; top: 21px; left: 54px; right: -18px; height: 3px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 100% no-repeat, var(--line); }
.cq-node { position: relative; z-index: 1; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--accent); box-shadow: 0 8px 18px -10px var(--accent); }
.cq-node .pv-i { width: 20px; height: 20px; }
.cq-flow li.is-end .cq-node { background: var(--success-mark); box-shadow: 0 8px 18px -10px var(--success-mark); }
.cq-op { position: absolute; z-index: 2; top: 10px; left: -27px; min-width: 26px; height: 24px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.cq-txt { margin-top: 16px; }
.cq-txt small { display: block; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; }
.cq-txt b { display: block; margin-top: 4px; font-size: 1.25rem; font-weight: 650; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cq-txt p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; }
.cq-txt p.cq-flow-res { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 650; color: var(--success); background: color-mix(in srgb, var(--success-mark) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--success-mark) 30%, transparent); }
.cq-flow-note { margin-top: 14px; color: var(--muted); font-size: var(--fs-xs); max-width: 80ch; }
.cq-flow[data-play-ready]:not(.is-playing) .cq-node { background: var(--bg-soft); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cq-flow[data-play-ready]:not(.is-playing) :is(.cq-txt, .cq-op) { opacity: 0; }
.cq-flow[data-play-ready]:not(.is-playing) li::after { background-size: 0 100%, auto; }
.cq-flow.is-playing .cq-node { animation: cq-node .5s cubic-bezier(.2, .8, .3, 1.3) both; animation-delay: calc(var(--i, 0) * .45s); }
.cq-flow.is-playing :is(.cq-txt, .cq-op) { animation: who-in .45s ease both; animation-delay: calc(var(--i, 0) * .45s + .1s); }
.cq-flow.is-playing li::after { animation: lane-fill-x .4s ease-in-out both; animation-delay: calc(var(--i, 0) * .45s + .3s); }
.cq-flow li:nth-child(1) { --i: 0; } .cq-flow li:nth-child(2) { --i: 1; } .cq-flow li:nth-child(3) { --i: 2; } .cq-flow li:nth-child(4) { --i: 3; } .cq-flow li:nth-child(5) { --i: 4; }
@keyframes cq-node { from { transform: scale(.6); background: var(--bg-soft); color: var(--muted); } to { transform: none; } }

/* Six windows to change tramo */
.cq-win { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); padding: 20px 22px 16px; }
.cq-win-cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cq-win-cap b { color: var(--ink); font-weight: 650; }
.cq-win-cap span { color: var(--muted); font-size: var(--fs-xs); }
.cq-win-row { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.cq-win-row li { display: flex; flex-direction: column; gap: 10px; }
.cq-win-asks { order: 2; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.4; }
.cq-win-row b { order: 1; display: block; padding: 10px 10px 11px; font-size: 1.125rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; border-radius: 10px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent-ink); font-weight: 700; line-height: 1.3; }
.cq-win-row b small { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0; opacity: .8; }
.cq-win-row li:last-child b { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); border-style: dashed; }
.cq-win-row.is-playing b { animation: who-in .4s ease both; animation-delay: calc(var(--n) * 110ms); }
.cq-win-foot { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-strong); color: var(--ink-2); font-size: var(--fs-xs); }
.cq-win-foot .pv-i { width: 15px; height: 15px; margin-top: 1px; color: var(--warn-line); flex: none; }

/* Regularización: a small timeline, then the three outcomes */
.cq-tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--col-gap); position: relative; }
.cq-tl li { position: relative; display: flex; flex-direction: column; gap: 4px; }
.cq-tl li:not(:last-child)::after { content: ""; position: absolute; top: 19px; left: 48px; right: calc(var(--col-gap) * -1 + 8px); height: 2px; background: linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 100% no-repeat, var(--line); }
.cq-tl-dot { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); color: var(--accent-ink); margin-bottom: 10px; }
.cq-tl-dot .pv-i { width: 18px; height: 18px; }
.cq-tl time { font-size: var(--fs-xs); font-weight: 700; color: var(--accent-ink); }
.cq-tl b { color: var(--ink); font-weight: 650; line-height: 1.35; }
.cq-tl small { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }
.cq-tl[data-play-ready]:not(.is-playing) li::after { background-size: 0 100%, auto; }
.cq-tl.is-playing li::after { animation: lane-fill-x .5s ease-in-out both; animation-delay: calc(var(--s) * .45s + .3s); }
.cq-tl.is-playing .cq-tl-dot { animation: cq-node .45s cubic-bezier(.2, .8, .3, 1.3) both; animation-delay: calc(var(--s) * .45s); }
.cq-outs { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; margin-top: 36px !important; }

/* Tarifa plana */
.cq-tp { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px var(--col-gap); align-items: center; }
.cq-tp-copy p { margin-top: 14px; color: var(--ink-2); font-size: var(--fs-read); }
.cq-tp-copy .link-arrow { margin-top: 20px; }
.cq-tp-art { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); padding: 24px; }
.cq-tp-price { display: flex; align-items: flex-end; gap: 12px; }
.cq-tp-price b { font-size: clamp(3rem, 6vw, 4.25rem); font-weight: 700; letter-spacing: -.05em; line-height: .95; color: var(--accent-ink); }
.cq-tp-price span { padding-bottom: 6px; color: var(--ink); font-weight: 600; }
.cq-tp-price small { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.cq-tp-track { display: grid; grid-template-columns: 12fr 12fr 7fr; gap: 6px; margin-top: 22px; }
.cq-tp-seg { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px; border-radius: 10px; font-size: var(--fs-xs); line-height: 1.35; }
.cq-tp-seg span { color: inherit; opacity: .85; font-weight: 600; }
.cq-tp-seg b { font-weight: 650; }
.cq-tp-seg.is-tp { background: var(--accent); color: var(--on-accent); }
.cq-tp-seg.is-maybe { background: var(--accent-soft); color: var(--accent-ink); border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.cq-tp-seg.is-tramo { background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }

/* The cuota view in the calculator tour (its pv-cu-* rules live in kuotia-site.css, shared with the guides) */
.cq-tour .feature-art .pv { max-width: 600px; margin-left: auto; }

/* Further reading */
.cq-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cq-links a { height: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.45; text-decoration: none; transition: border-color .15s, background-color .15s; }
.cq-links a > .kc-tile { grid-row: 1 / span 2; }
.cq-links a b { color: var(--ink); font-weight: 650; }
.cq-links a:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.cq-links a:hover b { color: var(--accent-ink); }

/* Table: yours marked in words */
.cq-you { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 700; vertical-align: 1px; }

.cq-sources { font-size: var(--fs-sm); color: var(--ink-2); }
.cq-sources ul { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.cq-sources li { padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.cq-sources a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); word-break: break-word; }

@media (max-width: 1100px) {
  .cq-flow { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .cq-flow li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
  .cq-flow li:not(:last-child)::after { top: 52px; bottom: -16px; left: 20.5px; right: auto; width: 3px; height: auto; background: linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 100% no-repeat, var(--line); }
  .cq-flow[data-play-ready]:not(.is-playing) li::after { background-size: 100% 0, auto; }
  .cq-flow.is-playing li::after { animation-name: lane-fill-y; }
  .cq-op { top: -20px; left: 22px; translate: -50% 0; }
  .cq-txt { margin-top: 0; }
  .cq-flow li:not(:first-child) .cq-txt { padding-top: 0; }
}
@media (max-width: 960px) {
  .cq-layout, .cq-tp { grid-template-columns: minmax(0, 1fr); }
  .cq-form { position: static; }
  .cq-tl { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .cq-tl li:nth-child(2)::after { display: none; }
  .cq-outs { grid-template-columns: minmax(0, 1fr) !important; }
  .cq-tour .feature-art .pv { margin: 0 auto; }
}
@media (max-width: 760px) {
  .cq-win-row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .cq-links { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .cq-stairs { padding: 16px 14px 12px; }
  .cq-bars { height: 200px; gap: 3px; padding-top: 40px; }
  .cq-bar-v { font-size: 11px; }
  .cq-result { padding: 22px 18px; }
  .cq-segs { gap: 2px; }
  .cq-segs li { font-size: 10.5px; height: 28px; border-radius: 4px; }
  .cq-scale-g { gap: 2px; }
  .cq-tl { grid-template-columns: minmax(0, 1fr); }
  .cq-tl li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; }
  .cq-tl li > :not(.cq-tl-dot) { grid-column: 2; }
  .cq-tl-dot { grid-row: 1 / span 3; margin-bottom: 0; }
  .cq-tl li:not(:last-child)::after, .cq-tl li:nth-child(2)::after { display: block; top: 46px; bottom: -22px; left: 19px; right: auto; width: 2px; height: auto; background: linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 100% no-repeat, var(--line); }
  .cq-tl[data-play-ready]:not(.is-playing) li::after { background-size: 100% 0, auto; }
  .cq-tl.is-playing li::after { animation-name: lane-fill-y; }
  .cq-tp-art { padding: 18px; }
  .cq-tp-track { grid-template-columns: minmax(0, 1fr); }
  .kc-tramos .cq-you { display: none; }
}

/* ───────────── Calculadora de autónomos (calculator.html, .cg on top of .cq) ─────────────
   Head: "de cada 100 € que facturas" (.cg-hundred), four incomes as stacked bars of gastos, cuota, IRPF and what is
   left. Tool: form with the tarifa plana switch (.cg-switch), result card with the figure (counts, js/calculadora_
   autonomos.js), the year / month switch (.cg-per), the stacked bar of where the money goes (.cg-stack-lg), its
   lines with shares (.cg-lines) and three rates (.cg-rates). Then the step line (.cq-flow), the IRPF scale row by row
   (.cg-brk) and the comunidades (.cg-ccaa). Segment sizes are the engine's amounts (flex-grow) and bar lengths its
   shares, never typed. Colours: .s-gas neutral, .s-cuo amber, .s-irpf brand, .s-neto green, always with a word. */
.cg { --s-gas: color-mix(in srgb, var(--muted) 42%, var(--surface)); --s-cuo: var(--warn-line); --s-irpf: var(--accent); --s-neto: var(--success-mark); }
.cg .s-gas { background: var(--s-gas); } .cg .s-cuo { background: var(--s-cuo); } .cg .s-irpf { background: var(--s-irpf); } .cg .s-neto { background: var(--s-neto); }
.cg [hidden] { display: none !important; }
.cg-head h1 { max-width: 13ch; }
.page-head-pv .wrap > .cg-hundred { grid-column: 7 / -1; }
@media (max-width: 960px) { .page-head-pv .wrap > .cg-hundred { grid-column: 1; max-width: 560px; } }

.cg-stack { display: flex; gap: 2px; height: 22px; border-radius: 7px; overflow: hidden; background: var(--bg-soft); }
.cg-stack i { display: block; flex: 0 0 0; min-width: 0; transition: flex-grow .6s cubic-bezier(.2, .7, .2, 1); }
.cg-stack i[style*="flex-grow:0"] { margin-left: -2px; }

.cg-hundred { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); padding: 20px 22px 16px; }
.cg-hrows { list-style: none; margin: 0; padding: 6px 0 0; display: grid; gap: 4px; }
.cg-hrows li { position: relative; display: grid; grid-template-columns: 5.6em minmax(0, 1fr) 4.6em; gap: 14px; align-items: center; padding: 12px 10px; border-radius: 12px; }
.cg-hrows li.is-ex { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.cg-hk, .cg-hv { margin: 0; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cg-hk b { display: block; color: var(--ink); font-weight: 650; white-space: nowrap; }
.cg-hk small, .cg-hv small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.cg-hv { text-align: right; }
.cg-hv b { display: block; color: var(--success); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.cg-hrows .cg-stack { height: 26px; clip-path: inset(0 0 0 0 round 7px); animation: cg-reveal .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--n) * 120ms + 200ms); }
.cg-hex { position: absolute; top: -9px; left: 10px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; }
.cg-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 12px 10px 0; border-top: 1px dashed var(--line-strong); color: var(--ink-2); font-size: var(--fs-xs); }
.cg-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cg-legend i, .cg-lines dt i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
@keyframes cg-reveal { from { clip-path: inset(0 100% 0 0 round 7px); } to { clip-path: inset(0 0 0 0 round 7px); } }

/* Form */
.cg-cuota { margin: 22px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.cg-cuota legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-size: .875rem; font-weight: 600; color: var(--ink); }
.cg-cuota legend + * { clear: both; }
.cg-switch { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 44px; margin-bottom: 16px; cursor: pointer; }
.cg-switch input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.cg-switch-ui { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); transition: background-color .2s; }
.cg-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.cg-switch input:checked + .cg-switch-ui { background: var(--accent); }
.cg-switch input:checked + .cg-switch-ui::after { transform: translateX(18px); }
.cg-switch input:focus-visible + .cg-switch-ui { box-shadow: var(--focus); }
.cg-switch b { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); }
.cg-switch small { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.cg-form .kc-options + .kc-options { margin-top: 0; }

/* Result */
.cg-res-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; }
.cg-ex-tag { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 650; }
.cg-per { display: inline-flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); }
.cg-per[hidden] { display: none !important; }
.cg-per button { min-height: 36px; min-width: 76px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font: inherit; font-size: var(--fs-xs); font-weight: 650; cursor: pointer; }
.cg-per button[aria-pressed=true] { background: var(--surface); color: var(--accent-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.cg-per button:focus-visible { outline: none; box-shadow: var(--focus); }
.cg-big { color: var(--success); }
.cg-result.is-loss .cg-big { color: var(--danger-line); }
.cg-sub { margin: 10px 0 0; color: var(--ink-2); font-size: var(--fs-sm); }
.cg-sub b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cg-bar { margin-top: 22px; }
.cg-stack-lg { height: 46px; gap: 3px; border-radius: 12px; }
.cg-stack-lg i:first-child { border-radius: 0; }
.cg-loss { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--danger-line); font-size: var(--fs-sm); font-weight: 600; }
.cg-loss .pv-i { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.cg-lines { margin: 18px 0 0; }
.cg-l { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cg-l dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: var(--ink-2); font-size: var(--fs-sm); }
.cg-l dt i { align-self: center; }
.cg-l-note { color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.cg-l dd { margin: 0; display: flex; align-items: baseline; gap: 10px; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cg-l dd small { min-width: 3.9em; text-align: right; color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.cg-l.is-in dt, .cg-l.is-in dd { color: var(--ink); font-weight: 600; }
.cg-l.is-in dd { padding-right: calc(3.9em + 10px); }
.cg-l.is-total { border-bottom: 0; }
.cg-l.is-total dt, .cg-l.is-total dd { color: var(--success); font-weight: 700; font-size: 1rem; }
.cg-result.is-loss .cg-l.is-total dt, .cg-result.is-loss .cg-l.is-total dd { color: var(--danger-line); }
.cg-rates { list-style: none; margin: 8px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cg-rates li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cg-rates span { color: var(--ink-2); font-size: var(--fs-xs); }
.cg-rates b { color: var(--ink); font-size: 1.375rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cg-rates small { color: var(--muted); font-size: 11.5px; }
.cg-note { margin-top: 16px; }
.cg-vat { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); border-left: 3px solid var(--warn-line); background: var(--surface-2); }
.cg-vat[hidden] { display: none; }
.cg-vat-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-xs); font-weight: 650; color: var(--ink-2); }
.cg-vat-h .pv-i { width: 15px; height: 15px; }
.cg-vat-b { margin: 6px 0 0; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.cg-vat .kc-help { margin-top: 4px; }
.cg-status { margin: 12px 0 0; min-height: 0; }
.cg-status:empty { display: none; }
.cg-result :is(.cg-big, .cg-sub, .cg-bar, .cg-lines, .cg-rates) { transition: opacity .2s; }
.cg-result.is-busy :is(.cg-big, .cg-sub, .cg-bar, .cg-lines, .cg-rates) { opacity: .6; }
.cg-result.is-stale :is(.cg-big, .cg-sub, .cg-bar, .cg-lines, .cg-rates, .cg-note, .cq-tp-link) { opacity: .28; filter: grayscale(1); }
.cg-result[data-play-ready]:not(.is-playing) .cg-stack-lg { clip-path: inset(0 100% 0 0 round 12px); }
.cg-result.is-playing .cg-stack-lg { animation: cg-reveal-lg 1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: .25s; }
.cg-result[data-play-ready]:not(.is-playing) .cg-lines .cg-l { opacity: 0; }
.cg-result.is-playing .cg-lines .cg-l { animation: who-in .4s ease both; }
.cg-result.is-playing .cg-l:nth-child(2) { animation-delay: .35s; } .cg-result.is-playing .cg-l:nth-child(3) { animation-delay: .5s; }
.cg-result.is-playing .cg-l:nth-child(4) { animation-delay: .65s; } .cg-result.is-playing .cg-l:nth-child(5) { animation-delay: .85s; }
@keyframes cg-reveal-lg { from { clip-path: inset(0 100% 0 0 round 12px); } to { clip-path: inset(0 0 0 0 round 12px); } }

/* The IRPF scale, row by row */
.cg-flow .cq-txt p.cq-flow-res { margin-top: 8px; color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.cg-scale { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px var(--col-gap); align-items: start; margin-top: clamp(32px, 4vw, 48px); }
.cg-scale-copy h3 { font-size: 1.25rem; letter-spacing: -.01em; }
.cg-scale-copy > p { margin-top: 10px; color: var(--ink-2); font-size: var(--fs-read); }
.cg-sum { margin: 18px 0 0; border-top: 1px solid var(--line); }
.cg-sum > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.cg-sum dt { color: var(--ink-2); }
.cg-sum dd { margin: 0; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cg-sum .is-total { border-bottom: 0; }
.cg-sum .is-total dt, .cg-sum .is-total dd { color: var(--ink); font-weight: 700; font-size: 1.0625rem; }
.cg-brk, .cg-ccaa { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); padding: 20px 22px 16px; }
.cg-brk-rows, .cg-ccaa-rows { list-style: none; margin: 10px 0 0; padding: 0; }
.cg-brk-rows li { display: grid; grid-template-columns: 3.9em minmax(0, 1.05fr) minmax(0, 1fr) 6.4em; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.cg-brk-rows li:last-child { border-bottom: 0; }
.cg-brk-r { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; white-space: nowrap; }
.cg-brk-k { color: var(--ink-2); }
.cg-brk-bar, .cg-cc-bar { height: 10px; border-radius: 5px; background: var(--bg-soft); overflow: hidden; }
.cg-brk-bar i, .cg-cc-bar i { display: block; height: 100%; width: var(--w); min-width: 3px; border-radius: 5px; background: var(--accent); transform-origin: 0 50%; }
.cg-brk-rows b { text-align: right; color: var(--ink); font-weight: 650; white-space: nowrap; }
.cg-brk-none { color: var(--muted); font-size: var(--fs-sm); padding: 8px 0; }

/* Comunidades */
.cg-ccaa-rows li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 9.5em 7em; gap: 14px; align-items: center; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.cg-ccaa-rows li:nth-child(odd):not(.is-mine) { background: var(--surface-2); }
.cg-ccaa-rows li.is-mine { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); font-weight: 650; }
.cg-cc-n { color: var(--ink); min-width: 0; }
.cg-cc-bar i { background: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.cg-ccaa-rows li.is-mine .cg-cc-bar i { background: var(--accent); }
.cg-cc-irpf { color: var(--ink-2); font-size: var(--fs-xs); text-align: right; white-space: nowrap; }
.cg-ccaa-rows b { text-align: right; color: var(--ink); white-space: nowrap; font-weight: 650; }
.cg-ccaa-rows b small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.cg-ccaa-rows li.is-mine b small { color: var(--accent-ink); }
@media (min-width: 961px) { .cg-layout.is-live .cg-submit { display: none; } }

@media (max-width: 960px) {
  .cg-scale { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .cg-hundred { padding: 16px 12px 12px; }
  .cg-hrows li { grid-template-columns: 4.9em minmax(0, 1fr) 4.2em; gap: 10px; padding: 11px 8px; }
  .cg-hv b { font-size: 1.125rem; }
  .cg-rates { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cg-rates b { font-size: 1.125rem; }
  .cg-per button { min-width: 64px; }
  .cg-l dd small { display: none; }
  .cg-l.is-in dd { padding-right: 0; }
  .cg-brk, .cg-ccaa { padding: 16px 14px 12px; }
  .cg-brk-rows li { grid-template-columns: 3.9em minmax(0, 1fr) auto; row-gap: 6px; }
  .cg-brk-bar { grid-column: 1 / -1; grid-row: 2; }
  .cg-ccaa-rows li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .cg-cc-bar { grid-column: 1; grid-row: 2; }
  .cg-cc-irpf { grid-column: 2; grid-row: 2; }
}
.cg-brk .cq-win-cap b span { color: inherit; font-size: inherit; }

/* ───────────── Calculadora de sueldo neto (calculadora_sueldo_neto.html, .sn on top of .cq .cg) ─────────────
   The calculadora de autónomos' pieces with an Empleado / Autónomo radio (.sn-mode): the other mode's fields
   ([data-mode-only]) hide with :has(), also without JS, and the script disables them. 12 or 14 pagas as a segmented
   radio (.sn-seg). In the result, the year's pagas as bars (.sn-pagas: heights from the engine's neto of each paga,
   the extras in the brand colour). Then the same gross as a salary and as an autónomo side by side (.sn-vs, two
   .sn-side cards with the cg stacked bar, the difference in words and colour, and two follow-ups in .sn-then) and the
   comparison table (.sn-cmp on .kc-tramos). Colours as in .cg: amber is what you pay to the Seguridad Social (your
   cotización or your cuota), blue IRPF, green what is left. */
.sn [data-if][hidden] { display: none !important; }
.sn-form:has(input[name=mode][value=autonomo]:checked) [data-mode-only=empleado],
.sn-form:has(input[name=mode][value=empleado]:checked) [data-mode-only=autonomo] { display: none !important; }
.sn-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0 0 22px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); min-width: 0; }
.sn-mode label, .sn-seg label { position: relative; display: block; cursor: pointer; }
.sn-mode input, .sn-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sn-mode label > span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 9px; color: var(--ink-2); font-weight: 650; transition: background-color .15s, color .15s; }
.sn-mode .pv-i { width: 18px; height: 18px; }
.sn-mode input:checked + span { background: var(--surface); color: var(--accent-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.sn-mode input:focus-visible + span, .sn-seg input:focus-visible + span { box-shadow: var(--focus); }
.sn-seg { margin: 0; padding: 0; border: 0; }
.sn-seg legend { display: block; padding: 0; margin-bottom: 8px; color: var(--ink); font-size: .875rem; font-weight: 600; line-height: 1.5; }
.sn-seg-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sn-seg label > span { display: flex; flex-direction: column; justify-content: center; min-height: 54px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--surface-2); color: var(--ink); font-weight: 650; line-height: 1.3; transition: border-color .15s, background-color .15s; }
.sn-seg label > span small { color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.sn-seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sn-seg input:checked + span small { color: var(--accent-ink); }

/* The year's pagas */
.sn-pagas { margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.sn-pagas[hidden] { display: none; }
.sn-pagas figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.sn-pagas figcaption b { color: var(--ink); font-size: var(--fs-sm); font-weight: 650; }
.sn-pagas figcaption span { color: var(--muted); font-size: var(--fs-xs); }
.sn-pagas-row { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.sn-pagas-row li { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 84px; }
.sn-pagas-row i { display: block; height: calc(var(--h) * .62); min-height: 2px; border-radius: 5px 5px 2px 2px; background: var(--s-neto); transform-origin: 50% 100%; }
.sn-pagas-row li.is-extra i { background: color-mix(in srgb, var(--s-neto) 55%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--s-neto); }
.sn-pagas-row span { color: var(--muted); font-size: 10.5px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.sn-pagas-row li.is-extra span { color: var(--success); }
.sn-pagas-row .sn-s { display: none; }
.cg-result.is-playing .sn-pagas-row i { animation: cq-up .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--n) * 45ms + .9s); }
.cg-result[data-play-ready]:not(.is-playing) .sn-pagas-row i { transform: scaleY(0); }
.cg-result.is-stale .sn-pagas { opacity: .28; filter: grayscale(1); }

/* Nómina o autónomo, side by side */
.sn-vs { margin: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sheet); padding: 20px 22px 18px; }
.sn-vs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.sn-side { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); min-width: 0; }
.sn-side.is-aut { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.sn-side header { display: flex; align-items: center; gap: 12px; }
.sn-side header b { display: block; color: var(--ink); font-weight: 650; }
.sn-side header small { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
.sn-side-n { position: relative; display: flex; flex-wrap: wrap; align-items: center; min-height: 48px; gap: 4px 10px; margin: 0; }
.sn-side-n > b { color: var(--success); font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.sn-side-n small { color: var(--ink-2); font-size: var(--fs-sm); }
.sn-diff { margin-left: auto; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sn-side .cg-stack { height: 26px; }
.sn-side-l { margin: 0; }
.sn-side-l > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.sn-side-l > div:last-child { border-bottom: 0; }
.sn-side-l dt { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.sn-side-l dt i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sn-side-l dd { margin: 0; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sn-side-l .is-total dt, .sn-side-l .is-total dd { color: var(--ink); font-weight: 700; }
.sn-then { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sn-then li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); }
.sn-then li[hidden] { display: none; }
.sn-then li.is-good { border-style: solid; border-color: color-mix(in srgb, var(--success-mark) 35%, transparent); background: color-mix(in srgb, var(--success-mark) 8%, var(--surface)); }
.sn-then li.is-good .kc-tile { background: color-mix(in srgb, var(--success-mark) 16%, var(--surface)); color: var(--success); }
.sn-then b { display: block; color: var(--ink); font-weight: 650; line-height: 1.35; }
.sn-then small { display: block; margin-top: 2px; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; }
.sn-extra { margin-top: clamp(28px, 4vw, 40px); }
.sn-vh { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.125rem; font-weight: 650; }
.sn-vh .pv-i { width: 20px; height: 20px; color: var(--accent-ink); }
.sn-table { margin-top: clamp(28px, 4vw, 40px); }
.sn-table h3 { font-size: 1.25rem; letter-spacing: -.01em; }
.sn-table > p { margin: 8px 0 16px; color: var(--ink-2); font-size: var(--fs-sm); max-width: 70ch; }
.sn-cmp th:first-child { white-space: nowrap; }
@media (max-width: 760px) {
  .sn-vs-grid, .sn-then { grid-template-columns: minmax(0, 1fr); }
  .sn-vs { padding: 16px 14px 14px; }
}
@media (max-width: 600px) {
  .sn-cmp .sn-col-tp { display: none; }
  .sn-pagas-row { gap: 2px; }
  .sn-pagas-row span { font-size: 11px; }
  .sn-pagas-row .sn-l { display: none; }
  .sn-pagas-row .sn-s { display: inline; }
}
.sn-vs .cq-win-cap b span { color: inherit; font-size: inherit; }
.sn-extra > h3 { margin-bottom: 16px; font-size: 1.25rem; letter-spacing: -.01em; }
.sn .cg-l dt > span:not([hidden]) { display: contents; }
.sn .verdict-head > .sn-vh { font-size: 1.125rem; font-weight: 650; color: var(--ink); }
