.derivative-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.derivative-control{display:grid;grid-template-columns:1fr auto;gap:7px 14px;border:1px solid var(--line);border-radius:14px;background:var(--paper);padding:13px 15px;font-size:13px;font-weight:750}.derivative-control output{font-size:20px;color:#a46009;font-variant-numeric:tabular-nums}.derivative-control input{grid-column:1/-1;width:100%;accent-color:var(--forest);min-height:28px}.derivative-prediction{display:grid;gap:9px;border:1px solid var(--line);border-radius:14px;padding:15px;margin:18px 0}.derivative-prediction legend{font-weight:800;padding:0 6px}.derivative-prediction label{display:flex;align-items:flex-start;gap:8px}.derivative-prediction input{width:18px;height:18px;margin-top:3px;accent-color:var(--forest)}.derivative-stage{margin:18px 0;padding:10px;border:1px solid var(--line);border-radius:17px;background:var(--paper)}.derivative-stage svg{display:block;width:100%;height:auto;max-height:420px}.derivative-stage text{fill:var(--muted);font:12px system-ui}.derivative-stage .grid{stroke:#d9e1db;stroke-width:1}.derivative-stage .axis{stroke:#425b52;stroke-width:2}.derivative-stage .curve{fill:none;stroke:#d97706;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.derivative-stage .derivative-curve{fill:none;stroke:#7b57a6;stroke-width:3;stroke-dasharray:8 5}.derivative-stage .secant{stroke:#28766a;stroke-width:3;stroke-dasharray:9 5}.derivative-stage .tangent{stroke:#234c40;stroke-width:3}.derivative-stage .delta{stroke:#7b57a6;stroke-width:2.5;fill:none;stroke-dasharray:5 4}.derivative-stage .point{fill:#fff;stroke:#9a5708;stroke-width:4}.derivative-stage .critical{fill:#234c40;stroke:#fff;stroke-width:3}.derivative-stage figcaption{font-size:13px;color:var(--muted);padding:8px 5px 2px}.derivative-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:18px 0}.derivative-values>div{min-width:0;border:1px solid var(--line);border-radius:13px;background:var(--paper);padding:13px}.derivative-values span{display:block;color:var(--muted);font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.05em}.derivative-values strong{display:block;margin-top:5px;font-size:clamp(16px,2.4vw,21px);overflow-wrap:anywhere}.derivative-signline{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;margin:20px 0;border:1px solid var(--line);border-radius:14px;background:var(--paper);padding:18px 14px;text-align:center}.derivative-signline b{font-size:24px;color:#a46009}.derivative-signline span{font-size:13px}.derivative-signline i{height:2px;background:var(--forest);position:relative}.derivative-signline i:after{content:'›';position:absolute;right:-2px;top:-16px;font-size:24px}.derivative-checks{display:grid;gap:10px;border:1px solid var(--line);border-radius:14px;padding:16px;margin:18px 0}.derivative-checks label{display:flex;gap:8px;align-items:flex-start;font-size:14px}.derivative-checks input{width:18px;height:18px;margin-top:3px;accent-color:var(--forest)}.fence-stage{display:grid;grid-template-columns:minmax(190px,.75fr) minmax(0,1.25fr);gap:18px;align-items:center}.fence-picture{position:relative;display:grid;place-items:center;min-height:240px;border-radius:14px;background:#e8eee4;overflow:hidden}.fence-wall{position:absolute;left:10%;right:10%;top:13%;height:14px;border-radius:5px;background:#766657}.fence-rectangle{border:4px solid #d97706;border-top:0;background:rgba(255,182,75,.22);display:grid;place-items:center;color:var(--ink);font-weight:800;min-width:70px;min-height:55px;max-width:82%;max-height:66%}.fence-curve{min-width:0}.explanation-fields{display:grid;gap:12px;margin:20px 0}.explanation-fields label{display:grid;gap:6px;font-size:13px;font-weight:750}.explanation-fields textarea{width:100%;resize:vertical;border:1.5px solid #91a196;border-radius:11px;background:#fff;color:var(--ink);padding:11px 13px;font:inherit}.rubric{display:grid;gap:10px;border:1px solid var(--line);border-radius:14px;padding:16px;margin:18px 0}.rubric legend{font-weight:800;padding:0 6px}.rubric label{display:flex;gap:8px;align-items:flex-start;font-size:14px}.rubric input{width:18px;height:18px;margin-top:3px;accent-color:var(--forest)}
@media(max-width:720px){.derivative-values{grid-template-columns:1fr 1fr}.fence-stage{grid-template-columns:1fr}.fence-picture{min-height:190px}}
@media(max-width:480px){.derivative-controls,.derivative-values{grid-template-columns:1fr}.derivative-stage{padding:4px}.derivative-stage text{font-size:10px}.derivative-signline{padding-inline:8px}.derivative-signline span{font-size:11px}.derivative-signline b{font-size:20px}}
@media(prefers-reduced-motion:reduce){.derivative-stage *,.fence-rectangle{transition:none!important}}
