/* Course details page (user/course_details.php) — card design. Load after style.css.
   Colour tone follows the course card: .cc-green / .cc-blue / .cc-amber / .cc-purple on .cd-wrap */
.cd-wrap{ max-width:980px; }
.cd-wrap.cc-green { --cc-a:#2A8D6A; --cc-b:#23634C; --cc-soft:rgba(42,141,106,.10); }
.cd-wrap.cc-blue  { --cc-a:#3F7BBC; --cc-b:#2E537D; --cc-soft:rgba(63,123,188,.10); }
.cd-wrap.cc-amber { --cc-a:#BB6F26; --cc-b:#8C5422; --cc-soft:rgba(187,111,38,.10); }
.cd-wrap.cc-purple{ --cc-a:#875BBF; --cc-b:#5D3F8D; --cc-soft:rgba(135,91,191,.10); }

.cd-back{ display:inline-block; margin-bottom:16px; font-size:12.5px; color:var(--slate); }
.cd-back:hover{ color:var(--ink); }

/* ---------- Hero card ---------- */
.cd-hero{ display:flex; background:var(--paper-raised); border:1px solid var(--line); border-radius:16px; overflow:hidden;
  box-shadow:0 8px 30px rgba(28,43,36,.08); margin-bottom:18px; }
.cd-rail{ width:170px; flex:none; padding:24px 18px; color:#fff; display:flex; flex-direction:column; align-items:flex-start;
  background:linear-gradient(170deg, var(--cc-a), var(--cc-b)); position:relative; }
.cd-rail::after{ content:''; position:absolute; right:-40px; bottom:-40px; width:130px; height:130px; border-radius:50%; background:rgba(255,255,255,.08); }
.cd-lbl{ font-family:var(--font-mono); font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:rgba(255,255,255,.9); }
.cd-num{ margin-top:6px; font-size:64px; line-height:1; font-weight:800; letter-spacing:-.02em; overflow-wrap:anywhere; }
.cd-num-t{ font-size:22px; line-height:1.25; letter-spacing:0; }
.cd-unit{ margin-top:4px; font-size:14px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.cd-sep{ display:block; align-self:stretch; border-top:1px dashed rgba(255,255,255,.55); margin:18px 0 14px; }
.cd-old{ margin-top:6px; font-size:13px; font-weight:600; text-decoration:line-through; color:rgba(255,255,255,.9); }
.cd-fee{ margin-top:4px; font-size:28px; line-height:1.1; font-weight:800; }
.cd-off{ margin-top:8px; background:#fff; color:#B3261E; border-radius:99px; padding:2px 10px; font-size:11px; font-weight:800; }

.cd-hero-body{ flex:1; min-width:0; padding:26px 28px; display:flex; flex-direction:column; }
.cd-hero-body h1{ font-size:26px; line-height:1.25; margin:0 0 10px; }
.cd-desc{ font-size:13.5px; line-height:1.7; color:var(--slate); margin:0 0 20px; }
.cd-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:auto; }
.cd-actions .btn-primary{ background:var(--cc-b); border-color:var(--cc-b); }
.cd-actions .btn-primary:hover{ background:var(--cc-a); border-color:var(--cc-a); }
.cd-actions .btn-ghost{ border-color:var(--cc-a); color:var(--cc-b); }
.cd-actions .btn-ghost:hover{ background:var(--cc-a); color:#fff; }
html[data-theme="dark"] .cd-actions .btn-ghost{ color:#fff; }

/* ---------- Stat cards ---------- */
.cd-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:30px; }
.cd-stat{ background:var(--paper-raised); border:1px solid var(--line); border-radius:14px; padding:14px 16px; display:flex; flex-direction:column; gap:2px;
  box-shadow:var(--shadow); border-top:3px solid var(--cc-a); transition:transform .2s ease, box-shadow .2s ease; }
.cd-stat:hover{ transform:translateY(-3px); box-shadow:0 10px 24px rgba(28,43,36,.10); }
.cd-stat b{ font-size:22px; font-weight:800; line-height:1.1; color:var(--ink); }
.cd-stat small{ font-size:11.5px; color:var(--slate); }

/* ---------- Section heads ---------- */
.cd-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:6px 0 16px; }
.cd-head h2{ font-size:20px; }
.cd-head > a{ font-size:12.5px; color:var(--green); font-weight:600; }
.cd-tools{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.seg{ display:inline-flex; border:1.5px solid var(--line); border-radius:8px; overflow:hidden; background:var(--paper-raised); }
.seg button{ padding:6px 13px; font-size:12.5px; font-weight:700; color:var(--slate); background:none; border:none; cursor:pointer; font-family:inherit; }
.seg button.active{ background:var(--cc-b); color:#fff; }

/* ---------- Consultant cards ---------- */
.cd-consultants{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px; margin-bottom:32px; }
.cd-person{ display:flex; align-items:center; gap:12px; background:var(--paper-raised); border:1px solid var(--line); border-radius:14px; padding:12px 14px;
  box-shadow:var(--shadow); transition:transform .2s ease, border-color .2s ease; }
.cd-person:hover{ transform:translateY(-3px); border-color:var(--cc-a); }
.cd-photo{ flex:0 0 52px; width:52px; height:52px; border-radius:50%; overflow:hidden; display:flex; align-items:center; justify-content:center;
  background:var(--cc-soft); color:var(--cc-b); font-weight:800; font-size:19px; box-shadow:0 0 0 3px var(--paper-raised), 0 0 0 5px var(--cc-a); }
.cd-photo img{ width:100%; height:100%; object-fit:cover; object-position:50% 15%; }
.cd-person-t{ min-width:0; display:flex; flex-direction:column; }
.cd-person-t b{ font-size:14.5px; line-height:1.3; }
.cd-person-t small{ font-size:12px; color:var(--slate); }

/* ---------- Routine: one card per date ---------- */
.routine-timeline{ display:flex; flex-direction:column; gap:20px; }
.rt-row{ --rc-a:#3F7BBC; --rc-b:#2E537D; --rc-soft:rgba(63,123,188,.10); }
.rc{ min-width:0;
  background:var(--paper-raised); border:1px solid var(--line); border-radius:16px; overflow:hidden; box-shadow:var(--shadow);
  transition:transform .2s ease, box-shadow .2s ease; }
.rc:hover{ transform:translateY(-3px); box-shadow:0 12px 28px rgba(28,43,36,.12); }
.rt-row.is-today{ --rc-a:#2A8D6A; --rc-b:#23634C; --rc-soft:rgba(42,141,106,.12); }
.rt-row.is-today .rc{ border-color:var(--rc-a); box-shadow:0 0 0 3px rgba(42,141,106,.14), 0 10px 26px rgba(28,43,36,.10); }
.rt-row.is-over{ --rc-a:#8B948F; --rc-b:#6A726E; --rc-soft:rgba(128,128,128,.09); }
.rt-row.is-over .rc-body{ opacity:.85; }

.rc-head{ display:flex; align-items:center; gap:12px; padding:12px 16px; background:var(--rc-soft); border-bottom:1px solid var(--line); border-top:3px solid var(--rc-a); }
.rc-head-t{ flex:1; min-width:0; display:flex; flex-direction:column; }
.rc-head-t b{ font-size:15px; color:var(--ink); }
.rc-head-t small{ font-size:12px; color:var(--slate); }
.rc-badge{ flex:none; font-size:11px; font-weight:800; padding:2px 10px; border-radius:99px; background:var(--rc-b); color:#fff; }

.rc-body{ padding:12px; display:flex; flex-direction:column; gap:10px; }
.rc-item{ display:flex; gap:10px; padding:10px 12px; border-radius:12px; background:var(--rc-soft); border:1px solid transparent; }
.rc-ex{ background:var(--paper-raised); border:1px solid var(--line); border-left:4px solid var(--rc-a); }
.rc-ic{ flex:none; font-size:16px; line-height:1.4; }
.rc-item-b{ flex:1; min-width:0; }
.rc-item h3{ font-size:14px; line-height:1.35; margin:0; color:var(--ink); }
.rc-ex-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.rc-st{ flex:none; font-size:9.5px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; padding:1px 7px; border-radius:99px; border:1px solid currentColor; color:var(--slate); }
.rc-st.st-running{ color:#2f7d62; }
html[data-theme="dark"] .rc-st.st-running{ color:#5fd3a4; }
.rc-exname{ font-size:12px; color:var(--slate); margin-top:2px; }
.rc-chips{ display:flex; flex-wrap:wrap; gap:6px; margin-top:7px; }
.rc-chips span{ font-size:11px; font-weight:700; padding:2px 9px; border-radius:99px; background:rgba(128,128,128,.10); color:var(--slate); }
.rc .details-text{ font-size:12.5px; color:var(--slate); line-height:1.5; margin:6px 0 0; cursor:pointer;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.rc .details-text.open{ display:block; -webkit-line-clamp:unset; }
.rc-links{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.rc-links a{ font-size:11.5px; font-weight:700; color:var(--ink); background:var(--paper-raised); border:1px solid var(--line); border-radius:99px; padding:2px 10px; }
.rc-links a:hover{ border-color:var(--rc-a); }
.rc-btn{ display:inline-block; margin-top:10px; font-size:12px; font-weight:700; padding:5px 14px; border-radius:99px; background:var(--rc-b); color:#fff; border:1.5px solid var(--rc-b); transition:background .2s ease; }
.rc-btn:hover{ background:var(--rc-a); border-color:var(--rc-a); }
.rc-btn.done{ background:transparent; color:var(--ink); border-color:var(--line); }
.rc-btn.off{ background:transparent; color:var(--slate); border-color:var(--line); cursor:default; }


/* ---------- Timeline: round date badge on the left, bead chain joins date to date, card has a pointer toward its date ---------- */
.rt-row{ --d:68px; --gap:26px; position:relative; display:grid; grid-template-columns:var(--d) minmax(0,1fr); column-gap:var(--gap); align-items:start; }
/* bead chain (round dots) instead of a line */
.rt-row:not(:last-child)::before{ content:''; position:absolute; left:calc(var(--d) / 2 - 4px); top:calc(var(--d) + 6px); bottom:-14px; width:8px;
  background:radial-gradient(circle, var(--rc-a) 2.6px, transparent 3px) center top / 8px 14px repeat-y; opacity:.7; }
.rt-tile{ position:relative; z-index:1; width:var(--d); height:var(--d); border-radius:50%; color:#fff; text-align:center;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:linear-gradient(160deg, var(--rc-a), var(--rc-b)); box-shadow:0 0 0 4px var(--paper), 0 6px 14px rgba(28,43,36,.18); }
.rt-tile .wd{ display:block; font-size:9.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; opacity:.92; line-height:1; }
.rt-tile .dd{ display:block; font-size:25px; font-weight:800; line-height:1.05; }
.rt-tile .my{ display:block; font-size:9.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; opacity:.92; line-height:1; }
/* today: soft ring */
.rt-row.is-today .rt-tile{ box-shadow:0 0 0 4px var(--paper), 0 0 0 7px rgba(42,141,106,.30), 0 6px 14px rgba(28,43,36,.18); }
/* time over: grey circle with a check badge, muted card, grey beads */
.rt-row.is-over .rt-tile{ opacity:.9; }
.rt-row.is-over .rt-tile::after{ content:''; position:absolute; right:-4px; bottom:-4px; width:24px; height:24px; border-radius:50%; border:2px solid var(--paper);
  background:#2A8D6A url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat; }
.rt-row.is-over::before{ opacity:.45; }
.rt-row.is-over .rc{ background:color-mix(in srgb, var(--paper-raised) 94%, #808080); }
.rt-row.is-over .rc-head-t b, .rt-row.is-over .rc-item h3{ color:var(--slate); }

/* card: tinted header + a pointer toward the date circle */
.rc{ overflow:visible; --rc-tint:color-mix(in srgb, var(--rc-a) 11%, var(--paper-raised)); }
.rc-head{ min-height:var(--d); background:var(--rc-tint); border-radius:15px 15px 0 0; position:relative; }
.rc-head::before{ content:''; position:absolute; left:-8px; top:calc(var(--d) / 2 - 7px); width:14px; height:14px; transform:rotate(45deg);
  background:var(--rc-tint); border-left:1px solid var(--line); border-bottom:1px solid var(--line); border-radius:0 0 0 3px; }
.rt-row.is-today .rc-head::before{ border-color:var(--rc-a); }
@media (max-width:560px){
  .rt-row{ --d:56px; --gap:18px; }
  .rt-tile .dd{ font-size:21px; } .rt-tile .wd, .rt-tile .my{ font-size:8.5px; }
}

/* ---------- Show more ---------- */
.rc-hidden{ display:none !important; }
.rc-toggle{ background:none; border:0; padding:4px 0 0; font:inherit; font-size:12px; font-weight:700; color:var(--rc-b); cursor:pointer; }
.rc-toggle:hover{ text-decoration:underline; }
.rc-toggle-card{ align-self:center; padding:7px 18px; border:1.5px solid var(--rc-a); border-radius:99px; background:transparent; }
.rc-toggle-card:hover{ background:var(--rc-a); color:#fff; text-decoration:none; }
html[data-theme="dark"] .rc-toggle{ color:#cfe9dd; }

/* ---------- Line icons ---------- */
.ic{ width:1em; height:1em; flex:none; vertical-align:-.125em; }
.cd-stat-ic{ display:inline-flex; width:34px; height:34px; align-items:center; justify-content:center; border-radius:10px; background:var(--cc-soft); color:var(--cc-b); margin-bottom:6px; }
.cd-stat-ic .ic{ width:18px; height:18px; }
.rc-ic{ color:var(--rc-b); margin-top:1px; } .rc-ic .ic{ width:17px; height:17px; }
.rc-links a{ display:inline-flex; align-items:center; gap:5px; } .rc-links .ic{ width:13px; height:13px; }
html[data-theme="dark"] .cd-stat-ic, html[data-theme="dark"] .rc-ic{ color:#fff; }

/* ---------- Responsive ---------- */
@media (max-width:760px){
  .cd-stats{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:560px){
  .cd-hero{ flex-direction:column; }
  .cd-rail{ width:auto; flex-direction:row; flex-wrap:wrap; align-items:center; gap:4px 14px; padding:16px 18px; }
  .cd-rail::after{ display:none; }
  .cd-num{ font-size:40px; margin-top:0; }
  .cd-sep{ display:none; }
  .cd-fee{ margin-left:auto; font-size:24px; }
  .cd-hero-body{ padding:20px 18px; }
  .cd-hero-body h1{ font-size:22px; }
}
@media (prefers-reduced-motion:reduce){ .cd-stat, .cd-person, .rc{ transition:none; } .cd-stat:hover, .cd-person:hover, .rc:hover{ transform:none; } }

/* ---------- Simple lined routine card (overrides): plain white, hairline dividers, no tinted boxes ---------- */
.rc{ background:var(--paper-raised); box-shadow:none; }
.rc:hover{ transform:none; box-shadow:0 6px 18px rgba(28,43,36,.07); }
.rt-row.is-over .rc{ background:var(--paper-raised); }
.rt-row.is-today .rc{ box-shadow:none; }
.rc-head{ background:var(--paper-raised); border-top:0; border-bottom:1px solid var(--line); padding:0 18px; }
.rc-head::before{ background:var(--paper-raised); }
.rc-head-t b{ font-size:15px; }
.rc-badge{ background:none; color:var(--rc-b); border:1.5px solid var(--rc-a); padding:1px 10px; }

.rc-body{ padding:0 18px; gap:0; }
.rc-ic{ display:none; }
.rc-item, .rc-ex{ background:none; border:0; border-radius:0; border-top:1px solid var(--line); padding:13px 0; gap:0; }
.rc-item:first-child{ border-top:0; }
.rc-item h3{ font-family:inherit; font-size:14.5px; font-weight:700; }
.rc-exname{ margin-top:1px; }
.rc-chips{ gap:0; margin-top:3px; }
.rc-chips span{ background:none; padding:0; border-radius:0; font-size:12px; font-weight:600; color:var(--slate); }
.rc-chips span + span::before{ content:'·'; margin:0 7px; color:var(--line); font-weight:800; }
.rc-st{ border:0; padding:0; font-size:10.5px; }
.rc-st::before{ content:''; display:inline-block; width:6px; height:6px; border-radius:50%; background:currentColor; margin-right:5px; vertical-align:1px; }
.rc-links{ gap:4px 16px; margin-top:6px; }
.rc-links a{ background:none; border:0; padding:0; border-radius:0; font-weight:600; color:var(--rc-b); text-decoration:underline; text-underline-offset:3px; }
.rc-btn{ background:transparent; color:var(--rc-b); border:1.5px solid var(--rc-a); padding:4px 14px; margin-top:10px; }
.rc-btn:hover{ background:var(--rc-a); color:#fff; }
.rc-btn.done, .rc-btn.off{ color:var(--slate); border-color:var(--line); }
.rc-btn.done:hover{ background:none; color:var(--ink); }
.rc-toggle-card{ align-self:stretch; width:100%; border:0; border-top:1px solid var(--line); border-radius:0; padding:11px 0; text-align:center; background:none; color:var(--rc-b); }
.rc-toggle-card:hover{ background:none; color:var(--rc-b); text-decoration:underline; }
html[data-theme="dark"] .rc-btn, html[data-theme="dark"] .rc-links a, html[data-theme="dark"] .rc-badge, html[data-theme="dark"] .rc-toggle-card{ color:#cfe9dd; }
/* ============================================================
   v2 — coloured item titles, "Next up" banner, filter chips,
   collapsible weeks (user/course_details.php)
   ============================================================ */

/* item type colours: exam = green, sheet = blue, class/event = purple */
.cd-wrap{ --t-exam:#1E7F5C; --t-sheet:#2A65A8; --t-class:#6A4BB0;
          --t-exam-bg:rgba(30,127,92,.10); --t-sheet-bg:rgba(42,101,168,.10); --t-class-bg:rgba(106,75,176,.10); }
html[data-theme="dark"] .cd-wrap{ --t-exam:#5FD3A4; --t-sheet:#7FB2EC; --t-class:#B7A2F0;
          --t-exam-bg:rgba(95,211,164,.14); --t-sheet-bg:rgba(127,178,236,.14); --t-class-bg:rgba(183,162,240,.14); }
.t-exam { --tc:var(--t-exam);  --tc-bg:var(--t-exam-bg); }
.t-sheet{ --tc:var(--t-sheet); --tc-bg:var(--t-sheet-bg); }
.t-class{ --tc:var(--t-class); --tc-bg:var(--t-class-bg); }

/* ---------- Next up banner ---------- */
.rn-next{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; background:var(--paper-raised); border:1px solid var(--line);
  border-radius:14px; padding:12px 16px; margin-bottom:30px; }
.rn-next-ic{ width:40px; height:40px; flex:none; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  background:var(--cc-soft); color:var(--cc-b); }
.rn-next-ic .ic{ width:18px; height:18px; }
html[data-theme="dark"] .rn-next-ic{ color:#fff; }
.rn-next-t{ flex:1; min-width:200px; display:flex; flex-direction:column; gap:2px; }
.rn-next-when{ font-family:var(--font-mono); font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--slate); }
.rn-next-t b{ font-size:15px; color:var(--tc, var(--ink)); }
.rn-next-t b .rc-st{ margin-left:6px; vertical-align:2px; }
.rn-next-t small{ font-size:12.5px; color:var(--slate); }

/* ---------- filter chips + actions ---------- */
.rn-bar{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin:-4px 0 12px; }
.rn-chips, .rn-actions{ display:flex; gap:6px; flex-wrap:wrap; }
.rn-chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 13px; border-radius:99px; border:1.5px solid var(--line);
  background:var(--paper-raised); color:var(--ink); font:inherit; font-size:12.5px; font-weight:700; cursor:pointer; }
.rn-chip:hover{ border-color:var(--cc-a); }
.rn-chip.active{ background:var(--cc-b); border-color:var(--cc-b); color:#fff; }
.rn-dot{ width:8px; height:8px; border-radius:50%; background:var(--tc); display:inline-block; }
.rn-chip.active .rn-dot{ background:#fff; }

/* ---------- collapsible weeks ---------- */
.routine-weeks{ display:flex; flex-direction:column; gap:10px; }
.rw[hidden], .rt-row[hidden]{ display:none !important; }
.rw-head{ width:100%; display:flex; align-items:center; gap:10px; flex-wrap:wrap; text-align:left; cursor:pointer;
  background:var(--paper-raised); border:1px solid var(--line); border-radius:12px; padding:11px 16px; font:inherit; color:var(--ink); }
.rw-head:hover{ border-color:var(--cc-a); }
.rw-head:focus-visible{ outline:2px solid var(--cc-a); outline-offset:2px; }
.rw-chev{ display:inline-block; width:14px; font-size:18px; line-height:1; color:var(--slate); transition:transform .2s ease; }
.rw.is-open .rw-chev{ transform:rotate(90deg); }
.rw-name{ font-size:14.5px; }
.rw-range{ font-family:var(--font-mono); font-size:11.5px; color:var(--slate); }
.rw-badge{ font-size:11px; font-weight:700; padding:1px 9px; border-radius:99px; background:rgba(128,128,128,.12); color:var(--slate); }
.rw-cur  .rw-badge{ background:var(--t-exam-bg);  color:var(--t-exam); }
.rw-next .rw-badge, .rw-far .rw-badge{ background:var(--t-sheet-bg); color:var(--t-sheet); }
.rw-days{ flex:1; display:flex; gap:4px; flex-wrap:wrap; justify-content:flex-end; }
.rw-days span{ font-family:var(--font-mono); font-size:11px; padding:1px 7px; border-radius:6px; background:rgba(128,128,128,.10); color:var(--slate); }
.rw.is-open .rw-days{ visibility:hidden; }             /* date chips only while folded */
.rw-count{ display:flex; gap:10px; font-size:12px; font-weight:700; }
.rw-count span{ color:var(--tc); }
.rw-over .rw-head{ background:color-mix(in srgb, var(--paper-raised) 96%, #808080); }
.rw-body{ display:none; padding:14px 0 8px; }
.rw.is-open .rw-body{ display:flex; flex-direction:column; gap:20px; }
.rw.is-open .rw-head{ border-color:var(--cc-a); }

/* ---------- coloured items inside a date card ---------- */
.rc-item, .rc-ex{ gap:10px; }
.rc-bar{ width:4px; flex:none; align-self:stretch; border-radius:2px; background:var(--tc); }
.rc-item h3.rc-title{ color:var(--tc); }
.rt-row.is-over .rc-item h3.rc-title{ color:var(--tc); opacity:.75; }
.rt-row.is-over .rc-bar{ opacity:.5; }
.rc-tag{ flex:none; font-size:10.5px; font-weight:800; padding:1px 8px; border-radius:99px; background:var(--tc-bg); color:var(--tc); }
.rc-tag.is-live::before{ content:''; display:inline-block; width:6px; height:6px; border-radius:50%; background:currentColor; margin-right:5px; vertical-align:1px; }
.rc-links a{ color:var(--tc); }
.rc-item.rc-filtered{ display:none !important; }
.rc-toggle-card[hidden]{ display:none; }
html[data-theme="dark"] .rc-links a{ color:var(--tc); }

@media (max-width:560px){
  .rw-days{ display:none; }
  .rw-count{ width:100%; padding-left:24px; }
  .rn-actions{ width:100%; }
  .rn-actions .btn{ flex:1; }
}
@media (prefers-reduced-motion:reduce){ .rw-chev{ transition:none; } }

/* ================================================================================================
   Routine — design B (overrides everything above): bright SQUARE date tiles joined by a dotted line,
   each date its own square-cornered box with a coloured top strip; exam names blue, other events orange.
   Grey = over · green = today · blue = upcoming.
   ================================================================================================ */
.routine-timeline{ gap:26px !important; border:0 !important; background:none !important; }
.routine-timeline .rt-row{ --c:#2563eb; --cd:#1d4ed8; --tile:64px; position:relative; display:grid !important;
  grid-template-columns:var(--tile) minmax(0,1fr) !important; column-gap:22px !important; align-items:start !important;
  border:0 !important; background:none !important; }
.routine-timeline .rt-row.is-today{ --c:#16a34a; --cd:#15803d; }
.routine-timeline .rt-row.is-over{ --c:#94a3b8; --cd:#64748b; }
/* dotted line from this date's tile down to the next one */
.routine-timeline .rt-row::after{ display:none !important; content:none !important; }
.routine-timeline .rt-row::before{ content:'' !important; display:block !important; position:absolute; left:calc(var(--tile) / 2 - 1.5px) !important;
  top:calc(var(--tile) + 8px) !important; bottom:-26px !important; width:0 !important; border-left:3px dotted var(--c) !important;
  background:none !important; opacity:1 !important; border-radius:0 !important; }
.routine-timeline .rt-row:last-child::before{ display:none !important; }
/* the date tile */
.routine-timeline .rt-tile{ width:var(--tile) !important; height:var(--tile) !important; border-radius:0 !important; background:var(--c) !important;
  color:#fff !important; opacity:1 !important; border:0 !important; box-shadow:none !important; padding:0 !important; position:relative; z-index:1;
  display:flex !important; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.routine-timeline .rt-tile::before, .routine-timeline .rt-tile::after{ display:none !important; content:none !important; }
.routine-timeline .rt-tile .wd, .routine-timeline .rt-tile .my{ font-size:9.5px !important; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#fff !important; opacity:.95 !important; line-height:1; }
.routine-timeline .rt-tile .dd{ font-size:24px !important; font-weight:800; line-height:1.05; color:#fff !important; }
.routine-timeline .rt-row.is-today .rt-tile{ box-shadow:0 0 0 4px var(--paper), 0 0 0 7px color-mix(in srgb, var(--c) 35%, transparent) !important; }
/* the box */
.routine-timeline .rc{ background:var(--paper-raised) !important; border:1px solid var(--line) !important; border-top:3px solid var(--c) !important;
  border-radius:0 !important; box-shadow:none !important; transform:none !important; overflow:visible; }
.routine-timeline .rc:hover{ box-shadow:0 6px 18px rgba(15,23,42,.07) !important; transform:none !important; }
.routine-timeline .rc-head{ min-height:0 !important; border-radius:0 !important; border:0 !important; padding:10px 16px !important;
  background:color-mix(in srgb, var(--c) 7%, var(--paper-raised)) !important; }
.routine-timeline .rc-head::before{ display:none !important; content:none !important; }
.routine-timeline .rc-head-t{ flex-direction:row; align-items:baseline; gap:10px; flex-wrap:wrap; }
.routine-timeline .rc-head-t b{ font-size:14.5px; color:var(--ink) !important; }
.routine-timeline .rc-head-t small{ font-size:12px; color:var(--slate); }
.routine-timeline .rc-badge{ border-radius:0 !important; font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
  padding:3px 9px !important; background:none !important; border:1.5px solid var(--c) !important; color:var(--cd) !important; }
.routine-timeline .rt-row.is-today .rc-badge{ background:var(--c) !important; color:#fff !important; }
.routine-timeline .rc-body{ padding:0 16px 4px !important; gap:0 !important; opacity:1 !important; }
.routine-timeline .rc-item, .routine-timeline .rc-ex{ border-radius:0 !important; background:none !important; border:0 !important;
  border-top:1px solid var(--line) !important; padding:12px 0 !important; box-shadow:none !important; }
.routine-timeline .rc-body > .rc-item:first-child{ border-top:0 !important; }
.routine-timeline .rc-ic, .routine-timeline .rc-bar{ display:none !important; }
/* titles: exams blue, other events orange */
.routine-timeline .rc-ex h3, .routine-timeline .rc-ex h3.rc-title{ color:#1d4ed8 !important; font-size:15px; font-weight:700; }
.routine-timeline .rc-ev h3, .routine-timeline .rc-ev h3.rc-title{ color:#c2410c !important; font-size:15px; font-weight:700; }
.routine-timeline .rt-row.is-over .rc-ex h3, .routine-timeline .rt-row.is-over .rc-ev h3{ opacity:.8; }
.routine-timeline .rc-ev .rc-links a{ color:#c2410c !important; }
.routine-timeline .rc-exname{ font-size:12px; color:var(--slate); margin-top:2px; }
.routine-timeline .rc-chips span{ font-size:12px; font-weight:600; color:#475569; background:none !important; padding:0 !important; border-radius:0 !important; }
/* every pill / button: square */
.routine-timeline .rc-st, .routine-timeline .rc-tag, .routine-timeline .rc-btn, .routine-timeline .rc-toggle-card, .routine-timeline .rc-links a,
.cd-tools .seg, .cd-tools .seg button, #routinePdfBtn{ border-radius:0 !important; }
.routine-timeline .rc-st{ font-size:10px; font-weight:800; letter-spacing:.05em; padding:2px 7px !important; border:0 !important; background:#f1f5f9; color:#475569; }
.routine-timeline .rc-st::before{ display:none !important; }
.routine-timeline .rc-st.st-running{ background:#dcfce7 !important; color:#15803d !important; }
.routine-timeline .rc-btn{ margin-top:10px; padding:6px 14px !important; font-size:12.5px; font-weight:700; background:var(--c) !important; color:#fff !important; border:1.5px solid var(--c) !important; }
.routine-timeline .rc-btn:hover{ background:var(--cd) !important; border-color:var(--cd) !important; }
.routine-timeline .rc-btn.done, .routine-timeline .rc-btn.off{ background:transparent !important; color:var(--ink) !important; border-color:var(--line) !important; }
.routine-timeline .rc-toggle-card{ color:var(--cd) !important; }
/* topics → Topics Land */
.rc-topics{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px; }
.rc-topics-l{ font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--slate); margin-right:2px; }
.rc-topics a{ font-size:12px; font-weight:600; padding:3px 9px; border:1px solid var(--line); color:var(--cd, #1d4ed8); background:var(--paper-raised); text-decoration:none; border-radius:0; transition:border-color .15s, background .15s; }
.rc-topics a:hover{ border-color:var(--c, #2563eb); background:color-mix(in srgb, var(--c, #2563eb) 8%, transparent); }
/* dark theme: lighter title colours */
html[data-theme="dark"] .routine-timeline .rc-ex h3{ color:#93c5fd !important; }
html[data-theme="dark"] .routine-timeline .rc-ev h3, html[data-theme="dark"] .routine-timeline .rc-ev .rc-links a{ color:#fdba74 !important; }
html[data-theme="dark"] .rc-topics a{ color:#cfe9dd; }
@media (max-width:640px){
  .routine-timeline .rt-row{ --tile:52px; column-gap:14px !important; }
  .routine-timeline .rt-tile .dd{ font-size:20px !important; }
  .routine-timeline .rt-tile .wd, .routine-timeline .rt-tile .my{ font-size:8.5px !important; }
  .routine-timeline .rc-head, .routine-timeline .rc-body{ padding-left:12px !important; padding-right:12px !important; }
}

/* routine date tiles: softer — tinted background, coloured text (was a solid bright block) */
.routine-timeline .rt-tile{ background:color-mix(in srgb, var(--c) 13%, var(--paper-raised)) !important; color:var(--cd) !important;
  border:1.5px solid color-mix(in srgb, var(--c) 45%, transparent) !important; }
.routine-timeline .rt-tile .wd, .routine-timeline .rt-tile .my, .routine-timeline .rt-tile .dd{ color:var(--cd) !important; }
.routine-timeline .rt-row::before{ border-left-color:color-mix(in srgb, var(--c) 55%, transparent) !important; }
.routine-timeline .rt-row.is-today .rt-tile{ box-shadow:0 0 0 3px var(--paper), 0 0 0 5px color-mix(in srgb, var(--c) 25%, transparent) !important; }
html[data-theme="dark"] .routine-timeline .rt-tile, html[data-theme="dark"] .routine-timeline .rt-tile .wd,
html[data-theme="dark"] .routine-timeline .rt-tile .my, html[data-theme="dark"] .routine-timeline .rt-tile .dd{ color:color-mix(in srgb, var(--c) 70%, #fff) !important; }

/* phones: "Enroll Now" and "Browse Other Courses" side by side on one row, a bit smaller */
@media (max-width:640px){
  .cd-actions{ flex-wrap:nowrap !important; gap:8px; }
  .cd-actions .btn{ flex:1 1 0; min-width:0; padding:9px 10px; font-size:13px; min-height:40px; justify-content:center; text-align:center;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
}