/* Impuestos · consejo fiscal (Track C). Uses the workspace tokens of sales.css and theme.css
   (--ink, --lime, --olive, --grey, --coral, --amber, glass panels). Charts grow into place once
   the page carries .tx-ready; nothing moves under prefers-reduced-motion. */
.tx-page{--tx-out:#8ea065;--tx-in:#ffad3b;--tx-pay:#ff6a5c;--tx-favour:#b9d42c;--tx-regional:#c9b37a;--tx-muted:#d6d9cf;--tx-ease:cubic-bezier(.22,.8,.24,1);
  display:grid;gap:18px;animation:tx-enter .45s var(--tx-ease) both;transition:opacity .18s ease}
.tx-page.is-leaving{opacity:.35}
@keyframes tx-enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.tx-head{margin-bottom:0;align-items:flex-end;flex-wrap:wrap}
.tx-head .heading-actions{gap:10px}
.tx-switch{display:inline-flex;align-items:center;gap:2px;padding:4px;border-radius:999px;background:#ffffffb8;border:1px solid var(--line,#e5e6e1);box-shadow:0 1px 0 #fff inset}
.tx-switch button{border:0;background:transparent;height:32px;min-width:32px;padding:0 11px;border-radius:999px;font-size:12px;color:#5d6158;transition:background .2s,color .2s,transform .2s}
.tx-switch button:hover:not(:disabled){background:#eef0e8}
.tx-switch .tx-q-pill.is-active{background:var(--ink,#292c28);color:#fff}
.tx-year-label{font-size:12px;font-weight:500;padding:0 4px;min-width:38px;text-align:center}
.tx-disclaimer{display:flex;gap:10px;align-items:flex-start;margin:0;padding:12px 16px;border-radius:16px;background:#f4f7e6;border:1px solid #e3ebc4;font-size:12.5px;line-height:1.5;color:#4a5138}
.tx-disclaimer>span:first-child{display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:50%;background:var(--lime,#dcfa3b);font-size:12px}
.tx-disclaimer b{font-weight:550;color:#2f3428}
.tx-notice{margin:0;padding:10px 14px;border-radius:14px;background:#fff7ea;border:1px solid #f4e2c1;font-size:12px;color:#6d5a37}
.tx-notice a{text-decoration:underline;text-underline-offset:3px}
.tx-muted{color:var(--grey,#80857c);font-size:12px}

/* Hero cards */
.tx-hero{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.tx-card{position:relative;display:grid;align-content:start;gap:8px;min-width:0;padding:16px 18px;border-radius:22px;background:var(--glass,#ffffffc0);border:1px solid var(--glass-edge,#fff);box-shadow:var(--glass-shadow,0 10px 30px #2a2e2512);animation:tx-enter .55s var(--tx-ease) both}
.tx-card:nth-child(2){animation-delay:.05s}.tx-card:nth-child(3){animation-delay:.1s}.tx-card:nth-child(4){animation-delay:.15s}.tx-card:nth-child(5){animation-delay:.2s}
.tx-card-label{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--grey,#80857c);letter-spacing:.02em}
.tx-card .tx-num{font-size:clamp(24px,2.3vw,32px);font-weight:300;letter-spacing:-.03em;line-height:1.05;white-space:nowrap;font-variant-numeric:tabular-nums}
.tx-card-sub{font-size:11.5px;color:#6b7066}
.tx-word{font-size:22px;font-weight:300;letter-spacing:-.02em}
.tx-card-deadline{background:linear-gradient(160deg,#f4fbd2,#ffffffd0);grid-column:span 1}
.tx-countdown{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;align-items:center}
.tx-countdown>div{display:grid;gap:2px;font-size:11.5px;color:#5d6158;min-width:0}
.tx-days{font-size:26px;font-weight:300;letter-spacing:-.03em;color:var(--ink,#292c28);line-height:1.1}
.tx-ring{width:72px;height:72px;transform:rotate(-90deg)}
.tx-ring circle{fill:none;stroke-width:7}
.tx-ring-track{stroke:#e8ebdf}
.tx-ring-fill{stroke:var(--olive,#8ea065);stroke-linecap:round;stroke-dasharray:var(--c);stroke-dashoffset:var(--c);transition:stroke-dashoffset 1.2s var(--tx-ease) .15s}
.tx-ring-fill.is-near{stroke:var(--tx-pay)}
.tx-ready .tx-ring-fill{stroke-dashoffset:var(--o)}
.tx-shift{display:block;font-size:11px;color:#7b6a44;background:#fff4dd;border-radius:10px;padding:5px 8px;line-height:1.4}

/* Sections */
.tx-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.tx-section{display:grid;gap:16px;padding:20px 22px;min-width:0}
.tx-section h2{font-size:21px}
.tx-section h3{font-size:12px;font-weight:500;color:#4b4f47;margin-bottom:10px}
.tx-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap}
.tx-section-head>div{display:grid;gap:6px}
.tx-result{display:grid;justify-items:end;gap:3px;text-align:right}
.tx-result>span:first-child{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--grey,#80857c)}
.tx-result .tx-num{font-size:30px;font-weight:300;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.tx-result small{font-size:11.5px;color:#61665c}
.tx-result.is-pay .tx-num{color:#2b2e28}
.tx-result.is-favour .tx-num{color:#61781f}
.tx-chip{font-size:11px;padding:6px 10px;border-radius:999px;background:#eef1e6;color:#4f5646;white-space:nowrap}
.tx-formula,.tx-pace{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0;font-size:12px;color:#5d6158;line-height:1.5}
.tx-pending{margin:0;font-size:11px;color:#8b8f86}

/* Horizontal bars */
.tx-balance{display:grid;gap:9px}
.tx-bar-row{display:grid;grid-template-columns:minmax(120px,200px) minmax(0,1fr) auto;gap:12px;align-items:center;font-size:12px}
.tx-bar-label{display:flex;align-items:center;gap:6px;color:#61665c;min-width:0}
.tx-bar-row b{font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
.tx-bar{display:block;height:12px;border-radius:999px;background:#eef0e9;overflow:hidden}
.tx-bar i{display:block;height:100%;width:calc(var(--v) * 100%);min-width:2px;border-radius:inherit;transform:scaleX(0);transform-origin:left center;transition:transform .9s var(--tx-ease)}
[dir=rtl] .tx-bar i,[dir=rtl] .tx-fall-track i{transform-origin:right center}
.tx-bar-row:nth-child(2) i{transition-delay:.08s}.tx-bar-row:nth-child(3) i{transition-delay:.16s}.tx-bar-row:nth-child(4) i{transition-delay:.24s}
.tx-ready .tx-bar i{transform:scaleX(1)}
.tx-tone-out{background:var(--tx-out)}.tx-tone-in{background:var(--tx-in)}.tx-tone-pay{background:var(--tx-pay)}.tx-tone-favour{background:var(--tx-favour)}.tx-tone-regional{background:var(--tx-regional)}.tx-tone-muted{background:var(--tx-muted)}

/* IVA: rates and the year */
.tx-split{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:22px}
.tx-stack{display:flex;height:14px;border-radius:999px;overflow:hidden;background:#eef0e9;margin-bottom:10px}
.tx-stack i{display:block;width:var(--w);height:100%;transform:scaleY(0);transition:transform .7s var(--tx-ease)}
.tx-ready .tx-stack i{transform:none}
.tx-rate-zero{background:#c9ccc2}.tx-rate-four{background:#b9d42c}.tx-rate-ten{background:#8ea065}.tx-rate-twentyone{background:#4e5a3a}.tx-rate-other{background:#ffad3b}
.tx-table{width:100%;border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums}
.tx-table th{font-size:10.5px;font-weight:450;color:#8b8f86;text-align:right;padding:6px 8px;border-bottom:1px solid var(--line,#e5e6e1)}
.tx-table td{padding:9px 8px;text-align:right;border-bottom:1px solid #eff0eb;white-space:nowrap}
.tx-table th:first-child,.tx-table td:first-child{text-align:left}
.tx-table td:first-child{display:flex;align-items:center;gap:6px}
.tx-dot{display:inline-block;width:8px;height:8px;border-radius:50%}
.tx-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin:12px 0 0}
.tx-facts div{padding:10px 12px;border-radius:14px;background:#f3f4ef}
.tx-facts dt{font-size:10.5px;color:#8b8f86}
.tx-facts dd{margin:4px 0 0;font-size:13px;font-weight:500;font-variant-numeric:tabular-nums}
.tx-cols{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end;height:190px}
.tx-col{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;justify-items:center;gap:6px;height:100%;padding:8px 4px;border:1px solid transparent;border-radius:16px;background:transparent;transition:background .2s,border-color .2s,transform .2s}
.tx-col:hover{background:#f3f5ec;transform:translateY(-2px)}
.tx-col.is-active{background:#f1f7d6;border-color:#e0ebb5}
.tx-col-value{font-size:10.5px;font-weight:500;white-space:nowrap;font-variant-numeric:tabular-nums}
.tx-col-track{position:relative;width:min(44px,70%);height:100%;display:flex;align-items:flex-end}
.tx-col-track i{display:block;width:100%;height:calc(var(--h) * 100%);min-height:3px;border-radius:10px 10px 4px 4px;background:var(--tx-out);transform:scaleY(0);transform-origin:bottom;transition:transform .9s var(--tx-ease)}
.tx-col:nth-child(2) i{transition-delay:.07s}.tx-col:nth-child(3) i{transition-delay:.14s}.tx-col:nth-child(4) i{transition-delay:.21s}
.tx-ready .tx-col-track i{transform:scaleY(1)}
.tx-col.is-active i{background:var(--tx-favour)}
.tx-col.is-negative i{background:var(--tx-in)}
.tx-col.is-future i{opacity:.25}
.tx-col b{font-size:12px;font-weight:500}
.tx-col small{font-size:10px;color:#8b8f86}
.tx-advice{margin:0;padding:0;list-style:none;display:grid;gap:7px}
.tx-advice li{position:relative;padding:10px 12px 10px 30px;border-radius:14px;background:#f6f8ef;font-size:12.5px;line-height:1.5;color:#3d4235}
.tx-advice li:before{content:"";position:absolute;left:12px;top:15px;width:8px;height:8px;border-radius:50%;background:var(--lime,#dcfa3b);box-shadow:0 0 0 3px #dcfa3b40}

/* 130 waterfall and quarters */
.tx-fall{display:grid;gap:8px}
.tx-fall-row{display:grid;grid-template-columns:minmax(110px,160px) minmax(0,1fr) auto;gap:12px;align-items:center;font-size:12px;color:#5d6158}
.tx-fall-row b{font-weight:500;color:var(--ink,#292c28);font-variant-numeric:tabular-nums;white-space:nowrap}
.tx-fall-row.is-total{padding-top:8px;border-top:1px dashed var(--line,#e5e6e1)}
.tx-fall-row.is-total span:first-child{color:var(--ink,#292c28);font-weight:500}
.tx-fall-track{position:relative;height:14px;border-radius:7px;background:#eef0e9}
.tx-fall-track i{position:absolute;top:0;bottom:0;left:calc(var(--x) * 100%);width:calc(var(--v) * 100%);min-width:2px;border-radius:7px;transform:scaleX(0);transform-origin:left center;transition:transform .8s var(--tx-ease)}
.tx-fall-row:nth-child(2) i{transition-delay:.1s}.tx-fall-row:nth-child(3) i{transition-delay:.2s}.tx-fall-row:nth-child(4) i{transition-delay:.3s}.tx-fall-row:nth-child(5) i{transition-delay:.4s}
.tx-ready .tx-fall-track i{transform:scaleX(1)}
.tx-quarters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tx-q{display:grid;gap:3px;padding:10px;border-radius:14px;background:#f3f4ef;font-variant-numeric:tabular-nums;min-width:0}
.tx-q.is-active{background:#f1f7d6;box-shadow:inset 0 0 0 1px #e0ebb5}
.tx-q b{font-size:11px;font-weight:500}
.tx-q span{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tx-q small{font-size:10px;color:#8b8f86}

/* IRPF staircase */
.tx-stairs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;align-items:end;height:160px}
.tx-stair{position:relative;display:grid;align-content:end;height:calc(var(--h) * 100%);border-radius:10px 10px 4px 4px;background:#eef0e9;overflow:hidden;min-height:30px}
.tx-stair-fill{position:absolute;left:0;right:0;bottom:0;height:calc(var(--v) * 100%);background:var(--tx-out);transform:scaleY(0);transform-origin:bottom;transition:transform .9s var(--tx-ease)}
.tx-stair:nth-child(2) .tx-stair-fill{transition-delay:.08s}.tx-stair:nth-child(3) .tx-stair-fill{transition-delay:.16s}.tx-stair:nth-child(4) .tx-stair-fill{transition-delay:.24s}.tx-stair:nth-child(5) .tx-stair-fill{transition-delay:.32s}.tx-stair:nth-child(6) .tx-stair-fill{transition-delay:.4s}
.tx-ready .tx-stair-fill{transform:scaleY(1)}
.tx-stair b,.tx-stair small{position:relative;z-index:1;text-align:center}
.tx-stair b{font-size:11px;font-weight:500}
.tx-stair small{font-size:9.5px;color:#5d6158;padding-bottom:5px}
/* UX-09: white labels only where the fill reaches them; a partly used bracket keeps dark text. */
.tx-stair.is-full b,.tx-stair.is-full small{color:#fff}
.tx-stair.is-partial b,.tx-stair.is-partial small{color:var(--ink,#292c28);text-shadow:0 0 3px #fff,0 0 2px #fff,0 0 1px #fff}

/* RETA steps */
.tx-steps{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));gap:3px;align-items:end;height:84px}
.tx-step{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:4px;height:100%;align-items:end}
.tx-step i{display:block;height:calc(var(--h) * 100%);border-radius:6px 6px 2px 2px;background:#e3e7d8;transform:scaleY(0);transform-origin:bottom;transition:transform .7s var(--tx-ease) calc(var(--i) * 30ms),background .3s}
.tx-step.is-reduced i{background:#eef0e9}
.tx-step.is-current i{background:var(--tx-favour);box-shadow:0 6px 16px #b9d42c55}
.tx-ready .tx-step i{transform:scaleY(1)}
.tx-step b{font-size:9px;font-weight:400;color:#8b8f86;text-align:center}
.tx-step.is-current b{color:var(--ink,#292c28);font-weight:600}

/* Calendar */
.tx-cal{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.tx-cal li{display:grid;grid-template-columns:62px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px;border-radius:16px;background:#f5f6f1;transition:transform .2s}
.tx-cal li:hover{transform:translateX(2px)}
.tx-cal li.is-near{background:#fff1ec}
.tx-cal li.is-unconfirmed{background:transparent;border:1px dashed var(--line,#e5e6e1)}
.tx-cal time{display:grid;justify-items:center;font-size:10px;color:#80857c;text-transform:uppercase;letter-spacing:.04em}
.tx-cal time b{font-size:20px;font-weight:300;color:var(--ink,#292c28);letter-spacing:-.02em;text-transform:none}
.tx-cal li>div{display:grid;gap:3px;min-width:0}
.tx-cal li>div b{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500}
.tx-cal li>div small{font-size:11px;color:#7b6a44}
.tx-pill{font-size:11px;padding:5px 10px;border-radius:999px;background:#fff;color:#4f5646;white-space:nowrap;box-shadow:0 1px 3px #2a2e2512}
.tx-cal li.is-near .tx-pill{background:var(--tx-pay);color:#fff}

/* Sources: hover on desktop, tap on touch */
.tx-src{position:relative;display:inline-grid;place-items:center;flex:none;width:18px;height:18px;padding:0;border:1px solid #dfe2d6;border-radius:50%;background:#fff;color:#7d8277;font-size:10px;line-height:1;cursor:help;transition:background .15s,color .15s}
.tx-src:hover,.tx-src:focus-visible,.tx-src.is-open{background:var(--ink,#292c28);color:#fff;border-color:var(--ink,#292c28)}
.tx-tip{position:absolute;z-index:30;left:50%;bottom:calc(100% + 8px);width:min(300px,78vw);display:grid;gap:5px;padding:10px 12px;border-radius:12px;background:#24271f;color:#f1f3ea;font-size:11px;font-weight:400;line-height:1.45;text-align:left;letter-spacing:0;box-shadow:0 16px 40px #1a1d1640;opacity:0;visibility:hidden;transform:translate(-50%,4px);transition:opacity .16s,transform .16s,visibility .16s;pointer-events:none;white-space:normal}
.tx-tip b{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#dcfa3b;font-weight:500}
.tx-src:hover .tx-tip,.tx-src:focus-visible .tx-tip,.tx-src.is-open .tx-tip{opacity:1;visibility:visible;transform:translate(-50%,0)}
.tx-result .tx-tip,.tx-section-head>.tx-src .tx-tip,.tx-table td:not(:first-child) .tx-tip{left:auto;right:0;transform:translateY(4px)}
.tx-result .tx-src:hover .tx-tip,.tx-section-head>.tx-src:hover .tx-tip,.tx-result .tx-src.is-open .tx-tip,.tx-section-head>.tx-src.is-open .tx-tip,.tx-result .tx-src:focus-visible .tx-tip,.tx-section-head>.tx-src:focus-visible .tx-tip{transform:none}

/* Your details */
.tx-data{padding:0;overflow:hidden}
.tx-data summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 22px;cursor:pointer;list-style:none}
.tx-data summary::-webkit-details-marker{display:none}
.tx-data summary>span:first-child{display:grid;gap:3px}
.tx-data summary b{font-size:15px;font-weight:500}
.tx-data summary small{font-size:12px;color:var(--grey,#80857c)}
.tx-chev{font-size:18px;color:#80857c;transition:transform .25s var(--tx-ease)}
.tx-data[open] .tx-chev{transform:rotate(180deg)}
.tx-data[open] .tx-form{animation:tx-enter .35s var(--tx-ease) both}
.tx-form{display:grid;gap:16px;padding:0 22px 20px}
.tx-form fieldset{border:0;margin:0;padding:0;display:grid;gap:10px}
.tx-form legend{font-size:12px;font-weight:500;margin-bottom:8px;color:#3d4235}
.tx-form .field input,.tx-form .field select{height:40px;font-size:13px}
.tx-form .field span{font-size:11px}
.tx-form .is-invalid{border-color:#e0937f!important;box-shadow:0 0 0 3px #ff6a5c22}
.tx-four{grid-template-columns:repeat(4,minmax(0,1fr))}
.tx-checks{display:grid;gap:8px}
.tx-check{display:flex;gap:9px;align-items:flex-start;font-size:12.5px;line-height:1.45;color:#3d4235}
.tx-check input{margin:2px 0 0;accent-color:#9db82b;width:16px;height:16px}
.tx-form-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.tx-foot{margin:0;text-align:center;font-size:11px;color:#8b8f86}
.tx-empty{padding:40px 0;display:grid;gap:10px}

.tx-sheet{position:fixed;z-index:60;left:16px;right:16px;bottom:92px;display:grid;gap:6px;padding:14px 16px;border-radius:16px;background:#24271f;color:#f1f3ea;font-size:12px;line-height:1.5;box-shadow:0 20px 50px #1a1d1650;animation:tx-enter .25s cubic-bezier(.22,.8,.24,1) both}
.tx-sheet b{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#dcfa3b;font-weight:500}
@media (prefers-reduced-motion:reduce){.tx-sheet{animation:none}}
@media (max-width:1100px){.tx-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:650px){
  .tx-page{gap:14px}
  .tx-head .heading-actions{width:100%;justify-content:space-between}
  .tx-switch{width:100%;justify-content:space-between}
  .tx-switch button{padding:0 8px}
  .tx-head .button{width:100%}
  .tx-hero{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .tx-card{padding:14px;border-radius:18px}
  .tx-card-deadline{grid-column:1/-1}
  .tx-card .tx-num{font-size:22px}
  .tx-section{padding:16px;border-radius:20px}
  .tx-split{grid-template-columns:minmax(0,1fr)}
  .tx-bar-row,.tx-fall-row{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px}
  .tx-bar-row .tx-bar,.tx-fall-row .tx-fall-track{grid-column:1/-1;grid-row:2}
  .tx-result{justify-items:start;text-align:left}
  .tx-cols{height:160px;gap:4px}
  .tx-col-value{font-size:9.5px}
  .tx-quarters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tx-four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tx-form .form-grid{grid-template-columns:minmax(0,1fr)}
  .tx-form .tx-four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tx-steps{gap:2px}
  .tx-step b{font-size:7.5px}
  .tx-cal li{grid-template-columns:48px minmax(0,1fr);}
  .tx-cal .tx-pill{grid-column:2;justify-self:start}
  .tx-table{font-size:11px}
  .tx-table th,.tx-table td{padding:7px 4px}
  /* On a phone the source opens as a sheet above the bottom bar (taxes.mjs), never off-screen. */
  .tx-tip{display:none}
  .tx-data summary{padding:16px}
  .tx-form{padding:0 16px 16px}
}
@media (prefers-reduced-motion:reduce){
  .tx-page,.tx-card,.tx-data[open] .tx-form{animation:none}
  .tx-page *{transition:none!important}
  .tx-bar i,.tx-stack i,.tx-col-track i,.tx-fall-track i,.tx-stair-fill,.tx-step i{transform:none}
  .tx-ring-fill{stroke-dashoffset:var(--o)}
}
/* UX-10: the working-day note, once; elsewhere a § that explains it on hover or focus. */
.tx-shift-mark{display:inline-grid;place-items:center;width:18px;height:18px;margin-inline-start:4px;border-radius:50%;background:#fff4dd;color:#7b6a44;font-size:11px;font-style:normal;text-decoration:none;cursor:help;vertical-align:1px}
