/* App shell, top bar, library, masthead, two-column lesson layout. */

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--s-24); }

/* ---------- Top navigation ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--topbar-h);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
/* Success-journey accent: a thin blue -> saffron -> green progress line. */
.topbar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--saffron) 52%, var(--green) 100%);
}

/* Brand: logo beside a stacked column (name on top, tagline + bar beneath). */
.brand-block {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 6px 0;
}
.brand-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}

/* Learn -> Practice -> Ace: a simple tagline with a blue progression bar. */
.nav-journey {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.nj-tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--utility-font);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-journey .nj-learn { color: var(--blue-deep); }
.nav-journey .nj-practice { color: var(--saffron-deep); }
.nav-journey .nj-ace { color: var(--green-deep); font-weight: 900; }
.nav-journey .nj-sep { color: var(--ink-faint); font-weight: 400; }
.nav-journey .nj-check {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: .52rem;
  font-weight: 900;
}
/* Blue progression bar under the tagline. */
.nj-bar {
  position: relative;
  height: 4px;
  width: 100%;
  background: var(--blue-soft);
  border-radius: var(--pill);
  overflow: hidden;
}
.nj-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 68%;
  background: var(--blue);
  border-radius: var(--pill);
  animation: nj-fill 1.1s ease-out both;
}
@keyframes nj-fill { from { width: 0; } to { width: 68%; } }
@media (prefers-reduced-motion: reduce) {
  .nj-bar-fill { animation: none; }
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--s-16);
  min-height: var(--topbar-h);
  padding: 0 var(--s-24);
  max-width: 1240px;
  margin: 0 auto;
}
/* Sleek brand logo display using the official logo image */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  margin-left: 4px;
  margin-right: 4px;
  text-decoration: none;
  cursor: pointer;
  height: auto;
  border: 0;
  border-radius: 4px;
  overflow: visible;
  transition: transform 0.16s ease, filter 0.16s ease;
}
.brand:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  text-decoration: none;
}
.brand-logo-img {
  height: 88px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
/* Text wordmark shown next to the icon. */
.brand-name {
  font-family: var(--display-font);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--blue-deep);
  white-space: nowrap;
}
.brand-name .bn-accent { color: var(--saffron-deep); }
.brand::before, .brand::after {
  content: none !important;
  display: none !important;
}

/* Archived Cursive / Copper Brand Styling (Preserved in codebase) */
.brand-cursive {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-left: -22px;
  font-family: var(--hand-font);
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: normal;
  white-space: nowrap;
  padding: 0 6px 1px 6px;
  text-shadow: 2px 2px 0 rgba(184, 115, 51, 0.4);
  color: #B87333;
}
.brand-cursive .stylish-letter {
  display: inline-block;
  color: var(--blue);
  margin-right: -0.22em;
}
.brand .ar { font-family: var(--arabic-font); color: var(--saffron-deep); }
/* =========================================================
   ELC STEEL PLAQUE (adapted from the ELC 3D plaque concept)
   Steel body + brushed texture + moving highlight + 4 DOM
   screws (translateZ) + badge / ELC / subtitle / tagline.
========================================================= */
/* Header banner text (no rectangle container — plain typographic lockup). */
.brand-tag {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  white-space: nowrap;
}

/* No machined border or reflection without the rectangle. */
.brand-tag::before,
.brand-tag::after { content: none; }

/* ---------- Screws (DOM elements, pop out in 3D) ---------- */
.brand-tag .screw {
  display: none;
  width: 18px;
  height: 18px;
  position: absolute;
  z-index: 10;
  border-radius: 50%;
  transform: translateZ(6px);
  border: 1px solid rgba(20,25,30,.65);
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.95) 0 6%, transparent 7%),
    radial-gradient(circle at 35% 35%,
      #e6ebee 0%,
      #aab2b7 32%,
      #687177 58%,
      #40474c 72%,
      #ccd2d5 100%);
  box-shadow:
    inset 2px 2px 4px rgba(255,255,255,.8),
    inset -2px -2px 4px rgba(0,0,0,.5),
    0 3px 5px rgba(0,0,0,.45);
}
.brand-tag .screw::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 2px;
  left: 4px;
  top: 8px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #32383c, #c5ccd0 48%, #373d42);
  transform: rotate(var(--screw-angle));
  box-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.brand-tag .screw-tl { top: 12px; left: 12px; --screw-angle: 14deg; }
.brand-tag .screw-tr { top: 12px; right: 12px; --screw-angle: -27deg; }
.brand-tag .screw-bl { left: 12px; bottom: 12px; --screw-angle: 34deg; }
.brand-tag .screw-br { right: 12px; bottom: 12px; --screw-angle: -11deg; }

/* ---------- Header lockup (beside the wordmark) ----------
   "Your complete 2BAC English companion" — Georgia serif headline with a
   gold hand-drawn underline under "2BAC English". Compact on lesson/legal
   bars. */
.header-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin-left: -8px;
  padding: 4px 0;
  white-space: nowrap;
  text-transform: none;            /* override the uppercase from .brand-tag */
  font-family: inherit;
}
.hl-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.hl-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15px, 1.7vw, 22px);
  line-height: 1.05;
  letter-spacing: -.02em;
  font-weight: 500;
  color: #fff8e6;
  white-space: nowrap;
}
.hl-top {
  display: inline-flex;
  white-space: nowrap;
}
/* "companion" starts exactly under the word "English" (left edge). */
.hl-bottom {
  display: flex;
  white-space: nowrap;
  margin-top: 2px;
}
.hl-under {
  display: inline-block;
  visibility: hidden;
  width: 6.2ch;
  font-family: var(--display-font);
  font-weight: 900;
  letter-spacing: -.03em;
}
.hl-soft { color: rgba(255, 248, 230, .82); }
.hl-featured {
  position: relative;
  display: inline-block;
  margin: 0 .08em 0 .22em;
  font-family: var(--display-font);
  font-weight: 900;
  letter-spacing: -.03em;
  color: #ffd564;
}
/* hand-drawn underline */
.hl-featured::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -3%;
  bottom: -.12em;
  height: 5px;
  background: #d9b13e;
  border-radius: 70% 30% 60% 40% / 55% 45% 60% 40%;
  transform: rotate(-1.1deg) skewX(-12deg);
  opacity: .95;
  box-shadow: 9px 1px 0 -2px #d9b13e;
}
/* Consistent headline size on every page — dashboard is the source of truth. */
@media (max-width: 1100px) {
  .topbar--dashboard .hl-headline { font-size: clamp(14px, 1.6vw, 19px); }
}
/* Masthead title line as a breadcrumb: Unit 02 › Theme › Lesson N of M.
   `.code` parts (Unit / Lesson) keep the small mono look; the theme is the
   emphasised middle; `›` separators are faint. All three parts are bold. */
.masthead .unit-line .code {
  font-weight: 700;
}
.masthead .unit-line .uc-theme {
  font-family: var(--reading-font);
  font-size: 1rem;
  color: var(--ink);
  font-weight: 700;
}
.masthead .unit-line .uc-sep {
  font-family: var(--utility-font);
  color: var(--ink-faint);
  margin: 0 7px;
}
.topbar-controls { display: flex; align-items: center; gap: var(--s-8); margin-left: auto; }
/* Lesson header: the nav menu's auto-margin pushes the whole right group
   (nav + prev/next + Sign in), so the controls sit right beside the nav. */
.topbar--dashboard .dash-nav ~ .topbar-controls { margin-left: var(--s-12); }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border-radius: var(--r-sm);
}
.study-nav-btn {
  width: 60px;
  height: 60px;
  overflow: visible;
}
.study-nav-icon {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.study-nav-icon svg { display: block; width: 100%; height: 100%; }
.size-controls { display: inline-flex; align-items: center; gap: 6px; }
.size-controls .code { padding: 0 4px; }
.size-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.size-btn:hover:not(:disabled) {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.size-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- Library ---------- */
.library-page { min-height: 100vh; }
.library-wrap { max-width: 1240px; }
.library-head {
  padding: clamp(30px, 5vw, 56px) 0 26px;
  border-bottom: 2px solid var(--ink);
}
.library-head h1 {
  margin: 0 0 var(--s-16);
  font-size: clamp(2.4rem, 4.6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.05;
}
.library-head .library-ar {
  display: inline-block;
  color: var(--saffron-deep);
  direction: rtl;
  font-family: var(--arabic-font);
  font-size: .45em;
  font-weight: 600;
  letter-spacing: 0;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.library-head .library-separator {
  color: var(--saffron-deep);
  font-size: .45em;
  letter-spacing: 0;
  vertical-align: .18em;
}
.library-head p {
  max-width: 60ch;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--reading-font);
  font-size: 1.03rem;
  line-height: 1.55;
}
.library-head .library-sub {
  margin: 0 0 var(--s-10);
  color: var(--saffron-deep);
  font-family: var(--utility-font);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.library-head .library-intro { font-family: var(--reading-font); }
.library-head p strong { color: var(--ink); font-weight: 700; }
.resume-row { margin-top: var(--s-20); }
.hero-resume-card {
  display: block;
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  border: 0;
  border-radius: var(--r-lg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
  min-height: 48px; /* Touch target minimum */
}
.hero-resume-card:hover:not(:disabled),
.hero-resume-card:focus-visible:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 50, 150, 0.2);
}
.hero-resume-card:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 4px;
}
.hero-resume-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.hero-resume-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--utility-font);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
}
.hero-resume-title {
  font-family: var(--display-font);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
}
.hero-resume-progress {
  font-family: var(--utility-font);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}
