.course-main { padding: 56px 0 72px; }
.course-main .container { max-width: 1000px; }
.course-header { margin-bottom: 1rem; }
.course-header .mini { color: var(--muted); }

/* Materiály */
.materials { padding-top: 18px; border-top: 1px solid var(--border); margin-top: 22px; }
.res-list { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .55rem; }
.res-list li { border: 1px solid var(--border); border-radius: 12px; padding: .6rem .8rem; background: var(--bg); }
.res-list a { font-weight: 700; text-decoration: none; }
.res-list a:hover { text-decoration: underline; }
.res-list .meta { color: var(--muted); margin-left: .5rem; font-size: .92rem; }

/* Paralelky – grid/karty (na stránce kurzu) */
.parallel-section { padding-top: 18px; border-top: 1px solid var(--border); margin-top: 22px; }
.parallel-grid { display: grid; grid-template-columns: repeat(3, minmax(220px,1fr)); gap: 1rem 1.25rem; align-items: start; }
.parallel { display: block; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: .85rem 1rem; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.parallel h3 { margin: 0 0 .4rem; font-weight: 700; }
.kv { display: grid; gap: .25rem; }
.kv-row { display: grid; grid-template-columns: 110px 1fr; gap: .5rem; }
.kv-row dt { font-weight: 800; letter-spacing: .02em; color: var(--fg); }
.kv-row dd { margin: 0; color: var(--muted); }

/* Probrané učivo – tabulka (na stránce paralelky) */
.covered { padding-top: 18px; border-top: 1px solid var(--border); margin-top: 22px; }
.topics { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.98rem; }
.topics thead th { text-align: left; font-weight: 800; padding: .6rem .7rem; border-bottom: 1px solid var(--border); }
.topics tbody td { padding: .55rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.topics tbody tr:last-child td { border-bottom: 0; }
.topics .w-week { width: 90px; white-space: nowrap; color: var(--muted); font-weight: 700; }
.topics .w-date { width: 130px; white-space: nowrap; color: var(--muted); }
.note { color: var(--muted); font-size: .92rem; }

/* ===== CoveredMatrix ===== */
.covered-matrix { padding-top: 18px; border-top: 1px solid var(--border); margin-top: 22px; }
.cm-wrapper { width: 100%; }

.cm-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.cm-table thead th {
  text-align: left; font-weight: 800; padding: .6rem .7rem; border-bottom: 1px solid var(--border);
}
.cm-table tbody td { padding: .55rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.cm-table tbody tr:last-child td { border-bottom: 0; }

.cm-col-week { width: 90px; white-space: nowrap; color: var(--muted); }
.cm-col-link { font-weight: 800; text-decoration: none; }
.cm-col-link:hover { text-decoration: underline; }

.cm-cell .cm-date { color: var(--muted); font-size: .92rem; margin-bottom: .15rem; }
.cm-cell .cm-topic { font-weight: 600; }
.cm-cell .cm-meta { margin-top: .2rem; }
.cm-cell .note { color: var(--muted); font-size: .92rem; }

/* Mobile: místo tabulky karty po týdnech */
.cm-cards { display: none; }

@media (max-width: 760px) {
  .cm-table { display: none; }
  .cm-cards { display: grid; gap: .8rem; }
  .cm-card { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
  .cm-card-head { display: flex; align-items: baseline; gap: .5rem; padding: .65rem .7rem; border-bottom: 1px solid var(--border); }
  .cm-card-label { color: var(--muted); font-weight: 700; }
  .cm-card-week { font-weight: 900; }
  .cm-card-body { padding: .55rem .7rem; display: grid; gap: .55rem; }
  .cm-card-row { display: grid; gap: .2rem; }
  .cm-card-colhead { font-weight: 800; }
  .cm-card-content .cm-date { color: var(--muted); font-size: .92rem; margin-bottom: .1rem; }
}

@media (max-width: 980px) {
  .parallel-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .parallel-grid { grid-template-columns: 1fr; }
  .topics thead { display: none; }
  .topics tbody tr { display: grid; gap: .35rem; padding: .65rem .6rem; border: 1px solid var(--border); border-radius: 12px; margin-bottom: .6rem; }
  .topics tbody td { border: 0; padding: 0; }
  .topics tbody tr:last-child { margin-bottom: 0; }
  .topics .w-week, .topics .w-date { font-weight: 800; }
}