:root{color-scheme:light;--paper:#ffffff;--ink:#1d1d1f;--blue:#007aff;--pale:#f5f5f7;--ease:cubic-bezier(.19,1,.32,1);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{min-height:320px}button,a,input{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}button{color:inherit;border:0;background:none;cursor:pointer}a{color:inherit;text-decoration:none}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:2px solid #829eb2;outline-offset:6px}input:focus-visible{outline:none}[hidden]{display:none!important}
.site-header{position:fixed;left:0;right:0;top:0;height:74px;z-index:60;padding:22px 32px;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.brand{display:block;width:96px;height:32px;pointer-events:auto;transform-origin:0 0;position:relative;z-index:60}.brand svg{display:block;width:100%;height:100%;overflow:visible}.brand .glyph-outline{fill:var(--ink);opacity:1}.header-actions{display:flex;gap:26px;align-items:center;pointer-events:auto;color:#86868b;font-size:13px;letter-spacing:.04em}.header-actions>*{padding:8px 0;transition:color .2s}.header-actions>*:hover{color:#1d1d1f}.header-actions button{font-size:inherit}
.view{position:fixed;inset:74px 0 0}.home-view{padding:0 18px 18px}.portal-shell{position:relative;height:100%;display:grid;grid-template-columns:1fr 1fr;overflow:hidden;border-radius:28px;isolation:isolate;background:#ffffff}.portal-shell:after{content:"";position:absolute;pointer-events:none;inset:0;z-index:4;border-radius:inherit;box-shadow:inset 0 0 42px 18px #ffffffa8}.portal-shell:before{content:"";position:absolute;z-index:2;pointer-events:none;left:calc(50% - 28px);top:0;bottom:0;width:56px;background:linear-gradient(90deg,#f0f7ff,#ffffff);filter:blur(12px)}
.portal{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;outline-offset:-10px!important;text-align:center;min-width:0}.portal.math{background:linear-gradient(112deg,#eaf4ff,#f0f7ff 65%,#f8fbff);transition:transform .7s var(--ease)}.portal.math:hover{transform:scale(1.017)}.portal.math:active{transform:scale(.995)}.portal.physics{background:linear-gradient(90deg,#f8fbff,#ffffff 60%,#ffffff)}.portal h1,.portal h2{font-size:clamp(28px,4.5vw,68px);letter-spacing:.09em;line-height:1.2;font-weight:500;margin:0;z-index:3;position:absolute;bottom:18%;color:#1d1d1f}.portal.physics h2{color:#86868b;font-weight:400}.portal-art{width:82%;max-width:660px;height:66%;position:absolute;top:6%;overflow:visible;pointer-events:none}.portal-art .grid{stroke:#acbfcd;stroke-opacity:.22;stroke-width:1}.portal-art .axis{stroke:#8fa6b8;stroke-opacity:.32;stroke-width:1.2}.portal-art .curve{stroke:#007aff;stroke-width:2.8;fill:none;stroke-linecap:round}.portal-art .point{fill:#007aff}.physics-art{position:absolute;top:10%;width:70%;height:52%;display:grid;place-items:center;pointer-events:none}.orbit{width:75%;height:37%;border:1px solid #dce3e8;border-radius:50%;transform:rotate(-26deg);position:absolute}.orbit.second{transform:rotate(26deg);border-color:#e0e6e9}.orb{width:clamp(58px,10vw,154px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 32% 27%,#fff 0,#fdfefe 28%,#edf1f4 62%,#b7c7d2 100%);box-shadow:15px 22px 46px #66839912,inset -8px -7px 20px #7f9bae12}.orb-shadow{position:absolute;top:75%;width:32%;height:7%;border-radius:50%;background:radial-gradient(ellipse,#9dafbd25,transparent 72%)}
.math-view{inset:0;background:#ffffff;display:block;overflow:hidden}.graph-area{position:absolute;inset:0;overflow:hidden}#graph{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}.graph-actions{position:absolute;top:12px;left:22px;display:flex;gap:10px;align-items:center}.round-action{height:42px;width:42px;border-radius:50%;font-size:23px;background:#ffffffea;color:#515154;transition:transform .4s var(--ease)}.round-action:active{transform:scale(.9)}.tool-toggle{height:36px;background:#f5f5f7e8;border-radius:18px;padding:0 16px;font-size:12px;color:#515154}.toolbox{position:absolute;top:66px;left:72px;z-index:26;padding:15px;width:242px;border:1px solid #e5ecef;border-radius:20px;background:#ffffff;box-shadow:0 14px 46px #6e879a18;animation:drawer .5s var(--ease)}.tool-options{display:flex;flex-wrap:wrap;gap:8px}.toolbox button{font-size:12px;border-radius:12px;background:#f5f5f7;padding:10px 13px}.toolbox button[aria-pressed=true]{background:#e4efff;color:#007aff}#decimal-toggle{margin-top:12px}#graph-scale{position:absolute;right:25px;bottom:16px;color:#99aab5;font:11px ui-monospace,monospace;pointer-events:none}
.math-dock{position:absolute;z-index:20;overflow:visible;border-radius:23px;background:#fff;border:1px solid #e5e5ea;box-shadow:0 8px 28px #00000008;display:flex;flex-direction:column;min-width:0}.formula-bar{height:20px;flex-shrink:0;display:flex;align-items:center;padding:0 22px}.float-handle{position:relative;flex:1;height:100%;min-width:40px;touch-action:none;cursor:grab}.float-handle:before{content:"";display:block;width:32px;height:3px;border-radius:3px;background:#c7c7cc;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.float-handle[data-dragging]{cursor:grabbing}.formula-content{min-height:0;flex:1;overflow:auto;scrollbar-width:none;padding:0 12px 8px;display:flex;flex-direction:column;gap:4px}.function-history{display:flex;flex-direction:column;min-width:0;flex-shrink:0}.formula-row{display:flex;align-items:center;gap:10px;min-width:0;border-bottom:1px solid #f1f1f3;border-radius:0;color:#1d1d1f}.formula-row[data-active=true]{background:#eef5ff;border-radius:12px}.curve-dot{width:10px;height:10px;border:1px solid var(--curve);background:var(--curve);border-radius:50%;flex-shrink:0;margin-left:10px}.formula-row[data-blank=true]:not([data-active=true]) .curve-dot{background:transparent}.formula-field{min-width:0;flex:1;overflow-x:auto;scrollbar-width:none;cursor:text}.formula-inner{position:relative;display:flex;align-items:center;padding:6px 8px;min-height:36px}.structured-formula{flex-shrink:0;overflow:visible;fill:currentColor;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-weight:400}.structured-formula path{stroke:currentColor}.formula-slot{fill:none;stroke:#93a8b7;stroke-width:1;stroke-dasharray:2 2}.formula-selection{fill:#cbddeacc}.inline-editor{position:absolute;inset:0}.inline-editor input{position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:transparent;font:18px system-ui,sans-serif;outline:none;padding:0;min-width:0}.formula-row[data-invalid]{box-shadow:inset 0 -1px #ae938b}.resize-corner{position:absolute;width:24px;height:24px;padding:0;touch-action:none;z-index:2}.resize-corner svg{width:24px;height:24px;display:block;fill:none;stroke:#c7c7cc;stroke-width:2;stroke-linecap:round}.resize-corner[data-corner=nw]{left:-1px;top:-1px;cursor:nwse-resize}.resize-corner[data-corner=ne]{right:-1px;top:-1px;cursor:nesw-resize;transform:rotate(90deg)}.resize-corner[data-corner=sw]{left:-1px;bottom:-1px;cursor:nesw-resize;transform:rotate(-90deg)}.resize-corner[data-corner=se]{right:-1px;bottom:-1px;cursor:nwse-resize;transform:rotate(180deg)}.keyboard-float{position:absolute;z-index:22;isolation:isolate}.keyboard-surface{width:374px;height:278px;transform-origin:0 0;background:#fff;border:1px solid #e5e5ea;border-radius:19px;box-shadow:0 8px 28px #0000000c;overflow:hidden}.keyboard-grab{height:24px;display:flex}.keyboard-grab .float-handle:before{width:36px}
.parameter-list{display:flex;flex-wrap:wrap;gap:12px 28px}.parameter-list:empty{display:none}.parameter-list label{display:flex;align-items:center;gap:12px;font-size:12px;color:#6e6e73;min-width:210px;flex:1;padding:8px 0}.parameter-list input{accent-color:#007aff;flex:1;width:90px;height:15px}.parameter-list output{font:11px ui-monospace,monospace;min-width:40px;text-align:right}

dialog{border:1px solid #e7ecef;border-radius:26px;background:#fbfcfb;padding:42px 48px;box-shadow:0 20px 90px #60778916;color:#798a97;max-width:calc(100vw - 40px)}dialog[open]{animation:drawer .5s var(--ease)}dialog::backdrop{background:#6c849230;backdrop-filter:blur(5px)}dialog>a{font-size:15px;letter-spacing:.025em}dialog>.close-dialog{position:absolute;top:9px;right:12px;color:#a5afb6;font-size:22px;padding:3px 8px}.visually-hidden{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
@keyframes arrive{0%{opacity:0;transform:translateY(38px) scale(.96)}64%{opacity:1;transform:translateY(-3px) scale(1.003)}100%{opacity:1;transform:none}}@keyframes appear{from{opacity:0}to{opacity:1}}@keyframes drawer{0%{opacity:0;transform:translateY(12px) scale(.96)}65%{opacity:1;transform:translateY(-2px) scale(1.008)}100%{opacity:1;transform:none}}
@media(max-width:680px){.site-header{height:64px;padding:18px 20px}.brand{width:84px;height:28px}.header-actions{gap:19px;font-size:12px}.view{inset:64px 0 0}.home-view{padding:0 9px 10px}.portal-shell{border-radius:21px}.portal h1,.portal h2{font-size:clamp(24px,6vw,40px);writing-mode:vertical-rl;letter-spacing:.16em;bottom:16%;line-height:1.2}.portal-art{width:94%;top:13%;height:46%}.physics-art{width:92%;height:42%;top:16%}.orbit{width:90%;height:26%}.orb{width:clamp(52px,19vw,108px)}.graph-actions{left:12px;top:7px;gap:4px}.round-action{width:38px;height:38px}.toolbox{left:48px;top:56px}.parameter-list label{min-width:150px}.pen-coordinate{font-size:9px;padding:4px 6px}.intro-grid{inset:24% 10%}dialog{padding:38px 25px}}
@media(max-height:620px) and (min-width:681px){.site-header{height:60px;padding-top:16px;padding-bottom:16px}.view{inset:60px 0 0}.portal h1,.portal h2{bottom:14%;font-size:42px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-delay:0ms!important;transition-duration:.01ms!important}.portal.math:hover{transform:none}}

@font-face{font-family:"Jieximian Sans";src:url('/ui-sans.c3d43dadd08b.woff2') format('woff2');font-weight:400 500;font-display:swap}
#graph{background:#ffffff}
.math-keyboard{padding:0 8px 8px;margin:0;border:0;}
.keyboard-row{display:grid;grid-template-columns:repeat(var(--columns,10),minmax(0,1fr));gap:4px}.keyboard-numbers{margin-bottom:6px}
.keyboard-panel{height:144px;display:flex;flex-direction:column;gap:6px;margin-bottom:6px}.keyboard-panel[data-page=symbols]{gap:4px}
.keyboard-row.centered{width:calc(90% - .4px);align-self:center;--columns:9!important}
.key{min-width:0;height:44px;display:flex;align-items:center;justify-content:center;gap:0;background:#ffffff;border-radius:8px;color:#1d1d1f;font:18px -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;box-shadow:0 .5px 1px #0000000c;user-select:none;-webkit-user-select:none;transition:background .12s,transform .12s}
.key:active{background:#e5e5ea;transform:scale(.96)}.key.auxiliary{background:#f5f5f7;color:#6e6e73}.key[aria-pressed=true]{background:#e4efff;color:#007aff}.key sup,.key sub{font-size:11px;line-height:1;position:relative;top:-5px}.key sub{top:5px}.key-fraction{display:flex;flex-direction:column;font-size:13px;line-height:16px;padding:0 3px}.key-fraction span:first-child{border-bottom:1px solid currentColor}
.keyboard-panel[data-page=symbols] .key{height:33px;font-size:15px}.keyboard-panel[data-page=expressions] .key{font-size:17px}.keyboard-panel[data-page=expressions] [data-key=more],.keyboard-panel[data-page=expressions] [data-key=back]{font-size:13px}
.keyboard-actions{display:grid;grid-template-columns:1.5fr 1fr 3fr 1fr 2fr 1.5fr;gap:4px}.keyboard-actions .key{font-size:13px}.keyboard-actions [data-key=left],.keyboard-actions [data-key=right],.keyboard-actions [data-key=delete]{font-size:22px}
@media(max-width:680px){body[data-stage=ready][data-route=math] .site-header{display:none}body[data-stage=ready][data-route=math] .math-view{inset:0}.graph-actions{top:max(7px,env(safe-area-inset-top))}.key{font-size:17px}}


@media(pointer:coarse){body[data-stage=ready][data-route=math] .site-header{display:none}body[data-stage=ready][data-route=math] .math-view{inset:0}}

.formula-caret{position:absolute;width:1.5px;background:#007aff;pointer-events:none}
body[data-stage=ready][data-route]:not([data-route=home]) .site-header{display:none}
.math-view{inset:0}
.formula-content .parameter-list{gap:4px}.formula-content .parameter-list label{min-width:0;width:100%;flex:1 1 100%;gap:8px}.formula-content .parameter-list input{min-width:30px;width:0}

/* Overlay scrolling and edge docking never resize the graph. */
.formula-content::-webkit-scrollbar,.formula-field::-webkit-scrollbar{display:none;width:0;height:0}.formula-scrollbar{position:absolute;right:2px;top:22px;bottom:14px;width:10px;touch-action:none;z-index:3;cursor:default}.formula-scroll-thumb{position:absolute;top:0;left:4px;width:3px;border-radius:3px;background:#b0b0b5;opacity:.7;pointer-events:none}.formula-scrollbar:hover .formula-scroll-thumb,.formula-scrollbar[data-dragging] .formula-scroll-thumb{opacity:1}.formula-card{transition:transform .28s var(--ease),opacity .22s ease;transform:translateX(0);opacity:1}.formula-card[data-docked=true]{transform:translateX(calc(-100% - var(--dock-x)));opacity:0;pointer-events:none}.formula-edge{position:absolute;left:0;width:20px;height:68px;padding:0;z-index:20;touch-action:manipulation;animation:appear .24s ease both}.formula-edge:before{content:"";position:absolute;left:1px;top:4px;width:4px;height:60px;border-radius:4px;background:#b0b0b5}.formula-edge:hover:before{background:#86868b}

.graph-labels{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:hidden;font:13px -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-variant-numeric:tabular-nums;text-rendering:optimizeLegibility}.graph-labels .label-backdrop{fill:#ffffff;fill-opacity:.96}.graph-labels text{fill:#6e6e73}.graph-labels .point-label text{fill:#1d1d1f}.graph-actions{z-index:2}.formula-remove{width:24px;height:32px;padding:4px;flex-shrink:0;margin-right:3px;color:#8e8e93;touch-action:manipulation}.formula-remove svg{width:16px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.formula-remove:hover,.formula-remove:focus-visible{color:#ff3b30}.formula-field{overscroll-behavior:contain}.formula-content{overscroll-behavior:contain}

.formula-actions{display:flex;align-items:center;gap:2px;flex-shrink:0}.formula-actions .formula-remove{margin-right:3px}.formula-settings{width:24px;height:32px;padding:4px;color:#8e8e93;flex-shrink:0}.formula-settings svg{width:16px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}.formula-settings:hover,.formula-settings[aria-expanded=true]{color:#007aff}.derivative-order{min-width:28px;height:32px;padding:0 3px;font-size:12px;color:#007aff;flex-shrink:0}.derivative-order:disabled{color:#8e8e93;font-size:11px}.function-menu{z-index:26;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;max-width:calc(100% - 16px)}.order-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.order-options button{padding:9px 3px;font-size:12px;white-space:nowrap}.order-options button:disabled{color:#8e8e93;background:#f5f5f7;font-size:10px}

.derivative-expressions{margin-left:40px;color:var(--curve);min-width:0}.derivative-expression{padding:3px 4px;min-width:0;overflow:hidden}.derivative-expression .structured-formula{display:block;max-width:100%}.monotonicity-layer{position:absolute;inset:0;pointer-events:none;z-index:3}.monotonicity-table{position:absolute;width:210px;max-width:calc(100% - 24px);max-height:220px;overflow:auto;scrollbar-width:thin;border:1px solid #e5e5ea;border-radius:12px;background:#ffffffed;padding:8px 10px;pointer-events:auto;font:12px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 3px 14px #00000005}.monotonicity-heading{overflow:hidden;padding-bottom:5px}.monotonicity-heading .structured-formula{display:block;max-width:100%}.monotonicity-table table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.monotonicity-table th{font-weight:500}.monotonicity-table td,.monotonicity-table th{padding:4px 2px;text-align:center;border-top:1px solid #e5e5ea}.monotonicity-table td:first-child{white-space:nowrap;font-size:11px}.monotonicity-table td:last-child{font-size:17px;line-height:16px}.monotonicity-table[hidden]{display:none}

.monotonicity-table::-webkit-scrollbar{width:3px;height:3px}.monotonicity-table::-webkit-scrollbar-thumb{background:#c7c7cc;border-radius:3px}.monotonicity-table::-webkit-scrollbar-button{display:none;width:0;height:0}

@media(max-width:600px){.monotonicity-table{width:160px;padding:7px 8px}.monotonicity-table td:first-child{font-size:10px}}

.monotonicity-layer{z-index:21}.monotonicity-table{overflow:visible;display:flex;flex-direction:column;max-height:240px}.monotonicity-table[data-manual=true]{max-height:none}.monotonicity-bar{height:16px;flex-shrink:0;display:flex;margin:-5px 10px 2px}.monotonicity-bar .float-handle:before{width:26px;height:2px}.monotonicity-content{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.monotonicity-content::-webkit-scrollbar{width:3px;height:3px}.monotonicity-content::-webkit-scrollbar-thumb{background:#c7c7cc;border-radius:3px}.monotonicity-content::-webkit-scrollbar-button{display:none;width:0;height:0}.monotonicity-corner,.monotonicity-corner svg{width:16px;height:16px}.monotonicity-corner svg{stroke-width:1.5}.monotonicity-scope{font-size:11px;padding:5px 0 0}

.derivative-order{color:#636366}.derivative-expressions{color:#1d1d1f}.derivative-expression{display:flex;align-items:center;gap:4px}.derivative-expression .structured-formula{min-width:0;flex:1;color:#1d1d1f;max-width:calc(100% - 28px)}.derivative-settings:hover,.derivative-settings[aria-expanded=true]{color:#52525b}.monotonicity-table{width:240px;padding:8px 12px;border-radius:16px;border-color:#e5e7eb;background:#fff;color:#1d1d1f;box-shadow:0 6px 22px #1118270a;transition:opacity 160ms ease,transform 240ms cubic-bezier(.2,.8,.2,1)}.monotonicity-table[data-docked=true]{transform:translateX(calc(100% + 24px));opacity:0;pointer-events:none}.monotonicity-heading{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding-bottom:6px}.monotonicity-heading .structured-formula{min-width:0;max-width:calc(100% - 15px)}.monotonicity-dot{width:6px;height:6px;border-radius:50%;background:var(--curve);flex-shrink:0}.monotonicity-table th{color:#8e8e93;font-size:10px;line-height:12px;padding:2px}.monotonicity-table td{color:#1d1d1f;padding:4px 2px;border-color:#f0f1f3;line-height:18px}.monotonicity-sign{display:inline-block;min-width:22px;height:18px;line-height:18px;border-radius:6px;background:#f4f5f7;color:#636366;font-size:11px}.monotonicity-trend{color:var(--curve);font-size:18px}.monotonicity-scope{width:100%;color:#8e8e93}.monotonicity-rails{position:absolute;right:0;top:60px;bottom:12px;width:18px;z-index:24;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;overflow:auto;scrollbar-width:none;pointer-events:none}.monotonicity-rails[hidden]{display:none}.monotonicity-rails::-webkit-scrollbar{display:none}.monotonicity-rail{width:18px;height:60px;flex-shrink:0;position:relative;pointer-events:auto;touch-action:manipulation}.monotonicity-rail:before{content:"";position:absolute;right:3px;top:10px;width:4px;height:40px;border-radius:3px;background:#aeb1b8}.monotonicity-rail:hover:before{background:#8e8e93}@media(max-width:600px){.monotonicity-table{width:200px;padding:7px 10px}}@media(prefers-reduced-motion:reduce){.monotonicity-table{transition:none}}

.monotonicity-rails{justify-content:safe center}


/* Lens design-system adaptation. MIT (c) 2026 DayDreamInAReverie.
   Source tree 7a424c93b9be13cf835b91ea67495fec2ec0584e; see DESIGN-SYSTEMS-LICENSE.txt.
   Material/tokens only: application semantics, geometry, renderers and gestures stay local. */
:root{--lg-color-text:#22252b;--lg-color-muted:#6b7079;--lg-color-accent:#2875ed;--lg-color-focus:#2576e8;--lg-color-page:#f7f8fa;--lg-ease-spring:cubic-bezier(.2,.9,.25,1.22);--lg-duration-fast:160ms;--lg-duration-normal:240ms;--lg-duration-feedback:520ms;--lg-surface-solid:#eef2f8;--lg-surface-shadow:inset 0 1px 0 #fff9,inset 1px 0 0 #fff3,0 12px 24px -12px #2135524d;--ui-glass:linear-gradient(132deg,#fffffff5,#f2f7fce8 52%,#edf2f8ef);--ui-glass-edge:#d6e0ecb0;--ui-glass-shadow:inset 0 1px 0 #ffffffed,inset 1px 0 0 #ffffff75,0 12px 24px -12px #21355230;--ui-well:#e7edf4b3;--paper:#f7f8fa;--ink:var(--lg-color-text);--blue:var(--lg-color-accent);--pale:var(--lg-color-page);color:var(--lg-color-text);background:var(--lg-color-page)}
button:focus-visible,a:focus-visible{outline:2px solid var(--lg-color-focus)}
.site-header{background:transparent}.header-actions{color:var(--lg-color-muted)}.header-actions>*{padding:8px 12px;border-radius:999px;background:linear-gradient(130deg,#ffffffc9,#edf3f85c);box-shadow:inset 0 1px 0 #fff,0 4px 12px -8px #21355235;transition:color var(--lg-duration-fast),background var(--lg-duration-normal),transform var(--lg-duration-normal) var(--lg-ease-spring)}.header-actions>*:hover{color:var(--lg-color-text);background:#ffffffec}.header-actions>*:active{transform:scale(.97)}
.portal-shell{background:#f7f8fa;box-shadow:inset 0 1px 0 #ffffffc9,0 12px 38px -28px #21355220}.portal-shell:before{background:linear-gradient(90deg,#eaf1fa,#f6f7fa);opacity:.8}.portal-shell:after{box-shadow:inset 0 1px 0 #ffffffed,inset 1px 0 0 #ffffff70,inset 0 0 42px 18px #f7f8fa70}.portal.math{background:radial-gradient(ellipse at 12% 15%,#d9eff3,transparent 72%),linear-gradient(124deg,#e4eefb,#edf2fa 70%,#f5f7fa)}.portal.physics{background:radial-gradient(ellipse at 100% 100%,#f0e5e630,transparent 70%),linear-gradient(110deg,#f1f5fa,#fafbfc 70%)}.portal h1,.portal h2{color:var(--lg-color-text)}.portal.physics h2{color:#69737f}.portal-art .curve{stroke:#2875ed}.portal.math{transition:transform var(--lg-duration-feedback) var(--lg-ease-spring)}
/* Glass is confined to controls, not the full moving graph or page. */
.round-action,.tool-toggle,.math-dock,.keyboard-surface,.toolbox,.monotonicity-table,dialog{background:var(--ui-glass);border-color:var(--ui-glass-edge);box-shadow:var(--ui-glass-shadow);color:var(--lg-color-text)}
.round-action,.tool-toggle{transition:background var(--lg-duration-fast),transform var(--lg-duration-normal) var(--lg-ease-spring)}.round-action:active,.tool-toggle:active{transform:scale(.95)}
.formula-row{border-bottom-color:#dce5ee85;color:var(--lg-color-text)}.formula-row[data-active=true]{background:linear-gradient(120deg,#ddebfcaf,#edf5ffbb);box-shadow:inset 0 1px 0 #ffffffb8}.float-handle:before{background:#aebbc9}.resize-corner svg{stroke:#afbdcd}.formula-scroll-thumb{background:#9eaebf}.formula-edge:before,.monotonicity-rail:before{background:#a6b3c2}.formula-remove,.formula-settings{color:#7d8896}.formula-settings:hover,.formula-settings[aria-expanded=true]{color:var(--lg-color-accent)}
.toolbox button,.order-options button{background:var(--ui-well);color:var(--lg-color-muted);box-shadow:inset 0 1px 0 #ffffffa3;transition:background var(--lg-duration-normal),color var(--lg-duration-fast),transform var(--lg-duration-normal) var(--lg-ease-spring)}.toolbox button[aria-pressed=true]{background:linear-gradient(140deg,#d5e7ff,#e8f1ff);color:#205bb4;box-shadow:inset 0 1px 0 #fffffff0,0 3px 10px -7px #2875ed70}.toolbox button:active{transform:scale(.97)}.order-options button:disabled{background:#eaf0f5;color:#8993a0}
.key{background:linear-gradient(145deg,#ffffffed,#f4f8fce3);box-shadow:inset 0 1px 0 #fff,0 2px 4px -3px #2135524d;color:var(--lg-color-text);transition:background var(--lg-duration-fast),transform var(--lg-duration-normal) var(--lg-ease-spring)}.key.auxiliary{background:#e9eff6bf;color:#6b7079}.key[aria-pressed=true]{background:linear-gradient(135deg,#dceaff,#eaf2ff);color:#205bb4}.key:active{background:#dce7f5;transform:scale(.96)}.formula-caret{background:var(--lg-color-accent)}.parameter-list input{accent-color:var(--lg-color-accent)}
.monotonicity-table{color:var(--lg-color-text)}.monotonicity-table th,.monotonicity-scope{color:#77818e}.monotonicity-table td{border-color:#dce5eea0}.monotonicity-sign{background:#e5edf5;color:#586575}.derivative-order,.derivative-settings:hover,.derivative-settings[aria-expanded=true]{color:#636b76}.derivative-expressions,.derivative-expression .structured-formula{color:var(--lg-color-text)}
dialog{color:#657183}dialog::backdrop{background:#15263b27;backdrop-filter:blur(5px)}dialog>.close-dialog{color:#798797}
@supports(backdrop-filter:blur(1px)){.math-dock,.keyboard-surface,.toolbox,.monotonicity-table,dialog{backdrop-filter:blur(10px) saturate(1.08)}}
@media(prefers-reduced-transparency:reduce){.math-dock,.keyboard-surface,.toolbox,.monotonicity-table,dialog{background:#f6f9fc;backdrop-filter:none}}
@media(prefers-reduced-motion:reduce){.header-actions>*,.portal.math,.round-action,.tool-toggle,.toolbox button,.key{transition:none}}
@media(forced-colors:active){.round-action,.tool-toggle,.math-dock,.keyboard-surface,.toolbox,.monotonicity-table,dialog,.key{background:Canvas;border-color:CanvasText;box-shadow:none;backdrop-filter:none}.toolbox button[aria-pressed=true],.key[aria-pressed=true]{outline:1px solid Highlight}}

/* Shared floating interactions: no pressed transform may rotate a corner back. */
.resize-corner,.resize-corner:active,.physics-view .resize-corner,.physics-view .resize-corner:active{transform:none!important;rotate:none;transition:none!important;touch-action:none!important;user-select:none;-webkit-user-select:none}
.resize-corner svg{position:absolute;left:0;top:0;transform:none;rotate:none}.resize-corner[data-corner=ne] svg{left:auto;right:0;rotate:90deg}.resize-corner[data-corner=sw] svg{top:auto;bottom:0;rotate:-90deg}.resize-corner[data-corner=se] svg{left:auto;right:0;top:auto;bottom:0;rotate:180deg}.monotonicity-corner{width:28px;height:28px}.monotonicity-corner svg{width:16px;height:16px}
.float-handle,.physics-view .float-handle,.physics-view .float-handle:active{touch-action:none!important;transform:none!important;transition:none!important;user-select:none;-webkit-user-select:none}.floating-panel[data-manipulating],.formula-card[data-manipulating],.keyboard-float[data-manipulating]{transition:none!important;animation:none!important;transform:none!important}
.formula-card[data-docked=true],.keyboard-float[data-docked=true],.monotonicity-table[data-docked=true],.floating-panel[data-docked=true]{transform:translateX(var(--dock-shift));opacity:0;pointer-events:none}.keyboard-float{transition:transform .24s var(--ease),opacity .2s ease}.floating-panel{transition:transform .24s var(--ease),opacity .2s ease}
.formula-edge[data-side=right]:before{left:auto;right:1px}.monotonicity-rails{left:0;right:0;width:auto;display:block;overflow:visible;pointer-events:none}.floating-rail-side{position:absolute;top:0;bottom:0;width:20px;display:flex;flex-direction:column;align-items:center;justify-content:safe center;gap:8px;overflow:auto;scrollbar-width:none;pointer-events:none}.floating-rail-side[data-side=left]{left:0}.floating-rail-side[data-side=right]{right:0}.floating-rail-side::-webkit-scrollbar{display:none}.monotonicity-rail[data-side=left]:before{right:auto;left:3px}.panel-rail{pointer-events:auto}
.floating-menu{display:flex;flex-direction:column;min-height:96px;max-height:calc(100% - 16px);overflow:visible}.floating-menu .monotonicity-bar{margin:-9px 14px 7px;height:16px;min-height:16px}.floating-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.floating-menu .overlay-scrollbar{z-index:4}.floating-menu .resize-corner{z-index:5}
.overlay-scroll-content{scrollbar-width:none!important}.overlay-scroll-content::-webkit-scrollbar,.overlay-scroll-content::-webkit-scrollbar-button{display:none!important;width:0!important;height:0!important}.overlay-scrollbar{position:absolute;width:10px;touch-action:none;user-select:none;-webkit-user-select:none;z-index:5;cursor:default;outline-offset:0}.overlay-scroll-thumb{position:absolute;left:4px;top:0;width:3px;background:#a6b3c2;border-radius:3px;opacity:.65;pointer-events:auto}.overlay-scrollbar:hover .overlay-scroll-thumb,.overlay-scrollbar[data-dragging] .overlay-scroll-thumb{opacity:1}.overlay-scrollbar:focus-visible{outline:1px solid #829eb2}
@media(prefers-reduced-motion:reduce){.floating-panel,.keyboard-float{transition:none}}

.floating-menu .float-handle,.floating-menu .resize-corner{background:transparent;box-shadow:none;padding:0;border-radius:0}
.floating-menu[data-manual=true]{animation:none}

/* One continuous field of light; header and portals share the same backdrop. */
body[data-route=home]{background:radial-gradient(ellipse at 12% 15%,#d9edff88,transparent 56%),linear-gradient(112deg,#deedff 0%,#e7f2ff 34%,#f4f9ff 66%,#fdfefe 100%)}
.home-view{padding:0;background:transparent}
.portal-shell{border-radius:0;background:transparent;box-shadow:none}.portal-shell:before,.portal-shell:after{display:none}.portal.math,.portal.physics{background:transparent;transform:none;transition:none}.portal.math:hover,.portal.math:active{transform:none}
body[data-route=home] .brand:before{content:"";position:absolute;z-index:-1;pointer-events:none;left:-55px;right:-75px;top:-42px;bottom:-44px;background:radial-gradient(ellipse,#ffffffed 0%,#ffffffa6 26%,#ffffff44 51%,#ffffff00 74%)}
body[data-route=home] .header-actions{gap:26px;isolation:isolate}body[data-route=home] .header-actions:before{content:"";position:absolute;z-index:-1;right:-65px;top:-40px;width:310px;height:155px;pointer-events:none;background:radial-gradient(ellipse,#ffffffdf 0%,#ffffff80 34%,#ffffff00 74%)}
body[data-route=home] .header-actions>*{position:relative;background:transparent;border:0;border-radius:0;box-shadow:none;color:#7d8896;padding:8px 12px;transition:color 180ms ease,transform 260ms var(--ease)}body[data-route=home] .header-actions>*:before{content:"";position:absolute;z-index:-1;inset:-15px -25px;pointer-events:none;background:radial-gradient(ellipse,#ffffffc9,transparent 72%);opacity:.36;transition:opacity 300ms ease}body[data-route=home] .header-actions>*:hover{background:transparent;color:#303d4e;box-shadow:none}body[data-route=home] .header-actions>*:hover:before{opacity:.85}body[data-route=home] .header-actions>*:active{transform:scale(.97)}
.portal-art,.physics-art{transform:translateY(0) scale(1);transition:transform 620ms cubic-bezier(.16,1,.3,1)}.portal h1,.portal h2{transition:transform 620ms cubic-bezier(.16,1,.3,1),color 320ms ease}.orbit{transition:transform 760ms cubic-bezier(.16,1,.3,1),border-color 500ms ease}.orb{transition:transform 620ms cubic-bezier(.16,1,.3,1)}.orb-shadow{transition:transform 620ms cubic-bezier(.16,1,.3,1),opacity 500ms ease}
@media(hover:hover) and (pointer:fine){.portal:hover .portal-art,.portal:focus-visible .portal-art{transform:translateY(-6px) scale(1.025)}.portal.physics:hover .physics-art,.portal.physics:focus-visible .physics-art{transform:translateY(-7px) scale(1.035)}.portal.physics:hover .orbit,.portal.physics:focus-visible .orbit{transform:rotate(-18deg) scale(1.035);border-color:#b8ccdf}.portal.physics:hover .orbit.second,.portal.physics:focus-visible .orbit.second{transform:rotate(34deg) scale(1.035)}.portal.physics:hover .orb,.portal.physics:focus-visible .orb{transform:translateY(-3px)}.portal.physics:hover .orb-shadow,.portal.physics:focus-visible .orb-shadow{transform:scale(.9);opacity:.8}.portal:hover h1,.portal:hover h2,.portal:focus-visible h1,.portal:focus-visible h2{transform:translateY(-3px)}.portal.physics:hover h2{color:#465b72}}
.portal:active .portal-art,.portal:active .physics-art{transform:translateY(1px) scale(.987);transition-duration:140ms}
/* The shared compositor motion converges onto the actual side rail, never past the screen. */
.formula-card,.keyboard-float,.floating-panel{transition:none;animation:none}.formula-card[data-docked=true],.keyboard-float[data-docked=true],.monotonicity-table[data-docked=true],.floating-panel[data-docked=true]{transform:none;opacity:0;pointer-events:none}
@media(max-width:680px){.home-view{padding:0}.portal-shell{border-radius:0}body[data-route=home] .header-actions{gap:12px}body[data-route=home] .header-actions:before{width:240px;right:-40px}.portal-art{top:13%}.physics-art{top:16%}}
@media(prefers-reduced-motion:reduce){.portal-art,.physics-art,.portal h1,.portal h2,.orbit,.orb,.orb-shadow{transition:none!important;transform:none!important}.orbit{transform:rotate(-26deg)!important}.orbit.second{transform:rotate(26deg)!important}}
@media(forced-colors:active){body[data-route=home],.home-view:before{background:Canvas}body[data-route=home] .brand:before,body[data-route=home] .header-actions:before,body[data-route=home] .header-actions>*:before{display:none}body[data-route=home] .header-actions>*{color:LinkText}}

/* Account controls inherit the existing frameless header material. */
#account{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-dialog{width:min(360px,calc(100vw - 32px));padding:24px;border:1px solid #ffffffc9;border-radius:22px;background:linear-gradient(140deg,#fcfdfff5,#f0f5fcf2);box-shadow:0 24px 80px #22334926;color:#303b49;font:14px/1.5 "Jieximian Sans",sans-serif;transform-origin:center}
.account-dialog::backdrop{background:#23334b20;backdrop-filter:blur(5px)}
.account-dialog header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.account-dialog h2{margin:0;font-size:19px;font-weight:500}.account-dialog button{border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.account-dialog [data-account-close]{font-size:24px;color:#86909e;padding:0 4px}.account-form{display:grid;gap:16px}.account-form label{display:grid;gap:7px;color:#718093;font-size:12px}.account-form input{box-sizing:border-box;width:100%;border:1px solid #dce3ed;border-radius:11px;background:#ffffffb5;padding:11px 13px;font:15px/1.4 "Jieximian Sans",sans-serif;color:#253448;outline:none}.account-form input:focus-visible{border-color:#6c9cd4;box-shadow:0 0 0 3px #77a9e51a}.account-dialog .account-primary{padding:11px;border-radius:11px;background:#dfebfa;color:#365d8b}.account-dialog button:disabled{opacity:.45;cursor:default}.account-dialog footer{display:flex;align-items:center;justify-content:space-between;margin-top:14px;color:#768397;font-size:12px}.account-dialog footer button{padding:3px 0}.account-dialog a{color:inherit;text-decoration:none}.account-dialog [data-account-message]{font-size:12px;color:#7b5c58;min-height:18px;margin:16px 0 0}.account-signed p{overflow-wrap:anywhere}.account-signed button{color:#6f8096}.account-dialog [hidden]{display:none!important}
.physics-cloud-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:12px 0;color:var(--phy-muted);font-size:12px}.physics-cloud-actions button{font:inherit;color:inherit;border:0;background:transparent;cursor:pointer}.physics-cloud-actions output{margin-right:auto;overflow-wrap:anywhere}
@media(max-width:680px){#account{max-width:80px}body[data-route=home] .header-actions{gap:10px}.account-dialog{padding:20px}}
@media(prefers-reduced-motion:reduce){.account-dialog::backdrop{backdrop-filter:none}}

html[data-native-app="true"] .site-header{display:none!important}html[data-native-app="true"] body[data-route="physics"] .physics-library{padding-top:0}

.account-form .account-trap{position:absolute;left:-10000px;top:0;width:1px;height:1px;overflow:hidden;pointer-events:none}

/* New announcements use the existing borderless header light. */
.header-actions #announcements{color:#37658d;font-weight:550;display:inline-flex;align-items:center;gap:6px}.header-actions #announcements:before{content:"";width:4px;height:4px;flex-shrink:0;border-radius:50%;background:#7297ba;box-shadow:0 0 8px #7297ba45}.announcements-dialog{width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto}.announcements-list details{border-top:1px solid #dfe6ed;padding:14px 0}.announcements-list summary{cursor:pointer;line-height:1.6;font-size:14px;overflow-wrap:anywhere}.announcement-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.8;padding:12px 0 2px;color:#536476}.announcement-status{font-size:13px;color:#7d8a99}

/* Guided exercise overlays the existing workspace without resizing its canvas. */
.physics-guide-entry{font-size:12px;color:#70839a;margin-left:auto;padding:8px 10px}.physics-library-head [data-new]{margin-left:0}
.physics-tour{position:fixed;inset:0;z-index:120;pointer-events:none}.physics-tour[hidden]{display:none!important}
.physics-tour-focus{position:fixed;border:1.5px solid #83a6cc;border-radius:12px;box-shadow:0 0 0 9999px #24384b12,0 0 0 4px #dceafa75;pointer-events:none;transition:left 160ms ease,top 160ms ease,width 160ms ease,height 160ms ease}
.physics-tour-card{position:fixed;width:336px;padding:20px 21px 16px;box-sizing:border-box;pointer-events:auto;border:1px solid #ffffffdb;border-radius:21px;background:linear-gradient(145deg,#fffffffa,#f3f8fdf5);box-shadow:0 18px 60px #2843601d,0 3px 12px #28436008;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);color:#263849;font-family:var(--font-ui,system-ui,-apple-system,'Segoe UI','Microsoft YaHei',sans-serif);font-weight:400}
.physics-tour-card header{display:flex;align-items:center;justify-content:space-between;gap:12px}.physics-tour-eyebrow{font-size:10px;letter-spacing:.07em;color:#718aa2}.physics-tour-count{font-size:10px;color:#8b9caf;font-variant-numeric:tabular-nums;white-space:nowrap}.physics-tour-progress{height:2px;margin:13px 0 17px;border-radius:3px;background:#dfe9f2;overflow:hidden}.physics-tour-progress i{display:block;width:100%;height:100%;background:#749fc5;transform-origin:left;transition:transform 260ms ease}.physics-tour-card h2{margin:0 0 10px;font-size:18px;font-weight:550;letter-spacing:-.025em;line-height:1.45}.physics-tour-card p{margin:0;font-size:12px;line-height:1.85;color:#687d91}.physics-tour-status:empty{display:none}.physics-tour-card .physics-tour-status{margin-top:9px;color:#577b9e;font-size:11px}.physics-tour-card footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:19px}.physics-tour-card button{font:inherit;font-size:12px;cursor:pointer;border:0;outline-offset:4px;touch-action:manipulation}.physics-tour-card [data-tour-skip]{padding:8px 0;background:none;color:#8b9aab}.physics-tour-card [data-tour-next]{display:flex;align-items:center;gap:20px;padding:10px 14px;border-radius:11px;background:#dfebf5;color:#376080;min-height:38px;transition:background 160ms ease,transform 180ms ease}.physics-tour-card [data-tour-next]:hover{background:#d2e3f1}.physics-tour-card [data-tour-next]:active{transform:scale(.97)}.physics-tour-card [data-tour-next]:disabled{opacity:.55;cursor:progress}.physics-tour-card [data-tour-next] span{font-size:15px}
@media(max-width:600px){.physics-tour-card{width:320px;padding:17px 18px 14px;border-radius:19px}.physics-tour-card h2{font-size:17px}.physics-tour-card p{font-size:12px}.physics-tour-progress{margin:11px 0 14px}.physics-tour-card footer{margin-top:15px}}
@media(prefers-reduced-motion:reduce){.physics-tour-focus,.physics-tour-progress i,.physics-tour-card [data-tour-next]{transition:none}.physics-tour-card [data-tour-next]:active{transform:none}}
