/* Reset and shared controls. */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body { margin: 0; min-height: 100vh; min-height: 100dvh; overflow-wrap: break-word; }

[hidden] { display: none !important; }

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

button {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

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

.icon { display: block; }

/* A square, bordered button; `.button-quiet` drops the border. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}
.button:active { background: var(--wash); }
.button[disabled] { opacity: 0.45; cursor: default; }
.button-quiet { border-color: transparent; color: var(--ink-2); }
.button-danger { border-color: var(--seal); color: var(--seal); }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
}
.icon-button:active { background: var(--wash); }

.meter { height: 3px; background: var(--wash); margin-top: 10px; }
.meter-fill { height: 100%; background: var(--indigo); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
