/* Base: reset, typography, focus outlines and small utilities shared by every screen. */

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

* {
  box-sizing: border-box;
}

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

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
  opacity: .6;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  font-size: var(--text-heading);
  letter-spacing: -.3px;
  font-weight: 600;
}

h3 {
  font-size: var(--text-subheading);
}

small {
  font-size: var(--text-small);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: var(--text-small);
}

.block {
  display: block;
  margin-top: 5px;
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

th {
  padding: 12px 16px;
}

td {
  padding: 12px 16px;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
}

h1,
h2,
h3 {
  color: inherit;
}

h1 {
  font-size: var(--text-title);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.03em;
}

input,
select,
textarea {
  border: 1px solid var(--ok-bg);
  background: white;
  padding: 11px var(--space-3);
  min-width: 0;
  width: 100%;
  font-size: var(--text-input);
  line-height: 1.5;
  min-height: var(--control-height);
  color: var(--ink);
  border-color: var(--line);
  border-radius: var(--radius);
}

input::placeholder {
  color: var(--muted);
}

label {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-label);
  margin-bottom: 19px;
  color: var(--ink);
  font-weight: 500;
}

th {
  border-bottom: 1px solid var(--line);
}

td {
  border-bottom: 1px solid var(--ok-bg);
  font-size: var(--text-body);
  color: var(--muted);
  border-color: var(--surface-3);
}

td strong {
  font-size: var(--text-body);
  color: var(--ink);
  font-weight: 600;
}

input[type=submit] {
  font-size: var(--text-control);
  cursor: pointer;
}

input[type=submit]:disabled {
  opacity: .5;
  cursor: default;
}

[hidden] {
  display: none !important;
}

turbo-frame {
  display: contents;
}

button[disabled] {
  opacity: .5;
}

form {
  margin: 0;
}

@media (max-width: 700px) {
  th,
  td {
    padding: 14px var(--space-4);
  }
}

textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { min-height: 0; flex-shrink: 0; accent-color: var(--blue); }
input[type=hidden] { min-height: 0; }
fieldset { min-width: 0; }
legend { font-size: var(--text-label); font-weight: 700; }
button, input, select, textarea { max-width: 100%; }
