:root{color-scheme:dark;--case:#302f2f;--f:#e1d358;--k:#76aec9}
*{box-sizing:border-box}
html{background:#171b1c;-webkit-text-size-adjust:100%}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 50% 130px,#323838 0%,#1e2223 60%,#141718 100%);font:13px/1.4 Arial,Helvetica,sans-serif;color:#c8cfcd}
main{width:min(calc(100% - 18px),400px);margin:12px auto 30px}
.calculator{position:relative;padding:0 0 17px;background:linear-gradient(90deg,#292a29 0%,#343232 4%,#383535 48%,#323131 96%,#202424 100%);border:1px solid #545655;border-radius:7px 7px 9px 9px;clip-path:polygon(3.5% 0,96.5% 0,100% 34%,100% 100%,0 100%,0 34%);box-shadow:inset 2px 0 3px #fff2,inset -2px 0 3px #0009}
.calculator:before{content:"";position:absolute;z-index:-1;pointer-events:none;inset:5px 5px 4px;border-left:2px solid #b8bdbb33;border-right:2px solid #07090980;border-bottom:4px solid #1a1d1e;border-radius:6px}
.top-housing{position:relative;height:315px;margin:0 8px;background:linear-gradient(#292b29,#343938 22%,#28302c 100%);overflow:hidden;border-radius:2px 2px 0 0;box-shadow:inset 0 4px 6px #0c1010ba}
.upper-seam{position:absolute;left:3px;right:3px;top:8px;height:35px;background:linear-gradient(#2b3030,#242626 55%,#303435);border-bottom:2px solid #161c1a;box-shadow:0 2px 2px #fff1}
.display-bezel{position:absolute;left:10px;right:10px;top:52px;height:104px;overflow:hidden;background:linear-gradient(178deg,#0b302e,#195950 37%,#397f6d 82%,#569585 100%);border:3px solid #1d3330;border-bottom:0;border-radius:2px 2px 0 0;box-shadow:inset 0 5px 13px #041717b8,inset 4px 0 9px #03332e80,0 0 4px #61a38a33}
.display-bezel:before{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:linear-gradient(110deg,#9bd9c01e,transparent 40%,#b6eddc13 65%,transparent 85%)}
#display{display:block;width:96%;height:56px;margin:19px auto 0;overflow:visible}
/* The real MK-61 has a softly illuminated green VFD. Mimic luminous glass rather than solid plastic LED bars. */
.segment{fill:#164338;opacity:.075}
.segment.on{fill:#7feacb;opacity:.91;filter:drop-shadow(0 0 1px #b2fff0) drop-shadow(0 0 3px #67ffd4a0) drop-shadow(0 0 7px #3ce2b870)}
.display-bezel:after{content:"";position:absolute;inset:0;z-index:4;pointer-events:none;background:repeating-linear-gradient(90deg,#addac008 0 1px,transparent 1px 4px),linear-gradient(174deg,#bcefd417,transparent 39%,#b4f0d609 61%,transparent 100%);box-shadow:inset 0 7px 12px #042c2db8,inset 0 -6px 11px #0e433a7c}
#display{opacity:.95;filter:drop-shadow(0 0 3px #4aceab58)}
.metal-deck{position:absolute;top:156px;left:10px;right:10px;bottom:0;box-shadow:inset 0 8px 14px #174d4244,inset 0 -9px 12px #365c4c44;background:repeating-linear-gradient(0deg,#cff4df1b 0 1px,transparent 1px 2px,#173e341a 2px 3px),repeating-linear-gradient(90deg,#d3efdf17 0 1px,transparent 1px 3px),linear-gradient(170deg,#6da391,#84baa8 38%,#8cbbad 69%,#709c8c 100%);border:3px solid #1e3933;border-top:0;border-bottom:3px solid #2e5e4e}
.control-panel{position:relative;margin:0 0 4px;padding:0 12px}
.brand{display:flex;justify-content:center;align-items:center;gap:24px;height:34px;padding-top:1px;white-space:nowrap;color:#e9ebe8;text-shadow:0 1px 1px #090a0a}
.language-toggle{appearance:none;background:transparent;border:0;color:inherit;font:700 15px/1 Arial,Helvetica,sans-serif;letter-spacing:.3px;cursor:pointer;padding:8px 0;touch-action:manipulation}
.brand strong{font:700 17px/1 Arial,Helvetica,sans-serif;letter-spacing:1px}
.switches{display:flex;align-items:flex-start;justify-content:space-between;height:63px;padding:8px 40px 0;color:#e6e8e5;font-size:11px;letter-spacing:.3px}
.power-group{display:flex;align-items:center;gap:8px;margin-top:17px}
#power,.angle-housing{position:relative;width:48px;height:13px;padding:0;border:2px solid #181b1a;border-radius:0;background:#121818;box-shadow:inset 0 2px 4px #000,0 1px #a7aaa422;cursor:pointer;flex:none}
#power .switch-thumb,.angle-thumb{position:absolute;top:-2px;left:1px;width:23px;height:13px;border:1px solid #191c1c;border-radius:1px;background:linear-gradient(90deg,#1b2223 0%,#545a59 40%,#191e1e 85%);box-shadow:0 1px 2px #000b;transition:transform .12s ease}
#power:not(.off) .switch-thumb{transform:translateX(20px)}
.power-caption{font-size:11px;white-space:nowrap}
.angle-group{display:flex;align-items:center;flex-direction:column;gap:2px;margin-top:0}
.angle-caption{font-size:10px;font-weight:700;line-height:1.1}
.angle-line{display:flex;align-items:center;gap:5px}
.angle-line>span{font-size:10px}
.angle-housing{width:54px}
.angle-thumb{width:24px;background:linear-gradient(90deg,#999d98,#f0f1e7 23%,#f7f8f2 70%,#aeb1a9);border-color:#999e99}
.angle-housing[data-position="1"] .angle-thumb{transform:translateX(12px)}
.angle-housing[data-position="2"] .angle-thumb{transform:translateX(25px)}
#angle{position:absolute;inset:-5px;width:calc(100% + 10px);height:calc(100% + 10px);opacity:0;font-size:16px;cursor:pointer}
#keys{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));column-gap:11px;row-gap:12px;padding:0 11.3%;margin-top:3px}
.keycell{min-width:0;position:relative;height:54px;display:flex;flex-direction:column;align-items:stretch;justify-content:end}
.legends{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:2px;white-space:nowrap;height:17px;min-height:17px;line-height:1;margin-bottom:3px;text-align:center;font:700 9px/1 Arial,Helvetica,sans-serif;letter-spacing:-.25px;text-shadow:0 1px 1px #151515}
.legends .yellow{color:var(--f)}.legends .blue{color:var(--k)}
.advanced-key .legends{font-size:7px;letter-spacing:-.55px;gap:1px}
.key{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;height:34px;min-height:34px;padding:0 0 2px;border:1px solid #a5aeab;border-bottom:4px solid #15191a;border-radius:4px;background:linear-gradient(#434a4c,#212a2e);color:#f7f6f4;font:700 17px/1 Arial,Helvetica,sans-serif;letter-spacing:0;cursor:pointer;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;box-shadow:0 2px 2px #0509097d,inset 0 1px 1px #ffffff29}
.key:active,.key.pressed{transform:translateY(2px);border-bottom-width:2px;box-shadow:inset 0 2px 3px #0008}
.key.number,.key[data-code="21"],.key[data-code="23"],.key[data-code="20"],.key[data-code="22"],.key[data-code="24"],.key[data-code="29"],.key[data-code="26"],.key[data-code="27"]{background:linear-gradient(#f5f3f0,#dedfdc 63%,#cdd1cc);color:#222833;border-color:#ebebdf;border-bottom-color:#545d60;box-shadow:0 2px 2px #0007,inset 0 1px #fff9}
.key.f{background:linear-gradient(#f6db47,#dfc02f);border-color:#ffe16a;border-bottom-color:#806d28;color:#181c20}
.key.k{background:linear-gradient(#70c8f3,#379bd9);border-color:#91d4ee;border-bottom-color:#246288;color:#f7fcff}
.key.clear{background:linear-gradient(#fa4b55,#e32532);color:white;border-color:#ff7870;border-bottom-color:#7d1921}
.key[data-code="35"],.key[data-code="37"],.key[data-code="36"],.key[data-code="34"],.key[data-code="32"],.key[data-code="30"],.key[data-code="31"],.key[data-code="33"]{font-size:13px;letter-spacing:-.5px}
.key.word-label{font-size:11px;letter-spacing:-.2px}
.key[data-code="23"]{font-size:25px;font-weight:500;line-height:1}
.register-letter{position:absolute;top:56px;left:0;right:0;text-align:center;font:10px/1 Arial,Helvetica,sans-serif;color:#e9e8e0;pointer-events:none}
.lower{height:14px;margin:18px 0 0;color:transparent;font-size:0}
.tools{display:flex;justify-content:center;gap:10px;margin:22px 2px 0}.tools button{background:#2a3231;color:#c2ceca;border:1px solid #4c5551;border-radius:4px;padding:9px 11px;font:12px Arial,Helvetica,sans-serif;cursor:pointer}
#status{min-height:19px;text-align:center;color:#90a29b;font-size:12px;margin:10px 0 20px}
details{border-top:1px solid #3f4947;padding:15px 6px 0;color:#b2c2bb;font:13px/1.6 system-ui,sans-serif}details summary{cursor:pointer;color:#e1e8e3}footer{text-align:center;color:#7d9087;font:11px/1.8 system-ui,sans-serif;margin:19px auto}a{color:#a7c8b4}
button:focus-visible,#angle:focus-visible{outline:2px solid #9aeacd;outline-offset:2px}
@media(max-width:360px){main{width:calc(100% - 10px);margin-top:6px}.top-housing{height:290px}.switches{padding:8px 28px 0}#keys{padding:0 10.5%;column-gap:9px}.key{font-size:16px}.legends{font-size:8px}.brand{gap:18px}.language-toggle{font-size:14px}.brand strong{font-size:16px}}
@media(prefers-reduced-motion:reduce){.key,.switch-thumb,.angle-thumb{transition:none}}


/* MK-61 hinged-in-the-hand guide: the calculator itself rotates, without a new page. */
.flip-scene{perspective:1400px;perspective-origin:50% 45%}
.flip-card{position:relative;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;transition:transform .72s cubic-bezier(.19,.64,.24,1);will-change:transform}
.flip-card.is-flipped{transform:rotateY(180deg)}
.flip-face{backface-visibility:hidden;-webkit-backface-visibility:hidden}
.flip-front{width:100%}
.model-flip{appearance:none;border:0;background:none;color:inherit;cursor:pointer;font:700 17px/1 Arial,Helvetica,sans-serif;letter-spacing:1px;text-shadow:inherit;padding:8px 0;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.model-flip:focus-visible,.back-model-flip:focus-visible{outline:2px solid #bceadd;outline-offset:3px}
.calculator-back{position:absolute;inset:0;display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:14px 18px 15px;transform:rotateY(180deg);background:linear-gradient(100deg,#222726 0%,#343a38 9%,#3c4140 50%,#2b312f 93%,#191e1c 100%);border:1px solid #4e5652;border-radius:7px 7px 12px 12px;clip-path:polygon(3.5% 0,96.5% 0,100% 34%,100% 100%,0 100%,0 34%);box-shadow:inset 2px 0 3px #a3c0b018,inset -3px 0 3px #080e0a8a}
.back-moulding{flex:0 0 auto;height:17px;margin:3px 8px 7px;border-radius:2px;background:repeating-linear-gradient(0deg,#1e2523 0 2px,#323936 2px 4px);border:1px solid #18211d;box-shadow:0 1px #69716b30}
.back-header{position:relative;flex:0 0 auto;padding:2px 15px 8px;color:#d8e0d8;text-shadow:0 1px #090d0c}
.back-brand{display:flex;align-items:center;justify-content:space-between;gap:9px;font:700 11px/1.4 Arial,Helvetica,sans-serif;letter-spacing:1px}
.back-brand span{white-space:nowrap}
.back-model-flip{appearance:none;border:0;background:none;padding:7px 0;cursor:pointer;color:#f1f1e9;font:700 17px/1 Arial,Helvetica,sans-serif;letter-spacing:1px;white-space:nowrap;touch-action:manipulation}
.back-header-sub{display:flex;justify-content:space-between;margin-top:1px;font:700 8px Arial,Helvetica,sans-serif;letter-spacing:2px;color:#a8b7ae}
.guide-scroll{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;background:#b5b3a3;border:4px solid #242c29;border-radius:3px;scrollbar-color:#69736b #dcdacb;scrollbar-width:thin;box-shadow:inset 0 2px 5px #0009,0 1px 0 #83908644}
.guide-scroll:focus-visible{outline:2px solid #a9f1d5;outline-offset:-3px}
.guide-paper{padding:17px 14px 26px;background:repeating-linear-gradient(0deg,#e9e6d9 0 3px,#ebe9df 3px 5px);color:#242c2b;font:12px/1.6 Arial,Helvetica,sans-serif;min-height:100%}
.guide-paper h1{font:700 19px/1.2 Arial,Helvetica,sans-serif;letter-spacing:.25px;margin:0 0 8px}
.guide-intro{font-size:11px;margin:0 0 16px;color:#49534c}
.guide-section{margin:0 0 16px;padding:0 0 13px;border-bottom:1px solid #bdc2b6}
.guide-section:last-child{border-bottom:0;margin-bottom:0}
.guide-section h2{display:flex;align-items:baseline;gap:8px;font:700 13px/1.3 Arial,Helvetica,sans-serif;margin:0 0 8px;letter-spacing:.1px}
.guide-section h2 span{color:#697769;font:700 11px Arial,Helvetica,sans-serif;min-width:20px}
.guide-paper p{margin:0 0 9px}
.guide-paper p:last-child{margin-bottom:0}
.guide-example{background:#d7d9ce;border-left:3px solid #6c887a;margin:10px 0;padding:7px 9px}
.guide-caption{display:block;color:#354943;font:700 10px Arial,Helvetica,sans-serif;letter-spacing:.2px;margin-bottom:5px}
.guide-paper kbd{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;vertical-align:baseline;background:#fcfcf7;border:1px solid #a2a9a1;border-bottom:2px solid #7d877f;border-radius:3px;color:#1e2d34;font:700 10px Arial,Helvetica,sans-serif;padding:2px 4px;min-width:17px;box-shadow:0 1px 1px #767e713b}
.guide-paper kbd.k-f{background:#f5e17e;border-color:#cabb63}
.guide-paper kbd.k-k{background:#9ecde6;border-color:#6ca6c6}
.guide-paper .key-sequence{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:1px 0 7px}
.guide-paper .key-sequence em{font:normal 10px Arial,Helvetica,sans-serif;color:#68756d}
.guide-result,.guide-result-inline{font:700 11px Arial,Helvetica,sans-serif;color:#315147}
.guide-result-inline{margin-left:2px}
.guide-steps{margin:4px 0 10px;padding-left:21px}
.guide-steps li{padding-left:2px;margin:0 0 7px}
.back-bottom{flex:0 0 auto;display:flex;justify-content:space-between;gap:4px;margin:7px 10px 0;color:#a6b1a9;font:700 8px Arial,Helvetica,sans-serif;letter-spacing:1px}
.back-screw{position:absolute;bottom:5px;width:9px;height:9px;background:radial-gradient(circle,#242c29 20%,#75827a 60%,#292f2d 75%);border-radius:50%;box-shadow:inset 0 0 2px #0008}
.back-screw:after{content:"";position:absolute;width:6px;top:4px;left:2px;border-top:1px solid #19211e;transform:rotate(35deg)}
.back-screw-left{left:9px}.back-screw-right{right:9px}
@media(max-width:360px){.model-flip{font-size:16px}.calculator-back{padding:10px 14px 13px}.back-header{padding:1px 12px 7px}.guide-paper{padding:14px 12px 22px;font-size:11.5px}.guide-paper h1{font-size:18px}}
@media(prefers-reduced-motion:reduce){.flip-card{transition:none}}


/* Complete natural / F / K reference, readable inside the printed reverse label. */
.ref-row-heading{margin:14px 0 6px;color:#425850;text-transform:uppercase;letter-spacing:.7px;font:700 9px/1.3 Arial,Helvetica,sans-serif}
.key-reference-list{display:grid;gap:7px;margin:0 0 12px}
.ref-key{background:#f6f4eb;border:1px solid #c4c8bb;border-left:3px solid #88978d;padding:8px 9px;box-shadow:0 1px 2px #666d6222}
.ref-key-label{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.guide-paper .ref-key-label kbd{font-size:12px;line-height:1.15;padding:3px 7px;white-space:normal;text-align:center}
.ref-key dl{margin:0;display:grid;gap:5px}
.ref-key dl>div{display:grid;grid-template-columns:38px minmax(0,1fr);gap:6px;align-items:start}
.ref-key dt{font-weight:700;font-size:10px;letter-spacing:.3px}
.ref-key dd{margin:0;font-size:11px;line-height:1.42}
.ref-key .ref-direct dt{color:#4e6358}
.ref-key .ref-f-line dt,.ref-f{color:#957719}
.ref-key .ref-k-line dt,.ref-k{color:#247499}
.ref-footnote{margin-top:12px;font-size:10px;color:#516157}


/* Full-screen pocket calculator: the reverse-side guide scrolls internally;
   the page itself does not. Preserve physical front proportions by scaling
   the whole device uniformly when mobile Safari's usable height is shorter. */
html,body{height:100%;height:100dvh;overflow:hidden;overscroll-behavior:none}
body{min-height:0}
main{height:100%;height:100dvh;margin:0 auto;padding-top:calc(env(safe-area-inset-top,0px) + 6px);padding-bottom:calc(env(safe-area-inset-bottom,0px) + 6px);overflow:hidden}
.flip-scene{height:var(--fitted-height,auto)}
.flip-card{transform-origin:50% 0;transform:scale(var(--fit-scale,1))}
.flip-card.is-flipped{transform:scale(var(--fit-scale,1)) rotateY(180deg)}
/* Utilities belong on the inside label, after the operating instructions. */
.guide-utilities{margin-top:16px;padding:13px 11px;background:#d9dbd0;border:1px solid #bbc3b8;border-radius:3px}
.guide-utilities h3{margin:0 0 8px;color:#2b423a;font:700 12px/1.3 Arial,Helvetica,sans-serif}
.guide-paper .guide-utilities p{margin:0 0 8px}
.guide-utilities .tools{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin:11px 0 6px}
.guide-utilities .tools button{min-height:36px;padding:8px 9px;border:1px solid #5c6a63;border-radius:3px;background:#34483f;color:#f8f8f1;font:700 11px Arial,Helvetica,sans-serif;touch-action:manipulation}
.guide-utilities .tools button:active{background:#50685b}
.guide-paper #status{min-height:16px;margin:5px 0 0;text-align:center;font:11px/1.4 Arial,Helvetica,sans-serif;color:#405c50}
.guide-credits{margin:13px 0 0;padding-top:9px;border-top:1px solid #bbc3b8;text-align:center;color:#5a675f;font:10px/1.6 Arial,Helvetica,sans-serif}
.guide-credits a{color:#245b4c}
@media(max-width:360px){main{margin:0 auto}}
@media(prefers-reduced-motion:reduce){.flip-card,.flip-card.is-flipped{transition:none}}
