/* =========================================================================
   Codinger Design System v2.0  —  see DESIGN.md
   One system, three ages:  data-mode="play" | "teen" | "pro"  on <html>
   Loaded LAST on every layout so it re-skins legacy Bootstrap pages too.
   ========================================================================= */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  --navy: #17255A; --purple: #8E3FC0; --purple-l: #B863D9; --purple-d: #5E2482;
  --cyan: #13C1DE; --teal: #52D3D6; --green: #6FCB4A; --green-d: #46963A;
  --yellow: #FFD95A; --yellow-d: #D1A92B; --pink: #FF8FB1; --error: #E5484D;
  --bg: #FBF9FF; --surface: #FFFFFF; --line: #E6E1F2; --tint: #F1E8FB;
  --ink: #17255A; --muted: #5B6490;
  --font-head: "Baloo 2", "Baloo Bhaijaan 2", system-ui, sans-serif;
  --font-body: "Nunito", "Cairo", system-ui, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 10px 30px rgba(23, 37, 90, .08);
  --shadow-lg: 0 24px 60px rgba(23, 37, 90, .14);
  --radius: 28px; --radius-s: 16px; --press: 5px; --bw: 3px;          /* play */
  --container: 1200px;
  color-scheme: light;

  /* Legacy variables (style.css, dashboard-student.css, auth-modern.css) → DS palette */
  --primary-navy: var(--navy); --primary-dark: #0E1640; --accent-purple: var(--purple);
  --accent-teal: var(--teal); --accent-green: var(--green); --footer-bg: var(--navy);
  --auth-navy: var(--navy); --auth-purple: var(--purple); --auth-teal: var(--teal);

  /* Bootstrap 5.3 bridge */
  --bs-primary: #8E3FC0; --bs-primary-rgb: 142, 63, 192;
  --bs-success: #46963A; --bs-success-rgb: 70, 150, 58;
  --bs-info: #13C1DE; --bs-info-rgb: 19, 193, 222;
  --bs-warning: #FFD95A; --bs-warning-rgb: 255, 217, 90;
  --bs-danger: #E5484D; --bs-danger-rgb: 229, 72, 77;
  --bs-body-color: #17255A; --bs-body-bg: #FBF9FF;
  --bs-body-font-family: var(--font-body);
  --bs-link-color: #0E8FA6; --bs-link-color-rgb: 14, 143, 166;
  --bs-link-hover-color: #8E3FC0; --bs-link-hover-color-rgb: 142, 63, 192;
  --bs-border-color: #E6E1F2;
  --bs-border-radius: var(--radius-s); --bs-border-radius-lg: var(--radius);
}
[data-mode="teen"] { --radius: 20px; --radius-s: 12px; --press: 3px; --bw: 2px; }
[data-mode="pro"]  { --radius: 12px; --radius-s: 8px;  --press: 0px; --bw: 1px; }
html[dir="rtl"] { --font-head: "Baloo Bhaijaan 2", "Baloo 2", system-ui, sans-serif; --font-body: "Cairo", "Nunito", system-ui, sans-serif; }

/* ---------- 2. Base ------------------------------------------------------ */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); font-size: 16px; line-height: 1.65;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
[data-mode="play"] body { font-size: 17.5px; }
h1, h2, h3, h4, h5, h6, .ds-head { font-family: var(--font-head); font-weight: 700; color: var(--navy); line-height: 1.2; letter-spacing: -.01em; }
h1, .ds-h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2, .ds-h2 { font-size: clamp(1.6rem, 3.6vw, 1.9rem); }
h3, .ds-h3 { font-size: 1.2rem; }
p { color: inherit; }
.text-muted, .ds-muted { color: var(--muted) !important; }
a { color: #0E8FA6; text-underline-offset: 3px; }
a:hover { color: var(--purple); }
code, kbd, pre, samp { font-family: var(--font-code); font-weight: 500; }
::selection { background: var(--yellow); color: var(--navy); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; }
.ds-skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 2000; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.ds-skip:focus { top: 12px; color: #fff; }

/* ---------- 3. Layout helpers ------------------------------------------- */
.ds-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .ds-container { padding-inline: 24px; } }
.ds-section { padding-block: clamp(56px, 8vw, 96px); position: relative; }
.ds-section--tint { background: var(--tint); }
.ds-section--white { background: var(--surface); }
.ds-section--navy { background: var(--navy); color: #fff; }
.ds-section--navy h1, .ds-section--navy h2, .ds-section--navy h3 { color: #fff; }
.ds-section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.ds-section-head p { color: var(--muted); font-size: 1.08rem; margin: 10px 0 0; }
.ds-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 .85rem var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--purple); margin-bottom: 10px; }
.ds-grid { display: grid; gap: 24px; }
.ds-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.ds-grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.ds-grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.ds-stack > * + * { margin-top: 16px; }
.ds-pattern-dots { background-image: radial-gradient(rgba(142, 63, 192, .14) 1.6px, transparent 1.6px); background-size: 22px 22px; }
.ds-pattern-brackets { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Ctext x='10' y='40' font-family='monospace' font-size='26' font-weight='700' fill='%238E3FC0' fill-opacity='.07'%3E%3C/%3E%3C/text%3E%3Ctext x='60' y='100' font-family='monospace' font-size='22' font-weight='700' fill='%2313C1DE' fill-opacity='.08'%3E%7B %7D%3C/text%3E%3C/svg%3E"); }

/* ---------- 4. Buttons --------------------------------------------------- */
.ds-btn {
  --btn-bg: var(--purple); --btn-fg: #fff; --btn-shadow: var(--purple-d);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font: 700 1rem/1.2 var(--font-head); padding: .78em 1.6em; min-height: 48px;
  border: 0; border-radius: var(--radius-s); cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: 0 var(--press) 0 var(--btn-shadow);
  transition: transform .1s ease, box-shadow .1s ease, filter .15s ease;
}
.ds-btn:hover { color: var(--btn-fg); filter: brightness(1.06); }
.ds-btn:active { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--btn-shadow); }
.ds-btn--success { --btn-bg: var(--green); --btn-fg: var(--navy); --btn-shadow: var(--green-d); }
.ds-btn--reward  { --btn-bg: var(--yellow); --btn-fg: var(--navy); --btn-shadow: var(--yellow-d); }
.ds-btn--outline { --btn-bg: transparent; --btn-fg: var(--navy); --btn-shadow: transparent; box-shadow: inset 0 0 0 2px var(--navy); }
.ds-btn--outline:active { box-shadow: inset 0 0 0 2px var(--navy); transform: translateY(1px); }
.ds-btn--light { --btn-bg: #fff; --btn-fg: var(--navy); --btn-shadow: #D9D2EC; }
.ds-btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy); --btn-shadow: transparent; }
.ds-btn--sm { min-height: 40px; padding: .55em 1.1em; font-size: .92rem; }
.ds-btn--lg { min-height: 56px; padding: .9em 2em; font-size: 1.1rem; }
.ds-btn--block { width: 100%; }
.ds-btn[disabled], .ds-btn.is-loading { opacity: .65; pointer-events: none; }
[data-mode="play"] .ds-btn { border-radius: 99px; }
[data-mode="pro"] .ds-btn { box-shadow: 0 6px 16px rgba(94, 36, 130, .22); }
[data-mode="pro"] .ds-btn--outline, [data-mode="pro"] .ds-btn--ghost { box-shadow: inset 0 0 0 2px var(--navy); }
[data-mode="pro"] .ds-btn--ghost { box-shadow: none; }
@media (hover: hover) { [data-mode="play"] .ds-btn:hover { animation: ds-wiggle .4s ease; } }

