.calculator-terminal { width: min(1320px, calc(100% - 40px)); }
.calculator-page { padding: clamp(22px, 4vw, 52px); }
.calculator-intro { max-width: 740px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.calculator-intro h1 { margin: 0 0 7px; color: #f0f2ee; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -.06em; line-height: 1.1; }
.intro-mark { margin-left: .16em; color: var(--green); font-weight: 400; }
.calculator-intro > p:last-child { margin: 0; color: #9da79d; }
.calculator-layout { display: grid; grid-template-columns: minmax(320px, 465px) minmax(300px, 1fr); align-items: start; gap: clamp(24px, 5vw, 70px); }
.device { position: relative; width: 100%; max-width: 465px; padding: 30px 28px 34px; border: 1px solid #707681; border-radius: 24px 24px 40px 40px; background: linear-gradient(145deg, #5d6676 0%, #384354 35%, #253144 80%); box-shadow: inset 3px 3px 5px #ffffff24, inset -5px -5px 10px #1119278a, 0 16px 20px #0006, 0 38px 65px #0007; font-family: Arial, Helvetica, sans-serif; user-select: none; }
.device-brand { display: flex; justify-content: space-between; align-items: start; color: #f3f3ed; }
.device-brand span { font-weight: 800; font-size: 10px; line-height: 1.1; letter-spacing: -.04em; }
.device-brand strong { font-size: 24px; font-style: italic; letter-spacing: -.06em; }
.device-brand em { color: #c5d6de; font-style: normal; }
.device-subtitle { margin: -3px 0 12px; color: #ced2d3; font-size: 9px; letter-spacing: .26em; text-align: right; }
.solar { display: flex; width: 48%; height: 26px; margin: 0 0 18px auto; padding: 3px; border: 2px solid #1a2632; border-radius: 3px; background: #293344; box-shadow: inset 0 2px 4px #000b; }
.solar span { flex: 1; border-right: 1px solid #6e5948; background: linear-gradient(130deg, #403829, #1d1d20); }
.solar span:last-child { border: 0; }
.lcd { min-height: 128px; margin-bottom: 25px; padding: 11px 14px 10px; overflow: hidden; border: 5px solid #1a2530; border-radius: 7px; background: #b4c6ad; box-shadow: inset 3px 3px 8px #55645799, 1px 2px 2px #8291a5; color: #26362e; font-family: "Cascadia Code", Consolas, monospace; }
.lcd-indicators { display: flex; gap: 9px; min-height: 16px; font-size: 10px; font-weight: bold; }
.lcd-indicators span { opacity: .18; }
.lcd-indicators span.active, #angle-indicator { opacity: 1; }
#angle-indicator { margin-left: auto; }
.lcd-expression { height: 30px; overflow: hidden; white-space: nowrap; text-align: right; font-size: clamp(15px, 3vw, 21px); }
.lcd-result { min-height: 36px; overflow: hidden; white-space: nowrap; text-align: right; font-size: clamp(25px, 4vw, 34px); font-weight: 700; letter-spacing: -.04em; }
.lcd-message { height: 12px; font-size: 10px; font-weight: bold; letter-spacing: .08em; }
.keypad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px 9px; }
.key { position: relative; min-width: 0; height: 48px; padding: 5px 2px 2px; border: 1px solid #121925; border-bottom-width: 4px; border-radius: 9px 9px 12px 12px; background: linear-gradient(#eef1ee, #cbd1d3); box-shadow: inset 0 1px 1px #fff, 0 2px 3px #1117; color: #202a32; cursor: pointer; font-size: 17px; font-weight: 700; line-height: 1; }
.key small { position: absolute; top: -12px; left: 0; right: 0; color: #d5c795; font-size: 8px; font-weight: 700; line-height: 1; text-align: center; }
.key:active { transform: translateY(2px); border-bottom-width: 2px; }
.key:focus-visible, .calculator-sidebar button:focus-visible, .calculator-sidebar input:focus-visible, .calculator-sidebar select:focus-visible { outline: 2px solid #8de69b; outline-offset: 2px; }
.key-function { background: linear-gradient(#39485a, #273548); color: #edf0f3; font-size: 12px; }
.key-operator { background: linear-gradient(#9cabb9, #8494a5); }
.key-shift { background: linear-gradient(#d1a64e, #a57928); color: #1e2631; font-size: 14px; }
.key-clear { background: linear-gradient(#d77b69, #b55249); color: white; font-size: 13px; }
.key-equals { background: linear-gradient(#80c19e, #52a478); color: #10281d; font-size: 24px; }
.key.is-shifted { box-shadow: 0 0 0 2px #e4c46b, inset 0 1px 1px #fff; }
.calculator-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.side-card { min-width: 0; padding: 18px; border: 1px solid #303b34; border-radius: 6px; background: #111713; }
.card-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid #303b34; }
.card-heading h2 { margin: 0 0 10px; color: #e9ede7; font-size: 14px; letter-spacing: .08em; }
.card-heading span { color: #738073; font-size: 10px; white-space: nowrap; }
.card-note, .note-card p { margin: 0 0 13px; color: #a4aea4; font-size: 12px; line-height: 1.55; }
.segmented { display: flex; gap: 2px; padding: 3px; border: 1px solid #343f36; border-radius: 5px; background: #0b100c; }
.segmented button { flex: 1; min-width: 0; padding: 6px 1px; border: 0; border-radius: 3px; background: transparent; color: #879387; cursor: pointer; font-size: 11px; }
.segmented button[aria-pressed="true"] { background: #274932; color: #9af0aa; }
.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; color: #a4aea4; font-size: 12px; }
.settings-row select { width: 80px; padding: 4px; border: 1px solid #455248; border-radius: 3px; background: #1b251e; color: #d9e5d9; font: inherit; }
.memory-list { display: grid; gap: 5px; }
.memory-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 5px; }
.memory-row button { overflow: hidden; padding: 3px 5px; border: 1px solid #334036; border-radius: 3px; background: #0c110e; color: #cad6c9; cursor: pointer; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.memory-row button:first-child { color: var(--yellow); text-align: center; }
.text-control { margin-top: 12px; padding: 0; border: 0; border-bottom: 1px dashed currentColor; background: transparent; color: #8fbd9a; cursor: pointer; font-size: 11px; }
.stats-card { grid-column: 1 / -1; }
.stat-form { display: flex; align-items: end; gap: 8px; margin-top: 14px; }
.stat-form[hidden], #clear-stats[hidden] { display: none; }
.stat-form label { display: grid; flex: 1; gap: 3px; color: #9baa9c; font-size: 11px; }
.stat-form input { width: 100%; min-width: 0; padding: 6px; border: 1px solid #405044; border-radius: 3px; background: #0b100c; color: white; }
.stat-form button { padding: 7px 11px; border: 1px solid #5c9969; border-radius: 3px; background: #31563a; color: #d9f5de; cursor: pointer; font-size: 11px; }
.stat-data { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.stat-data button { padding: 4px 7px; border: 1px solid #36453a; border-radius: 3px; background: #1a241c; color: #b6c2b7; cursor: pointer; font-size: 11px; }
.stat-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 10px; margin-top: 13px; }
.stat-result { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px solid #283329; color: #89a48e; font-size: 11px; }
.stat-result strong { overflow: hidden; color: #d3dfd2; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
kbd { padding: 1px 4px; border: 1px solid #455046; border-radius: 3px; color: #e7e8e5; font: inherit; }
.accuracy-note { max-width: 900px; margin: 30px 0 0; padding-top: 15px; border-top: 1px solid var(--border); color: #8c988e; font-size: 11px; }
@media (max-width: 1050px) { .calculator-sidebar { grid-template-columns: 1fr; } .stats-card { grid-column: auto; } .stat-results { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .calculator-terminal { width: 100%; margin: 0; border: 0; border-radius: 0; } .calculator-layout { grid-template-columns: 1fr; justify-items: center; } .calculator-sidebar { width: 100%; max-width: 465px; grid-template-columns: 1fr; } .calculator-page { padding: 24px 14px 40px; } .device { padding: 28px 22px 32px; } .keypad { gap: 11px 6px; } .key { height: 45px; } }
