/* The system preference remains live until a visitor chooses a mode. */
:root{color-scheme:light;--page:#e8e6df;--ink:#171817;--muted:#595b55;--surface:#d9d5ca;--line:#17181755;--strong-line:#171817;--accent:#a65337;--focus:#7c4937;--inverse:#f5f4ee;--success:#d2dfce;--error:#f1d8cf;--home-glow:#f2f0e9;--home-shadow:#d6d4ca;--media:#d7d4ca;--blade-highlight:#dad9d1;--blade-mid:#94968e;--blade-shadow:#c6c7bd;--blade-edge:#76746d;--preview-stroke:rgba(0,0,0,.32)}
@media(prefers-color-scheme:dark){:root:not([data-theme]){color-scheme:dark;--page:#1b1c1a;--ink:#eeede6;--muted:#bebfb5;--surface:#292b27;--line:#eeede655;--strong-line:#eeede6;--accent:#e7a487;--focus:#efb292;--inverse:#1b1c1a;--success:#304438;--error:#52352e;--home-glow:#33352f;--home-shadow:#151614;--media:#30312d;--blade-highlight:#4b4e48;--blade-mid:#242622;--blade-shadow:#3b3d38;--blade-edge:#969b8e;--preview-stroke:rgba(238,237,230,.48)}}
:root[data-theme=dark]{color-scheme:dark;--page:#1b1c1a;--ink:#eeede6;--muted:#bebfb5;--surface:#292b27;--line:#eeede655;--strong-line:#eeede6;--accent:#e7a487;--focus:#efb292;--inverse:#1b1c1a;--success:#304438;--error:#52352e;--home-glow:#33352f;--home-shadow:#151614;--media:#30312d;--blade-highlight:#4b4e48;--blade-mid:#242622;--blade-shadow:#3b3d38;--blade-edge:#969b8e;--preview-stroke:rgba(238,237,230,.48)}
body{background:var(--page);color:var(--ink)}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,.focus-nav-dropdown summary:focus-visible,.meeting-times label:has(input:focus-visible){outline-color:var(--focus)}
.header,.footer,.transfer-download-list li,.header .mobile-menu nav a{border-color:var(--line)}
.content-section,.header .mobile-menu nav{border-color:var(--strong-line)}
.dot{color:var(--accent)}
.empty-note{color:var(--muted)}
.cta{background:var(--surface)}
.button,.portfolio-filters a[aria-current=page],.portfolio-filters a:hover,.meeting-times label:has(input:checked){background:var(--ink);border-color:var(--ink);color:var(--inverse)}
.button:hover{background:transparent;color:var(--ink)}
.form-grid input,.form-grid textarea,.meeting-booking .form-grid select{color:var(--ink);border-color:var(--line)}
.success{background:var(--success);color:var(--ink)}
.form-error{background:var(--error);color:var(--ink)}
.home-texture{background:radial-gradient(ellipse at 20% 30%,var(--home-glow) 0,transparent 50%),radial-gradient(ellipse at 90% 80%,var(--home-shadow) 0,transparent 50%),var(--page)}
.home-stage[data-contrast=dark]:is(.is-active,.is-switching) .home-center,.home-stage[data-contrast=dark]:is(.is-active,.is-switching) .home-top,.home-stage[data-contrast=dark]:is(.is-active,.is-switching) .home-bottom,.home-stage[data-contrast=dark]:is(.is-active,.is-switching) .home-stock-credit,.home-stage[data-contrast=dark]:is(.is-active,.is-switching) .home-touch-hint{color:#171817}
.detail-content>img{background:var(--media)}
.header .mobile-menu nav,.gallery-dialog,.focus-nav-tree .focus-nav-dropdown>ul{background:var(--page);color:var(--ink)}
.gallery-dialog::backdrop{background:#000d}
.portfolio-filters a,.focus-nav-tree ul,.portfolio-motion-control button,.focus-nav-tree .focus-nav-dropdown>ul,.focus-nav-tree .focus-nav-dropdown .focus-nav-dropdown>ul{border-color:var(--line)}
/* The two icons indicate the active appearance; the button toggles between them. */
.theme-control,.home-controls .theme-control{display:inline-flex;align-items:center;justify-content:center;flex:none;width:66px;min-height:44px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}
.theme-control[hidden]{display:none}
.theme-control-track{position:relative;display:grid;grid-template-columns:1fr 1fr;align-items:center;width:64px;height:30px;border:1px solid currentColor;border-radius:999px}
.theme-control-indicator{position:absolute;top:2px;left:3.5px;width:24px;height:24px;border-radius:50%;background:var(--ink);transition:transform .2s ease}
.theme-control[aria-checked=true] .theme-control-indicator{transform:translateX(31px)}
.theme-control svg{position:relative;z-index:1;width:16px;height:16px;margin:auto}
.theme-control[aria-checked=false] .theme-control-sun,.theme-control[aria-checked=true] .theme-control-moon{color:var(--page)}
.theme-control:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
@media(max-width:800px){.header .theme-control{margin-left:auto}.header-brand{margin-right:0}}
@media(max-width:700px){.home-controls{flex-wrap:wrap;justify-content:flex-end}}
@media(prefers-reduced-motion:reduce){.theme-control-indicator{transition:none}}

/* The iris inherits the same palette as the surrounding home screen. */
.home-aperture-blades stop:nth-child(1){stop-color:var(--blade-highlight)}
.home-aperture-blades stop:nth-child(2){stop-color:var(--blade-mid)}
.home-aperture-blades stop:nth-child(3){stop-color:var(--blade-shadow)}
.home-aperture-blade{stroke:var(--blade-edge)}

/* The active home link keeps a theme-aware outline over the preview. */
.home-stage.is-active .home-center [data-preview].active{-webkit-text-stroke-color:var(--preview-stroke)}

/* Keep the fading home-link text light while the iris opens in dark mode. */
@media(prefers-color-scheme:dark){:root:not([data-theme]) .home-stage[data-contrast]:is(.is-active,.is-switching) .home-center{color:var(--ink)}}
:root[data-theme=dark] .home-stage[data-contrast]:is(.is-active,.is-switching) .home-center{color:var(--ink)}