.hero-resume-action {
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  width: 48px; /* Touch target size */
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  z-index: 2;
}
.hero-resume-card:hover .hero-resume-action,
.hero-resume-card:focus-visible .hero-resume-action {
  background: #fff;
  color: var(--blue-deep);
  transform: translateY(-50%) translateX(4px);
}
.hero-resume-arrow { font-size: 1.5rem; }
.hero-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}
.hero-progress-fill {
  height: 100%;
  background: var(--saffron);
  transition: width 0.3s ease;
}

/* Accordion unit groups (area/category screens) — bordered card style. */
.unit-group { margin-bottom: var(--s-14); }
.unit-heading { margin: 0; }
.unit-toggle {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-12) var(--s-16);
  color: var(--ink);
  font-family: var(--display-font);
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.unit-toggle:hover { background: var(--saffron-soft); border-color: var(--line-strong); }
.unit-group:not(.is-collapsed) .unit-toggle { border-radius: var(--r-md) var(--r-md) 0 0; }

.unit-toggle .uc-icon {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  color: var(--blue-deep);
  flex-shrink: 0;
}
.unit-toggle .uc-titles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.unit-toggle .uc-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.unit-toggle .unit-no {
  color: var(--saffron-deep); font-family: var(--utility-font);
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; white-space: nowrap;
}
.unit-toggle .unit-name {
  font-family: var(--display-font); font-weight: 800; font-size: 1.02rem;
  color: #0b2342; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.unit-toggle .unit-sub {
  width: 100%;
  font-family: var(--reading-font); font-size: .78rem; color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.unit-group-meta { display: flex; align-items: center; gap: var(--s-10); flex-shrink: 0; }
.unit-count {
  font-family: var(--utility-font); font-size: .72rem; font-weight: 700;
  color: var(--ink-soft); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--pill);
  padding: 2px 10px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.unit-chevron { display: inline-flex; width: 20px; height: 20px; color: var(--ink-faint); transition: transform .2s ease; }
.unit-chevron svg { width: 20px; height: 20px; }
.unit-group:not(.is-collapsed) .unit-chevron { transform: rotate(180deg); }

.unit-group.is-collapsed .rows-grid { display: none; }

/* "Coming soon" category (no lessons yet): dimmed header, non-interactive, badge. */
.unit-group--soon { opacity: .6; }
.unit-toggle--soon { cursor: default; }
.unit-soon-badge {
  margin-left: auto;
  font-family: var(--utility-font);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--saffron-deep);
  background: var(--saffron-soft);
  border-radius: var(--pill);
  padding: 3px 10px;
  white-space: nowrap;
}

/* 2-column lesson-row grid on desktop (1-col below 1080px via responsive.css). */
.rows-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  align-items: start;
}
/* Category screen (e.g. Language Skills): stack each lesson in its own full-width row. */
.cat-rows .rows-grid { grid-template-columns: minmax(0, 1fr); }

/* Accordion body: bordered box under the header; rows clip to the rounded corners. */
.unit-group .rows-grid {
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.unit-group .rows-grid .lesson-row:last-child { border-bottom: none; }
.cat-rows .lesson-row:hover, .cat-rows .lesson-row:focus-visible {
  transform: none;
  background: var(--saffron-soft);
}

.lesson-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 0;
  padding: var(--s-16) var(--s-14) calc(var(--s-16) + 2px) var(--s-14);
  transition: background .16s, border-color .16s, transform .16s;
  position: relative;
  min-height: 48px; /* Touch target minimum */
  cursor: pointer;
}
.lesson-row:hover, .lesson-row:focus-visible { 
  background: var(--surface); 
  border-left-color: var(--saffron); 
  transform: translateX(4px); 
}
.lesson-row:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}
.lesson-row .lr-code {
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink-soft);
  font-family: var(--utility-font);
  font-size: .72rem;
  font-weight: 700;
}
.lesson-row .lr-title {
  display: block;
  font-family: var(--display-font);
  font-weight: 800;
  font-size: 1.19rem;
  line-height: 1.3;
}
.lesson-row .lr-meta {
  display: block;
  font-family: var(--utility-font);
  font-size: .72rem;
  line-height: 1.5;
  color: var(--ink-faint);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
.library-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--pill);
  font-family: var(--utility-font);
  font-size: .69rem;
  font-weight: 700;
  white-space: nowrap;
}
.library-status-icon { display: flex; align-items: center; }
.library-status-wrap.done { background: var(--green-soft); color: var(--green-deep); border: 1px solid var(--green); }
.library-status-wrap.prog { background: var(--blue-soft); color: var(--blue-deep); border: 1px solid var(--blue); }
.library-status-wrap.new { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line-strong); }

.lr-progress-track {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1;
}
.lesson-row:hover .lr-progress-track, .lesson-row:focus-visible .lr-progress-track {
  background: rgba(0,0,0,0.05);
}
.lr-progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 0 4px 4px 0;
  transition: width 0.3s ease;
}
.lesson-row .lr-arrow { color: var(--blue-deep); font-size: 1.35rem; transition: transform .15s; }
.lesson-row:hover .lr-arrow, .lesson-row:focus-visible .lr-arrow { transform: translateX(4px); }

.footer {
  margin-top: var(--s-52);
  padding: var(--s-24) 0 var(--s-40);
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--utility-font);
  font-size: .72rem;
}
.library-footer { 
  display: flex; 
  flex-wrap: wrap; 
  justify-content: space-between;
  align-items: center; 
  gap: var(--s-14); 
  border-top-color: var(--line-strong); 
}

.footer-legal-links {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

/* ---------- Lesson layout ---------- */
.lesson-main { padding: var(--s-24) 0 var(--s-80); }
.lesson-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: var(--s-40);
  align-items: start;
}

