/* TI-30XS style scientific calculator — graphingcalculator.dev
   Compact blue body, two-line LCD, hardware-style keypad.
   No external fonts or images — system fonts + CSS only. */


.ti30-device {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  max-width: 340px;
  margin: 0 auto;
  color: #1f2937;
}
.ti30-body {
  background: linear-gradient(180deg, #2b4a6f 0%, #24405f 45%, #1a2f47 100%);
  border: 1px solid #0b1622;
  border-radius: 20px;
  padding: 16px 14px 18px;
  box-shadow:
    0 28px 50px -16px rgba(0, 0, 0, .7),
    0 6px 14px rgba(0, 0, 0, .45),
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -2px 0 rgba(0, 0, 0, .5);
}
.ti30-brand {
  text-align: center;
  color: #cfe0f0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 2px 0 10px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .6);
}
.ti30-display {
  position: relative;
  background: linear-gradient(180deg, #e6ebdd, #dbe3d0);
  border: 1px solid #0b1622;
  border-radius: 8px;
  padding: 10px 12px 8px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .25);
  font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  text-align: right;
}
.ti30-deg {
  position: absolute;
  top: 6px;
  left: 8px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #334155;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(15, 23, 42, .25);
  border-radius: 5px;
  padding: 2px 6px;
  cursor: pointer;
}
.ti30-expr {
  font-size: 15px;
  color: #475569;
  min-height: 20px;
  white-space: nowrap;
  overflow-x: auto;
  padding-left: 40px;
}
.ti30-result {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  min-height: 34px;
  white-space: nowrap;
  overflow-x: auto;
}
.ti30-frac {
  font-size: 13px;
  color: #475569;
  min-height: 18px;
  white-space: nowrap;
  overflow-x: auto;
}
.ti30-keypad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.ti30-key {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, .55);
  cursor: pointer;
  padding: 3px 2px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    inset 0 -2px 0 rgba(0, 0, 0, .25),
    0 2px 0 rgba(0, 0, 0, .4),
    0 3px 5px rgba(0, 0, 0, .3);
}
.ti30-key.fn {
  background: linear-gradient(#4a5568, #374151 60%, #2b3442);
  color: #f2f4f8;
}
.ti30-key.num {
  background: linear-gradient(#fdfdfb, #f2f2ee 55%, #d9d9d3);
  color: #14181f;
  border-color: rgba(0, 0, 0, .4);
}
.ti30-key.eq {
  background: linear-gradient(#3f83f5, #2f6fed 55%, #2357c6);
  color: #fff;
  font-size: 17px;
}
.ti30-key.wide { grid-column: span 2; }
.ti30-key.active {
  background: linear-gradient(#f9d63f, #f5c518 55%, #d9a514);
  color: #241a00;
}
.ti30-key.pressed,
.ti30-key:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .25),
    inset 0 -1px 0 rgba(0, 0, 0, .2),
    0 0 0 rgba(0, 0, 0, .4),
    0 1px 2px rgba(0, 0, 0, .3);
}
.ti30-key:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}
.ti30-note {
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0 0;
}

@media (max-width: 480px) {
  .ti30-key { min-height: 44px; }
}
