:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#16263c;background:#f3f6fb;font-size:17px;line-height:1.55}*{box-sizing:border-box}body{margin:0}.container{width:min(1100px,calc(100% - 36px));margin:auto}.site-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:26px 0}.brand{font-weight:800;font-size:1.15rem;color:#173e78;text-decoration:none}.tag{background:#e3edff;color:#285390;border-radius:999px;padding:6px 13px;font-size:.8rem;font-weight:700}.hero{background:white;border:1px solid #dce4f0;border-radius:22px;padding:clamp(22px,5vw,48px);box-shadow:0 12px 32px #1c47750c}.eyebrow{color:#3563b0;letter-spacing:.12em;font-weight:800;font-size:.8rem;margin:0}h1{font-size:clamp(1.9rem,4vw,3rem);line-height:1.15;margin:10px 0 16px}h2{font-size:1.5rem;margin:0 0 16px}.hero>p:not(.eyebrow){color:#52647c;max-width:730px}.function-form{margin-top:28px}.function-form label,.panel label{display:block;font-weight:750;margin-bottom:9px}.input-line{display:flex;gap:10px}input{border:1.5px solid #aebed3;border-radius:11px;padding:13px 15px;font:inherit;width:100%;min-width:0;background:#fff;color:#16263c}input:focus{outline:3px solid #a9c9ff;border-color:#2d66bb}button,.button{border:0;border-radius:11px;padding:13px 19px;background:#235cb1;color:#fff;font:inherit;font-weight:750;cursor:pointer;text-decoration:none;text-align:center;white-space:nowrap}button:hover,.button:hover{background:#17478e}.function-form small{display:block;color:#64748b;margin-top:8px}.message{min-height:1.2em;color:#255ca5;font-size:.88rem}.current{display:flex;flex-wrap:wrap;align-items:center;gap:14px;border-top:1px solid #e3e9f1;margin-top:20px;padding-top:19px}.current span{font-weight:700;color:#52647c}.current code{font-size:1.05rem;background:#edf4ff;border-radius:9px;padding:8px 13px;overflow-wrap:anywhere}.section{margin:35px 0}.module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.module-card{display:flex;flex-direction:column;gap:9px;background:#fff;border:1px solid #dce4f0;border-radius:16px;padding:23px;text-decoration:none;color:inherit;min-height:180px;box-shadow:0 5px 14px #1c477508}.module-card[href]:hover{border-color:#4d80d2;box-shadow:0 8px 24px #1c47751c}.module-card strong{font-size:1.2rem}.module-card>span:not(.module-icon):not(.open-label){color:#52647c;font-size:.9rem}.module-icon{font-size:1.6rem;color:#2765bd;font-weight:800}.open-label{margin-top:auto;color:#245bad;font-weight:750;font-size:.85rem}.disabled{opacity:.57;background:#f9fafc}.panel{background:#fff;border:1px solid #dce4f0;border-radius:18px;padding:28px}.panel p{color:#52647c}.panel input{max-width:250px}.note{font-size:.87rem}.actions{display:flex;gap:12px;flex-wrap:wrap;margin:25px 0}.secondary{background:#e6eefb;color:#17478e}.secondary:hover{background:#d5e3f8}.ghost{background:white;color:#17478e;border:1px solid #b9cbe5}.ghost:hover{background:#eef4ff}nav{margin:0 0 18px;color:#64748b;font-size:.9rem}nav a{color:#245bad}footer{color:#738095;font-size:.8rem;margin:36px 0 45px}footer code{color:#425b7c}@media(max-width:760px){.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.input-line{flex-direction:column}.input-line button{width:100%}.site-header{align-items:flex-start;flex-direction:column}}@media(max-width:480px){.module-grid{grid-template-columns:1fr}.container{width:min(100% - 24px,1100px)}.hero{border-radius:15px}.panel{padding:20px}}