.masthead { padding-bottom: var(--s-20); margin-bottom: var(--s-24); }
.all-lessons-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--blue);
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-family: var(--utility-font);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.all-lessons-btn:hover:not(:disabled) {
  border-color: var(--blue-deep);
  background: var(--blue-deep);
  color: #fff;
}
.all-lessons-floating-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: var(--s-10);
  min-height: 0;
  padding: 11px 18px;
  border: 1px solid var(--blue-deep);
  border-radius: var(--r-md);
  background: var(--blue);
  color: #fff;
  font-size: .91rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.all-lessons-floating-btn:hover:not(:disabled) {
  border-color: var(--blue-deep);
  background: var(--blue-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.all-lessons-floating-btn .resume-arrow {
  font-size: 1.15rem;
}
.masthead .unit-line { display: flex; align-items: center; gap: var(--s-10); color: var(--ink-soft); }
.masthead h1 {
  margin: var(--s-10) 0 var(--s-8);
  font-family: var(--display-font);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.masthead .instruction { color: var(--ink-soft); max-width: 60ch; }
.masthead .meta-row { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-top: var(--s-16); }
.progress-line { margin-top: var(--s-16); }
.progress-track {
  height: 8px; border-radius: var(--pill);
  background: var(--surface-2); border: 1px solid var(--line);
  overflow: hidden;
}
.progress-fill { height: 100%; width: 0; background: var(--green); transition: width .5s ease; }
.progress-label { font-family: var(--utility-font); font-size: .72rem; color: var(--ink-soft); margin-top: 6px; }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-12);
}
.reading-heading {
  justify-content: flex-start;
  gap: var(--s-14);
  margin: 0 0 var(--s-20);
  flex-wrap: wrap;
}
.reading-heading .reading-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--saffron);
  color: var(--surface);
  font-family: var(--display-font);
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 3px 3px 0 rgba(176,125,31,.3);
  transform: rotate(-3deg);
}
.reading-heading h2 {
  font-family: var(--display-font);
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.1;
  text-transform: uppercase;
}
.reading-heading .reading-rule {
  flex: 1 1 40px;
  min-width: 30px;
  height: 1px;
  background: var(--ink);
}
.reading-heading .reading-count {
  color: var(--ink-soft);
  font-family: var(--utility-font);
  font-size: .72rem;
  white-space: nowrap;
}
.listen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  transition: background .15s, color .15s, border-color .15s;
}
.listen-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.listen-btn.playing { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.listen-btn.paused { border-color: var(--saffron); color: var(--saffron-deep); background: var(--saffron-soft); }
.listen-btn.audio-error { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.listen-btn .listen-icon { display: inline-flex; align-items: center; justify-content: center; }
.listen-btn .listen-icon svg { width: 13px; height: 13px; }
.listen-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Rail ---------- */
.rail {
  position: sticky;
  top: calc(var(--topbar-h) + var(--s-16));
  max-height: calc(100vh - var(--topbar-h) - var(--s-32));
  overflow: auto;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-16);
}
.rail h2 { font-size: .95rem; }
.rail-heading { align-items: center; }
.wb-close {
  display: none;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
}
.rail .rail-sub { font-family: var(--utility-font); font-size: .68rem; color: var(--ink-faint); margin: 2px 0 var(--s-12); }

.wordbank {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.wordbank li { border-top: 1px solid var(--line); }
.wordbank li:first-child { border-top: 0; }
.wb-item {
  width: 100%;
  padding: var(--s-12) 6px;
}
.wb-term {
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr) auto;
  grid-template-areas:
    "num en audio"
    ". ar ar";
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
}
.wb-term .listen-btn { grid-area: audio; }
.wb-num { grid-area: num; font-family: var(--utility-font); font-size: .68rem; color: var(--ink-faint); text-align: right; }
.wb-en { grid-area: en; font-family: var(--reading-font); font-weight: 600; color: var(--ink); }
.wb-ar {
  grid-area: ar;
  justify-self: end;
  padding: 1px 8px 2px;
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-family: var(--arabic-font);
  text-align: right;
}
.wb-def {
  margin: 5px 0 0 calc(2ch + 8px);
  color: var(--ink-soft);
  font-size: .88rem;
  line-height: 1.4;
}
.wb-syn {
  margin: 3px 0 0 calc(2ch + 8px);
  color: var(--ink);
  font-family: var(--utility-font);
  font-size: .78rem;
  line-height: 1.35;
  font-weight: 600;
}
.wb-syn-label { color: var(--saffron-deep); font-weight: normal; }

.minimap { margin-top: var(--s-16); padding-top: var(--s-12); border-top: 1px solid var(--line); }
.minimap h3 { font-size: .8rem; color: var(--ink-soft); margin-bottom: var(--s-8); }
.minimap-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-dot {
  width: 26px; height: 22px; padding: 0;
  display: inline-grid; place-items: center;
  font-family: var(--utility-font); font-size: .62rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.mm-dot[data-state="answered"] { border-color: var(--blue); color: var(--blue-deep); background: var(--blue-soft); }
.mm-dot[data-state="checked-correct"] { border-color: var(--green); color: #fff; background: var(--green); }
.mm-dot[data-state="checked-incorrect"] { border-color: var(--red); color: #fff; background: var(--red); }

/* ---------- Mobile word-bank sheet & check bar (hidden on desktop) ---------- */
.wb-fab, .mobile-bar { display: none; }
.sheet-backdrop { display: none; }

/* ---------- Homepage redesign: skip link, utility bar, jump nav, hero progress, categories, back-to-top ---------- */

/* Skip link — visually hidden until focused (first focusable element). */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--r-md);
  font-family: var(--utility-font);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 8px;
  color: #fff;
  text-decoration: none;
}

/* Sticky utility bar — search + status chips + live count. */
.utility-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px -4px rgba(31, 39, 51, .12);
}
.utility-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  flex-wrap: wrap;
  padding: var(--s-12) 0;
}
.lib-search {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--reading-font);
  font-size: .95rem;
}
.lib-search::placeholder { color: var(--ink-faint); }
.lib-search:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.lib-chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lib-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--utility-font);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.lib-chip:hover:not(.is-active) { background: var(--surface-2); }
.lib-chip.is-active {
  background: var(--blue);
  border-color: var(--blue-deep);
  color: #fff;
}
.lib-count {
  font-family: var(--utility-font);
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  margin-left: auto;
}

/* Jump nav — anchor links to categories + unit groups. */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--s-16) 0;
  border-bottom: 1px solid var(--line);
}
.jump-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--blue-deep);
  font-family: var(--utility-font);
  font-size: .73rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.jump-link:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  text-decoration: none;
}

/* Hero progress overview — completed / total + thin bar. */
.hero-progress {
  margin-top: var(--s-16);
  max-width: 340px;
}
.hero-progress-text {
  display: block;
  font-family: var(--utility-font);
  font-size: .76rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.hero-progress .bar {
  height: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  overflow: hidden;
}
.hero-progress .fill {
  height: 100%;
  background: var(--green);
  border-radius: var(--pill);
  transition: width .4s ease;
}

/* Category sections — two labelled groups (Reading, Mocks). */
.category-section {
  padding-top: var(--s-24);
}
.category-title {
  display: flex;
  align-items: baseline;
  gap: var(--s-12);
  margin: 0 0 var(--s-12);
  padding-bottom: var(--s-10);
  border-bottom: 2px solid var(--ink);
  font-family: var(--display-font);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}
.category-count {
  font-family: var(--utility-font);
  font-size: .7rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Empty-state message when no rows match filters. */
.lib-empty {
  padding: var(--s-24) var(--s-16);
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--reading-font);
  font-size: .95rem;
}

/* Back-to-top — fixed button, appears after scrolling past hero. */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--blue-deep);
  border-radius: var(--r-md);
  background: var(--blue);
  color: #fff;
  font-family: var(--display-font);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s, background .15s;
}
/* Darken on hover. Higher specificity than base.css's global
   button:hover background, so the global cream override never wins. */
button.back-to-top:hover:not(:disabled) {
  background: var(--blue-deep);
  transform: translateY(-2px);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
}
.back-to-top[hidden] { display: none; }

/* ==========================================================================
   Homepage dashboard (dark frame + light panel). Scoped to the library view;
   the lesson view keeps the editorial/warm styling.
   ========================================================================== */

/* --- Dark top navbar (homepage only) --- */
.topbar--dashboard { 
  background: transparent;
  border-bottom: none; 
  padding-top: 16px;
}
.topbar--dashboard .topbar-inner {
  padding: 0;
}
.topbar--dashboard .brand-name { color: #fff; }
.topbar--dashboard .brand-name .bn-accent { color: var(--dash-gold); }
/* Top navbar tagline tuned for all dashboard/lesson bars */
.topbar--dashboard .nav-journey,
.topbar--home .nav-journey { display: inline-flex; }
.topbar--dashboard .nav-journey .nj-learn,
.topbar--home .nav-journey .nj-learn { color: #7FB2E0; }
.topbar--dashboard .nav-journey .nj-practice,
.topbar--home .nav-journey .nj-practice { color: var(--dash-gold); }
.topbar--dashboard .nav-journey .nj-ace,
.topbar--home .nav-journey .nj-ace { color: #8FCB93; }
.topbar--dashboard .nav-journey .nj-sep,
.topbar--home .nav-journey .nj-sep { color: rgba(255, 255, 255, .5); }
.topbar--dashboard .nav-journey .nj-bar,
.topbar--home .nav-journey .nj-bar { background: rgba(255, 255, 255, .2); }
.topbar--dashboard .nav-journey .nj-bar-fill,
.topbar--home .nav-journey .nj-bar-fill { background: var(--dash-gold); }
.topbar--dashboard .brand-logo-img { background: transparent; border-radius: 0; padding: 0; }
.topbar--dashboard .icon-btn { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .28); box-shadow: none; }
.topbar--dashboard .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.topbar--dashboard .lesson-step-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  box-shadow: none;
  font-family: var(--display-font);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.topbar--dashboard .lesson-step-btn:hover:not(:disabled) {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(46, 109, 164, .35);
}
.topbar--dashboard .lesson-step-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.topbar--dashboard .lesson-step-btn:active:not(:disabled) { transform: translateY(0); }
.topbar--dashboard .lesson-step-btn:disabled {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .35);
  box-shadow: none;
}
.lesson-step-arrow { display: block; line-height: 0; }
.lesson-step-arrow svg { display: block; }
/* Optical centering: chevrons sit slightly off-center in a circle. */
.lesson-step-prev .lesson-step-arrow svg { transform: translateX(-1px); }
.lesson-step-next .lesson-step-arrow svg { transform: translateX(1px); }
.topbar--dashboard .size-controls .code { color: rgba(255, 255, 255, .85); }

/* ---------- Dashboard Top Navigation Bar ---------- */
.dash-unified-overlay {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  /* navy gradient + subtle academic grid */
  background:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(135deg, #0a2340, #071a30);
  background-size: 34px 34px, 34px 34px, auto;
  padding: 8px 20px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}
.dash-unified-overlay > :not(.glow):not(.spark) {
  position: relative;
  z-index: 1;
}
.dash-unified-overlay .brand-tag {
  margin-left: 0;
}

/* Cursor spotlight that follows the pointer (home header only) */
.topbar--home .glow {
  position: absolute;
  width: 340px;
  height: 340px;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(255, 213, 100, .11), transparent 68%);
  opacity: .8;
}

.dash-nav { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin-left: auto;
}
.dash-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .7);
  font-family: var(--display-font);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1.5px solid transparent;
  transition: all .18s ease;
  white-space: nowrap;
}
.dash-nav-link svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
  opacity: .85;
}
.dash-nav-link:hover, .dash-nav-link:focus-visible {
  color: #FFD700;
  background: transparent;
  text-decoration: none;
  border: 1.5px solid #FFD700;
  border-radius: 3px;
  padding: 3px 8px;
}
.dash-nav-link.is-active {
  color: #FFD700;
  background: transparent;
  border: 1.5px solid #FFD700;
  border-radius: 3px;
}
.dash-nav-link.is-active svg {
  color: var(--dash-gold);
  opacity: 1;
}

