.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:39px;height:39px;min-height:39px;padding:7px;border:1px solid var(--line);border-radius:7px;background:var(--white);color:var(--ink);font:600 12px var(--body);cursor:pointer;transition:border-color .2s,background .2s}
.theme-toggle:hover{border-color:var(--blue);background:var(--pale)}
.theme-toggle [data-theme-icon]{font-size:20px;line-height:1;width:20px;text-align:center}
.theme-toggle [data-theme-label]{display:none}
.legal-theme-row{display:flex;justify-content:flex-end;margin-bottom:12px}
/* Only the surface and inner row shrink. The sticky shell keeps its layout
   height, so the animation cannot feed back into the scroll threshold. */
html{--header-height:84px;--header-logo-width:200px;--header-surface:#fff;--header-collapse:12px;--header-scale:.857143}
html[data-theme] #header,html[data-theme] #header.scrolled{height:var(--header-height);padding:0;background:transparent;border:0;backdrop-filter:none;box-shadow:none;transition:none;isolation:isolate}
html[data-theme] .header::before{content:'';position:absolute;inset:0;z-index:-1;background:var(--header-surface);border-bottom:1px solid var(--line);transform-origin:top;transition:transform .32s ease,box-shadow .32s ease;pointer-events:none}
html[data-theme] .header.scrolled::before{transform:scaleY(var(--header-scale));box-shadow:0 5px 18px #10204412}
html[data-theme] .header .nav-wrap,html[data-theme] .header.scrolled .nav-wrap{height:var(--header-height);padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;transition:height .32s ease}
html[data-theme] .header.scrolled .nav-wrap{height:calc(var(--header-height) - var(--header-collapse))}
html[data-theme] .header .brand-image,html[data-theme] .header.scrolled .brand-image{width:var(--header-logo-width);transform-origin:left center;transition:transform .32s ease}
html[data-theme] .header.scrolled .brand-image{transform:scale(.88)}
@media(max-width:800px){html{--header-height:76px;--header-logo-width:165px;--header-collapse:8px;--header-scale:.894737}}
@media(max-width:480px){html{--header-height:72px;--header-logo-width:130px;--header-scale:.888889}.header .nav-wrap{gap:8px}.header .theme-toggle{width:34px;height:34px;min-height:34px}}
/* Reuse the transparent, full-resolution brand artwork instead of enlarging
   the 128px favicon. The SVG viewport shows only its original symbol. */
.hero-brand-mark{display:block;width:100%;height:auto;aspect-ratio:1;opacity:.16;transform:translate(var(--brand-x,0px),var(--brand-y,0px)) rotate(-8deg);transition:transform .65s cubic-bezier(.2,.8,.2,1)}
html[data-theme="dark"] .hero-brand-mark{filter:brightness(0) invert(1);opacity:.18}
.motion-paused .hero-brand-mark{transform:rotate(-8deg)}

html[data-theme="dark"]{--ink:#ecf2ff;--muted:#adbbd0;--blue:#6e96ff;--sky:#9bb7ff;--pale:#19283e;--line:#31435f;--white:#17253a;color-scheme:dark}
html[data-theme="dark"] body{background:#101a2a;color:var(--ink)}
html[data-theme="dark"]{--header-surface:#121f33}
html[data-theme="dark"] .header.scrolled::before{box-shadow:0 5px 18px #050b1838}
html[data-theme="dark"] .header .brand-image,html[data-theme="dark"] .site-footer .brand-image,html[data-theme="dark"] .admin-header img{filter:brightness(0) invert(1)}
html[data-theme="dark"] .nav-wrap nav a{color:#c4d1e7}
html[data-theme="dark"] .nav-wrap nav a:hover{color:#a8c1ff}
html[data-theme="dark"] .button,html[data-theme="dark"] .cta-panel{background:#355fcb;color:#fff}
html[data-theme="dark"] .button:hover{background:#4877e9}
html[data-theme="dark"] .studio-solutions{background:#0a1323;color:#fff}
html[data-theme="dark"] .studio-solutions .section-intro p,html[data-theme="dark"] .solution-story p,html[data-theme="dark"] .solution-pair p{color:#b9c7dd}
html[data-theme="dark"] .about-section{background:#17263b}
html[data-theme="dark"] .work-section{background:#142238;border-color:var(--line)}
html[data-theme="dark"] .service-card{background:linear-gradient(120deg,#1b2a41,#18263c)}
html[data-theme="dark"] .service-icon,html[data-theme="dark"] .form-result{background:#253b5b;border-color:#3c5780;color:#c8d9f5}
html[data-theme="dark"] .field label,html[data-theme="dark"] .privacy-read,html[data-theme="dark"] .form-bottom p{color:#b6c7de}
html[data-theme="dark"] .field input,html[data-theme="dark"] .field select,html[data-theme="dark"] .field textarea{background:#1c2b42;border-color:#405371;color:#edf2ff}
html[data-theme="dark"] .button-white{background:#eaf0ff;color:#2049bc}
html[data-theme="dark"] .home-project-card,html[data-theme="dark"] .project-list .project-card{background:#17253a;border-color:var(--line)}
html[data-theme="dark"] .home-project-image,html[data-theme="dark"] .gallery-featured,html[data-theme="dark"] .gallery-shot,html[data-theme="dark"] .screen-bar{background:#1d2d45}
html[data-theme="dark"] .project-price,html[data-theme="dark"] .image-link{background:#223550;color:#eef3ff;border-color:#465b7d}
html[data-theme="dark"] .project-price:hover{background:#30476b;color:#fff}
html[data-theme="dark"] .project-demo-actions .project-price{background:#223550}
html[data-theme="dark"] .site-footer{background:#0b1423;color:#b8c6dc}
html[data-theme="dark"] .site-footer a,html[data-theme="dark"] .site-footer p{color:inherit}
html[data-theme="dark"] .legal-page{background:#17253a;color:#edf2ff;border-color:var(--line)}
html[data-theme="dark"] .legal-page p,html[data-theme="dark"] .legal-page li{color:#b9c7da}
html[data-theme="dark"] .legal-page a{color:#9db8ff}
html[data-theme="dark"] .legal-notice,html[data-theme="dark"] .legal-table th{background:#20334f;border-color:#405371}
html[data-theme="dark"] .legal-table td,html[data-theme="dark"] .legal-table th,html[data-theme="dark"] .legal-links{border-color:#405371}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{color:#edf2ff;background:#1c2b42;border-color:#405371}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#9cacc5}
html[data-theme="dark"] .contact-form,html[data-theme="dark"] .form-card,html[data-theme="dark"] .contact-card{background:#17253a;color:#edf2ff;border-color:var(--line)}
html[data-theme="dark"] .admin-body{background:#101a2a;color:#edf2ff}
html[data-theme="dark"] .admin-header{background:#152238;border-color:var(--line)}
html[data-theme="dark"] .auth-card,html[data-theme="dark"] .admin-panel,html[data-theme="dark"] .inquiry-card,html[data-theme="dark"] dialog{background:#17253a;color:#edf2ff;border-color:var(--line)}
html[data-theme="dark"] .notice{background:#203451;color:#dbe6fa;border-color:#42618b}
html[data-theme="dark"] .notice.error{background:#4a2635;color:#ffe0e5;border-color:#8c4a60}
html[data-theme="dark"] .admin-body label,html[data-theme="dark"] .auth-card p,html[data-theme="dark"] .helper,html[data-theme="dark"] .inquiry-meta,html[data-theme="dark"] .inquiry-message,html[data-theme="dark"] .count span,html[data-theme="dark"] .audit-list li,html[data-theme="dark"] dialog p{color:#b4c4dd}
html[data-theme="dark"] .admin-body button:not(.button):not(.theme-toggle),html[data-theme="dark"] .inquiry-actions select{background:#223550;color:#eaf0fa;border-color:#405371}
html[data-theme="dark"] .admin-tabs button[aria-current=page]{background:#355fcb;color:#fff}
html[data-theme="dark"] .admin-body a,html[data-theme="dark"] .settings-links{color:#9db8ff}
html[data-theme="dark"] .admin-body input,html[data-theme="dark"] .admin-body textarea{background:#1c2b42;color:#edf2ff;border-color:#405371}
@media(max-width:800px){html[data-theme="dark"] .nav-wrap nav{background:#18273d;border-color:var(--line)}}
.category-editor-heading{font:650 16px var(--display);margin:28px 0 12px}.category-editor-list{display:grid;gap:10px}.category-editor-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.category-editor-row input{margin:0}.category-editor-row .danger{min-width:88px}.category-editor-list+.category-editor-heading{border-top:1px solid #dce5f2;padding-top:26px}.admin-panel #project-category-assignments select{display:block;width:100%;min-height:46px;border:1px solid #cbd7e9;border-radius:6px;padding:10px 12px;background:#fff;color:#142848}.admin-panel #category-editor-status{min-height:22px;margin:20px 0 12px;color:#687c98;font-size:13px}.admin-panel .panel-heading>.helper{margin-bottom:0!important}.admin-panel .panel-heading>div{min-width:0}.admin-panel #add-portfolio-category{white-space:nowrap}
html[data-theme="dark"] .category-editor-list+.category-editor-heading{border-color:#405371}html[data-theme="dark"] .admin-panel #project-category-assignments select{background:#1c2b42;color:#edf2ff;border-color:#405371}html[data-theme="dark"] .admin-panel #category-editor-status{color:#b4c4dd}
@media(max-width:650px){.admin-panel .panel-heading{align-items:flex-start;flex-direction:column}.category-editor-row{grid-template-columns:minmax(0,1fr) auto}.category-editor-row .danger{min-width:70px;padding-inline:10px}}
