/* ENGFlow base: reset, type, and the small component set every demo reuses. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* small uppercase monospace label, used for chrome-like captions */
.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

/* pressable button with a hard offset shadow */
.btn {
  --accent: var(--lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: none;
}

.btn--solid {
  background: var(--accent);
  color: #0a0d12;
}

.btn--ghost {
  --accent: var(--text);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* form controls that look like spreadsheet cells */
.cell-input,
.cell-select {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  background: #0a0f15;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
}

.cell-input:focus,
.cell-select:focus {
  outline: 2px solid var(--lime);
  outline-offset: 0;
  border-color: var(--lime);
}

.kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.sticker {
  display: inline-block;
  padding: 3px 10px;
  border: 2px solid var(--lime);
  border-radius: 6px;
  background: #0a0d12;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  transform: rotate(-2deg);
}

/* white page that mimics a Word sheet inside the dark UI */
.paper {
  background: var(--paper);
  color: var(--ink);
  font-family: "Times New Roman", Times, serif;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