/* Header Right Utility Controls */
.dash-user-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.notif-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background .15s ease;
}
.notif-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dash-gold);
  color: #0d1b2a;
  font-family: var(--utility-font);
  font-size: 0.62rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid var(--dash-navy);
}
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}
.profile-pill:hover {
  background: rgba(255, 255, 255, 0.16);
}
.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dash-gold), #b45309);
  color: #fff;
  font-family: var(--display-font);
  font-weight: 800;
  font-size: 0.78rem;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}
.profile-arrow {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* --- Navy frame + warm cream content panel --- */
.library-page.dash { 
  background-color: var(--dash-navy);
  background-image: url('../assets/chalkboard-bg.jpg?v=2');
  background-size: 500px 500px;
  background-attachment: fixed;
  padding: 32px 20px 40px 20px; 
  min-height: 100vh;
}
.library-wrap.dash-panel {
  background: #fdfbf7;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8);
  border: 1px solid #eae3d2;
  overflow: hidden;
  max-width: 1240px; /* Wider for 4 columns */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.dash-main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 32px;
}

.dash-left-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------- Dashboard Hero Section ---------- */
.dash-hero-banner {
  position: relative;
  border-radius: 16px;
  padding: 36px 36px 28px 36px;
  border: 1px solid #e0d8c4;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-image: url('../assets/dashboard/moroccan-pattern-tile.png');
  background-repeat: repeat;
  background-size: 200px;
  background-color: #fdfbf7;
  overflow: hidden;
}
/* Decorative corner filigree overlay — upper-left */
.dash-hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  background: url('../assets/dashboard/moroccan-corner.png') no-repeat top left;
  background-size: contain;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}
/* Soft inner glow at bottom edge */
.dash-hero-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(253,251,247,0.9), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Hero Left: Welcome Copy & Badges */
.hero-left-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.hero-title-main {
  font-family: var(--display-font);
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--dash-navy);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero-subtitle-main {
  font-family: var(--reading-font);
  color: var(--ink-soft);
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}
/* Subject-area names take the exact button color of their dashboard card. */
.hero-subtitle-main .hero-area { font-weight: 700; }
.hero-subtitle-main .hero-area[data-accent="green"] { color: #315f58; }
.hero-subtitle-main .hero-area[data-accent="gold"] { color: #ae7816; }
.hero-subtitle-main .hero-area[data-accent="purple"] { color: #67735a; }
.hero-subtitle-main .hero-area[data-accent="blue"] { color: #584d88; }

/* Dashboard-wide lesson search (hero). */
.dash-search { position: relative; margin-top: 18px; max-width: 560px; }
.dash-search-input {
  width: 100%;
  padding: 10px 16px;
  font-family: var(--reading-font);
  font-size: .95rem;
  color: var(--ink);
  background: #fffdf8;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--pill);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dash-search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46, 109, 164, .15);
}
.dash-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 340px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 18px 40px -18px rgba(20, 30, 50, .35);
}
.dash-search-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}
.dash-search-row:last-child { border-bottom: 0; }
.dash-search-row:hover { background: var(--blue-soft); }
.dash-search-row .dsr-title {
  display: block;
  font-family: var(--display-font);
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink);
}
.dash-search-row .dsr-meta {
  display: block;
  margin-top: 2px;
  font-family: var(--utility-font);
  font-size: .7rem;
  color: var(--ink-faint);
}
.dash-search-empty, .dash-search-more {
  padding: 10px 14px;
  font-family: var(--utility-font);
  font-size: .78rem;
  color: var(--ink-soft);
}

.hero-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
}
.hero-divider { justify-content: center; }
/* Lines removed — the gold star ornament stands alone as the divider. */
.hero-divider::before, .hero-divider::after {
  content: none;
}
.hero-divider img {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}
.hero-star {
  display: inline-flex;
  line-height: 0;
  color: #D98C1A; /* warm gold to match the ornament */
}
.hero-star svg {
  display: block;
  width: 32px;
  height: 32px;
}

.hero-blue-banner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #eef2fa; /* Soft blue */
  padding: 12px 16px;
  border-radius: 12px;
}
.hero-blue-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-blue-text {
  display: flex;
  flex-direction: column;
}
.hero-blue-t1 {
  font-family: var(--utility-font);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dash-navy);
}
.hero-blue-t2 {
  font-family: var(--reading-font);
  font-size: 0.82rem;
  color: #475569;
}

/* Hero Center: Progress Donut & Badge */
.hero-progress-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 1;
}

