h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-variation-settings: "wdth" 92;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-1); }
p { max-width: var(--measure); margin: 0 0 var(--s-4); }
a { color: var(--accent); }

.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.mono { font-family: var(--mono); font-size: var(--step--1); }

/* Tables: one left edge, ruled rows, no boxes. */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th {
  text-align: left;
  font-weight: 500;
  font-size: var(--step--1);
  color: var(--muted);
  padding: 0 var(--s-4) var(--s-2) 0;
  border-bottom: 1px solid var(--rule-firm);
  white-space: nowrap;
}
td {
  padding: var(--s-3) var(--s-4) var(--s-3) 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th:last-child, td:last-child { padding-right: 0; }
.figure, .money { text-align: right; font-family: var(--mono); font-size: var(--step--1); white-space: nowrap; }
.actions { white-space: nowrap; }
.empty {
  color: var(--muted);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}

/* Buttons carry verbs. */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--s-4);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn--outline { background: transparent; color: var(--accent); }
.btn--outline:hover { background: var(--accent-dim); filter: none; }
.btn--small { min-height: 2rem; padding: 0 var(--s-3); font-size: var(--step--1); }

/* Badges carry status words. */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  color: var(--muted);
  white-space: nowrap;
}
.badge--accent { color: var(--accent); }
.badge--owing { color: var(--owing); }

/* Forms: labels above fields, fields on the grid. */
.form { max-width: var(--measure); }
.field { margin: 0 0 var(--s-4); }
.field label {
  display: block;
  font-size: var(--step--1);
  color: var(--muted);
  margin-bottom: var(--s-1);
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--rule-firm);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.field textarea { min-height: 9rem; line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field .hint { margin: var(--s-1) 0 0; font-size: var(--step--1); color: var(--muted); }
.form__actions { display: flex; gap: var(--s-2); align-items: center; margin-top: var(--s-5); }
.errors { color: var(--owing); margin: 0 0 var(--s-4); }

.inline-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr 1fr auto;
  gap: var(--s-2);
  align-items: end;
  padding: var(--s-3) 0 0;
}
.inline-form .field { margin: 0; }
@media (max-width: 46rem) { .inline-form { grid-template-columns: 1fr 1fr; } }

.flash {
  max-width: var(--measure);
  margin: 0 0 var(--s-5);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule);
  color: var(--accent);
}
.flash--alert { color: var(--owing); }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-5);
  margin: 0 0 var(--s-5);
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--muted);
}
.facts b { color: var(--ink); font-weight: 500; }

.link-cell { max-width: 22rem; }
.link-cell input {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--muted);
}

.footnote { margin: var(--s-3) 0 var(--s-5); font-size: var(--step--1); color: var(--muted); max-width: var(--measure); }

/* Reviewing what someone said: the audio, then the words. */
.playback { margin: 0 0 var(--s-4); }
.playback audio { width: 100%; max-width: var(--measure); display: block; }
.playback__meta {
  margin: var(--s-2) 0 0;
  font-size: var(--step--1);
  color: var(--muted);
}
.playback__meta--failed { color: var(--owing); }

.said {
  margin: 0 0 var(--s-4);
  padding: 0 0 0 var(--s-4);
  border-left: 2px solid var(--rule-firm);
  max-width: var(--measure);
}
.said p { margin: 0 0 var(--s-2); }
.said__meta { font-size: var(--step--1); color: var(--faint); margin: 0; }
