/* Direction: Graphite Keypad — graphite panels, electric lime accent, mono numerals */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  color-scheme: dark;
  --canvas: #0f1216;
  --surface: #272a2d;
  --surface-2: #1b1e22;
  --border: #313337;
  --border-strong: #57595c;
  --ink: #eef2f7;
  --muted: #95989d;
  --accent: #c8f14a;
  --accent-hover: #d0f365;
  --accent-ink: #0f1216;
  --accent-text: #d6f86d;
  --accent-strong: #c8f14a;
  --accent-soft: #384321;
  --accent-border: #62762d;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #102a1f;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #332013;
  --warning-strong: #c57a40;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #341417;
  --danger-strong: #d16969;
  --chart-1: #c8f14a;
  --chart-2: #25dac5;
  --chart-3: #7dc6fd;
  --chart-4: #ec99fe;
  --chart-5: #fba2a1;
  --chart-6: #f3b014;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius-card: 20px;
  --radius-btn: 14px;
  --display-tracking: -0.02em;
  --font-sans: "Inter", system-ui, sans-serif;
  --display-weight: 700;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="light"] {
  color-scheme: light;
  --canvas: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --border: #dddede;
  --border-strong: #b7b8b9;
  --ink: #0f1216;
  --muted: #66686a;
  --accent: #a9cc3f;
  --accent-hover: #90ad36;
  --accent-ink: #0f1216;
  --accent-text: #5e7123;
  --accent-strong: #5e7123;
  --accent-soft: #f3f8e4;
  --accent-border: #d8e8a9;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #e3f0e8;
  --success-strong: #137638;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f6eae1;
  --warning-strong: #a64c08;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f7e4e4;
  --danger-strong: #b91c1c;
  --chart-1: #809e12;
  --chart-2: #16a291;
  --chart-3: #157fbe;
  --chart-4: #ab7ee6;
  --chart-5: #bb466e;
  --chart-6: #cf7c1d;
}

/* The keypad and the tape — this app's own screen. */

.keypad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
}

.key {
  @apply flex h-14 select-none items-center justify-center rounded-[var(--radius-btn)] border border-border bg-surface-2 font-mono text-xl text-ink;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

@media (min-width: 640px) {
  .key {
    @apply h-16 text-2xl;
  }
}

.key:hover {
  background-color: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  border-color: var(--accent);
}

.key:active {
  transform: translateY(2px);
}

.key:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.key-op {
  color: var(--accent-text);
}

.key-fn {
  @apply text-base;
  color: var(--muted);
}

.key-eq {
  background-color: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

.key-eq:hover {
  background-color: var(--accent);
  filter: brightness(1.08);
}

.tape {
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(127, 127, 127, 0.08) 0 1px,
    transparent 1px 30px
  );
}

@keyframes calc-pop {
  0% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.calc-pop {
  animation: calc-pop 0.18s ease-out;
}

html.reduced-motion .key {
  transition: none;
}

html.reduced-motion .calc-pop {
  animation: none;
}