.progress-ring { 
  position: relative; 
  width: 180px; 
  height: 180px; 
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 12px rgba(28, 41, 58, 0.10));
}
/* Decorative outer tick ring */
.progress-ring::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: url('../assets/dashboard/progress-ring-bg.png') no-repeat center;
  background-size: contain;
  pointer-events: none;
}
.ring-svg { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: #e8e0d0; stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--dash-gold); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .9s ease; filter: drop-shadow(0 0 3px rgba(217,154,43,0.25)); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-pct { font-family: var(--display-font); font-weight: 800; font-size: 2.4rem; color: var(--dash-navy); line-height: 1; }
.ring-l1 { font-family: var(--display-font); font-weight: 600; font-size: .9rem; color: var(--dash-navy); margin-top: 2px; }
.ring-l2 { font-family: var(--utility-font); font-size: .68rem; color: var(--ink-soft); margin-top: 2px; letter-spacing: 0.02em; }

/* The small 7-day streak float badge */
.hero-streak-float {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #eae3d2;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 8px 24px -10px rgba(0,0,0,0.08);
  position: relative;
  z-index: 2;
}
.hero-streak-float img {
  width: 24px;
  height: 24px;
}
.hero-streak-float-text {
  font-family: var(--display-font);
  font-weight: 700;
  color: var(--dash-navy);
  font-size: 0.95rem;
  line-height: 1.2;
}

/* Hero Right: Moroccan Skyline */
.hero-skyline {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 340px;
  height: 220px;
  object-fit: contain;
  object-position: bottom right;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

/* ---------- Main Dashboard Content Section ---------- */
.dash-content-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 32px 36px 12px 36px;
}

/* Left Column: 4 Main Study Cards */
.dash-study-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-section-title { 
  font-family: var(--display-font); 
  font-weight: 800; 
  font-size: 1.25rem; 
  color: var(--dash-navy); 
  margin: 0; 
}
.dash-section-sub {
  font-family: var(--utility-font);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.study-cards-grid { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 18px; 
}
.study-card-rich {
  --sc: var(--blue); 
  --sc-soft: var(--blue-soft);
  --sc-bg: #ffffff;
  display: flex; 
  flex-direction: column; 
  background: #ffffff; 
  border: 1px solid #e4dcc8;
  border-radius: 14px; 
  box-shadow: 0 2px 8px -2px rgba(13, 27, 42, 0.06), 0 1px 2px rgba(0,0,0,0.03);
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.study-card-rich:hover { 
  transform: translateY(-5px); 
  border-color: var(--sc-btn); 
  box-shadow: 0 16px 32px -12px rgba(13, 27, 42, 0.15); 
}
.study-card-rich[data-accent="green"]  { --sc-btn: #0d1b2a; } /* Navy */
.study-card-rich[data-accent="gold"]   { --sc-btn: #c48b1d; } /* Warm Gold */
.study-card-rich[data-accent="purple"] { --sc-btn: #4ca16a; } /* Sage Green */
.study-card-rich[data-accent="blue"]   { --sc-btn: #604fa0; } /* Soft Purple */

.sc-art-container {
  width: 100%;
  height: 150px;
  background: linear-gradient(180deg, #fdfbf7 0%, #f8f4ea 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px 14px 0 14px;
  position: relative;
}
/* Soft vignette at bottom of illustration */
.sc-art-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(to top, #ffffff, transparent);
  pointer-events: none;
}
.sc-art-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 0;
}

.card-content-body {
  padding: 14px 16px 18px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: center;
}
.sc-rich-title { 
  font-family: var(--display-font); 
  font-weight: 800; 
  font-size: 1rem; 
  color: var(--dash-navy);
  margin: 0;
  letter-spacing: -0.01em;
}
.sc-rich-sub {
  font-family: var(--utility-font);
  font-size: 0.68rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: 0.01em;
}
.sc-rich-desc {
  font-family: var(--reading-font);
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 6px 0 14px 0;
  flex: 1;
}

.sc-progress-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.sc-progress-info {
  display: flex;
  justify-content: flex-end;
  font-family: var(--utility-font);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}
.sc-bar { 
  width: 100%; 
  height: 4px; 
  border-radius: var(--pill); 
  background: #eae3d2; 
  overflow: hidden; 
}
.sc-fill { 
  height: 100%; 
  background: var(--sc-btn); 
  border-radius: var(--pill); 
}

.sc-rich-btn {
  margin-top: 16px; 
  width: 100%; 
  padding: 10px 14px; 
  border: 0;
  border-radius: 8px;
  background: var(--sc-btn); 
  color: #ffffff; 
  cursor: pointer;
  font-family: var(--display-font); 
  font-weight: 700; 
  font-size: .88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, filter .15s ease;
}
.sc-rich-btn:hover { 
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Right Column: Utility Sidebar Stack */
.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.side-card {
  background: #ffffff;
  border: 1px solid #eae3d2;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px -4px rgba(13, 27, 42, 0.05);
}
.side-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display-font);
  font-weight: 800;
  font-size: 1rem;
  color: var(--dash-navy);
  margin: 0 0 20px 0;
}
.side-card-title img {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

/* Upcoming Schedule List */
.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.upcoming-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.upcoming-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ui-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}
.ui-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ui-details {
  display: flex;
  flex-direction: column;
}
.ui-time {
  font-family: var(--utility-font);
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.ui-title {
  font-family: var(--reading-font);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dash-navy);
}
.ui-arrow {
  color: var(--ink-faint);
  font-size: 1.2rem;
  font-weight: 300;
}
.schedule-link {
  display: inline-block;
  margin-top: 16px;
  text-align: center;
  width: 100%;
  font-family: var(--display-font);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--saffron-deep);
  text-decoration: none;
}
.schedule-link:hover {
  text-decoration: underline;
}

/* Achievements Card */
.achievements-grid {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.achievement-badge img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}
.badge-label {
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--dash-navy);
  line-height: 1.2;
  max-width: 60px;
}
.achieve-link {
  display: inline-block;
  margin-top: 16px;
  text-align: center;
  width: 100%;
  font-family: var(--display-font);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dash-navy);
  text-decoration: none;
  border: 1px solid var(--dash-navy);
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.achieve-link:hover {
  background: var(--dash-navy);
  color: #fff;
}

/* Streak Card (White Layout) */
.streak-header {
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dash-navy);
  margin-bottom: 12px;
}
.weekly-streak-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.day-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dc-letter {
  font-family: var(--utility-font);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.dc-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #d9d9d9;
  display: grid;
  place-items: center;
}
.dc-dot img {
  width: 14px;
  height: 14px;
}
.day-circle.is-done .dc-dot {
  border: none;
}
/* Today gets a subtle ring so the student sees where the week is. */
.day-circle.is-today .dc-dot {
  box-shadow: 0 0 0 2px var(--saffron);
}
.day-circle.is-today .dc-letter {
  color: var(--saffron-deep);
  font-weight: 700;
}

/* Locked achievement: dimmed until its rule is met. */
.achievement-badge.is-locked {
  opacity: 0.4;
  filter: grayscale(1);
}

/* Achievements status label (real earned count, not a link). */
.achieve-status {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-family: var(--display-font);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* Real streak note under the weekly row. */
.streak-note {
  margin-top: 12px;
  font-family: var(--utility-font);
  font-size: 0.74rem;
  color: var(--ink-faint);
  text-align: center;
}

/* Dash Footer Banner */
.dash-footer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1ebd8;
  border-radius: 12px;
  padding: 16px 24px;
  margin: 0 32px 32px 32px;
}
.df-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.df-icon {
  width: 32px;
  height: 32px;
  background: var(--dash-navy);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.df-icon img {
  width: 18px;
  height: 18px;
}
.df-left span {
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dash-navy);
}
.df-left p {
  font-family: var(--reading-font);
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0;
}
.df-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--reading-font);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--dash-navy);
}
.df-right img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* --- Topic cards: one card per lesson (icon + title + meta + status) --- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 10px; }
.topic-card {
  --sc: var(--blue); --sc-soft: var(--blue-soft);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px;
  width: 100%; text-align: left; padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  cursor: pointer; font: inherit; color: inherit;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.topic-card:hover { transform: translateY(-2px); border-color: var(--sc); box-shadow: 0 10px 22px -12px rgba(31, 39, 51, .4); }
.topic-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.topic-card[data-accent="green"]  { --sc: var(--green);        --sc-soft: var(--green-soft); }
.topic-card[data-accent="violet"] { --sc: var(--violet);       --sc-soft: var(--violet-soft); }
.topic-card[data-accent="gold"]   { --sc: var(--saffron-deep); --sc-soft: var(--saffron-soft); }
.topic-card[data-accent="red"]    { --sc: var(--red);          --sc-soft: var(--red-soft); }
.topic-card[data-accent="navy"]   { --sc: var(--blue-deep);    --sc-soft: var(--blue-soft); }
.tc-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-lg); background: var(--sc-soft); color: var(--sc); flex: 0 0 auto; }
.tc-icon svg { display: block; }
.tc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tc-title { font-family: var(--display-font); font-weight: 700; font-size: 1rem; color: var(--ink); }
.tc-meta { font-family: var(--utility-font); font-size: .66rem; color: var(--ink-faint); }
.tc-progress-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-2); }
.tc-progress-fill { height: 100%; background: var(--sc); }

/* --- Category screen (drill-down from a category card) --- */
.cat-head { display: flex; align-items: center; gap: 15px; margin: 0 24px 20px 24px; }
.cat-head-sub { font-family: var(--utility-font); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin: 3px 0 0; }
.cat-rows { display: flex; flex-direction: column; gap: 10px; padding: 0 24px; }
.utility-bar { padding: 0 24px; margin-bottom: 16px; }

/* --- Lesson & legal pages: dark frame, light reading panel --- */
.lesson-main.dash { background: transparent; padding-top: 22px; }
.lesson-main.dash > .wrap {
  background: var(--dash-panel);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .6);
  margin-bottom: 22px;
  padding-top: 24px;
  padding-bottom: 28px;
}
.topbar--dashboard::before { display: none; }
.topbar--dashboard { box-shadow: none; }
/* body override removed so non-dash pages keep their paper background */
/* ============================================================
   ENHANCED HOMEPAGE — Moroccan Educational Dashboard
   Dark navy nav, cream content, gold accents, Moroccan feel
   ============================================================ */

