:root {
  --background: #fafaf8;
  --foreground: #111111;
  --muted: #6b7280;
  --border: #e5e5e3;
  --card: #f4f4f2;
  --accent: #111111;
  --green: #26713c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.55 Palatino, Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 48px 24px 40px;
}

/* ---- header ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 24px;
}
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  transition: color .15s ease;
}
.backlink::before {
  content: "←";
  font-size: 13px;
}
.backlink:hover { color: var(--foreground); }
.controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.hero {
  padding-bottom: 32px;
}
.kicker {
  display: block;
  margin-bottom: 10px;
  letter-spacing: 0;
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 600;
}
.blurb {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.progress {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.progress b { color: var(--foreground); font-weight: 600; }
#picker {
  max-width: 190px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--foreground);
  padding: 5px 7px;
  font: 12px/1.2 Palatino, Georgia, "Times New Roman", serif;
}
.linkbtn {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: 12px/1.2 Palatino, Georgia, "Times New Roman", serif;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.overview {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.brief {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
}
.brief + .brief { border-top: 1px solid var(--border); }
.brief-label {
  padding-top: 2px;
  color: var(--muted);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}
.brief p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.brief b { font-weight: 600; color: var(--foreground); }

/* ---- days ---- */
.toc-label {
  margin: 0 0 14px;
  color: var(--muted);
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}
#days {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.day {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 16px;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.day::after {
  content: "→";
  color: var(--border);
  font-size: 14px;
  transition: color .15s ease;
}
.day:not(.locked):hover::after { color: var(--foreground); }

.daynum {
  min-width: 0;
}
.daynum .n {
  color: var(--muted);
  font: 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.daynum .wd {
  color: var(--muted);
  font-size: 12px;
}
.day.today .daynum .n { color: var(--accent); }
.day.today .badge-today {
  display: inline-block;
  margin-top: 4px;
  color: var(--foreground);
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

.day .body { min-width: 0; }

.paper .t {
  display: block;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.paper .t:hover { text-decoration: underline; text-underline-offset: 2px; }
.paper .meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.paper .meta .dot { margin: 0 7px; opacity: .5; }
.paper .oa-tag { color: var(--green); font-weight: 600; }
.paper .note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.lvl {
  display: inline;
  margin-right: 8px;
  color: var(--muted);
  font: 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0;
}
.lvl.leicht, .lvl.mittel, .lvl.formal { color: var(--muted); }

/* locked future days */
.day.locked { color: var(--muted); }
.day.locked::after { content: ""; }
.day.locked .paper, .day.locked .body, .day.locked .daynum .n, .day.locked .daynum .wd {
  color: var(--muted);
}
.locknote {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.state { text-align: center; color: var(--muted); padding: 70px 0; }

footer {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
footer a { color: var(--muted); }

@media (max-width: 640px) {
  .page { padding-top: 36px; }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .controls {
    align-items: flex-start;
    flex-direction: column;
  }
  #picker { max-width: min(100%, 300px); }
  .brief,
  .day {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .day::after { display: none; }
  h1 { font-size: 27px; }
}
