/*
 * One stylesheet for the whole site. Plain on purpose: the people reading it
 * are teachers between lessons, often on a phone, and parents opening a link,
 * and both want to find the button, not admire the page.
 */
:root {
  color-scheme: light dark;
  --ink: #16212b;
  --bg: #fbfaf7;
  --panel: #ffffff;
  --line: #e2dfd7;
  --muted: #5c6670;
  --accent: #3d4fa3;
  --accent-ink: #ffffff;
  --warn: #9a5b00;
  --bad: #b3261e;
  --good: #1e7a3a;
  --soft: #eef0f8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8ece9; --bg: #111317; --panel: #181b21; --line: #2b2f38; --muted: #a0a6b2;
    --accent: #9aa8f0; --accent-ink: #12173a; --warn: #e3a64a; --bad: #f08a80; --good: #6fcf97; --soft: #1a1e2e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }
h1 { font-size: clamp(28px, 4.5vw, 42px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 21px; letter-spacing: -0.01em; margin: 36px 0 10px; }
h3 { font-size: 17px; margin: 0 0 6px; }

.masthead {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  max-width: 1080px; margin: 0 auto; padding: 18px 22px;
}
.wordmark { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--accent); }
.masthead nav { display: flex; gap: 16px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.masthead nav a { color: var(--ink); text-decoration: none; }
.masthead nav a[aria-current="page"] { color: var(--accent); font-weight: 650; }
.masthead nav a.button { color: var(--accent-ink); }

main { max-width: 760px; margin: 0 auto; padding: 24px 22px 56px; }
main.wide { max-width: 1080px; }

.lede { font-size: 19px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--bad); }
.ok { color: var(--good); }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 16px 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.band { background: var(--soft); border-radius: 14px; padding: 22px; margin: 28px 0; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
}
textarea { min-height: 120px; resize: vertical; }
input[type="checkbox"] { width: auto; margin-right: 8px; }
label.check { display: flex; align-items: center; font-weight: 500; }

button, .button {
  display: inline-block; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 16px;
}
button.quiet, .button.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.small, .button.small { padding: 5px 10px; font-size: 14px; }
button:disabled { opacity: 0.55; cursor: progress; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 13px; font-weight: 650; border: 1px solid currentColor; white-space: nowrap; }
.pill.bad { color: var(--bad); }
.pill.good { color: var(--good); }
.pill.muted { color: var(--muted); }
.pill.warn { color: var(--warn); }

ul.items { list-style: none; padding: 0; margin: 0; }
ul.items > li { border-top: 1px solid var(--line); padding: 14px 0; }
ul.items > li:first-child { border-top: 0; }

.siteftr { max-width: 1080px; margin: 0 auto; padding: 24px 22px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.siteftr p { margin: 6px 0; }

/* The studio's own pages: a sub-navigation and the week. */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; }
.subnav a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.subnav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .week { grid-template-columns: 1fr; } }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 90px; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day h3 { font-size: 14px; margin: 0 0 8px; color: var(--muted); }
.lesson { border-left: 3px solid var(--line); padding: 4px 0 6px 8px; margin: 0 0 8px; font-size: 14px; }
.lesson.attended { border-left-color: var(--good); }
.lesson.excused, .lesson.cancelled { border-left-color: var(--warn); }
.lesson.missed { border-left-color: var(--bad); }
.lesson.makeup { background: var(--soft); border-radius: 0 6px 6px 0; }
.lesson select { padding: 3px 6px; font-size: 13px; margin-top: 4px; }
.lesson .time { font-variant-numeric: tabular-nums; color: var(--muted); }
details.inline > summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack > * + * { margin-top: 8px; }
