:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --ink: #1c1917;
  --muted: #57534e;
  --accent: #0f766e;
  --err: #b91c1c;
  --ok: #047857;
  --line: #e7e5e4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 40%),
    linear-gradient(180deg, #faf7f2 0%, var(--bg) 100%);
  color: var(--ink);
  min-height: 100vh;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}

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

nav a { color: var(--accent); }

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

main:has(table) {
  max-width: none;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  table-layout: auto;
}

h1 {
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.lede, p { color: var(--muted); line-height: 1.5; }

.stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

label { display: grid; gap: 0.35rem; color: var(--ink); }

textarea,
input[type="email"],
input[type="password"],
input[type="text"] {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

textarea { resize: vertical; font-family: ui-monospace, monospace; font-size: 0.9rem; }

.buttonish {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
}

.status-done { color: var(--ok); }
.status-failed, .status-cancelled { color: var(--err); }
.status-queued, .status-processing, .status-downloading, .status-transcribing { color: var(--accent); }

.downloads a { white-space: nowrap; }
.muted { color: var(--muted); }

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  background: var(--accent);
  color: #fff;
}

.inline { display: inline; margin: 0; }
.inline button {
  background: transparent;
  color: var(--accent);
  padding: 0;
  text-decoration: underline;
}

.check {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.error { color: var(--err); }
.ok { color: var(--ok); }
.mono { word-break: break-all; font-family: ui-monospace, monospace; font-size: 0.9rem; }

.log-heading {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.progress-log {
  margin: 0;
  padding: 0.85rem 1rem;
  max-height: 18rem;
  overflow: auto;
  background: #1c1917;
  color: #e7e5e4;
  border-radius: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.actions {
  white-space: nowrap;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.job-rerun { margin-top: 1rem; }
.job-rerun button {
  background: var(--accent);
  color: #fff;
  padding: 0.45rem 0.9rem;
}
.rerun-hint { font-size: 0.9rem; margin-top: 0.35rem; }
.muted { color: var(--muted); }
