/* Shared look for the student course pages (my-courses.html, course.html).
   Palette = the site navbar's (navbar.js); Fredoka for headings, Open Sans for text, as on the WP site.
   Signature: progress drawn as a gold thread with beads (.thread). */

:root {
  --cream: #fdf8f2;
  --paper: #ffffff;
  --blush: #e8d5c4;
  --blush-soft: #f6ede4;
  --gold: #c4a882;        /* decorative only: thread, beads, rings (2.1:1 on cream, never text) */
  --gold-ink: #8a6d3f;    /* gold as text (4.6:1 on cream) */
  --mauve: #7a5c6b;       /* secondary text (5.6:1 on cream) */
  --plum: #4a3540;        /* primary actions, headings */
  --plum-hover: #3a2832;
  --ink: #3d2b35;         /* body text */
  --sage: #5e7d62;        /* done */
  --danger: #a3453f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(74, 53, 64, .05), 0 6px 20px rgba(74, 53, 64, .06);
  --font-head: 'Fredoka', 'Open Sans', system-ui, sans-serif;
  --font-body: 'Open Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--cream); color: var(--ink); min-height: 100vh; font-size: 16px; line-height: 1.6; }
h1, h2, h3, .head { font-family: var(--font-head); font-weight: 500; color: var(--plum); line-height: 1.25; }
a { color: var(--plum); }
button { font-family: inherit; }

:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 15px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--plum-hover); }
.btn-ghost { background: transparent; color: var(--plum); border-color: var(--blush); }
.btn-ghost:hover { border-color: var(--plum); background: var(--paper); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }

/* The thread: a progress line with a bead at the reached point */
.thread { position: relative; height: 4px; border-radius: 2px; background: var(--blush); }
.thread > span { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 2px; background: var(--gold); }
.thread > span::after {
  content: ''; position: absolute; inset-inline-end: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--paper); border: 2.5px solid var(--gold);
}
.thread.is-empty > span::after { display: none; }
.thread.is-done > span { background: var(--sage); }
.thread.is-done > span::after { border-color: var(--sage); background: var(--sage); }

/* Skeletons */
.sk { background: linear-gradient(90deg, var(--blush-soft) 0%, #fbf4ec 50%, var(--blush-soft) 100%); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.empty-state { text-align: center; padding: 48px 24px; color: var(--mauve); background: var(--paper); border: 1px solid var(--blush); border-radius: var(--radius); }
.empty-state h2 { font-size: 22px; margin-bottom: 8px; }
.empty-state p { margin-bottom: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
