/* Course area (/kurs). Loaded after styles.css. */

.portal-main { padding: clamp(32px, 6vw, 72px) 0 96px; min-height: 60vh; }
.portal-main .wrap { max-width: 860px; }
.portal-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 0.9rem; white-space: nowrap; }
.portal-nav a { text-decoration: none; }
.portal-nav form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--accent); }

.portal-card {
  max-width: 520px; margin: 0 auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(24px, 5vw, 40px);
}
.portal-card h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin-bottom: 0.5em; }
.portal-card p { color: var(--muted); }
.portal-h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 0.2em; }
.muted { color: var(--muted); font-size: 0.92rem; }
.err { color: var(--err) !important; font-weight: 500; }
.devnote { background: #FFF3C4; color: #5A4500 !important; padding: 10px 14px; border-radius: 8px; font-size: 0.9rem; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: inherit; }

.portal-form { display: grid; gap: 10px; margin: 20px 0; }
.portal-form label { font-size: 0.85rem; font-weight: 600; }
.portal-form input {
  font: inherit; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}
.portal-form input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 20, 15, .08); }
.portal .btn { border: 0; cursor: pointer; font: 600 0.98rem/1 var(--sans); padding: 14px 22px; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line) !important; }
.btn--ghost:hover { background: var(--tint); color: var(--ink); }

.course-list { display: grid; gap: 16px; margin-top: 28px; }
.course-tile {
  display: grid; gap: 4px; text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; position: relative; transition: border-color .15s, transform .15s;
}
.course-tile:hover { border-color: var(--ink); color: inherit; transform: translateY(-1px); }
.course-tile__title { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.course-tile__sub { color: var(--muted); }
.course-tile__meta { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.course-tile__go { position: absolute; right: 28px; top: 28px; color: var(--accent); font-weight: 600; }

.lesson-group { margin-top: 44px; }
.lesson-group h2 { font-size: 1.5rem; margin-bottom: 14px; }
.lessons { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.lesson { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 14px; }
.lesson h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; margin: 2px 0 0; letter-spacing: 0; }
.lesson p { margin: 4px 0 0; }
.lesson__type { font-size: 0.7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.lesson--pdf { grid-template-columns: 1fr auto; align-items: center; }
.lesson__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lesson audio { width: 100%; }
.lesson video { width: 100%; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; }
.lesson__dl { font-size: 0.85rem; color: var(--muted); justify-self: start; }

@media (max-width: 600px) {
  .lesson--pdf { grid-template-columns: 1fr; }
  .course-tile__go { position: static; margin-top: 8px; }
  .portal-nav { gap: 12px; font-size: 0.82rem; }
  .portal .wordmark { font-size: 1rem; }
}

/* Member area v2: progress, "bald verfügbar", other courses / waitlist */
.portal-card--wide { max-width: none; margin: 0; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--tint); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); width: 0; }
.bar .w10 { width: 10%; } .bar .w20 { width: 20%; } .bar .w30 { width: 30%; } .bar .w40 { width: 40%; } .bar .w50 { width: 50%; }
.bar .w60 { width: 60%; } .bar .w70 { width: 70%; } .bar .w80 { width: 80%; } .bar .w90 { width: 90%; } .bar .w100 { width: 100%; }

.notice { background: #E7F3EA; color: #1F5A31; border-radius: 10px; padding: 12px 16px; margin-bottom: 24px; }
.locked-list { margin-top: 18px; }
.locked { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.locked h3 { font-size: 1.05rem; margin: 0; }
.locked .badge { margin-bottom: 6px; }
.locked form { margin: 0; }
.onlist { color: var(--ok); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

.course-progress { font-weight: 600; margin-top: 16px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.toc a { font-size: 0.85rem; font-weight: 600; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.toc a:hover { border-color: var(--ink); color: var(--ink); }
.lesson-group { scroll-margin-top: 80px; }
.lesson { scroll-margin-top: 80px; }
.lesson.is-done { border-color: #BFDCC7; }
.lesson--soon { grid-template-columns: 1fr auto; align-items: center; background: var(--tint); border-style: dashed; }
.lesson--soon h3 { color: var(--muted); }
.soon { font-size: 0.78rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.lesson__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lesson--pdf .donebox { grid-column: 1 / -1; }
.donebox { margin: 0; }
.donebtn { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: 600 0.8rem/1 var(--sans); color: var(--muted); cursor: pointer; }
.donebtn:hover { border-color: var(--ink); color: var(--ink); }
.donebtn.is-done { background: #E7F3EA; border-color: #BFDCC7; color: var(--ok); }
.support { margin-top: 48px; }

@media (max-width: 600px) {
  .locked, .lesson--soon { grid-template-columns: 1fr; }
  .portal .topbar__tag { display: none; }
}