/* Legacy Bootstrap buttons adopt the system */
.btn { font-family: var(--font-head); font-weight: 700; border-radius: var(--radius-s); transition: transform .1s, box-shadow .1s, filter .15s; }
.btn-primary, .btn-gradient, .btn-primary.btn-gradient {
  background: var(--purple) !important; border-color: var(--purple) !important; color: #fff !important;
  box-shadow: 0 var(--press) 0 var(--purple-d) !important; background-image: none !important;
}
.btn-primary:active, .btn-gradient:active { transform: translateY(var(--press)); box-shadow: none !important; }
.btn-success { background: var(--green); border-color: var(--green); color: var(--navy); box-shadow: 0 var(--press) 0 var(--green-d); }
.btn-warning { background: var(--yellow); border-color: var(--yellow); color: var(--navy); box-shadow: 0 var(--press) 0 var(--yellow-d); }
.btn-outline-primary { color: var(--purple); border: 2px solid var(--purple); }
.btn-outline-primary:hover { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn-outline-dark { border-width: 2px; color: var(--navy); border-color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: #fff; }

/* ---------- 5. Cards, chips, badges ------------------------------------- */
.ds-card {
  background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; transition: transform .2s ease, box-shadow .2s ease;
}
.ds-card--lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ds-card--flat { box-shadow: none; }
.card { border-color: var(--line); border-radius: var(--radius); }
.ds-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px;
  font: 700 .78rem var(--font-head); letter-spacing: .02em; background: var(--tint); color: var(--purple-d); white-space: nowrap;
}
.ds-chip--green { background: #E6F7DE; color: #2E6B25; }
.ds-chip--yellow { background: var(--yellow); color: var(--navy); }
.ds-chip--cyan { background: #DDF6FB; color: #0B6B7C; }
.ds-chip--navy { background: var(--navy); color: #fff; }
.ds-chip--new { background: var(--yellow); color: var(--navy); transform: rotate(-4deg); }
.ds-sticker {
  width: 64px; height: 64px; display: grid; place-items: center; flex: none;
  border: 3px solid var(--navy); border-radius: 18px; box-shadow: 3px 3px 0 var(--navy);
  background: var(--yellow); color: var(--navy); font-size: 1.5rem;
}
.ds-sticker--purple { background: var(--purple-l); color: #fff; }
.ds-sticker--teal { background: var(--teal); }
.ds-sticker--green { background: var(--green); }
.ds-sticker--cyan { background: var(--cyan); }
.ds-sticker--pink { background: var(--pink); }
[data-mode="pro"] .ds-sticker { width: 52px; height: 52px; border-width: 2px; box-shadow: 2px 2px 0 var(--navy); font-size: 1.2rem; }
.ds-bubble {
  position: relative; background: #fff; border: 3px solid var(--navy); border-radius: 18px;
  box-shadow: 4px 4px 0 var(--navy); padding: 12px 16px; font: 700 1rem/1.4 var(--font-head); color: var(--navy);
}
.ds-burst { display: inline-grid; place-items: center; width: 110px; height: 110px; background: var(--yellow); color: var(--navy); font: 700 1rem var(--font-head); text-align: center;
  clip-path: polygon(50% 0, 61% 18%, 82% 8%, 80% 30%, 100% 36%, 85% 52%, 98% 70%, 76% 74%, 74% 96%, 56% 84%, 40% 100%, 34% 80%, 12% 88%, 18% 66%, 0 56%, 16% 42%, 4% 22%, 26% 22%, 30% 2%); }

/* Progress */
.ds-progress { height: 14px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.ds-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--teal)); transition: width .6s ease; }
.progress { border-radius: 99px; background: var(--tint); }
.progress-bar { background: linear-gradient(90deg, var(--green), var(--teal)); }

/* ---------- 6. Forms ---------------------------------------------------- */
.ds-field { display: grid; gap: 6px; margin-bottom: 16px; }
.ds-label { font: 700 .9rem var(--font-head); color: var(--navy); }
.ds-input, .ds-select, .ds-textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; font: 600 1rem var(--font-body); color: var(--navy);
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius-s);
  transition: border-color .15s, box-shadow .15s;
}
.ds-textarea { min-height: 130px; resize: vertical; }
.ds-input::placeholder, .ds-textarea::placeholder { color: #9AA0BF; }
.ds-input:focus, .ds-select:focus, .ds-textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(142, 63, 192, .15); }
.ds-input.is-invalid, .ds-select.is-invalid, .ds-textarea.is-invalid { border-color: var(--error); }
.ds-error { color: var(--error); font-weight: 700; font-size: .88rem; }
.ds-hint { color: var(--muted); font-size: .86rem; }
.ds-input-wrap { position: relative; }
.ds-input-wrap > i { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ds-input-wrap > .ds-input { padding-inline-start: 44px; }
.ds-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-s); font-weight: 700; margin-bottom: 16px; }
.ds-alert--error { background: #FDECEC; color: #A3262A; border: 2px solid #F6C6C7; }
.ds-alert--success { background: #E9F8E2; color: #2E6B25; border: 2px solid #C9EDB9; }
.form-control:focus, .form-select:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(142, 63, 192, .15); }
.form-check-input:checked { background-color: var(--purple); border-color: var(--purple); }

/* ---------- 7. Header --------------------------------------------------- */
.ds-header { position: sticky; top: 0; z-index: 1030; padding: 12px 0; transition: padding .2s; }
.ds-header.is-scrolled { padding: 6px 0; }
.ds-nav {
  display: flex; align-items: center; gap: 16px; background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border: 2px solid var(--line); border-radius: 22px; padding: 8px 10px 8px 18px; box-shadow: var(--shadow);
}
html[dir="rtl"] .ds-nav { padding: 8px 18px 8px 10px; }
.ds-brand img { height: 38px; width: auto; display: block; }
.ds-nav__links { display: none; list-style: none; margin: 0 auto; padding: 0; gap: 4px; }
.ds-nav__links a { display: block; padding: 10px 14px; border-radius: 12px; font: 700 .98rem var(--font-head); color: var(--navy); text-decoration: none; }
.ds-nav__links a:hover { background: var(--tint); color: var(--purple); }
.ds-nav__links a.is-active { background: var(--tint); color: var(--purple); }
.ds-nav__actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.ds-icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; }
.ds-icon-btn:hover { border-color: var(--purple); color: var(--purple); }
.ds-nav .ds-hide-sm { display: none; }
@media (min-width: 992px) {
  .ds-nav__links { display: flex; }
  .ds-nav__actions { margin-inline-start: 0; }
  .ds-nav .ds-hide-sm { display: inline-flex; }
  .ds-nav .ds-burger { display: none; }
}
.ds-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--purple-l); }
.ds-menu { border: 2px solid var(--line) !important; border-radius: 16px !important; box-shadow: var(--shadow-lg) !important; padding: 8px !important; min-width: 220px; }
.ds-menu .dropdown-item { border-radius: 10px; padding: 9px 12px; font-weight: 700; color: var(--navy); }
.ds-menu .dropdown-item:hover { background: var(--tint); color: var(--purple); }

/* Mobile drawer */
.ds-drawer .offcanvas-header { border-bottom: 2px solid var(--line); }
.ds-drawer .ds-drawer__link { display: flex; align-items: center; gap: 14px; padding: 14px 20px; font: 700 1.05rem var(--font-head); color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--line); }
.ds-drawer .ds-drawer__link i { width: 22px; color: var(--purple); }

