/* Graphing Calculator – styles. Everything is scoped to .gcalc so it cannot affect the rest of the site. */
.gcalc,.gcalc *{box-sizing:border-box}
.gcalc{line-height:normal;text-align:left;font-size:14px;letter-spacing:normal;-webkit-text-size-adjust:100%}
.gcalc button{font:inherit;padding:0;margin:0;background:none;border:0;box-shadow:none;text-transform:none;letter-spacing:normal;min-width:0;min-height:0;width:auto;height:auto;border-radius:0;outline:none}
.gcalc b,.gcalc i,.gcalc span,.gcalc div,.gcalc sup,.gcalc svg{margin:0;padding:0;border:0;font-style:normal;color:inherit;background:transparent;letter-spacing:normal;text-transform:none;text-shadow:none;float:none}
.gcalc canvas{max-width:none}

.gcalc *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
.gcalc{margin:0 auto;display:flex;justify-content:center;align-items:flex-start;padding:0;font-family:system-ui,sans-serif;max-width:100%}
.gcalc .calc{width:100%;max-width:372px;background:#000;border-radius:24px;padding:22px 16px 18px;box-shadow:0 14px 40px #0006;user-select:none}
.gcalc .scr{container-type:inline-size;background:#fff;border:0;aspect-ratio:4/3;display:flex;flex-direction:column;overflow:hidden;color:#000;font-family:ui-monospace,Menlo,Consolas,monospace;margin-bottom:14px;position:relative}
.gcalc .sb{background:#3b3d40;color:#fff;font-weight:600;font-size:3.9cqw;height:8.5cqw;display:flex;justify-content:space-between;align-items:center;padding:0 2cqw;white-space:nowrap}
.gcalc .sb b{background:#2b8bd8;padding:0 1cqw;border-radius:1cqw;font-size:3.2cqw;margin-left:1cqw}
.gcalc .vw{flex:1;position:relative;font-size:5.2cqw;line-height:1.22;padding:1cqw 1.5cqw;white-space:pre-wrap;word-break:break-all;overflow:hidden}
.gcalc .vw .r{text-align:right}
.gcalc .vw .c{text-align:center}
.gcalc .vw .hl{background:#000;color:#fff}
.gcalc .vw .t{border-bottom:.4cqw solid #000;margin-bottom:1cqw}
.gcalc .vw .sm{font-size:3.35cqw;line-height:1.24}
.gcalc .vw .sm div{white-space:nowrap}
.gcalc .lb{color:#1f5fd0}
.gcalc .fr2{display:inline-flex;flex-direction:column;vertical-align:middle;text-align:center;font-size:.86em;line-height:1.1;margin:0 .1em}
.gcalc .fr2>span{min-width:1ch;padding:0 .15em}
.gcalc .fr2>span:first-child{border-bottom:.3cqw solid currentColor}
.gcalc .ex{font-size:.72em;vertical-align:.7em;line-height:1}
.gcalc .rt .ov{padding:0 .1em}
.gcalc .eb{display:inline-block;width:.7em;height:.85em;border:.25cqw dotted #555;vertical-align:middle}
.gcalc .fr{display:inline-flex;flex-direction:column;vertical-align:middle;text-align:center;font-size:.86em;line-height:1.08;margin:0 .1em}
.gcalc .fr>span:first-child{border-bottom:.3cqw solid currentColor;padding:0 .15em}
.gcalc .vw sup{font-size:.72em;line-height:0}
.gcalc .ov{border-top:.3cqw solid currentColor}
.gcalc .pv{position:absolute;right:1.5cqw;top:21cqw;width:52%;height:37cqw;border:.35cqw solid #000;background:#80ffff}
.gcalc .pv svg,.gcalc .pv img{display:block;width:100%;height:100%}
.gcalc .bat{display:inline-block;width:2.8cqw;height:5.2cqw;border:.45cqw solid #e8e8e8;border-radius:.5cqw;margin-left:1.5cqw;position:relative;vertical-align:middle}
.gcalc .bat::before{content:'';position:absolute;top:-1.1cqw;left:.4cqw;right:.4cqw;height:.7cqw;background:#e8e8e8}
.gcalc .bat::after{content:'';position:absolute;inset:.45cqw;background:#2fc44b}
.gcalc .cu2{animation:gcalc-bl 1s steps(2) infinite;outline:.3cqw solid #000}
.gcalc .cu{background:#000;color:#fff;animation:gcalc-bl 1s steps(2) infinite}
.gcalc .cui{border-bottom:.9cqw solid #000;animation:gcalc-bl 1s steps(2) infinite}
.gcalc .cua,.gcalc .cu2nd{font-weight:700}
@keyframes gcalc-bl{50%{opacity:.2}}
.gcalc canvas{display:none;width:100%;flex:1;min-height:0;image-rendering:pixelated;image-rendering:crisp-edges}
.gcalc .row{display:grid;grid-template-columns:repeat(5,1fr);gap:9px 8px;margin-top:9px}
.gcalc .k{position:relative;height:46px;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;padding:3px 4px 4px;box-sizing:border-box;-webkit-user-select:none;transition:transform .05s}
.gcalc .k:active{transform:scale(.95);filter:brightness(1.2)}
.gcalc .k.on{box-shadow:0 0 0 2.5px #fff,0 0 10px 3px #fff8}
.gcalc .k .tl{position:absolute;top:2px;left:4px;right:4px;display:flex;justify-content:space-between;font:600 10.5px/1.15 Arial,Helvetica,sans-serif;white-space:nowrap}
.gcalc .k .s{color:#3d9be9}
.gcalc .k .a{color:#5cb83c}
.gcalc .k b{font:600 14.5px/1 Arial,Helvetica,sans-serif;white-space:nowrap}
.gcalc .d{background:#000;color:#fff;border:1.6px solid #e8e8e8}
.gcalc .n{background:#fff;color:#000;border:1.6px solid #fff}
.gcalc .n b{font-size:22px;font-weight:700}
.gcalc .o{background:#d6d8db;color:#000;border:1.6px solid #d6d8db}
.gcalc .o b{font-size:19px}
.gcalc .tk{background:#d9dbde;color:#000;height:40px}
.gcalc .tk b{font-size:14px}
.gcalc .b{background:#2a7fd0;color:#fff}
.gcalc .g{background:#64b843;color:#fff}
.gcalc .b b,.gcalc .g b{font-size:14.5px}
.gcalc .k.g .s{color:#eaffdf}
.gcalc .o .tl{font-size:9.5px}
.gcalc .row .s{color:#3d9be9}
.gcalc .tk .s,.gcalc .o .s,.gcalc .n .s{color:#1f6cc4}
.gcalc .tk .a,.gcalc .o .a,.gcalc .n .a{color:#2f8a1c}
.gcalc .dp{grid-column:4/6;grid-row:1/3;position:relative;height:110px;margin-top:-2px}
.gcalc .dp div{position:absolute;inset:0 4px;border-radius:50%;background:radial-gradient(circle,#000 0 27%,#c3c6ca 27.5% 100%);box-shadow:inset 0 0 0 1px #9a9da3}
.gcalc .dp button{position:absolute;width:34px;height:34px;border:0;background:none;color:#000;font-size:11px;cursor:pointer;padding:0}
.gcalc .dp button:active{opacity:.6}
.gcalc .dp button{line-height:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px}
.gcalc .dp button:nth-of-type(3),.gcalc .dp button:nth-of-type(4){flex-direction:row;gap:3px}
.gcalc .dp .tri{font-size:8px;color:#000}
.gcalc .dp svg{display:block}
.gcalc .note{color:#6c7078;font-size:10px;text-align:center;margin-top:12px}
.gcalc .k sup{font-size:.62em;vertical-align:.55em;line-height:0}
/* ---- phones: key text scales with the calculator so labels stay inside their keys ---- */
.gcalc .calc{container-type:inline-size}
.gcalc .k .tl{gap:2px}
@supports (width:1cqw){
.gcalc .k{padding-left:min(4px,1.1cqw);padding-right:min(4px,1.1cqw)}
.gcalc .k .tl{font-size:min(10.5px,3.05cqw);left:min(4px,1.1cqw);right:min(4px,1.1cqw)}
.gcalc .o .tl{font-size:min(9.5px,2.8cqw)}
.gcalc .tk .tl{font-size:min(10.5px,2.6cqw);letter-spacing:-.3px}
.gcalc .k b{font-size:min(14.5px,4.2cqw)}
.gcalc .tk b{font-size:min(14px,4.1cqw)}
.gcalc .n b{font-size:min(22px,6.4cqw)}
.gcalc .o b{font-size:min(19px,5.5cqw)}
}
@media (max-width:420px){.gcalc .calc{padding:18px 10px 14px;border-radius:20px}.gcalc .row{gap:8px 5px}}
.gcalc sup,.gcalc sub{position:static;top:auto;bottom:auto}
.gcalc .k sup{font-size:.62em;vertical-align:.55em;line-height:0}
.gcalc .dp .tri svg{display:block;max-width:none;width:6px;height:8px;border:0;margin:0}
/* ---- phones: keep the width, make key rows shorter so the whole calculator fits one screen (height set by script) ---- */
.gcalc .calc.gc-fit .k{height:var(--kh,46px)}
.gcalc .calc.gc-fit .tk{height:calc(var(--kh,46px) - 6px)}
.gcalc .calc.gc-fit .dp{height:calc(var(--kh,46px) * 2 + 18px)}
.gcalc .calc.gc-fit .dp button{width:min(34px,calc(var(--kh,46px) * .74));height:min(34px,calc(var(--kh,46px) * .74))}
.gcalc .calc.gc-fit .k b{line-height:.95}
.gcalc .calc.gc-fit .k{padding-top:2px;padding-bottom:min(4px,calc(var(--kh,46px) * .08))}
.gcalc .calc.gc-fit .k .tl{top:1px;line-height:1.05;font-size:min(10.5px,3.05cqw,calc(var(--kh,46px) * .28))}
.gcalc .calc.gc-fit .o .tl{font-size:min(9.5px,2.8cqw,calc(var(--kh,46px) * .27))}
.gcalc .calc.gc-fit .tk .tl{font-size:min(10.5px,2.6cqw,calc(var(--kh,46px) * .25))}
.gcalc .calc.gc-fit .k b{font-size:min(14.5px,4.2cqw,calc(var(--kh,46px) * .4))}
.gcalc .calc.gc-fit .tk b{font-size:min(14px,4.1cqw,calc(var(--kh,46px) * .36))}
.gcalc .calc.gc-fit .n b{font-size:min(22px,6.4cqw,calc(var(--kh,46px) * .55))}
.gcalc .calc.gc-fit .o b{font-size:min(19px,5.5cqw,calc(var(--kh,46px) * .5))}
