/* 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 li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.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); }
.sn-seg input:checked:focus-visible + span { box-shadow: inset 0 0 0 1px var(--accent), var(--focus); }

/* 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); }
/* ───────────── Calculadora de IVA e IRPF (calculadora_iva_irpf.html, .fi on top of .cq .cg) ─────────────
   Head: «por 1.000 € de base» as rows with the invoice's rates as chips and a stacked bar, all bars on one scale (--w,
   the invoice over the longest one). Tool: «Sé la base / Sé el total» on the .sn-mode radios (the importe's label
   and help switch with :has(), also without JS), IVA and retention as four-way .sn-seg radios, the recargo switch; the
   result card (_calculadora_iva_irpf_result.html) with the invoice drawn as a sheet with a folded corner (.fi-paper), the
   bar of where the invoice goes (.fi-where: .fi-stack with a brace under what the client transfers and what goes to
   Hacienda, its labels on their own line, .fi-brace-k, so they never collide) and its keys. Then the way back (.fi-back), the examples table (.fi-table on .kc-tramos), the retention
   ladder (.kobl with neutral and blue verdicts) and the IVA cards. Segment sizes are the amounts (flex-grow), never
   typed. Colours, always with a word: green what is yours, grey the IVA, light grey hatched the recargo, blue the
   retention (the IRPF colour of the other calculators). */