/* Enhanced hero with Moroccan illustration */
.dash-hero-enhanced {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  margin-bottom: 32px;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-welcome {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-h1 {
  font-family: var(--display-font);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--dash-navy);
  margin: 0;
  line-height: 1.1;
}

.hero-h1-gold {
  color: var(--saffron-deep);
  display: block;
}

.hero-sub {
  font-family: var(--reading-font);
  color: var(--ink-soft);
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.hero-value-points {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.value-point {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--utility-font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(229, 220, 198, 0.9);
  width: fit-content;
  box-shadow: 0 2px 8px -2px rgba(13, 27, 42, 0.06);
}

.vp-icon {
  font-size: 1rem;
}

/* Moroccan illustration in hero */
.hero-moroccan-art {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 16px;
  opacity: 0.9;
}

/* Enhanced study cards with illustrations */
.study-cards-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.study-card-enhanced {
  display: flex;
  flex-direction: column;
  background: var(--dash-panel);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px -8px rgba(13, 27, 42, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(229, 220, 198, 0.6);
}

.study-card-enhanced:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -12px rgba(13, 27, 42, 0.18);
}

.study-card-illustration {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, #e8dfc9 0%, #d9d2c0 100%);
}

.study-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.study-card-title {
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--dash-navy);
  margin: 0;
}

.study-card-desc {
  font-family: var(--reading-font);
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

.study-card-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.study-card-progress-bar {
  height: 6px;
  background: #e6dec9;
  border-radius: 3px;
  overflow: hidden;
}

.study-card-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.study-card-progress-fill[data-accent="green"] { background: #4a7c59; }
.study-card-progress-fill[data-accent="gold"] { background: #c59b27; }
.study-card-progress-fill[data-accent="purple"] { background: #7c5cbf; }
.study-card-progress-fill[data-accent="blue"] { background: #4a6fa5; }

.study-card-progress-text {
  font-family: var(--utility-font);
  font-size: 0.75rem;
  color: var(--ink-faint);
  text-align: right;
}

.study-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--utility-font);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
}

.study-card-cta[data-accent="green"] { background: #4a7c59; color: #fff; }
.study-card-cta[data-accent="gold"] { background: #c59b27; color: #fff; }
.study-card-cta[data-accent="purple"] { background: #7c5cbf; color: #fff; }
.study-card-cta[data-accent="blue"] { background: #4a6fa5; color: #fff; }

.study-card-cta:hover { opacity: 0.9; }

/* Enhanced sidebar cards */
.sidebar-enhanced {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--dash-panel);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 16px -4px rgba(13, 27, 42, 0.1);
  border: 1px solid rgba(229, 220, 198, 0.6);
}

.sidebar-card-dark {
  background: var(--dash-navy);
  color: #fff;
}

.sidebar-card-title {
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card-dark .sidebar-card-title {
  color: #fff;
}

/* Moroccan decorative trim */
.moroccan-trim-enhanced {
  width: 100%;
  height: 24px;
  margin-top: 40px;
  opacity: 0.6;
}

/* Responsive: stack hero on mobile */
@media (max-width: 900px) {
  .dash-hero-enhanced {
    grid-template-columns: 1fr;
  }
  .hero-moroccan-art {
    max-width: 280px;
    margin: 0 auto;
  }
  .study-cards-enhanced {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 600px) {
  .study-cards-enhanced {
    grid-template-columns: 1fr;
  }
  .hero-h1 {
    font-size: 1.8rem;
  }
}

/* ========================================================================
   Dashboard art-direction refinement (2026-08)
   Keeps the existing information architecture while unifying the generated
   raster illustrations, Moroccan ornament, progress graphic, and cards.
   ======================================================================== */
.library-wrap.dash-panel .dash-main-layout {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  padding: 32px;
}

.library-wrap.dash-panel .dash-left-col {
  gap: 26px;
}

.library-wrap.dash-panel .dash-hero-banner {
  min-height: 346px;
  padding: 38px 34px 32px;
  align-items: stretch;
  background-color: #fbf7ee;
  background-image:
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.92), transparent 32%),
    linear-gradient(135deg, rgba(250,244,229,.72), rgba(255,253,248,.96));
  border: 1px solid rgba(179, 151, 94, .34);
  box-shadow:
    inset 0 0 0 5px rgba(255,255,255,.48),
    0 18px 40px -32px rgba(29, 42, 58, .55);
}

.library-wrap.dash-panel .dash-hero-banner::before {
  width: 236px;
  height: 236px;
  top: 7px;
  right: 7px;
  left: auto;
  background-image: url('../assets/dashboard/hero-corner-v2.png');
  background-position: top right;
  background-size: contain;
  opacity: .24;
  mix-blend-mode: multiply;
  transform: scaleX(-1);
}

.library-wrap.dash-panel .dash-hero-banner::after {
  inset: 14px;
  height: auto;
  border: 1px solid rgba(179, 151, 94, .17);
  border-radius: 11px;
  background: none;
}

.library-wrap.dash-panel .hero-left-content {
  max-width: 48%;
  justify-content: center;
  gap: 17px;
  padding: 8px 0 8px 2px;
}

.library-wrap.dash-panel .hero-title-main {
  max-width: 390px;
  font-size: clamp(2.2rem, 3.25vw, 2.85rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.library-wrap.dash-panel .hero-subtitle-main {
  max-width: 390px;
  font-size: 1.04rem;
  line-height: 1.62;
}

.library-wrap.dash-panel .hero-divider {
  width: 92%;
  max-width: 390px;
  gap: 12px;
}

.library-wrap.dash-panel .hero-divider::before,
.library-wrap.dash-panel .hero-divider::after {
  background: linear-gradient(90deg, transparent, rgba(176,126,27,.72) 24%, rgba(176,126,27,.72) 76%, transparent);
}

.library-wrap.dash-panel .hero-divider img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
  opacity: 1;
}

.library-wrap.dash-panel .hero-blue-banner {
  width: min(100%, 390px);
  padding: 13px 15px;
  border: 1px solid rgba(76, 111, 165, .16);
  background: rgba(231, 239, 249, .78);
  box-shadow: 0 10px 26px -22px rgba(41, 73, 111, .65);
  backdrop-filter: blur(3px);
}

.library-wrap.dash-panel .hero-blue-icon img {
  width: 36px !important;
  height: 36px !important;
  object-fit: contain;
}

.library-wrap.dash-panel .hero-blue-t1 {
  font-size: .88rem;
  letter-spacing: .01em;
}

.library-wrap.dash-panel .hero-progress-area {
  width: 50%;
  min-width: 325px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 5px 0 42px;
}

.library-wrap.dash-panel .hero-progress-stack {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.library-wrap.dash-panel .progress-ring {
  width: 190px;
  height: 190px;
  filter: drop-shadow(0 13px 18px rgba(26, 41, 60, .13));
}

.library-wrap.dash-panel .progress-ring::before {
  inset: -11px;
  opacity: .55;
}

.library-wrap.dash-panel .ring-bg {
  stroke: rgba(24, 43, 67, .14);
  stroke-width: 14;
}

.library-wrap.dash-panel .ring-fg {
  stroke: #c88f22;
  stroke-width: 14;
  filter: drop-shadow(0 2px 3px rgba(118, 73, 6, .22));
}

.library-wrap.dash-panel .ring-center {
  inset: 20px;
  border-radius: 50%;
  background: rgba(255, 253, 248, .94);
  box-shadow:
    inset 0 0 0 1px rgba(172, 143, 88, .22),
    inset 0 9px 20px rgba(255,255,255,.9),
    0 8px 20px rgba(39, 48, 62, .06);
}

.library-wrap.dash-panel .ring-kicker {
  max-width: 82px;
  margin-bottom: 4px;
  color: #8b671f;
  font-family: var(--utility-font);
  font-size: .54rem;
  font-weight: 800;
  letter-spacing: .085em;
  line-height: 1.15;
  text-transform: uppercase;
}

.library-wrap.dash-panel .ring-pct {
  font-size: 2.38rem;
}

.library-wrap.dash-panel .ring-l1 {
  margin-top: 2px;
  font-size: .76rem;
  letter-spacing: .035em;
}

.library-wrap.dash-panel .ring-l2 {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .61rem;
}

.library-wrap.dash-panel .hero-progress-action {
  min-height: 39px;
  padding: 9px 18px;
  border: 1px solid #152a43;
  border-radius: 999px;
  background: #183451;
  color: #fff;
  box-shadow: 0 9px 18px -12px rgba(18, 47, 77, .85);
  cursor: pointer;
  font-family: var(--display-font);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.library-wrap.dash-panel .hero-progress-action:hover,
.library-wrap.dash-panel .hero-progress-action:focus-visible {
  background: #24547f;
  box-shadow: 0 13px 24px -14px rgba(18, 47, 77, .9);
  transform: translateY(-2px);
}

.library-wrap.dash-panel .hero-skyline {
  right: -9%;
  bottom: -4px;
  width: 118%;
  height: 180px;
  object-fit: contain;
  object-position: right bottom;
  opacity: .2;
  mix-blend-mode: multiply;
}

.library-wrap.dash-panel .hero-streak-float {
  position: absolute;
  right: 8px;
  bottom: 5px;
  gap: 9px;
  padding: 8px 13px 8px 8px;
  border-color: rgba(178, 144, 77, .27);
  background: rgba(255, 253, 248, .88);
  box-shadow: 0 10px 30px -18px rgba(36, 44, 55, .55);
  backdrop-filter: blur(4px);
}

.library-wrap.dash-panel .hero-streak-float img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.library-wrap.dash-panel .hero-streak-float-text {
  font-size: .82rem;
}

.library-wrap.dash-panel .study-cards-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.library-wrap.dash-panel .study-card-rich {
  position: relative;
  border-color: rgba(177, 154, 106, .3);
  border-radius: 17px;
  text-align: left;
  box-shadow:
    inset 0 3px 0 var(--sc-btn),
    0 14px 30px -25px rgba(18, 37, 58, .72);
}

.library-wrap.dash-panel .study-card-rich:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 3px 0 var(--sc-btn),
    0 20px 38px -25px rgba(18, 37, 58, .58);
}

.library-wrap.dash-panel .study-card-rich[data-accent="green"]  { --sc-btn: #315f58; --sc-tint: #edf4ef; }
.library-wrap.dash-panel .study-card-rich[data-accent="gold"]   { --sc-btn: #ae7816; --sc-tint: #faf1dc; }
.library-wrap.dash-panel .study-card-rich[data-accent="purple"] { --sc-btn: #67735a; --sc-tint: #eff2ea; }
.library-wrap.dash-panel .study-card-rich[data-accent="blue"]   { --sc-btn: #584d88; --sc-tint: #f0eef7; }

.library-wrap.dash-panel .sc-art-container {
  height: 174px;
  padding: 12px 16px 2px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.95), transparent 58%),
    linear-gradient(180deg, var(--sc-tint), #fbfaf6);
  border-bottom: 1px solid rgba(177, 154, 106, .2);
}

.library-wrap.dash-panel .sc-art-container::after {
  height: 34px;
  background: linear-gradient(to top, #fff, rgba(255,255,255,0));
}

.library-wrap.dash-panel .study-card-rich[data-accent="green"] .sc-art-container,
.library-wrap.dash-panel .study-card-rich[data-accent="gold"] .sc-art-container,
.library-wrap.dash-panel .study-card-rich[data-accent="purple"] .sc-art-container,
.library-wrap.dash-panel .study-card-rich[data-accent="blue"] .sc-art-container {
  background: transparent;
  border-bottom-color: transparent;
}

.library-wrap.dash-panel .study-card-rich[data-accent="green"] .sc-art-container::after,
.library-wrap.dash-panel .study-card-rich[data-accent="gold"] .sc-art-container::after,
.library-wrap.dash-panel .study-card-rich[data-accent="purple"] .sc-art-container::after,
.library-wrap.dash-panel .study-card-rich[data-accent="blue"] .sc-art-container::after {
  display: none;
}

.library-wrap.dash-panel .sc-art-container img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  transform: translateY(3px);
  filter: drop-shadow(0 10px 10px rgba(25, 39, 54, .1));
}

.library-wrap.dash-panel .card-content-body {
  align-items: stretch;
  padding: 17px 18px 19px;
}

.library-wrap.dash-panel .sc-rich-title {
  font-size: 1.08rem;
  line-height: 1.2;
}

.library-wrap.dash-panel .sc-rich-sub {
  margin-top: 5px;
  font-size: .65rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.library-wrap.dash-panel .sc-rich-desc {
  min-height: 45px;
  margin: 9px 0 14px;
  font-size: .82rem;
  line-height: 1.48;
}

.library-wrap.dash-panel .sc-bar {
  height: 6px;
  background: rgba(27, 43, 63, .1);
}

.library-wrap.dash-panel .sc-rich-btn {
  align-self: flex-start;
  width: auto;
  min-width: 118px;
  margin-top: 14px;
  padding: 9px 17px;
  border-radius: 999px;
  font-size: .8rem;
  box-shadow: 0 8px 16px -12px var(--sc-btn);
}

.library-wrap.dash-panel .dash-sidebar {
  gap: 20px;
}

.library-wrap.dash-panel .side-card {
  position: relative;
  overflow: hidden;
  padding: 21px;
  border-color: rgba(177, 154, 106, .28);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(252,249,241,.88));
  box-shadow: 0 15px 32px -28px rgba(19, 39, 62, .7);
}

.library-wrap.dash-panel .side-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(190,139,36,.78), transparent);
}

.library-wrap.dash-panel .side-card-title {
  gap: 11px;
  margin-bottom: 18px;
  font-size: 1.03rem;
}

.library-wrap.dash-panel .side-card-title img {
  width: 43px;
  height: 43px;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 5px 7px rgba(31, 45, 61, .11));
}

.library-wrap.dash-panel .upcoming-item {
  padding: 9px 0;
  border-bottom: 1px solid rgba(174, 150, 101, .16);
}

.library-wrap.dash-panel .upcoming-item:last-child {
  border-bottom: 0;
}

.library-wrap.dash-panel .ui-icon {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(162, 138, 91, .16);
  background: #f7f2e7;
}

.library-wrap.dash-panel .achievements-grid {
  gap: 7px;
}

.library-wrap.dash-panel .achievement-badge img {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 7px 8px rgba(30, 42, 55, .12));
}

.library-wrap.dash-panel .badge-label {
  font-size: .7rem;
}

.library-wrap.dash-panel .achieve-link,
.library-wrap.dash-panel .schedule-link {
  border-radius: 999px;
}

.library-wrap.dash-panel .weekly-streak-row {
  gap: 5px;
  padding: 13px 10px;
  border: 1px solid rgba(180, 152, 93, .18);
  border-radius: 13px;
  background: rgba(247, 240, 223, .62);
}

.library-wrap.dash-panel .dc-dot {
  width: 25px;
  height: 25px;
  background: #fff;
  border-color: rgba(157, 128, 72, .28);
  box-shadow: inset 0 2px 5px rgba(41, 53, 68, .04);
}

.library-wrap.dash-panel .dash-footer-banner {
  position: relative;
  overflow: hidden;
  min-height: 98px;
  padding: 28px 25px 17px;
  border: 1px solid rgba(168, 134, 69, .24);
  background: linear-gradient(90deg, #eee4cb, #f8f2e3 48%, #eee4cb);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.library-wrap.dash-panel .dash-footer-banner::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 26px;
  background-image: url('../assets/dashboard/footer-trim-v2.png');
  background-position: center top;
  background-repeat: repeat-x;
  background-size: auto 30px;
  opacity: .55;
  pointer-events: none;
}

.library-wrap.dash-panel .df-icon {
  width: 38px;
  height: 38px;
  box-shadow: 0 8px 15px -10px rgba(18, 41, 66, .9);
}

.library-wrap.dash-panel .df-left span {
  font-size: .9rem;
}

/* ========================================================================
   Dashboard reference replication (2026-08-08)
   Matches the supplied wide editorial dashboard while preserving live data.
   ======================================================================== */
.topbar--dashboard {
  padding: 0;
  background: #071b36;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.topbar--dashboard .topbar-inner {
  width: 100%;
  max-width: none;
  min-height: 90px;
  padding: 0;
}

.topbar--dashboard .dash-unified-overlay {
  width: 100%;
  max-width: 1600px;
  min-height: 90px;
  margin: 0 auto;
  padding: 0 48px;
  gap: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.topbar--dashboard .brand {
  gap: 12px;
  margin: 0;
}

.topbar--dashboard .brand-logo-img {
  width: 72px;
  height: 72px;
  max-width: none;
}

.topbar--dashboard .brand-name,
.topbar--dashboard .brand-name .bn-accent {
  color: #fff;
  font-family: Georgia, "Times New Roman", var(--reading-font);
  font-size: clamp(1.45rem, 2.25vw, 2.08rem);
  font-weight: 600;
  letter-spacing: -.025em;
}

.topbar--dashboard .brand-stack .nav-journey {
  display: inline-flex;
  width: 100%;
  gap: 3px;
}

.topbar--dashboard .brand-stack .nav-journey .nj-tagline {
  width: 100%;
  justify-content: space-between;
  gap: 4px;
  font-size: .54rem;
  letter-spacing: .075em;
}

.topbar--dashboard .brand-stack .nav-journey .nj-bar {
  height: 3px;
}

.topbar--dashboard .brand-tag {
  margin-left: 8px;
  margin-right: 24px;
  padding: 0;
}

.topbar--dashboard .dash-nav {
  gap: clamp(12px, 1.6vw, 26px);
}

.topbar--dashboard .dash-nav-link {
  position: relative;
  padding: 31px 0 27px;
  border: 0;
  color: rgba(255,255,255,.88);
  font-family: var(--display-font);
  font-size: .96rem;
  font-weight: 650;
}

.topbar--dashboard .dash-nav-link::after {
  content: none;
  display: none;
}

.topbar--dashboard .dash-nav-link:hover,
.topbar--dashboard .dash-nav-link:focus-visible,
.topbar--dashboard .dash-nav-link.is-active {
  color: #071b36;
  border: 0;
}

.topbar--dashboard .dash-nav-link.is-active::after {
  background: #d99a2b;
}

.library-page.dash {
  min-height: calc(100vh - 90px);
  padding: 32px clamp(24px, 3vw, 48px) 42px;
  background: #fbfaf6;
}

.library-wrap.dash-panel {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.library-wrap.dash-panel .dash-main-layout {
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 20px;
  padding: 0;
}

.library-wrap.dash-panel .dash-left-col {
  gap: 18px;
}

.library-wrap.dash-panel .dash-hero-banner {
  min-height: 318px;
  padding: 34px 40px 30px;
  align-items: stretch;
  border: 1px solid #e6ddcc;
  border-radius: 14px;
  background: rgba(255,253,249,.96);
  box-shadow: none;
}

.library-wrap.dash-panel .dash-hero-banner::before {
  top: 0;
  right: auto;
  left: 0;
  width: 62%;
  height: 100%;
  background-image: url('../assets/dashboard/moroccan-pattern.jpg');
  background-position: top left;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: .2;
  mix-blend-mode: multiply;
  transform: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.92) 24%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.92) 24%, transparent 100%);
}

.library-wrap.dash-panel .dash-hero-banner::after {
  display: none;
}

.library-wrap.dash-panel .hero-left-content {
  width: 51%;
  max-width: 51%;
  gap: 17px;
  padding: 4px 0;
  justify-content: center;
}

.library-wrap.dash-panel .hero-title-main {
  max-width: 520px;
  margin: 0;
  color: #0b2444;
  font-family: Georgia, "Times New Roman", var(--reading-font);
  font-size: clamp(2.15rem, 3vw, 2.9rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.035em;
}

.library-wrap.dash-panel .hero-subtitle-main {
  max-width: 460px;
  color: #213652;
  font-family: var(--display-font);
  font-size: 1rem;
  line-height: 1.55;
}

.library-wrap.dash-panel .hero-divider {
  width: min(100%, 430px);
  max-width: 430px;
  gap: 12px;
  margin: 1px 0;
}

.library-wrap.dash-panel .hero-divider::before,
.library-wrap.dash-panel .hero-divider::after {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(203,143,31,.78));
}

.library-wrap.dash-panel .hero-divider::after {
  background: linear-gradient(90deg, rgba(203,143,31,.78), transparent);
}

.library-wrap.dash-panel .hero-blue-banner {
  width: min(100%, 470px);
  padding: 12px 16px;
  border: 1px solid #d8e0ef;
  border-radius: 12px;
  background: linear-gradient(90deg, #edf2fb, #f5f7fb);
  box-shadow: none;
  backdrop-filter: none;
}

.library-wrap.dash-panel .hero-blue-icon img {
  width: 34px !important;
  height: 34px !important;
}

.library-wrap.dash-panel .hero-blue-t1 {
  color: #142c4c;
  font-family: var(--display-font);
  font-size: .8rem;
  font-weight: 750;
}

.library-wrap.dash-panel .hero-blue-t2 {
  color: #31445f;
  font-family: var(--display-font);
  font-size: .74rem;
}

.library-wrap.dash-panel .hero-progress-area {
  width: 49%;
  min-width: 300px;
  padding: 8px 24px 32px 0;
  justify-content: center;
}

.library-wrap.dash-panel .hero-progress-stack {
  gap: 13px;
  transform: translateX(-104px);
}

.library-wrap.dash-panel .progress-ring {
  --ring-half: 0%;
  --ring-progress: 0%;
  position: relative;
  display: flex;
  width: 188px;
  height: 188px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: conic-gradient(from -25deg,
    #dca027 0 var(--ring-half),
    #203f70 var(--ring-half) var(--ring-progress),
    #e7e8ec var(--ring-progress) 100%);
  box-shadow: 0 8px 18px rgba(24,44,73,.11);
  filter: none;
  transform: translateX(-28px);
}

.library-wrap.dash-panel .progress-ring::before {
  content: '';
  position: absolute;
  inset: 16px;
  z-index: 0;
  border: 1px solid rgba(29,56,91,.08);
  border-radius: 50%;
  background: #fffdfa;
  box-shadow: inset 0 1px 5px rgba(22,43,70,.05);
}

.library-wrap.dash-panel .progress-ring::after {
  content: '';
  position: absolute;
  inset: -7px;
  z-index: -1;
  border: 7px solid rgba(34,63,98,.06);
  border-radius: 50%;
}

.library-wrap.dash-panel .progress-ring > span {
  position: relative;
  z-index: 1;
}

.library-wrap.dash-panel .ring-pct {
  color: #0c2241;
  font-family: Georgia, "Times New Roman", var(--reading-font);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
}

.library-wrap.dash-panel .ring-l1 {
  margin-top: 4px;
  color: #0c2241;
  font-family: Georgia, "Times New Roman", var(--reading-font);
  font-size: 1rem;
  font-weight: 700;
}

.library-wrap.dash-panel .ring-l2 {
  margin-top: 5px;
  color: #31445f;
  font-family: var(--display-font);
  font-size: .68rem;
}

.library-wrap.dash-panel .hero-progress-action {
  min-width: 170px;
  min-height: 39px;
  padding: 8px 20px;
  border: 1px solid #244570;
  border-radius: 8px;
  background: rgba(255,253,249,.9);
  color: #142d50;
  box-shadow: none;
  font-size: .8rem;
  transform: translateX(26px);
}

.library-wrap.dash-panel .hero-progress-action:hover,
.library-wrap.dash-panel .hero-progress-action:focus-visible {
  background: #173960;
  color: #fff;
  box-shadow: none;
  transform: translate(26px, -2px);
}

.library-wrap.dash-panel .hero-skyline {
  right: -22%;
  bottom: -28px;
  width: 110%;
  height: 188px;
  opacity: .48;
  mix-blend-mode: normal;
}

.library-wrap.dash-panel .hero-streak-float {
  top: 16px;
  right: 16px;
  bottom: auto;
  min-width: 124px;
  padding: 9px 13px;
  border: 1px solid #e3d9c6;
  border-radius: 12px;
  background: rgba(255,253,249,.94);
  box-shadow: 0 5px 12px rgba(26,43,64,.06);
}

.library-wrap.dash-panel .hero-streak-float img {
  width: 36px;
  height: 36px;
  image-rendering: auto;
}

.library-wrap.dash-panel .hero-streak-float-text {
  color: #142a49;
  font-size: .86rem;
}

.library-wrap.dash-panel .study-cards-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.library-wrap.dash-panel .study-card-rich {
  border: 1px solid #e5dccb;
  border-radius: 14px;
  background: #fffdfa;
  padding: 0;
  text-align: center;
  box-shadow: none;
}

.library-wrap.dash-panel .study-card-rich:hover {
  border-color: #d7c7a8;
  box-shadow: 0 10px 24px -20px rgba(20,40,65,.38);
  transform: translateY(-2px);
}

.library-wrap.dash-panel .sc-art-container {
  height: clamp(112px, 9vw, 158px);
  padding: 0;
  border: 0;
  background: transparent;
  width: calc(100% + 2px);
  margin: -1px -1px 0;
}

.library-wrap.dash-panel .sc-art-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  transform: none;
  transform-origin: center;
  filter: none;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%,
    #000 76%,
    rgba(0,0,0,.88) 86%,
    rgba(0,0,0,.42) 94%,
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    #000 0%,
    #000 76%,
    rgba(0,0,0,.88) 86%,
    rgba(0,0,0,.42) 94%,
    transparent 100%);
}

.library-wrap.dash-panel .card-content-body {
  padding: 11px 15px 15px;
  align-items: center;
}

.library-wrap.dash-panel .sc-rich-title {
  color: #0b2342;
  font-family: Georgia, "Times New Roman", var(--reading-font);
  font-size: clamp(1.08rem, 1.45vw, 1.3rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.library-wrap.dash-panel .sc-rich-sub {
  margin-top: 5px;
  color: #2455a0;
  font-family: var(--display-font);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
}

.library-wrap.dash-panel .sc-rich-desc {
  min-height: 54px;
  margin: 9px 0 12px;
  color: #263c58;
  font-family: var(--display-font);
  font-size: .76rem;
  line-height: 1.42;
  text-align: center;
}

.library-wrap.dash-panel .sc-progress-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.library-wrap.dash-panel .sc-progress-info {
  grid-column: 2;
  grid-row: 1;
  color: #1d2f49;
  font-size: .76rem;
  font-weight: 700;
}

.library-wrap.dash-panel .sc-bar {
  grid-column: 1;
  grid-row: 1;
  height: 5px;
  background: #e4e4e5;
}

.library-wrap.dash-panel .sc-rich-btn {
  width: 100%;
  min-width: 0;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .82rem;
  box-shadow: none;
}

.library-wrap.dash-panel .dash-sidebar {
  gap: 14px;
}

.library-wrap.dash-panel .side-card {
  padding: 18px;
  border: 1px solid #e5dccb;
  border-radius: 14px;
  background: #fffdfa;
  box-shadow: none;
}

.library-wrap.dash-panel .side-card::before {
  display: none;
}

.library-wrap.dash-panel .side-card-title {
  gap: 9px;
  margin-bottom: 14px;
  color: #0e2748;
  font-family: Georgia, "Times New Roman", var(--reading-font);
  font-size: 1.12rem;
}

.library-wrap.dash-panel .side-card-title img {
  width: 28px;
  height: 28px;
  filter: none;
}

.library-wrap.dash-panel .upcoming-item {
  padding: 10px 0;
  border-bottom: 1px solid #e8e1d6;
}

.library-wrap.dash-panel .ui-icon {
  width: 43px;
  height: 43px;
  padding: 4px;
  border: 1px solid #cad7ef;
  border-radius: 50%;
  background: #f1f5fd;
}

.library-wrap.dash-panel .ui-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-wrap.dash-panel .ui-title {
  color: #172b48;
  font-family: var(--display-font);
  font-size: .75rem;
  font-weight: 650;
}

.library-wrap.dash-panel .ui-time {
  color: #26374e;
  font-size: .69rem;
  font-weight: 700;
}

.library-wrap.dash-panel .schedule-link {
  margin-top: 11px;
  color: #1553a0;
  font-size: .76rem;
}

.library-wrap.dash-panel .achievement-badge img {
  width: 62px;
  height: 62px;
  filter: drop-shadow(0 4px 7px rgba(18, 40, 67, .14));
}

.library-wrap.dash-panel .badge-label {
  color: #182d4c;
  font-size: .65rem;
}

.library-wrap.dash-panel .achieve-link {
  margin-top: 13px;
  padding: 8px;
  border-color: #31588e;
  border-radius: 7px;
  color: #164685;
}

.library-wrap.dash-panel .streak-header {
  margin-bottom: 10px;
  color: #14345e;
  font-size: .84rem;
}

.library-wrap.dash-panel .weekly-streak-row {
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}

.library-wrap.dash-panel .dc-dot {
  width: 21px;
  height: 21px;
}

.library-wrap.dash-panel .dash-footer-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  margin: 0;
  padding: 14px 20px;
  border: 1px solid #dbe2ef;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef3fb, #f7f8fb 72%, #eef2fa);
  box-shadow: none;
}

.library-wrap.dash-panel .dash-footer-banner::before {
  display: none;
}

.library-wrap.dash-panel .df-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 8px;
  background: #173654;
  box-shadow: none;
}

.library-wrap.dash-panel .df-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.library-wrap.dash-panel .df-left {
  min-width: 0;
  gap: 13px;
}

.library-wrap.dash-panel .df-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.library-wrap.dash-panel .df-left span {
  display: block;
  color: #182d4c;
  font-size: .8rem;
  line-height: 1.25;
}

.library-wrap.dash-panel .df-left p {
  color: #31445f;
  font-family: var(--display-font);
  font-size: .72rem;
  line-height: 1.35;
}

.library-wrap.dash-panel .df-right {
  justify-self: end;
  gap: 16px;
  color: #31445f;
  font-family: Georgia, "Times New Roman", var(--reading-font);
  font-size: .86rem;
  white-space: nowrap;
}

.library-wrap.dash-panel .df-right img {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.library-wrap.dash-panel + .library-footer {
  max-width: 1600px;
  margin: 30px auto 0;
}

