/* Additive theme layer. Original light and A4 styles are kept intact. */
.theme-toggle{width:36px;height:36px;flex-shrink:0;display:inline-grid;place-items:center;padding:0;background:#f6f7f9;color:#536781;border:1px solid #dce2ea;border-radius:9px;cursor:pointer}
.theme-toggle:hover{background:#eaf0f8;border-color:#bfc9d8}.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.theme-toggle .sun{display:none}
#theme-status{position:fixed;bottom:20px;right:20px;max-width:calc(100% - 40px);padding:14px 18px;border-radius:9px;background:#233754;color:white;font-size:12px;line-height:1.6;z-index:30;box-shadow:0 8px 30px #0003}
@media(max-width:500px){.site-header nav{gap:10px}.theme-toggle{width:32px;height:32px}.site-header{gap:8px}}
@media screen{
html[data-theme=dark]{color-scheme:dark;background:#101722;color:#e0e7f1;--muted:#a7b3c6;--line:#2c394d}
html[data-theme=dark] body{background:#101722}
[data-theme=dark] .site-header{background:#141e2c;border-color:#2c394d}
[data-theme=dark] .brand{color:#edf2fb}
[data-theme=dark] .brand-icon{background:#2c466f;color:#f1f5fc}
[data-theme=dark] .beta,[data-theme=dark] .nav-link span{background:#253247;border-color:#3a4960;color:#b8c8df}
[data-theme=dark] .home-link,[data-theme=dark] .nav-link{color:#c4cfdf}
[data-theme=dark] .home-link:hover,[data-theme=dark] .back-link:hover{color:#fff}
[data-theme=dark] .theme-toggle{background:#25354b;border-color:#41536f;color:#d8e5fa}
[data-theme=dark] .theme-toggle:hover{background:#314662}
[data-theme=dark] .theme-toggle .sun{display:block}[data-theme=dark] .theme-toggle .moon{display:none}
[data-theme=dark] .button{background:#5278b3;border-color:#668ac0;color:#fff;box-shadow:0 3px 8px #0002}
[data-theme=dark] .button:hover{background:#6188c1;border-color:#81a0cd}
[data-theme=dark] .button.secondary{background:#1d2b3f;border-color:#40516b;color:#d9e4f5}
[data-theme=dark] .button.secondary:hover{background:#293c56;border-color:#6480a7}
[data-theme=dark] .button.danger{background:#a5414b;border-color:#bc5f68}
[data-theme=dark] .text-button{color:#c3d3ec}[data-theme=dark] .text-button:hover{color:#fff}
[data-theme=dark] .hero h1 em{color:#a6c3ee}
[data-theme=dark] .hero-copy .eyebrow{background:#1c2b40;border-color:#334965;color:#b3caeb}
[data-theme=dark] .eyebrow{color:#9fb7d8}[data-theme=dark] .dot{background:#9ab8e5}
[data-theme=dark] .hero-copy>p,[data-theme=dark] .hero-checks{color:#aab9cf}
[data-theme=dark] .demo-window{background:#182333;border-color:#37465e;box-shadow:0 25px 50px -15px #0007}
[data-theme=dark] .demo-toolbar{background:#1c2a3c;border-color:#35455c;color:#a4b5ce}
[data-theme=dark] .demo-dots i{background:#66778f}[data-theme=dark] .demo-lock{color:#a3b6d3}
[data-theme=dark] .demo-sidebar{background:#182333;border-color:#35455c;color:#93a7c4}
[data-theme=dark] .demo-sidebar-mark{color:#d3e2f7}[data-theme=dark] .demo-sidebar .selected{background:#304664;color:#dbe9ff}
[data-theme=dark] .demo-canvas{background:#243248}
[data-theme=dark] .demo-canvas-heading b{color:#c5d3e8}[data-theme=dark] .demo-canvas-heading>span{border-color:#4c607f;color:#bbcde7}
[data-theme=dark] .floating-tag{background:#213148;color:#e4edfb;border-color:#405572;box-shadow:0 10px 28px #0004}
[data-theme=dark] .floating-tag small{color:#aabedb}[data-theme=dark] .tag-icon{background:#334c6e;border-color:#4d668b;color:#d5e7ff}
[data-theme=dark] .sample-caption{color:#93a5bf}
[data-theme=dark] .benefit-strip{background:#141e2c}
[data-theme=dark] .benefit-strip span,[data-theme=dark] .benefit-strip b{color:#acbad0}[data-theme=dark] .benefit-strip i{color:#5e7392}
[data-theme=dark] .steps article{border-color:#35445a}[data-theme=dark] .steps article>span{background:#213149;border-color:#3b506e;color:#b9cce7}
[data-theme=dark] .templates-section{background:#172231;border-color:#2c3b50}
[data-theme=dark] .template-card{background:#29384e;border-color:#40506a}
[data-theme=dark] .template-card:hover{border-color:#82a2d0;box-shadow:0 12px 24px #0003}
[data-theme=dark] .template-card>span{background:#1e2c40;border-color:#40506a;color:#e2eaf7}
[data-theme=dark] .template-card small{color:#b0c0d7}[data-theme=dark] .template-card>span>i{background:#2b3e58;border-color:#4a6080;color:#c3d9f8}
[data-theme=dark] .privacy-section{background:#1c2e49;border-color:#3a5273}
[data-theme=dark] .privacy-section p{color:#c0cee2}[data-theme=dark] .privacy-section small{color:#afc0d8}
[data-theme=dark] .site-footer p,[data-theme=dark] .site-footer>span{color:#a6b6ce}
[data-theme=dark] .faq summary::after{color:#b0c6e4}
[data-theme=dark] .back-link,[data-theme=dark] .workspace-heading p{color:#a5b8d3}
[data-theme=dark] .form-card,[data-theme=dark] .library-tools,[data-theme=dark] .offer-row{background:#182435;border-color:#33445e;box-shadow:0 3px 12px #0001}
[data-theme=dark] .card-heading{border-color:#304159}
[data-theme=dark] .card-heading>span{background:#253a55;border-color:#3c5577;color:#bdd2f0}
[data-theme=dark] label{color:#bccce3}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{background:#121e2f;color:#e2ebf8;border-color:#3b506e;box-shadow:none}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#92a6c2}
[data-theme=dark] input:hover,[data-theme=dark] select:hover,[data-theme=dark] textarea:hover{border-color:#6380a8}
[data-theme=dark] input:focus,[data-theme=dark] select:focus,[data-theme=dark] textarea:focus{border-color:#a5c5f2;box-shadow:0 0 0 3px #82a9e126}
[data-theme=dark] input[aria-invalid=true]{border-color:#e58991}
[data-theme=dark] .party-tabs{background:#101d2e;border-color:#304660}
[data-theme=dark] .party-tabs button{color:#a7bbd6}[data-theme=dark] .party-tabs .active{background:#304b71;color:#edf4ff;box-shadow:0 1px 4px #0003}
[data-theme=dark] .field-hint,[data-theme=dark] .local-note{color:#a1b4d0}
[data-theme=dark] .item-card{background:#142032;border-color:#354964}
[data-theme=dark] .item-top{color:#acc0dc}[data-theme=dark] .icon-button{color:#b3c7e5}
[data-theme=dark] .icon-button:hover{background:#502d37;color:#ffd0d3}
[data-theme=dark] .item-error{color:#ffb0b7}
[data-theme=dark] .add-item{background:#20344f;border-color:#617fa7;color:#c7dcf9}[data-theme=dark] .add-item:hover{background:#2c466a}
[data-theme=dark] .editor-totals{border-color:#334a67}
[data-theme=dark] .editor-totals>div{color:#b0c3df}[data-theme=dark] .editor-totals>div b{color:#d5e4f8}
[data-theme=dark] .editor-totals>div:last-child{background:#293f60;border-color:#46628a;color:#c4d8f5}[data-theme=dark] .editor-totals>div:last-child b{color:#f0f5fd}
[data-theme=dark] .preview-panel{background:#202d40;border-color:#3c4d66}
[data-theme=dark] .preview-heading,[data-theme=dark] .preview-heading>div,[data-theme=dark] .preview-hint{color:#b2c5e0}
[data-theme=dark] .preview-heading>span{background:#2a3d59;border-color:#4a6284;color:#ccddf5}
[data-theme=dark] #preview-pages{scrollbar-color:#627b9e transparent}
[data-theme=dark] .offer-row p{color:#a4b7d1}[data-theme=dark] .amount{color:#c2d8f7}
[data-theme=dark] .row-actions button{background:#263b57;border-color:#405b7e;color:#c1d6f3}[data-theme=dark] .row-actions button:hover{background:#375478}
[data-theme=dark] .row-actions button:last-child{background:#3e2936;border-color:#624050;color:#efb1bd}
[data-theme=dark] .empty-state{background:#182435;border-color:#465d7c}[data-theme=dark] .empty-state>span{background:#293f5d;border-color:#456287;color:#bed4f4}
[data-theme=dark] dialog{color:#e0e7f1;background:#1b293d;border-color:#4a6080;box-shadow:0 30px 90px #0007}
[data-theme=dark] dialog::backdrop{background:#070d17b3}[data-theme=dark] .dialog-inner ul{color:#b4c5df}
[data-theme=dark] #dialog-actions{border-color:#3d526f}[data-theme=dark] #toast{background:#304a70;border-color:#5d7da7}
[data-theme=dark] .skip{background:#213652;color:#e7f0ff}
/* Document canvases deliberately remain identical to light mode. */
[data-theme=dark] .paper,[data-theme=dark] .sample-paper,[data-theme=dark] .mini-page{color-scheme:light}
}
