*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

#app {
  height: 100%;
}

h1,
h2,
h3 {
  text-wrap: balance;
  margin: 0;
}

p {
  text-wrap: pretty;
  margin: 0;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-m);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus {
  outline: none;
}

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

.num {
  font-variant-numeric: tabular-nums;
}

.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;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--hit);
  padding: 0 14px;
  border-radius: var(--r-m);
  border: 1px solid transparent;
  font-weight: 580;
  font-size: var(--fs-m);
  letter-spacing: 0.003em;
  white-space: nowrap;
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.btn svg {
  flex: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
  background: var(--accent-active);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--hairline);
  color: var(--ink);
  box-shadow: 0 1px 1px rgb(31 27 23 / 0.04);
}

.btn-secondary:hover:not(:disabled) {
  border-color: #cdc5bb;
  background: #fffdfb;
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
}

.btn-quiet:hover:not(:disabled) {
  background: var(--subtle);
}

.btn-icon {
  width: var(--hit);
  padding: 0;
}

.btn-small {
  min-height: 30px;
  padding: 0 11px;
  font-size: var(--fs-s);
  border-radius: 8px;
}

.btn-large {
  min-height: 46px;
  padding: 0 22px;
  font-size: var(--fs-l);
  border-radius: 11px;
}

.btn-danger:hover:not(:disabled) {
  color: var(--danger);
}

.btn:disabled {
  cursor: default;
  opacity: 0.4;
}

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent-text);
  font-weight: 580;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.link:hover {
  color: var(--ink);
}

.spin {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
