:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: #ddd6c8;
  --paper: #f4f1ea;
  --card: #fffdf8;
  --green: #1f4d3a;
  --green-ink: #f4f7f4;
  --alert: #8c2f2f;
  --alert-bg: #f8ece8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 ui-sans-serif, "Segoe UI", sans-serif;
}

a { color: var(--green); }

header.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 1.2rem;
  background: var(--green);
  color: var(--green-ink);
}

header.top a { color: var(--green-ink); text-decoration: none; }

.brand { font-weight: 650; }

nav { display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; }

nav form { margin: 0; }

nav button, button, .button {
  font: inherit;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  text-decoration: none;
  cursor: pointer;
}

button[type="submit"], .button {
  background: var(--green);
  color: var(--green-ink);
  border-color: var(--green);
}

button.danger { background: var(--alert); border-color: var(--alert); color: white; }

main { max-width: 920px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }

h1 { font-size: 1.6rem; margin: 0 0 0.6rem; }

h2 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }

.lede, .hint { color: var(--muted); }

.row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }

.stack { display: grid; gap: 0.7rem; max-width: 36rem; }

label { display: grid; gap: 0.25rem; font-weight: 600; }

input, select, textarea {
  font: inherit;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
}

textarea { width: 100%; }

.transcript {
  white-space: pre-wrap;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.8rem;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  min-height: 12rem;
}

.alert, .flash {
  background: var(--alert-bg);
  border: 1px solid #e2c8c0;
  padding: 0.7rem 0.8rem;
  border-radius: 4px;
}

.flash { background: #e7f0ea; border-color: #c5d9cc; }

table { width: 100%; border-collapse: collapse; background: var(--card); }

th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }

dl { display: grid; grid-template-columns: 12rem 1fr; gap: 0.25rem 0.8rem; }

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

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }

.exports { display: flex; gap: 0.8rem; }

.danger-zone { margin-top: 2rem; }

code { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 0.92em; }

@media (max-width: 720px) {
  .split, dl { grid-template-columns: 1fr; }
  header.top { align-items: flex-start; flex-direction: column; }
}