/* ---------- 8. Hero ----------------------------------------------------- */
.ds-hero { position: relative; overflow: hidden; padding: 0 0 clamp(56px, 8vw, 96px); }
.ds-hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 992px) { .ds-hero__grid { grid-template-columns: 1.08fr .92fr; } }
.ds-hero h1 { margin: 14px 0 18px; }
.ds-hero h1 .ds-hl { color: var(--purple); position: relative; white-space: nowrap; }
.ds-hero h1 .ds-hl::after { content: ""; position: absolute; inset-inline: -2px; bottom: .06em; height: .26em; background: var(--yellow); border-radius: 6px; z-index: -1; }
.ds-hero__lead { font-size: 1.15rem; color: var(--muted); max-width: 540px; }
.ds-hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 32px; }
.ds-hero__stats { display: flex; flex-wrap: wrap; gap: 28px; }
.ds-stat b { display: block; font: 700 1.9rem/1 var(--font-head); color: var(--navy); }
.ds-stat span { color: var(--muted); font-weight: 700; font-size: .92rem; }
.ds-hero__art { position: relative; min-height: 360px; display: grid; place-items: center; }
.ds-hero__blob { position: absolute; width: min(460px, 92%); aspect-ratio: 1; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background: linear-gradient(140deg, var(--teal), var(--purple-l) 55%, var(--purple)); opacity: .95; }
.ds-hero__ring { position: absolute; width: min(540px, 104%); aspect-ratio: 1; border-radius: 50%; border: 3px dashed rgba(142, 63, 192, .25); animation: ds-spin 60s linear infinite; }
.ds-hero__cody { position: relative; width: min(330px, 70%); filter: drop-shadow(0 26px 30px rgba(23, 37, 90, .25)); animation: ds-float 3s ease-in-out infinite; }
.ds-hero__float { position: absolute; z-index: 2; }
.ds-hero__float--a { top: 8%; inset-inline-start: 2%; }
.ds-hero__float--b { bottom: 12%; inset-inline-end: 0; }
.ds-hero__float--c { top: 40%; inset-inline-end: -2%; }
.ds-hero__bubble { position: absolute; top: 2%; inset-inline-end: 6%; z-index: 3; max-width: 210px; }
.ds-hero__bubble::after { content: ""; position: absolute; bottom: -14px; inset-inline-start: 30px; width: 20px; height: 20px; background: #fff; border-right: 3px solid var(--navy); border-bottom: 3px solid var(--navy); transform: rotate(45deg); }
html[dir="rtl"] .ds-hero__bubble::after { border-right: 0; border-left: 3px solid var(--navy); transform: rotate(-45deg); }

/* ---------- 9. Marketing components ------------------------------------- */
.ds-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 44px; }
.ds-logos img { height: 44px; width: auto; filter: grayscale(1); opacity: .65; transition: filter .2s, opacity .2s; }
.ds-logos img:hover { filter: none; opacity: 1; }
.ds-feature { display: flex; gap: 16px; align-items: flex-start; }
.ds-feature h3 { margin: 4px 0 4px; font-size: 1.12rem; }
.ds-feature p { margin: 0; color: var(--muted); }
.ds-media { border-radius: var(--radius); overflow: hidden; border: var(--bw) solid var(--line); box-shadow: var(--shadow); background: var(--tint); }
.ds-media img, .ds-media video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Course card */
.ds-course { display: flex; flex-direction: column; height: 100%; padding: 0; overflow: hidden; }
.ds-course__thumb { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--purple), var(--cyan)); overflow: hidden; }
.ds-course__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ds-course:hover .ds-course__thumb img { transform: scale(1.04); }
.ds-course__thumb .ds-chip { position: absolute; top: 14px; inset-inline-start: 14px; }
.ds-course__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ds-course__body h3 { margin: 0; font-size: 1.18rem; }
.ds-course__body p { margin: 0; color: var(--muted); font-size: .95rem; }
.ds-course__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-course__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ds-course__foot small { font-weight: 700; color: var(--muted); }
.ds-line-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds-line-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Learning path (stages → quarters) */
.ds-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 28px; }
.ds-tab { border: 2px solid var(--line); background: #fff; color: var(--navy); font: 700 .98rem var(--font-head); padding: 10px 18px; border-radius: 99px; cursor: pointer; }
.ds-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.ds-path { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: q; }
.ds-path__step { position: relative; padding: 0; overflow: hidden; }
.ds-path__step img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.ds-path__step .ds-path__body { padding: 16px 18px 18px; }
.ds-path__step .ds-path__body h3 { font-size: 1.08rem; margin: 6px 0 4px; }
.ds-path__step .ds-path__num { counter-increment: q; position: absolute; top: 12px; inset-inline-start: 12px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--yellow); color: var(--navy); border: 2px solid var(--navy); font: 700 1rem var(--font-head); box-shadow: 2px 2px 0 var(--navy); }
.ds-path__step .ds-path__num::before { content: counter(q); }

/* Pricing */
.ds-price { display: flex; flex-direction: column; gap: 14px; position: relative; height: 100%; }
.ds-price--best { border-color: var(--purple); box-shadow: 0 20px 50px rgba(142, 63, 192, .2); }
.ds-price--best .ds-price__badge { position: absolute; top: -14px; inset-inline-end: 22px; }
.ds-price__amount { display: flex; align-items: baseline; gap: 8px; }
.ds-price__amount b { font: 700 2.6rem/1 var(--font-head); color: var(--navy); }
.ds-price__amount span { font-weight: 700; color: var(--muted); }
.ds-price__old { color: var(--muted); text-decoration: line-through; font-weight: 700; }
.ds-price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ds-price li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.ds-price li i { color: var(--green-d); margin-top: 4px; }
.ds-price__perks { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-price .ds-btn { margin-top: auto; }

/* Video / project tiles */
.ds-tile { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy); aspect-ratio: 4 / 5; border: var(--bw) solid var(--line); box-shadow: var(--shadow); }
.ds-tile video, .ds-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-tile__cap { position: absolute; inset-inline: 0; bottom: 0; padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: linear-gradient(transparent, rgba(23, 37, 90, .88)); color: #fff; font: 700 1rem var(--font-head); pointer-events: none; }
.ds-tile__play { position: absolute; inset: 0; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--navy); }
.ds-tile__play span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); border: 3px solid var(--navy); box-shadow: 3px 3px 0 var(--navy); font-size: 1.3rem; transition: transform .2s; }
.ds-tile__play:hover span { transform: scale(1.08); }
.ds-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 300px); gap: 18px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.ds-scroller > * { scroll-snap-align: start; }

/* FAQ */
.ds-faq { display: grid; gap: 12px; }
.ds-faq details { background: #fff; border: var(--bw) solid var(--line); border-radius: var(--radius-s); padding: 0 20px; transition: border-color .2s; }
.ds-faq details[open] { border-color: var(--purple-l); }
.ds-faq summary { list-style: none; cursor: pointer; padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 700 1.05rem var(--font-head); color: var(--navy); }
.ds-faq summary::-webkit-details-marker { display: none; }
.ds-faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--purple); font-size: 1.3rem; transition: transform .2s; }
.ds-faq details[open] summary::after { transform: rotate(45deg); }
.ds-faq details > div { padding-bottom: 18px; color: var(--muted); }

