/* ==========================================================================
   Support Academic DRC — Global Stylesheet
   Premium Educational Marketplace
   ========================================================================== */

/* -------------------- CSS Variables -------------------- */
:root {
  /* Brand palette (derived from logo: deep academic blue + gold accent) */
  --brand-primary: #0b3d91;
  --brand-primary-600: #0a3480;
  --brand-primary-700: #082a68;
  --brand-primary-050: #eaf1ff;
  --brand-accent: #f2b134;
  --brand-accent-600: #d9991f;

  /* Neutrals */
  --white: #ffffff;
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-050: #f8fafc;

  /* Semantic */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0b3d91 0%, #1e63d1 100%);
  --gradient-accent:  linear-gradient(135deg, #f2b134 0%, #f7d774 100%);
  --gradient-hero:    radial-gradient(1200px 600px at 10% 10%, rgba(11,61,145,.10), transparent 60%),
                      radial-gradient(1000px 500px at 90% 0%, rgba(242,177,52,.14), transparent 60%),
                      linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --shadow-sm: 0 2px 6px rgba(15,23,42,.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 40px -12px rgba(15,23,42,.16);
  --shadow-brand: 0 16px 40px -12px rgba(11,61,145,.35);

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", sans-serif;

  /* Spacing scale */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* Layout */
  --container: 1200px;
  --header-h: 76px;
  --transition: 220ms cubic-bezier(.2,.7,.2,1);
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-primary-700); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink-900);
  margin: 0 0 var(--sp-4);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin: 0 0 var(--sp-4); color: var(--ink-600); }
ul { margin: 0; padding: 0; list-style: none; }

/* -------------------- Layout Helpers -------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.section { padding: var(--sp-20) 0; }
.section--tight { padding: var(--sp-12) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--sp-12); }
/* usable outside .section-head too — pages were inlining this rule by hand */
.eyebrow,
.section-head .eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--brand-primary-050);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.section-head p { font-size: 1.1rem; color: var(--ink-500); }
.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  border: 1.5px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gradient-primary); color: var(--white); box-shadow: var(--shadow-brand); }
.btn--primary:hover { color: var(--white); box-shadow: 0 22px 44px -12px rgba(11,61,145,.45); }
.btn--accent { background: var(--brand-accent); color: var(--ink-900); }
.btn--accent:hover { background: var(--brand-accent-600); color: var(--ink-900); }
.btn--ghost { background: transparent; border-color: var(--ink-200); color: var(--ink-800); }
.btn--ghost:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.btn--white { background: var(--white); color: var(--brand-primary); }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; }
.btn--lg { padding: 16px 30px; font-size: 1.05rem; }

/* -------------------- Header / Nav -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(226,232,240,.7);
  transition: box-shadow var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
/* header spans wider than page content so the primary nav never has to wrap */
.site-header .container { max-width: 1360px; }
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: nowrap;
}
.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink-900);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: grid; place-items: center;
  color: var(--white); font-weight: 800;
  box-shadow: var(--shadow-brand);
}
.brand__name small { display: block; font-size: 0.7rem; color: var(--ink-500); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

.nav__links {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 2px;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-700);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.nav__link:hover { color: var(--brand-primary); background: var(--brand-primary-050); }
.nav__link.is-active { color: var(--brand-primary); }
.nav__link.is-active::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 2px; background: var(--brand-primary); border-radius: 2px;
}
.nav__cta { flex: 0 0 auto; display: flex; align-items: center; gap: var(--sp-3); }
.nav__cta .btn { white-space: nowrap; }

/* Header cart icon */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--ink-200);
  color: var(--ink-800);
  background: var(--white);
  transition: border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease;
  flex: 0 0 auto;
}
.nav-cart:hover,
.nav-cart.is-active {
  color: var(--brand-primary);
  border-color: var(--brand-accent);
  background: var(--brand-accent-050, #fff8e8);
  box-shadow: var(--shadow-sm);
}
.nav-cart__icon { display: block; }
.nav-cart__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.nav-cart.has-items { border-color: var(--brand-primary-200, #c5d4ea); }

/* Currency + Language (same behaviour as live site).
   These live in a fixed dock rather than the header bar — the header has no spare
   width for them, and pinning them keeps both reachable at any scroll position. */
.utility-dock {
  position: fixed;
  left: var(--sp-6); bottom: var(--sp-6);
  z-index: 90;
  display: flex; align-items: center;
  padding: 7px 16px;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
}
.utility-dock .nav-tools { margin-right: 0; gap: 12px; }
.utility-dock .nav-tool { min-height: 32px; }
.utility-dock .nav-tool + .nav-tool { padding-left: 12px; border-left: 1px solid var(--ink-100); }
.nav-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-right: 4px;
}
.nav-tool {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}
.nav-tool img {
  flex: 0 0 auto;
  display: block;
}
.nav-currency-form { margin: 0; }
.nav-currency-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right center;
  background-size: 14px 12px;
  padding: 6px 22px 6px 0;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-800);
  cursor: pointer;
  min-width: 64px;
  outline: none;
}
.nav-tool--language #google_translate_element {
  position: relative;
  line-height: 1;
}
.nav-tool--language .goog-te-gadget {
  font-size: 0 !important;
  color: transparent !important;
}
.nav-tool--language .goog-te-gadget .goog-te-combo {
  appearance: none;
  -webkit-appearance: none;
  margin: 0 !important;
  border: 0;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right center;
  background-size: 14px 12px;
  padding: 6px 22px 6px 0;
  font-family: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: var(--ink-800) !important;
  height: auto !important;
  width: auto;
  min-width: 96px;
  cursor: pointer;
  outline: none;
}
.nav-tool--language .goog-te-gadget-simple {
  border: 0 !important;
  background: transparent !important;
}
.nav-tool--language .goog-logo-link,
.nav-tool--language .goog-te-gadget span,
.nav-tool--language .goog-te-banner-frame,
body > .skiptranslate,
.goog-te-banner-frame.skiptranslate {
  display: none !important;
}
body { top: 0 !important; }

.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--ink-200);
  color: var(--ink-800);
  align-items: center; justify-content: center;
}

/* Mega menu (unused — primary nav has no dropdowns) */
.has-mega { position: relative; }
.mega {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: min(720px, 90vw);
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-6);
  display: none;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 50;
}
.has-mega:hover .mega,
.has-mega:focus-within .mega { display: grid; opacity: 1; transform: translateX(-50%) translateY(0); grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.mega a {
  display: block;
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  color: var(--ink-700);
  font-weight: 500;
}
.mega a:hover { background: var(--brand-primary-050); color: var(--brand-primary); }
.mega strong { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); margin-bottom: 6px; }

/* -------------------- Hero -------------------- */
.hero {
  background: var(--gradient-hero);
  padding: var(--sp-20) 0 var(--sp-24);
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 600;
  color: var(--ink-700);
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--sp-5);
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.hero h1 { margin-bottom: var(--sp-4); }
.hero__lead { font-size: 1.15rem; color: var(--ink-600); margin-bottom: var(--sp-8); max-width: 540px; }
.hero__cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-8); }
.hero__meta { display: flex; gap: var(--sp-6); flex-wrap: wrap; color: var(--ink-600); font-size: 0.9rem; }
.hero__meta strong { color: var(--ink-900); font-family: var(--font-display); font-size: 1.4rem; display: block; }

.hero__visual {
  position: relative;
  aspect-ratio: 5/5;
  border-radius: var(--radius-xl);
  background: var(--gradient-primary);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero__visual::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(400px 200px at 80% 20%, rgba(242,177,52,.4), transparent 60%),
    radial-gradient(500px 300px at 10% 90%, rgba(255,255,255,.15), transparent 60%);
}
.hero__card {
  position: absolute;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.hero__card--1 { top: 8%; left: -6%; width: 220px; }
.hero__card--2 { bottom: 10%; right: -4%; width: 240px; animation-delay: -3s; }
.hero__card--3 { top: 45%; right: 8%; width: 200px; animation-delay: -1.5s; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero__card h5 { margin: 0 0 4px; font-size: 0.95rem; }
.hero__card p { margin: 0; font-size: 0.8rem; color: var(--ink-500); }
.hero__card .row { display: flex; align-items: center; gap: var(--sp-3); }
.hero__card .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gradient-accent); display: grid; place-items: center; font-weight: 700; color: var(--ink-900); }

/* Search bar */
.searchbar {
  margin-top: var(--sp-8);
  background: var(--white);
  border-radius: var(--radius-full);
  padding: 6px;
  display: flex;
  gap: 4px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--ink-200);
  max-width: 620px;
}
.searchbar select, .searchbar input {
  border: none;
  background: transparent;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink-800);
  outline: none;
  min-width: 0;
}
.searchbar input { flex: 1; }
.searchbar select { border-right: 1px solid var(--ink-200); }
.searchbar .btn { padding: 10px 22px; }

/* -------------------- Stats -------------------- */
.stats {
  background: var(--white);
  padding: var(--sp-12) 0;
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
}
.stats__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-6); }
.stat { text-align: center; padding: var(--sp-4); }
.stat__num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; color: var(--brand-primary); letter-spacing: -0.02em; }
.stat__label { color: var(--ink-500); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* -------------------- Cards -------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* Course card */
.course-card__thumb {
  aspect-ratio: 16/10;
  background: var(--gradient-primary);
  position: relative;
  display: grid; place-items: center;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  padding: var(--sp-6);
  text-align: center;
}
.course-card__thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(300px 200px at 80% 10%, rgba(242,177,52,.35), transparent 60%);
}
.course-card__badge {
  position: absolute; top: var(--sp-3); left: var(--sp-3);
  background: rgba(255,255,255,.9);
  color: var(--brand-primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
}
.course-card__body { padding: var(--sp-5); }
.course-card__meta { display: flex; gap: var(--sp-3); font-size: 0.8rem; color: var(--ink-500); margin-bottom: var(--sp-2); }
.course-card__title { font-size: 1.1rem; margin-bottom: var(--sp-3); line-height: 1.35; }
.course-card__teacher { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.85rem; color: var(--ink-600); margin-bottom: var(--sp-4); }
.course-card__teacher .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--gradient-accent); display: grid; place-items: center; font-weight: 700; font-size: 0.75rem; color: var(--ink-900); }
.course-card__foot { display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-4); border-top: 1px solid var(--ink-100); }
.course-card__price { font-family: var(--font-display); font-weight: 800; color: var(--brand-primary); font-size: 1.15rem; }
.rating { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-accent); font-weight: 600; font-size: 0.9rem; }
.rating span { color: var(--ink-500); font-weight: 500; margin-left: 4px; }