.fi { --s-tuyo: var(--success-mark); --s-iva: color-mix(in srgb, var(--muted) 48%, var(--surface)); --s-rec: color-mix(in srgb, var(--muted) 24%, var(--surface)); --s-ret: var(--accent); }
.fi .s-tuyo { background: var(--s-tuyo); } .fi .s-iva { background: var(--s-iva); } .fi .s-ret { background: var(--s-ret); }
.fi .s-rec { background: repeating-linear-gradient(135deg, var(--s-rec) 0 4px, color-mix(in srgb, var(--muted) 40%, var(--surface)) 4px 6px); }
.fi-head h1 { max-width: 17ch; }
.fi-form:has(input[name=sentido][value=base]:checked) [data-sentido=total],
.fi-form:has(input[name=sentido][value=total]:checked) [data-sentido=base] { display: none; }
/* Head rows */
.fi-hrows { list-style: none; margin: 0; padding: 6px 0 0; display: grid; gap: 4px; }
.fi-hrows li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 4.4em; gap: 6px 14px; align-items: center; padding: 9px 10px; border-radius: 12px; }
.fi-hrows li.is-ex { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.fi-hk { grid-column: 1 / -1; margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fi-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.fi-tags b { padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.fi-tags b.is-ret { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.fi-tags b.is-none { color: var(--muted); }
.fi-hk small { flex-basis: 100%; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.35; }
.fi-hv { margin: 0; text-align: right; }
.fi-hv b { color: var(--success); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fi-stack { display: flex; gap: 2px; height: 22px; border-radius: 7px; overflow: hidden; background: var(--bg-soft); }
.fi-stack i { display: block; flex: 0 0 0; min-width: 0; }
.fi-stack i[style*="flex-grow:0.00"] { margin-left: -2px; }
.fi-hrows .fi-stack { width: var(--w, 100%); height: 20px; background: transparent; 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) * 110ms + 200ms); }
/* In the head the filled bar is what the client transfers (the figure next to it); the retention stands apart, outlined */
.fi-hrows .fi-stack { gap: 5px; clip-path: none; }
.fi-fill { display: flex; flex: 0 0 0; gap: 2px; min-width: 0; border-radius: 7px; overflow: hidden; }
.fi-hrows .fi-stack .s-ret { border-radius: 7px; background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.fi-head .cg-legend .s-ret { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
/* Form */
.fi-seg legend { margin-bottom: 8px; }
.fi-seg-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fi-seg label > span { min-height: 56px; padding: 8px 3px; align-items: center; text-align: center; font-variant-numeric: tabular-nums; }
.fi-seg label > span small { font-size: 11px; line-height: 1.3; letter-spacing: -.01em; hyphens: auto; }
.fi-seg .kc-help { margin-top: 10px; }
.fi-error { margin: 8px 0 0; }
.fi-form input[aria-invalid=true] { border-color: var(--danger-line); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger-line) 18%, transparent); }
.fi-switch { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
@media (min-width: 961px) { .fi-layout.is-live .fi-submit { display: none; } }
@media (max-width: 420px) { .fi-seg-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Result */
.fi-res-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.fi-rates { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.fi-cent { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--warn-line); border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; }
.fi-cent .pv-i { width: 15px; height: 15px; margin-top: 2px; color: var(--warn-line); flex: none; }
.fi-cent b { color: var(--ink); font-variant-numeric: tabular-nums; }
.fi-paper { position: relative; margin: 22px 0 0; padding: 16px 20px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); box-shadow: 0 12px 26px -20px rgba(16, 24, 40, .45); }
.fi-paper::after { content: ""; position: absolute; top: -1px; right: -1px; width: 24px; height: 24px; border-radius: 0 12px 0 6px; background: linear-gradient(225deg, var(--surface) 50%, var(--line-strong) 50%); }
.fi-paper-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding: 0 22px 10px 0; border-bottom: 2px solid var(--ink); }
.fi-paper-h span { color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.fi-paper-h small { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.fi-lines { margin: 0; }
.fi-l { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line-strong); font-size: var(--fs-sm); }
.fi-l dt { color: var(--ink-2); }
.fi-l dt small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.fi-l dd { margin: 0; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fi-l.is-neg dd { color: var(--accent-ink); }
.fi-l.is-total { margin-top: 2px; padding-top: 12px; border-bottom: 0; border-top: 2px solid var(--ink); }
.fi-l.is-total dt, .fi-l.is-total dd { color: var(--ink); font-weight: 700; font-size: 1.0625rem; }
.fi-where { margin: 24px 0 0; }
.fi-where figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.fi-where figcaption b { color: var(--ink); font-size: var(--fs-sm); font-weight: 650; }
.fi-where figcaption small { color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.fi-bar { margin-top: 10px; }
.fi-bar .fi-stack { height: 40px; gap: 3px; border-radius: 10px; }
.fi-bar .fi-stack i[style*="flex-grow:0.00"] { margin-left: -3px; }
.fi-brace { display: flex; gap: 3px; margin-top: 6px; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fi-brace span { flex: 0 0 0; min-width: 0; height: 6px; border: 2px solid; border-bottom: 0; border-radius: 4px 4px 0 0; }
.fi-brace-in { border-color: var(--success-mark) !important; }
.fi-brace-ret { border-color: var(--accent) !important; }
.fi-brace-k { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; margin: 4px 0 0; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fi-brace-k .is-in { color: var(--success); }
.fi-brace-k .is-ret { margin-left: auto; color: var(--accent-ink); text-align: right; }
.fi-keys { margin: 12px 0 0; }
.fi-keys > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fi-keys > div:last-child { border-bottom: 0; }
.fi-keys dt { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: var(--fs-sm); font-weight: 600; }
.fi-keys dt i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.fi-keys dd { margin: 0; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fi-keys p { grid-column: 1 / -1; margin: 0; padding-left: 18px; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; }
.fi-result > * { transition: opacity .2s; }
.fi-result.is-busy > * { opacity: .6; }
.fi-result.is-stale > * { opacity: .28; filter: grayscale(1); }
.fi-result[data-play-ready]:not(.is-playing):not(.is-live) .fi-bar .fi-stack { clip-path: inset(0 100% 0 0 round 10px); }
.fi-result.is-playing:not(.is-live) .fi-bar .fi-stack { animation: cg-reveal-lg 1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: .3s; }
.fi-result[data-play-ready]:not(.is-playing):not(.is-live) .fi-l { opacity: 0; }
.fi-result.is-playing:not(.is-live) .fi-l { animation: who-in .35s ease both; }
.fi-result.is-playing:not(.is-live) .fi-l:nth-child(2) { animation-delay: .12s; } .fi-result.is-playing:not(.is-live) .fi-l:nth-child(3) { animation-delay: .24s; }
.fi-result.is-playing:not(.is-live) .fi-l:nth-child(4) { animation-delay: .36s; } .fi-result.is-playing:not(.is-live) .fi-l:nth-child(5) { animation-delay: .48s; }
/* The way back */
.fi-back { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; margin-top: 20px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.fi-back h3 { margin: 0; font-size: 1.125rem; letter-spacing: -.01em; }
.fi-back p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; max-width: 80ch; font-variant-numeric: tabular-nums; }
.fi-back p b { color: var(--ink); }
/* Examples table */
.fi-table tbody th { white-space: normal; min-width: 15em; line-height: 1.4; }
.fi-table tbody th small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.fi-table tbody tr.kc-mine th small { color: var(--accent-ink); }
.fi-table td b { color: var(--ink); font-weight: 700; }
.fi-muted { color: var(--muted); font-weight: 500; }
.fi-neg { color: var(--accent-ink); }
/* On phones each example is one row: who invoices like this with its rates under it, and what the client pays at the
   right, so the ten cases compare at a glance; the amounts of each tax are in the tool above */
@media (max-width: 600px) {
  .fi-table thead { display: none; }
  .fi-table, .fi-table tbody { display: block; }
  .fi-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
  .fi-table tbody tr:last-child { border-bottom: 0; }
  .fi-table.kc-tramos tr > * { padding: 0; border: 0; }
  .fi-table.kc-tramos tbody th { min-width: 0; white-space: normal; font-size: var(--fs-sm); }
  .fi-table.kc-tramos td { display: none; }
  .fi-table.kc-tramos td.fi-col-pay { display: block; text-align: right; font-size: var(--fs-sm); }
  .fi-table.kc-tramos td.fi-col-pay::before { content: attr(data-label); display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
  .fi-table tr.kc-mine { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
  .fi-table.kc-tramos tr.kc-mine > * { background: none; box-shadow: none; }
}
/* Retention ladder: verdicts that are neither good nor bad */
.fi-kobl { margin: 0 !important; }
.kobl-y.is-rate { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.kobl-y.is-none { color: var(--ink-2); background: var(--surface); border-color: var(--line-strong); }
.kobl-end.fi-kobl-end { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.kobl-end.fi-kobl-end > .pv-i { background: var(--accent); }
.kobl-end.fi-kobl-end b { color: var(--accent-ink); }
.fi-kobl .kobl-q { grid-template-columns: 30px minmax(0, 1fr) 9.5em 7.5em; }
.fi-kobl .kobl-foot a { color: var(--accent-ink); }
/* On phones «Sí» and «No» share a line under the question */
@media (max-width: 600px) {
  .fi-kobl .kobl-q { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
  .fi-kobl .kobl-q::before { display: none; }
  .fi-kobl .kobl-t { flex-basis: 100%; }
  .fi-kobl .kobl-n { margin-left: auto; }
}
.fi-more summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; }
.fi-more[open] summary { margin-bottom: 4px; }
/* The retention help follows the chosen rate */
.fi-irpf-help > span[data-irpf] { display: none; }
.fi-seg:has(input[name=irpf][value="15"]:checked) [data-irpf="15"], .fi-seg:has(input[name=irpf][value="7"]:checked) [data-irpf="7"],
.fi-seg:has(input[name=irpf][value="0"]:checked) [data-irpf="0"], .fi-seg:has(input[name=irpf][value="19"]:checked) [data-irpf="19"] { display: inline; }
/* IVA cards and the portal view (its retention in the page's blue, not the invoice sheet's amber) */
.fi .pv-inv-tot dd.is-neg { color: var(--accent-ink) !important; }
.fi-iva { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.fi-iva a { color: var(--accent-ink); }
.fi-tour .feature-art .pv { max-width: 600px; margin-left: auto; }
@media (max-width: 960px) {
  .fi-iva { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .fi-tour .feature-art .pv { margin: 0 auto; }
}
@media (max-width: 600px) {
  .fi-head .cmp-sub, .fi-head .cmp-date, .fi-head .fi-hundred, .fi-head .fi-lead-ex { display: none; }
  .fi-iva { grid-template-columns: minmax(0, 1fr) !important; }
  .fi-hrows li { padding: 11px 8px; gap: 6px 10px; }
  .fi-hv b { font-size: 1.125rem; }
  .fi-paper { padding: 14px 14px 10px; }
  .fi-back { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .fi-big { font-size: min(2.4rem, 8.6vw); }
}
@media (prefers-reduced-motion: reduce) {
  .fi-hrows .fi-stack, .fi-result .fi-bar .fi-stack, .fi-result .fi-l { animation: none !important; clip-path: none !important; opacity: 1 !important; }
}
/* Calculadora de IVA e IRPF, after the design review (2026-10-31): on narrow screens the step line's operators sit in the
   gap between two tiles; the result bar draws the retention as the head does, outlined, because it does not reach you;
   in the startups guide's renta form (kuotia-report.css) the saving chip is green. */
@media (max-width: 1100px) {
  .fi-flow li:not(:first-child) { margin-top: 8px; }
  .fi-flow .cq-op { top: -24px; }
}
.fi-bar .fi-stack .s-ret { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0 10px 10px 0; }
.fi-keys dt i.s-ret { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* ───────────── Calculadora de recargo e intereses (calculadora_recargo_hacienda.html, .rc on top of .cq .cg .fi) ─────
   Head: the page's 303 of 1.000 € filed late on six days, plus Hacienda asking first, as bars on one scale (the reduced
   sanción is the full width): amber for the recargo, red for the sanción, each with its words. Tool: segmented modelo,
   year and quarter (hidden for the renta), the date and the amount; the card is the fi receipt, the yearly interest table
   and the 1-15 % scale with yours marked (.rc-scale). */
.rc { --rc-c: var(--accent); --rc-bad: color-mix(in srgb, #d0432d 80%, var(--surface)); }
.rc-head h1 { max-width: 19ch; }
.page-head-pv .wrap > .rc-hundred { grid-column: 7 / -1; }
@media (max-width: 960px) { .page-head-pv .wrap > .rc-hundred { grid-column: 1; max-width: 560px; } }
.rc-hrows { list-style: none; margin: 0; padding: 6px 0 0; display: grid; gap: 2px; }
.rc-hrows li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 5.6em; gap: 5px 14px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.rc-hrows li.is-ex { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.rc-hrows li.is-bad { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line-strong); border-radius: 0 0 12px 12px; }
.rc-hk { grid-column: 1 / -1; margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; line-height: 1.25; }
.rc-hk b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-hk small { color: var(--ink-2); font-size: var(--fs-xs); }
.rc-bar { display: block; height: 14px; border-radius: 0 6px 6px 0; background: var(--bg-soft); overflow: hidden; }
.rc-bar i { display: block; height: 100%; min-width: 3px; border-radius: 0 6px 6px 0; background: var(--rc-c); transform-origin: left; animation: rc-grow .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--n) * 100ms + 200ms); }
.rc-hrows li.is-bad .rc-bar i { background: var(--rc-bad); }
.rc-hv { margin: 0; text-align: right; }
.rc-hv b { color: var(--ink); font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-hrows li.is-bad .rc-hv b { color: var(--danger-line); }
.rc-legend .s-rc { background: var(--rc-c); } .rc-legend .s-bad { background: var(--rc-bad); }
@keyframes rc-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* The form */
.rc-row5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rc-row5 label > span small { hyphens: manual; font-size: 10.5px; letter-spacing: -.02em; }
.rc-row4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rc-row4 label > span { min-height: 48px; font-size: var(--fs-xs); line-height: 1.3; }
/* When the request fails the card is stale: the «Calcular» button comes back on wide screens */
@media (min-width: 961px) { .fi-layout.is-failed .fi-submit { display: block; } }
.rc-form:has(input[name=modelo][value="100"]:checked) .rc-trimestre { display: none; }
/* Withholdings cannot be deferred (LGT art. 65.2.b): no «Pido aplazamiento» for the 111 and the 115 */
.rc-form:has(input[name=modelo][value="111"]:checked) :is(.rc-pago-aplazo, .rc-pago-aval, .rc-aval-help),
.rc-form:has(input[name=modelo][value="115"]:checked) :is(.rc-pago-aplazo, .rc-pago-aval, .rc-aval-help) { display: none; }
.rc-form:has(input[name=modelo][value="111"]:checked) .rc-row4,
.rc-form:has(input[name=modelo][value="115"]:checked) .rc-row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rc-plazo { margin-top: 8px; }
.rc-aval-help { display: none; }
.rc-form:has(input[name=pago][value=aval]:checked) .rc-aval-help { display: block; }
.rc-plazo p { margin: 6px 0 8px; }
.rc-date input { width: 100%; font-variant-numeric: tabular-nums; }
.rc-form select[aria-invalid=true], .rc-form input[aria-invalid=true] { border-color: var(--danger-line); }
/* The card */
.rc-big.is-ok b { color: var(--success); }
.rc-note, .rc-warn { margin-top: 14px; }
.rc-warn { border-left-color: var(--danger-line); }
.rc-warn .pv-i { color: var(--danger-line); }
.rc-note.is-ok { border-left-color: var(--success-mark); }
.rc-note.is-ok .pv-i { color: var(--success-mark); }
.rc-int { margin-top: 14px; }
.rc-int table { font-size: var(--fs-xs); }
.rc-int .kc-tramos td, .rc-int .kc-tramos thead th:not(:first-child) { text-align: right !important; font-variant-numeric: tabular-nums; }
.rc-paper-sanction .fi-l:last-child { border-bottom: 0; }
.rc .kfork-cols { align-items: start; }
.rc-form:has(input[name=modelo][value="100"]:checked) .kc-fields > .kc-field:has(#rc-ejercicio) { grid-column: 1 / -1; }
.rc-error { margin: 18px 0 0 !important; }
.rc-after { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; }
.rc-after .pv-i { width: 15px; height: 15px; margin-top: 2px; flex: none; color: var(--muted); }
.rc-scale { margin: 22px 0 0; }
.rc-scale figcaption { display: flex; flex-direction: column; gap: 2px; }
.rc-scale figcaption b { color: var(--ink); font-size: var(--fs-sm); font-weight: 650; }
.rc-scale figcaption small { color: var(--ink-2); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.rc-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)) minmax(0, 1.6fr); gap: 3px; }
.rc-steps li { display: grid; place-items: center; height: 30px; border-radius: 6px; background: var(--bg-soft); color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.rc-steps li.is-past { background: var(--accent-soft); color: var(--accent-ink); }
.rc-steps li.is-15 { background: color-mix(in srgb, #d0432d 14%, var(--surface)); color: var(--ink-2); }
.rc-steps li.is-you { background: var(--rc-c); color: #fff; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--rc-c); font-weight: 700; }
.rc-steps li.is-15.is-you { background: var(--rc-bad); color: #fff; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--rc-bad); }
.rc-steps b { font-weight: inherit; }
.rc-scale-k { display: flex; justify-content: space-between; margin: 6px 0 0; color: var(--muted); font-size: 11px; }
/* Timeline of the months and the table */
.ktl.rc-ktl { max-width: 760px; margin: 28px auto 0 !important; }
.rc-ktl .ktl-r.is-bad .ktl-node { border-color: var(--rc-bad); }
.rc-ktl .ktl-r.is-bad .ktl-c { border-color: color-mix(in srgb, #d0432d 45%, var(--line)); box-shadow: inset 3px 0 0 var(--rc-bad); }
.rc-table td { font-variant-numeric: tabular-nums; }
.rc-table tr.rc-bad-row th, .rc-table tr.rc-bad-row td b { color: var(--danger-line); }
.rc-table tr.rc-bad-row th small { color: var(--ink-2); }
.rc-cases { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.rc-cases a, .rc-tour a { color: var(--accent-ink); }
.rc-tour .feature-art .pv { max-width: 600px; margin-left: auto; }
@media (max-width: 960px) {
  .rc-cases { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .rc-tour .feature-art .pv { margin: 0 auto; }
}
@media (max-width: 600px) {
  .rc-head .cmp-sub, .rc-head .cmp-date, .rc-head .rc-hundred, .rc-head .fi-lead-ex { display: none; }
  .rc-cases { grid-template-columns: minmax(0, 1fr) !important; }
  .rc-row5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rc-row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-form .kc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-form .kc-fields > .kc-wide { grid-column: 1 / -1; }
  .rc-head .lead { font-size: var(--fs-base); }
  .rc .cq-stats-sec { display: none; }
  .rc .fi-flow .cq-txt p:not(.cq-flow-res) { display: none; }
  .rc-ktl .ktl-rows { --ktl-d: 3.6rem; }
  .rc-ktl .ktl-r { margin-bottom: 6px !important; }
  .rc-ktl .ktl-c { padding: 7px 11px 8px; font-size: var(--fs-xs); }
  .rc-ktl .ktl-c > b { font-size: var(--fs-sm); margin-top: 0; }
  .rc-ktl .ktl-d b { font-size: 1.2rem; }
  .rc-steps { gap: 2px; } .rc-steps li { height: 26px; font-size: 10.5px; }
  .rc-table.kc-tramos td.rc-col-full, .rc-table.kc-tramos td.rc-col-int { display: none; }
  .rc-table tr.rc-bad-row { box-shadow: inset 3px 0 0 var(--rc-bad); }
}
@media (max-width: 420px) { .rc-result .fi-paper-h small { display: none; } .rc-result .fi-paper { overflow: hidden; } }
@media (prefers-reduced-motion: reduce) { .rc-bar i { animation: none !important; } }

/* ───────────── Calculadora de capitalización del paro (calculadora_capitalizacion_paro.html, .pu on top of .cq .cg .fi .rc)
   Head: the page's paro three ways on one scale (the paro pendiente is the full width): the pago único, month by month,
   and the 270 days alongside the alta with the rest en suspenso as an outlined segment. Tool: base or sueldo (.sn-mode,
   the other field hides with :has, also without JS), the days and the hijos; the card is the fi receipt, the months still
   to be paid as bars (.pu-months: the 70 % months darker, the 270 days of compatibilidad marked) and the two options
   side by side (.pu-opts). Blue is what you get, its words always next to it. */
.pu-form:has(input[name=modo][value=base]:checked) [data-pu-only=sueldo],
.pu-form:has(input[name=modo][value=sueldo]:checked) [data-pu-only=base] { display: none !important; }
.pu-head h1 { max-width: 20ch; }
.pu-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pu-help-row { grid-column: 1 / -1; margin-top: -8px !important; }
.pu-bar-compat { display: flex; }
.pu-bar-compat i { flex: none; border-radius: 0; }
.pu-bar-compat i.is-rest { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 0 6px 6px 0; background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent) 0 4px, transparent 4px 8px); }
.pu-legend .s-rest { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent) 0 2px, transparent 2px 4px); }
/* The card */
.pu-big.is-no b { color: var(--muted); }
.pu-note { margin-top: 12px; }
.fi-l.is-sub dt, .fi-l.is-sub dd { color: var(--ink); font-weight: 650; }
.pu-months { margin: 22px 0 0; }
.pu-months figcaption { display: flex; flex-direction: column; gap: 2px; }
.pu-months figcaption b { color: var(--ink); font-size: var(--fs-sm); font-weight: 650; }
.pu-months figcaption small { color: var(--ink-2); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.pu-bars { list-style: none; margin: 10px 0 0; padding: 0; height: 64px; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 2px; align-items: end; }
.pu-bars li { position: relative; height: 100%; display: flex; align-items: flex-end; }
.pu-bars li > span { display: flex; flex-direction: column-reverse; width: 100%; min-height: 3px; border-radius: 3px 3px 0 0; overflow: hidden; transform-origin: bottom; animation: pu-rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.pu-bars i { display: block; width: 100%; flex-basis: 0; background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.pu-bars i.is-70 { background: var(--accent); }
.pu-bars li.is-compat::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 3px; border-radius: 2px; background: var(--ink-2); opacity: .35; }
.pu-bars-k { display: flex; justify-content: space-between; margin: 12px 0 0; color: var(--muted); font-size: 11px; }
@keyframes pu-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.pu-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.pu-opt { margin: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pu-opt > span { color: var(--ink-2); font-size: var(--fs-xs); font-weight: 650; }
.pu-opt b { color: var(--ink); font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pu-opt small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }
.pu-opt.is-pick { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.pu-opt.is-pick b { color: var(--accent-ink); }
/* Steps, tables */
.ktl.pu-ktl { max-width: 760px; margin: 28px auto 0 !important; }
.pu-limits { max-width: 760px; margin-left: auto !important; margin-right: auto !important; text-align: center; }
.pu-cases td, .pu-dur td { font-variant-numeric: tabular-nums; }
.pu-cases td small { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 400; }
.pu-dur { width: 100%; }
.pu-dur td, .pu-dur thead th:not(:first-child) { text-align: right !important; }
.pu-tour .feature-art .pv { max-width: 560px; margin-left: auto; }
@media (max-width: 960px) { .pu-tour .feature-art .pv { margin: 0 auto; } }
@media (max-width: 600px) {
  .pu-head .cmp-sub, .pu-head .cmp-date, .pu-head .pu-hundred, .pu-head .fi-lead-ex { display: none; }
  .pu-form .kc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pu-form .kc-fields > .kc-wide { grid-column: 1 / -1; }
  .pu-opts { grid-template-columns: minmax(0, 1fr); }
  .pu-cases.kc-tramos td.pu-col-day { display: none; }
  .pu-ktl .ktl-rows { --ktl-d: 3.2rem; }
  .pu-ktl .ktl-c { padding: 7px 11px 8px; font-size: var(--fs-xs); }
  .pu-ktl .ktl-c > b { font-size: var(--fs-sm); margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .pu-bars li > span { animation: none !important; } }
/* The three paths (pago único, compatibilidad, alta sin más) as cards with the same bar scale as the head */
.pu-paths { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pu-paths > li { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.pu-paths > li.is-pick { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: inset 0 3px 0 var(--accent); }
.pu-path-k { margin: 0; display: flex; align-items: center; gap: 10px; }
.pu-path-k b { color: var(--ink); font-weight: 650; }
.pu-path-k .cq-you { margin-left: auto; }
.pu-path-v { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.pu-path-v b { color: var(--ink); font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pu-paths > li.is-pick .pu-path-v b { color: var(--accent-ink); }
.pu-path-v small { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; }
.pu-path-bar { display: flex; height: 10px; border-radius: 5px; background: var(--bg-soft); overflow: hidden; }
.pu-path-bar i { display: block; height: 100%; background: var(--accent); }
.pu-path-bar i.is-rest { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent) 0 4px, transparent 4px 8px); border-radius: 0 5px 5px 0; }
.pu-paths dl { margin: auto 0 0; padding-top: 12px; border-top: 1px dashed var(--line-strong); display: grid; gap: 10px; }
.pu-paths dt { color: var(--muted); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.pu-paths dd { margin: 2px 0 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }
@media (max-width: 960px) { .pu-paths { grid-template-columns: minmax(0, 1fr); } }
.pu-bars-legend { margin-top: 8px; padding: 8px 0 0; }
.pu-bars-legend .s-70 { background: var(--accent); }
.pu-bars-legend .s-60 { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.pu-bars-legend .s-compat { height: 3px; border-radius: 2px; background: var(--ink-2); opacity: .5; }
.pu-edit { display: none; }
@media (max-width: 960px) { .pu-edit { display: inline-flex; margin-top: 14px; } }
@media (max-width: 600px) {
  .pu .cq-stats-sec { display: none; }
  .pu .fi-flow .cq-txt p:not(.cq-flow-res) { display: none; }
  .pu-paths dl { gap: 6px; }
}
.pu-flow .pu-flow-op { color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .pu .pu-flow .cq-txt p.pu-flow-op { display: block; } }
/* Design review fixes: the error under the days, the hijos help folded, the mode labels on one line, the form sticky */
.pu-error { grid-column: 1 / -1; margin: 0 !important; }
.pu-hijos-help { margin-top: 10px; }
.pu-hijos-help p { margin: 6px 0 0; }
.pu-big.is-no, .pu-big.is-no b { color: var(--muted); }
.pu-form .sn-mode label > span { white-space: nowrap; }
.pu-hrows li.is-ex { padding-top: 16px; }
@media (min-width: 961px) { .pu-form { position: sticky; top: 88px; } }
@media (max-width: 600px) { .pu-limits { text-align: left; } }
@media (max-width: 420px) { .pu-form .sn-mode .pv-i { display: none; } }
.pu-hijos-help summary { display: flex; align-items: center; min-height: 44px; }
.pu-paths { align-items: start; }
.pu-paths dl { margin-top: 0; }
