:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;line-height:1.5;font-weight:400;background-color:#eef2ff;color:#0f172a;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:root.dark-mode{background-color:#0b1120;color:#e2e8f0;color-scheme:dark}*,*:before,*:after{box-sizing:border-box}body{margin:0;min-height:100vh;background-color:transparent}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.2;color:inherit}button{font-family:inherit}#root{min-height:100vh;margin:0;padding:0;background:linear-gradient(135deg,#eef2ff,#e0e7ff);display:flex;justify-content:center;align-items:flex-start;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.app-shell{width:100%}.calculator-page{min-height:100vh;padding:3rem 1.5rem;display:flex;justify-content:center;align-items:center}.calculator-card{max-width:900px;width:100%;background-color:#fff;border-radius:1.5rem;box-shadow:0 24px 64px -24px #4f46e559;padding:3rem;display:flex;flex-direction:column;gap:2rem}.card-footer{margin-top:auto;font-size:.85rem;color:#475569;text-align:center}.card-footer a{color:#4338ca;font-weight:600;text-decoration:none}.card-footer a:hover{text-decoration:underline}.calculator-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.header-title{display:flex;align-items:center;gap:1rem}.calculator-header h1{font-size:clamp(1.75rem,4vw,2.5rem);font-weight:700;color:#1e1b4b;margin:0}.header-icon{width:2.5rem;height:2.5rem;color:#4f46e5}.theme-toggle{display:inline-flex;align-items:center;justify-content:center;padding:.6rem;border-radius:999px;border:1px solid #c7d2fe;background:#e0e7ff99;color:#1e1b4b;font-size:.9rem;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,transform .15s ease}.theme-toggle:hover{background:#c7d2fee6;border-color:#4f46e5;transform:translateY(-1px)}.theme-toggle:active{transform:translateY(0)}.theme-toggle-icon{width:1.1rem;height:1.1rem}.input-group{display:flex;flex-direction:column;gap:.75rem}.input-group label{font-size:.95rem;font-weight:600;color:#4338ca}.input-group input{width:100%;padding:.85rem 1rem;border:2px solid #c7d2fe;border-radius:.75rem;font-size:1rem;font-family:JetBrains Mono,SFMono-Regular,Consolas,Liberation Mono,monospace;transition:border-color .2s ease,box-shadow .2s ease}.input-group input:focus{outline:none;border-color:#4f46e5;box-shadow:0 0 0 4px #4f46e526}.input-group .hint{margin:0;font-size:.85rem;color:#6366f1}.variable-input{max-width:160px}.primary-button{width:100%;padding:.9rem 1.25rem;background:linear-gradient(135deg,#4f46e5,#4338ca);color:#fff;font-weight:600;font-size:1.05rem;border:none;border-radius:.9rem;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}.primary-button:hover{transform:translateY(-1px);box-shadow:0 18px 40px -20px #4338ca99;filter:brightness(1.05)}.primary-button:active{transform:translateY(0)}.secondary-button{width:100%;padding:.9rem 1.25rem;background:linear-gradient(135deg,#7c3aed,#6d28d9);color:#fff;font-weight:600;font-size:1.05rem;border:none;border-radius:.9rem;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}.secondary-button:hover{transform:translateY(-1px);box-shadow:0 18px 40px -20px #6d28d999;filter:brightness(1.05)}.secondary-button:active{transform:translateY(0)}.actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem}.options-row{display:flex;align-items:center;gap:.75rem;margin-top:.5rem}.toggle-control{display:inline-flex;align-items:center;gap:.5rem;font-size:.9rem;font-weight:600;color:#4338ca}.toggle-control input[type=checkbox]{width:1rem;height:1rem;accent-color:#4f46e5}.warning-badge-container{display:flex;flex-wrap:wrap;gap:.5rem}.warning-badge{display:inline-flex;align-items:center;gap:.35rem;padding:.35rem .65rem;border-radius:999px;background:#fef3c7;border:1px solid #f59e0b;color:#92400e;font-size:.85rem;font-weight:600}.warning-badge-icon{width:.95rem;height:.95rem}.message{border-left:4px solid;border-radius:.75rem;padding:1.25rem 1.5rem;display:flex;flex-direction:column;gap:.5rem}.message h3{margin:0;font-size:1.05rem;font-weight:600}.message-header{display:flex;align-items:center;gap:.75rem;font-size:1.05rem;font-weight:600}.message-icon{width:1.25rem;height:1.25rem}.message p{margin:0;font-size:1.1rem;font-family:JetBrains Mono,SFMono-Regular,Consolas,Liberation Mono,monospace}.message-error{background:#fef2f2;border-color:#ef4444;color:#b91c1c}.message-success{background:#eef2ff;border-color:#4f46e5;color:#312e81}.critical-section{background:#f5f3ff;border-radius:1rem;padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.critical-section h3{margin:0;font-size:1.05rem;font-weight:600;color:#3730a3}.critical-list{display:flex;flex-direction:column;gap:1rem}.critical-item{background:#fff;border:1px solid #c7d2fe;border-radius:.85rem;padding:1rem 1.25rem;box-shadow:0 10px 24px -22px #4f46e599;display:flex;flex-direction:column;gap:.5rem}.critical-point{font-weight:600;font-family:JetBrains Mono,SFMono-Regular,Consolas,Liberation Mono,monospace;color:#4338ca}.equation-list{margin:.25rem 0 0;padding-left:1.25rem;font-family:JetBrains Mono,SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.9rem;color:#334155}.critical-type{font-weight:600;color:#4c1d95}.critical-hessian{font-size:.9rem;color:#334155}.critical-hessian ul{margin:.5rem 0 0;padding-left:1.25rem;font-family:JetBrains Mono,SFMono-Regular,Consolas,Liberation Mono,monospace}.critical-note{font-size:.85rem;color:#64748b;font-style:italic}.examples{background:#f8fafc;border-radius:1rem;padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.examples-header{display:flex;align-items:center;gap:.75rem}.examples-header h3{margin:0;font-size:1.05rem;font-weight:600;color:#1e1b4b}.examples-icon{width:1.25rem;height:1.25rem;color:#4338ca}.examples-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem}.example-button{display:block;width:100%;text-align:left;padding:.9rem;border-radius:.85rem;border:1px solid #cbd5f5;background:#fff;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;cursor:pointer}.example-button:hover{transform:translateY(-2px);border-color:#4f46e5;box-shadow:0 14px 30px -22px #4f46e599}.example-func{display:block;font-family:JetBrains Mono,SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.95rem;color:#4338ca}.example-desc{display:block;margin-top:.35rem;font-size:.8rem;color:#64748b}.info-box{background:linear-gradient(135deg,#3b82f614,#818cf82e);border-radius:1rem;padding:1.5rem}.info-box h4{margin:0 0 .75rem;font-size:1.05rem;font-weight:600;color:#1e293b}.info-box p{margin:0;font-size:.95rem;color:#334155;line-height:1.6}.info-secondary{margin-top:.75rem}@media(max-width:768px){.calculator-header{flex-direction:column;align-items:flex-start;gap:1.5rem}.theme-toggle{align-self:flex-start}.calculator-page{padding:2rem 1rem}.calculator-card{padding:2rem}}:root.dark-mode{color-scheme:dark}:root.dark-mode #root{background:linear-gradient(135deg,#0f172a,#1f2937)}:root.dark-mode .calculator-card{background-color:#111827;box-shadow:0 24px 64px -28px #0f172ad9;color:#e2e8f0}:root.dark-mode .card-footer{color:#94a3b8}:root.dark-mode .card-footer a{color:#c084fc}:root.dark-mode .card-footer a:hover{text-decoration:underline}:root.dark-mode .calculator-header h1{color:#e0e7ff}:root.dark-mode .header-icon{color:#c084fc}:root.dark-mode .theme-toggle{border-color:#334155;background:#1e293bb3;color:#e2e8f0}:root.dark-mode .theme-toggle:hover{background:#334155eb;border-color:#8b5cf6}:root.dark-mode .warning-badge{background:#eab3082e;border-color:#fbbf24;color:#facc15}:root.dark-mode .warning-badge-icon{color:#facc15}:root.dark-mode .input-group label{color:#c084fc}:root.dark-mode .input-group input{background-color:#0f172a;border:2px solid #334155;color:#e2e8f0}:root.dark-mode .input-group input::placeholder{color:#64748b}:root.dark-mode .input-group input:focus{border-color:#a855f7;box-shadow:0 0 0 4px #a855f740}:root.dark-mode .input-group .hint{color:#a855f7}:root.dark-mode .primary-button{background:linear-gradient(135deg,#7c3aed,#6d28d9);box-shadow:none}:root.dark-mode .primary-button:hover{box-shadow:0 18px 40px -20px #7c3aed8c}:root.dark-mode .secondary-button{background:linear-gradient(135deg,#6366f1,#4338ca)}:root.dark-mode .secondary-button:hover{box-shadow:0 18px 40px -20px #6366f18c}:root.dark-mode .toggle-control{color:#c084fc}:root.dark-mode .toggle-control input[type=checkbox]{accent-color:#c084fc}:root.dark-mode .message{border-color:#374151}:root.dark-mode .message-error{background:#b91c1c33;border-color:#f87171;color:#fecaca}:root.dark-mode .message-success{background:#4c1d954d;border-color:#a855f7;color:#ddd6fe}:root.dark-mode .critical-section{background:#1e40af40}:root.dark-mode .critical-section h3{color:#c7d2fe}:root.dark-mode .critical-item{background:#111827f2;border:1px solid #334155;box-shadow:0 10px 24px -22px #0f172ae6}:root.dark-mode .critical-point{color:#c4b5fd}:root.dark-mode .equation-list{color:#cbd5f5}:root.dark-mode .critical-type{color:#a78bfa}:root.dark-mode .critical-hessian{color:#cbd5f5}:root.dark-mode .critical-note{color:#94a3b8}:root.dark-mode .examples{background:#0f172aa6}:root.dark-mode .examples-header h3{color:#e0e7ff}:root.dark-mode .examples-icon{color:#c084fc}:root.dark-mode .example-button{background:#111827e6;border-color:#334155;color:#e2e8f0}:root.dark-mode .example-button:hover{border-color:#8b5cf6;box-shadow:0 14px 30px -22px #8b5cf699}:root.dark-mode .example-func{color:#c4b5fd}:root.dark-mode .example-desc{color:#94a3b8}:root.dark-mode .info-box{background:linear-gradient(135deg,#2563eb1f,#8b5cf642)}:root.dark-mode .info-box h4{color:#c7d2fe}:root.dark-mode .info-box p{color:#cbd5f5}
