/* A small day/night companion. The button stays 44px high on narrow phones. */
.theme-toggle{display:inline-grid;place-items:center;position:relative;width:52px;min-width:52px;min-height:44px;padding:0;border:0;background:transparent;border-radius:100px;flex-shrink:0}
.theme-toggle:before{content:'';position:absolute;inset:5px 0;background:#e8e4ef;border:1px solid #d9d2e5;border-radius:100px}
.theme-toggle svg{width:43px;height:30px;position:relative;overflow:visible}
.theme-toggle .night-face{display:none}.theme-toggle .day-face{transform-origin:center;transition:transform .25s ease}
.theme-toggle:hover .day-face{transform:rotate(12deg)}
[data-theme=dark] .theme-toggle:before{background:#34384f;border-color:#59617c}
[data-theme=dark] .theme-toggle .night-face{display:block}
[data-theme=dark] .theme-toggle .day-face{display:none}
.site-header .header-actions{gap:17px}
.borrow-scenarios{flex-wrap:wrap;border-radius:16px}.borrow-scenarios button{flex-basis:45%}.borrow-scenarios button:last-child{flex-basis:100%}

:root[data-theme=dark]{--paper:#111b25;--white:#1a2731;--ink:#edf0e8;--muted:#afbdba;--green:#c8bef2;--green-dark:#dbd2ff;--mint:#263d3c;--mint-light:#203333;--lilac:#30334b;--purple:#d5c8f7;--line:#354749;--pink:#47343d;--surface:#1a2731;--field:#14242c;color-scheme:dark;background:var(--paper)}
[data-theme=dark] body{background:radial-gradient(ellipse 80% 500px at 90% 0,#34315459,transparent),radial-gradient(ellipse 80% 600px at 0 75%,#24463824,transparent),var(--paper)}
[data-theme=dark] ::selection{background:#5a4f75;color:#fff}
[data-theme=dark] :is(button,a,summary,input,select,[tabindex]):focus-visible{outline-color:#d3bcff}
[data-theme=dark] .button.primary{color:#202335;box-shadow:0 3px 20px #a895e610}
[data-theme=dark] .button.secondary{border-color:#64746e}
[data-theme=dark] :is(.button.light,.skip-link,.close-button,.order-card,.positions-empty,.position-card,.address-preview-form,.portfolio-state,.live-position,.wallet-controls .icon-button,.mini-price,.mini-date){background:var(--surface)}
[data-theme=dark] :is(.step-card,.outcome-example){background:var(--surface);border-color:var(--line)}
[data-theme=dark] :is(.field input,.field select,.address-entry input){background:var(--field);color:var(--ink)}
[data-theme=dark] input::placeholder{color:#a3b3b3;opacity:1}
[data-theme=dark] .segmented button[aria-pressed=true]{background:#425053;color:#f0effb;box-shadow:0 2px 5px #0002}
[data-theme=dark] .outcome-example .segmented{background:#242b3c}
[data-theme=dark] .strategy-choice input:checked+span{background:#35374e;border-color:#b5a6d8}
[data-theme=dark] .strategy-choice input:checked+span strong,[data-theme=dark] .strategy-choice:has(input:checked) strong span{color:#e4d7ff}
[data-theme=dark] .quick-options button[aria-pressed=true]{border-color:#9cae9d}
[data-theme=dark] .preview-banner{background:#202b32;border-color:var(--line);color:#c3c9c2}
[data-theme=dark] .summary-panel{background:linear-gradient(155deg,#243d39,#202e39);border-color:#405750}
[data-theme=dark] :is(.summary-note,.strategy-description,.review-consequence p,.summary-illustration .mascot-aside){color:#bacbb9}
[data-theme=dark] :is(.summary-lines,.summary-note,.direction-demo>div,.outcome-result){border-color:var(--line)}
[data-theme=dark] :is(.outcome-copy p,.outcome-result,.move-label,.borrow-card>p,.borrow-heading p,.borrow-card .text-button){color:#c6bed6}
[data-theme=dark] .borrow-card{background:#272c40;border-color:#46465e}
[data-theme=dark] .borrow-icon{background:#3e3d58;color:#d4c6f5}
[data-theme=dark] .count{background:#39354e;color:#e3d8fb}
[data-theme=dark] .step-number{color:#b8c4b5}
[data-theme=dark] .step-card:nth-child(2) .step-visual{background:#303347}
[data-theme=dark] .step-card:nth-child(3) .step-visual{background:#353a32}
[data-theme=dark] .token-icon{background:#3d3b54;color:#e2d1ff}
[data-theme=dark] .token-icon.usdc{background:#264458;color:#bad9fb}
[data-theme=dark] .wallet-chain-banner{background:#3b352a;border-color:#746349;color:#f2dfb6}
[data-theme=dark] :is(.field .error,.field-error,.wallet-error){color:#ffb5bf}
[data-theme=dark] .field input[aria-invalid=true]{background:#342733;border-color:#e49ca7}
[data-theme=dark] :is(.health-alert,.borrow-verdict.blocked){background:#442e37;color:#ffc3c4}
[data-theme=dark] dialog{box-shadow:0 30px 100px #0007}
[data-theme=dark] dialog::backdrop{background:#050b15b8}
[data-theme=dark] .toast{background:#dae5d7;color:#172b25}

/* Moonlight belongs around the content; figures stay on quiet, opaque panels. */
.pasture-moon{display:none}
[data-theme=dark] .pasture-moon{display:block;position:absolute;left:13%;top:14%;font:65px/1 Georgia,serif;color:#e7dcff;transform:rotate(-15deg);text-shadow:0 0 30px #c1abe67a}
[data-theme=dark] .hero-art{background:radial-gradient(ellipse at 70% 18%,#7d6faf35,transparent 55%),linear-gradient(165deg,#293344,#192f32 75%);box-shadow:inset 0 0 70px #bdabe90a}
[data-theme=dark] .hero-art:before{border-color:#bbc4cf26;background:radial-gradient(circle at 24% 18%,#e5d8ff 0 1px,transparent 2px),radial-gradient(circle at 82% 36%,#e1eac9 0 1px,transparent 2px),radial-gradient(circle at 15% 58%,#d6d3f5 0 1px,transparent 2px)}
[data-theme=dark] .hero-art:after{content:'';position:absolute;inset:auto 0 0;height:30%;background:url('img/meadow.svg') center bottom/cover no-repeat;border-radius:0 0 30px 30px;z-index:-1;opacity:.9}
[data-theme=dark] .hero-art .hero-mascot{filter:drop-shadow(0 0 25px #c4b3f12b)}
[data-theme=dark] .hero-art .hero-mascot[data-night-src]{width:88%;height:88%;border-radius:inherit;object-fit:contain;transform:translateY(8px);filter:none;mask-image:radial-gradient(ellipse at 50% 50%,#000 55%,transparent 78%)}
[data-theme=dark] img[data-night-src*="guide-night"]{mask-image:radial-gradient(ellipse at center,#000 52%,transparent 73%)}
[data-theme=dark] .brand img{border-radius:29%}
[data-theme=dark] .hero h1 .serif{color:#c2d1b6}
[data-theme=dark] .art-tag{color:#ccd4ca}
[data-theme=dark] .hero-ticket{background:#202e39f5;border-color:#596465;box-shadow:0 12px 40px #0003}
[data-theme=dark] .sparkle{color:#c9dba7}
[data-theme=dark] .sparkle.two{color:#cab3ef}
[data-theme=dark] .orbit-label{background:#dcd3f2;color:#292d40;border-color:var(--paper);box-shadow:0 0 36px #cdc0ef26}
[data-theme=dark] .summary-illustration img,[data-theme=dark] .portfolio-state img{filter:drop-shadow(0 0 17px #b5a6da22)}
[data-theme=dark] .footer{position:relative;margin-top:45px}
[data-theme=dark] .footer:before{content:'';position:absolute;bottom:100%;left:0;right:0;height:75px;background:url('img/meadow.svg') center bottom/100% 100% no-repeat;opacity:.35;pointer-events:none}
[data-theme=dark] .journal figure>a{background:var(--surface)}
[data-theme=dark] .journal .asset-grid figure>a{background:var(--mint)}
[data-theme=dark] .journal .asset-grid figure:nth-child(2)>a{background:var(--lilac)}
[data-theme=dark] .decision.superseded{background:#3a352d;color:#e2cdb6}
[data-theme=dark] .status-badge{color:var(--purple)}
[data-theme=dark] onboard-v2{--onboard-modal-background:#1a2731;--onboard-modal-color:#edf0e8;--onboard-connect-header-background:#1a2731;--onboard-connect-header-color:#edf0e8;--onboard-main-scroll-container-background:#1a2731;--onboard-connect-text-color:#c9d4cd;--onboard-connect-accent-text-color:#d5c8f7;--onboard-close-button-color:#d5c8f7;--onboard-wallet-button-background:#24363d;--onboard-wallet-button-background-hover:#364751;--onboard-wallet-button-color:#edf0e8;--onboard-wallet-button-color-hover:#fff;--onboard-wallet-button-border-color:#53656a;--onboard-link-color:#d5c8f7;--onboard-modal-backdrop:#050b15b8;--onboard-white:#1a2731;--onboard-gray-100:#24363d;--onboard-gray-300:#53656a;--onboard-gray-500:#afbdba;--onboard-gray-700:#d1dad4;--onboard-gray-900:#edf0e8}

@media(max-width:760px){.site-header .header-actions{gap:9px}.theme-toggle{width:44px;min-width:44px}.theme-toggle svg{width:37px}.app-page .site-header{column-gap:8px}.app-page #guide-button .guide-mark{display:none}.app-page #guide-button{font-size:11px}.app-page .brand{gap:6px}.app-page .brand img{width:30px;height:30px}.journal-header .header-actions{gap:10px}}
@media(max-width:370px){.app-page .header-actions{gap:6px}.app-page #guide-button{font-size:10px}.app-page .brand{font-size:22px}.app-page .brand img{width:25px;height:25px}.app-page .wallet-controls .button{padding-inline:10px}.app-page .wallet-controls{gap:2px}.app-page .wallet-controls .icon-button{width:30px}}
@media(prefers-reduced-motion:reduce){.theme-toggle .day-face{transition:none}}