/* CTA band */
.ds-cta { position: relative; overflow: hidden; border-radius: calc(var(--radius) + 8px); padding: clamp(28px, 5vw, 56px); background: var(--navy); color: #fff; display: grid; gap: 24px; align-items: center; }
@media (min-width: 768px) { .ds-cta { grid-template-columns: 1fr auto; } }
.ds-cta h2 { color: #fff; margin: 0 0 8px; }
.ds-cta p { color: #C9CDE6; margin: 0; }
.ds-cta__cody { position: absolute; width: 150px; inset-inline-end: 24px; bottom: -14px; opacity: .95; display: none; }
@media (min-width: 1100px) { .ds-cta { padding-inline-end: 220px; } .ds-cta__cody { display: block; } }

/* Page header (inner pages) */
.ds-page-head { padding: 40px 0 32px; text-align: center; }
.ds-page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 6px 0 10px; }
.ds-page-head p { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 0 auto; }

/* Empty state */
.ds-empty { text-align: center; padding: 48px 16px; }
.ds-empty img { width: 140px; margin-bottom: 12px; animation: ds-float 3s ease-in-out infinite; }
.ds-empty h3 { margin-bottom: 6px; }
.ds-empty p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }

/* Pagination */
.pagination { gap: 6px; flex-wrap: wrap; }
.page-link { border-radius: 10px !important; border: 2px solid var(--line); color: var(--navy); font-weight: 700; }
.page-item.active .page-link { background: var(--purple); border-color: var(--purple); }

/* ---------- 10. Footer -------------------------------------------------- */
.ds-footer { background: var(--navy); color: #C9CDE6; padding: 64px 0 24px; margin-top: 0; position: relative; overflow: hidden; }
.ds-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.ds-footer a { color: #C9CDE6; text-decoration: none; }
.ds-footer a:hover { color: var(--yellow); }
.ds-footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .ds-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; } }
.ds-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ds-footer__brand img { height: 40px; margin-bottom: 14px; }
.ds-footer__social { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.ds-footer__social a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff; }
.ds-footer__social a:hover { background: var(--yellow); color: var(--navy); }
.ds-footer__news { display: flex; gap: 8px; margin-top: 12px; }
.ds-footer__news .ds-input { min-height: 46px; border-color: rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: #fff; }
.ds-footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .9rem; }
.ds-footer__wave { position: absolute; top: 0; inset-inline: 0; height: 6px; background: linear-gradient(90deg, var(--purple), var(--cyan), var(--green), var(--yellow)); }

/* Mobile bottom nav */
.ds-tabbar { position: fixed; bottom: 0; inset-inline: 0; z-index: 1020; display: none; }
@media (max-width: 767.98px) { .ds-tabbar { display: flex; } }
@media (max-width: 767.98px) { body.has-tabbar { padding-bottom: 72px; } }

/* ---------- 11. Auth pages --------------------------------------------- */
.ds-auth { min-height: calc(100vh - 90px); display: grid; align-items: center; padding: 24px 0 64px; }
.ds-auth__grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 992px) { .ds-auth__grid { grid-template-columns: .9fr 1.1fr; } }
.ds-auth__art { display: none; text-align: center; }
@media (min-width: 992px) { .ds-auth__art { display: block; } }
.ds-auth__art img { width: 260px; animation: ds-float 3s ease-in-out infinite; filter: drop-shadow(0 20px 26px rgba(23, 37, 90, .2)); }
.ds-auth__art .ds-bubble { display: inline-block; margin-bottom: 18px; max-width: 320px; }
.ds-auth__card { max-width: 500px; width: 100%; margin-inline: auto; padding: clamp(24px, 4vw, 40px); }
.ds-auth__card h1 { font-size: 2rem; margin: 0 0 6px; }
.ds-auth__card > p { color: var(--muted); margin-bottom: 24px; }
.ds-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; font-size: .9rem; margin: 20px 0; }
.ds-divider::before, .ds-divider::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.ds-steps { display: flex; gap: 8px; margin-bottom: 24px; }
.ds-steps span { flex: 1; height: 8px; border-radius: 99px; background: var(--line); transition: background .3s; }
.ds-steps span.is-done { background: var(--green); }
.ds-steps span.is-current { background: var(--purple); }
.ds-step { display: none; }
.ds-step.is-active { display: block; animation: ds-in .25s ease; }
.ds-choice { display: grid; gap: 10px; }
.ds-choice label { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius-s); cursor: pointer; font-weight: 700; background: #fff; }
.ds-choice input { accent-color: var(--purple); width: 18px; height: 18px; }
.ds-choice label:has(input:checked) { border-color: var(--purple); background: var(--tint); }
.ds-strength { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.ds-strength span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

/* ---------- 12. Cody companion ----------------------------------------- */
.cody { position: fixed; z-index: 1040; inset-inline-end: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
html[dir="rtl"] .cody { align-items: flex-start; }
body.has-tabbar .cody, body.has-bottom-nav .cody { bottom: 84px; }
@media (min-width: 768px) { body.has-tabbar .cody, body.has-bottom-nav .cody { bottom: 20px; } .cody { inset-inline-end: 24px; bottom: 20px; } }
.cody > * { pointer-events: auto; }
.cody__btn { position: relative; width: 84px; height: 96px; border: 0; padding: 0; background: none; cursor: pointer; animation: ds-float 3s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.cody__btn img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(23, 37, 90, .28)); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.cody__btn:hover img { transform: rotate(-6deg) scale(1.06); }
.cody__btn:focus-visible { outline: 3px solid var(--cyan); border-radius: 20px; }
.cody__dot { position: absolute; top: 8px; inset-inline-end: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--pink); border: 3px solid #fff; display: none; }
.cody.has-news .cody__dot { display: block; animation: ds-pulse 1.6s ease infinite; }
.cody__bubble {
  max-width: min(300px, calc(100vw - 32px)); background: #fff; border: 3px solid var(--navy); border-radius: 18px;
  box-shadow: 4px 4px 0 var(--navy); padding: 14px 16px 12px; color: var(--navy);
  transform-origin: bottom right; animation: ds-pop .28s cubic-bezier(.3, 1.6, .5, 1);
}
html[dir="rtl"] .cody__bubble { transform-origin: bottom left; }
.cody__bubble[hidden] { display: none; }
.cody__text { font: 700 1rem/1.45 var(--font-head); margin: 0 26px 0 0; }
html[dir="rtl"] .cody__text { margin: 0 0 0 26px; }
.cody__name { font: 700 .75rem var(--font-head); color: var(--purple); text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 2px; }
.cody__close { position: absolute; top: 8px; inset-inline-end: 8px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--tint); color: var(--navy); cursor: pointer; font-size: 1rem; line-height: 1; }
.cody__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cody__actions a, .cody__actions button { font: 700 .85rem var(--font-head); padding: 7px 12px; border-radius: 99px; border: 2px solid var(--line); background: #fff; color: var(--navy); text-decoration: none; cursor: pointer; }
.cody__actions a:hover, .cody__actions button:hover { border-color: var(--purple); color: var(--purple); }
.cody__actions .is-primary { background: var(--purple); border-color: var(--purple); color: #fff; }
.cody__actions .is-primary:hover { color: #fff; filter: brightness(1.08); }
.cody.is-minimized .cody__btn { width: 56px; height: 64px; }
.cody.is-bounce .cody__btn { animation: ds-bounce .7s ease; }
[data-mode="pro"] .cody__btn { width: 70px; height: 80px; }
.cody-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 2000; overflow: hidden; }
.cody-confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: ds-confetti 1.6s ease-in forwards; }

/* ---------- 13. Motion -------------------------------------------------- */
@keyframes ds-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ds-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes ds-spin { to { transform: rotate(360deg); } }
@keyframes ds-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
@keyframes ds-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ds-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@keyframes ds-bounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-22px) rotate(-6deg); } 60% { transform: translateY(0) rotate(4deg); } 80% { transform: translateY(-6px); } }
@keyframes ds-confetti { to { transform: translateY(105vh) rotate(720deg); opacity: .8; } }
.ds-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.ds-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .ds-reveal { opacity: 1; transform: none; }
}

