/* Kursväljaren och kurssidan. Färger och knappar kommer från tokens.css och base.css. */
.catalog { max-width: 720px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.catalog h1:focus { outline: none; }
.catalog-title { margin-top: 28px; color: var(--ink-strong); font-size: clamp(25px, 6vw, 32px); font-weight: 900; line-height: 1.15; }
.catalog-title:first-child { margin-top: 4px; }
.catalog-error { padding: 24px 16px; color: var(--red-ink); font-size: 17px; }

/* Kursens märke, samma tanke som steget på vägen: en rund, knubbig knapp i kursens färg. */
.course-badge { display: grid; flex: none; place-items: center; width: 62px; height: 58px; border-radius: 18px; background: var(--tone); box-shadow: 0 4px 0 var(--tone-shadow); color: var(--tone-text); }
.course-badge .icon { width: 34px; height: 34px; }
.course-badge--light { background: rgba(255, 255, 255, 0.22); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.16); color: inherit; }

/* Fortsätt där du slutade. */
.next-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; border-radius: 20px; background: var(--tone); box-shadow: 0 5px 0 var(--tone-shadow); color: var(--tone-text); text-decoration: none; transition: transform 70ms, box-shadow 70ms; }
.next-card:active { transform: translateY(5px); box-shadow: 0 0 0 var(--tone-shadow); }
.next-head { display: flex; align-items: center; gap: 14px; }
.next-head > div { min-width: 0; }
.next-kicker { font-size: 13px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.next-card h2 { margin-top: 2px; font-size: 22px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.next-meta { margin-top: 2px; font-size: 14px; font-weight: 800; }
.next-card .moment-exam { margin: 0; color: inherit; }
.next-card .meter { background: rgba(255, 255, 255, 0.28); }
.next-card .meter > span { background: #ffffff; }
.next-card .catalog-meter { margin: 0; color: inherit; }

/* Kurserna som stora kort att trycka på. */
.course-grid { display: grid; gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.course-card { display: grid; grid-template-columns: 62px minmax(0, 1fr) 22px; align-items: center; gap: 14px; height: 100%; padding: 14px 12px 14px 14px; border: 2px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 4px 0 var(--line); color: inherit; text-decoration: none; transition: transform 70ms, box-shadow 70ms, background 120ms; }
.course-card:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
@media (hover: hover) { .course-card:hover { background: var(--soft); } }
.course-code { color: var(--tone-ink); font-size: 13px; font-weight: 900; letter-spacing: 0.06em; }
.course-card h2 { margin-top: 1px; color: var(--ink-strong); font-size: 18px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.course-meta { margin-top: 3px; color: var(--muted); font-size: 14px; font-weight: 700; }
.course-status { margin-top: 6px; color: var(--muted); font-size: 14px; font-weight: 800; }
.course-status.has-path { color: var(--tone-ink); }
.course-arrow { display: grid; place-items: center; color: var(--faint); }
.course-arrow .icon { width: 22px; height: 22px; }
.catalog-meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.catalog-meter .meter { flex: 1; height: 12px; }
@media (min-width: 680px) { .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* En kurs: banderoll och momenten som steg. */
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -8px 0 6px -6px; padding: 0 12px 0 4px; border-radius: 12px; color: var(--muted); font-size: 15px; font-weight: 800; text-decoration: none; }
.back-link .icon { width: 22px; height: 22px; }
@media (hover: hover) { .back-link:hover { background: var(--soft); } }
.course-banner { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; background: var(--tone); box-shadow: 0 5px 0 var(--tone-shadow); color: var(--tone-text); }
.course-banner > div { min-width: 0; }
.course-banner h1 { margin-top: 2px; font-size: clamp(21px, 5.4vw, 26px); font-weight: 900; line-height: 1.18; overflow-wrap: anywhere; hyphens: auto; }

.moment-list { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.moment { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; gap: 14px; padding: 14px; border: 2px solid var(--line); border-radius: 20px; background: var(--panel); color: inherit; text-decoration: none; }
.moment.has-path { border-color: color-mix(in srgb, var(--tone) 55%, var(--line)); box-shadow: 0 4px 0 color-mix(in srgb, var(--tone) 55%, var(--line)); transition: transform 70ms, box-shadow 70ms; }
.moment.has-path:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.moment-node { display: grid; place-items: center; width: 60px; height: 55px; border-radius: 50%; background: var(--line); box-shadow: 0 5px 0 var(--line-strong); color: var(--faint); }
.moment-node .icon { width: 28px; height: 28px; }
.moment.has-path .moment-node { background: var(--tone); box-shadow: 0 5px 0 var(--tone-shadow); color: var(--tone-text); }
.moment-body { min-width: 0; }
.moment h2 { color: var(--ink-strong); font-size: 18px; font-weight: 900; line-height: 1.22; overflow-wrap: anywhere; hyphens: auto; }
.moment-meta { margin-top: 2px; color: var(--muted); font-size: 14px; font-weight: 800; }
.moment-note { margin-top: 4px; color: var(--muted); font-size: 14px; font-weight: 700; }
.moment-stats { margin-top: 6px; color: var(--muted); font-size: 14px; font-weight: 800; }
.moment-exam { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; color: var(--red-ink); font-size: 14px; font-weight: 800; }
.moment-exam .icon { width: 18px; height: 18px; margin-top: 1px; }
.moment-go { grid-column: 1 / -1; }

.course-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.course-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--line); border-radius: 99px; color: var(--blue-ink); font-size: 15px; font-weight: 800; text-decoration: none; }
@media (hover: hover) { .course-links a:hover { background: var(--soft); } }
