@import url("https://fonts.googleapis.com/css2?family=Ribeye&display=swap");

/* =========================================================
   THEME-LIGHT.CSS (CONSOLIDATED — GitHub version)
   Goal: keep the same FINAL appearance you currently get
   by preserving “last rule wins”, removing duplicates, and
   organizing cleanly.
   ========================================================= */

/* Google Fonts — Baloo 2 (headings 700/800) + Nunito (body 400/500/600/700) */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@700;800&family=Nunito:wght@400;500;600;700&display=swap');

/* =========================
   1) TOKENS / FONTS
   ========================= */
:root{
  /* base palette */
  --bg: #eef6fb;
  --panel: #f7fbff;
  --card: rgba(255,255,255,.85);
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(15,23,42,.08);

  --accent: #38bdf8;
  --accent-soft: #bae6fd;
  --link: #0284c7;

  /* radii + shadows */
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-soft: 0 10px 28px rgba(15,23,42,.08);
  --shadow-card: 0 12px 28px rgba(15,23,42,.10);

  /* brand */
  --brand-blue: #4b66f2;
  --brand-blue-hover: #3f58e0;

  /* topbar/panels */
  --topbar-blue: #4b66f2;
  --topbar-blue-soft: #5b74ff;
  --topbar-blue-deep: #425ae0;

  /* typography */
  --font-body:    'Nunito', system-ui, -apple-system, sans-serif;
  --font-display: 'Ribeye', serif;
  --font-title:   var(--font-display);
}

/* ----------------------------------------------------------
   PWA install prompt - rendered only after beforeinstallprompt
   ---------------------------------------------------------- */
