/* Focused appearance adapter, appearance patch 1.3.4 over system 1.3.0. Import tokens.css first.
   Exact Relay five-element scene/page/wave protocol. No generic form/type rules.
   Use .lf-theme-page on the page; data-lf-theme-surface for paint; data-lf-theme-text for text owners. */
/* Private, non-inherited paint aliases: retain all public colour tokens. */
@property --lf-appearance-page-top {syntax:"<color>";inherits:false;initial-value:#f4f2eb;}
@property --lf-appearance-page-base {syntax:"<color>";inherits:false;initial-value:#f1eee5;}
@property --lf-appearance-sky-top {syntax:"<color>";inherits:false;initial-value:#d7d8d2;}
@property --lf-appearance-sky-bottom {syntax:"<color>";inherits:false;initial-value:#f1eee5;}
.lf-theme-page {--lf-appearance-page-top:var(--lf-color-page-top);--lf-appearance-page-base:var(--lf-color-page);background-color:var(--lf-color-page);background-image:var(--lf-surface-texture),linear-gradient(180deg,var(--lf-appearance-page-top),var(--lf-appearance-page-base));background-size:128px 128px,100% 100%;background-repeat:repeat,no-repeat;background-attachment:scroll,fixed;}
.lf-appearance {display:flex;align-items:center;gap:0;flex:none;}
.lf-appearance>.lf-system-reset {display:none;}
.lf-appearance[data-show-system-reset="true"] {gap:10px;}
.lf-appearance[data-show-system-reset="true"]>.lf-system-reset {display:block;}
.lf-system-reset {width:106px;height:44px;border:0;padding:0;background:none;text-align:left;font:400 13px/20px var(--lf-type-family-ui);color:var(--lf-color-muted);}
.lf-theme-toggle,.lf-theme-switch {display:block;position:relative;flex:none;width:82px;height:44px;padding:0;border:0;border-radius:999px;background:transparent;cursor:pointer;}
.lf-theme-switch input {position:absolute;inset:0;z-index:2;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer;}
.lf-theme-scene {--lf-appearance-sky-top:var(--lf-landscape-day-sky-top);--lf-appearance-sky-bottom:var(--lf-landscape-day-sky-bottom);position:absolute;display:block;inset:2px 0;overflow:hidden;border-radius:999px;background:linear-gradient(180deg,var(--lf-appearance-sky-top),var(--lf-appearance-sky-bottom));box-shadow:inset 0 1px 4px var(--lf-color-shadow);transition:--lf-appearance-sky-top var(--lf-motion-landscape),--lf-appearance-sky-bottom var(--lf-motion-landscape);}
.lf-theme-scene i {display:block;position:absolute;pointer-events:none;}
.lf-scene-sun {width:16px;height:16px;border-radius:50%;top:7px;left:14px;background:var(--lf-product-scene-sun-day,var(--lf-landscape-sun));transition:transform var(--lf-motion-landscape) var(--lf-motion-settle);}
.lf-scene-moon {width:14px;height:14px;border-radius:50%;top:7px;right:15px;background:var(--lf-product-scene-moon-night,var(--lf-landscape-moon));transform:translate(-28px,40px);box-shadow:inset -4px -2px 0 var(--lf-color-input-border);transition:transform var(--lf-motion-landscape) var(--lf-motion-settle);}
.lf-scene-ridge {bottom:-1px;width:100%;height:23px;clip-path:polygon(0 70%,16% 25%,34% 70%,53% 5%,76% 64%,91% 30%,100% 60%,100% 100%,0 100%);transition:background var(--lf-motion-landscape),transform var(--lf-motion-landscape);}
.lf-scene-ridge.far {bottom:3px;background:var(--lf-landscape-day-ridge);}
.lf-scene-ridge.near {height:17px;transform:translateX(-6px) scaleX(1.2);background:var(--lf-product-ridge-day,var(--lf-landscape-day-ridge));}
.lf-scene-stars {width:2px;height:2px;border-radius:50%;top:9px;left:20px;opacity:0;background:var(--lf-landscape-moon);box-shadow:12px -3px var(--lf-landscape-moon),21px 6px var(--lf-landscape-moon),37px -2px var(--lf-landscape-moon),45px 9px var(--lf-landscape-moon),5px 13px var(--lf-landscape-moon);transition:opacity var(--lf-motion-landscape);}
.lf-theme-toggle[aria-pressed="true"] .lf-theme-scene,.lf-theme-switch input:checked+.lf-theme-scene {--lf-appearance-sky-top:var(--lf-landscape-night-sky-top);--lf-appearance-sky-bottom:var(--lf-landscape-night-sky-bottom);}
.lf-theme-toggle[aria-pressed="true"] .lf-scene-sun,.lf-theme-switch input:checked+.lf-theme-scene .lf-scene-sun {transform:translate(36px,39px);}
.lf-theme-toggle[aria-pressed="true"] .lf-scene-moon,.lf-theme-switch input:checked+.lf-theme-scene .lf-scene-moon {transform:translate(0,0);}
.lf-theme-toggle[aria-pressed="true"] .lf-scene-stars,.lf-theme-switch input:checked+.lf-theme-scene .lf-scene-stars {opacity:1;}
.lf-theme-toggle[aria-pressed="true"] .lf-scene-ridge.far,.lf-theme-switch input:checked+.lf-theme-scene .lf-scene-ridge.far {background:var(--lf-landscape-night-ridge);transform:translateX(3px);}
.lf-theme-toggle[aria-pressed="true"] .lf-scene-ridge.near,.lf-theme-switch input:checked+.lf-theme-scene .lf-scene-ridge.near {background:var(--lf-product-ridge-night,var(--lf-landscape-night-ridge));}
.lf-theme-toggle:focus-visible,.lf-theme-switch:has(input:focus-visible) {outline:3px solid var(--lf-color-focus);outline-offset:4px;}
/* Containers own paint only. Text owners must not have an animated-colour ancestor. */
[data-lf-theme-changing] [data-lf-theme-surface],[data-lf-theme-changing] .lf-app,[data-lf-theme-changing] .lf-card {transition:background-color var(--lf-motion-theme) ease,border-color var(--lf-motion-theme) ease;}
[data-lf-theme-changing] [data-lf-theme-text],[data-lf-theme-changing] .lf-input {transition:background-color var(--lf-motion-theme) ease,color var(--lf-motion-theme) ease,border-color var(--lf-motion-theme) ease;}
[data-lf-theme-changing] .lf-theme-page {transition:background-color var(--lf-motion-theme) ease,border-color var(--lf-motion-theme) ease,--lf-appearance-page-top var(--lf-motion-theme) ease,--lf-appearance-page-base var(--lf-motion-theme) ease;}
.lf-theme-wave {position:fixed;inset:0;z-index:var(--lf-z-appearance-decoration);pointer-events:none;background:radial-gradient(ellipse at 90% 0,var(--lf-color-highlight),transparent 70%);animation:lf-theme-wave var(--lf-motion-theme-wave) ease-out both;}
@keyframes lf-theme-wave {0% {opacity:.5;clip-path:circle(0 at 90% 30px)}60% {opacity:.4}100% {opacity:0;clip-path:circle(160% at 90% 30px)}}
@media(max-width:600px) {.lf-appearance[data-show-system-reset="true"] {flex-direction:column;gap:0;}.lf-system-reset {width:92px;height:32px;text-align:center;}}
@media(prefers-reduced-motion:reduce) {.lf-theme-scene,.lf-theme-scene i {animation:none!important;transition:none!important;}.lf-theme-wave {display:none;}}
[data-lf-reduced-motion="true"] .lf-theme-scene,[data-lf-reduced-motion="true"] .lf-theme-scene i {animation:none!important;transition:none!important;}
[data-lf-reduced-motion="true"] .lf-theme-wave {display:none;}
@media(forced-colors:active) {.lf-theme-switch input {opacity:1;appearance:auto;}.lf-theme-scene {display:none;}.lf-theme-toggle::after {content:'Theme';color:ButtonText;}}

/* Explicit reduced motion also cancels a page fade already in progress. */
@media(prefers-reduced-motion:reduce) {.lf-theme-page {transition:none!important;}}
[data-lf-reduced-motion="true"] .lf-theme-page {transition:none!important;}

/* Cancel in-flight text/surface transitions as well as the scene for reduced motion. */
@media(prefers-reduced-motion:reduce) {[data-lf-theme-surface],[data-lf-theme-text],.lf-app,.lf-card,.lf-input {transition:none!important;}}
[data-lf-reduced-motion="true"] :is([data-lf-theme-surface],[data-lf-theme-text],.lf-app,.lf-card,.lf-input) {transition:none!important;}

/* George,18 October: restore the original Relay charcoal gradient, primary labels700.
   Load after frozen tokens/components. Opt in with data-lf-primary on the existing
   primary button/anchor, or use the shared lf-btn primary variant. No geometry reset. */
:root,[data-lf-theme="light"] {--lf-color-primary-top:#343931;--lf-color-primary-bottom:#242922;}
@media(prefers-color-scheme:dark) {:root:not([data-lf-theme]) {--lf-color-primary-top:#fbfaf6;--lf-color-primary-bottom:#e7e4dc;}}
[data-lf-theme="dark"] {--lf-color-primary-top:#fbfaf6;--lf-color-primary-bottom:#e7e4dc;}
@property --lf-appearance-primary-top {syntax:"<color>";inherits:false;initial-value:#343931;}
@property --lf-appearance-primary-bottom {syntax:"<color>";inherits:false;initial-value:#242922;}
:is(.lf-btn[data-variant="primary"],[data-lf-primary]) {--lf-appearance-primary-top:var(--lf-color-primary-top);--lf-appearance-primary-bottom:var(--lf-color-primary-bottom);background-color:var(--lf-color-primary-bottom);background-image:linear-gradient(180deg,var(--lf-appearance-primary-top),var(--lf-appearance-primary-bottom));color:var(--lf-color-primary-text);border-color:var(--lf-color-primary-edge);font-weight:700!important;box-shadow:var(--lf-shadow-primary);transition:box-shadow var(--lf-motion-hover) ease,transform var(--lf-motion-press) ease;}
:is(.lf-btn[data-variant="primary"],[data-lf-primary]):hover:not(:disabled):not([aria-disabled="true"]) {box-shadow:var(--lf-shadow-primary-hover);}
:is(.lf-btn[data-variant="primary"],[data-lf-primary]):active:not(:disabled):not([aria-disabled="true"]) {transform:translateY(var(--lf-control-press-distance));box-shadow:var(--lf-shadow-pressed);}
:is(.lf-btn[data-variant="primary"],[data-lf-primary]):is(:disabled,[aria-disabled="true"]):not([data-state="loading"]) {background:var(--lf-color-soft);color:var(--lf-color-muted);box-shadow:none;}
:is(.lf-btn[data-variant="primary"],[data-lf-primary])[data-state="loading"] {transform:none!important;}
[data-lf-theme-changing] :is(.lf-btn[data-variant="primary"],[data-lf-primary]) {transition:--lf-appearance-primary-top var(--lf-motion-theme) ease,--lf-appearance-primary-bottom var(--lf-motion-theme) ease,background-color var(--lf-motion-theme) ease,color var(--lf-motion-theme) ease,border-color var(--lf-motion-theme) ease,box-shadow var(--lf-motion-hover) ease,transform var(--lf-motion-press) ease;}
/* The inset crescent is the lit part George marked. The rest of the disc is grey.
   Relay only; keep the five-element scene,14px disc and original inset geometry. */
[data-lf-product="relay"] .lf-scene-moon {background:#3c423a;box-shadow:inset -4px -2px 0 var(--lf-product-light);}
@media(prefers-reduced-motion:reduce) {:is(.lf-btn[data-variant="primary"],[data-lf-primary]) {transition:none!important;}}
[data-lf-reduced-motion="true"] :is(.lf-btn[data-variant="primary"],[data-lf-primary]) {transition:none!important;}
