/* Shared theme control. The original dark palette remains the default. */
.nav-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;border:1px solid #ffffff25;border-radius:50%;padding:0;background:#ffffff05;color:#d4b9f3;cursor:pointer;transition:background .25s,border-color .25s,transform .25s}
.theme-toggle:hover{background:#b49ae51a;border-color:#b49ae577;transform:rotate(8deg)}
.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle{position:relative;isolation:isolate;view-transition-name:theme-control}
.theme-toggle svg{position:absolute;transition:opacity .4s ease,transform .6s cubic-bezier(.22,1,.36,1)}
.theme-toggle .theme-icon-sun{opacity:1;transform:rotate(0) scale(1)}
.theme-toggle .theme-icon-moon{opacity:0;transform:rotate(-70deg) scale(.45)}
html[data-theme=light] .theme-toggle .theme-icon-sun{opacity:0;transform:rotate(90deg) scale(.45)}
html[data-theme=light] .theme-toggle .theme-icon-moon{opacity:1;transform:rotate(0) scale(1)}
.nav-cta-short{display:none}
/* A single soft dissolve keeps text aligned and the page still while colours change. */
html.theme-transition::view-transition-old(root){animation:none;mix-blend-mode:normal}
html.theme-transition::view-transition-new(root){animation:theme-in .6s cubic-bezier(.4,0,.2,1) both;mix-blend-mode:normal}
html.theme-transition::view-transition-group(root){animation-duration:.6s}
html.theme-transition .theme-toggle svg{transition:none}
html.theme-transition::view-transition-old(theme-control){animation:theme-control-out .4s ease both;mix-blend-mode:normal}
html.theme-transition::view-transition-new(theme-control){animation:theme-control-in .6s cubic-bezier(.22,1,.36,1) both;mix-blend-mode:normal}
@keyframes theme-control-out{to{opacity:0;transform:rotate(60deg) scale(.7)}}
@keyframes theme-control-in{from{opacity:0;transform:rotate(-70deg) scale(.65)}to{opacity:1;transform:rotate(0) scale(1)}}
@keyframes theme-in{from{opacity:0}to{opacity:1}}
html.theme-fade *,html.theme-fade *::before,html.theme-fade *::after{transition-property:background-color,color,border-color,box-shadow,fill,stroke,filter;transition-duration:.6s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-delay:0s}
@media(prefers-reduced-motion:reduce){.theme-toggle,.theme-toggle svg{transition:none}.theme-toggle:hover{transform:none}html.theme-transition::view-transition-old(root),html.theme-transition::view-transition-new(root){animation:none}}
@media(max-width:1100px){.nav-actions{gap:10px}.nav{gap:20px}nav{gap:20px}}
@media(max-width:1000px){.nav-cta-full{display:none}.nav-cta-short{display:inline}}
@media(max-width:760px){.nav{gap:10px}.nav-actions{gap:8px}.theme-toggle{flex-basis:40px;width:40px;height:40px}.nav .nav-cta{padding:11px 12px;gap:8px}}

@media(max-width:360px){.nav .brand{font-size:18px;gap:5px}.nav-actions{gap:6px}.nav .nav-cta{padding-inline:8px}.nav-cta>span:last-child{display:none!important}}

/* Pearl paper, plum typography, lavender accents. Covers keep their own palettes. */
html[data-theme=light]{color-scheme:light;--paper:#f8f6fb;--ink:#2b2135;--orange:#75509f;--muted:#7c658d;--line:#ded5e7}
html[data-theme=light] body{background:var(--paper);color:var(--ink)}
html[data-theme=light] .catalog-page{--soft:#6d5d79;--line:#ded5e7}
html[data-theme=light] .intro-shell{background:#f8f6fb;color:#2b2135}
html[data-theme=light] .intro-shell:before{background:radial-gradient(ellipse at 82% 42%,#dfcff166,transparent 60%),radial-gradient(ellipse at 15% 0,#eee7f74d,transparent 55%)}
html[data-theme=light] .intro-shell:after{border-color:#bfa4d52b}
html[data-theme=light] .nav{border-color:#ddd3e6}
html[data-theme=light] nav{color:#6d5c7b}
html[data-theme=light] nav a:hover,html[data-theme=light] nav [aria-current=page]{color:#6d4698}
html[data-theme=light] .nav-cta{background:#ffffff80;border-color:#d9cde4;color:#564063;box-shadow:0 2px 5px #48236304}
html[data-theme=light] .nav-cta:hover{background:#eee5f6;border-color:#bda4d1}
html[data-theme=light] .theme-toggle{background:#fffcff;color:#6c4697;border-color:#d6c7e2;box-shadow:0 3px 10px #4a2a6507}
html[data-theme=light] .theme-toggle:hover{background:#eae0f5;border-color:#a482c3}
html[data-theme=light] .hero>.eyebrow,html[data-theme=light] .eyebrow{color:#80688f}
html[data-theme=light] .dot{background:#9267bc;box-shadow:0 0 0 5px #ad88cf18}
html[data-theme=light] .hero h1>span,html[data-theme=light] .catalog-hero h1>span{color:#7953a3}
html[data-theme=light] .hero-bottom p{color:#6b5b78}
html[data-theme=light] .dark,html[data-theme=light] .hero .button{background:#7851a3;color:#fff;box-shadow:0 7px 23px #7851a31c}
html[data-theme=light] .dark:hover,html[data-theme=light] .hero .button:hover{background:#66428e;box-shadow:0 10px 28px #7851a32b}
html[data-theme=light] .outline{border-color:#c7b0db;color:#714b98;background:#ffffff40}
html[data-theme=light] .outline:hover{background:#e9def4;border-color:#ab88c8}
html[data-theme=light] .hero-meta{color:#786281;border-color:#ded3e8}
html[data-theme=light] .hero-fox,html[data-theme=light] .fox-mark img,html[data-theme=light] .about-fox img,html[data-theme=light] .catalog-emblem>img{filter:brightness(.78) saturate(1.04)}
html[data-theme=light] .fox-aura{background:radial-gradient(ellipse at 50% 55%,#b994dd26,transparent 66%)}
html[data-theme=light] .fox-orbit{border-color:#a27ac22b}
html[data-theme=light] .fox-orbit:after{background:#9a73bb77;box-shadow:0 0 15px #9a73bb22}
html[data-theme=light] .fox-hero-caption,html[data-theme=light] .fox-hero-caption>span:first-child{color:#7c638a}
html[data-theme=light] .ticker{background:#eee8f5;border-color:#ded2e8}
html[data-theme=light] .ticker>div{color:#7e688e}
html[data-theme=light] .ticker .separator{background:#a58ab8}
html[data-theme=light] .muted{color:#80688f}
html[data-theme=light] .small-note,html[data-theme=light] .section-top .small-note,html[data-theme=light] .about-left>.small-note{color:#766080}
html[data-theme=light] .service-list,html[data-theme=light] .service-list article,html[data-theme=light] .steps article{border-color:#ded4e8}
html[data-theme=light] .service-list article:hover{background:#ece4f441}
html[data-theme=light] .service-list p,html[data-theme=light] .about-copy p,html[data-theme=light] .steps p{color:#6e5c7c}
html[data-theme=light] .service-num,html[data-theme=light] .service-icon,html[data-theme=light] .steps article>span{color:#897096}
html[data-theme=light] .service-icon{border-color:#d2bee0}
html[data-theme=light] .service-icon:hover{background:#eaddf5;border-color:#ac88c7}
html[data-theme=light] .tags span{background:#eee7f6;border-color:#ddd0e8;color:#7d5c92}
html[data-theme=light] .tags span:hover{background:#e2d4ee}
html[data-theme=light] .future p{color:#564161}
html[data-theme=light] .future>span,html[data-theme=light] .future .muted{color:#7d638d}
html[data-theme=light] .work-section{background:#f0eaf6}
html[data-theme=light] .project-caption h3{color:#392a44}
html[data-theme=light] .project-caption p,html[data-theme=light] .home-context-note{color:#806b8d}
html[data-theme=light] .project-caption>.arrow{color:#855aa7}
html[data-theme=light] .home-collection:hover .collection-cover{box-shadow:0 14px 30px #4a236917}
html[data-theme=light] .signature,html[data-theme=light] .text-link,html[data-theme=light] .catalog-link{color:#7951a0;border-color:#cdb6df}
html[data-theme=light] .signature:hover,html[data-theme=light] .text-link:hover,html[data-theme=light] .catalog-link:hover{color:#4b2c6a}
html[data-theme=light] .contact{background:#eee6f6}
html[data-theme=light] .contact:before{background:radial-gradient(ellipse at 12% 70%,#c6a8e221,transparent 58%)}
html[data-theme=light] .contact .section-top{color:#7a6088}
html[data-theme=light] .contact h2 span{color:#8057a7}
html[data-theme=light] .telegram-link,html[data-theme=light] .contact-email{color:#714b96;border-color:#c3a8d8}
html[data-theme=light] .telegram-link:hover,html[data-theme=light] .contact-email:hover{color:#4b296b}
html[data-theme=light] .copy-contact{color:#80618f;border-color:#bba0ce}
html[data-theme=light] .contact-copy-status,html[data-theme=light] #copy-status{color:#76518c}
html[data-theme=light] .contact label{color:#6e4f81}
html[data-theme=light] .contact select,html[data-theme=light] .contact textarea{color:#43304f;border-color:#c6b0d6}
html[data-theme=light] .contact select option{background:#f8f3fc;color:#43304f}
html[data-theme=light] .contact textarea::placeholder{color:#7c658b}
html[data-theme=light] .contact select:focus,html[data-theme=light] .contact textarea:focus{outline-color:#9b77b8}
html[data-theme=light] .form-note{color:#80698e}
html[data-theme=light] #brief-result{border-color:#c9b3da}
html[data-theme=light] #brief-result textarea{background:#fffcff;border-color:#c6b0d6;color:#43304f}
html[data-theme=light] footer{border-color:#d6c9e2}
html[data-theme=light] footer>span{color:#796185}
html[data-theme=light] footer a:hover{color:#7951a0}
html[data-theme=light] .catalog-lead,html[data-theme=light] .catalog-heading>p,html[data-theme=light] .featured-copy p,html[data-theme=light] .catalog-contact p{color:#73617f}
html[data-theme=light] .catalog-emblem:before{background:radial-gradient(ellipse,#c8ade51c,transparent 70%)}
html[data-theme=light] .catalog-stats strong{color:#855aab}
html[data-theme=light] .catalog-stats span{color:#7c628c}
html[data-theme=light] .catalog-subnav{color:#7b648a}
html[data-theme=light] .catalog-subnav a:hover{color:#4e2d6b}
html[data-theme=light] .catalog-subnav a>span:not(.arrow){border-color:#d5c3e3;color:#78528e}
html[data-theme=light] .micro-label,html[data-theme=light] .context-note>span{color:#7b608a}
html[data-theme=light] .context-note p{color:#806d8c}
html[data-theme=light] .collection-tile{background:#fffdfd;color:#4a3458;border-color:#e0d5e9;box-shadow:0 3px 12px #58327004}
html[data-theme=light] .collection-tile:hover{background:#eee4f7;border-color:#c0a2d5}
html[data-theme=light] .tile-index{color:#80678d}
html[data-theme=light] .collection-tile>span:not(.tile-index):not(.arrow){color:#766082}
html[data-theme=light] .catalog-library{background:#f0eaf6;border-color:#e1d6eb}
html[data-theme=light] .catalog-toolbar label{color:#80668f}
html[data-theme=light] .catalog-toolbar input,html[data-theme=light] .catalog-toolbar select{background:#fffdfd;border-color:#d9cce5;color:#4a3358}
html[data-theme=light] .catalog-toolbar option{background:#fffdfd;color:#4a3358}
html[data-theme=light] .catalog-toolbar input::placeholder{color:#7c668b}
html[data-theme=light] .catalog-search svg{stroke:#9b7dae}
html[data-theme=light] .catalog-toolbar input:focus,html[data-theme=light] .catalog-toolbar select:focus{outline-color:#a17fba}
html[data-theme=light] .catalog-status-filters button{color:#755785}
html[data-theme=light] .catalog-status-filters button:hover{color:#4e2d6b}
html[data-theme=light] .catalog-status-filters button.active{color:#71478f;border-color:#cdb2df;background:#e5d8f1}
html[data-theme=light] #work-count{color:#785f87}
html[data-theme=light] .reset-filters{color:#8555a4}
html[data-theme=light] .selected-collection{background:#fffcff;border-color:#d6c2e4}
html[data-theme=light] .selected-collection h3{color:#50365e}
html[data-theme=light] .selected-collection p{color:#725b80}
html[data-theme=light] .work-card{background:#fffdfd;border-color:#e0d3ea;color:#493352;box-shadow:0 3px 14px #57247105}
html[data-theme=light] .work-card:hover{background:#faf5fe;border-color:#b99bce;box-shadow:0 10px 28px #66398210}
html[data-theme=light] .work-excerpt{color:#715c7e}
html[data-theme=light] .work-project{color:#8b65a4}
html[data-theme=light] .theme-label-moss{color:#597148}
html[data-theme=light] .theme-label-autumn{color:#936142}
html[data-theme=light] .theme-label-electric{color:#626e9a}
html[data-theme=light] .work-number{color:#866d94}
html[data-theme=light] .work-card-bottom{color:#805599;border-color:#eee4f4}
html[data-theme=light] .library-note{color:#7a6488}
html[data-theme=light] .no-works{border-color:#ceb8df}
html[data-theme=light] .no-works p{color:#725a82}
html[data-theme=light] .approach-grid article>span{color:#7e648d}
html[data-theme=light] .approach-grid p{color:#6e5b7a}
html[data-theme=light] dialog{background:#f8f4fc;color:#4b3357;border-color:#d4bde3;box-shadow:0 24px 100px #4e256335}
html[data-theme=light] .work-reader::backdrop{background:#38204470;backdrop-filter:blur(12px)}
html[data-theme=light] .reader-topbar{background:#f8f4fcf5;border-color:#e1d3eb}
html[data-theme=light] .reader-brand{color:#785e85}
html[data-theme=light] .reader-topbar button{border-color:#dac5e8;background:#ffffff80;color:#775189}
html[data-theme=light] .reader-topbar button:hover{background:#e8d9f3;border-color:#b38acc}
html[data-theme=light] .reader-meta h3{color:#79528e}
html[data-theme=light] .reader-meta p{color:#766180}
html[data-theme=light] .reader-badges span{color:#7b5492;border-color:#deccec;background:#eee5f7}
html[data-theme=light] .reader-paper{background:#fffdfd;border:1px solid #e5d7ee;color:#4c3658;box-shadow:0 5px 22px #6b338207}
html[data-theme=light] .reader-paper-head{color:#81618f;border-color:#e4d4ed}
html[data-theme=light] #reader-body{color:#6d517e}
html[data-theme=light] #reader-note{color:#816b8d;border-color:#e6d9ed}
html[data-theme=light] .reader-actions>span{color:#81628f}
html[data-theme=light] .reader-status{color:#7d5299}
html[data-theme=light] ::selection{background:#dfc9f1;color:#3d1f51}
html[data-theme=light] :where(a,button,input,select,textarea):focus-visible{outline-color:#9568b8}

/* Theme snapshots must not swallow clicks on the live page. */
html.theme-transition::view-transition,html.theme-transition::view-transition-group(root),html.theme-transition::view-transition-image-pair(root),html.theme-transition::view-transition-old(root),html.theme-transition::view-transition-new(root){pointer-events:none}