.pwa-install-banner {
  position: fixed;
  z-index: 1200;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: min(42rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 1rem;
  color: #172033;
  background: linear-gradient(135deg, rgba(238, 247, 255, .97), rgba(237, 233, 254, .97));
  box-shadow: 0 1.25rem 3.5rem rgba(67, 88, 244, .22);
  animation: pwaInstallEnter .28s ease-out both;
}

.pwa-install-mark {
  display: grid;
  place-items: center;
  width: 3.25rem;
  aspect-ratio: 1;
  border-radius: .85rem;
  color: #fff;
  background: linear-gradient(135deg, #4358f4, #7c3aed);
  box-shadow: 0 .65rem 1.4rem rgba(67, 88, 244, .2);
  font-family: var(--font-display, "Ribeye", serif);
  font-size: 1.65rem;
}

.pwa-install-copy {
  display: grid;
  gap: .2rem;
  min-width: 0;
}

.pwa-install-copy strong {
  font-family: var(--font-display, "Ribeye", serif);
  font-size: 1.05rem;
  line-height: 1.2;
}

.pwa-install-copy span {
  color: rgba(23, 32, 51, .68);
  font-size: .9rem;
  line-height: 1.35;
}

.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.pwa-install-actions .btn {
  margin: 0;
  white-space: nowrap;
}

@keyframes pwaInstallEnter {
  from { opacity: 0; transform: translateY(.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 680px) {
  .pwa-install-banner {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    grid-template-columns: auto minmax(0, 1fr);
    width: auto;
  }

  .pwa-install-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-banner {
    animation: none;
  }
}

/* =========================
   2) GLOBAL / BACKGROUND
   ========================= */
html{ max-width: 100%; overflow-x: clip; }

body{
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;

  color: var(--text);
  font-family: var(--font-body);

  /* FINAL body background in your file (last one wins) */
  background:
    radial-gradient(900px 500px at 15% 20%, #e6f4ff, transparent 60%),
    radial-gradient(800px 500px at 85% 30%, #eef8ff, transparent 55%),
    #f3f9ff;
}

/* floating blobs */
html::before,
html::after{
  content:"";
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: .45;
  pointer-events:none;
  z-index:0;
}
html::before{
  left:-200px;
  top:120px;
  background: radial-gradient(circle, #7dd3fc, transparent 60%);
}
html::after{
  right:-220px;
  bottom:80px;
  background: radial-gradient(circle, #bae6fd, transparent 60%);
}
@media (prefers-reduced-motion: reduce){
  html::before, html::after{ display:none; }
}

/* Media should not overflow */
img, video, canvas, svg{
  max-width: 100%;
  height: auto;
}

/* Wrap code on small screens */
pre, code{
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================
   3) TOPBAR / BRAND
   ========================= */
.topbar{
  background: rgba(50, 79, 240, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand{
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.015em;
  color: #ffffff;
}
.brand::after{
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  margin-top: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #60a5fa);
}

/* Optional: right panel title chip you had */
.rightPanelTitle{
  background: rgba(50, 79, 240, 0.92);
}

/* =========================
   4) SHELL / LAYOUT BASE
   ========================= */
.shell{
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 16px;
}
.shell, .content, .panel{
  overflow: visible;
  height: auto;
}

/* =========================
   5) PANELS (FINAL STATE)
   ========================= */
.panel,
.content{
  background: linear-gradient(180deg, #f0f7ff 0%, #eaf3fb 100%);
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 20px;
  box-shadow:
    0 20px 50px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.6);
}

/* Side panels match topbar (this was FINAL in your file) */
.panel.sidebar,
.panel.right{
  background: linear-gradient(180deg, var(--topbar-blue), var(--topbar-blue-deep));
  border: none;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(75,102,242,.25);
  backdrop-filter: blur(10px);

  /* FINAL padding rules from bottom of file */
  padding: 22px 22px;
}

/* Panel headers (FINAL) */
.panel.sidebar h3,
.panel.right h3{
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,.18);
  background: transparent;
  margin-top: 0;
  margin-bottom: 12px;

  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-transform: none;
}

/* Right panel text (FINAL) */
.panel.right p,
.panel.right .small,
.panel.right li{
  color: rgba(255,255,255,.85);
}

/* Sidebar typography + spacing (FINAL) */
.panel.sidebar{
  font-family: var(--font-body);
}
.panel.sidebar p,
.panel.sidebar .small{
  margin: 0 0 12px;
  line-height: 1.45;
  color: rgba(255,255,255,.92);
}

/* Tip block inside sidebar (FINAL) */
.panel.sidebar .block{
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.95);
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
}
.panel.sidebar .block .small{
  color: rgba(255,255,255,.95);
}

/* =========================
   6) SIDEBAR LINKS (FINAL)
   ========================= */
.sidebar a{
  border-bottom: none;

  margin: 4px 8px;
  border-radius: 10px;
  padding: 10px 12px;

  color: rgba(255,255,255,.9);
  opacity: .85;

  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.sidebar a:hover{
  background: rgba(255,255,255,.12);
  color: #ffffff;
  opacity: 1;
}
.sidebar a.active{
  background: rgba(255,255,255,.18);
  color: #ffffff;
  font-weight: 600;
  opacity: 1;
}

/* =========================
   7) CENTER CONTENT TYPOGRAPHY
   ========================= */
.content h1,
.content h2,
.content h3{
  color: #0f172a;
}
.content p,
.content li{
  color: rgba(15,23,42,.78);
}
.content .sub{
  color: rgba(15,23,42,.55);
}

h1, h2, h3{ color: #0f172a; }
p, li{ color: rgba(15,23,42,.78); }
.sub, .small{ color: rgba(15,23,42,.55); }

.content h1{
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.block h2{
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0em;
}

.sub{
  font-size: 1.05rem;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.5;
}

/* Display typography: Ribeye is reserved for titles, not body text or controls. */
h1,
h2,
h3,
.page-title,
.brand,
.logo,
.hero-title,
.section-title,
.lesson-title,
.module-title,
.card-title,
.fc-title,
.fc-summary-headline,
.lesson-hud-title,
.lesson-hud-next-title,
.verb-card-title,
.stepTitle,
.cta-title,
.hub-title,
.hub-recommendation h2,
.hub-card-title,
.how-title,
#modulesContainer summary,
.fc-summary-next .title,
.lesson-next .title {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

/* Accent underline */
.content h1::after{
  content:"";
  display:block;
  width:64px;
  height:4px;
  margin-top:12px;
  border-radius:999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
}

/* Clean HR */
hr{ border-top: 1px solid rgba(15,23,42,.10); }

/* =========================
   8) BUTTONS (FINAL)
   ========================= */
.btn{
  background: white;
  color: #0f172a;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow:
    0 4px 0 rgba(15,23,42,.12),
    0 10px 20px rgba(15,23,42,.08);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{
  transform: translateY(1px);
  box-shadow:
    0 2px 0 rgba(15,23,42,.12),
    0 6px 12px rgba(15,23,42,.06);
}

/* Primary buttons — FINAL override version */
a.btn.primary,
button.btn.primary{
  background: var(--brand-blue) !important;
  border: 1px solid var(--brand-blue) !important;
  color: #fff !important;

  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 600;

  box-shadow: 0 10px 22px rgba(75, 102, 242, 0.28);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

/* Hover should never go black */
a.btn.primary:hover,
button.btn.primary:hover{
  background: var(--brand-blue-hover) !important;
  border-color: var(--brand-blue-hover) !important;
  filter: none !important;
  opacity: 1 !important;
  box-shadow: 0 14px 30px rgba(75, 102, 242, 0.35);
  transform: translateY(-1px);
}

/* Active */
a.btn.primary:active,
button.btn.primary:active{
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(75, 102, 242, 0.25);
}

/* Secondary buttons (kept solid) */
a.btn:not(.primary),
button.btn:not(.primary){
  background: #fff !important;
  color: #1f2937 !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  filter: none !important;
  opacity: 1 !important;
}
a.btn:not(.primary):hover,
button.btn:not(.primary):hover{
  background: #fff !important;
  box-shadow: 0 10px 22px rgba(15,23,42,.12) !important;
  transform: translateY(-1px);
}

/* Right panel CTA is inverted (FINAL) */
.panel.right .btn.primary{
  background: #ffffff !important;
  color: var(--topbar-blue) !important;
}
.panel.right .btn.primary:hover{
  background: #f1f4ff !important;
}

/* =========================
   9) CARDS / BLOCKS (FINAL)
   ========================= */
/* NOTE: your file had an earlier `.block{ background-color: rgb(13,75,67); }`
   but later it was overridden by the “Card Upgrade”. Final appearance is
   the upgraded light gradient card. */
.block{
  position: relative;
  overflow: hidden;

  background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(243,249,255,0.85) 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;

  box-shadow:
    0 14px 36px rgba(15,23,42,0.08),
    inset 0 1px 0 rgba(255,255,255,0.7);

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.block:hover{
  transform: translateY(-2px);
  border-color: rgba(29,78,216,0.18);
  box-shadow:
    0 18px 46px rgba(15,23,42,0.12),
    inset 0 1px 0 rgba(255,255,255,0.75);
}
.block::before{
  content:"";
  position:absolute;
  inset:-60px -80px auto -80px;
  height:160px;
  background: radial-gradient(closest-side, rgba(59,130,246,0.14), transparent 70%);
  transform: rotate(-8deg);
  pointer-events:none;
}
.block > h2:first-child,
.block > h1:first-child{
  position: relative;
  padding-left: 14px;
}
.block > h2:first-child::before,
.block > h1:first-child::before{
  content:"";
  position:absolute;
  left:0;
  top:0.25em;
  width:6px;
  height:1.2em;
  border-radius:999px;
  background: linear-gradient(180deg, rgba(59,130,246,0.95), rgba(147,51,234,0.75));
}

/* =========================
   10) PRE / DATA SECTIONS (FINAL)
   ========================= */
pre{
  margin: 12px 0;
  padding: 16px 18px;
  border-radius: 16px;

  color: #0f172a;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.75;
  font-weight: 600;

  /* final background (last one wins) */
  background: linear-gradient(
    90deg,
    rgba(56,189,248,.35),
    rgba(75,102,242,.30),
    rgba(56,189,248,.35)
  );

  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 6px solid var(--brand-blue);

  box-shadow: 0 10px 26px rgba(15,23,42,.12);
}

/* If you specifically have <pre> inside blocks */
.block pre{
  border-radius: 14px;
  padding: 16px 18px;
}

/* =========================
   11) VERB SEARCH INPUT (FINAL)
   ========================= */
#verbInput{
  background: linear-gradient(180deg, #ffffff, #f1f6ff) !important;
  color: #0f172a !important;

  border: 2px solid #0f172a !important;
  border-radius: 14px;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 6px 16px rgba(15,23,42,.08);
}
#verbInput::placeholder{
  color: rgba(15,23,42,.45) !important;
}
#verbInput:focus{
  outline: none;
  border-color: #0f172a !important;
  box-shadow:
    0 0 0 3px rgba(15,23,42,.18),
    inset 0 1px 0 rgba(255,255,255,.9);
}

/* =========================
   12) PRACTICE (interactive)
   ========================= */
.practice .practice-item{
  padding: 14px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.65);
  margin: 12px 0;
}
.practice .prompt{
  font-weight: 700;
  margin-bottom: 10px;
}
.practice .row{
  display: flex;
  gap: 10px;
  align-items: center;
}
.practice input.answer{
  flex: 1;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,0.90);
  outline: none;
}
.practice input.answer:focus{
  border-color: rgba(29, 78, 216, 0.55);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}
.practice .feedback{
  margin-top: 10px;
  font-weight: 700;
}
.practice .feedback.ok{ color: #15803d; }
.practice .feedback.bad{ color: #b91c1c; }
.practice-actions{
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* =========================
   13) LETTER TILE
   ========================= */
.letter-tile{
  width: 120px;
  height: 120px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.letter-glyph{
  font-size: 64px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(15, 23, 42, 0.85);
}
a.is-locked{
  pointer-events: none;
  opacity: 0.55;
  filter: grayscale(0.2);
}

/* =========================
   14) MAPEO RAPIDO (Plantilla 002)
   ========================= */
.mapeo{ margin-top: 10px; }

.map-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0 12px;
}
.map-card{
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(243,249,255,0.85) 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.map-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  background: rgba(29, 78, 216, 0.10);
  border: 1px solid rgba(29, 78, 216, 0.20);
  color: rgba(29, 78, 216, 0.95);
}
.map-badge.does{
  background: rgba(147, 51, 234, 0.10);
  border-color: rgba(147, 51, 234, 0.20);
  color: rgba(147, 51, 234, 0.95);
}
.map-line{
  margin-top: 10px;
  font-size: 1.05rem;
  color: rgba(15, 23, 42, 0.92);
}
.map-sub{
  margin-top: 6px;
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.62);
}
.map-rule{
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.70);
  color: rgba(15, 23, 42, 0.86);
}
.chip{
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-right: 8px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: rgba(21, 128, 61, 0.95);
}
.muted{ color: rgba(15, 23, 42, 0.55); }

.map-example{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.map-example .good,
.map-example .bad{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.70);
  font-weight: 700;
}
.map-example .good{ border-color: rgba(34, 197, 94, 0.25); }
.map-example .bad{ border-color: rgba(239, 68, 68, 0.25); }

@media (max-width: 860px){
  .map-grid{ grid-template-columns: 1fr; }
  .map-example{ grid-template-columns: 1fr; }
}

/* =========================
   15) DRAG/DROP (word bank)
   ========================= */
.word-bank{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding:10px;
}
.dnd-chip{
  border: 2px solid rgba(15,23,42,.18);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.dnd-chip.used{
  opacity: .45;
  filter: grayscale(.2);
  cursor: not-allowed;
}
.sentence{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding:12px;
  border-radius:16px;
  background: linear-gradient(180deg,#ffffff,#f6f9ff);
  border: 1px solid rgba(15,23,42,.10);
}
.dnd-slot{
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px dashed rgba(75,102,242,.55);
  background: rgba(255,255,255,.75);
  font-weight: 700;
  color: rgba(15,23,42,.65);
  cursor: pointer;
}
.dnd-slot.filled{
  border-style: solid;
  color: #0f172a;
}

/* =========================
   16) COURSE PATH / STEPS
   ========================= */
.lessonPath{
  list-style:none;
  padding:0;
  margin:12px 0 0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.lessonStep{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.65);
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}
.stepNum{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  font-weight:800;
  background: rgba(0,0,0,.06);
}
.stepBody{ flex:1; min-width: 0; }
.stepTitle{ font-weight:800; line-height:1.15; }
.stepMeta{ margin-top:4px; font-size: 13px; opacity:.75; }
.stepBtn{ white-space:nowrap; }

.lessonStepQuiz{
  border:1px dashed rgba(0,0,0,.18);
  background: rgba(255,255,255,.55);
}

.courseStep{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
}
.stepLeft{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
/* smaller stepNum for courseStep (as in your file) */
.courseStep .stepNum{
  width:30px;
  height:30px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-weight:800;
  background: rgba(0,0,0,.08);
}
.stepText{
  display:flex;
  flex-direction:column;
  line-height:1.15;
  min-width:0;
}
.stepSub{
  font-size:12px;
  opacity:.78;
  margin-top:4px;
}
.stepStatus{
  font-size:12px;
  opacity:.85;
  white-space:nowrap;
}

/* Locked/Done state */
.isLocked{
  opacity:.55;
  filter:saturate(.8);
  cursor:not-allowed !important;
  pointer-events:none;
}
.isLocked .stepStatus::before{ content:"🔒 "; }
.isDone .stepStatus::before{ content:"✅ "; }

/* =========================
   17) RESPONSIVE PATCHES
   ========================= */
@media (max-width: 980px){
  .shell{
    display: block !important;
    padding: 14px;
  }
  .panel.sidebar,
  .panel.right,
  .content{
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px 0 !important;
  }
  .actions{ flex-wrap: wrap; }
}

@media (max-width: 560px){
  .topbar-inner{
    padding: 10px 12px !important;
    gap: 10px;
  }
  .brand{
    font-size: 1.05rem !important;
  }
  .panel,
  .block{
    border-radius: 18px !important;
  }
  .block{
    padding: 14px !important;
  }
  h1{
    font-size: 1.8rem !important;
    line-height: 1.15 !important;
  }
  h2{
    font-size: 1.25rem !important;
  }
  input, button, .btn{
    max-width: 100%;
  }
  .practice .row{
    flex-direction: column;
    align-items: stretch;
  }
  .practice .row .btn{
    width: 100%;
  }
}

/* =========================
   18) DESKTOP WIDTH EXPANSION (FINAL)
   ========================= */
@media (min-width: 981px){
  .shell{
    width: min(1320px, 100%);
    padding: 18px;

    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 280px;
    gap: 22px;
  }
}

@media (min-width: 1200px){
  .shell{
    width: min(1480px, 100%);
    padding: 20px;
    grid-template-columns: 260px minmax(0, 1fr) 320px;
    gap: 28px;
  }
}

/* FORCE shell wider on desktop (your final overrides) */
@media (min-width: 1200px){
  .shell{
    max-width: 1480px !important;
    width: min(1480px, 100%) !important;
    margin: 0 auto !important;
  }
}
@media (min-width: 1600px){
  .shell{
    max-width: 1640px !important;
    width: min(1640px, 100%) !important;
  }
}

@keyframes floaty{
  0%{ transform: translate3d(0,0,0); }
  50%{ transform: translate3d(12px,-10px,0); }
  100%{ transform: translate3d(0,0,0); }
}

html::before{ animation: floaty 10s ease-in-out infinite; }
html::after{  animation: floaty 14s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce){
  html::before, html::after{ animation:none; }
}

/* =========================================
   AUTH PAGE — LAYOUT OVERRIDE
   ========================================= */

body.auth-page{
  min-height: 100vh;
}

.auth-shell{
  width: min(1320px, calc(100% - 32px));
  margin: 24px auto 40px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 280px;
  gap: 26px;
  align-items: stretch;
}

body.auth-page .auth-shell{
  min-height: calc(100vh - 110px);
}

body.auth-page .auth-side{
  align-self: center;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.auth-page .auth-main{
  align-self: center;
  padding: 36px 34px;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.auth-page .auth-header{
  margin-bottom: 24px;
}

body.auth-page .auth-header h1{
  margin: 0 0 10px;
}

body.auth-page .auth-card{
  max-width: 560px;
  width: 100%;
  padding: 28px;
  margin-top: 4px;
}

body.auth-page .auth-tabs{
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

body.auth-page .auth-form{
  display: grid;
  gap: 14px;
}

body.auth-page .auth-form label{
  font-weight: 700;
  color: rgba(15,23,42,.72);
}

body.auth-page .auth-form input{
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.12);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  padding: 0 14px;
  font-size: 1rem;
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

body.auth-page .auth-form input:focus{
  outline: none;
  border-color: rgba(75,102,242,.75);
  box-shadow: 0 0 0 4px rgba(75,102,242,.12);
}

body.auth-page .auth-actions{
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

body.auth-page .auth-footer{
  margin-top: 16px;
  color: rgba(15,23,42,.55);
}

/* Animated texture accents: opt-in only for heroes and short reward moments. */
.texture-accent {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.texture-accent::before,
.texture-accent::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.texture-accent::before {
  z-index: 0;
  inset: -12%;
  background: url("assets/design/sweetink-gradient-texture.jpg") center / cover no-repeat;
  transform: translate3d(-2%, -1%, 0) scale(1.05);
  animation: expresateTextureDrift 56s ease-in-out infinite alternate;
  will-change: transform;
}

.texture-accent::after {
  z-index: 1;
  inset: 0;
}

.texture-accent > * {
  position: relative;
  z-index: 2;
}

.texture-accent--home::before {
  opacity: 0.22;
}

.texture-accent--home::after {
  background: linear-gradient(120deg, rgba(229, 246, 255, .88), rgba(237, 233, 254, .80) 58%, rgba(204, 214, 255, .66));
}

.texture-accent--pricing {
  border: 1px solid rgba(98, 112, 255, .26);
  border-radius: 24px;
  box-shadow: 0 22px 58px rgba(67, 56, 170, .18);
}

.texture-accent--pricing::before {
  opacity: 0.68;
  animation-duration: 48s;
}

.texture-accent--pricing::after {
  background: linear-gradient(135deg, rgba(24, 35, 102, .78), rgba(68, 54, 166, .58), rgba(42, 66, 171, .64));
}

.texture-accent.texture-accent--pricing h1,
.texture-accent.texture-accent--pricing .sub {
  color: #fff;
  text-shadow: 0 2px 16px rgba(17, 24, 71, .36);
}

.texture-accent.texture-accent--pricing .pricing-eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .28);
}

.texture-reward-burst {
  position: fixed;
  z-index: 10000;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(135deg, rgba(67, 88, 244, .30), rgba(139, 92, 246, .18)),
    url("assets/design/sweetink-gradient-texture.jpg") center / cover no-repeat;
  animation: expresateTextureReward 1.65s ease-out both;
}

@keyframes expresateTextureDrift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1.05); }
  50% { transform: translate3d(1.5%, -2%, 0) scale(1.09); }
  100% { transform: translate3d(2%, 1.5%, 0) scale(1.06); }
}

@keyframes expresateTextureReward {
  0% { opacity: 0; transform: scale(1.035); }
  28% { opacity: .18; }
  100% { opacity: 0; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .texture-accent::before,
  .texture-reward-burst {
    animation: none !important;
    transform: none !important;
    will-change: auto;
  }

  .texture-reward-burst {
    display: none;
  }
}

body.auth-page .auth-benefits{
  margin: 12px 0 18px;
  padding-left: 18px;
  display: grid;
  gap: 12px;
}

body.auth-page .auth-note{
  margin-top: auto;
  line-height: 1.6;
}

body.auth-page .auth-tip{
  margin-top: 18px;
}

@media (min-width: 1400px){
  .auth-shell{
    width: min(1400px, calc(100% - 40px));
    grid-template-columns: 270px minmax(620px, 1fr) 300px;
  }

  body.auth-page .auth-main{
    padding: 44px 42px;
  }

  body.auth-page .auth-card{
    max-width: 620px;
    padding: 32px;
  }
}

@media (max-width: 980px){
  .auth-shell{
    width: min(900px, calc(100% - 24px));
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: auto;
    margin: 16px auto 28px;
  }

  body.auth-page .auth-side,
  body.auth-page .auth-main{
    min-height: auto;
    align-self: stretch;
  }

  body.auth-page .auth-main{
    padding: 26px 20px;
  }

  body.auth-page .auth-card{
    max-width: 100%;
    padding: 22px;
  }
}

@media (max-width: 560px){
  .auth-shell{
    width: calc(100% - 20px);
    gap: 14px;
  }

  body.auth-page .auth-main{
    padding: 20px 16px;
  }

  body.auth-page .auth-card{
    padding: 18px;
    border-radius: 18px;
  }

  body.auth-page .auth-tabs{
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  body.auth-page .auth-actions{
    flex-direction: column;
    align-items: stretch;
  }

  body.auth-page .auth-actions .btn{
    width: 100%;
  }
}

/* AUTH PANEL SPACING FIX */

body.auth-page .panel.auth-side{
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.auth-page .panel.auth-side h3{
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15,23,42,.10);
  font-weight: 600;
}

body.auth-page .panel.auth-side p{
  margin: 0;
  line-height: 1.5;
}

body.auth-page .auth-benefits{
  margin-top: 6px;
  margin-bottom: 12px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.auth-page .auth-tip{
  padding: 12px 14px;
  margin-top: 6px;
  border-radius: 12px;
}

body.auth-page .auth-side{
  align-self: start;
}

/* ================================================
   Premium nav item + badge
   Sidebar background is dark blue so amber/gold
   reads clearly without being garish.
   ================================================ */

/* Flex row so the PRO badge floats to the right */
.sidebar a.nav-premium {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(251, 191, 36, .18);
  background: rgba(251, 191, 36, .07);
  transition:
    background   .15s ease,
    border-color .15s ease,
    box-shadow   .15s ease,
    transform    .12s ease;
}

.sidebar a.nav-premium:hover {
  background:   rgba(251, 191, 36, .15);
  border-color: rgba(251, 191, 36, .30);
  box-shadow:   0 0 18px rgba(251, 191, 36, .14);
  opacity: 1;
}

/* Active state — current page is pricing.html */
.sidebar a.nav-premium.active {
  background:   rgba(251, 191, 36, .20);
  border-color: rgba(251, 191, 36, .38);
  box-shadow:   0 0 22px rgba(251, 191, 36, .18);
  opacity: 1;
}

/* PRO badge chip */
.premium-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .60rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, .30) 0%,
    rgba(245, 158, 11, .20) 100%
  );
  border:  1px solid rgba(251, 191, 36, .42);
  color:   #fcd34d;
  transition: border-color .15s ease, background .15s ease;
}

.sidebar a.nav-premium:hover .premium-badge,
.sidebar a.nav-premium.active .premium-badge {
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, .42) 0%,
    rgba(245, 158, 11, .32) 100%
  );
  border-color: rgba(251, 191, 36, .60);
  color: #fde68a;
}

/* Mobile: badge never overflows */
@media (max-width: 560px) {
  .premium-badge { font-size: .58rem; padding: 1px 6px; }
}

/* =========================================
   AUTH PAGE — POLISHED PANEL / CARD PASS
   ========================================= */

body.auth-page .auth-shell{
  align-items: center;
}

/* Side panels: less bulky, cleaner structure */
body.auth-page .panel.auth-side{
  padding: 18px 18px 20px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  border-radius: 22px;
  box-shadow:
    0 14px 34px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.55);
}

/* Auth page side panels should feel lighter than course sidebars */
body.auth-page .panel.auth-side{
  background: linear-gradient(180deg, rgba(255,255,255,.82) 0%, rgba(241,247,255,.9) 100%);
  border: 1px solid rgba(15,23,42,.06);
  color: #0f172a;
}

body.auth-page .panel.auth-side h3{
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.auth-page .panel.auth-side p,
body.auth-page .panel.auth-side li,
body.auth-page .panel.auth-side .small{
  color: rgba(15,23,42,.62);
  line-height: 1.55;
  margin: 0;
}

body.auth-page .auth-benefits{
  margin: 2px 0 6px;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

body.auth-page .auth-note{
  margin-top: auto;
  padding-top: 10px;
  color: rgba(15,23,42,.52);
}

/* Tip card */
body.auth-page .auth-tip{
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

body.auth-page .auth-tip .small{
  color: rgba(15,23,42,.58);
}

/* Main auth area: slightly more prominent */
body.auth-page .auth-main{
  padding: 42px 42px 34px;
  border-radius: 26px;
}

body.auth-page .auth-header{
  margin-bottom: 26px;
}

body.auth-page .auth-header .sub{
  max-width: none;
}

/* Main auth card */
body.auth-page .auth-card{
  max-width: 640px;
  padding: 34px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.88) 0%, rgba(246,250,255,.92) 100%);
  box-shadow:
    0 20px 44px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.7);
}

/* Tabs feel more premium */
body.auth-page .auth-tabs{
  gap: 12px;
  margin-bottom: 24px;
}

body.auth-page .auth-tabs .btn{
  min-width: 138px;
}

/* Inputs */
body.auth-page .auth-form{
  gap: 12px;
}

body.auth-page .auth-form label{
  font-size: .98rem;
  font-weight: 700;
  color: rgba(15,23,42,.72);
}

body.auth-page .auth-form .input,
body.auth-page .auth-form input{
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.08);
  background: linear-gradient(180deg, #f7fbff 0%, #eef4ff 100%);
  color: #0f172a;
  font-size: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 1px 2px rgba(15,23,42,.03);
}

body.auth-page .auth-form .input:focus,
body.auth-page .auth-form input:focus{
  outline: none;
  border-color: rgba(75,102,242,.45);
  box-shadow:
    0 0 0 4px rgba(75,102,242,.10),
    inset 0 1px 0 rgba(255,255,255,.95);
}

/* Message box */
body.auth-page .msgBox{
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(15,23,42,.06);
}

/* Actions */
body.auth-page .auth-actions{
  margin-top: 10px;
  gap: 12px;
}

body.auth-page .auth-actions .btn.primary{
  min-width: 120px;
}

/* Footer */
body.auth-page .auth-footer{
  margin-top: 18px;
  color: rgba(15,23,42,.52);
}

/* Desktop balance */
@media (min-width: 981px){
  body.auth-page .auth-side{
    align-self: center;
  }
}

/* Tablet */
@media (max-width: 980px){
  body.auth-page .panel.auth-side{
    min-height: auto;
  }

  body.auth-page .auth-main{
    padding: 28px 22px;
  }

  body.auth-page .auth-card{
    max-width: 100%;
    padding: 24px;
  }
}

/* Mobile */
@media (max-width: 560px){
  body.auth-page .panel.auth-side{
    padding: 16px;
    border-radius: 18px;
  }

  body.auth-page .auth-main{
    padding: 20px 16px;
    border-radius: 20px;
  }

  body.auth-page .auth-card{
    padding: 18px;
    border-radius: 18px;
  }

  body.auth-page .auth-tabs .btn{
    min-width: 0;
  }
}

/* Topbar bubble selections */
.topbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 18px;
}

.topbar-actions{
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-nav{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-nav::-webkit-scrollbar{
  display: none;
}

.topbar-nav-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 0.82rem;
  border-radius: 999px;
  color: rgba(255,255,255,.88);
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.topbar-nav-link:hover{
  transform: translateY(-1px);
  color: #ffffff;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.22);
  text-decoration: none;
}

.topbar-nav-link.active{
  color: #ffffff;
  background: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 18px rgba(15,23,42,.12);
}

.topbar-nav-link.is-premium{
  color: #fff7d6;
}

.topbar-actions .pill,
.topbar-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1f2937;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 6px 14px rgba(15,23,42,.10);
  backdrop-filter: blur(10px);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.topbar-actions .pill:hover,
.topbar-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.90);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    0 10px 18px rgba(15,23,42,.12);
}

.topbar-actions .pill:active,
.topbar-link:active{
  transform: translateY(0);
}

#profileBtn.topbar-link {
  background: rgba(79, 105, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 8px 18px rgba(15,23,42,.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#profileBtn.topbar-link:hover {
  background: rgba(111, 130, 255, 0.28);
  color: #ffffff;
  border-color: rgba(255,255,255,0.48);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 12px 24px rgba(15,23,42,.18);
}

.device-limit-notice {
  position: relative;
  z-index: 19;
  width: min(56rem, calc(100% - 2rem));
  margin: 0.75rem auto 0;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #3b2f15;
  background: linear-gradient(135deg, rgba(255, 247, 214, .96), rgba(255, 237, 180, .96));
  border: 1px solid rgba(180, 124, 20, .28);
  border-radius: 0.9rem;
  box-shadow: 0 14px 34px rgba(87, 62, 17, .12);
}

.device-limit-notice div {
  display: grid;
  gap: 0.15rem;
}

.device-limit-notice span {
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .device-limit-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .device-limit-notice .btn {
    width: 100%;
  }
}

body.auth-page .auth-side{
  align-self: start;
}

/* ============================================================
   MICROANIMATIONS — skeleton shimmer + audio ripple
   All respect prefers-reduced-motion.
   ============================================================ */

/* 4) Skeleton / loading shimmer */
@keyframes skeleton-sweep {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton-pulse {
  background: linear-gradient(
    90deg,
    rgba(15,23,42,.06) 25%,
    rgba(15,23,42,.14) 50%,
    rgba(15,23,42,.06) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-sweep 1.6s ease-in-out infinite;
  border-radius: 6px;
  /* Use font-size:0 rather than color:transparent — avoids the risk of
     color:transparent propagating to child elements via CSS inheritance
     if this class is ever accidentally placed on a container. */
  font-size: 0 !important;
  pointer-events: none;
  user-select: none;
  min-height: 1em; /* keep the shimmer bar visible even with font-size:0 */
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-pulse {
    animation: none;
    background: rgba(15,23,42,.08);
  }
}

/* 5) Audio button ripple — pulsing ring while audio plays */
@keyframes audio-ripple {
  0%   { transform: scale(1);    opacity: .60; }
  100% { transform: scale(1.65); opacity: 0;   }
}
.is-playing {
  position: relative;
}
.is-playing::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 2px solid var(--accent, #38bdf8);
  opacity: 0;
  animation: audio-ripple 1.05s ease-out infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .is-playing::after {
    animation: none;
    opacity: .35;
  }
}

/* ============================================================
   GLOBAL ALERTS / TOAST SYSTEM
   Powered by alerts.js.  Supports 5 types:
   success · error · warning · info · premium
   ============================================================ */

/* Container — fixed, top-right on desktop */
#expresate-alerts {
  position: fixed;
  top: 74px;       /* sits just below the ~64 px topbar */
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
  pointer-events: none;  /* let clicks pass through the empty space */
}

/* Individual toast */
.al-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.97);
  border-left: 4px solid #38bdf8; /* overridden per type */
  box-shadow:
    0 8px 26px rgba(15,23,42,.13),
    0 2px 6px  rgba(15,23,42,.07),
    inset 0 1px 0 rgba(255,255,255,.6);
  font-family: var(--font-body, 'Nunito', system-ui, sans-serif);
  font-size: 0.93rem;
  line-height: 1.4;
  color: #0f172a;

  /* Enter state — invisible + shifted right */
  opacity: 0;
  transform: translateX(30px);
  transition:
    transform .28s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity   .22s ease;
}

.al-toast.al-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Exit — faster, no spring */
.al-toast.al-out {
  opacity: 0;
  transform: translateX(30px);
  transition:
    transform .20s ease,
    opacity   .20s ease;
}

/* ── Icon badge ── */
.al-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 1px;
}

/* ── Body text ── */
.al-body {
  flex: 1;
  min-width: 0;
}

/* ── Close button ── */
.al-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(15,23,42,.38);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: 1px;
  transition: background .12s ease, color .12s ease;
}
.al-close:hover {
  background: rgba(15,23,42,.07);
  color: rgba(15,23,42,.75);
}
.al-close:focus-visible {
  outline: 2px solid var(--brand-blue, #4b66f2);
  outline-offset: 2px;
}

/* ── Type: success ── */
.al-success { border-left-color: #22c55e; }
.al-success .al-icon {
  background: rgba(22,163,74,.12);
  color: #15803d;
}

/* ── Type: error ── */
.al-error { border-left-color: #ef4444; }
.al-error .al-icon {
  background: rgba(220,38,38,.10);
  color: #dc2626;
}

/* ── Type: warning ── */
.al-warning { border-left-color: #f59e0b; }
.al-warning .al-icon {
  background: rgba(217,119,6,.12);
  color: #b45309;
}

/* ── Type: info ── */
.al-info { border-left-color: #38bdf8; }
.al-info .al-icon {
  background: rgba(2,132,199,.10);
  color: #0369a1;
}

/* ── Type: premium (amber/gold) ── */
.al-premium {
  border-left-color: #f59e0b;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,.97) 0%,
    rgba(255,249,230,.97) 100%
  );
}
.al-premium .al-icon {
  background: rgba(245,158,11,.15);
  color: #b45309;
}

/* ── Mobile: bottom-center stack, slide up ── */
@media (max-width: 600px) {
  #expresate-alerts {
    top: auto;
    right: 0;
    bottom: 20px;
    left: 0;
    width: 100%;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
  }
  .al-toast {
    width: 100%;
    max-width: 420px;
    transform: translateY(28px);
  }
  .al-toast.al-visible {
    transform: translateY(0);
  }
  .al-toast.al-out {
    transform: translateY(28px);
    transition: transform .20s ease, opacity .20s ease;
  }
}

/* ── Reduced motion: opacity only, no sliding ── */
@media (prefers-reduced-motion: reduce) {
  .al-toast,
  .al-toast.al-out {
    transform: none !important;
    transition: opacity .15s ease !important;
  }
}

/* ============================================================
   RESPONSIVE / ZOOM HARDENING
   Keeps the current design, but lets the shared shell reflow
   smoothly as browser zoom reduces the effective viewport.
   ============================================================ */
:root {
  --page-gutter: clamp(0.75rem, 2vw, 1.5rem);
  --shell-max: 92.5rem;
}

.topbar-inner {
  width: min(var(--shell-max), calc(100% - (var(--page-gutter) * 2)));
  max-width: none;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.topbar-actions {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-link,
.topbar-actions .pill {
  max-width: 100%;
  white-space: nowrap;
}

.shell {
  width: min(var(--shell-max), 100%);
  padding: var(--page-gutter);
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr) minmax(13rem, 19rem);
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

.content,
.panel,
.panel.sidebar,
.panel.right {
  min-width: 0;
}

.content {
  padding: clamp(0.9rem, 2vw, 1.25rem);
}

.block {
  padding: clamp(0.85rem, 1.8vw, 1.125rem);
}

.content h1 {
  font-size: clamp(2rem, 3.2vw, 3rem);
}

.content h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.12;
}

.content h3 {
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.18;
}

.map-grid,
.map-example {
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}

.courseStep,
.lessonStep {
  min-width: 0;
}

.courseStep .stepLeft {
  flex: 1 1 auto;
}

.courseStep .stepStatus,
.stepBtn {
  flex: 0 0 auto;
}

@media (max-width: 1200px) {
  .shell {
    grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr) minmax(12rem, 15rem);
  }

  .panel.sidebar,
  .panel.right {
    padding: 1rem;
  }
}

@media (max-width: 980px) {
  .shell {
    width: min(56rem, 100%);
    grid-template-columns: 1fr;
  }

  .panel.sidebar,
  .panel.right,
  .content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .panel.sidebar {
    order: 2;
  }

  .panel.right {
    order: 3;
  }
}

@media (max-width: 700px) {
  .topbar-inner {
    width: 100%;
    padding: 0.625rem 0.75rem !important;
  }

  .brand {
    min-width: 0;
    font-size: 1rem !important;
  }

  .topbar-actions {
    gap: 0.45rem;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    justify-content: flex-start;
    padding-bottom: 0.1rem;
  }

  .topbar-nav-link {
    min-height: 2rem;
    padding-inline: 0.72rem;
    font-size: 0.84rem;
  }

  .topbar-link,
  .topbar-actions .pill {
    min-height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
  }

  .shell {
    padding: 0.75rem;
  }

  .courseStep {
    align-items: flex-start;
    flex-direction: column;
  }

  .courseStep .stepStatus {
    align-self: flex-start;
    margin-left: 2.625rem;
  }

  .stepBtn {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .topbar-inner {
    align-items: center;
  }

  .topbar-actions {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: auto;
  }

  .topbar-nav {
    margin-top: 0.35rem;
    gap: 0.1rem;
  }

  .topbar-nav-link {
    padding-inline: 0.5rem;
    font-size: 0.8rem;
  }

  .topbar-link,
  .topbar-actions .pill {
    flex: 0 0 auto;
    width: auto;
    max-width: min(11rem, calc(100vw - 8.5rem));
    padding-inline: 0.65rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .shell {
    padding: 0.625rem;
  }

  .content,
  .panel {
    border-radius: 1rem;
  }

  .content h1 {
    font-size: clamp(1.85rem, 11vw, 2.35rem) !important;
  }

  .btn,
  input,
  select,
  textarea {
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .topbar-nav-link {
    padding-inline: 0.28rem;
    font-size: 0.76rem;
  }
}
