:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#17151f;background:#f4f4f4;font-size:16px}*{box-sizing:border-box}body.page-cuentas{margin:0;padding:32px 24px;text-align:left;background:#f4f4f4;color:#17151f}.page{max-width:1150px;margin:auto;background:#fff;padding:48px 54px 36px;min-height:calc(100vh - 64px)}.header{display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:12px;color:#111;text-decoration:none}.brand img{width:55px;height:55px;object-fit:contain}.brand span{font:bold 21px/.85 Georgia,serif;letter-spacing:-1px}.current{color:#5d176c;font-weight:700;text-underline-offset:7px;text-decoration-thickness:2px}main{margin-top:75px}h1,h2{font-family:Georgia,'Times New Roman',serif;letter-spacing:-.035em;color:#14121c}h1{font-size:clamp(2.3rem,4.3vw,3.5rem);line-height:1.04;margin:0}.intro p{font-size:clamp(1.1rem,2vw,1.45rem);color:#50466b;margin:10px 0 0}.summary{display:grid;grid-template-columns:minmax(max-content, 29%) minmax(0, 1fr);gap:45px;margin:70px 0 60px}.balance{border-right:1px solid #ded9e3;padding-right:32px;display:flex;flex-direction:column;gap:14px;color:#50466b;font-size:1.2rem}.balance strong{color:#5d176c;font:bold 2.7rem Georgia,serif}.income{font-size:1.4rem;margin:0 0 30px}.bar{display:flex;height:16px;background:#eee7f2}.bar span:first-child{background:#d8bce9}.bar span:last-child{background:#a9dac8}.legend{display:flex;justify-content:space-between;gap:20px;margin-top:17px;color:#50466b}.legend strong{color:#17151f}.explanation,.updated,.status{font-size:.9rem;color:#5d536c;line-height:1.5}.explanation{margin:14px 0 0}.status:empty{display:none}.status{margin:40px 0}.movements{border-top:1px solid #b9a7c7;padding-top:40px}h2{font-size:2.5rem;margin:0 0 28px}.list{list-style:none;margin:0;padding:0}.movement{border-top:1px solid #dedbe2;display:grid;grid-template-columns:145px minmax(0,1fr) auto 42px;align-items:center;gap:20px;padding:17px 0}.movement:last-child{border-bottom:1px solid #dedbe2}.movement time{color:#50466b}.concept{font-size:1.12rem;overflow-wrap:anywhere}.amount{font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}.positive{color:#087b4c}.negative{color:#641777}.document{border:0;background:none;color:#641777;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center}.document svg{width:24px;height:27px}.document:hover,.document:focus-visible{background:#f3edf6}.updated{margin-top:24px}.page-cuentas .site-footer{margin:30px auto 0}.page-cuentas .site-footer a,.page-cuentas .site-footer button{color:#5d176c}dialog{width:min(560px,calc(100% - 36px));border:1px solid #d8cfdd;padding:30px;color:#17151f}dialog::backdrop{background:rgba(22,15,26,.52)}.dialog-header{display:flex;align-items:start;justify-content:space-between;gap:20px}.dialog-header h2{font-size:2rem;overflow-wrap:anywhere}.dialog-header button{font:2rem/1 sans-serif;color:#5d176c;background:none;border:0;cursor:pointer}.dialog-meta{color:#50466b}.dialog-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}dialog a{color:#641777;overflow-wrap:anywhere}dialog ul{padding-left:20px}button:focus-visible,a:focus-visible{outline:3px solid #1d8062;outline-offset:3px}[hidden]{display:none!important}@media(max-width:650px){body.page-cuentas{padding:0}.page{padding:25px 24px 35px;min-height:100vh}.brand img{width:42px;height:42px}.brand span{font-size:16px}.current{font-size:.9rem}main{margin-top:55px}.summary{display:block;margin:42px 0}.balance{border:0;padding-right:0;gap:9px;margin-bottom:32px}.balance strong{font-size:2.4rem}.income{font-size:1.12rem;margin-bottom:22px}.movements{padding-top:30px}h2{font-size:2rem;margin-bottom:20px}.movement{grid-template-columns:minmax(0,1fr) auto 34px;gap:4px 10px;padding:14px 0}.movement time{grid-column:1/-1;font-size:.85rem}.concept{font-size:1rem}.document{padding:5px}.legend{font-size:.9rem}.page-cuentas .site-footer{margin-top:30px}}

