/* Design «د · وردي الأفق» (the default): the flourishes of the teacher's first dashboard (commit 847d69f)
   on top of its tokens (tokens.css): the purple → pink → teal header bar, the soft pink / lilac page, stat cards
   each in its own colour, purple → pink progress bars, pink → purple buttons and a gold / silver / bronze podium.
   Every rule starts with html[data-design="d"], so «أ / ب / ج» are untouched. White text only sits on stops that
   give it ≥ 4.5:1 (#6B21A8 8.7, #DB2777 4.6, #0F766E 5.5, #7E22CE 7.0). The student login keeps its own fixed look
   (app.css) and is never styled here. */

html[data-design="d"] { --r-card: 20px; --r-btn: 14px; --d-bar: linear-gradient(to left, #6B21A8, #DB2777, #0F766E); --d-btn: linear-gradient(to left, #DB2777, #7E22CE); --d-prog: linear-gradient(to left, #EC4899, #A855F7); }
html.dark[data-design="d"] { --d-bar: linear-gradient(to left, #3B0764, #9D174D, #0F766E); --d-prog: linear-gradient(to left, #F472B6, #C084FC); }

/* ---- the page: soft pink / lilac (deep purple at night) ---- */
html[data-design="d"] body { background: linear-gradient(135deg, #FDF4FF 0%, #FAE8FF 50%, #F0F9FF 100%) fixed; }
html.dark[data-design="d"] body { background: linear-gradient(135deg, #241B3A 0%, #2E2348 55%, #221C38 100%) fixed; }
html[data-design="d"] .t-app { background: transparent; }
/* the dashboard starts at the very top, so the gradient bar is not cut off by #main's space-y gap */
html[data-design="d"] body.t-mode .t-app { margin-top: 0; }
html[data-design="d"] body::before { background: var(--d-bar); }

/* ---- the header bar (student top bar): the gradient with white text ---- */
html[data-design="d"] .site-head { background: var(--d-bar); border-block-end: 0; box-shadow: 0 10px 24px -14px rgb(157 23 77 / .6); }
html[data-design="d"] .site-title, html[data-design="d"] .site-sub { color: #FFFFFF; }
html[data-design="d"] .site-title { font-weight: 900; }
html[data-design="d"] .site-head .theme-toggle { background: rgb(255 255 255 / .16); border-color: rgb(255 255 255 / .45); color: #FFFFFF; }
html[data-design="d"] .logo-card--header { box-shadow: none; }

/* ---- the teacher's bar: the brand block of the sidebar (the top bar below 1024px) ---- */
html[data-design="d"] .t-side { border-inline-end-color: var(--card-border); }
html[data-design="d"] .t-brand { background: var(--d-bar); border-radius: var(--r-card); padding: var(--s2) var(--s3); box-shadow: 0 10px 24px -14px rgb(157 23 77 / .6); }
html[data-design="d"] .t-brand-t b, html[data-design="d"] .t-brand-t small { color: #FFFFFF; }
html[data-design="d"] .t-brand-t b { font-weight: 900; }
html[data-design="d"] .t-logo { background: rgb(255 255 255 / .18); border: 1.5px solid rgb(255 255 255 / .45); color: #FFFFFF; }
html[data-design="d"] .t-brand .t-icon-btn, html[data-design="d"] .t-brand .theme-toggle, html[data-design="d"] .t-brand .btn-ghost { background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .45); color: #FFFFFF; }
html[data-design="d"] .t-brand .t-icon-btn:hover, html[data-design="d"] .t-brand .btn-ghost:hover:not(:disabled) { background: rgb(255 255 255 / .28); color: #FFFFFF; }
@media (max-width: 1023.98px) {
    html[data-design="d"] .t-side { border-block-end-color: var(--card-border); }
    html[data-design="d"] .t-brand { border-radius: 0; margin-block-end: var(--s2); box-shadow: none; }
}
/* each section's title becomes the gradient header bar (white title, white-on-glass buttons) */
html[data-design="d"] .t-ph:not(.hw-ph) { background: var(--d-bar); border-radius: var(--r-card); padding: var(--s4) var(--s5); align-items: center; min-height: 76px; box-shadow: 0 12px 28px -16px rgb(157 23 77 / .65); }
html[data-design="d"] .t-ph:not(.hw-ph) h1, html[data-design="d"] .t-ph:not(.hw-ph) p { color: #FFFFFF; }
html[data-design="d"] .t-ph h1 { font-weight: 900; }
html[data-design="d"] .t-ph:not(.hw-ph) .btn-ghost { background: rgb(255 255 255 / .16); border-color: rgb(255 255 255 / .45); color: #FFFFFF; }
html[data-design="d"] .t-ph:not(.hw-ph) .btn-ghost:hover:not(:disabled) { background: rgb(255 255 255 / .28); }
html[data-design="d"] .t-ph:not(.hw-ph) .btn-primary { background: #FFFFFF; color: #9D174D; box-shadow: 0 6px 16px -8px rgb(59 7 100 / .5); }
@media (max-width: 767.98px) { html[data-design="d"] .t-ph:not(.hw-ph) { padding: var(--s3) var(--s4); min-height: 0; } }

/* ---- the chosen tab / button: pink → purple ---- */
html[data-design="d"] .t-nav a[aria-current="page"], html[data-design="d"] .nav button[aria-current="page"] .pill { background: var(--d-btn); color: #FFFFFF; box-shadow: 0 6px 14px -8px rgb(219 39 119 / .7); }
html[data-design="d"] .t-nav a[aria-current="page"] i { color: #FFFFFF; }
html[data-design="d"] .t-nav a[aria-current="page"] .t-badge { background: #FFFFFF; color: #9D174D; }
html[data-design="d"] .btn-primary { background: var(--d-btn); color: #FFFFFF; }
html[data-design="d"] .btn-primary:not(:disabled):hover { box-shadow: 0 10px 22px -8px rgb(219 39 119 / .7); }

/* ---- stat cards: white, each with its own soft border and number colour (students · today · stars · questions) ---- */
html[data-design="d"] .t-kpi { --k-bd: #E9D5FF; --k-fg: #6B21A8; --k-ic: #F3E8FF; border: 2px solid var(--k-bd); }
html[data-design="d"] .t-kpi:nth-child(4n+2) { --k-bd: #FBCFE8; --k-fg: #BE185D; --k-ic: #FCE7F3; }
html[data-design="d"] .t-kpi:nth-child(4n+3) { --k-bd: #FDE68A; --k-fg: #B45309; --k-ic: #FEF3C7; }
html[data-design="d"] .t-kpi:nth-child(4n+4) { --k-bd: #A7F3D0; --k-fg: #047857; --k-ic: #D1FAE5; }
html.dark[data-design="d"] .t-kpi { --k-bd: rgb(216 180 254 / .35); --k-fg: #E9D5FF; --k-ic: rgb(168 85 247 / .22); }
html.dark[data-design="d"] .t-kpi:nth-child(4n+2) { --k-bd: rgb(249 168 212 / .35); --k-fg: #FBCFE8; --k-ic: rgb(236 72 153 / .2); }
html.dark[data-design="d"] .t-kpi:nth-child(4n+3) { --k-bd: rgb(252 211 77 / .35); --k-fg: #FCD34D; --k-ic: rgb(245 158 11 / .18); }
html.dark[data-design="d"] .t-kpi:nth-child(4n+4) { --k-bd: rgb(110 231 183 / .3); --k-fg: #A7F3D0; --k-ic: rgb(16 185 129 / .18); }
html[data-design="d"] .t-kpi .ic, html[data-design="d"] .t-kpi .ic.gold { background: var(--k-ic); color: var(--k-fg); }
html[data-design="d"] .t-kpi b { color: var(--k-fg); font-size: 26.5px; font-weight: 900; }
@media (max-width: 767.98px) { html[data-design="d"] .t-kpi b { font-size: 22px; } }

/* ---- progress bars: purple → pink ---- */
html[data-design="d"] .bar { background: #F3E8FF; }
html.dark[data-design="d"] .bar { background: var(--tint); }
html[data-design="d"] .bar i { background: var(--d-prog); }
html[data-design="d"] .t-rk li { border: 1.5px solid var(--card-border); border-radius: var(--r-btn); padding-inline: var(--s2) var(--s3); margin-block-end: var(--s2); background: var(--surface); }
html[data-design="d"] .t-rk li:first-child { border-block-start: 1.5px solid var(--card-border); }

/* ---- the podium: gold centre, silver and bronze beside it ---- */
html[data-design="d"] .t-podcard { border: 2px solid #FDE68A; box-shadow: 0 0 25px rgb(236 72 153 / .14), var(--card-shadow); }
html.dark[data-design="d"] .t-podcard { border-color: rgb(252 211 77 / .35); box-shadow: 0 0 30px rgb(236 72 153 / .12); }
html[data-design="d"] .t-pod-txt h2 { color: #B45309; font-weight: 900; }
html.dark[data-design="d"] .t-pod-txt h2 { color: #FCD34D; }
html[data-design="d"] .mp { --m-1: #F1F5F9; --m-2: #E2E8F0; --m-bd: #94A3B8; --m-fg: #334155; }
html[data-design="d"] .mp1 { --m-1: #FEF3C7; --m-2: #FDE68A; --m-bd: #F59E0B; --m-fg: #92400E; }
html[data-design="d"] .mp3 { --m-1: #FFEDD5; --m-2: #FED7AA; --m-bd: #F97316; --m-fg: #9A3412; }
html.dark[data-design="d"] .mp { --m-1: #2A3342; --m-2: #3B4658; --m-fg: #E2E8F0; }
html.dark[data-design="d"] .mp1 { --m-1: #4A3410; --m-2: #6B4A0E; --m-fg: #FDE68A; }
html.dark[data-design="d"] .mp3 { --m-1: #4A2412; --m-2: #6A3416; --m-fg: #FED7AA; }
html[data-design="d"] .mp .blk { background: linear-gradient(145deg, var(--m-1), var(--m-2)); border: 2px solid var(--m-bd); border-block-end: 0; color: var(--m-fg); box-shadow: none; }
html.dark[data-design="d"] .mp1 .blk { color: var(--m-fg); }
html[data-design="d"] .mp .av { background: linear-gradient(145deg, var(--m-1), var(--m-2)); color: var(--m-fg); box-shadow: 0 0 0 2px var(--m-bd); }
html[data-design="d"] .mp1 .av { box-shadow: 0 0 0 3px var(--m-bd), 0 6px 16px -6px rgb(245 158 11 / .7); }
html[data-design="d"] .crown { color: #F59E0B; }

/* ---- the student's challenge: rosy question card and answers ---- */
html[data-design="d"] .eqcard { background: radial-gradient(100% 80% at 50% 0%, var(--surface) 0%, var(--tint) 75%); }
html.dark[data-design="d"] .eqcard { background: radial-gradient(100% 80% at 50% 0%, #4A3A6A 0%, var(--tint) 75%); }
html[data-design="d"] .ans { border: 2px solid var(--card-border); box-shadow: var(--card-shadow); }
html.dark[data-design="d"] .ans { border-color: var(--border); box-shadow: none; }
html[data-design="d"] .ans[aria-pressed="true"] { border-color: var(--primary); }

/* ---- the student's top bar: a rosy card, the avatar in a pink → purple ring, lilac / gold / pink cards
   (the stat-card colours, ≥ 6.3:1) ---- */
html[data-design="d"] .ch-top { --av-ring: var(--d-btn); background: linear-gradient(160deg, var(--surface) 0%, var(--surface) 55%, #FDF2F8 100%); border: 2px solid #F3E8FF; box-shadow: 0 14px 30px -20px rgb(157 23 77 / .45); }
html.dark[data-design="d"] .ch-top { --av-ring: linear-gradient(to left, #F472B6, #C084FC); background: linear-gradient(160deg, var(--surface) 0%, #3A2D57 100%); border-color: rgb(216 180 254 / .25); box-shadow: none; }
html[data-design="d"] .ch-top .chip-tint { --c-bg: #F3E8FF; --c-bd: #E9D5FF; --c-fg: #6B21A8; }
html[data-design="d"] .ch-top .chip-gold { --c-bg: #FEF3C7; --c-bd: #FDE68A; --c-fg: #92400E; }
html[data-design="d"] .ch-top .chip-plain { --c-bg: #FCE7F3; --c-bd: #FBCFE8; --c-fg: #9D174D; }
html.dark[data-design="d"] .ch-top .chip-tint { --c-bg: rgb(168 85 247 / .2); --c-bd: rgb(216 180 254 / .35); --c-fg: #E9D5FF; }
html.dark[data-design="d"] .ch-top .chip-gold { --c-bg: rgb(245 158 11 / .16); --c-bd: rgb(252 211 77 / .35); --c-fg: #FCD34D; }
html.dark[data-design="d"] .ch-top .chip-plain { --c-bg: rgb(236 72 153 / .18); --c-bd: rgb(249 168 212 / .35); --c-fg: #FBCFE8; }
html[data-design="d"] .ch-top .ch-row .chip { background: var(--c-bg); border-color: var(--c-bd); color: var(--c-fg); }
html[data-design="d"] .ch-top .ch-row .chip i { color: var(--c-fg); }
html[data-design="d"] .ch-top .ch-row .chip-gold i { color: #D97706; }
html[data-design="d"] .ch-top .ch-act { background: #FDF4FF; border-color: #F3E8FF; }
html[data-design="d"] .ch-top .ch-act:hover { background: #FCE7F3; border-color: #F9A8D4; }
html.dark[data-design="d"] .ch-top .ch-act { background: rgb(255 255 255 / .06); border-color: rgb(216 180 254 / .3); }
html.dark[data-design="d"] .ch-top .ch-act:hover { background: rgb(236 72 153 / .18); }
html[data-design="d"] .ch-top .bar { background: #F3E8FF; }
html.dark[data-design="d"] .ch-top .bar { background: var(--tint); }
html[data-design="d"] .ch-top .bar i { box-shadow: 0 0 12px rgb(236 72 153 / .45); }
/* the bar is a strong gradient with white writing in both modes: the logo with white lettering */
html[data-design="d"] .site-head .logo-card .lg-light { display: none; }
html[data-design="d"] .site-head .logo-card .lg-dark { display: block; }
