:root {
  --bg: #faf8f4;
  --fg: #1f1d1a;
  --muted: #6b6660;
  --accent: #b4531f;
  --card: #fff;
  --line: #e6e0d6;
  --done: #2f7d4f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

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

.brand {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: none;
}

#export-btn {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 6px;
  cursor: pointer;
}

#export-btn:hover { border-color: var(--accent); color: var(--accent); }

nav#crumbs {
  padding: 0.75rem 1.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

nav#crumbs a { color: var(--muted); }

main {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem;
}

h1 { font-size: 1.8rem; margin: 0.5rem 0 1.5rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.1s;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card .title { font-size: 1.15rem; font-weight: bold; }
.card .meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }

.progress {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  margin-top: 0.9rem;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--done);
}

.lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  text-decoration: none;
  color: inherit;
}
.lesson-row:hover { border-color: var(--accent); }
.lesson-row .status { font-size: 1.1rem; }
.lesson-row .status.done { color: var(--done); }

.empty { color: var(--muted); font-style: italic; }
