* { box-sizing: border-box; }
:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #263c35; background: #f4f5f0; font-synthesis: none; }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: radial-gradient(ellipse at 50% 32%, #e7eee1 0, transparent 58%); }
button, input { font: inherit; }
.brand { display: flex; align-items: center; gap: 11px; padding: 26px 36px; font-size: 16px; font-weight: 650; letter-spacing: -.4px; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: #2e5544; color: #f7f9ef; font-size: 25px; padding-bottom: 5px; }
.brand-detail { color: #7d8980; font-weight: 400; }
main { width: min(100% - 32px, 410px); margin: 18px auto 0; }
.intro { text-align: center; margin-bottom: 29px; }
.eyebrow { font-size: 10px; letter-spacing: 2.2px; font-weight: 700; color: #6f846d; }
h1 { margin: 12px 0 10px; font-size: clamp(32px, 7vw, 42px); font-weight: 560; letter-spacing: -1.9px; }
.intro > p:last-child { font-size: 14px; color: #78857b; margin: 0; }
.calculator { padding: 20px; border: 1px solid #fff; border-radius: 28px; background: #ffffffed; box-shadow: 0 14px 38px #364f3710, 0 2px 5px #364f3706; }
.display { min-height: 146px; padding: 19px 18px 12px; border: 1px solid #e3e9dd; border-radius: 17px; background: #f1f5eb; }
.display-heading { display: flex; justify-content: space-between; align-items: center; font-size: 9px; letter-spacing: 1.8px; color: #7c8d73; font-weight: 650; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #92ac7f; }
#expression { width: 100%; margin-top: 13px; padding: 0; background: none; border: 0; border-radius: 3px; text-align: right; color: #718366; font-size: 17px; outline-offset: 4px; }
#expression::placeholder { color: #8c9a83; }
#result { display: block; overflow-wrap: anywhere; text-align: right; font-size: 43px; font-weight: 500; line-height: 1.3; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
#result.compact { font-size: 30px; }
#message { min-height: 15px; margin: 5px 0 0; color: #98402d; font-size: 11px; text-align: right; }
.keypad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 17px; }
button { border: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; color: #34463b; background: #f5f6f2; border-radius: 13px; min-height: 54px; font-size: 21px; font-weight: 500; transition: background 100ms, transform 100ms; }
button:hover { background: #eaeee5; }
button:active { transform: scale(.95); }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #41755a; outline-offset: 3px; }
button svg { width: 22px; height: 22px; vertical-align: middle; }
.utility { font-size: 17px; background: #eef0e9; color: #71806b; }
.clear { color: #526f46; font-size: 15px; font-weight: 700; }
.operator { background: #e4eddc; color: #50733f; font-size: 25px; }
.operator:hover { background: #d5e4c9; }
.equals { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 21px; margin-top: 2px; background: #315841; color: #f4f8ee; }
.equals:hover { background: #254b34; }
.equals span:first-child { font-size: 13px; font-weight: 550; letter-spacing: .2px; }
.equals span:last-child { font-size: 28px; }
.previous { margin: 16px 4px 0; color: #8a9486; font-size: 11px; text-align: center; overflow-wrap: anywhere; }
.keyboard-hint { display: flex; align-items: center; justify-content: center; gap: 7px; color: #8b9685; font-size: 10px; margin: 20px 0 0; }
kbd { font: inherit; border: 1px solid #dce2d5; border-radius: 5px; padding: 3px 5px; background: #ffffff55; }
.keyboard-hint > span { margin: 0 5px; }
.help { margin: 17px 7px 0; color: #7d8a75; font-size: 11px; }
.help summary { text-align: center; cursor: pointer; }
.help p { line-height: 1.7; }
footer { margin: 35px 16px 24px; text-align: center; font-size: 10px; color: #9ba491; letter-spacing: .2px; }
@media (max-width: 480px) { .brand { padding: 20px; } main { margin-top: 10px; } .intro { margin-bottom: 23px; } .calculator { padding: 16px; border-radius: 24px; } .keypad { gap: 8px; } button { min-height: 52px; } }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
