:root {
  --bg: #f7f8fb;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --past: #4b5563;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto 56px;
}

.hero,
.panel,
.card,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero {
  padding: clamp(24px, 5vw, 44px);
  margin-bottom: 28px;
}

.hero.compact {
  padding: 28px;
}

.hero h1,
.panel h1 {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.card,
.panel {
  padding: 20px;
}

.card h3 {
  margin: 4px 0 8px;
}

.card-footer,
.section-title,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lesson.planned {
  border-left: 5px solid var(--success);
}

.lesson.completed {
  border-left: 5px solid var(--past);
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.button.secondary {
  background: #e5e7eb;
  color: var(--text);
}

.button-small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
}

.inline-form {
  display: inline;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
}

.form p {
  display: grid;
  gap: 6px;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.form textarea {
  min-height: 120px;
}

.narrow {
  max-width: 640px;
  margin-inline: auto;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.message,
.notice {
  padding: 12px 14px;
}

.message-success {
  border-left: 5px solid var(--success);
  background: #ecfdf5;
}

.message-error {
  border-left: 5px solid #dc2626;
  background: #fef2f2;
}

.eyebrow,
.muted,
.empty,
.helptext {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.errorlist {
  color: #b91c1c;
}

code {
  padding: 3px 6px;
  border-radius: 6px;
  background: #eef2ff;
}

@media (max-width: 780px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }
}