/* Teacher card */
.teacher-card { text-align: center; padding: var(--sp-6); position: relative; }
.teacher-card__avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--gradient-primary);
  margin: 0 auto var(--sp-4);
  display: grid; place-items: center;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-brand);
}
.teacher-card__name { margin-bottom: 4px; font-size: 1.15rem; }
.teacher-card__subject { color: var(--brand-primary); font-weight: 600; font-size: 0.85rem; margin-bottom: var(--sp-3); text-transform: uppercase; letter-spacing: 0.06em; }
.teacher-card__meta { display: flex; justify-content: center; gap: var(--sp-4); font-size: 0.85rem; color: var(--ink-500); padding-top: var(--sp-4); border-top: 1px solid var(--ink-100); margin-top: var(--sp-4); }
.teacher-card__meta strong { color: var(--ink-900); display: block; font-family: var(--font-display); font-size: 1.05rem; }
.sponsored-badge {
  position: absolute; top: var(--sp-3); right: var(--sp-3);
  background: var(--gradient-accent);
  color: var(--ink-900);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* -------------------- Pricing -------------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.plan {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.plan--featured {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--white);
  box-shadow: var(--shadow-brand);
}
.plan--featured h3, .plan--featured .plan__price { color: var(--white); }
.plan--featured p, .plan--featured li { color: rgba(255,255,255,.85); }
.plan--featured .plan__ribbon { position: absolute; top: -12px; right: 20px; background: var(--brand-accent); color: var(--ink-900); padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.plan__name { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--brand-primary); margin-bottom: var(--sp-2); }
.plan--featured .plan__name { color: var(--brand-accent); }
.plan__price { font-family: var(--font-display); font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: var(--sp-2); }
.plan__price small { font-size: 1rem; font-weight: 500; color: var(--ink-500); }
.plan--featured .plan__price small { color: rgba(255,255,255,.7); }
.plan__features { margin: var(--sp-6) 0; }
.plan__features li { padding: var(--sp-2) 0; display: flex; gap: var(--sp-3); align-items: flex-start; }
.plan__features li::before { content: "✓"; color: var(--success); font-weight: 700; }
.plan--featured .plan__features li::before { color: var(--brand-accent); }

/* -------------------- Testimonials -------------------- */
.testimonial {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: transform var(--transition), box-shadow var(--transition);
}
.testimonial:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testimonial__quote { font-size: 1rem; color: var(--ink-700); font-style: italic; margin-bottom: var(--sp-4); }
.testimonial__author { display: flex; align-items: center; gap: var(--sp-3); }
.testimonial__author .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--gradient-accent); display: grid; place-items: center; font-weight: 700; color: var(--ink-900); }
.testimonial__author h5 { margin: 0; font-size: 0.95rem; }
.testimonial__author p { margin: 0; font-size: 0.8rem; color: var(--ink-500); }

/* -------------------- Blog -------------------- */
.blog-card__thumb { aspect-ratio: 16/9; background: var(--gradient-primary); border-radius: var(--radius-md) var(--radius-md) 0 0; overflow: hidden; }
.blog-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card { display: flex; flex-direction: column; }
.blog-card__body { display: flex; flex-direction: column; flex: 1; }
.blog-card__body .btn { align-self: flex-start; margin-top: auto; }
.blog-card__body { padding: var(--sp-5); }
.blog-card__meta { font-size: 0.8rem; color: var(--ink-500); margin-bottom: var(--sp-2); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.blog-card__title { font-size: 1.1rem; margin-bottom: var(--sp-3); }

/* -------------------- Partners -------------------- */
.partners { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--sp-6); align-items: center; }
.partner {
  height: 70px;
  border: 1px dashed var(--ink-200);
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  color: var(--ink-400);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  transition: color var(--transition), border-color var(--transition);
}
.partner:hover { color: var(--brand-primary); border-color: var(--brand-primary); }

/* -------------------- Newsletter -------------------- */
.newsletter {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: var(--sp-16);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(500px 200px at 80% 20%, rgba(242,177,52,.35), transparent 60%);
}
.newsletter > * { position: relative; }
.newsletter h2 { color: var(--white); }
.newsletter p { color: rgba(255,255,255,.8); max-width: 520px; margin: 0 auto var(--sp-8); }
.newsletter__form {
  display: flex; gap: var(--sp-2);
  max-width: 520px; margin: 0 auto;
  background: rgba(255,255,255,.15);
  padding: 6px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
}
.newsletter__form input {
  flex: 1;
  border: none; outline: none;
  background: transparent;
  padding: 12px 16px;
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
}
.newsletter__form input::placeholder { color: rgba(255,255,255,.7); }

/* -------------------- Footer -------------------- */
.site-footer {
  background: var(--ink-900);
  color: var(--ink-300);
  padding: var(--sp-20) 0 var(--sp-6);
  margin-top: var(--sp-20);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: var(--sp-8); margin-bottom: var(--sp-12); }
.site-footer h5 { color: var(--white); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--sp-4); }
.site-footer a { color: var(--ink-300); padding: 4px 0; font-size: 0.9rem; }
/* link columns stack one per line — scoped so the brand lockup and social row keep their own display */
.footer-grid h5 ~ a { display: block; }
.site-footer a:hover { color: var(--brand-accent); }
.site-footer .brand__name, .site-footer .brand { color: var(--white); }
.site-footer .brand__name small { color: var(--ink-400); }
.footer-about p { color: var(--ink-400); font-size: 0.9rem; margin-top: var(--sp-4); max-width: 320px; }
.footer-social { display: flex; gap: var(--sp-2); margin-top: var(--sp-5); }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  display: grid; place-items: center;
  color: var(--ink-300);
}
.footer-social a:hover { background: var(--brand-primary); color: var(--white); }
.footer-bottom {
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: var(--ink-400);
  flex-wrap: wrap; gap: var(--sp-3);
}

/* -------------------- Breadcrumbs -------------------- */
.breadcrumbs {
  padding: var(--sp-6) 0;
  background: var(--ink-050);
  border-bottom: 1px solid var(--ink-100);
}
.breadcrumbs ol {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  margin: 0; padding: 0; list-style: none;
  font-size: 0.9rem; color: var(--ink-500);
}
.breadcrumbs ol li { display: flex; align-items: center; list-style: none; }
.breadcrumbs ol li::marker { content: ""; }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--ink-300); }
.breadcrumbs a { color: var(--ink-600); }
.breadcrumbs [aria-current] { color: var(--brand-primary); font-weight: 600; }

/* -------------------- Page header -------------------- */
.page-header {
  background: var(--gradient-hero);
  padding: var(--sp-16) 0;
  text-align: center;
}
.page-header p { max-width: 640px; margin: 0 auto; color: var(--ink-500); font-size: 1.05rem; }

/* -------------------- Forms -------------------- */
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink-800); font-size: 0.9rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(11,61,145,.12);
}

/* -------------------- Filter sidebar -------------------- */
.layout-with-sidebar { display: grid; grid-template-columns: 280px 1fr; gap: var(--sp-8); }
.sidebar {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  position: sticky; top: calc(var(--header-h) + var(--sp-4));
  align-self: start;
}
.sidebar h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); margin-bottom: var(--sp-3); }
.filter-group { padding: var(--sp-4) 0; border-bottom: 1px solid var(--ink-100); }
.filter-group:last-child { border-bottom: none; }
.filter-group label { display: flex; align-items: center; gap: var(--sp-2); padding: 6px 0; color: var(--ink-700); font-size: 0.9rem; cursor: pointer; }
.filter-group label:hover { color: var(--brand-primary); }

/* -------------------- Pagination -------------------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: var(--sp-10); }
.pagination a, .pagination span {
  min-width: 42px; height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-200);
  display: grid; place-items: center;
  color: var(--ink-700);
  font-weight: 600;
  transition: all var(--transition);
}
.pagination a:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.pagination .is-active { background: var(--brand-primary); color: var(--white); border-color: var(--brand-primary); }

/* -------------------- Timeline -------------------- */
.timeline { position: relative; padding-left: var(--sp-8); }
.timeline::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: var(--ink-200); }
.timeline-item { position: relative; padding-bottom: var(--sp-8); }
.timeline-item::before {
  content: "";
  position: absolute; left: -32px; top: 4px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--brand-primary);
}
.timeline-item h4 { margin-bottom: 4px; }
.timeline-item small { color: var(--brand-primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; }

/* -------------------- Accordion -------------------- */
.accordion { border: 1px solid var(--ink-100); border-radius: var(--radius-md); overflow: hidden; background: var(--white); }
.accordion + .accordion { margin-top: var(--sp-3); }
.accordion__head {
  width: 100%; text-align: left;
  padding: var(--sp-4) var(--sp-5);
  font-weight: 600; color: var(--ink-900);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white);
}
.accordion__head:hover { background: var(--ink-050); }
.accordion__body { padding: 0 var(--sp-5) var(--sp-5); display: none; color: var(--ink-600); }
.accordion.is-open .accordion__body { display: block; }
.accordion.is-open .accordion__head::after { transform: rotate(45deg); }
.accordion__head::after { content: "+"; font-size: 1.4rem; color: var(--brand-primary); transition: transform var(--transition); }

/* -------------------- Tabs -------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ink-200); margin-bottom: var(--sp-6); overflow-x: auto; }
.tab {
  padding: var(--sp-3) var(--sp-5);
  color: var(--ink-600);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}
.tab.is-active { color: var(--brand-primary); border-color: var(--brand-primary); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* -------------------- Dashboard mockup -------------------- */
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.dash-card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
}
.dash-card small { color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; font-weight: 700; }
.dash-card .value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--ink-900); margin-top: 4px; }
.dash-card .trend { display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; background: rgba(16,185,129,.1); color: var(--success); }
.dash-card .trend.is-down { background: rgba(239,68,68,.1); color: var(--danger); }
.chart-mock {
  height: 180px;
  background:
    linear-gradient(180deg, rgba(11,61,145,.15) 0%, rgba(11,61,145,0) 100%),
    repeating-linear-gradient(90deg, var(--ink-100) 0 1px, transparent 1px 60px);
  border-radius: var(--radius-md);
  position: relative;
  margin-top: var(--sp-4);
}
.chart-mock::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 70%;
  background: linear-gradient(90deg, transparent, var(--brand-primary), var(--brand-accent), var(--brand-primary));
  -webkit-mask: linear-gradient(180deg, transparent 80%, black 100%);
          mask: linear-gradient(180deg, transparent 80%, black 100%);
  opacity: .3;
}

/* -------------------- Forum -------------------- */
.forum-item {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-5);
  align-items: center;
  transition: all var(--transition);
}
.forum-item:hover { border-color: var(--brand-primary); box-shadow: var(--shadow-sm); }
.forum-item + .forum-item { margin-top: var(--sp-3); }
.forum-item .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--gradient-accent); display: grid; place-items: center; font-weight: 700; color: var(--ink-900); }
.forum-item__meta { display: flex; gap: var(--sp-4); font-size: 0.8rem; color: var(--ink-500); margin-top: 4px; }
.forum-item__stats { text-align: center; }
.forum-item__stats strong { display: block; color: var(--brand-primary); font-family: var(--font-display); font-size: 1.2rem; }
.forum-item__stats small { color: var(--ink-500); font-size: 0.75rem; }

