:root {
  --bg: #fbfaf7;
  --fg: #1e1b16;
  --muted: #6b6459;
  --accent: #b4531f;
  --border: #e4ded2;
  --max: 46rem;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.6 -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
main { max-width: var(--max); margin: 2rem auto; padding: 0 1rem; }
a { color: var(--accent); }

.site-header, .site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.site-header { border-bottom: 1px solid var(--border); }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; margin-top: 3rem; }
.brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; }
nav { display: flex; gap: 1rem; align-items: center; }

.course-list { list-style: none; padding: 0; }
.course-list li { border-bottom: 1px solid var(--border); }
.course-list a { display: flex; gap: 1rem; padding: .75rem 0; text-decoration: none; }
.course-list .date { color: var(--muted); font-variant-numeric: tabular-nums; }
.course-title { color: var(--fg); }

.course header h1 { margin-bottom: .2rem; }
.meta { color: var(--muted); margin-top: 0; }
.course-body { margin: 1.5rem 0; }
.course-body :is(h1,h2,h3) { line-height: 1.3; }

.admin-actions, .form-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.course-form label { display: block; margin-bottom: 1rem; font-weight: 600; }
.course-form input, .course-form textarea {
  width: 100%; margin-top: .3rem; padding: .5rem;
  font: inherit; border: 1px solid var(--border); border-radius: 4px; background: #fff;
}
.course-form textarea { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.hint { font-weight: 400; color: var(--muted); }

button, .linkbtn {
  font: inherit; cursor: pointer; padding: .5rem .9rem;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 4px;
}
.linkbtn { border: none; background: none; color: var(--accent); padding: 0; }
button.danger { background: #fff; color: #a11; border-color: #a11; }
form.inline { display: inline; margin: 0; }

.errors { color: #a11; background: #fdecec; border: 1px solid #f3caca; padding: .5rem 1rem; border-radius: 4px; }
.empty { color: var(--muted); }