/* Utilities */
.ds-center { text-align: center; }
.ds-mt-0 { margin-top: 0 !important; }
.ds-flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ds-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-navy { color: var(--navy) !important; }
.text-purple { color: var(--purple) !important; }
.text-teal { color: #0E8FA6 !important; }
.bg-tint { background: var(--tint) !important; }

/* Track cards: room for the corner Cody */
.ds-track { position: relative; overflow: hidden; padding-bottom: 72px; }
.ds-track__cody { position: absolute; bottom: -6px; inset-inline-end: 14px; width: 60px; height: auto; }
html, body { overflow-x: clip; }
.ds-cta--plain { padding-inline-end: clamp(28px, 5vw, 56px) !important; }


/* Footer v2 — centered stack: logo → quick links → social → copyright */
.ds-footer { padding: 56px 0 28px; }
.ds-footer__stack { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.ds-footer__logo img { height: 46px; width: auto; display: block; }
.ds-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; }
.ds-footer__links a { display: inline-block; padding: 6px 12px; border-radius: 99px; font: 700 .95rem var(--font-head); color: #C9CDE6; }
.ds-footer__links a:hover { background: rgba(255, 255, 255, .08); color: var(--yellow); }
.ds-footer .ds-footer__social { margin: 0; justify-content: center; }
.ds-footer__copy { margin: 0; padding-top: 20px; width: 100%; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .9rem; color: #9AA0C3; }

/* ── Mobile app bar (floating pill, < 768px) ──────────────────────────── */
.ds-tabbar {
  align-items: stretch; justify-content: space-between; gap: 2px;
  margin: 0 10px calc(8px + env(safe-area-inset-bottom)); padding: 8px 8px 7px;
  background: rgba(255, 255, 255, .92); border: 2px solid var(--line); border-radius: 26px;
  box-shadow: 0 10px 30px rgba(23, 37, 90, .16), 0 2px 6px rgba(23, 37, 90, .08);
  backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
}
.ds-tabbar > a, .ds-tabbar > button {
  flex: 1; min-width: 0; display: grid; justify-items: center; gap: 3px; padding: 5px 2px 3px;
  background: none; border: 0; border-radius: 16px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  font: 700 .66rem/1.1 var(--font-head); color: var(--muted); text-decoration: none; transition: color .2s;
}
.ds-tabbar > a span, .ds-tabbar > button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-tabbar > a i, .ds-tabbar > button i {
  width: 46px; height: 30px; display: grid; place-items: center; border-radius: 99px; font-size: 1.18rem;
  transition: background .2s, color .2s, transform .15s;
}
.ds-tabbar > a:active i, .ds-tabbar > button:active i { transform: scale(.88); }
.ds-tabbar > a.is-active { color: var(--purple); }
.ds-tabbar > a.is-active i { background: var(--tint); color: var(--purple); }
.ds-tabbar > a:hover i, .ds-tabbar > button:hover i { background: var(--bg); }
/* Centre action button, raised out of the bar */
.ds-tabbar .ds-tabbar__fab { color: var(--purple-d); }
.ds-tabbar .ds-tabbar__fab i {
  width: 56px; height: 56px; margin-top: -26px; border-radius: 20px; font-size: 1.3rem; color: #fff;
  background: linear-gradient(140deg, var(--purple-l), var(--purple) 60%, var(--purple-d));
  border: 4px solid #fff; box-shadow: 0 6px 0 var(--purple-d), 0 12px 22px rgba(142, 63, 192, .4);
}
.ds-tabbar .ds-tabbar__fab:active i { transform: translateY(3px) scale(.97); box-shadow: 0 3px 0 var(--purple-d), 0 6px 14px rgba(142, 63, 192, .4); }
.ds-tabbar .ds-tabbar__fab.is-active i { background: linear-gradient(140deg, var(--purple-l), var(--purple) 60%, var(--purple-d)); color: #fff; }
@media (max-width: 359.98px) { .ds-tabbar > a span, .ds-tabbar > button span { font-size: .6rem; } .ds-tabbar > a i, .ds-tabbar > button i { width: 40px; } }

@media (max-width: 991.98px) {
  .ds-nav .ds-burger { display: none; }
}
@media (max-width: 767.98px) {
  /* Slim app bar */
  .ds-header { padding: 0; padding-top: env(safe-area-inset-top); background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 2px solid var(--line); }
  .ds-header .ds-container { padding-inline: 12px; }
  .ds-header .ds-nav { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 8px 0 !important; backdrop-filter: none; }
  .ds-header .ds-brand img { height: 32px; }
  .ds-header .ds-nav__actions .ds-btn { display: none; }
  .ds-header .ds-icon-btn { width: 40px; height: 40px; border-radius: 12px; }
  /* Compact footer above the tab bar */
  .ds-footer { padding: 40px 0 24px; border-radius: 28px 28px 0 0; }
  .ds-footer__logo img { height: 38px; }
  .ds-footer__links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
  .ds-footer__links a { display: block; padding: 10px 12px; background: rgba(255, 255, 255, .06); border-radius: 14px; font-size: .9rem; }
  .ds-footer__copy { font-size: .82rem; }
  body.has-tabbar { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  body.has-tabbar .cody { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .ds-nav .ds-burger { display: grid; }
}

/* ── Footer v3 — logo → social → quick links → copyright ───────────────── */
.ds-foot { position: relative; margin: 0; background: var(--navy); color: #C9CDE6; padding: 48px 0 24px; overflow: hidden; }
.ds-foot::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--purple), var(--cyan), var(--green), var(--yellow)); }
.ds-foot__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ds-foot__logo img { height: 46px; width: auto; display: block; }
.ds-foot__social { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ds-foot__social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem;
  background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; transition: background .2s, color .2s, transform .2s; }
.ds-foot__social a:hover { background: var(--yellow); color: var(--navy); transform: translateY(-3px); }
.ds-foot__nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 0; margin-top: 24px; max-width: 760px; }
.ds-foot__nav a { position: relative; padding: 4px 14px; font: 700 .95rem var(--font-body); color: #C9CDE6; text-decoration: none; }
.ds-foot__nav a + a::before { content: ""; position: absolute; inset-inline-start: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.ds-foot__nav a:hover { color: var(--yellow); }
.ds-foot__copy { margin: 24px 0 0; padding-top: 18px; width: 100%; max-width: 760px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .88rem; color: #9AA0C3; }
@media (max-width: 767.98px) {
  .ds-foot { padding: 36px 0 20px; border-radius: 24px 24px 0 0; }
  .ds-foot__logo img { height: 38px; }
  .ds-foot__nav a { padding: 6px 12px; font-size: .9rem; }
}

/* Legacy dark hero/header bands keep light headings */
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
h1.text-white, h2.text-white, h3.text-white, h4.text-white, h5.text-white, h6.text-white,
.page-header-bg h1, .page-header-bg h2, .bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-navy h1, .bg-navy h2,
.hero-section h1, .hero-section h2 { color: #fff; }
.text-white .text-muted, .page-header-bg .text-muted { color: rgba(255, 255, 255, .7) !important; }

/* Document pages (policies, CMS pages) */
.ds-doc { max-width: 860px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); }
.ds-doc .ds-doc__meta { display: flex; justify-content: flex-end; color: var(--muted); font-size: .85rem; font-weight: 700; margin-bottom: 8px; }
.ds-prose { font-size: 1.05rem; line-height: 1.8; color: #3B4470; }
.ds-prose h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; display: flex; gap: 10px; align-items: baseline; }
.ds-prose h3 { font-size: 1.12rem; margin: 1.5rem 0 .5rem; }
.ds-prose p { margin: 0 0 1rem; }
.ds-prose ul, .ds-prose ol { padding-inline-start: 1.3rem; margin: 0 0 1rem; }
.ds-prose li { margin-bottom: .4rem; }
.ds-prose li::marker { color: var(--purple); }
.ds-prose a { color: var(--purple); font-weight: 700; }
.ds-prose .ds-num { flex: none; width: 30px; height: 30px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--tint); color: var(--purple); font-size: .95rem; }
.ds-callout { border-inline-start: 4px solid var(--teal); background: #EEFAFB; border-radius: var(--radius-s); padding: 14px 18px; margin: 1.2rem 0; color: var(--navy); }

/* Focus layout bar */
.ds-focusbar { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line); padding: 10px 0; padding-top: calc(10px + env(safe-area-inset-top)); }

/* Practical task lists (HTML authored in AssignmentController) */
.ds-task { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: task; }
.ds-task > li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius-s); line-height: 1.6; }
.ds-task > li::before { counter-increment: task; content: counter(task); flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--purple); font: 700 .95rem var(--font-head); }
.ds-task--bonus > li::before { background: var(--yellow); color: var(--navy); }
.ds-task code, .ds-task .font-mono { font-family: var(--font-code); background: var(--tint); color: var(--purple-d); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.ds-task span[class*="text-cyan"] { background: #DDF6FB; color: #0B6B7C; padding: 2px 8px; border-radius: 6px; }
.ds-task ul { margin: 8px 0 0; padding-inline-start: 1.1rem; list-style: disc; }
.ds-task strong { color: var(--navy); }

/* ── Partners band (home) ─────────────────────────────────────────────── */
.ds-partners { position: relative; padding: clamp(40px, 6vw, 64px) 0; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); border-block: 2px solid var(--line); overflow: hidden; }
.ds-partners::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(142, 63, 192, .09) 1.5px, transparent 1.5px); background-size: 24px 24px; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 60%, transparent); mask-image: linear-gradient(180deg, transparent, #000 40%, #000 60%, transparent); }
.ds-partners__head { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 28px; }
.ds-partners__head .ds-eyebrow { margin: 0; }
.ds-partners__head h2 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2rem); }
.ds-partners__viewport { position: relative; overflow: hidden; padding: 12px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ds-partners__track { display: flex; width: max-content; animation: ds-marquee 38s linear infinite; }
html[dir="rtl"] .ds-partners__track { animation-name: ds-marquee-rtl; }
.ds-partners__viewport:hover .ds-partners__track, .ds-partners__viewport:focus-within .ds-partners__track { animation-play-state: paused; }
.ds-partners__list { display: flex; gap: 18px; margin: 0; padding: 0 9px; list-style: none; }
.ds-partner { width: 190px; height: 104px; display: grid; place-items: center; padding: 18px 22px; border-radius: 20px; background: #fff;
  border: 2px solid var(--line); box-shadow: var(--shadow); transition: transform .25s ease, border-color .25s, box-shadow .25s; }
.ds-partner img { max-width: 100%; max-height: 62px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .25s, opacity .25s, transform .25s; }
.ds-partner:hover, .ds-partner:focus-visible { transform: translateY(-4px); border-color: var(--purple-l); box-shadow: var(--shadow-lg); }
.ds-partner:hover img, .ds-partner:focus-visible img { filter: none; opacity: 1; transform: scale(1.04); }
@keyframes ds-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ds-marquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (max-width: 575.98px) { .ds-partner { width: 150px; height: 88px; padding: 14px 16px; border-radius: 16px; } .ds-partner img { max-height: 50px; } }
/* No motion: a static, wrapped grid of the original list */
@media (prefers-reduced-motion: reduce) {
  .ds-partners__viewport { -webkit-mask-image: none; mask-image: none; }
  .ds-partners__track { width: auto; animation: none; justify-content: center; }
  .ds-partners__list { flex-wrap: wrap; justify-content: center; }
  .ds-partners__list[aria-hidden="true"] { display: none; }
}



/* ── Hero Codi 3D-style tilt (js/cody-tilt.js) ────────────────────────── */
.ds-hero__art--tilt { transform-style: preserve-3d; will-change: transform; transition: transform .4s cubic-bezier(.2,.7,.3,1); }
.ds-hero__art--tilt .ds-hero__ring, .ds-hero__art--tilt .ds-hero__blob, .ds-hero__art--tilt .ds-hero__cody,
.ds-hero__art--tilt .ds-hero__bubble, .ds-hero__art--tilt .ds-hero__float { will-change: transform; transition: transform .25s cubic-bezier(.2,.7,.3,1); }
.ds-hero__cody--pop { animation: ds-cody-pop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes ds-cody-pop { 0%,100% { } 30% { transform: translateY(-16px) rotate(-5deg) scale(1.04); } 60% { transform: translateY(0) rotate(3deg); } }

/* ── Hero art on phones: fit Codi, stop overlap ───────────────────────── */
@media (max-width: 767.98px) {
  .ds-hero__grid { gap: 20px; }
  .ds-hero__art { min-height: 340px; width: 100%; max-width: 420px; margin-inline: auto; }
  .ds-hero__cody { width: min(240px, 62vw); }
  .ds-hero__blob { width: min(300px, 76vw); }
  .ds-hero__ring { width: min(340px, 88vw); }
  .ds-hero__bubble { top: 0; inset-inline-end: 2%; max-width: 160px; font-size: .82rem; padding: 10px 12px; }
  .ds-hero__float--a { top: 10%; inset-inline-start: 4%; }
  .ds-hero__float--b { bottom: 8%; inset-inline-end: 4%; }
  .ds-hero__float--c { display: none; }
  .ds-hero__float .ds-sticker { width: 52px; height: 52px; font-size: 1.1rem; }
}
@media (max-width: 400px) {
  .ds-hero__art { min-height: 290px; }
  /* Cap the height so Codi isn't too tall; object-fit keeps his proportions (no stretch). */
  .ds-hero__cody { width: 58vw; height: 235px; object-fit: contain; }
  .ds-hero__bubble { display: none; }
}


/* ── Hero carousel (replaces Codi art) — 3D flip deck ──────────────── */
.ds-hero-carousel { position: relative; width: 100%; max-width: 560px; margin-inline: auto; padding-top: 18px; }
.ds-hero-carousel::after { content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; top: -10%; inset-inline-end: -14%; border-radius: 50%;
  background: radial-gradient(circle, rgba(19, 193, 222, .35), rgba(142, 63, 192, .18) 45%, transparent 70%); filter: blur(10px); }
.ds-hero-carousel__deck { position: absolute; top: 18px; inset-inline: 0; aspect-ratio: 4 / 3; border-radius: calc(var(--radius) + 4px); }
.ds-hero-carousel__deck--1 { background: linear-gradient(140deg, var(--purple), var(--purple-d)); transform: rotate(-6deg) translate(-10px, 14px); opacity: .9; }
.ds-hero-carousel__deck--2 { background: linear-gradient(140deg, var(--teal), var(--cyan)); transform: rotate(3.5deg) translate(12px, 8px); opacity: .85; }
.ds-hero-carousel .swiper { position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden; border: 6px solid #fff; box-shadow: 0 30px 60px rgba(23, 37, 90, .28); background: var(--navy); }
.ds-hero-carousel__slide { margin: 0; aspect-ratio: 4 / 3; position: relative; background: var(--navy); }
.ds-hero-carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-hero-carousel__slide figcaption { position: absolute; inset-inline: 12px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ds-hero-carousel__tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: var(--yellow); color: var(--navy); font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.ds-hero-carousel__text { padding: 10px 14px; border-radius: 14px; color: #fff; font-weight: 700; font-size: .98rem; line-height: 1.35;
  background: rgba(14, 22, 64, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .18); }
.ds-hero-carousel__progress { position: absolute; z-index: 4; inset-inline: 0; top: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.ds-hero-carousel__progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--cyan)); transform: scaleX(0); transform-origin: left; }
html[dir="rtl"] .ds-hero-carousel__progress span { transform-origin: right; }
.ds-hero-carousel__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.ds-hero-carousel__count { font: 700 .95rem var(--font-head); color: var(--muted); min-width: 62px; direction: ltr; }
.ds-hero-carousel__count b { color: var(--navy); font-size: 1.35rem; }
.ds-hero-carousel__bar .swiper-pagination { position: static; flex: 1; display: flex; justify-content: center; gap: 2px; }
.ds-hero-carousel__bar .swiper-pagination-bullet { background: var(--navy); opacity: .2; transition: width .3s, opacity .3s; }
.ds-hero-carousel__bar .swiper-pagination-bullet-active { opacity: 1; width: 24px; border-radius: 6px; background: var(--purple); }
.ds-hero-carousel__arrows { display: flex; gap: 8px; }
.ds-hero-carousel__nav { width: 44px; height: 44px; border-radius: 50%; border: var(--bw) solid var(--line); background: var(--surface); color: var(--navy); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.ds-hero-carousel__nav:hover, .ds-hero-carousel__nav:focus-visible { background: var(--navy); color: #fff; border-color: var(--navy); }
html[dir="rtl"] .ds-hero-carousel__nav i { transform: scaleX(-1); }
.ds-hero-carousel__badge { position: absolute; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); animation: ds-float 4s ease-in-out infinite; }
.ds-hero-carousel__badge .ds-sticker { width: 40px; height: 40px; font-size: .95rem; box-shadow: none; border-width: 0; }
.ds-hero-carousel__badge b { display: block; font: 700 1.05rem/1.1 var(--font-head); color: var(--navy); }
.ds-hero-carousel__badge small { color: var(--muted); font-weight: 700; font-size: .75rem; }
.ds-hero-carousel__badge--a { top: 0; inset-inline-start: -28px; }
.ds-hero-carousel__badge--b { top: 52%; inset-inline-end: -30px; animation-delay: -2s; }
@media (max-width: 1199.98px) { .ds-hero-carousel__badge--a { inset-inline-start: -8px; } .ds-hero-carousel__badge--b { inset-inline-end: -8px; } }
@media (max-width: 767.98px) {
  .ds-hero-carousel .swiper { border-width: 4px; }
  .ds-hero-carousel__deck--1 { transform: rotate(-4deg) translate(-4px, 10px); } .ds-hero-carousel__deck--2 { transform: rotate(2.5deg) translate(4px, 6px); }
  .ds-hero-carousel__badge { display: none; }
  .ds-hero-carousel__text { font-size: .88rem; padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { .ds-hero-carousel__badge { animation: none; } }

/* ── Partnership sections (GIZ / NTI) ─────────────────────────────────── */
.ds-collab { display: grid; gap: 40px; align-items: center; }
@media (min-width: 992px) { .ds-collab { grid-template-columns: 1fr 1fr; } .ds-collab--reverse > :first-child { order: 2; } }
.ds-collab__lead { font-size: 1.1rem; font-weight: 600; }
.ds-collab__stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 18px; }
.ds-collab__gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.ds-collab__gallery .ds-media { aspect-ratio: 4 / 3; box-shadow: none; transition: transform .2s; }
.ds-collab__gallery .ds-media:hover { transform: translateY(-3px); }
.ds-collab__gallery--4 .ds-media:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 7; }
.ds-collab__gallery--6 { grid-template-columns: repeat(3, 1fr); }
.ds-collab__gallery--6 .ds-media:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.ds-collab__gallery--6 .ds-media:first-child img { object-position: top; }

/* ── Services page ────────────────────────────────────────────────────── */
.ds-svc { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px; }
.ds-svc h2 { margin: 6px 0 0; }
.ds-svc p { flex: 1; margin: 0 0 6px; }
.ds-platform { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ds-platform__shot { display: block; background: #0E1640; border-bottom: var(--bw) solid var(--line); }
.ds-platform__bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #EEF0F7; }
.ds-platform__bar i { width: 9px; height: 9px; border-radius: 50%; background: #F87171; } .ds-platform__bar i:nth-child(2) { background: #FBBF24; } .ds-platform__bar i:nth-child(3) { background: #34D399; }
.ds-platform__bar small { margin-inline-start: 8px; font-size: .75rem; color: var(--muted); direction: ltr; }
.ds-platform__shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; transition: transform .4s; }
.ds-platform:hover .ds-platform__shot img { transform: scale(1.03); }
.ds-platform__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; align-items: flex-start; }
.ds-platform__body h3 { margin: 4px 0 0; font-size: 1.15rem; }
.ds-platform__body p { margin: 0; flex: 1; }
.ds-platform__link { font-weight: 700; color: var(--purple); text-decoration: none; font-size: .92rem; }
.ds-platform__link:hover { text-decoration: underline; }
.ds-svc-cta { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 32px; background: linear-gradient(120deg, var(--tint), #E3F7FA); }
.ds-svc-cta h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0 0 6px; }
/* gallery fixes: 4 photos = 1 wide + 3, 6 photos = big tile + 5 */
.ds-collab__gallery--4 { grid-template-columns: repeat(3, 1fr); }
.ds-collab__gallery--6 .ds-media:first-child { position: relative; }
.ds-collab__gallery--6 .ds-media:first-child img { position: absolute; inset: 0; }
/* Swiper inside a grid item blows the track out — let grid children shrink. */
.ds-hero__grid > *, .ds-collab > * { min-width: 0; }

/* Courses page — grouped by age */
.ds-age-group + .ds-age-group { margin-top: 56px; }
.ds-age-group__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 14px; border-bottom: var(--bw) solid var(--line); }
.ds-age-group__head h2 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.7rem); }

/* Contact — smart inquiry form */
.ds-contact fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.ds-contact__types { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ds-contact__type { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius-s); background: #fff; cursor: pointer; font-weight: 700; font-size: .92rem; line-height: 1.3; transition: border-color .15s, background .15s; }
.ds-contact__type input { position: absolute; opacity: 0; pointer-events: none; }
.ds-contact__type i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--purple); }
.ds-contact__type:has(input:checked) { border-color: var(--purple); background: var(--tint); }
.ds-contact__type:has(input:checked) i { background: var(--purple); color: #fff; }
.ds-contact__type:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(142, 63, 192, .2); }
.ds-contact__grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.ds-contact__block { margin: 6px 0 14px; padding: 18px 18px 4px; border-radius: var(--radius-s); background: var(--bg); border: 1px dashed var(--line); }
.ds-contact__block[hidden] { display: none; }
.ds-contact__h { font-size: 1rem; margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }
.ds-contact__h i { color: var(--purple); }
.ds-contact__checks { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-contact__checks label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 99px; background: #fff; cursor: pointer; font-weight: 700; font-size: .88rem; }
.ds-contact__checks label:has(input:checked) { border-color: var(--purple); background: var(--tint); }
.ds-contact__checks input { accent-color: var(--purple); }
.ds-svc--wide { grid-column: 1 / -1; background: linear-gradient(120deg, #fff, var(--tint)); }

/* =========================================================================
   v2.1 — aligned with the landing-page-design skill (DESIGN.md §10)
   Tokens first, then overrides of the rules above. Keep this block last.
   ========================================================================= */
:root {
  /* Motion (B7): weighted, decelerating. Never ease / linear / ease-in-out. */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: 500ms; --dur-color: 300ms; --dur-reveal: 700ms;
  /* Spacing (B2): only these values. */
  --space-25: 2px; --space-50: 4px; --space-75: 8px; --space-100: 12px; --space-200: 16px;
  --space-300: 24px; --space-400: 32px; --space-500: 40px; --space-600: 48px;
  --space-700: 64px; --space-800: 80px; --space-900: 96px;
  /* Softer, layered elevation */
  --shadow: 0 1px 2px rgba(23, 37, 90, .04), 0 8px 24px rgba(23, 37, 90, .07);
  --shadow-lg: 0 2px 4px rgba(23, 37, 90, .05), 0 24px 48px rgba(23, 37, 90, .12);
}

/* ---------- Type (B1): Tailwind steps only, weights capped at 700 -------- */
body { line-height: 1.5; }                                   /* 16 / 24 */
html[dir="rtl"] body { line-height: 1.75; }                  /* Arabic needs more leading (documented exception) */
[data-mode="play"] body { font-size: 18px; line-height: 28px; }
h1, .ds-h1 { font-size: 2.25rem; line-height: 2.5rem; }      /* 36 / 40 */
h2, .ds-h2 { font-size: 1.875rem; line-height: 2.25rem; }    /* 30 / 36 */
h3, .ds-h3 { font-size: 1.25rem; line-height: 1.75rem; }     /* 20 / 28 */
@media (min-width: 768px) {
  h1, .ds-h1 { font-size: 3rem; line-height: 1.05; }         /* 48 */
  h2, .ds-h2 { font-size: 2.25rem; line-height: 2.5rem; }    /* 36 / 40 */
}
@media (min-width: 1200px) { h1, .ds-h1 { font-size: 3.75rem; line-height: 1.05; } }  /* 60 */
html[dir="rtl"] h1, html[dir="rtl"] h2 { line-height: 1.35; }
h1, h2, h3, h4, .ds-head { text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }
.ds-section-head p, .ds-page-head p { font-size: 1.125rem; line-height: 1.75rem; }
.ds-hero__lead { font-size: 1.125rem; line-height: 1.75rem; max-width: 680px; }
.ds-page-head h1 { font-size: 2.25rem; line-height: 2.5rem; }
@media (min-width: 768px) { .ds-page-head h1 { font-size: 3rem; line-height: 1.1; } }
.ds-auth__card h1 { font-size: 1.875rem; line-height: 2.25rem; }
.ds-stat b { font-size: 1.875rem; }
.ds-price__amount b { font-size: 2.25rem; }

/* Named text styles (B1). Use these instead of loose size + weight. */
.heading-1 { font: 700 3.75rem/1 var(--font-head); }      .heading-2 { font: 700 3rem/1 var(--font-head); }
.heading-3 { font: 700 2.25rem/2.5rem var(--font-head); } .heading-4 { font: 700 1.875rem/2.25rem var(--font-head); }
.heading-5 { font: 700 1.5rem/2rem var(--font-head); }    .heading-6 { font: 700 1.25rem/1.75rem var(--font-head); }
.title-1 { font: 600 1.25rem/1.75rem var(--font-head); }  .title-2 { font: 600 1.125rem/1.75rem var(--font-head); }
.title-3 { font: 600 1rem/1.5rem var(--font-head); }      .title-4 { font: 600 .875rem/1.25rem var(--font-head); }
.title-5 { font: 600 .75rem/1rem var(--font-head); }
.body-1 { font: 700 1rem/1.5rem var(--font-body); }  .body-2 { font: 600 1rem/1.5rem var(--font-body); }  .body-3 { font: 400 1rem/1.5rem var(--font-body); }
.body-4 { font: 700 .875rem/1.25rem var(--font-body); } .body-5 { font: 600 .875rem/1.25rem var(--font-body); } .body-6 { font: 400 .875rem/1.25rem var(--font-body); }
.button-lg { font: 700 1.125rem/1.75rem var(--font-head); } .button-md { font: 700 1rem/1.5rem var(--font-head); }
.button-sm { font: 700 .875rem/1.25rem var(--font-head); }  .button-xsm { font: 700 .75rem/1rem var(--font-head); }
.caption-1 { font: 600 .875rem/1.25rem var(--font-body); } .caption-2 { font: 400 .875rem/1.25rem var(--font-body); }
.caption-3 { font: 700 .75rem/1rem var(--font-body); } .caption-4 { font: 600 .75rem/1rem var(--font-body); } .caption-5 { font: 400 .75rem/1rem var(--font-body); }
@media (max-width: 767.98px) { .heading-1 { font-size: 2.25rem; line-height: 2.5rem; } .heading-2 { font-size: 1.875rem; line-height: 2.25rem; } }

/* ---------- Hero heading (B5): text gradient only, capped at 680px ------- */
.ds-hero h1, .ds-aud-hero h1, .ds-page-head h1 {
  max-width: 680px; color: var(--navy);
  background: linear-gradient(90deg, var(--navy) 0%, #4A5486 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html[dir="rtl"] .ds-hero h1, html[dir="rtl"] .ds-aud-hero h1, html[dir="rtl"] .ds-page-head h1 { background-image: linear-gradient(270deg, var(--navy) 0%, #4A5486 100%); }
.ds-hero h1 .ds-hl { -webkit-text-fill-color: var(--purple); }
.ds-aud-hero h1 .ds-hl { -webkit-text-fill-color: var(--aud-accent, var(--purple)); }
.ds-page-head h1 { margin-inline: auto; }
.ds-section--navy h1, .ds-section--navy h2 { -webkit-text-fill-color: #fff; }

/* ---------- Motion (B7) ------------------------------------------------- */
.ds-btn { transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), filter var(--dur-color) var(--ease), background-color var(--dur-color) var(--ease); }
.ds-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.btn { transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), filter var(--dur-color) var(--ease); }
.ds-card { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur-color) var(--ease); }
.ds-card--lift:active { transform: scale(.98); }
.ds-nav__links a, .ds-icon-btn, .ds-tab, .ds-menu .dropdown-item, .ds-footer a, .ds-foot__nav a, .ds-foot__social a, .ds-partner, .ds-partner img,
.ds-hero-carousel__nav, .ds-contact__type, .ds-choice label, .ds-faq details, .ds-input, .ds-select, .ds-textarea {
  transition-duration: var(--dur-color); transition-timing-function: var(--ease);
}
.ds-icon-btn { transition-property: border-color, color, transform; }
.ds-icon-btn:active, .ds-tab:active, .ds-hero-carousel__nav:active { transform: scale(.96); }
.ds-faq summary::after { transition: transform var(--dur) var(--ease); }
.ds-course__thumb img, .ds-platform__shot img { transition: transform var(--dur) var(--ease); }
.ds-reveal { transform: translateY(32px); transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
.ds-reveal.is-in { transform: none; }
@media (hover: hover) { [data-mode="play"] .ds-btn:hover { animation: ds-wiggle 400ms var(--ease); } }
@keyframes ds-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Navigation: floating translucent bar */
.ds-nav { background: rgba(255, 255, 255, .78); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-width: 1px; border-radius: 20px; }
.ds-nav__links a { font-weight: 600; border-radius: 12px; }
.ds-nav__links a.is-active { font-weight: 700; }
/* Mobile drawer: links arrive one after another (60ms steps, at most 400ms) */
.ds-drawer.showing .ds-drawer__link, .ds-drawer.show .ds-drawer__link { animation: ds-rise var(--dur) var(--ease) both; }
.ds-drawer .ds-drawer__link:nth-child(2) { animation-delay: 60ms; }  .ds-drawer .ds-drawer__link:nth-child(3) { animation-delay: 120ms; }
.ds-drawer .ds-drawer__link:nth-child(4) { animation-delay: 180ms; } .ds-drawer .ds-drawer__link:nth-child(5) { animation-delay: 240ms; }
.ds-drawer .ds-drawer__link:nth-child(6) { animation-delay: 300ms; } .ds-drawer .ds-drawer__link:nth-child(n+7) { animation-delay: 340ms; }

/* ---------- Flat backgrounds (B4) --------------------------------------- */
.ds-partners { background: var(--surface); }
.ds-svc-cta { background: var(--tint); }
.ds-svc--wide { background: var(--surface); }
.ds-course__thumb { background: var(--purple); }
.ds-hero-carousel::after { display: none; }
.ds-hero-carousel__deck--1 { background: var(--purple); }
.ds-hero-carousel__deck--2 { background: var(--teal); }
.ds-tabbar .ds-tabbar__fab i, .ds-tabbar .ds-tabbar__fab.is-active i { background: var(--purple); }
.ds-hero__blob { background: #ECE6FB; opacity: 1; }
/* Brand stripe: four flat bands, no blend */
.ds-foot::before, .ds-footer__wave { background: linear-gradient(90deg, var(--purple) 0 25%, var(--cyan) 25% 50%, var(--green) 50% 75%, var(--yellow) 75% 100%); }

/* ---------- "pro" mode: calm and credible for schools and companies ------- */
[data-mode="pro"] .ds-sticker { width: 48px; height: 48px; border: 0; box-shadow: none; border-radius: 12px; font-size: 1.125rem; background: #FFF5D1; color: #7A5D00; }
[data-mode="pro"] .ds-sticker--purple { background: var(--tint); color: var(--purple); }
[data-mode="pro"] .ds-sticker--teal, [data-mode="pro"] .ds-sticker--cyan { background: #DDF6FB; color: #0B6B7C; }
[data-mode="pro"] .ds-sticker--green { background: #E6F7DE; color: #2E6B25; }
[data-mode="pro"] .ds-sticker--pink { background: #FFE8EF; color: #A8325B; }
[data-mode="pro"] .ds-bubble, [data-mode="pro"] .cody__bubble { border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-weight: 600; }
[data-mode="pro"] .ds-hero__bubble::after { border-color: var(--line); border-style: solid; border-width: 0 1px 1px 0; }
html[dir="rtl"][data-mode="pro"] .ds-hero__bubble::after { border-width: 0 0 1px 1px; }
[data-mode="pro"] .ds-chip--new { transform: none; }
[data-mode="pro"] .ds-hero__float--c { display: none; }
[data-mode="pro"] .ds-hero__ring { border: 1px solid rgba(142, 63, 192, .18); animation-duration: 120s; }
[data-mode="pro"] .ds-path__step .ds-path__num, [data-mode="pro"] .ds-tile__play span { border-width: 0; box-shadow: var(--shadow); }
[data-mode="pro"] .ds-btn:hover { transform: translateY(-1px); }
[data-mode="pro"] .ds-btn:active { transform: scale(.98); }

/* ---------- 3D Cody (js/cody-3d.js) ------------------------------------- */
.ds-cody3d { position: relative; display: block; }
.ds-cody3d > img { width: 100%; height: 100%; object-fit: contain; transition: opacity var(--dur) var(--ease); }
.ds-cody3d__canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity var(--dur-reveal) var(--ease); }
.ds-cody3d.is-3d .ds-cody3d__canvas { opacity: 1; }
.ds-cody3d.is-3d > img { opacity: 0; }
.ds-cody3d[data-cody3d="hero"] .ds-cody3d__canvas { cursor: grab; }
.ds-cody3d[data-cody3d="hero"] .ds-cody3d__canvas:active { cursor: grabbing; }
/* hero scene */
.ds-hero__cody.ds-cody3d { width: min(380px, 82%); aspect-ratio: 9 / 10; height: auto; filter: none; }
.ds-hero__cody.ds-cody3d.is-3d { animation: none; }
@media (max-width: 767.98px) { .ds-hero__cody.ds-cody3d { width: min(280px, 72vw); height: auto; } }
/* audience hero: Cody stands beside the photo for every audience */
.ds-aud-hero__cody.ds-cody3d { width: 36%; aspect-ratio: 3 / 4; height: auto; }
.ds-aud-hero__cody.ds-cody3d.is-3d { animation: none; filter: none; }
/* floating companion */
.cody__btn .ds-cody3d { width: 100%; height: 100%; transition: transform var(--dur) var(--ease); }
.cody__btn .ds-cody3d__canvas { pointer-events: none; }
.cody__btn:has(.is-3d) { animation: none; }
.cody__btn:has(.is-3d):hover .ds-cody3d { transform: scale(1.06); }

/* ---------- Tagline reveal (B11) ---------------------------------------- */
.ds-tagline__grid { display: grid; gap: var(--space-600); align-items: center; }
@media (min-width: 992px) { .ds-tagline__grid { grid-template-columns: 1.4fr .6fr; } }
.ds-tagline__grid--solo { grid-template-columns: 1fr !important; justify-items: center; text-align: center; }
.ds-tagline__text { max-width: 680px; margin: var(--space-200) 0 0; font-size: 1.875rem; line-height: 2.25rem; }
@media (min-width: 768px) { .ds-tagline__text { font-size: 2.25rem; line-height: 2.5rem; } }
.ds-tagline__grid--solo .ds-tagline__text { margin-inline: auto; }
.ds-tagline__line { display: block; }
.ds-tagline__word { color: rgba(23, 37, 90, .25); transition: color var(--dur) var(--ease); }
.ds-tagline__word.is-on { color: var(--navy); }
.ds-tagline__line:first-child .ds-tagline__word.is-on { color: var(--purple); }
.ds-tagline__cody { width: min(300px, 80%); aspect-ratio: 9 / 10; margin-inline: auto; }

/* Cody walk-in (js/cody.js + js/cody-3d.js): once per visit he walks across the bottom to his spot. */
.cody { --walk-from: calc(-100vw + 140px); }
html[dir="rtl"] .cody { --walk-from: calc(100vw - 140px); }
.cody.is-offstage { visibility: hidden; }
.cody.is-walking .cody__bubble { display: none; }
.cody.is-walking .cody__btn { animation: cody-walk 2.4s cubic-bezier(.33, .1, .4, 1) both; }
.cody.is-walking .cody__btn:not(:has(.is-3d)) img { animation: cody-step .32s ease-in-out infinite alternate; }
@keyframes cody-walk { from { transform: translateX(var(--walk-from)); } to { transform: none; } }
@keyframes cody-step { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-6px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .cody.is-offstage { visibility: visible; } }