/* -------------------- Certificate -------------------- */
.certificate {
  aspect-ratio: 1.414/1;
  background: var(--white);
  border: 20px solid transparent;
  background-clip: padding-box;
  border-radius: var(--radius-lg);
  padding: var(--sp-16);
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
  background-image:
    linear-gradient(white, white),
    var(--gradient-primary);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.certificate::before {
  content: "";
  position: absolute; inset: var(--sp-4);
  border: 1px solid var(--brand-primary-050);
  border-radius: var(--radius-md);
  pointer-events: none;
}
.certificate small { text-transform: uppercase; letter-spacing: 0.3em; color: var(--brand-primary); font-weight: 700; font-size: 0.85rem; }
.certificate h2 { font-size: 2.5rem; margin: var(--sp-4) 0; }
.cert-name { font-family: var(--font-display); font-size: 2rem; color: var(--brand-primary); margin: var(--sp-6) 0; padding-bottom: var(--sp-3); border-bottom: 2px solid var(--ink-200); display: inline-block; padding-inline: var(--sp-8); }
.cert-foot { display: flex; justify-content: space-between; margin-top: var(--sp-10); align-items: flex-end; }
.cert-sig { text-align: center; }
.cert-sig strong { display: block; padding-top: 6px; border-top: 1px solid var(--ink-300); font-family: var(--font-display); }
.qr-mock { width: 90px; height: 90px; background: repeating-linear-gradient(45deg, var(--ink-900) 0 4px, var(--white) 4px 8px); border-radius: 8px; }

/* -------------------- Back to Top -------------------- */
.to-top {
  position: fixed;
  right: var(--sp-6); bottom: var(--sp-6);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--white);
  display: grid; place-items: center;
  box-shadow: var(--shadow-brand);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 90;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-4px); color: var(--white); }

/* -------------------- Loader -------------------- */
.page-loader {
  position: fixed; inset: 0;
  background: var(--white);
  display: grid; place-items: center;
  z-index: 9999;
  transition: opacity 400ms ease;
}
.page-loader.is-hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--ink-100);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------- Modal -------------------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
  padding: var(--sp-4);
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--sp-8);
  box-shadow: var(--shadow-lg);
  animation: modalIn 220ms cubic-bezier(.2,.7,.2,1);
}
.modal--wide { max-width: 640px; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.modal__head h3 { margin: 0; }
.modal__close {
  border: none; background: var(--ink-050); color: var(--ink-600);
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.modal__close:hover { background: var(--ink-100); color: var(--ink-900); }
@keyframes modalIn { from { transform: translateY(20px); opacity: 0; } }

/* -------------------- Reveal on scroll -------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* -------------------- CMS / rich-text content -------------------- */
.cms-content { color: var(--ink-600); line-height: 1.75; }
.cms-content > *:first-child { margin-top: 0; }
.cms-content h1, .cms-content h2, .cms-content h3,
.cms-content h4, .cms-content h5, .cms-content h6 { color: var(--ink-900); margin: var(--sp-8) 0 var(--sp-3); line-height: 1.3; }
.cms-content h1 { font-size: 1.9rem; }
.cms-content h2 { font-size: 1.55rem; }
.cms-content h3 { font-size: 1.3rem; }
.cms-content h4, .cms-content h5, .cms-content h6 { font-size: 1.05rem; }
.cms-content p { margin: 0 0 var(--sp-4); }
.cms-content a { color: var(--brand-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cms-content a:hover { color: var(--brand-accent-600); }
.cms-content strong, .cms-content b { color: var(--ink-800); }
/* the base reset strips ul markers — restore them for author-written copy */
.cms-content ul, .cms-content ol { margin: 0 0 var(--sp-4); padding-left: var(--sp-6); }
.cms-content ul { list-style: disc; }
.cms-content ol { list-style: decimal; }
.cms-content li { margin-bottom: 6px; }
.cms-content li::marker { color: var(--brand-primary); }
.cms-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.cms-content blockquote {
  margin: 0 0 var(--sp-4); padding: var(--sp-4) var(--sp-5);
  border-left: 3px solid var(--brand-primary); background: var(--ink-050);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--ink-700);
}
.cms-content table { width: 100%; border-collapse: collapse; margin-bottom: var(--sp-4); }
.cms-content th, .cms-content td { border: 1px solid var(--ink-200); padding: 10px 12px; text-align: left; }
.cms-content th { background: var(--ink-050); color: var(--ink-800); }
.cms-content hr { border: none; border-top: 1px solid var(--ink-100); margin: var(--sp-8) 0; }
.prose { max-width: 820px; }
.table-scroll { overflow-x: auto; }

/* -------------------- Map holder -------------------- */
.map-embed {
  position: relative; aspect-ratio: 16/10;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--ink-100); background: var(--gradient-primary);
  box-shadow: var(--shadow-sm);
}
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* -------------------- Empty state -------------------- */
.empty-state { padding: var(--sp-12) var(--sp-6); text-align: center; }
.empty-state h3 { margin-bottom: var(--sp-2); }
.empty-state p { color: var(--ink-500); margin: 0; }

/* -------------------- Toolbar above a listing -------------------- */
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6);
}
.list-toolbar p { margin: 0; color: var(--ink-500); }
.list-toolbar strong { color: var(--ink-900); }

/* -------------------- Responsive -------------------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 480px; margin: 0 auto; }
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .partners { grid-template-columns: repeat(3, 1fr); }
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
/* nav breathing room before the desktop bar runs out of width.
   The brand tagline stays visible — it is part of the logo lockup — and shrinks instead. */