.analysis-results{margin-top:22px}.result-card{padding:18px;margin:12px 0;border:1px solid #dce4f0;border-radius:12px;background:#f7faff}.result-card h3{margin:0 0 8px}.result-card p{margin:6px 0}.analysis-error{color:#a32929!important;background:#fff1f1;padding:14px;border-radius:10px}.analysis-results h3{font-size:1.15rem}

.support-info{margin:15px 0;color:#52647c}.support-info summary{cursor:pointer;font-weight:700}.steps{padding-left:23px}.steps li{margin:14px 0;line-height:1.8}.limits{display:flex;gap:20px;flex-wrap:wrap;margin:12px 0;padding:12px;background:#fff;border-radius:10px}.graph-wrap{background:#fff;border:1px solid #dce4f0;border-radius:14px;padding:10px;overflow:hidden}.graph-wrap svg{display:block;width:100%;height:auto}.grid-line{stroke:#e8edf5;stroke-width:1}.axis-line{stroke:#70819b;stroke-width:1.8}.asymptote-line{stroke:#d9534f;stroke-width:2;stroke-dasharray:9 6}.function-line{fill:none;stroke:#2169c1;stroke-width:3;stroke-linecap:round}.point-label{font-size:16px;fill:#9b3030;font-weight:700}.axis-label{font-size:18px;fill:#52647c}.graph-legend{font-size:.88rem;color:#52647c}.result-card{overflow-x:auto}

/* Stili SVG isolati anche quando il sito ospitante impone regole globali. */
.graph-wrap svg line,.graph-wrap svg path,.graph-wrap svg circle{vector-effect:non-scaling-stroke}
.graph-wrap svg .function-line{stroke:#1261b4!important;stroke-width:3.5!important;fill:none!important;opacity:1!important}
.graph-wrap svg .axis-line{stroke:#475569!important;stroke-width:2!important;opacity:1!important}
.graph-wrap svg .grid-line{stroke:#e1e7f0!important;stroke-width:1!important;opacity:1!important}
.graph-wrap svg .asymptote-line{stroke:#dc4a42!important;stroke-width:2.5!important;stroke-dasharray:9 6!important}

/* Controlli del grafico interattivo */
.graph-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:10px 0;font-size:14px;color:#334155}
.graph-controls span{margin-right:auto}
.graph-controls button{border:1px solid #b8c7d9;background:#fff;color:#18324c;border-radius:7px;padding:7px 14px;font-size:19px;font-weight:700;cursor:pointer}
.graph-controls button:hover{background:#e9f2ff}
.graph-controls .graph-reset{font-size:14px}

/* v0.3.3: controlli separati e crocetta visibile */
.graph-controls{column-gap:14px!important;row-gap:12px!important}
.graph-controls button{margin:0 3px!important;min-width:46px}
.graph-controls .graph-reset{min-width:100px}
.graph-wrap svg .graph-focus-marker path{stroke:#ed7900!important;stroke-width:3.5!important;opacity:1!important}
.graph-wrap svg .graph-focus-marker circle{opacity:1!important}

.graph-axis-ratio-label{font-weight:600;white-space:nowrap}
.graph-axis-ratio{min-width:78px;padding:8px;border:1px solid #aab7c6;border-radius:7px;background:white;color:#172b4d}

/* v0.3.6: toolbar compatta, grafico senza deformazioni */
.graph-help{font-size:13px;color:#52647c;margin:8px 0!important}
.graph-controls{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:12px!important}
.graph-controls button{margin:0!important}
.graph-wrap svg{aspect-ratio:760/360!important;height:auto!important;max-width:100%}

.graph-wrap svg{width:100%!important;aspect-ratio:760/360!important;height:auto!important;object-fit:contain!important}

.graph-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px}.graph-controls select{min-width:65px}.graph-controls label{white-space:nowrap}

/* v0.7 */
.syntax-legend{margin-top:12px;padding:14px 16px;border:1px solid #cfdef2;background:#f3f8ff;border-radius:12px}.syntax-legend strong{display:block;margin-bottom:8px;color:#1c467e}.syntax-items{display:flex;gap:8px 18px;flex-wrap:wrap}.syntax-items span{font-size:.88rem;color:#40536b}.syntax-items code{color:#153e75;font-weight:700;background:white;padding:2px 5px;border-radius:5px}.syntax-legend small{margin-top:10px;display:block}.domain-output{margin-top:20px}.domain-formula{font-size:1.3rem;font-weight:750;color:#183c70;overflow-wrap:anywhere}.domain-condition{background:#f3f8ff;border-radius:10px;padding:12px 15px}.domain-numberline{width:100%;height:auto;display:block;background:white;border:1px solid #dce4f0;border-radius:12px}.domain-legend{font-size:.85rem;color:#52647c}.domain-examples{display:flex;gap:8px;flex-wrap:wrap}.domain-examples button{font-size:.82rem;padding:8px 10px;background:#e6eefb;color:#17478e}.domain-examples button:hover{background:#d5e3f8}

.sign-table-wrap{overflow-x:auto;margin:18px 0}.sign-table{border-collapse:collapse;min-width:100%;width:max-content;text-align:center}.sign-table th,.sign-table td{padding:13px 15px;border:1px solid #d8e1eb;white-space:nowrap}.sign-table caption{text-align:left;font-weight:700;padding:8px 0}.sign-positive{color:#137f50;font-size:23px;font-weight:800}.sign-negative{color:#b23c39;font-size:23px;font-weight:800}.sign-zero{color:#184a8b;font-size:23px;font-weight:800}.sign-excluded{color:#b23c39;font-size:23px;font-weight:800}.sign-undefined{color:#888}

/* v1.0 - Studio integrato */
.study-chart-wrap{overflow-x:auto;background:#fff;border:1px solid #dce5ee;border-radius:12px;padding:10px}
.study-chart-wrap svg{width:100%;min-width:640px;display:block}
.study-table{width:100%;border-collapse:collapse}
.study-table th,.study-table td{border:1px solid #dce5ee;padding:10px;text-align:left}

.limit-controls{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:18px 0}.limit-controls input,.limit-controls select{padding:12px;border:1px solid #8b9bb0;border-radius:8px;min-width:115px;font-size:17px}.limit-controls input[hidden]{display:none}#limit-result{margin-top:18px;padding:18px;border:1px solid #b9c6d8;border-radius:12px}#limit-result:empty{display:none}#limit-result h3{font-size:23px}#limit-result .error{color:#a32828}
/* v3.7: tabelle delle derivate nella pagina unica */
.derivative-table th,.derivative-table td{min-width:105px;text-align:center;padding:12px 10px}.derivative-table .derivative-sign{font-size:1.35rem;font-weight:700}.derivative-table caption{text-align:left;font-weight:700;margin-bottom:10px}.sign-table-wrap{overflow-x:auto;max-width:100%}

/* v4.0: firma editoriale comune a tutte le pagine */
.andrea-credit{padding:24px 12px;text-align:center;font-size:14px;clear:both}.andrea-credit a{color:inherit;text-decoration:underline;text-underline-offset:3px}.andrea-credit a:hover{opacity:.75}

.study-marker-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px 22px;margin:12px 0;font-size:14px}.study-marker-controls label{display:inline-flex;align-items:center;gap:7px;cursor:pointer}.study-marker-controls input{accent-color:#245fb6}.study-marker-controls .note{margin:0}

/* v4.6.9: controlli leggibili e legenda compatta */
.study-marker-controls{display:flex;align-items:center;flex-wrap:wrap;column-gap:22px;row-gap:12px;font-size:14px}
.study-marker-controls label{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;flex:0 0 auto;min-width:max-content}
.study-marker-controls label input{flex:0 0 auto;margin:0}
.study-marker-controls>.note{flex-basis:100%;margin:0}
.study-marker-legend{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;margin-left:10px}
.legend-dot{width:9px;height:9px;border-radius:50%;display:inline-block;margin-left:8px}
.legend-max{background:#e78b20}.legend-min{background:#159569}.legend-inf{background:#c026d3}

/* v4.7.0: righe indipendenti per checkbox, nota e legenda */
.study-marker-panel{display:grid;grid-template-columns:minmax(0,1fr);row-gap:9px;margin:14px 0 16px}
.study-marker-panel .study-marker-controls{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:12px 28px;margin:0;padding:0}
.study-marker-panel .study-marker-controls label{display:inline-flex;align-items:center;justify-content:flex-start;gap:9px;white-space:nowrap;margin:0;padding:0;min-width:0;line-height:1.5;cursor:pointer}
.study-marker-panel .study-marker-controls input[type=checkbox]{display:block;width:16px;height:16px;margin:0;flex:0 0 16px;vertical-align:middle}
.study-marker-panel .study-marker-help{display:block;margin:0;line-height:1.5}
.study-marker-panel .study-marker-legend{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;margin:0;line-height:1.5}
.study-marker-panel .legend-dot{margin-left:9px}
.study-marker-panel .legend-dot:first-child{margin-left:0}
@media(max-width:400px){.study-marker-panel .study-marker-controls{gap:10px 18px}}

/* v4.7.1: reset completo degli input generici sulle checkbox del grafico.
   Il padding globale degli input spostava il quadratino dentro la sua area. */
.study-marker-panel .study-marker-controls label{display:inline-flex;align-items:center;gap:10px;width:auto;max-width:none;min-width:0;margin:0;padding:0}
.study-marker-panel .study-marker-controls input[type="checkbox"]{appearance:auto;-webkit-appearance:checkbox;display:inline-block;box-sizing:border-box;position:static;width:17px;min-width:17px;max-width:17px;height:17px;min-height:17px;max-height:17px;padding:0!important;margin:0!important;border:0;border-radius:0;flex:0 0 17px;vertical-align:middle;accent-color:#245fb6}
.study-marker-panel .study-marker-controls label span{display:inline-block;white-space:nowrap;line-height:1.5}