/* Movement details */
.movement{display:block;padding:0}
.movement-button{display:grid;grid-template-columns:145px minmax(0,1fr) auto 42px;align-items:center;gap:20px;width:100%;padding:17px 0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.movement-button:hover .concept{text-decoration:underline;text-decoration-color:#b9a7c7;text-underline-offset:4px}
.movement-button:focus-visible{outline:3px solid #1d8062;outline-offset:-3px}
.movement-button .document{pointer-events:none}
#details{position:fixed;inset:0;width:min(510px,calc(100% - 40px));max-width:none;max-height:min(85vh,800px);max-height:min(85dvh,800px);margin:auto;overflow-y:auto;overscroll-behavior:contain;border:1px solid #ded9e3;border-radius:2px;padding:36px 38px 40px;background:#fff;color:#17151f;text-align:left}
#details::backdrop{background:rgba(22,15,26,.52)}
#details .dialog-header{display:flex;align-items:flex-start;gap:20px}
#details .dialog-header h2{flex:1;font-size:2rem;line-height:1.12;margin:0;overflow-wrap:anywhere}
#details #close{flex:none;display:grid;place-items:center;width:44px;height:44px;margin:-8px -10px 0 0;padding:0;border:0;background:transparent;color:#5d176c;font:2rem/1 sans-serif;cursor:pointer}
#details #close:hover{color:#32103b}
#details .dialog-date{margin:12px 0 0;color:#50466b;font-size:.98rem}
#details .dialog-amount{margin:20px 0 0;font-size:1.45rem;font-weight:700;font-variant-numeric:tabular-nums}
#details .dialog-content.has-content{border-top:1px solid #dedbe2;margin-top:26px;padding-top:24px}
#details .detail-description{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}
#details .detail-links{margin-top:26px}
#details .detail-links:first-child{margin-top:0}
#details .detail-links h3{margin:0 0 12px;color:#17151f;font-size:1rem;font-weight:700}
#details .detail-links ul{list-style:none;margin:0;padding:0}
#details .detail-links li+li{margin-top:13px}
#details .detail-links a{display:flex;align-items:flex-start;gap:10px;color:#641777;text-decoration:underline;text-underline-offset:3px;line-height:1.45;overflow-wrap:anywhere}
#details .detail-link-icon,#details .detail-external-icon{display:inline-flex;flex:none;color:#641777}
#details .detail-link-icon svg{width:19px;height:22px}
#details .detail-external-icon svg{width:16px;height:16px;margin-top:3px}
@media(max-width:650px){
  .movement-button{grid-template-columns:minmax(0,1fr) auto 34px;gap:4px 10px;padding:14px 0}
  #details{inset:auto 0 0;width:100%;max-height:85vh;max-height:85dvh;margin:0;border:0;border-radius:14px 14px 0 0;padding:30px 24px max(32px,env(safe-area-inset-bottom))}
  #details .dialog-header h2{font-size:1.8rem}
}

/* Compact editorial detail */
#details{padding:24px 32px 28px}
#details::backdrop{background:rgba(22,15,26,.27)}
#details .dialog-header{align-items:center;justify-content:space-between;gap:16px}
#details .dialog-date{margin:0;color:#50466b;font-size:.9rem;line-height:1.4}
#details #close{margin:-8px -10px -8px 0}
#details .dialog-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-top:12px}
#details .dialog-heading h2{min-width:0;margin:0;font-size:1.5rem;line-height:1.2;overflow-wrap:anywhere}
#details .dialog-amount{flex:none;margin:0;font-size:1.15rem;line-height:1.35}
#details .dialog-content.has-content{margin:0;padding:0;border:0}
#details .detail-description{margin:14px 0 0;color:#27272a;font-size:.98rem;line-height:1.55}
#details .detail-links{list-style:none;margin:20px 0 0;padding:0;border-top:1px solid #dedbe2}
#details .detail-links li+li{margin:0}
#details .detail-links a{display:flex;align-items:center;gap:12px;min-height:62px;padding:13px 0;color:#17151f;text-decoration:none;line-height:1.35}
#details .detail-links a:hover .detail-link-label{text-decoration:underline;text-underline-offset:3px}
#details .detail-link-text{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
#details .detail-link-label{overflow-wrap:anywhere;font-size:.96rem;font-weight:600}
#details .detail-link-type{color:#62586d;font-size:.8rem;font-weight:400}
#details .detail-external-icon svg{margin:0}
@media(max-width:650px){
  #details{padding:22px 24px max(24px,env(safe-area-inset-bottom))}
  #details .dialog-heading{align-items:flex-start;gap:12px}
  #details .dialog-heading h2{font-size:1.35rem}
  #details .dialog-amount{font-size:1.05rem;white-space:nowrap}
}

#details .detail-provider{display:flex;flex-wrap:wrap;gap:4px 10px;margin:14px 0 0;font-size:.93rem;line-height:1.5;color:#50466b}
#details .detail-provider strong{color:#17151f;font-weight:600;overflow-wrap:anywhere}

/* Reuse the site's theme toggle and palette, including the detail sheet. */
[data-theme="dark"] body.page-cuentas{background:var(--bg-body);color:var(--text-main)}
[data-theme="dark"] .page{background:var(--bg-container)}
[data-theme="dark"] .brand,[data-theme="dark"] h1,[data-theme="dark"] h2{color:var(--text-header)}
.brand .brand-logo-dark{display:none}
[data-theme="dark"] .brand .brand-logo-light{display:none}
[data-theme="dark"] .brand .brand-logo-dark{display:block}
[data-theme="dark"] .current,[data-theme="dark"] .page-cuentas .site-footer a,[data-theme="dark"] .page-cuentas .site-footer button{color:#d6b6e4}
[data-theme="dark"] .intro p,[data-theme="dark"] .balance,[data-theme="dark"] .legend,[data-theme="dark"] .movement time,[data-theme="dark"] .explanation,[data-theme="dark"] .updated,[data-theme="dark"] .status{color:#d3c5df}
[data-theme="dark"] .balance strong{color:#e0b6ef}
[data-theme="dark"] .legend strong{color:var(--text-main)}
[data-theme="dark"] .balance,[data-theme="dark"] .movement,[data-theme="dark"] .movements{border-color:#5a4d63}
[data-theme="dark"] .bar{background:#38303e}
[data-theme="dark"] .bar span:first-child{background:#9870a9}
[data-theme="dark"] .bar span:last-child{background:#77bba2}
[data-theme="dark"] .positive{color:#79d6a9}
[data-theme="dark"] .negative,[data-theme="dark"] .document{color:#dda7ee}
[data-theme="dark"] #details{background:var(--bg-container);border-color:#5a4d63;color:var(--text-main)}
[data-theme="dark"] #details::backdrop{background:rgba(0,0,0,.55)}
[data-theme="dark"] #details .dialog-heading h2,[data-theme="dark"] #details .detail-provider strong,[data-theme="dark"] #details .detail-description,[data-theme="dark"] #details .detail-links a{color:var(--text-main)}
[data-theme="dark"] #details .dialog-date,[data-theme="dark"] #details .detail-provider,[data-theme="dark"] #details .detail-link-type{color:#d3c5df}
[data-theme="dark"] #details #close,[data-theme="dark"] #details .detail-link-icon,[data-theme="dark"] #details .detail-external-icon{color:#dda7ee}
[data-theme="dark"] #details .detail-links{border-color:#5a4d63}
[data-theme="dark"] button:focus-visible,[data-theme="dark"] a:focus-visible{outline-color:#79d6a9}
#details .detail-updated{margin:18px 0 0;color:#62586d;font-size:.8rem;line-height:1.4}
[data-theme="dark"] #details .detail-updated{color:#d3c5df}
#details .detail-description{white-space:normal}
#details .detail-description p{margin:0}
#details .detail-description p+p,#details .detail-description p+ul,#details .detail-description p+ol,#details .detail-description ul+p,#details .detail-description ol+p{margin-top:.65em}
#details .detail-description ul,#details .detail-description ol{margin:0;padding-left:1.4em}
#details .detail-description a{color:#641777;text-decoration:underline;text-underline-offset:3px}
[data-theme="dark"] #details .detail-description a{color:#dda7ee}

.movement-category{display:inline-block;max-width:100%;margin-top:14px;padding:2px 8px;border:1px solid #ded9e3;border-radius:999px;color:#625a69;font-size:.75rem;font-weight:400;line-height:1.4;overflow-wrap:anywhere}
[data-theme="dark"] .movement-category{border-color:#5a4d63;color:#d3c5df}

/* Match the expense label to the purple segment while keeping text legible. */
#expenses{color:#641777}
[data-theme="dark"] #expenses{color:#dda7ee}

.expense-legend{color:#641777}
.balance strong{color:#087b4c}
[data-theme="dark"] .expense-legend{color:#dda7ee}
[data-theme="dark"] .balance strong{color:#79d6a9}
