*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--ttl-bg);
  min-height: 100dvh;
}

#app {
  position: relative;
  z-index: 1;
}


h1, h2, h3, h4, p {
  margin: 0;
}

a {
  color: var(--text);
  text-underline-offset: 0.15em;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 1px solid var(--ttl-border);
  background: var(--ttl-surface);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

textarea,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select {
  width: 100%;
  background-color: var(--ttl-bg);
  color: var(--text);
  border: 1px solid var(--ttl-border);
  border-radius: 0;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.4;
  caret-color: var(--accent);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

select option {
  background-color: var(--ttl-header);
  color: var(--text);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  cursor: pointer;
}

textarea::placeholder,
input::placeholder {
  color: var(--text-faint);
  opacity: 1;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-border);
}

input[type="text"],
input[type="search"],
input[type="password"] {
  font-family: var(--font-mono);
}

button:focus-visible,
a:focus-visible {
  outline: 1px solid var(--color-ring);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
}

kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0.1em 0.4em;
  border-radius: 0;
  background: var(--ttl-surface);
  border: 1px solid var(--ttl-border);
  color: var(--text-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background: rgba(108, 182, 255, 0.25);
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
