:root {
  color-scheme: light;
  --paper: #eeeee8;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
body {
  display: grid;
  justify-items: center;
  min-width: 250px;
  margin: 0;
  padding: 20px;
  background: var(--paper);
  font-family: var(--sans);
}
button { font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.calculator { width: min(100%, 350px); padding: 17px 15px 19px; border: 4px solid #345b72; border-bottom-width: 6px; border-radius: 16px 16px 20px 20px; background: linear-gradient(145deg,#252b2e,#1e2327 72%); box-shadow: 0 18px 28px -14px #23382e8c, 0 5px 8px -4px #16292166, inset 0 1px 0 #ffffff30, 0 0 0 1px #203944; color: #eef6fc; user-select: none; }
.model { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #8ac1e4; font-size: 20px; font-weight: 700; letter-spacing: -.035em; }
.model h1 { margin: 0; font: inherit; }
.model-suffix { font-weight: 500; }
.ti-name { color: #a5afb4; font: 600 7px/1.08 var(--mono); letter-spacing: .08em; text-align: right; }
.solar { display: grid; grid-template-columns: repeat(4, 1fr); height: 23px; margin-top: 11px; margin-bottom: 9px; border-radius: 3px; overflow: hidden; border: 2px solid #14191b; background: linear-gradient(110deg,#49372f,#352c2b 58%,#493733); box-shadow: inset 0 2px 4px #141111b3; }
.solar i + i { border-left: 1px solid #695041; }
.screen { height: 63px; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 9px; border: 3px solid #151a1d; border-radius: 4px; background: linear-gradient(120deg,#b8c6a6,#ced9b9); color: #28342a; box-shadow: inset 0 2px 5px #253c304d, 0 1px 0 #626967; }
.indicators { display: flex; align-items: center; gap: 5px; min-height: 17px; font: 700 9px var(--mono); letter-spacing: .045em; white-space: nowrap; }
.shift-indicator { padding: 2px 4px; border-radius: 2px; background: #2b3c2d; color: #eaf5d9; font-size: 11px; }
.pending-result { margin-left: auto; color: #293a2a; }
.readout { display: flex; justify-content: flex-end; align-items: baseline; gap: 7px; line-height: 1; margin: 0; }
#display { display: block; white-space: nowrap; font: 650 clamp(19px, 7vw, 30px)/1 var(--mono); letter-spacing: -.08em; }
.exponent { font: 600 14px var(--mono); }
.keys { margin-top: 11px; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); column-gap: 7px; row-gap: 4px; }
.key-cell { min-width: 0; display: grid; grid-template-rows: 12px 36px; row-gap: 2px; }
.key-secondary { color: #8cc7ed; text-align: center; font: 650 10px/12px var(--sans); white-space: nowrap; }
.key { display: grid; place-items: center; min-width: 0; width: 100%; padding: 0; border: 1px solid #12171b; border-radius: 5px; background: linear-gradient(#444d53,#30383f); color: #fcfdfd; font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: inset 0 1px 0 #ffffff2e, 0 2px 0 #090c0e; }
.key.numeric { color: #162530; background: linear-gradient(#dfe8ee,#c1cfd8); font-size: 17px; box-shadow: inset 0 1px 0 #ffffffa8, 0 2px 0 #090c0e; }
.key.operator { background: linear-gradient(#6e7b84,#56646d); font-size: 18px; }
.key.special { background: linear-gradient(#71b6e1,#5195c4); color: #122831; box-shadow: inset 0 1px 0 #bce3ff8a, 0 2px 0 #090c0e; }
.key:focus-visible { outline-color: #a6d7f7; outline-offset: 2px; }
@media (hover:hover) { .key:hover { filter: brightness(1.18); } }
.key:active, .key.is-pressed { transform: translateY(2px); box-shadow: inset 0 2px 4px #15191d80; filter: brightness(1.12); }
.key[aria-pressed="true"] { background: #c6e8fa; outline: 1px solid #9cc5da; }
.calculator.shift-on .key-secondary:not(:empty) { color: #e0f4ff; background: #40596a; border-radius: 3px; }
.no-script { margin-bottom: 0; font-size: 13px; }
.stage { display: grid; place-items: center; width: 100%; min-height: calc(100vh - 40px); min-height: calc(100svh - 40px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
main { width: 100%; }
.guide { width: min(100%, 680px); margin: 28px auto 12px; color: #26302b; font-size: 16px; line-height: 1.6; }
.guide h2 { margin: 40px 0 10px; font-size: 22px; line-height: 1.25; letter-spacing: -.01em; color: #1d2a33; }
.guide h3 { margin: 22px 0 4px; font-size: 17px; color: #1d2a33; }
.guide p, .guide ul { margin: 0 0 12px; }
.guide ul { padding-left: 22px; }
.guide kbd { padding: 1px 5px; border: 1px solid #b9c0bd; border-bottom-width: 2px; border-radius: 4px; background: #fbfbf8; font: 600 .86em var(--mono); white-space: nowrap; }
.guide table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 15px; }
.guide th, .guide td { padding: 7px 8px; border-bottom: 1px solid #d3d6cf; text-align: left; vertical-align: top; }
.guide th { font-weight: 650; }
.guide details { border-bottom: 1px solid #d3d6cf; padding: 10px 0; }
.guide summary { cursor: pointer; font-weight: 650; color: #1d2a33; }
.guide details p { margin: 8px 0 0; }
.guide .note { margin-top: 32px; font-size: 13px; color: #5b6560; }
/* Ad column on the left. Only on wide screens, so it never covers or pushes the keys. */
.ad-rail { display: none; }
@media (min-width: 1100px) {
  .ad-rail.is-active { display: block; position: fixed; top: 50%; left: max(24px, calc(50% - 372px - 160px)); width: 160px; transform: translateY(-50%); }
  .ad-slot { width: 160px; height: 600px; }
}
@media (min-width: 1340px) {
  .ad-rail.is-active { left: max(24px, calc(50% - 372px - 300px)); width: 300px; }
  .ad-slot { width: 300px; height: 600px; }
}
.ad-label { margin: 0 0 4px; color: #7b847f; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.ad-slot { overflow: hidden; }
.ad-slot.is-placeholder { display: grid; place-items: center; border: 2px dashed #b9c0bd; border-radius: 8px; color: #7b847f; font-size: 13px; text-align: center; }
@media (max-width: 350px) {
  body { padding-inline: 12px; }
  .calculator { padding-inline: 10px; }
  .key-secondary { font-size: 9px; }
  .keys { column-gap: 5px; }
}
.lang-switch { position: absolute; top: 12px; right: 16px; font-size: 14px; }
.lang-switch a { color: #2f6f99; text-decoration: none; padding: 4px 8px; border-radius: 4px; }
.lang-switch a:hover, .lang-switch a:focus-visible { background: #dfe3dc; text-decoration: underline; }
