/* =========================================================================
   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: 800; 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: 800 .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: 800 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: 800; 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: 800 .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: 800 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: 800 .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: 800 .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: 800 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: clamp(32px, 6vw, 72px) 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: 800 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: 800 .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: 800 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: 800 2.6rem/1 var(--font-head); color: var(--navy); }
.ds-price__amount span { font-weight: 800; 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: 800 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: 800 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: 800; }
.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: 800 .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: 800 .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: 800 .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: 800 .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: 800 .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; }
}
