/* ============================================================
   Student dashboard: one page per course, read top to bottom.
   Today (Do Now, set work, weekly goal) → next step → progress
   squares → Revise → Practise.
   ============================================================ */

.cd-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin:4px 0 14px; }
.cd-eyebrow { font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.cd-title { font-family:'Lora',serif; font-style:italic; font-weight:700; font-size:32px; line-height:1.15; color:var(--navy); margin-top:2px; letter-spacing:-0.01em; }
.cd-subject { font-size:13px; font-weight:600; color:var(--brand); text-decoration:none; }
.cd-subject:hover { text-decoration:underline; }

.cd-jump { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 22px; padding-bottom:18px; border-bottom:1px solid var(--rule); }
.cd-jump a { font-size:13px; font-weight:600; color:var(--muted); text-decoration:none; padding:6px 12px; border-radius:999px; background:var(--paper); border:1px solid var(--rule); }
.cd-jump a:hover { color:var(--brand); border-color:var(--brand); }
.cd-jump a.hidden { display:none; }
.cd-anchor { display:block; height:0; scroll-margin-top:80px; }
.cd-section { scroll-margin-top:80px; margin-top:36px; }
/* The page fills the window so the footer never floats mid-screen. */
.main > .dash-body { flex:1 0 auto; }

/* Today: Do Now, set work and the weekly goal in one row. Hidden cards
   drop out and the rest share the width, so the row never has a gap. */
.cd-today { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:20px; margin-bottom:20px; align-items:stretch; }
.cd-today > .goal-card { margin:0; border-radius:12px; padding:20px 22px; }
.cd-card { background:var(--paper); border:1px solid var(--rule); border-radius:12px; padding:20px 22px; display:flex; flex-direction:column; gap:8px; min-width:0; }
.cd-card.live { background:#eef4ff; border-color:#cfe0ff; }
.cd-kicker { font-size:10.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.cd-card.live .cd-kicker { color:var(--brand); }
.cd-kicker a { letter-spacing:0; text-transform:none; font-size:13px; font-weight:600; color:var(--brand); text-decoration:none; }
.cd-kicker a:hover { text-decoration:underline; }
.cd-card h2 { font-family:'Lora',serif; font-style:italic; font-weight:700; font-size:21px; line-height:1.25; color:var(--navy); margin:0; }
.cd-card p { margin:0; color:var(--muted); font-size:14px; line-height:1.55; }
.cd-actions { margin-top:auto; padding-top:8px; display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.cd-btn { display:inline-flex; align-items:center; gap:6px; background:var(--brand); color:#fff; border:none; border-radius:8px; padding:10px 18px; font-family:'DM Sans',sans-serif; font-size:14px; font-weight:700; text-decoration:none; cursor:pointer; }
.cd-btn:hover { background:#155fe0; }
.cd-btn.ghost { background:var(--paper); color:var(--ink); border:1px solid var(--rule); font-weight:600; padding:8px 14px; font-size:13px; }
.cd-btn.ghost:hover { border-color:var(--brand); color:var(--brand); }

.cd-work { display:flex; flex-direction:column; }
.cd-work-row { display:flex; align-items:center; gap:12px; padding:11px 0; border-top:1px solid var(--rule-faint); text-decoration:none; color:inherit; }
.cd-work-row:first-child { border-top:none; padding-top:2px; }
.cd-work-main { flex:1; min-width:0; }
.cd-work-title { display:block; font-weight:700; color:var(--navy); font-size:14.5px; }
.cd-work-meta { display:block; font-size:12.5px; color:var(--muted); margin-top:1px; }
.cd-bar { display:block; height:5px; background:var(--rule); border-radius:3px; overflow:hidden; margin-top:6px; max-width:220px; }
.cd-bar > span { display:block; height:100%; background:var(--brand); border-radius:3px; }
.cd-pill { font-size:11.5px; font-weight:700; padding:2px 9px; border-radius:999px; background:#f1f3f8; color:var(--muted); white-space:nowrap; }
.cd-pill.soon { background:#fff1e0; color:#9a4a00; }
.cd-pill.done { background:#e6f6ec; color:#137a3b; }
.cd-go { color:var(--brand); font-weight:700; font-size:13px; white-space:nowrap; }
.cd-empty { color:var(--muted); font-size:14px; padding:4px 0; }
.cd-note { font-size:12.5px; color:var(--muted); margin-top:4px; }
.cd-note a { color:var(--brand); font-weight:600; text-decoration:none; }

.cd-section-title { font-family:'Lora',serif; font-style:italic; font-weight:700; font-size:21px; color:var(--navy); margin:30px 0 12px; }
.cd-section-title:first-child { margin-top:0; }

/* Progress: the squares and the side column end level. Where the map is
   longer than the side column, course-dashboard.js caps the map's height and
   it scrolls inside its card; where it's shorter, its card stretches. */
#cd-overview .track-grid { align-items:stretch; }
#cd-overview .track-side { position:static; }
#cd-overview .track-grid .wordmap-card { height:100%; display:flex; flex-direction:column; }
#cd-overview .track-grid .wordmap-body { flex:1 1 auto; overflow-y:auto; }

/* Practise */
.cd-grid { display:grid; grid-template-columns:repeat(var(--cd-cols, 3), minmax(0, 1fr)); gap:16px; }
@media (max-width:1100px) { .cd-grid { grid-template-columns:repeat(min(var(--cd-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width:640px) { .cd-grid { grid-template-columns:1fr; } }
.cd-tool .cd-go { margin-top:auto; padding-top:6px; }
.cd-tool { text-decoration:none; }
.cd-tool:hover { border-color:var(--brand); }
.cd-tool h3 { font-size:15px; font-weight:700; color:var(--navy); margin:0; }

/* Revise */
.cd-search { width:100%; border:1px solid var(--rule); border-radius:10px; padding:12px 14px; font-family:'DM Sans',sans-serif; font-size:15px; background:var(--paper); color:var(--ink); margin-bottom:18px; }
.cd-search:focus { outline:2px solid var(--brand); outline-offset:1px; border-color:transparent; }
.cd-carry { display:flex; align-items:center; gap:14px; background:#eef4ff; border:1px solid #cfe0ff; border-radius:12px; padding:14px 18px; margin-bottom:18px; text-decoration:none; color:inherit; }
.cd-carry:hover { border-color:var(--brand); }
.cd-source { font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin:26px 0 10px; display:flex; gap:10px; align-items:baseline; justify-content:space-between; }
.cd-source a { letter-spacing:0; text-transform:none; font-size:13px; color:var(--brand); text-decoration:none; font-weight:600; }
.cd-topic { border:1px solid var(--rule); border-radius:12px; margin-bottom:10px; background:var(--paper); overflow:hidden; }
.cd-topic-head { width:100%; display:flex; align-items:center; gap:14px; padding:14px 18px; background:none; border:none; text-align:left; cursor:pointer; font-family:'DM Sans',sans-serif; color:var(--ink); }
.cd-topic-head:hover { background:#f6f8fd; }
.cd-topic-num { font-family:'Lora',serif; font-style:italic; font-weight:700; font-size:20px; color:var(--brand); min-width:28px; font-variant-numeric:tabular-nums; }
.cd-topic-title { flex:1; min-width:0; font-weight:700; font-size:15px; color:var(--navy); }
.cd-topic-title small { display:block; font-weight:500; font-size:13px; color:var(--muted); }
.cd-chev { color:var(--muted); transition:transform .15s; font-size:18px; line-height:1; }
.cd-topic.open .cd-chev { transform:rotate(90deg); }
.cd-lessons { border-top:1px solid var(--rule); }
.cd-lesson { display:flex; gap:14px; align-items:baseline; padding:11px 18px 11px 60px; border-top:1px solid var(--rule-faint); text-decoration:none; color:inherit; }
.cd-lesson:first-child { border-top:none; }
.cd-lesson:hover { background:#f6f8fd; }
.cd-lesson-n { font-size:13px; color:var(--muted); min-width:34px; font-variant-numeric:tabular-nums; }
.cd-lesson-t { flex:1; min-width:0; }
.cd-lesson-t b { font-weight:600; color:var(--ink); }
.cd-lesson-t span { display:block; font-size:13px; color:var(--muted); }
.cd-chip { font-size:11.5px; font-weight:700; border-radius:999px; padding:2px 8px; background:#e8f0ff; color:var(--brand); white-space:nowrap; }

@media (max-width:640px) {
  .cd-title { font-size:26px; }
  .cd-jump { margin-bottom:16px; padding-bottom:14px; }
  .cd-lesson { padding-left:18px; }
  .cd-card { padding:16px 18px; }
}
@media (prefers-reduced-motion: reduce) { .cd-chev { transition:none; } }

/* One corner radius for every card on the page. */
#cd-overview .side-card, #cd-overview .wordmap-card, #cd-overview .goal-card { border-radius:12px; }