@media (max-width: 1280px) {
  .nav { gap: var(--sp-3); }
  .nav__link { padding: 9px 9px; font-size: 0.9rem; }
  .nav__link.is-active::after { left: 9px; right: 9px; }
  .site-header .brand { flex: 0 1 228px; min-width: 0; gap: 10px; }
  .site-header .brand__name { font-size: 0.98rem; }
  .site-header .brand__name small { font-size: 0.58rem; letter-spacing: 0.01em; }
  .nav__cta { gap: 8px; }
  .nav__cta .btn--sm { padding: 8px 13px; }
}
/* below this the 9 primary links cannot fit legibly — collapse to the menu button */
@media (max-width: 1180px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .site-header.is-open .nav__links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--white); padding: var(--sp-4); gap: 4px;
    border-bottom: 1px solid var(--ink-100);
    box-shadow: var(--shadow-md);
  }
  .site-header.is-open .nav__link { font-size: 0.95rem; padding: 10px 12px; }
}
@media (max-width: 720px) {
  .nav__cta .btn--ghost { display: none; }
  .nav-tools { gap: 10px; margin-right: 0; }
  .utility-dock { left: var(--sp-4); bottom: var(--sp-4); padding: 6px 12px; }
  .utility-dock .nav-tools { gap: 8px; }
  .utility-dock .nav-tool + .nav-tool { padding-left: 8px; }
  .utility-dock .nav-tool img { width: 16px; height: 16px; }
  .nav-currency-select,
  .nav-tool--language .goog-te-gadget .goog-te-combo {
    font-size: 0.82rem !important;
    min-width: 0;
  }
  .nav-tool--language .goog-te-gadget .goog-te-combo { min-width: 78px; }
  .grid-2, .grid-3, .grid-4, .grid-auto { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .searchbar { flex-direction: column; border-radius: var(--radius-lg); padding: var(--sp-3); }
  .searchbar select { border-right: none; border-bottom: 1px solid var(--ink-200); }
  .newsletter__form { flex-direction: column; border-radius: var(--radius-lg); }
  .footer-grid { grid-template-columns: 1fr; }
  .partners { grid-template-columns: repeat(2, 1fr); }
  .section { padding: var(--sp-16) 0; }
  .forum-item { grid-template-columns: 1fr; text-align: left; }
  .certificate { padding: var(--sp-6); }
}

/* ==========================================================================
   BRAND REFRESH — palette derived from the company logo
   (deep navy field · metallic silver ring · ice-blue signal lines)
   These overrides are intentionally at the end so they win the cascade.
   ========================================================================== */
:root{
  --brand-primary:#173a5e;        /* deep steel navy */
  --brand-primary-600:#122f4c;
  --brand-primary-700:#0d2136;
  --brand-primary-050:#eef3f9;
  --brand-primary-100:#dbe7f2;
  --brand-accent:#4f9ad6;         /* ice / signal blue from graph lines */
  --brand-accent-600:#3a80bb;
  --brand-accent-050:#eaf3fb;
  --silver:#c3ccd6;               /* metallic silver */
  --silver-light:#e3e9ef;
  --silver-dark:#8f9aa8;

  --gradient-primary: linear-gradient(135deg,#0d2136 0%, #2c6ea6 100%);
  --gradient-accent:  linear-gradient(135deg,#4f9ad6 0%, #8ec5ec 100%);
  --gradient-silver:  linear-gradient(135deg,#e3e9ef 0%, #aab6c4 55%, #dfe6ee 100%);
  --gradient-hero:
     radial-gradient(1200px 600px at 8% -5%, rgba(23,58,94,.10), transparent 60%),
     radial-gradient(1000px 560px at 100% 0%, rgba(79,154,214,.16), transparent 62%),
     linear-gradient(180deg,#ffffff 0%, #f3f7fb 100%);
  --shadow-brand: 0 18px 44px -14px rgba(13,33,54,.42);

  --ink-050:#f4f7fb;
}
a{ color:var(--brand-accent-600); }
a:hover{ color:var(--brand-primary); }
.eyebrow, .section-head .eyebrow, .hero__eyebrow{ background:var(--brand-accent-050); color:var(--brand-accent-600); }

/* logo lockup */
.brand{ display:flex; align-items:center; gap:12px; }
.brand__logo{ width:44px; height:44px; border-radius:12px; box-shadow:var(--shadow-sm); flex:none; }
.brand__mark{ display:none; }
.brand__name{ display:flex; flex-direction:column; font-family:var(--font-display); font-weight:800; color:var(--ink-900); line-height:1.05; font-size:1.06rem; white-space:nowrap; }
.brand__name small{ font-weight:600; font-size:.66rem; letter-spacing:.02em; color:var(--ink-500); white-space:nowrap; }

/* buttons keep semantic tokens, refine accent button */
.btn--accent{ background:var(--gradient-accent); color:#08243b; box-shadow:0 12px 26px -12px rgba(79,154,214,.6); }
.btn--accent:hover{ filter:brightness(1.03); transform:translateY(-1px); }

/* badges */
.badge{ display:inline-flex; align-items:center; gap:6px; padding:5px 11px; border-radius:var(--radius-full); font-size:.72rem; font-weight:700; letter-spacing:.02em; }
.badge--sponsored{ background:var(--gradient-accent); color:#08243b; }
.badge--premium{ background:linear-gradient(135deg,#1b2a3a,#3a5a7d); color:#e9f2fb; }
.badge--recommended{ background:var(--brand-accent-050); color:var(--brand-accent-600); }
.badge--top{ background:linear-gradient(135deg,#caa53d,#f0d98a); color:#3a2c07; }
.badge--future{ background:#fff4e5; color:#b26a00; border:1px solid #ffd9a3; }
.badge--soft{ background:var(--ink-100); color:var(--ink-600); }
.badge--success{ background:#e7f7ef; color:#0a8a54; }
.badge--warn{ background:#fff4e5; color:#b26a00; }
.badge--danger{ background:#fde8e8; color:#c0392b; }

/* future expansion ribbon */
.future-banner{ display:flex; align-items:center; gap:14px; padding:16px 22px; border-radius:var(--radius-lg);
  background:linear-gradient(120deg,#fff8ef,#fdeed6); border:1px solid #ffdcae; color:#8a5300; margin-bottom:28px; font-weight:600; }
.future-banner .badge{ flex:none; }

/* section on dark navy (glass) */
.section--dark{ background:
   radial-gradient(900px 500px at 12% 0%, rgba(79,154,214,.22), transparent 60%),
   linear-gradient(160deg,#0d2136,#173a5e 60%,#0d2136); color:#dbe7f2; }
.section--dark h1,.section--dark h2,.section--dark h3,.section--dark h4{ color:#fff; }
.section--dark p{ color:#a9c0d6; }
.glass{ background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16); backdrop-filter:blur(14px); border-radius:var(--radius-lg); }

/* generic media card image */
.card__media{ height:180px; border-radius:var(--radius-md); background:var(--gradient-silver); object-fit:cover; width:100%; margin-bottom:14px; }
.thumb-course{ position:relative; }
.thumb-course .badge{ position:absolute; top:12px; left:12px; }

/* ratings gold */
.rating{ color:#e2a838; font-weight:600; }

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */
.auth{ min-height:100vh; display:grid; grid-template-columns:1.05fr .95fr; }
.auth__aside{ position:relative; padding:56px; color:#dbe7f2; display:flex; flex-direction:column; justify-content:space-between;
  background:radial-gradient(700px 400px at 20% 10%, rgba(79,154,214,.28), transparent 60%), linear-gradient(160deg,#0d2136,#173a5e); }
.auth__aside .brand__name, .auth__aside .brand__name small{ color:#fff; }
.auth__aside h2{ color:#fff; }
.auth__quote{ font-size:1.15rem; line-height:1.6; color:#cfe0f0; }
.auth__panel{ display:flex; align-items:center; justify-content:center; padding:40px 24px; background:var(--white); }
.auth__form{ width:100%; max-width:420px; }
.auth__form h1{ font-size:1.9rem; margin-bottom:6px; }
.field{ margin-bottom:16px; }
.field label{ display:block; font-weight:600; font-size:.86rem; color:var(--ink-700); margin-bottom:6px; }
.field input, .field select, .field textarea{ width:100%; padding:12px 14px; border:1px solid var(--ink-200); border-radius:var(--radius-sm);
  font-family:inherit; font-size:.95rem; color:var(--ink-800); background:var(--white); transition:border var(--transition), box-shadow var(--transition); }
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color:var(--brand-accent); box-shadow:0 0 0 4px var(--brand-accent-050); }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.role-toggle{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:20px; }
.role-toggle label{ border:1px solid var(--ink-200); border-radius:var(--radius-sm); padding:12px; text-align:center; cursor:pointer; font-weight:600; color:var(--ink-600); }
.role-toggle input{ display:none; }
.role-toggle input:checked + span{ color:var(--brand-primary); }
.role-toggle label:has(input:checked){ border-color:var(--brand-accent); background:var(--brand-accent-050); color:var(--brand-primary); }
.auth__meta{ display:flex; justify-content:space-between; align-items:center; font-size:.86rem; margin:6px 0 18px; }
.divider{ display:flex; align-items:center; gap:12px; color:var(--ink-400); font-size:.82rem; margin:20px 0; }
.divider::before,.divider::after{ content:""; flex:1; height:1px; background:var(--ink-200); }
.social-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* ==========================================================================
   DASHBOARD LAYOUT
   ========================================================================== */
.dash{ display:grid; grid-template-columns:264px 1fr; min-height:100vh; background:var(--ink-050); }
.dash__side{ background:linear-gradient(180deg,#0d2136,#122f4c); color:#c4d3e2; padding:22px 16px; position:sticky; top:0; height:100vh; overflow-y:auto; }
.dash__brand{ display:flex; align-items:center; gap:10px; padding:6px 8px 20px; }
.dash__brand img{ width:38px; height:38px; border-radius:10px; }
.dash__brand b{ color:#fff; font-family:var(--font-display); font-size:1rem; display:flex; flex-direction:column; line-height:1.05; }
.dash__brand small{ font-weight:600; font-size:.56rem; letter-spacing:.02em; color:rgba(255,255,255,.55); text-transform:uppercase; white-space:nowrap; }
.dash__group{ font-size:.68rem; text-transform:uppercase; letter-spacing:.12em; color:#6f89a3; margin:18px 10px 8px; }
.dash__nav a{ display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:10px; color:#b8cadd; font-size:.9rem; font-weight:500; margin-bottom:2px; }
.dash__nav a .ic{ width:18px; text-align:center; opacity:.9; }
.dash__nav a:hover{ background:rgba(255,255,255,.06); color:#fff; }
.dash__nav a.is-active{ background:var(--gradient-accent); color:#08243b; font-weight:700; }
.dash__main{ padding:26px 30px 60px; }
.dash__topbar{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.dash__search{ display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--ink-200); border-radius:var(--radius-full); padding:8px 16px; flex:1; max-width:420px; }
.dash__search input{ border:none; outline:none; width:100%; font-size:.9rem; background:transparent; }
.dash__user{ display:flex; align-items:center; gap:12px; }
.dash__avatar{ width:40px; height:40px; border-radius:50%; background:var(--gradient-primary); color:#fff; display:grid; place-items:center; font-weight:700; }
.pagehead{ margin-bottom:22px; }
.pagehead h1{ font-size:1.7rem; margin-bottom:4px; }
.pagehead p{ margin:0; }

/* KPI cards */
.kpi-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:24px; }
.kpi{ background:#fff; border:1px solid var(--ink-100); border-radius:var(--radius-lg); padding:20px; box-shadow:var(--shadow-xs); }
.kpi__top{ display:flex; align-items:center; justify-content:space-between; }
.kpi__icon{ width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--brand-accent-050); color:var(--brand-accent-600); font-size:1.1rem; }
.kpi__num{ font-family:var(--font-display); font-size:1.9rem; font-weight:800; color:var(--ink-900); margin:12px 0 2px; }
.kpi__label{ font-size:.85rem; color:var(--ink-500); }
.kpi__delta{ font-size:.78rem; font-weight:700; }
.kpi__delta.up{ color:#0a8a54; } .kpi__delta.down{ color:#c0392b; }

/* panel + table */
.panel{ background:#fff; border:1px solid var(--ink-100); border-radius:var(--radius-lg); padding:22px; box-shadow:var(--shadow-xs); margin-bottom:22px; }
.panel__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.panel__head h3{ margin:0; font-size:1.15rem; }
.table{ width:100%; border-collapse:collapse; font-size:.9rem; }
.table th{ text-align:left; font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-500); padding:10px 12px; border-bottom:1px solid var(--ink-100); }
.table td{ padding:13px 12px; border-bottom:1px solid var(--ink-100); color:var(--ink-700); }
.table tr:hover td{ background:var(--ink-050); }
.table .u{ display:flex; align-items:center; gap:10px; }
.table .u .av{ width:34px; height:34px; border-radius:50%; background:var(--gradient-primary); color:#fff; display:grid; place-items:center; font-weight:700; font-size:.78rem; }

/* bar chart (pure CSS) */
.chart{ display:flex; align-items:flex-end; gap:12px; height:200px; padding-top:10px; }
.chart .bar{ flex:1; background:var(--gradient-primary); border-radius:8px 8px 0 0; position:relative; min-height:6px; transition:height .6s cubic-bezier(.2,.7,.2,1); }
.chart .bar span{ position:absolute; bottom:-22px; left:0; right:0; text-align:center; font-size:.72rem; color:var(--ink-500); }
.chart-legend{ display:flex; gap:16px; margin-top:26px; font-size:.82rem; color:var(--ink-500); }

/* progress */
.progress{ height:8px; border-radius:6px; background:var(--ink-100); overflow:hidden; }
.progress > i{ display:block; height:100%; background:var(--gradient-accent); }

/* protection notice (messaging) */
.protect{ display:flex; gap:12px; padding:14px 16px; border-radius:var(--radius-md); background:#eef7ee; border:1px solid #cdeccd; color:#256b2e; font-size:.86rem; margin-bottom:16px; }
.msg-blocked{ background:#fff3f3; border:1px dashed #f0b4b4; color:#b23b3b; padding:2px 6px; border-radius:6px; }

/* language switcher */
.lang{ display:inline-flex; border:1px solid var(--ink-200); border-radius:var(--radius-full); overflow:hidden; }
.lang button{ padding:6px 12px; font-size:.8rem; font-weight:600; color:var(--ink-500); }
.lang button.is-active{ background:var(--brand-primary); color:#fff; }

@media (max-width:960px){
  .auth{ grid-template-columns:1fr; } .auth__aside{ display:none; }
  .dash{ grid-template-columns:1fr; } .dash__side{ position:fixed; z-index:60; transform:translateX(-100%); transition:transform .3s; width:264px; }
  .dash.is-open .dash__side{ transform:none; }
  .kpi-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:560px){ .kpi-grid{ grid-template-columns:1fr; } .field-row{ grid-template-columns:1fr; } }

/* ==========================================================================
   LIVE CHAT — course threads (1:1) and the shared public chat box.
   Class names deliberately match the existing chat JS; only the styling is
   new, so presence / typing / receipts / unread all keep working.
   ========================================================================== */

/* ---------- Shell ---------- */
.chat-sticky-area{ position:sticky; top:20px; align-self:flex-start; }
.course-chat-shell{
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--white);
  border:1px solid var(--ink-100);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-md);
  height:calc(100vh - 210px); min-height:540px; max-height:780px;
}

/* ---------- Header ---------- */
.course-chat-head{
  display:flex; align-items:center; gap:14px;
  padding:16px 20px;
  border-bottom:1px solid var(--ink-100);
  background:linear-gradient(180deg,#fff,var(--ink-050));
}
.chat-avatar{
  position:relative; flex:0 0 46px;
  width:46px; height:46px; border-radius:50%;
  background:var(--gradient-primary); color:var(--white);
  display:grid; place-items:center;
  font-weight:800; font-size:1.05rem; letter-spacing:.02em;
  box-shadow:var(--shadow-brand);
}
.chat-status-dot{
  position:absolute; right:-1px; bottom:1px;
  width:13px; height:13px; border-radius:50%;
  background:var(--ink-300); border:2.5px solid var(--white);
}
.chat-status-dot.online{ background:var(--success); box-shadow:0 0 0 3px rgba(16,185,129,.18); }
.chat-head-main{ flex:1; min-width:0; }
.chat-title{
  margin:0 0 2px; font-family:var(--font-display);
  font-size:1.02rem; font-weight:700; color:var(--ink-900);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.chat-subtitle{ margin:0; font-size:.82rem; color:var(--ink-500); }
.chat-subtitle b{ color:var(--ink-700); font-weight:600; }
.chat-head-actions{ display:flex; flex-direction:column; align-items:flex-end; gap:7px; flex:none; }
.chat-status-pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 11px; border-radius:var(--radius-full);
  background:var(--ink-100); color:var(--ink-600);
  font-size:.72rem; font-weight:700; white-space:nowrap;
}
.chat-status-pill::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--ink-400); }
.chat-status-pill.online{ background:#e7f7ef; color:#0a8a54; }
.chat-status-pill.online::before{ background:var(--success); }
.chat-unread-badge{
  display:none; min-width:22px; padding:3px 8px;
  border-radius:var(--radius-full);
  background:var(--brand-primary); color:var(--white);
  font-size:.72rem; font-weight:800; text-align:center;
}

/* typing indicator with animated dots */
.chat-typing-indicator{
  display:none; align-items:center; gap:5px;
  margin:3px 0 0; font-size:.78rem; font-weight:600; color:#0a8a54;
}
.chat-typing-indicator::after{
  content:"\2022\2022\2022"; letter-spacing:1px;
  animation:chatTypingPulse 1.2s ease-in-out infinite;
}
@keyframes chatTypingPulse{ 0%,100%{ opacity:.25 } 50%{ opacity:1 } }

/* ---------- Privacy strip ---------- */
.chat-privacy{
  display:flex; align-items:center; gap:8px;
  padding:9px 20px;
  background:#fff8ef; border-bottom:1px solid #ffdcae;
  color:#8a5300; font-size:.78rem; font-weight:500;
}
.chat-privacy::before{ content:"\1F512"; font-size:.85rem; }

/* ---------- Message list ---------- */
.chat-messages-wrap{ position:relative; flex:1; min-height:0; min-width:0; display:flex; }
.chat-messages{
  /* min-width:0 — without it this flex child refuses to shrink below its widest
     message and the shell clips long bubbles on narrow screens */
  flex:1; min-height:0; min-width:0; overflow-y:auto;
  padding:20px; background:var(--ink-050);
}
.chat-row{ max-width:100%; }
.chat-bubble{ min-width:0; }
.chat-messages::-webkit-scrollbar{ width:8px; }
.chat-messages::-webkit-scrollbar-thumb{ background:var(--ink-200); border-radius:8px; }
.chat-messages::-webkit-scrollbar-thumb:hover{ background:var(--ink-300); }
.chat-empty{
  height:100%; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:6px;
  text-align:center; color:var(--ink-500); font-size:.9rem;
}
.chat-empty::before{ content:"\1F4AC"; font-size:2rem; opacity:.5; }
.chat-day-note{
  display:block; width:fit-content; margin:0 auto 16px;
  padding:4px 12px; border-radius:var(--radius-full);
  background:var(--white); border:1px solid var(--ink-100);
  color:var(--ink-500); font-size:.72rem; font-weight:600;
}

.chat-row{ display:flex; margin-bottom:12px; animation:chatMsgIn 220ms cubic-bezier(.2,.7,.2,1); }
.chat-row.mine{ justify-content:flex-end; }
@keyframes chatMsgIn{ from{ opacity:0; transform:translateY(6px); } }
.chat-bubble{
  max-width:74%; padding:10px 14px 7px;
  border-radius:16px 16px 16px 5px;
  background:var(--white); border:1px solid var(--ink-100);
  box-shadow:var(--shadow-xs);
}
.chat-row.mine .chat-bubble{
  border-radius:16px 16px 5px 16px;
  background:var(--gradient-primary); border-color:transparent;
  box-shadow:0 6px 16px -8px rgba(11,61,145,.55);
}
.chat-meta{
  margin-bottom:3px; font-size:.68rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.06em; color:var(--brand-primary);
}
.chat-row.mine .chat-meta{ color:rgba(255,255,255,.7); }
.chat-text{ font-size:.9rem; line-height:1.5; color:var(--ink-800); word-break:break-word; }
.chat-row.mine .chat-text{ color:var(--white); }
.chat-msg-foot{
  display:flex; align-items:center; justify-content:flex-end; gap:6px;
  margin-top:4px; font-size:.68rem; color:var(--ink-400); line-height:1;
}
.chat-row.mine .chat-msg-foot{ color:rgba(255,255,255,.75); }
.msg-ticks{ font-weight:800; letter-spacing:-2px; }
.msg-ticks.seen{ color:#7cd4ff; }

.chat-new-notice{
  display:none; position:absolute; left:50%; bottom:16px; z-index:2;
  transform:translateX(-50%);
  padding:8px 16px; border:0; border-radius:var(--radius-full);
  background:var(--ink-900); color:var(--white);
  font-family:inherit; font-weight:700; font-size:.8rem; cursor:pointer;
  box-shadow:var(--shadow-lg);
}
.chat-new-notice:hover{ background:var(--brand-primary); }

/* ---------- Composer ---------- */
.chat-composer{
  position:sticky; bottom:0; z-index:4;
  padding:14px 20px; background:var(--white);
  border-top:1px solid var(--ink-100);
}
.chat-composer textarea{
  width:100%; resize:none; min-height:52px; max-height:170px;
  padding:12px 14px; font-family:inherit; font-size:.92rem; color:var(--ink-800);
  background:var(--ink-050); border:1px solid var(--ink-200);
  border-radius:var(--radius-md); outline:none;
  transition:border var(--transition), box-shadow var(--transition);
}
.chat-composer textarea:focus{
  background:var(--white); border-color:var(--brand-accent);
  box-shadow:0 0 0 4px var(--brand-accent-050);
}
.chat-composer-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px; }
.chat-tools{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.chat-counter{ font-size:.74rem; color:var(--ink-400); white-space:nowrap; }
.chat-send{
  display:inline-flex; align-items:center; gap:7px;
  padding:10px 22px; border:0; border-radius:var(--radius-full);
  background:var(--gradient-primary); color:var(--white);
  font-family:inherit; font-weight:700; font-size:.88rem; cursor:pointer;
  box-shadow:var(--shadow-brand); transition:transform var(--transition), filter var(--transition);
}
.chat-send:hover:not(:disabled){ transform:translateY(-1px); filter:brightness(1.06); }
.chat-send:disabled{ opacity:.6; cursor:not-allowed; box-shadow:none; }
.chat-refresh{
  padding:9px 16px; border:1px solid var(--ink-200); border-radius:var(--radius-full);
  background:var(--white); color:var(--ink-700);
  font-family:inherit; font-weight:600; font-size:.85rem; cursor:pointer;
}
.chat-refresh:hover{ border-color:var(--brand-primary); color:var(--brand-primary); }
.chat-error{
  display:none; margin-bottom:10px; padding:9px 13px;
  border-radius:var(--radius-sm); background:#fde8e8;
  border:1px solid #f7c9c9; color:#c0392b; font-size:.82rem; font-weight:500;
}

/* ---------- Thread list (teacher "Course Chats") ---------- */
.chat-threads{ display:grid; gap:12px; }
.chat-thread{
  display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:16px; align-items:center;
  padding:16px 18px; background:var(--white);
  border:1px solid var(--ink-100); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-xs);
  transition:border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.chat-thread:hover{ border-color:var(--brand-accent); box-shadow:var(--shadow-md); transform:translateY(-2px); }
.chat-thread.is-unread{ border-left:3px solid var(--brand-primary); }
.chat-thread__av{
  width:48px; height:48px; border-radius:50%;
  background:var(--gradient-primary); color:var(--white);
  display:grid; place-items:center; font-weight:800;
}
.chat-thread__main{ min-width:0; }
.chat-thread__name{ margin:0; font-size:.98rem; font-weight:700; color:var(--ink-900); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.chat-thread__line{ margin:3px 0 0; font-size:.83rem; color:var(--ink-600); }
.chat-thread__line b{ color:var(--ink-800); font-weight:600; }
.chat-thread__preview{ margin:6px 0 0; font-size:.82rem; color:var(--ink-500); word-break:break-word; }
.chat-thread__side{ display:flex; flex-direction:column; align-items:flex-end; gap:8px; text-align:right; }
.chat-thread__time{ font-size:.76rem; color:var(--ink-400); white-space:nowrap; }

/* ---------- Public chat box (two-pane) ---------- */
.public-chat-box{ display:flex; flex-direction:column; min-height:0; }
.public-chat-box .inbox_msg{
  display:flex; min-height:0; overflow:hidden;
  background:var(--white); border:1px solid var(--ink-100);
  border-radius:var(--radius-lg); box-shadow:var(--shadow-md);
  height:calc(100vh - 210px); min-height:520px; max-height:760px;
}
.public-chat-box .inbox_people{
  flex:0 0 320px; max-width:320px; display:flex; flex-direction:column; min-height:0;
  background:var(--ink-050); border-right:1px solid var(--ink-100);
}
.public-chat-box .headind_srch{ padding:16px 18px; border-bottom:1px solid var(--ink-100); }
.public-chat-box .recent_heading h4{
  margin:0 0 10px; font-size:.72rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.08em; color:var(--ink-500);
}
.public-chat-box .stylish-input-group{
  display:flex; align-items:center; gap:6px;
  background:var(--white); border:1px solid var(--ink-200);
  border-radius:var(--radius-full); padding:6px 12px;
}
.public-chat-box .srch_bar input{ flex:1; min-width:0; border:0; outline:none; background:transparent; font-family:inherit; font-size:.85rem; color:var(--ink-800); }
.public-chat-box .srch_bar .input-group-addon button{ border:0; background:transparent; color:var(--ink-400); cursor:pointer; padding:0; font-size:.9rem; }
.public-chat-box .inbox_chat{ flex:1; min-height:0; overflow-y:auto; padding:8px; }
.public-chat-box .chat_list{
  padding:12px 14px; margin-bottom:4px; border-radius:var(--radius-md);
  cursor:pointer; transition:background var(--transition);
}
.public-chat-box .chat_list:hover{ background:var(--white); }
.public-chat-box .active_chat{ background:var(--white); box-shadow:var(--shadow-xs); }
.public-chat-box .chat_people{ display:flex; align-items:flex-start; gap:11px; }
.public-chat-box .chat_img{
  flex:0 0 40px; width:40px; height:40px; border-radius:50%;
  background:var(--gradient-primary); color:var(--white);
  display:grid; place-items:center; font-weight:800; font-size:.9rem;
}
.public-chat-box .chat_ib{ flex:1; min-width:0; }
.public-chat-box .chat_ib h5{
  display:flex; align-items:baseline; justify-content:space-between; gap:8px;
  margin:0 0 4px; font-size:.88rem; font-weight:700; color:var(--ink-900);
}
.public-chat-box .chat_ib h5 .chat_date{ flex:none; font-size:.7rem; font-weight:500; color:var(--ink-400); }
.public-chat-box .chat_ib p{ margin:0; font-size:.8rem; line-height:1.4; color:var(--ink-500); word-break:break-word; }
.public-chat-box .chat-role{
  display:inline-block; padding:1px 7px; border-radius:var(--radius-full);
  background:var(--brand-accent-050); color:var(--brand-accent-600);
  font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
}
.public-chat-box .mesgs{ flex:1; min-width:0; display:flex; flex-direction:column; min-height:0; }
.public-chat-box .msg_history{ flex:1; min-height:0; overflow-y:auto; padding:20px; background:var(--ink-050); }
.public-chat-box .chat_empty{
  height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  color:var(--ink-500); font-size:.9rem; text-align:center;
}
.public-chat-box .chat_empty::before{ content:"\1F4AC"; font-size:2rem; opacity:.5; }
.public-chat-box .incoming_msg{ display:flex; align-items:flex-start; gap:10px; margin:0 0 14px; }
.public-chat-box .incoming_msg_img{
  flex:0 0 38px; width:38px; height:38px; border-radius:50%;
  background:var(--ink-800); color:var(--white);
  display:grid; place-items:center; font-weight:800; font-size:.85rem;
}
.public-chat-box .received_msg{ flex:1; min-width:0; }
.public-chat-box .received_withd_msg{ max-width:74%; }
.public-chat-box .received_withd_msg p{
  margin:0; padding:10px 14px; border-radius:16px 16px 16px 5px;
  background:var(--white); border:1px solid var(--ink-100); box-shadow:var(--shadow-xs);
  font-size:.9rem; line-height:1.5; color:var(--ink-800); word-break:break-word;
}
.public-chat-box .received_withd_msg p strong{ color:var(--brand-primary); font-size:.82rem; }
.public-chat-box .outgoing_msg{ display:flex; justify-content:flex-end; margin:0 0 14px; }
.public-chat-box .sent_msg{ max-width:74%; }
.public-chat-box .sent_msg p{
  margin:0; padding:10px 14px; border-radius:16px 16px 5px 16px;
  background:var(--gradient-primary); color:var(--white);
  box-shadow:0 6px 16px -8px rgba(11,61,145,.55);
  font-size:.9rem; line-height:1.5; word-break:break-word;
}
.public-chat-box .time_date{ display:block; margin-top:5px; font-size:.68rem; color:var(--ink-400); }
.public-chat-box .outgoing_msg .time_date{ text-align:right; }
.public-chat-box .chat-error{ margin:0; border-radius:0; border-width:1px 0 0; }
.public-chat-box .type_msg{ padding:14px 18px; background:var(--white); border-top:1px solid var(--ink-100); }
.public-chat-box .input_msg_write{ display:flex; align-items:center; gap:10px; }
.public-chat-box .input_msg_write input{
  flex:1; min-width:0; padding:12px 16px;
  background:var(--ink-050); border:1px solid var(--ink-200); border-radius:var(--radius-full);
  font-family:inherit; font-size:.92rem; color:var(--ink-800); outline:none;
  transition:border var(--transition), box-shadow var(--transition);
}
.public-chat-box .input_msg_write input:focus{ background:var(--white); border-color:var(--brand-accent); box-shadow:0 0 0 4px var(--brand-accent-050); }
.public-chat-box .msg_send_btn{
  flex:none; width:44px; height:44px; border:0; border-radius:50%;
  background:var(--gradient-primary); color:var(--white);
  cursor:pointer; font-size:1rem; display:grid; place-items:center;
  box-shadow:var(--shadow-brand); transition:transform var(--transition), filter var(--transition);
}
.public-chat-box .msg_send_btn:hover:not(:disabled){ transform:translateY(-1px); filter:brightness(1.06); }
.public-chat-box .msg_send_btn:disabled{ opacity:.6; cursor:not-allowed; }

@media (max-width:900px){
  .chat-sticky-area{ position:static; }
  .course-chat-shell{ height:auto; min-height:0; max-height:none; }
  /* width:100% is required — the wrap is a row flex container, so `flex:none`
     alone would size this to its widest message instead of to the shell */
  .chat-messages{ height:56vh; min-height:300px; flex:none; width:100%; }
  .course-chat-head{ align-items:flex-start; }
  .chat-bubble{ max-width:88%; }
  .chat-composer-foot{ flex-direction:column; align-items:stretch; }
  .chat-tools{ justify-content:space-between; }
  .chat-thread{ grid-template-columns:44px minmax(0,1fr); }
  .chat-thread__side{ grid-column:2; align-items:flex-start; text-align:left; }
  .public-chat-box .inbox_msg{ flex-direction:column; height:auto; max-height:none; }
  .public-chat-box .inbox_people{ flex:none; max-width:none; width:100%; border-right:0; border-bottom:1px solid var(--ink-100); }
  .public-chat-box .inbox_chat{ max-height:220px; }
  .public-chat-box .msg_history{ height:52vh; min-height:280px; }
  .public-chat-box .received_withd_msg, .public-chat-box .sent_msg{ max-width:88%; }
}


/* ==========================================================================
   RESPONSIVE HARDENING
   Base rules first (overflow, wrapping, legacy grid), then the device tiers.
   ========================================================================== */

/* --- Nothing may force the page to scroll sideways.
       `clip` rather than `hidden`: hidden would turn <body> into a scroll
       container and break position:sticky on the header and course sidebar. --- */
body { overflow-x: clip; }
img, video, canvas, svg, iframe, embed, object { max-width: 100%; }
/* long unbroken strings — URLs, invoice numbers, emails — wrap instead of overflowing */
p, li, td, th, dd, dt, figcaption, blockquote,
h1, h2, h3, h4, h5, h6,
.chat-text, .chat-thread__preview, .cms-content, .testimonial__quote { overflow-wrap: anywhere; }
input, select, textarea, button { max-width: 100%; }
/* iOS zooms the page in when a focused control is under 16px — keep them at 16px on touch */
@media (max-width: 720px) {
  input, select, textarea { font-size: 16px; }
}

/* --- Wide content scrolls inside its own box, never the page --- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > .table { min-width: 580px; }
.cms-content table { display: block; overflow-x: auto; }

/* Grid and flex children default to min-width:auto, which refuses to shrink below
   their content and pushes the whole page wider than the viewport. */
.grid > *, .layout-with-sidebar > *, .hero__grid > *,
.footer-grid > *, .stats__grid > *, .dash > *, .auth > * { min-width: 0; }

/* --- Legacy Bootstrap-style grid shim.
       Bootstrap CSS is not loaded, so `.row > .col-*` markup on the older cart,
       checkout and account views collapses to full-width blocks at every size.
       Scoped with :has() so unrelated `.row` elements (the hero card, chat rows)
       are untouched. --- */
.row:has(> [class*="col-"]) { display: flex; flex-wrap: wrap; margin-left: -12px; margin-right: -12px; }
.row:has(> [class*="col-"]) > [class*="col-"] { width: 100%; padding-left: 12px; padding-right: 12px; min-width: 0; }
@media (min-width: 576px) {
  .row > .col-sm-6 { width: 50%; }
  .row > .col-sm-4 { width: 33.3333%; }
  .row > .col-sm-3 { width: 25%; }
}
@media (min-width: 768px) {
  .row > .col-md-9 { width: 75%; }
  .row > .col-md-8 { width: 66.6666%; }
  .row > .col-md-6 { width: 50%; }
  .row > .col-md-4 { width: 33.3333%; }
  .row > .col-md-3 { width: 25%; }
}
@media (min-width: 992px) {
  .row > .col-lg-9 { width: 75%; }
  .row > .col-lg-8 { width: 66.6666%; }
  .row > .col-lg-6 { width: 50%; }
  .row > .col-lg-4 { width: 33.3333%; }
  .row > .col-lg-3 { width: 25%; }
}
.container-fluid { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-6); }
.myAccount, .middleCon { padding: var(--sp-8) 0; }
.acc_box { background: var(--white); border: 1px solid var(--ink-100); border-radius: var(--radius-lg); padding: var(--sp-6); }
.clearfix::after { content: ""; display: table; clear: both; }

/* --- Legacy form controls / buttons: unstyled without Bootstrap, and their
       default sizing is below the 44px touch target on phones. --- */
.form-control {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--ink-200); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; color: var(--ink-800);
  background: var(--white); outline: none;
  transition: border var(--transition), box-shadow var(--transition);
}
.form-control:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 4px var(--brand-accent-050); }
.form-group { margin-bottom: var(--sp-4); }
.btn1, .btn2, .btn-warning, .btn-success, .btn-default, .btn-primary:not(.btn--primary) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 22px;
  border-radius: var(--radius-full); border: 1px solid transparent;
  font-family: inherit; font-weight: 600; font-size: .9rem;
  text-decoration: none; cursor: pointer;
}
.btn-warning, .btn-success, .btn-primary:not(.btn--primary) { background: var(--gradient-primary); color: var(--white); }
.btn-warning:hover, .btn-success:hover { color: var(--white); filter: brightness(1.06); }
.btn-default { background: var(--white); border-color: var(--ink-200); color: var(--ink-700); }
.btn-block { width: 100%; }

/* --- Dashboard menu button: was toggled once by JS on page load, so rotating a
       phone or resizing left it in the wrong state. Driven by the viewport now. --- */
@media (min-width: 961px) { #dashToggle { display: none !important; } }
@media (max-width: 960px)  { #dashToggle { display: inline-flex !important; } }

/* Account link is only needed inside the mobile menu — the bar shows a button above 720px */
.nav__link--mobile { display: none; }
@media (max-width: 720px) {
  .site-header.is-open .nav__link--mobile {
    display: block;
    margin-top: 4px; padding-top: 12px;
    border-top: 1px solid var(--ink-100);
    color: var(--brand-primary); font-weight: 700;
  }
}

/* ==========================================================================
   TIER: small laptop / large tablet
   ========================================================================== */
@media (max-width: 900px) {
  .section { padding: var(--sp-12) 0; }
  .section--tight { padding: var(--sp-8) 0; }
  .page-header { padding: var(--sp-12) 0; }
  /* min-width guard: this block sits after the 720px tier, so without it the
     two-column rule would win back over the single-column phone layout */
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .dash__main { padding: 20px 18px 48px; }
  .dash__topbar { gap: 10px; }
  .dash__search { max-width: none; }
  /* contact / about split columns */
  .container.grid[style*="1fr 1fr"] { grid-template-columns: 1fr !important; gap: var(--sp-8) !important; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   TIER: phone
   ========================================================================== */
@media (max-width: 600px) {
  .container, .container-fluid { padding: 0 var(--sp-4); }
  .section { padding: var(--sp-10) 0; }
  .section-head { margin-bottom: var(--sp-8); }
  .section-head p { font-size: 1rem; }
  .page-header { padding: var(--sp-10) 0; }

  /* hero */
  .hero { padding: var(--sp-12) 0 var(--sp-16); }
  .hero__lead { font-size: 1rem; }
  .hero__cta { gap: var(--sp-2); }
  .hero__cta .btn { flex: 1 1 160px; justify-content: center; }
  .hero__meta { gap: var(--sp-4); }
  .hero__meta strong { font-size: 1.15rem; }
  .hero__visual { max-width: none; aspect-ratio: 4/5; }
  .hero__card--1 { left: 0; width: 200px; }
  .hero__card--2 { right: 0; width: 210px; }
  .hero__card--3 { right: 4%; width: 175px; }

  /* content blocks — restated here because this tier follows the 900px one */
  .grid-2, .grid-3, .grid-4, .grid-auto { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .stat { padding: var(--sp-3); }
  .stat__num { font-size: 1.8rem; }
  .partners { grid-template-columns: repeat(2, 1fr); }
  .card, .panel { border-radius: var(--radius-md); }
  .panel { padding: 16px; }
  .testimonial { padding: var(--sp-5); }
  .timeline { padding-left: var(--sp-6); }
  .accordion__head { padding: 14px 16px; font-size: .95rem; }
  .accordion__body { padding: 0 16px 16px; }

  /* forms & buttons — full width, comfortable tap targets */
  .btn { min-height: 44px; }
  .btn--lg { padding: 13px 22px; font-size: 1rem; }
  .field-row { grid-template-columns: 1fr; }
  .searchbar .btn { width: 100%; }

  /* breadcrumbs & footer */
  .breadcrumbs { padding: var(--sp-4) 0; }
  .breadcrumbs ol { font-size: .82rem; }
  .footer-grid { gap: var(--sp-6); }
  .site-footer { padding: var(--sp-12) 0 var(--sp-6); margin-top: var(--sp-12); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: var(--sp-2); text-align: left; }

  /* dashboards */
  .dash__main { padding: 16px 14px 44px; }
  .dash__topbar { flex-wrap: wrap; }
  .dash__user { margin-left: auto; }
  .pagehead h1 { font-size: 1.35rem; }
  .kpi { padding: 16px; }

  /* modal + dock + back-to-top */
  .modal { padding: var(--sp-5); border-radius: var(--radius-md); }
  .modal__head h3 { font-size: 1.1rem; }
  .to-top { right: var(--sp-4); bottom: var(--sp-4); width: 42px; height: 42px; }
  /* the dock is fixed, so reserve room for it — otherwise it permanently covers
     whatever sits at the bottom of the page */
  body { padding-bottom: 68px; }
  .utility-dock .nav-currency-select { min-width: 0; width: 58px; }
  .utility-dock .nav-tool--language .goog-te-gadget .goog-te-combo { min-width: 0; width: 92px; }

  /* chat */
  .course-chat-head { padding: 12px 14px; gap: 10px; }
  .chat-avatar { flex: 0 0 40px; width: 40px; height: 40px; font-size: .95rem; }
  .chat-messages { padding: 14px; }
  .chat-composer { padding: 12px 14px; }
  .chat-privacy { padding: 8px 14px; font-size: .74rem; }
  .chat-tools .chat-send { flex: 1; justify-content: center; }
  .public-chat-box .msg_history { padding: 14px; }
  .public-chat-box .type_msg { padding: 12px 14px; }
}

/* ==========================================================================
   TIER: small phone
   ========================================================================== */
@media (max-width: 400px) {
  .container, .container-fluid { padding: 0 var(--sp-3); }
  /* let the wordmark truncate rather than collide with the CTA on narrow phones */
  .site-header .brand { flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .brand__name { font-size: .92rem; min-width: 0; overflow: hidden; }
  .brand__name small { overflow: hidden; text-overflow: ellipsis; }
  .brand__logo { width: 38px; height: 38px; }
  .nav { gap: var(--sp-2); }
  .nav__cta { gap: 6px; }
  .nav__cta .btn--sm { padding: 8px 12px; font-size: .82rem; }
  .stats__grid { grid-template-columns: 1fr; }
  .partners { grid-template-columns: 1fr; }
  .hero__card--1, .hero__card--2, .hero__card--3 { width: 170px; }
  .hero__meta { flex-direction: column; gap: var(--sp-3); }
  .chat-bubble { max-width: 94%; }
  .utility-dock { padding: 5px 10px; }
  .utility-dock .nav-tool img { width: 14px; height: 14px; }
}

/* ==========================================================================
   Short viewports (phone landscape): the chat and dash sidebar assume height
   ========================================================================== */
@media (max-height: 560px) and (orientation: landscape) {
  .course-chat-shell { height: auto; max-height: none; }
  .chat-messages { height: 62vh; min-height: 200px; flex: none; width: 100%; }
  .public-chat-box .inbox_msg { height: auto; max-height: none; }
  .public-chat-box .msg_history { height: 60vh; min-height: 180px; }
  .dash__side { height: 100vh; overflow-y: auto; }
}

/* Respect reduced-motion preferences across the animated components */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   COMMERCE — cart · checkout · payment · order confirmation · product detail
   These flows still ran on the pre-newdesign class names (.sopping_con,
   .cont_4, .checkoutRightBox, .invoiceBox …), none of which exist here, so
   they rendered as bare stacked text. Everything below is the design-system
   replacement; it sits last so it wins over the generic responsive tiers.
   ========================================================================== */

/* --- Flash + validation messages ------------------------------------------
       error_message() / validation_message() emit bare .success/.warning/
       .error/.validation wrappers, and form_validation uses .required. --- */
.success, .warning, .error, .validation {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: var(--sp-5);
}
.success { background: #e7f7ef; border-color: #b6e6cf; color: #0a6b43; }
.warning { background: #fff4e5; border-color: #ffd9a3; color: #96591a; }
.error,
.validation { background: #fde8e8; border-color: #f6c2c2; color: #a8322a; }
.validation strong { display: block; margin-bottom: 4px; }
.validation .red { color: inherit; }
.validation_msg p { margin: 0 0 4px; color: inherit; font-size: .88rem; }
.required { display: block; margin-top: 6px; color: var(--danger); font-size: .82rem; font-weight: 600; }

/* --- Shared two-column commerce shell -------------------------------------- */
.commerce { padding: var(--sp-10) 0 var(--sp-16); }
.commerce__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: var(--sp-8);
  align-items: start;
}
.commerce__main { min-width: 0; }
.commerce__aside { min-width: 0; position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.commerce-card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: var(--sp-6);
  margin-bottom: var(--sp-5);
}
.commerce-card__head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-2);
  margin-bottom: var(--sp-4); padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--ink-100);
}
.commerce-card__head h2,
.commerce-card__head h3 { margin: 0; font-size: 1.12rem; }
.commerce-card__head p { margin: 0; font-size: .86rem; color: var(--ink-500); }
/* A required step the buyer has not completed yet — e.g. the delivery method
   on a cart that holds a shop product. */
.commerce-card.is-invalid { border: 1.5px solid var(--danger); box-shadow: 0 0 0 4px rgba(239,68,68,.10); }
.commerce-card.is-invalid .form-control { border-color: var(--danger); }

/* --- Checkout progress rail ------------------------------------------------ */
.checkout-steps {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--sp-2); margin-bottom: var(--sp-6);
  font-size: .85rem; font-weight: 600; color: var(--ink-400);
}
.checkout-steps li { display: flex; align-items: center; gap: 8px; }
.checkout-steps li + li::before { content: ""; width: 26px; height: 2px; background: var(--ink-200); border-radius: 2px; }
.checkout-steps .step__no {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink-100); color: var(--ink-500);
  font-size: .78rem; font-weight: 700;
}
.checkout-steps .is-current { color: var(--brand-primary); }
.checkout-steps .is-current .step__no { background: var(--gradient-primary); color: var(--white); }
.checkout-steps .is-done { color: var(--ink-600); }
.checkout-steps .is-done .step__no { background: #e7f7ef; color: #0a8a54; }

/* --- Cart line items ------------------------------------------------------- */
.cart-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: var(--sp-5);
  align-items: start;
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--ink-100);
}
.cart-item:first-of-type { padding-top: 0; }
.cart-item:last-of-type { border-bottom: none; padding-bottom: 0; }
.cart-item__thumb {
  width: 92px; height: 92px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-100);
  background: var(--ink-050);
  object-fit: cover;
}
.cart-item__title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink-900); margin-bottom: 4px; }
a.cart-item__title:hover { color: var(--brand-accent-600); }
.cart-item__attrs { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 var(--sp-3); }
.cart-item__attrs span {
  background: var(--ink-050); border: 1px solid var(--ink-100);
  border-radius: var(--radius-full); padding: 3px 10px;
  font-size: .76rem; color: var(--ink-600);
}
.cart-item__attrs b { color: var(--ink-800); font-weight: 600; }
.cart-item__actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); }
.cart-item__money { text-align: right; white-space: nowrap; }
.cart-item__price { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--brand-primary); }
.cart-item__unit { display: block; margin-top: 2px; font-size: .78rem; color: var(--ink-500); }
.link-danger { background: none; padding: 0; font-size: .82rem; font-weight: 600; color: var(--danger); }
.link-danger:hover { color: #a8322a; text-decoration: underline; }
.link-quiet { background: none; padding: 0; font-size: .82rem; font-weight: 600; color: var(--brand-accent-600); }
.link-quiet:hover { text-decoration: underline; }

/* --- Quantity stepper ------------------------------------------------------ */
.qty-stepper {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--radius-full);
  overflow: hidden; background: var(--white);
}
.qty-stepper button {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-size: 1.1rem; line-height: 1; font-weight: 600;
  color: var(--ink-600); background: var(--white);
  transition: background var(--transition), color var(--transition);
}
.qty-stepper button:hover { background: var(--brand-accent-050); color: var(--brand-primary); }
.qty-stepper input {
  width: 42px; height: 34px;
  border: 0; border-left: 1px solid var(--ink-200); border-right: 1px solid var(--ink-200);
  text-align: center; font: inherit; font-weight: 700; font-size: .9rem;
  color: var(--ink-900); background: var(--white); padding: 0;
}
.qty-stepper input:focus { outline: none; }

/* --- Order summary --------------------------------------------------------- */
.summary__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4);
  padding: 7px 0; font-size: .92rem; color: var(--ink-600);
}
.summary__row b { color: var(--ink-900); font-weight: 600; white-space: nowrap; }
.summary__row--free b { color: #0a8a54; }
.summary__total {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4);
  margin-top: var(--sp-3); padding-top: var(--sp-4);
  border-top: 1px dashed var(--ink-200);
  font-family: var(--font-display); font-weight: 700; color: var(--ink-900);
}
.summary__total b { font-size: 1.35rem; color: var(--brand-primary); }
.summary__note { margin: var(--sp-4) 0 0; font-size: .78rem; color: var(--ink-500); line-height: 1.5; }
.summary__actions { display: grid; gap: var(--sp-2); margin-top: var(--sp-5); }
.summary__actions .btn { width: 100%; }
.summary-item {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: var(--sp-3); align-items: center;
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--ink-100);
}
.summary-item:last-of-type { border-bottom: none; }
.summary-item img { width: 54px; height: 54px; border-radius: var(--radius-sm); border: 1px solid var(--ink-100); object-fit: cover; background: var(--ink-050); }
.summary-item__name { font-weight: 600; font-size: .88rem; color: var(--ink-800); line-height: 1.35; }
.summary-item__meta { font-size: .76rem; color: var(--ink-500); }
.summary-item__price { font-weight: 700; font-size: .9rem; color: var(--ink-900); white-space: nowrap; }

/* --- Payment method picker -------------------------------------------------- */
.pay-methods { display: grid; gap: var(--sp-3); }
.pay-method {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  border: 1.5px solid var(--ink-200); border-radius: var(--radius-md);
  padding: 16px 18px; cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.pay-method:hover { border-color: var(--brand-accent); }
.pay-method:has(input:checked) { border-color: var(--brand-accent); background: var(--brand-accent-050); box-shadow: 0 0 0 3px rgba(79,154,214,.12); }
.pay-method input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--brand-primary); flex: none; }
.pay-method__body { min-width: 0; }
.pay-method__title { display: block; font-weight: 700; color: var(--ink-900); font-size: .96rem; }
.pay-method__desc { display: block; margin-top: 3px; font-size: .82rem; color: var(--ink-500); }
.pay-secure {
  display: flex; align-items: center; gap: 10px;
  margin-top: var(--sp-5); padding: 12px 16px;
  background: var(--ink-050); border: 1px solid var(--ink-100);
  border-radius: var(--radius-md); font-size: .82rem; color: var(--ink-600);
}
.pay-amount {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2);
  padding: 18px 22px; margin-bottom: var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--gradient-primary); color: #dbe7f2;
}
.pay-amount span { font-size: .86rem; letter-spacing: .04em; text-transform: uppercase; }
.pay-amount b { font-family: var(--font-display); font-size: 1.7rem; color: #fff; }

/* --- Order confirmation ------------------------------------------------------ */
.order-success { text-align: center; padding: var(--sp-10) var(--sp-6) var(--sp-8); }
.order-success__icon {
  width: 78px; height: 78px; margin: 0 auto var(--sp-5);
  border-radius: 50%; display: grid; place-items: center;
  background: #e7f7ef; color: #0a8a54;
  font-size: 2.1rem; line-height: 1;
  box-shadow: 0 0 0 10px rgba(10,138,84,.07);
}
.order-success h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: var(--sp-2); }
.order-success p { margin: 0 auto; max-width: 520px; color: var(--ink-500); }
.order-success__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-3); margin-top: var(--sp-6); text-align: left;
}
.order-fact { background: var(--ink-050); border: 1px solid var(--ink-100); border-radius: var(--radius-md); padding: 14px 16px; }
.order-fact span { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 4px; }
.order-fact b { font-family: var(--font-display); font-size: 1rem; color: var(--ink-900); word-break: break-word; }
.download-list { display: grid; gap: var(--sp-2); }
.download-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--brand-accent-050); border: 1px solid var(--brand-primary-100);
  font-weight: 600; font-size: .9rem; color: var(--brand-primary);
}
.download-list a:hover { background: var(--brand-primary-050); }
.order-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-6); }

/* --- Receipt / invoice ------------------------------------------------------- */
.receipt {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--ink-700);
  font-size: .9rem;
}
.receipt__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-6);
  padding: var(--sp-6);
  background: var(--ink-050); border-bottom: 1px solid var(--ink-200);
}
.receipt__brand strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-900); margin-bottom: 4px; }
.receipt__brand p { margin: 0; font-size: .82rem; line-height: 1.6; color: var(--ink-600); }
.receipt__stamp { text-align: right; flex: none; }
.receipt__stamp img { width: 84px; margin-left: auto; margin-bottom: 8px; }
.receipt__label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); }
.receipt__no { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--ink-900); }
.receipt__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-5); padding: var(--sp-6);
  border-bottom: 1px solid var(--ink-100);
}
.receipt__block h4 {
  margin: 0 0 8px; font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-500); font-family: var(--font-sans); font-weight: 700;
}
.receipt__block p { margin: 0; line-height: 1.65; font-size: .86rem; color: var(--ink-700); }
.receipt__block strong { color: var(--ink-900); }
.receipt__items { width: 100%; border-collapse: collapse; }
.receipt__items th {
  padding: 12px var(--sp-6); text-align: left;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-500); background: var(--ink-050);
  border-bottom: 1px solid var(--ink-200);
}
.receipt__items td { padding: 14px var(--sp-6); border-bottom: 1px solid var(--ink-100); vertical-align: top; }
.receipt__items .num { text-align: right; white-space: nowrap; }
.receipt__items .idx { width: 42px; color: var(--ink-400); font-variant-numeric: tabular-nums; }
.receipt__items .name { color: var(--ink-900); font-weight: 600; }
.receipt__items .sub { display: block; margin-top: 3px; font-size: .78rem; font-weight: 400; color: var(--ink-500); }
.receipt__totals { padding: var(--sp-5) var(--sp-6); background: var(--ink-050); border-bottom: 1px solid var(--ink-100); }
.receipt__totals dl { display: grid; grid-template-columns: 1fr auto; gap: 8px var(--sp-6); margin: 0 0 0 auto; max-width: 340px; }
.receipt__totals dt { color: var(--ink-600); font-size: .88rem; }
.receipt__totals dd { margin: 0; text-align: right; color: var(--ink-900); font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; }
.receipt__totals .grand { border-top: 1px solid var(--ink-300); padding-top: 10px; margin-top: 4px; }
.receipt__totals .grand dt { font-weight: 700; color: var(--ink-900); font-size: 1rem; }
.receipt__totals .grand dd { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--brand-primary); }
.receipt__foot { padding: var(--sp-5) var(--sp-6); font-size: .78rem; color: var(--ink-500); line-height: 1.6; }
.receipt__foot strong { color: var(--ink-700); }
.receipt .badge { vertical-align: middle; }

/* --- Print: the receipt is the page ------------------------------------------- */
@media print {
  @page { margin: 12mm; }
  body { padding-bottom: 0 !important; background: #fff; }
  .site-header, .site-footer, .breadcrumbs, .page-header, .utility-dock,
  .to-top, .page-loader, .order-actions, .no-print, .download-list,
  .commerce__aside, .checkout-steps { display: none !important; }
  .commerce { padding: 0 !important; }
  .container, .container-fluid { max-width: none; padding: 0; }
  .order-success { padding: 0; text-align: left; }
  .order-success__icon, .order-success__facts { display: none; }
  .order-success h1 { font-size: 1.15rem; margin-bottom: 4px; }
  .order-success p { margin: 0; max-width: none; }
  .commerce-card { border: none; border-radius: 0; box-shadow: none; padding: 0; margin-bottom: 14px; }
  .receipt { border: none; border-radius: 0; box-shadow: none; font-size: 11pt; }
  .receipt__head, .receipt__totals { background: #fff !important; }
  .receipt__head { border-bottom: 2px solid #333; }
  .receipt__items th { background: #fff !important; border-bottom: 1px solid #333; }
  .receipt, .receipt__items tr, .receipt__grid { page-break-inside: avoid; }
  a[href]::after { content: ""; }
}

/* ==========================================================================
   PRODUCT DETAIL (course + shop)
   The legacy .productDetail/.left/.right/.detailsGallery names are kept so
   both the courses and shops detail views are fixed by one rule set.
   ========================================================================== */
.productDetail {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: var(--sp-8);
  align-items: start;
}
.productDetail > .left { order: 2; min-width: 0; }
.productDetail > .right { order: 1; min-width: 0; position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.productDetail > .clearfix { display: none; }

/* gallery */
.detailsGallery { background: var(--white); border: 1px solid var(--ink-100); border-radius: var(--radius-lg); padding: var(--sp-4); box-shadow: var(--shadow-xs); }
.thumbnailCon .mySlides { display: none; }
.thumbnailCon .mySlides:first-child { display: block; }
.thumbnailCon .mySlides img {
  width: 100%; aspect-ratio: 4/3; object-fit: contain;
  background: var(--ink-050); border-radius: var(--radius-md);
}
.thumbnailCon .caption-container { min-height: 0; margin: 0; }
.thumbnailCon .caption-container p { margin: 10px 0 0; text-align: center; font-size: .82rem; color: var(--ink-500); }
.thumbnailCon .caption-container p:empty { display: none; }
.thumbnailCon .rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; margin-top: var(--sp-4); }
.thumbnailCon .column { min-width: 0; }
.thumbnailCon .column img.demo {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border: 1.5px solid var(--ink-200); border-radius: var(--radius-sm);
  cursor: pointer; opacity: .68;
  transition: opacity var(--transition), border-color var(--transition);
}
.thumbnailCon .column img.demo:hover { opacity: 1; }
.thumbnailCon .column img.demo.active { opacity: 1; border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(79,154,214,.18); }

/* buy box */
.pdp-box { background: var(--white); border: 1px solid var(--ink-100); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--sp-6); }
.pdp-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.pdp-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: var(--sp-2); }
.pdp-sub { color: var(--ink-500); margin-bottom: var(--sp-4); }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.pdp-price__now { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--brand-primary); line-height: 1; }
.pdp-price__was { font-size: 1.05rem; color: var(--ink-400); text-decoration: line-through; }
.pdp-price__off { background: #e7f7ef; color: #0a6b43; border-radius: var(--radius-full); padding: 4px 12px; font-size: .78rem; font-weight: 700; }
.pdp-tax { margin: 0 0 var(--sp-5); font-size: .8rem; color: var(--ink-500); }
.pdp-buy { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.pdp-buy .btn { flex: 1 1 200px; }
.pdp-options { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.pdp-options > div > span { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row label { position: relative; }
.chip-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-row span {
  display: inline-block; padding: 8px 15px;
  border: 1.5px solid var(--ink-200); border-radius: var(--radius-full);
  font-size: .85rem; font-weight: 600; color: var(--ink-700); cursor: pointer;
  transition: all var(--transition);
}
.chip-row label:hover span { border-color: var(--brand-accent); }
.chip-row input:checked + span { border-color: var(--brand-accent); background: var(--brand-accent-050); color: var(--brand-primary); }
.pdp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-3); padding-top: var(--sp-5); border-top: 1px solid var(--ink-100); }
.pdp-fact span { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 2px; }
.pdp-fact b { font-size: .9rem; color: var(--ink-900); }
.pdp-assurance { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.pdp-assurance li { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--ink-600); }
.pdp-assurance li i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-accent-050); color: var(--brand-primary); display: grid; place-items: center; font-style: normal; font-size: .72rem; font-weight: 700; }
.stock-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: var(--radius-full); }
.stock-pill--in { background: #e7f7ef; color: #0a6b43; }
.stock-pill--low { background: #fff4e5; color: #96591a; }
.stock-pill--out { background: #fde8e8; color: #a8322a; }

/* content panels below the fold */
.pdp-sections { margin-top: var(--sp-10); display: grid; gap: var(--sp-5); }
.pdp-section { background: var(--white); border: 1px solid var(--ink-100); border-radius: var(--radius-lg); padding: var(--sp-6); }
.pdp-section > h2 { font-size: 1.2rem; margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--ink-100); }
.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec-table th { width: 38%; text-align: left; padding: 11px 0; color: var(--ink-500); font-weight: 600; border-bottom: 1px solid var(--ink-100); text-transform: none; letter-spacing: 0; font-size: .9rem; }
.spec-table td { padding: 11px 0; color: var(--ink-800); border-bottom: 1px solid var(--ink-100); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.review-item { padding: var(--sp-4) 0; border-bottom: 1px solid var(--ink-100); }
.review-item:last-child { border-bottom: none; padding-bottom: 0; }
.review-item__head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: 6px; }
.review-item__who { font-weight: 700; color: var(--ink-900); }
.review-item__when { font-size: .78rem; color: var(--ink-400); }
.review-item p { margin: 0; color: var(--ink-600); font-size: .9rem; }
.stars { color: #e2a838; letter-spacing: 1px; font-size: .9rem; }
.stars i { font-style: normal; }
.stars .off { color: var(--ink-300); }

/* ==========================================================================
   COMMERCE + PDP — responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .commerce__grid { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-6); }
  .productDetail { grid-template-columns: 1fr; gap: var(--sp-6); }
  .productDetail > .left { order: 2; }
  .productDetail > .right { order: 1; position: static; }
}
@media (max-width: 820px) {
  .commerce__grid { grid-template-columns: 1fr; }
  .commerce__aside { position: static; }
}
@media (max-width: 600px) {
  .commerce { padding: var(--sp-6) 0 var(--sp-12); }
  .commerce-card { padding: var(--sp-4); border-radius: var(--radius-md); }
  .cart-item { grid-template-columns: 68px minmax(0, 1fr); gap: var(--sp-3); }
  .cart-item__thumb { width: 68px; height: 68px; }
  .cart-item__money { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .cart-item__unit { margin-top: 0; }
  .checkout-steps { font-size: .78rem; gap: 6px; }
  .checkout-steps li + li::before { width: 14px; }
  .pay-amount { padding: 14px 16px; }
  .pay-amount b { font-size: 1.4rem; }
  .receipt__head { flex-direction: column; gap: var(--sp-4); padding: var(--sp-4); }
  .receipt__stamp { text-align: left; }
  .receipt__stamp img { margin-left: 0; }
  .receipt__grid, .receipt__totals, .receipt__foot { padding: var(--sp-4); }
  .receipt__items th, .receipt__items td { padding: 11px var(--sp-4); }
  .receipt__totals dl { max-width: none; }
  .pdp-box { padding: var(--sp-5); }
  .pdp-price__now { font-size: 1.6rem; }
  .pdp-buy .btn { flex: 1 1 100%; }
  .pdp-section { padding: var(--sp-5); }
  .order-success { padding: var(--sp-6) var(--sp-2); }
}

