/* =====================================================================
   Duobot design system
   Layout: one centred 1120px column, full-bleed colour bands between
   sections, chunky 3D controls. Everything below reads from these tokens.
   ===================================================================== */

:root {
  /* neutrals */
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --line: #e5e5e5;
  --line-strong: #d7d7d7;
  --ink: #4b4b4b;
  --ink-strong: #3c3c3c;
  --muted: #777777;
  --faint: #afafaf;

  /* brand */
  --green: #58cc02;
  --green-depth: #58a700;
  --green-ink: #3c8700;
  --green-soft: #d7ffb8;
  --green-band: #58a700;
  --lime: #89e219;
  --blue: #1cb0f6;
  --blue-depth: #1899d6;
  --blue-ink: #0f86c2;
  --blue-soft: #ddf4ff;
  --gold: #ffc800;
  --gold-depth: #e5a000;
  --gold-ink: #a86d00;
  --gold-soft: #fff5d3;
  --orange: #ff9600;
  --orange-depth: #e08100;
  --red: #ff4b4b;
  --red-depth: #ea2b2b;
  --red-ink: #d81f1f;
  --red-soft: #ffdfe0;
  --purple: #ce82ff;
  --purple-depth: #a568cc;
  --purple-soft: #f4e6ff;

  /* fixed dark surfaces used by the footer, titan band and bot panel */
  --night: #131f24;
  --night-2: #1b2b31;
  --night-3: #202f36;
  --night-line: #37464f;
  --night-ink: #f1f7fb;
  --night-muted: #9fb2bb;

  --on-accent: #ffffff;
  --btn-ghost-bg: #ffffff;
  --shadow-soft: 0 18px 40px -22px rgba(19, 31, 36, .35);
  --focus: #1cb0f6;

  /* type */
  --font-display: "Fredoka", "Nunito", "M PLUS Rounded 1c", "Segoe UI", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Nunito", "M PLUS Rounded 1c", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  --fs-display: clamp(2.6rem, 1.6rem + 4.4vw, 4.6rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.4vw, 3.1rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  --fs-lead: clamp(1.1rem, 1rem + .4vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-label: .8125rem;

  /* shape and space */
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(72px, 9vw, 120px);
  --header-h: 72px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131f24;
    --bg-alt: #0f191d;
    --surface: #1b2b31;
    --surface-2: #202f36;
    --line: #37464f;
    --line-strong: #46575f;
    --ink: #e3ecf0;
    --ink-strong: #f1f7fb;
    --muted: #9fb2bb;
    --faint: #6c818a;
    --green: #93d333;
    --green-depth: #79b933;
    --green-ink: #a5ed6e;
    --green-soft: #22371a;
    --green-band: #2f5a12;
    --blue: #49c0f8;
    --blue-depth: #1899d6;
    --blue-ink: #6dd0ff;
    --blue-soft: #10303f;
    --gold-ink: #ffd84d;
    --gold-soft: #3a3110;
    --red-ink: #ff7a7a;
    --red-soft: #3d1a1c;
    --purple-soft: #2e2140;
    --on-accent: #131f24;
    --btn-ghost-bg: #131f24;
    --shadow-soft: 0 18px 40px -22px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131f24;
  --bg-alt: #0f191d;
  --surface: #1b2b31;
  --surface-2: #202f36;
  --line: #37464f;
  --line-strong: #46575f;
  --ink: #e3ecf0;
  --ink-strong: #f1f7fb;
  --muted: #9fb2bb;
  --faint: #6c818a;
  --green: #93d333;
  --green-depth: #79b933;
  --green-ink: #a5ed6e;
  --green-soft: #22371a;
  --green-band: #2f5a12;
  --blue: #49c0f8;
  --blue-depth: #1899d6;
  --blue-ink: #6dd0ff;
  --blue-soft: #10303f;
  --gold-ink: #ffd84d;
  --gold-soft: #3a3110;
  --red-ink: #ff7a7a;
  --red-soft: #3d1a1c;
  --purple-soft: #2e2140;
  --on-accent: #131f24;
  --btn-ghost-bg: #131f24;
  --shadow-soft: 0 18px 40px -22px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ------------------------------ base -------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 800; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

a { color: var(--blue-ink); font-weight: 800; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--green); color: #fff; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink-strong);
  color: var(--bg);
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: calc(760px + var(--gutter) * 2); }

.section { padding-block: var(--section); position: relative; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: calc(var(--section) * .6); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--green-ink);
  font-size: var(--fs-label);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow--blue { color: var(--blue-ink); }
.eyebrow--gold { color: var(--gold-ink); }
.eyebrow--purple { color: var(--purple); }

.lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.5; max-width: 62ch; }

.section-head { display: grid; gap: 16px; max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

.hl { color: var(--green); }
.hl-blue { color: var(--blue); }
.hl-gold { color: var(--gold); }

/* squiggle underline drawn on reveal */
.squiggle { position: relative; white-space: nowrap; }
.squiggle svg {
  position: absolute;
  left: -2%;
  bottom: -.22em;
  width: 104%;
  height: .38em;
  overflow: visible;
}
.squiggle path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 0;
}
.js .squiggle path { stroke-dashoffset: 400; transition: stroke-dashoffset 1.1s .35s var(--ease-out); }
.js .is-in .squiggle path, .js .squiggle.is-in path { stroke-dashoffset: 0; }

/* ----------------------------- buttons ------------------------------ */

.btn {
  --b-bg: var(--green);
  --b-depth: var(--green-depth);
  --b-fg: var(--on-accent);
  --b-border: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px 0;
  border: 2px solid var(--b-border);
  border-radius: var(--r);
  background: var(--b-bg);
  color: var(--b-fg);
  box-shadow: 0 4px 0 var(--b-depth);
  font: 800 .9375rem/1 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, translate .18s var(--ease-out), box-shadow .12s ease, filter .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); translate: 0 -2px; box-shadow: 0 6px 0 var(--b-depth); }
.btn:active, .btn.is-pressed {
  transform: translateY(4px);
  translate: 0 0;
  box-shadow: 0 0 0 var(--b-depth);
}
.btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
@media (max-width: 600px) {
  .btn { white-space: normal; text-align: center; line-height: 1.2; padding-top: 12px; padding-bottom: 12px; max-width: 100%; }
}
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
:lang(ja) :is(h1, h2, h3, .lead, .btn), :lang(zh) :is(h1, h2, h3), :lang(ko) :is(h1, h2, h3) { word-break: auto-phrase; }
:lang(ko) :is(h1, h2, h3, p) { word-break: keep-all; }
.nav a.btn, .nav a.btn:hover { color: var(--b-fg); background: var(--b-bg); letter-spacing: .08em; }
.btn--blue { --b-bg: var(--blue); --b-depth: var(--blue-depth); }
.btn--gold { --b-bg: var(--gold); --b-depth: var(--gold-depth); --b-fg: #4b3400; }
.btn--red { --b-bg: var(--red); --b-depth: var(--red-depth); --b-fg: #fff; }
.btn--purple { --b-bg: var(--purple); --b-depth: var(--purple-depth); --b-fg: #fff; }
.btn--ghost {
  --b-bg: var(--btn-ghost-bg);
  --b-depth: var(--line);
  --b-fg: var(--blue-ink);
  --b-border: var(--line);
}
.btn--ghost:hover { filter: none; background: var(--surface-2); --b-depth: var(--line-strong); }
.btn--white { --b-bg: #ffffff; --b-depth: rgba(0, 0, 0, .18); --b-fg: var(--green-depth); }
.btn--lg { min-height: 58px; padding-inline: 32px; font-size: 1rem; border-radius: 18px; }
.btn--sm { min-height: 40px; padding-inline: 16px; font-size: .8125rem; border-radius: var(--r-sm); box-shadow: 0 3px 0 var(--b-depth); }
.btn--sm:hover { box-shadow: 0 5px 0 var(--b-depth); }
.btn--sm:active { transform: translateY(3px); }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled {
  --b-bg: var(--line);
  --b-depth: var(--line-strong);
  --b-fg: var(--faint);
  cursor: not-allowed;
  filter: none;
}

/* shine sweep on primary CTAs */
.btn--shine { overflow: hidden; isolation: isolate; }
.btn--shine::after {
  content: "";
  position: absolute;
  inset: -2px auto -2px -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  z-index: -1;
  animation: shine 4.5s 1.5s ease-in-out infinite;
}
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn-row--center { justify-content: center; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .875rem;
}
.text-link svg { width: 16px; height: 16px; transition: transform .2s var(--ease-out); }
.text-link:hover { text-decoration: none; }
.text-link:hover svg { transform: translateX(4px); }

/* ------------------------------ header ------------------------------ */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 2px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -24px rgba(0, 0, 0, .5); }
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand img { height: 30px; width: auto; }
.brand .brand-head { height: 38px; transition: transform .4s var(--ease-spring); }
.brand:hover .brand-head { transform: rotate(-10deg) scale(1.08); }
.brand-logo--dark { display: none; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.nav a:hover { color: var(--ink-strong); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--blue-ink); background: var(--blue-soft); }
.header-cta { margin-left: 8px; white-space: nowrap; }
@media (min-width: 921px) and (max-width: 1240px) {
  .site-header .wrap { gap: 14px; }
  .nav a { padding: 10px 9px; letter-spacing: .06em; }
  .site-header .lang-btn [data-lang-name] { display: none; }
}
/* snug header: first step when translated labels are long */
.site-header.is-snug .wrap { gap: 12px; }
.site-header.is-snug .nav { gap: 2px; }
.site-header.is-snug .nav a { padding: 10px 8px; letter-spacing: .03em; }
.site-header.is-snug .lang-btn [data-lang-name] { display: none; }
.site-header.is-snug .header-cta { padding-left: 14px; padding-right: 14px; letter-spacing: .04em; }
/* collapsed header: used by JS when translated labels do not fit on one row */
.site-header.is-tight .menu-btn { display: block; margin-left: 0; order: 5; }
.site-header.is-tight .header-cta { display: none; }
.site-header.is-tight .lang-btn { margin-left: auto; margin-right: 8px; }
.site-header.is-tight .nav {
  position: fixed;
  inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
  flex-direction: column; align-items: stretch; gap: 6px;
  padding: 16px var(--gutter) 24px;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 30px 40px -30px rgba(0, 0, 0, .4);
  transform: translateY(-12px); opacity: 0; visibility: hidden;
  transition: transform .25s var(--ease-out), opacity .2s ease, visibility 0s .25s;
}
.site-header.is-tight .nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.site-header.is-tight .nav a { padding: 14px 16px; font-size: .9375rem; border: 2px solid var(--line); }
.site-header.is-tight .nav .btn { display: inline-flex; margin-top: 8px; }

.menu-btn {
  display: none;
  margin-left: auto;
  width: 46px; height: 46px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: 0 3px 0 var(--line);
  color: var(--ink-strong);
  cursor: pointer;
}
.menu-btn span { display: block; width: 20px; height: 3px; margin: 4px auto; border-radius: 2px; background: currentColor; transition: transform .25s var(--ease-out), opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hook Sidebar, adapted from Rare UI; licence in assets/licenses. */
.hook-sidebar { --sidebar-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(80px, 12vh, 144px)); position: fixed; z-index: 45; top: var(--sidebar-top); left: max(8px, calc((100% - var(--wrap)) / 2 - 280px), env(safe-area-inset-left, 0px)); width: 128px; }
.hook-sidebar[hidden] { display: none; }
.hook-sidebar__toggle { display: none; }
.hook-sidebar__panel { max-height: calc(100svh - var(--sidebar-top) - 24px); overflow-y: auto; scrollbar-width: none; }
.hook-sidebar__list { position: relative; display: flex; flex-direction: column; gap: 2px; }
.hook-sidebar__link { position: relative; display: flex; align-items: center; min-height: 34px; padding: 6px 6px 6px 20px; border-radius: 8px; color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1.4; white-space: nowrap; transition: color .18s ease; }
.hook-sidebar__link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hook-sidebar__link:hover { color: var(--ink-strong); text-decoration: none; }
.hook-sidebar__link[aria-current] { color: var(--ink-strong); font-weight: 900; }
.hook-sidebar__rail { position: absolute; inset: 0; pointer-events: none; color: var(--green); }
.hook-sidebar__rail > span { position: absolute; left: 2px; top: var(--rail-from, 0px); width: 1px; height: max(0px, calc(var(--rail-y, 17px) - 6px - var(--rail-from, 0px))); background: repeating-linear-gradient(to top, transparent 0 2px, currentColor 2px 4px); transition: top .24s var(--ease-out), height .24s var(--ease-out); }
.hook-sidebar__rail > svg { position: absolute; left: 2px; top: calc(var(--rail-y, 17px) - 6px); width: 12px; height: 7px; overflow: visible; transition: top .24s var(--ease-out); }
.hook-sidebar__rail--hover { opacity: 0; color: color-mix(in srgb, var(--green) 40%, transparent); transition: opacity .16s ease; }
.hook-sidebar.is-previewing .hook-sidebar__rail--hover { opacity: 1; }
.hook-sidebar:has(:focus-visible) .hook-sidebar__rail > * { transition: none; }
@media (min-width: 1600px) { .hook-sidebar { width: 180px; } }
@media (min-width: 921px) and (max-width: 1439px) {
  .hook-sidebar { left: 2px; width: 26px; }
  .hook-sidebar__link span { opacity: 0; }
  .hook-sidebar:hover, .hook-sidebar:focus-within { width: 164px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-soft); }
  .hook-sidebar:hover .hook-sidebar__link span, .hook-sidebar:focus-within .hook-sidebar__link span { opacity: 1; }
}
@media (max-width: 920px) {
  .hook-sidebar { top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 4px); left: env(safe-area-inset-left, 0px); width: 44px; }
  .hook-sidebar__toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 10px; background: var(--surface); color: var(--green); cursor: pointer; }
  .hook-sidebar__toggle svg { width: 22px; height: 22px; }
  .hook-sidebar__panel { display: none; max-height: calc(100svh - var(--header-h) - 76px); margin: 4px 0 0 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-soft); }
  .hook-sidebar.is-open { width: min(240px, calc(100vw - 16px)); }
  .hook-sidebar.is-open .hook-sidebar__panel { display: block; }
  .hook-sidebar__link { min-height: 44px; }
}

@media (max-width: 920px) {
  .menu-btn { display: block; }
  .header-cta { display: none; }
  .nav {
    position: fixed;
    inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 2px solid var(--line);
    box-shadow: 0 30px 40px -30px rgba(0, 0, 0, .4);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s var(--ease-out), opacity .2s ease, visibility 0s .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav a { padding: 14px 16px; font-size: .9375rem; border: 2px solid var(--line); }
  .nav .btn { margin-top: 8px; }
}
@media (min-width: 921px) { .nav .btn { display: none; } }

/* ------------------------------ cards ------------------------------- */

.card {
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  border-radius: var(--r-lg);
  background: var(--surface);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); }
.card--hover { transition: transform .25s var(--ease-out), border-color .2s ease; }
.card--hover:hover { transform: translateY(-4px); border-color: var(--line-strong); }

.icon-tile {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--tile, var(--green-soft));
}
.icon-tile svg { width: 40px; height: 40px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 2px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill--green { background: var(--green-soft); border-color: transparent; color: var(--green-ink); }
.pill--gold { background: var(--gold-soft); border-color: transparent; color: var(--gold-ink); }
.pill--blue { background: var(--blue-soft); border-color: transparent; color: var(--blue-ink); }
.pill--purple { background: var(--purple-soft); border-color: transparent; color: var(--purple); }

kbd, .kbd {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-strong);
  font: 800 .8125rem/1 var(--font-body);
  white-space: nowrap;
}

/* ------------------------------- grids ------------------------------ */

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split > * { min-width: 0; }
.split--flip > :first-child { order: 2; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split--flip > :first-child { order: 0; }
}

/* ------------------------------- hero ------------------------------- */

.hero { position: relative; padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 96px); overflow: clip; }
.hero .split { grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 26px; color: var(--muted); font-size: var(--fs-small); font-weight: 800; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 18px; height: 18px; color: var(--green); }
@media (max-width: 880px) {
  .hero .split { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-copy .btn-row, .hero-meta { justify-content: center; }
}

/* floating blobs behind hero */
.blob {
  position: absolute;
  border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%;
  filter: blur(2px);
  opacity: .55;
  pointer-events: none;
  z-index: -1;
}

/* ------------------------------- 3D bot ----------------------------- */

.bot-stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}
.bot-stage__floor {
  position: absolute;
  left: 18%; right: 18%; bottom: 5%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(19, 31, 36, .18), transparent);
  animation: floor 3.6s ease-in-out infinite;
}
@keyframes floor { 50% { transform: scaleX(.86); opacity: .7; } }
.bot-stage__fallback {
  position: absolute;
  inset: 8% 10% 12%;
  width: 80%;
  height: 80%;
  object-fit: contain;
  animation: bob 3.6s ease-in-out infinite;
  transition: opacity .5s ease;
}
@keyframes bob { 50% { transform: translateY(-14px); } }
.bot-stage canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  transition: opacity .6s ease;
  cursor: grab;
  touch-action: pan-y;
}
.bot-stage.is-3d canvas { opacity: 1; animation: botIn .7s var(--ease-spring); }
@keyframes botIn { from { opacity: 0; transform: translateY(24px) scale(.94); } }
.bot-stage.is-flat .bot-stage__fallback { animation: botIn .5s var(--ease-out); }
.bot-stage__ring {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 3px dashed color-mix(in srgb, var(--green) 35%, transparent);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.bubble {
  position: absolute;
  z-index: 2;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink-strong);
  font-weight: 800;
  font-size: .95rem;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}
.bubble::after {
  content: "";
  position: absolute;
  bottom: -11px; left: 28px;
  width: 16px; height: 16px;
  background: var(--surface);
  border-right: 2px solid var(--line);
  border-bottom: 4px solid var(--line);
  transform: rotate(45deg) skew(8deg, 8deg);
  border-bottom-right-radius: 4px;
}
.bubble--right::after { left: auto; right: 28px; }
.bubble .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--green); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.float-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  font-weight: 900;
  font-size: .85rem;
  color: var(--ink-strong);
  box-shadow: var(--shadow-soft);
  animation: drift 5s ease-in-out infinite;
}
.float-chip svg { width: 28px; height: 28px; }
@keyframes drift { 50% { transform: translateY(-10px) rotate(-2deg); } }

/* ------------------------------ marquee ----------------------------- */

.marquee-wrap { overflow: hidden; padding-block: 16px; }

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 22px;
  background: var(--green);
  color: #fff;
  transform: rotate(-1.4deg) scale(1.02);
  border-block: 4px solid var(--green-depth);
}
.marquee__track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span {
  display: inline-flex;
  align-items: center;
  gap: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem);
  white-space: nowrap;
  color: #fff;
}
.marquee span::after {
  content: "";
  width: 14px; height: 14px;
  border-radius: 4px;
  background: #fff;
  opacity: .55;
  transform: rotate(45deg);
}
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee span { color: var(--on-accent); }
.marquee span::after { background: currentColor; }

/* ----------------------------- features ----------------------------- */

.feature-card { display: flex; flex-direction: column; }
.feature-card .pill { align-self: flex-start; margin-top: auto; }
.feature-card p { margin-bottom: 18px; }

/* bento */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.bento > * { min-width: 0; }
.bento .span-2 { grid-column: span 2; }
.bento .span-3 { grid-column: span 3; }
.bento .span-4 { grid-column: span 4; }
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento .span-2, .bento .span-3 { grid-column: span 1; }
  .bento .span-4 { grid-column: span 2; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .bento .span-2, .bento .span-3, .bento .span-4 { grid-column: auto; }
}

/* ---------------------------- path (how) ---------------------------- */

.path {
  position: relative;
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  max-width: 820px;
  margin-inline: auto;
  --p: 0;
}
.path__line {
  position: absolute;
  left: 50%;
  top: 40px; bottom: 40px;
  width: 10px;
  margin-left: -5px;
  border-radius: 10px;
  background: var(--line);
  overflow: hidden;
}
.path__line i {
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(var(--p) * 100%);
  background: var(--green);
  border-radius: 10px;
}
.path-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  gap: 28px;
  align-items: center;
}
.path-step > * { min-width: 0; }
.path-step__copy { grid-column: 1; text-align: right; }
.path-step:nth-child(odd of .path-step) .path-step__copy { grid-column: 3; text-align: left; grid-row: 1; }
.path-step__node { grid-column: 2; grid-row: 1; justify-self: center; }
.path-step__copy h3 { margin-bottom: 6px; }
.path-step__copy p { color: var(--muted); }
.path-step__copy .pill { margin-bottom: 10px; }

.node {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px; height: 78px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 8px 0 var(--line-strong);
  color: var(--faint);
  transition: background-color .35s ease, box-shadow .35s ease, transform .5s var(--ease-spring), color .3s;
}
.node svg { width: 38px; height: 38px; }
.node.is-lit {
  background: var(--green);
  box-shadow: 0 8px 0 var(--green-depth);
  color: #fff;
  transform: scale(1.06);
}
.node.is-lit::before {
  content: "";
  position: absolute;
  /* a true circle around the node and its 8px depth edge */
  left: 50%; top: 43px;
  width: 110px; height: 110px;
  translate: -50% -50%;
  box-sizing: border-box;
  pointer-events: none;
  border-radius: 50%;
  border: 6px solid color-mix(in srgb, var(--green) 30%, transparent);
  animation: ping 1.8s ease-out 1;
}
@keyframes ping { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.node--gold.is-lit { background: var(--gold); box-shadow: 0 8px 0 var(--gold-depth); color: #fff; }
.node--gold.is-lit::before { border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
@media (max-width: 680px) {
  .path__line { left: 42px; }
  .path-step { grid-template-columns: 84px 1fr; gap: 20px; }
  .path-step__copy, .path-step:nth-child(odd of .path-step) .path-step__copy { grid-column: 2; grid-row: 1; text-align: left; }
  .path-step__node { grid-column: 1; }
}

/* ------------------------- dark band (titan) ------------------------ */

.band-night {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(255, 200, 0, .12), transparent 60%),
    radial-gradient(50rem 30rem at 0% 110%, rgba(255, 200, 0, .14), transparent 60%),
    var(--night);
  color: var(--night-muted);
  overflow: hidden;
}
.band-night h2, .band-night h3 { color: var(--night-ink); }
.band-night .lead { color: var(--night-muted); }
.band-night .card { background: var(--night-2); border-color: var(--night-line); }
.band-night .card p { color: var(--night-muted); }
.band-night .eyebrow { color: var(--gold); }

.titan-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 36px 8px 28px;
}
.titan-track::before {
  content: "";
  position: absolute;
  left: 40px; right: 40px; top: 50%;
  height: 8px;
  margin-top: -4px;
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, var(--night-line) 0 14px, transparent 14px 26px);
}
.titan-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(54px, 9vw, 76px);
  aspect-ratio: 1.08;
  border-radius: 50%;
  background: var(--night-3);
  box-shadow: 0 7px 0 #0b1316;
  color: var(--night-muted);
  transition: background-color .3s, box-shadow .3s, transform .4s var(--ease-spring);
}
.titan-node svg { width: 46%; height: 46%; }
.titan-node.is-done { background: linear-gradient(160deg, #d58cff, #9a4fd6); box-shadow: 0 7px 0 #6f2fa6; color: #fff; }
.titan-node.is-active { background: linear-gradient(160deg, #ffd84d, #ffae00); box-shadow: 0 7px 0 #c98600; color: #5a3b00; transform: scale(1.14); }
.titan-node .titan-tag {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 6px);
  padding: 5px 9px;
  border-radius: 10px;
  background: var(--gold);
  color: #4b3400;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .06em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s ease, transform .35s var(--ease-spring);
}
.titan-node.is-active .titan-tag { opacity: 1; transform: translate(-50%, 0); }
.titan-cursor {
  position: absolute;
  top: 50%;
  left: 0;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  z-index: 2;
  transition: left .7s var(--ease-out);
  pointer-events: none;
}

/* ------------------------------ pricing ----------------------------- */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
  max-width: 940px;
  margin-inline: auto;
  align-items: stretch;
}
.plans > * { min-width: 0; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(26px, 4vw, 40px);
  border: 2px solid var(--line);
  border-bottom-width: 6px;
  border-radius: var(--r-xl);
  background: var(--surface);
}
.plan--max {
  position: relative;
  border-color: var(--green);
  border-bottom-color: var(--green-depth);
  background:
    radial-gradient(30rem 16rem at 100% 0%, color-mix(in srgb, var(--green) 14%, transparent), transparent 70%),
    var(--surface);
}
.plan__ribbon {
  position: absolute;
  top: -16px; right: 28px;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--gold);
  box-shadow: 0 3px 0 var(--gold-depth);
  color: #4b3400;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  animation: wiggle 3.5s ease-in-out infinite;
}
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(-5deg); } 96% { transform: rotate(4deg); } }
.plan__name { display: flex; align-items: center; gap: 12px; }
.plan__name img { height: 28px; width: auto; }
.plan__name h3 { font-size: 1.6rem; }
.plan__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.plan__price strong {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem);
  line-height: 1;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}
.plan__price span { color: var(--muted); font-weight: 800; }
.plan__note { color: var(--muted); font-size: var(--fs-small); }
.plan ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.plan li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-weight: 700; color: var(--ink); }
.plan li svg { width: 26px; height: 26px; }
.plan li.is-off { color: var(--faint); }
.plan .btn { margin-top: auto; }

/* comparison table */
.table-wrap { overflow-x: auto; border: 2px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--fs-small); }
.compare th, .compare td { padding: 16px 20px; text-align: left; border-bottom: 2px solid var(--line); vertical-align: middle; }
.compare thead th { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-strong); background: var(--surface-2); }
.compare tbody th { font-weight: 800; color: var(--ink-strong); }
.compare tbody th small { display: block; font-weight: 600; color: var(--muted); }
.compare td { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.compare td:nth-child(3) { background: color-mix(in srgb, var(--green) 7%, transparent); }
.compare tr:last-child > * { border-bottom: 0; }
.compare--plain td:nth-child(3) { background: none; font-weight: 700; color: var(--muted); }
.compare .yes, .compare .no { width: 26px; height: 26px; display: inline-block; vertical-align: middle; }
.compare .group th { padding-block: 12px; background: var(--bg-alt); color: var(--muted); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 900; }

/* ------------------------------ faq --------------------------------- */

.faq { display: grid; gap: 14px; }
.faq details {
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .2s ease;
}
.faq details.is-open { border-color: var(--blue); border-bottom-color: var(--blue-depth); }
.faq summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  color: var(--ink-strong);
  font-weight: 800;
  font-size: 1.06rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 30px; height: 30px;
  margin-left: auto;
  border-radius: 10px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 3px no-repeat,
    linear-gradient(currentColor, currentColor) center / 3px 14px no-repeat,
    var(--surface-2);
  color: var(--blue);
  transition: transform .3s var(--ease-spring);
}
.faq details.is-open summary::after { transform: rotate(135deg); }
.faq .faq__body { transition: opacity .3s ease; }
.faq details:not(.is-open) .faq__body { opacity: 0; }
.faq .faq__body { padding: 0 22px 22px; color: var(--muted); }
.faq .faq__body p + p { margin-top: .8em; }
.faq .faq__body ul { margin: .6em 0 0; padding-left: 1.2em; }

.faq-search {
  position: relative;
  max-width: 560px;
  margin: 0 auto 28px;
}
.faq-search input {
  width: 100%;
  min-height: 58px;
  padding: 0 20px 0 54px;
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink-strong);
  font: 700 1.05rem var(--font-body);
}
.faq-search input:focus { outline: none; border-color: var(--blue); }
.faq-search svg { position: absolute; left: 18px; top: 17px; width: 22px; height: 22px; color: var(--faint); }
.faq-empty { text-align: center; color: var(--muted); padding: 24px; }

/* ------------------------------ CTA band ---------------------------- */

.band-green {
  position: relative;
  overflow: hidden;
  background: var(--green-band);
  color: #fff;
  text-align: center;
}
.band-green h2 { color: #fff; font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.8rem); }
.band-green p { color: #fff; font-weight: 800; font-size: 1.2rem; }
.band-green .peek {
  width: clamp(160px, 22vw, 240px);
  margin: 0 auto 8px;
  transform-origin: 50% 100%;
}
.band-green .peek img { animation: peek 4s ease-in-out infinite; }
@keyframes peek { 0%, 100% { transform: translateY(10px) rotate(0); } 40% { transform: translateY(0) rotate(-6deg); } 60% { transform: translateY(0) rotate(6deg); } }
.band-green .confetti-dots span {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 4px;
  opacity: .9;
  animation: fall linear infinite;
}
@keyframes fall { from { transform: translateY(-40px) rotate(0); } to { transform: translateY(560px) rotate(540deg); } }

/* ------------------------------ footer ------------------------------ */

.site-footer {
  background: var(--night);
  color: var(--night-muted);
  padding-block: 72px 40px;
  font-size: var(--fs-small);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 36px;
}
.footer-grid > * { min-width: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
.footer-brand img { height: 34px; width: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 34ch; }
.site-footer h4 {
  margin-bottom: 14px;
  color: var(--night-ink);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.site-footer ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--night-muted); font-weight: 700; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
  align-items: center;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 2px solid var(--night-line);
}
.disclaimer { max-width: 70ch; font-size: .8125rem; line-height: 1.55; }
.theme-switch {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  background: var(--night-2);
  border: 2px solid var(--night-line);
}
.theme-switch button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--night-muted);
  font: 800 .75rem var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.theme-switch button[aria-pressed="true"] { background: var(--night-3); color: #fff; box-shadow: 0 2px 0 #0b1316; }

/* ---------------------------- doc pages ----------------------------- */

.page-hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 88px) clamp(36px, 5vw, 56px);
  background: var(--bg-alt);
  border-bottom: 2px solid var(--line);
  overflow: hidden;
}
.page-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.page-hero h1 { font-size: clamp(2.3rem, 1.5rem + 3vw, 3.6rem); margin-bottom: 14px; }
.page-hero img.page-hero__bot { width: clamp(120px, 16vw, 190px); animation: bob 3.6s ease-in-out infinite; }
@media (max-width: 640px) { .page-hero .wrap { grid-template-columns: 1fr; } .page-hero img.page-hero__bot { display: none; } }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.doc {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } .toc { display: none; } }
.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  display: grid;
  gap: 2px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.toc strong { display: block; margin: 0 0 8px 10px; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 900; }
.toc a {
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.3;
}
.toc a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink-strong); }
.toc a.is-active { background: var(--green-soft); color: var(--green-ink); }

.prose { max-width: 70ch; }
.prose > section { padding-block: 8px 28px; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose > section + section { border-top: 2px solid var(--line); padding-top: 32px; }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); margin-bottom: 14px; display: flex; gap: 12px; align-items: baseline; }
.prose h2 .num { color: var(--green); font-variant-numeric: tabular-nums; }
.prose h3 { font-size: 1.15rem; margin: 22px 0 8px; font-family: var(--font-body); font-weight: 900; }
.prose p, .prose li { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 12px 0; display: grid; gap: 8px; }
.prose strong { color: var(--ink-strong); font-weight: 900; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink-strong); font-weight: 900; }

.callout {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 22px;
  margin: 18px 0;
  border-radius: var(--r-lg);
  background: var(--blue-soft);
  border: 2px solid color-mix(in srgb, var(--blue) 40%, transparent);
}
.callout svg { width: 44px; height: 44px; }
.callout p { color: var(--ink); }
.callout--gold { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.callout--red { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.callout--green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 45%, transparent); }

.summary-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 40px; }
@media (max-width: 760px) { .summary-tiles { grid-template-columns: 1fr; } }
.summary-tile { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; padding: 18px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: var(--r-lg); background: var(--surface); }
.summary-tile svg { width: 48px; height: 48px; }
.summary-tile strong { display: block; color: var(--ink-strong); font-weight: 900; line-height: 1.25; }
.summary-tile span { color: var(--muted); font-size: .9rem; line-height: 1.35; display: block; }

/* ----------------------------- steps -------------------------------- */

.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  padding: 24px;
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  border-radius: var(--r-lg);
  background: var(--surface);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 56px; height: 52px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 5px 0 var(--green-depth);
  color: #fff;
  font: 700 1.6rem var(--font-display);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); }
.step .step__extra { margin-top: 14px; }

/* ----------------------- status pages (thanks, 404) ----------------- */

.status-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: clamp(48px, 8vw, 100px);
}
.status-page .wrap { display: grid; justify-items: center; gap: 18px; max-width: 720px; }
.status-page .lead { margin-inline: auto; }
.status-page .big-mascot { width: clamp(180px, 28vw, 280px); }
.checkout {
  --checkout-space: clamp(40px, 5vw, 72px);
  min-height: 0;
  padding-block: var(--checkout-space) calc(var(--checkout-space) + var(--sec-r));
}
.checkout .wrap { gap: 0; }
.checkout__badge { width: 102px; height: auto; margin-block: 18px 16px; }
.checkout__actions { display: grid; justify-items: center; gap: 10px; width: 100%; margin-top: 24px; }
.checkout__actions p, .checkout__details p { margin: 0; }
.checkout [data-checkout-status] { max-width: 54ch; font-size: .9375rem; }
.checkout [data-checkout-status]:empty { display: none; }
.checkout [data-checkout-signin] svg { width: 22px; height: 22px; }
.checkout__actions .text-link { min-height: 44px; }
.checkout__details { display: grid; justify-items: center; gap: 8px; margin-top: 20px; color: var(--muted); }
.checkout__account { max-width: 62ch; font-size: 1rem; line-height: 1.6; }
.checkout__payment { font-size: .75rem; line-height: 1.6; }
@media (max-width: 380px) {
  body:has(.checkout) .site-header .wrap { gap: 10px; }
  body:has(.checkout) .brand { gap: 6px; }
  body:has(.checkout) .brand img { height: 24px; }
  body:has(.checkout) .brand .brand-head { height: 32px; }
}
.status-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 3rem + 10vw, 10rem);
  line-height: .9;
  color: var(--line-strong);
  letter-spacing: -.02em;
}

/* -------------------------- contact cards --------------------------- */

.copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 16px;
  background: var(--surface-2);
}
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 800 1rem var(--font-body); color: var(--ink-strong); user-select: all; }

/* ----------------------------- toast -------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--ink-strong);
  color: var(--bg);
  font-weight: 800;
  transform: translate(-50%, 140%);
  transition: transform .35s var(--ease-spring);
  pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); }

/* confetti canvas */
.confetti-canvas { position: fixed; inset: 0; z-index: 95; pointer-events: none; width: 100%; height: 100%; }

/* ------------------------- reveal on scroll ------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal="pop"] { transform: scale(.86); transition-timing-function: var(--ease-out), var(--ease-spring); }
.js [data-reveal="left"] { transform: translateX(-40px); }
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

[data-tilt] { transform-style: preserve-3d; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}

/* ------------------------------ utility ----------------------------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 24px; }
.mt-l { margin-top: 48px; }
.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }


/* =====================================================================
   Extension controls, site-wide. The extension's own stylesheet
   (assets/ext/ui/DuobotUI.css) is loaded on every page; these are the
   variables its switches and sliders read when they sit outside the panel.
   ===================================================================== */
:root {
  --db-text: #f2f6f8;
  --db-muted: #9fb0b9;
  --db-surface: #232f36;
  --db-surface-2: #2c3941;
  --db-input: #141d22;
  --db-line: rgba(255, 255, 255, 0.08);
  --db-switch-off: #37464f;
  --db-knob: #232f36;
  --db-green: #58cc02;
  --db-blue: #1cb0f6;
  --db-gold: #ffc800;
  --db-red: #ff4b4b;
  --db-thumb: 20px;
}

/* the panel as a full-width surface inside the page */
.db-root.db-embed { width: 100%; max-width: none; }
.ext-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, #1f2c33, #141e23);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #f2f6f8;
  box-shadow: 0 30px 60px -30px rgba(10, 20, 24, .7), inset 0 1px 0 rgba(255, 255, 255, .12);
  font-family: "din-round", "Nunito", ui-rounded, system-ui, sans-serif;
  color-scheme: dark;
}
.ext-card .ext-card__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 700 1.15rem var(--font-display); color: #fff; }
.ext-card .ext-card__note { font-size: .82rem; color: #9fb0b9; font-weight: 700; }
.panel-host { display: flex; justify-content: center; }
.panel-host .db-root { box-shadow: 0 40px 80px -30px rgba(10, 20, 24, .65), inset 0 1px .5px rgba(255,255,255,.5); }

/* =====================================================================
   Background life: soft colour pools and a few drifting shapes per section
   ===================================================================== */
main > section, main > .marquee-wrap + section { position: relative; isolation: isolate; overflow-x: clip; }
main > section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(28rem 20rem at var(--g1x, 8%) var(--g1y, 12%), var(--g1, color-mix(in srgb, var(--green) 9%, transparent)), transparent 70%),
    radial-gradient(24rem 18rem at var(--g2x, 94%) var(--g2y, 78%), var(--g2, color-mix(in srgb, var(--blue) 8%, transparent)), transparent 70%);
}
main > section:nth-of-type(3n+1) { --g1x: 92%; --g1y: 8%; --g2x: 4%; --g2y: 88%; --g2: color-mix(in srgb, var(--gold) 10%, transparent); }
main > section:nth-of-type(3n+2) { --g1: color-mix(in srgb, var(--purple) 8%, transparent); --g1x: 16%; --g1y: 30%; }
main > section.band-night::before, main > section.band-green::before { display: none; }
.sprinkles { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sprinkles i {
  position: absolute;
  width: var(--s, 12px);
  height: var(--s, 12px);
  opacity: var(--o, .35);
  animation: sprinkle var(--t, 9s) ease-in-out infinite alternate;
  animation-delay: var(--dl, 0s);
}
.sprinkles i.dot { border-radius: 50%; background: var(--c); }
.sprinkles i.ring { border-radius: 50%; border: 3px solid var(--c); }
.sprinkles i.sq { border-radius: 4px; background: var(--c); transform: rotate(45deg); }
.sprinkles i.plus { background: linear-gradient(var(--c), var(--c)) center / 100% 30% no-repeat, linear-gradient(var(--c), var(--c)) center / 30% 100% no-repeat; border-radius: 2px; }
@keyframes sprinkle { from { translate: 0 0; rotate: 0deg; } to { translate: var(--dx, 10px) var(--dy, -16px); rotate: 40deg; } }
.dotgrid {
  position: absolute;
  z-index: -1;
  width: 180px; height: 140px;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 18%, transparent) 1.6px, transparent 1.8px);
  background-size: 18px 18px;
  mask-image: radial-gradient(closest-side, #000, transparent);
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
}

/* =====================================================================
   Hero with the giant 3D mascot standing on the language band
   ===================================================================== */
.hero--giant {
  padding: 0;
  min-height: clamp(560px, calc(100svh - var(--header-h) - 96px), 900px);
  display: grid;
  overflow-x: clip;
  overflow-y: visible;
}
.hero--giant .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; position: relative; }
.hero--giant .hero-copy { position: relative; z-index: 2; padding-block: clamp(40px, 6vw, 80px); }
@media (min-width: 921px) { .hero--giant .lead, .hero--giant .hero-meta { max-width: min(480px, 100%); } }
.hero--giant .hero-art {
  position: static;
  align-self: stretch;
  min-height: 460px;
}
.hero--giant .wrap { position: static; }
/*
   The canvas covers the whole hero and runs down behind the language band,
   so the bot is only ever cut by the band itself: never by a box edge.
*/
.hero--giant .bot-stage {
  position: absolute;
  inset: calc(-1 * var(--header-h)) 0 -58px 0;
  width: auto;
  max-width: none;
  aspect-ratio: auto;
  z-index: 1;
  --bot-x: .47;
}
.hero--giant .bot-stage__fallback { inset: auto 0 58px auto; right: 6%; width: 46%; height: 88%; object-fit: contain; object-position: bottom; animation: none; }
.hero-glow {
  position: absolute;
  left: 66%; bottom: -20%;
  width: min(820px, 70vw);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--green) 22%, transparent), transparent 72%);
  z-index: 0;
  pointer-events: none;
}
.marquee-wrap { position: relative; z-index: 3; margin-top: -6px; }
@media (max-width: 880px) {
  .hero--giant { min-height: 0; }
  .hero--giant .wrap { grid-template-columns: 1fr; }
  .hero--giant .hero-copy { text-align: center; padding-bottom: 0; }
  .hero--giant .hero-art { position: relative; min-height: 0; height: clamp(360px, 92vw, 520px); }
  .hero--giant .bot-stage { inset: 0 -16px -58px; --bot-x: .5; }
  .hero-glow { left: 50%; }
}

/* page heroes now carry the 3D bot */
.page-hero .page-hero__stage { width: clamp(160px, 20vw, 240px); height: clamp(190px, 24vw, 280px); max-width: none; aspect-ratio: auto; }
.page-hero .page-hero__stage .bot-stage__fallback { inset: 4%; width: 92%; height: 92%; animation: none; }
@media (max-width: 640px) { .page-hero .page-hero__stage { display: none; } }

.band-green .peek3d { width: clamp(180px, 22vw, 240px); height: clamp(200px, 24vw, 260px); margin: -20px auto 0; max-width: none; aspect-ratio: auto; }
.band-green .peek3d .bot-stage__fallback { animation: none; inset: 0; width: 100%; height: 100%; }

/* =====================================================================
   "Everything a lesson needs": live tiles
   ===================================================================== */
.live-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.live-grid > * { min-width: 0; }
.live { position: relative; display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 2.6vw, 30px); border-radius: 28px; overflow: hidden; background: var(--surface); border: 2px solid var(--line); }
.live h3 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.9rem); line-height: 1.05; }
.live p { color: var(--muted); max-width: 40ch; }
.live .live__vis { margin-top: auto; }
.live--7 { grid-column: span 7; }
.live--5 { grid-column: span 5; }
.live--4 { grid-column: span 4; }
.live--6 { grid-column: span 6; }
.live--green { background: var(--green-band); border-color: transparent; }
.live--green h3, .live--green p { color: #fff; }
.live--night { background: var(--night); border-color: var(--night-line); }
.live--night h3 { color: #fff; }
.live--night p { color: var(--night-muted); }
.live--purple { background: linear-gradient(150deg, #3b1f5c, #1d1430); border-color: transparent; }
.live--purple h3 { color: #fff; }
.live--purple p { color: #cdb8e8; }
.live--gold { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
@media (max-width: 960px) { .live--7, .live--5, .live--4, .live--6 { grid-column: span 6; } }
@media (max-width: 640px) { .live--7, .live--5, .live--4, .live--6 { grid-column: span 12; } }

.kcap { display: inline-flex; align-items: center; gap: 6px; font: 800 .8rem var(--font-body); }
.kcap kbd { background: var(--surface-2); }
.live--purple .kcap kbd, .live--night .kcap kbd { background: #2c3941; border-color: #46575f; color: #fff; }

/* vis: auto-solve */
.vis-solve { display: grid; gap: 14px; padding: 18px; border-radius: 20px; background: var(--bg-alt); border: 2px solid var(--line); }
.vis-solve .line { display: flex; gap: 8px; min-height: 48px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.vis-solve .bank { display: flex; gap: 8px; flex-wrap: wrap; }
.vis-solve .t { padding: 8px 14px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px; background: var(--surface); font-weight: 800; color: var(--ink-strong); }
.vis-solve .line .t { animation: tileIn 5s var(--ease-spring) infinite; opacity: 0; }
.vis-solve .line .t:nth-child(2) { animation-delay: .25s; }
.vis-solve .line .t:nth-child(3) { animation-delay: .5s; }
.vis-solve .line .t:nth-child(4) { animation-delay: .75s; }
.vis-solve .bank .t { animation: tileGhost 5s infinite; }
.vis-solve .bank .t:nth-child(2) { animation-delay: .25s; } .vis-solve .bank .t:nth-child(3) { animation-delay: .5s; } .vis-solve .bank .t:nth-child(4) { animation-delay: .75s; }
@keyframes tileIn { 0%, 10% { opacity: 0; transform: translateY(40px) scale(.8); } 18%, 85% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@keyframes tileGhost { 0%, 12% { background: var(--surface); color: var(--ink-strong); } 18%, 88% { background: var(--line); color: transparent; } 96%, 100% { background: var(--surface); color: var(--ink-strong); } }
.vis-solve .chk { justify-self: end; animation: chk 5s infinite; }
@keyframes chk { 0%, 30% { filter: grayscale(1) opacity(.45); } 36%, 88% { filter: none; } 100% { filter: grayscale(1) opacity(.45); } }

/* vis: solve & skip */
.vis-skip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.vis-skip i { height: 16px; border-radius: 99px; background: var(--line); position: relative; overflow: hidden; }
.vis-skip i::after { content: ""; position: absolute; inset: 0; background: var(--blue); transform: scaleX(0); transform-origin: left; animation: seg 6s infinite; }
.vis-skip i:nth-child(2)::after { animation-delay: .9s; } .vis-skip i:nth-child(3)::after { animation-delay: 1.8s; } .vis-skip i:nth-child(4)::after { animation-delay: 2.7s; } .vis-skip i:nth-child(5)::after { animation-delay: 3.6s; }
@keyframes seg { 0% { transform: scaleX(0); } 8%, 70% { transform: scaleX(1); } 80%, 100% { transform: scaleX(0); } }
.vis-skip-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }

/* vis: auto-run mini path */
.vis-run { display: flex; align-items: center; gap: 10px; }
.vis-run b { width: 46px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.12); box-shadow: 0 5px 0 rgba(0,0,0,.25); animation: runNode 4s infinite; }
.vis-run b:nth-child(2) { animation-delay: .7s; } .vis-run b:nth-child(3) { animation-delay: 1.4s; } .vis-run b:nth-child(4) { animation-delay: 2.1s; }
.vis-run span { flex: 1; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.3) 0 8px, transparent 8px 14px); }
@keyframes runNode { 0%, 15% { background: rgba(255,255,255,.12); box-shadow: 0 5px 0 rgba(0,0,0,.25); transform: none; } 22%, 85% { background: #ce82ff; box-shadow: 0 5px 0 #8c4fc0; transform: scale(1.08); } 100% { background: rgba(255,255,255,.12); } }

/* vis: natural errors dots */
.vis-err { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; }
.vis-err i { aspect-ratio: 1; border-radius: 7px; background: #58cc02; box-shadow: 0 3px 0 #58a700; }
.vis-err i.m { animation: miss 3.4s infinite; }
.vis-err i.m:nth-child(7) { animation-delay: 1.4s; }
@keyframes miss { 0%, 40% { background: #58cc02; box-shadow: 0 3px 0 #58a700; transform: none; } 48%, 85% { background: #ff4b4b; box-shadow: 0 3px 0 #ea2b2b; transform: rotate(-8deg) scale(.9); } }
.vis-err-acc { font: 700 2.4rem/1 var(--font-display); color: #fff; }

/* vis: typing */
.vis-type { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 2px solid color-mix(in srgb, var(--gold) 35%, transparent); font: 800 1.15rem var(--font-body); color: var(--ink-strong); min-height: 60px; }
.vis-type .caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; margin-left: 1px; background: var(--blue); animation: caret 1s steps(1) infinite; }

/* vis: reminder toast */
.vis-toast { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; box-shadow: var(--shadow-soft); animation: toastIn 6s var(--ease-spring) infinite; }
.vis-toast img { width: 44px; height: 44px; object-fit: contain; }
.vis-toast strong { display: block; color: var(--ink-strong); font-weight: 900; }
.vis-toast span { display: block; color: var(--muted); font-size: .9rem; line-height: 1.3; }
.vis-toast small { color: var(--faint); font-weight: 800; }
@keyframes toastIn { 0% { transform: translateY(30px); opacity: 0; } 10%, 80% { transform: none; opacity: 1; } 92%, 100% { transform: translateY(-10px); opacity: 0; } }

/* vis: extension stat tiles */
.vis-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vis-stats .db-stat { background: rgba(0, 0, 0, .18); border-color: rgba(255, 255, 255, .14); color: #fff; }
.vis-stats .db-stat-icon { display: flex; height: 26px; margin-bottom: 6px; }
.vis-stats .db-stat-icon svg { width: auto; height: 100%; }
.vis-stats .db-stat-value { font: 800 1.25rem var(--font-body); color: #fff; }
.vis-stats .db-stat-label { font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.85); }
@media (max-width: 480px) { .vis-stats { grid-template-columns: 1fr 1fr; } }

/* =====================================================================
   Titan section: the golden bot, a bigger chain, three distinct cards
   ===================================================================== */
.titan-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.titan-grid > * { min-width: 0; }
@media (max-width: 900px) { .titan-grid { grid-template-columns: 1fr; } }
.gold-stage { position: relative; height: clamp(360px, 44vw, 560px); }
.gold-stage .bot-stage { position: absolute; inset: -14% -6% 0; width: auto; max-width: none; aspect-ratio: auto; }
.gold-stage::before { content: ""; position: absolute; inset: 2% -2%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 214, 64, .55), rgba(255, 176, 0, .28) 42%, rgba(255, 150, 0, .1) 62%, transparent 74%); filter: blur(10px); animation: goldPulse 4s ease-in-out infinite; }
@keyframes goldPulse { 50% { opacity: .75; transform: scale(.94); } }
.gold-stage .glints i { position: absolute; width: 10px; height: 10px; background: #ffe17a; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: glint 2.6s ease-in-out infinite; }
@keyframes glint { 0%, 100% { transform: scale(.2); opacity: 0; } 50% { transform: scale(1.4); opacity: 1; } }
.chain-big { position: relative; padding: 34px 6px 10px; }
.chain-big .titan-track { padding: 30px 0 14px; }
.chain-big .titan-node { width: clamp(52px, 7vw, 82px); }
.chain-big .titan-track::before { height: 10px; margin-top: -5px; }
.xp-pop { position: absolute; font: 700 1.2rem var(--font-display); color: var(--gold); pointer-events: none; animation: xpPop 1.1s var(--ease-out) forwards; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
@keyframes xpPop { from { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; transform: translateY(-10px) scale(1.15); } to { transform: translateY(-46px); opacity: 0; } }
.chain-total { margin-bottom: 26px; display: flex; align-items: baseline; gap: 10px; color: var(--night-muted); font-weight: 800; }
.chain-total strong { font: 700 clamp(2rem, 1.5rem + 2vw, 3rem)/1 var(--font-display); color: var(--gold); font-variant-numeric: tabular-nums; }

.titan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: clamp(32px, 4vw, 52px); }
.titan-cards > * { min-width: 0; }
@media (max-width: 860px) { .titan-cards { grid-template-columns: 1fr; } }
.tcard {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--night-2), var(--night-2)) padding-box,
    linear-gradient(140deg, var(--a1), var(--a2)) border-box;
  box-shadow: 0 20px 40px -24px var(--a1);
  transition: transform .3s var(--ease-out);
}
.tcard:hover { transform: translateY(-6px) rotate(-.4deg); }
.tcard h3 { color: #fff; font-size: 1.35rem; }
.tcard p { color: var(--night-muted); }
.tcard--a { --a1: #ce82ff; --a2: #7b4bd1; }
.tcard--b { --a1: #ffc800; --a2: #ff9600; }
.tvis { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 12px; border-radius: 16px; background: rgba(0,0,0,.25); }
.tvis .u { padding: 6px 10px; border-radius: 10px; background: rgba(206,130,255,.18); color: #e7ccff; font-weight: 900; font-size: .78rem; white-space: nowrap; }
.tvis .u.is-now { background: #ce82ff; color: #2a1342; animation: nowPulse 1.6s ease-in-out infinite; }
@keyframes nowPulse { 50% { box-shadow: 0 0 0 6px rgba(206,130,255,.25); } }
.tvis .arr { color: #6c818a; font-weight: 900; }
.tvis .xp-old { font: 700 1.6rem var(--font-display); color: #6c818a; text-decoration: line-through 3px #ff4b4b; }
.tvis .xp-new { font: 700 1.6rem var(--font-display); color: var(--gold); margin-left: auto; }
.tvis .flag { width: 34px; height: 34px; }
.tvis .scan { flex: 1; height: 8px; border-radius: 8px; background: rgba(255,255,255,.1); overflow: hidden; }
.tvis .scan i { display: block; height: 100%; width: 30%; border-radius: 8px; background: linear-gradient(90deg, #1cb0f6, #58cc02); animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 0% { transform: translateX(-100%); } 70%, 100% { transform: translateX(340%); } }

/* =====================================================================
   Plans: the wordmark and the Max badge
   ===================================================================== */
.plan__brand { display: flex; align-items: center; gap: 10px; }
.plan__brand .wm { height: 30px; width: auto; }
.plan__brand .maxsvg { height: 28px; width: auto; }
.plan__brand .free-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 5px; border: 2px solid var(--line-strong); color: var(--muted); font: italic 900 .85rem var(--font-body); letter-spacing: .06em; }

/* =====================================================================
   Simulators: browser window, lesson, path, helper
   ===================================================================== */
.trailer { margin-top: var(--section); }
.trailer__player { display: block; width: 100%; height: auto; min-height: 200px; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-lg); background: var(--night); box-shadow: var(--shadow-soft); }
.sim-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(18px, 3vw, 32px); align-items: stretch; }
.sim-grid > * { min-width: 0; }
@media (max-width: 920px) { .sim-grid { grid-template-columns: 1fr; } }
.sim-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 520px;
  border-radius: 26px;
  border: 2px solid var(--line);
  border-bottom-width: 6px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.sim-window__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 2px solid var(--line); background: var(--surface-2); }
.sim-window__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.sim-window__bar i:nth-child(1) { background: #ff5f57; } .sim-window__bar i:nth-child(2) { background: #febc2e; } .sim-window__bar i:nth-child(3) { background: #28c840; }
.sim-window__bar span { margin-left: 10px; flex: 1; min-width: 0; padding: 5px 14px; border-radius: 99px; background: var(--surface); color: var(--muted); font-size: .82rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-window__bar .sim-xp { margin-left: 8px; flex: none; padding: 5px 10px; border-radius: 99px; background: var(--gold-soft); color: var(--gold-ink); font-size: .78rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.sim-window__view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.sim-layer { position: absolute; inset: 0; display: flex; flex-direction: column; transition: transform .5s var(--ease-out), opacity .4s ease; }
.sim-layer--lesson { transform: translateY(104%); }
.sim-window__view.is-lesson .sim-layer--lesson { transform: none; }
.sim-window__view.is-lesson .sim-layer--path { transform: scale(1.12); opacity: 0; }

.lesson { position: relative; display: grid; grid-template-rows: auto 1fr auto; height: 100%; min-height: 0; background: var(--surface); overflow: hidden; }
.lesson__top { display: flex; align-items: center; gap: 14px; padding: 16px 20px 6px; }
.lesson__x { display: grid; place-items: center; width: 32px; height: 32px; margin: -4px; padding: 4px; border: 0; border-radius: 10px; background: transparent; color: var(--faint); flex: none; cursor: pointer; transition: color .15s, background-color .15s; }
.lesson__x svg { width: 24px; height: 24px; }
.lesson.is-guided .lesson__x { visibility: hidden; }
.lesson__x:hover { color: var(--muted); background: var(--surface-2); }
.lesson__x:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.lesson__out { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; align-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--surface); animation: fadeIn .25s ease; }
.lesson__out-heart svg { width: 96px; height: 96px; animation: heartBreak .7s var(--ease-spring); }
.lesson__out h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); color: var(--red); }
.lesson__out p { color: var(--muted); font-weight: 700; }
@keyframes heartBreak { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 80% { transform: scale(.96) rotate(-4deg); } 100% { transform: none; } }
.lesson__bar { position: relative; flex: 1; height: 16px; border-radius: 99px; background: var(--line); overflow: hidden; }
.lesson__bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--lp, 0) * 100%); border-radius: 99px; background: var(--green); transition: width .45s var(--ease-spring); }
.lesson__bar i::after { content: ""; position: absolute; left: 8px; right: 8px; top: 4px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .35); }
.lesson.is-titan .lesson__bar i { background: linear-gradient(90deg, #ce82ff, #ffc800); }
.lesson__hearts { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; color: var(--red); font-variant-numeric: tabular-nums; }
.lesson__hearts svg { width: 26px; height: 26px; }
.lesson__hearts.is-hit svg { animation: thump .5s var(--ease-spring); }
@keyframes thump { 30% { transform: scale(1.35) rotate(-8deg); } }
.lesson__stage { padding: 14px clamp(16px, 3.5vw, 40px) 18px; display: grid; align-content: start; gap: 18px; min-height: 0; overflow: hidden; }
.lesson__stage.is-in { animation: stageIn .35s var(--ease-out); }
@keyframes stageIn { from { opacity: 0; transform: translateX(24px); } }
.ch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ch-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); color: var(--ink-strong); line-height: 1.15; }
.ch-course { margin-left: auto; }
.ch-prompt { display: flex; align-items: flex-end; gap: 12px; }
.ch-prompt img { width: 74px; flex: none; }
.ch-bubble { position: relative; padding: 10px 14px; border: 2px solid var(--line); border-radius: 16px; font-size: 1.05rem; font-weight: 700; color: var(--ink-strong); }
.ch-bubble::before { content: ""; position: absolute; left: -9px; bottom: 14px; width: 14px; height: 14px; background: var(--surface); border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }
.ch-bubble u { text-decoration: underline dotted var(--faint) 2px; text-underline-offset: 5px; }
.answer-line { min-height: 104px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px 8px; padding: 6px 0; background: repeating-linear-gradient(to bottom, transparent 0 50px, var(--line) 50px 52px); }
.bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 8px; }
.tile { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 15px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: var(--surface); color: var(--ink-strong); font: 700 1rem var(--font-body); white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, opacity .25s; }
.tile.is-ghost { background: var(--line); border-color: var(--line); color: transparent; }
.tile.is-sel { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); }
.tile.is-ok { border-color: var(--green); background: var(--green-soft); color: var(--green-ink); }
.tile.is-gone { opacity: .35; border-color: var(--line); background: var(--surface); color: var(--faint); }
.options { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; font-weight: 700; color: var(--ink-strong); transition: background-color .15s, border-color .15s, color .15s; }
.opt b { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--line); border-radius: 9px; font-size: .8rem; color: var(--faint); }
.opt.is-sel { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.match > div { display: grid; gap: 10px; }
.match .tile { width: 100%; }
.typebox { min-height: 110px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface-2); font-size: 1.1rem; font-weight: 700; color: var(--ink-strong); }
.typebox .caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -3px; background: var(--blue); animation: caret 1s steps(1) infinite; }
.lesson__foot { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-top: 2px solid var(--line); min-height: 86px; }
.lesson__foot .btn { min-height: 46px; }
.feedback { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; background: var(--green-soft); transform: translateY(105%); transition: transform .28s var(--ease-out); }
.feedback.is-on { transform: none; }
.feedback__msg { display: flex; align-items: center; gap: 12px; min-width: 0; }
.feedback__msg svg { width: 42px; height: 42px; flex: none; }
.feedback__msg strong { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--green-ink); line-height: 1.1; }
.feedback__msg span { display: block; color: var(--green-ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedback.is-bad { background: var(--red-soft); }
.feedback.is-bad strong, .feedback.is-bad span { color: var(--red-ink); }
.lesson__done { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; text-align: center; background: var(--surface); }
.lesson__done img { width: 130px; animation: celebrate .8s var(--ease-spring); }
@keyframes celebrate { 0% { transform: scale(.4) rotate(-12deg); } 60% { transform: scale(1.1) rotate(6deg); } 100% { transform: none; } }
.lesson__done h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); color: var(--gold-ink); }
.done-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.done-stat { min-width: 108px; border-radius: 16px; border: 2px solid var(--c); overflow: hidden; }
.done-stat small { display: block; padding: 4px 10px; background: var(--c); color: #fff; font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.done-stat b { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; font-size: 1.3rem; color: var(--c); font-variant-numeric: tabular-nums; }

/* the learning path */
.spath { display: flex; flex-direction: column; height: 100%; padding: 16px 18px 22px; background: var(--surface); transition: background-color .5s ease; }
.spath__unit { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 16px; background: var(--green); box-shadow: 0 4px 0 var(--green-depth); color: #fff; transition: background-color .5s ease, box-shadow .5s ease; }
.spath__unit small { display: block; font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.spath__unit strong { font: 700 1.25rem var(--font-display); }
.spath__guide { width: 34px; height: 34px; padding: 6px; border-radius: 10px; background: rgba(0, 0, 0, .15); }
.spath.is-titan .spath__unit { background: linear-gradient(120deg, #a568cc, #ce82ff 55%, #ffc800); box-shadow: 0 4px 0 #7d47a8; }
.spath__nodes { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; gap: 14px; padding-top: 14px; }
.snode-wrap { position: relative; translate: var(--x, 0) 0; }
.snode { position: relative; display: grid; place-items: center; width: 70px; height: 62px; border: 0; border-radius: 50%; cursor: pointer; transition: transform .3s var(--ease-spring), background-color .4s, box-shadow .4s; }
.snode svg { width: 30px; height: 30px; }
.snode.is-current { background: var(--green); box-shadow: 0 7px 0 var(--green-depth); color: #fff; }
/* progress ring: a true circle around the node and its 7px depth edge */
.snode.is-current::after { content: ""; position: absolute; left: 50%; top: 34.5px; width: 94px; height: 94px; translate: -50% -50%; border-radius: 50%; border: 6px solid color-mix(in srgb, var(--green) 28%, transparent); box-sizing: border-box; pointer-events: none; }
.snode.is-current:active::after { top: 29.5px; }
.snode.is-done { background: var(--gold); box-shadow: 0 7px 0 var(--gold-depth); color: #fff; }
.snode.is-legendary { background: linear-gradient(150deg, #ce82ff, #8c4fc0); box-shadow: 0 7px 0 #6f2fa6; color: #ffd84d; }
.snode.is-locked { background: var(--line); box-shadow: 0 7px 0 var(--line-strong); color: var(--faint); cursor: default; }
.snode:active { transform: translateY(5px); box-shadow: none; }
.snode.is-pop { animation: nodePop .7s var(--ease-spring); }
@keyframes nodePop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: none; } }
.spath.is-titan .snode.is-done { background: linear-gradient(150deg, #ffd84d, #ffae00); box-shadow: 0 7px 0 #c98600, 0 0 26px rgba(255, 200, 0, .55); }
.snode.is-titanize { animation: titanize 1s var(--ease-spring); }
@keyframes titanize { 0% { transform: scale(1) rotate(0); filter: brightness(1); } 40% { transform: scale(1.25) rotate(-10deg); filter: brightness(1.6); } 100% { transform: none; filter: none; } }
.snode-start { position: absolute; right: calc(100% + 14px); top: 50%; translate: 0 -50%; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--green); font-size: .72rem; font-weight: 900; letter-spacing: .08em; animation: bob 2.2s ease-in-out infinite; white-space: nowrap; }
.snode-wrap .db-node-actions { right: -40px; }
.snode-wrap .db-node-btn { background: color-mix(in srgb, var(--surface) 70%, transparent); }

/* the helper bubble and ring */
.helper-ring { position: absolute; z-index: 40; border-radius: 18px; border: 3px solid var(--gold); pointer-events: none; opacity: 0; transition: opacity .25s ease, left .35s var(--ease-out), top .35s var(--ease-out), width .35s var(--ease-out), height .35s var(--ease-out); }
.helper-ring.is-on { opacity: 1; animation: ringPulse 1.4s ease-in-out infinite; }
@keyframes ringPulse { 50% { box-shadow: 0 0 0 8px rgba(255, 200, 0, .25); } }
.helper {
  position: absolute;
  z-index: 41;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  width: max-content;
  max-width: min(290px, 86vw);
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--ink-strong);
  color: var(--bg);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .5);
  font-weight: 800;
  font-size: .92rem;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, left .35s var(--ease-out), top .35s var(--ease-out);
}
.helper.is-on { opacity: 1; pointer-events: auto; animation: helperIn .5s var(--ease-spring); }
@keyframes helperIn { from { transform: scale(.7); } }
.helper__face { width: 40px; height: 24px; background: center / contain no-repeat; }
.helper__text b { color: var(--gold); }
.helper__extra:empty { display: none; }
.helper__extra { grid-column: 1 / -1; }
.helper__arrow { position: absolute; width: 14px; height: 14px; background: var(--ink-strong); transform: rotate(45deg); }
.helper[data-side="top"] .helper__arrow { bottom: -6px; left: calc(var(--arrow-x, 50%) - 7px); }
.helper[data-side="bottom"] .helper__arrow { top: -6px; left: calc(var(--arrow-x, 50%) - 7px); }
.helper[data-side="left"] .helper__arrow { right: -6px; top: calc(50% - 7px); }
.helper[data-side="right"] .helper__arrow { left: -6px; top: calc(50% - 7px); }
.helper.is-shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* =====================================================================
   Features page pieces built from the extension's own controls
   ===================================================================== */
.err-dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.err-dots span { aspect-ratio: 1; border-radius: 8px; background: #58cc02; box-shadow: 0 3px 0 #58a700; transition: background-color .3s, box-shadow .3s, transform .4s var(--ease-spring); }
.err-dots span.is-miss { background: #ff4b4b; box-shadow: 0 3px 0 #ea2b2b; transform: scale(.88) rotate(-6deg); }
.err-acc { font: 700 2.6rem/1 var(--font-display); color: #58cc02; font-variant-numeric: tabular-nums; transition: color .3s; }
.err-acc.is-low { color: #ff4b4b; }
.ext-card .db-card.is-errors { background: var(--db-surface); }
.speed-embed .db-section { border-radius: 18px; }
.speed-embed .db-section-head { cursor: default; }
.speed-embed .db-section-content { gap: 12px; padding: 4px 16px 18px; }
.speed-embed .db-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
@media (max-width: 760px) { .speed-embed .db-fields { grid-template-columns: 1fr; } }
.speed-embed .db-preset-btn { height: 42px; font-size: .85rem; }
.type-preview { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--db-input); border: 1px solid var(--db-line); font-weight: 800; font-size: 1rem; color: #f2f6f8; min-height: 54px; }
.type-preview small { margin-left: auto; color: #9fb0b9; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.type-preview .caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; background: #1cb0f6; animation: caret 1s steps(1) infinite; }

.vis-q { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg-alt); font-weight: 800; color: var(--muted); }
.vis-q b { padding: 6px 12px; border-radius: 10px; border: 2px solid var(--blue); background: var(--blue-soft); color: var(--blue-ink); animation: qsel 6s infinite; }
.vis-q i { width: 28px; height: 28px; margin-left: auto; animation: qok 6s infinite; }
@keyframes qsel { 0%, 6% { opacity: 0; transform: scale(.8); } 12%, 70% { opacity: 1; transform: none; } 80%, 100% { opacity: 0; } }
@keyframes qok { 0%, 10% { opacity: 0; transform: scale(.4); } 16%, 70% { opacity: 1; transform: none; } 80%, 100% { opacity: 0; } }
[data-variant="gold"] .bot-stage__fallback { filter: sepia(1) saturate(3.2) hue-rotate(-8deg) brightness(1.08); }

/* ---- home demo: path + count-up ---- */
.sim-xp b { font-weight: 900; display: inline-block; }
.sim-xp b.is-bump { animation: xpBump .4s var(--ease-spring); }
@keyframes xpBump { 40% { transform: scale(1.35); color: var(--gold-depth); } }
.spath__unit.is-pop { animation: unitPop .6s var(--ease-spring); }
@keyframes unitPop { 0% { transform: translateY(-14px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---- Solve & Skip card: one press, one question, kept in step ---- */
.vis-ss { display: grid; gap: 12px; }
.ss-top { display: flex; align-items: center; gap: 12px; }
.ss-bar { flex: 1; height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ss-bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--p, 0)); border-radius: inherit; background: var(--green); box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), inset 0 4px 0 rgba(255,255,255,.28); transition: transform .45s var(--ease-out); }
.ss-count { font-weight: 900; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: right; }
.ss-count b { color: var(--ink); }
.ss-stage { position: relative; height: 128px; overflow: hidden; border-radius: 16px; }
.ss-q { position: absolute; inset: 0; display: grid; align-content: start; gap: 8px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg-alt); transition: transform .45s var(--ease-out), opacity .35s ease; }
.ss-q.is-enter { transform: translateX(105%); }
.ss-q.is-leave { transform: translateX(-105%); opacity: 0; }
.ss-q small { color: var(--muted); font-weight: 800; font-size: .78rem; }
.ss-q strong { font: 700 1.15rem var(--font-display); color: var(--ink); }
.ss-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ss-opts span { padding: 5px 10px; border-radius: 10px; border: 2px solid var(--line); border-bottom-width: 4px; background: var(--surface); font-weight: 800; font-size: .85rem; color: var(--ink); transition: background-color .2s, border-color .2s, color .2s; }
.ss-opts span.is-sel { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); }
.ss-opts span.is-ok { border-color: var(--green); background: var(--green-soft); color: var(--green-ink, #3c8a00); }
.ss-ok { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--green); color: #fff; font-weight: 900; font-size: .78rem; transform: scale(.4); opacity: 0; transition: transform .3s var(--ease-spring), opacity .2s; }
.ss-ok svg { width: 14px; height: 14px; }
.ss-q.is-done .ss-ok { transform: none; opacity: 1; }
.ss-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ss-row .kcap { position: static; transition: transform .15s, box-shadow .15s; }
.ss-row .kcap.is-press kbd { transform: translateY(2px); box-shadow: none; background: var(--blue-soft); color: var(--blue-ink); border-color: var(--blue); }
.ss-btn.db-btn { flex: none; height: 40px; padding: 0 16px; cursor: default; pointer-events: none; }
.ss-btn.is-press { transform: translateY(4px); box-shadow: 0 0 0 var(--db-btn-edge), 0 2px 6px rgba(0,0,0,.3); }
.ss-btn.is-wait { animation: ssWait 1.2s ease-in-out infinite; }
@keyframes ssWait { 50% { filter: brightness(1.15); } }
.ss-row .kcap kbd { transition: all .15s; }

/* ---- Titan card: Stops on its own ---- */
.tcard--c { --a1: #1cb0f6; --a2: #1899d6; }
.tvis--stop { display: grid; gap: 12px; padding: 14px; }
.stop-units { position: relative; display: flex; justify-content: space-between; gap: 6px; }
.stop-units::before { content: ""; position: absolute; left: 16px; right: 16px; top: 50%; height: 6px; margin-top: -3px; border-radius: 6px; background: rgba(255,255,255,.1); }
.su { position: relative; display: grid; place-items: center; width: 40px; height: 36px; border-radius: 50%; background: linear-gradient(160deg, #ffd84d, #ffae00); box-shadow: 0 5px 0 #c98600; color: #fff; transition: background .35s, box-shadow .35s, transform .3s var(--ease-spring); }
.su svg { width: 18px; height: 18px; }
.su.is-legend { background: linear-gradient(160deg, #d58cff, #9a4fd6); box-shadow: 0 5px 0 #6f2fa6; color: #ffd84d; }
.su.is-check { transform: scale(1.18); box-shadow: 0 5px 0 #c98600, 0 0 0 4px rgba(28,176,246,.55); }
.su.is-legend.is-check { box-shadow: 0 5px 0 #6f2fa6, 0 0 0 4px rgba(28,176,246,.55); }
.su .su-pop { position: absolute; bottom: 100%; left: 50%; translate: -50% 0; font: 700 .9rem var(--font-display); color: var(--gold); white-space: nowrap; animation: suPop 1s ease-out forwards; pointer-events: none; }
.su .su-skip { position: absolute; bottom: 100%; left: 50%; translate: -50% 0; font-weight: 900; font-size: .68rem; letter-spacing: .06em; color: #9fb0b9; white-space: nowrap; animation: suPop 1s ease-out forwards; }
@keyframes suPop { from { opacity: 0; transform: translateY(6px); } 25% { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-14px); } }
.stop-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stop-label { font-weight: 800; font-size: .85rem; color: #cfe3ec; }
.stop-label.is-off { color: #1cb0f6; }
.tvis--stop .db-switch { pointer-events: none; }

[data-titan-xp].is-bump { animation: xpBump .4s var(--ease-spring); display: inline-block; }

/* ---- plans: real hover (translate, so it never fights the reveal transform) ---- */
.plan { transition: translate .4s var(--ease-spring), box-shadow .35s ease, border-color .25s ease; }
.plan:hover { translate: 0 -8px; box-shadow: 0 30px 50px -30px rgba(10, 30, 40, .35); border-color: var(--line-strong); }
.plan--max:hover { border-color: var(--green); box-shadow: 0 34px 60px -28px color-mix(in srgb, var(--green) 75%, transparent), 0 0 0 5px color-mix(in srgb, var(--green) 22%, transparent); }
.plan .maxsvg { transition: transform .4s var(--ease-spring); }
.plan:hover .maxsvg { transform: rotate(-6deg) scale(1.12); }
.plan--max:hover .plan__price strong { color: var(--green); }
.plan__price strong { transition: color .25s; }

/* ---- compare table: logos and real dividers ---- */
.compare th + th, .compare td { border-left: 2px solid var(--line); }
.compare thead th { border-bottom: 3px solid var(--line-strong); vertical-align: middle; }
.compare thead th:nth-child(3) { background: color-mix(in srgb, var(--green) 14%, var(--surface-2)); border-bottom-color: var(--green); }
.compare .cmp-badge { display: block; width: 78px; height: auto; }
.compare th:not(:first-child), .compare td { text-align: center; }
.compare .group th { border-left: 0; }
.compare tbody tr:not(.group):hover > * { background-color: color-mix(in srgb, var(--blue) 6%, transparent); }
.compare th:not(:first-child) .cmp-badge { margin-inline: auto; }

/* =====================================================================
   CTA band v2: layered green, rays and a lit stage for the mascot
   ===================================================================== */
.cta2 { text-align: left; background: radial-gradient(120% 140% at 80% 40%, #6fdc1a 0%, #58cc02 38%, #4aa802 72%, #3f9100 100%); }
:root[data-theme="dark"] .cta2 { background: radial-gradient(120% 140% at 80% 40%, #3f8a10 0%, #2f6a0d 45%, #234f0a 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta2 { background: radial-gradient(120% 140% at 80% 40%, #3f8a10 0%, #2f6a0d 45%, #234f0a 100%); } }
.cta2__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.cta2__dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.16) 1.6px, transparent 2px); background-size: 22px 22px; mask-image: linear-gradient(100deg, #000 0%, transparent 55%); -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 55%); }
.cta2__blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.cta2__blob--a { width: 420px; height: 420px; left: -140px; bottom: -220px; background: rgba(255,255,255,.08); }
.cta2__blob--b { width: 260px; height: 260px; right: 38%; top: -150px; background: rgba(0,0,0,.06); }
.cta2 .confetti-dots { position: absolute; inset: 0; }
.cta2__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.cta2__pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 99px; background: rgba(0,0,0,.16); color: #fff; font-size: .8rem !important; font-weight: 900 !important; letter-spacing: .1em; text-transform: uppercase; }
.cta2__pill svg { width: 20px; height: 20px; }
.cta2 h2 { margin-top: 16px; text-shadow: 0 4px 0 rgba(0,0,0,.12); }
.cta2__text { margin-top: 12px; max-width: 34ch; opacity: .95; }
.cta2__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; color: rgba(255,255,255,.9); font-weight: 800; font-size: var(--fs-small); }
.cta2__meta span { display: inline-flex; align-items: center; gap: 6px; }
.cta2__meta svg { width: 18px; height: 18px; }
.cta2__art { position: relative; height: clamp(320px, 34vw, 440px); }
.cta2__rays { position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.13) 0deg 9deg, transparent 9deg 22.5deg);
  mask-image: radial-gradient(closest-side, #000 18%, transparent 72%); -webkit-mask-image: radial-gradient(closest-side, #000 18%, transparent 72%);
  animation: raySpin 40s linear infinite; }
@keyframes raySpin { to { rotate: 360deg; } }
.cta2__disc { position: absolute; left: 50%; top: 52%; width: 72%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.55), rgba(255,255,255,.18) 55%, transparent 72%); }
.cta2__bot { position: absolute; inset: -6% 0 0; width: auto; max-width: none; aspect-ratio: auto; }
.cta2__chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 16px; background: #fff; color: var(--ink-strong, #3c3c3c); box-shadow: 0 5px 0 rgba(0,0,0,.14), 0 18px 30px -14px rgba(0,0,0,.35); font-weight: 900; font-size: .9rem; white-space: nowrap; animation: chipBob 4.6s ease-in-out infinite; }
.cta2__chip svg { width: 22px; height: 22px; flex: none; }
.cta2__chip small { color: #777; font-weight: 800; font-size: .75rem; }
.cta2__chip--xp { left: 2%; top: 16%; color: #c98600; rotate: -6deg; }
.cta2__chip--streak { right: 0; top: 34%; color: #ff9600; rotate: 5deg; animation-delay: -1.5s; }
.cta2__chip--ok { left: 8%; bottom: 10%; color: #46a302; rotate: -3deg; animation-delay: -3s; }
@keyframes chipBob { 50% { translate: 0 -10px; } }
:root[data-theme="dark"] .cta2__chip { background: #20303a; color: #f2f6f8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta2__chip { background: #20303a; color: #f2f6f8; } }
@media (max-width: 860px) {
  .cta2 { text-align: center; }
  .cta2__grid { grid-template-columns: 1fr; }
  .cta2__text { margin-inline: auto; }
  .cta2 .btn-row, .cta2__meta { justify-content: center; }
  .cta2__art { order: -1; height: 300px; margin-bottom: -10px; }
  .cta2__chip { font-size: .78rem; padding: 7px 11px; }
}

/* =====================================================================
   Section dividers: each section rises over the one before it on
   rounded shoulders, so the colour of the previous one shows in the
   corners instead of a flat straight cut.
   ===================================================================== */
:root { --sec-r: clamp(28px, 4.6vw, 64px); }
main > section { background-color: var(--bg); }
main > section + section {
  margin-top: calc(-1 * var(--sec-r));
  border-radius: var(--sec-r) var(--sec-r) 0 0;
  box-shadow: 0 -18px 34px -26px rgba(16, 40, 50, .28);
}
main > section::before, main > section > .sprinkles { border-radius: inherit; }
main > section.section:has(+ section),
main > section.section:last-child { padding-bottom: calc(var(--section) + var(--sec-r)); }
main > section.section--tight:has(+ section),
main > section.section--tight:last-child { padding-bottom: calc(var(--section) * .6 + var(--sec-r)); }
main > .page-hero:has(+ section) { padding-bottom: calc(clamp(36px, 5vw, 56px) + var(--sec-r)); border-bottom: 0; }
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * var(--sec-r));
  border-radius: var(--sec-r) var(--sec-r) 0 0;
  box-shadow: 0 -18px 34px -26px rgba(0, 0, 0, .35);
}

/* =====================================================================
   Languages: flags, header button, picker and first visit banner
   ===================================================================== */
.flag { display: inline-block; flex: none; width: 28px; height: 21px; border-radius: 5px; overflow: hidden; position: relative; box-shadow: 0 0 0 2px rgba(0,0,0,.08), 0 2px 0 rgba(0,0,0,.12); background: var(--line); }
.flag svg { display: block; width: 100%; height: 100%; }
.flag::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 -3px 0 rgba(0,0,0,.14), inset 0 2px 0 rgba(255,255,255,.25); pointer-events: none; }
.flag--lg { width: 52px; height: 39px; border-radius: 9px; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 8px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px; background: var(--surface); color: var(--muted); font: 900 .8rem var(--font-body); letter-spacing: .08em; cursor: pointer; transition: translate .15s var(--ease-out), border-color .15s, background-color .15s; }
.lang-btn:hover { border-color: var(--line-strong); background: var(--surface-2); translate: 0 -1px; }
.lang-btn:active { translate: 0 2px; border-bottom-width: 2px; }
.lang-btn .flag { width: 24px; height: 18px; border-radius: 4px; }
.lang-btn__chev { width: 16px; height: 16px; }
.site-header .lang-btn { margin-left: 8px; }
@media (max-width: 920px) { .site-header .menu-btn { margin-left: 0; order: 5; } .site-header .lang-btn { margin-left: auto; margin-right: 8px; } .site-header .lang-btn [data-lang-name], .site-header .lang-btn .lang-btn__chev { display: none; } }
.lang-btn--foot { background: transparent; border-color: rgba(255,255,255,.14); color: #cfe3ec; letter-spacing: 0; font-weight: 800; font-size: .9rem; }
.lang-btn--foot:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.28); }

.lang-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.lang-modal[hidden] { display: none !important; }
.lang-modal__scrim { position: absolute; inset: 0; background: rgba(10, 20, 26, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s ease; }
.lang-modal__card { position: relative; width: min(860px, 100%); max-height: min(86vh, 760px); overflow: auto; padding: clamp(20px, 3vw, 32px); border-radius: 24px; border: 2px solid var(--line); border-bottom-width: 6px; background: var(--surface); box-shadow: 0 40px 80px -30px rgba(0,0,0,.45); transform: translateY(24px) scale(.97); opacity: 0; transition: transform .35s var(--ease-spring), opacity .2s ease; }
.lang-modal.is-on .lang-modal__scrim { opacity: 1; }
.lang-modal.is-on .lang-modal__card { transform: none; opacity: 1; }
.lang-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lang-modal__head h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.lang-modal__x, .lang-banner__x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--muted); cursor: pointer; flex: none; }
.lang-modal__x svg, .lang-banner__x svg { width: 20px; height: 20px; }
.lang-modal__x:hover, .lang-banner__x:hover { color: var(--ink); }
.lang-modal__sub { margin-top: 4px; color: var(--muted); font-weight: 700; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 20px; }
.lang-card { display: grid; justify-items: center; gap: 8px; padding: 18px 10px 14px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; background: var(--surface); color: var(--ink-strong); cursor: pointer; text-align: center; transition: translate .2s var(--ease-spring), border-color .15s, background-color .15s; }
.lang-card:hover { translate: 0 -3px; border-color: var(--line-strong); background: var(--surface-2); }
.lang-card:active { translate: 0 2px; border-bottom-width: 2px; }
.lang-card.is-current { border-color: var(--blue); background: var(--blue-soft); }
.lang-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.lang-card__name { font-weight: 900; font-size: 1rem; }
.lang-card__en { color: var(--muted); font-weight: 700; font-size: .78rem; margin-top: -4px; }
html.lang-open { overflow: hidden; }

.lang-banner { position: fixed; z-index: 150; left: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 16px; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 20px; background: var(--surface); box-shadow: 0 30px 60px -24px rgba(0,0,0,.4); transform: translateY(140%); transition: transform .5s var(--ease-spring); }
.lang-banner.is-on { transform: none; }
.lang-banner strong { display: block; font: 700 1.15rem var(--font-display); color: var(--ink-strong); }
.lang-banner p { margin-top: 4px; color: var(--muted); font-size: .9rem; font-weight: 700; line-height: 1.4; }
.lang-banner__row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lang-banner__x { width: 34px; height: 34px; }

.legal-lang-note { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding: 14px 16px; border: 2px solid var(--blue); border-radius: 16px; background: var(--blue-soft); color: var(--blue-ink); font-weight: 800; }
.legal-lang-note p { margin: 0; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =====================================================================
   Mods inside the simulated lesson (the dbm-* look comes from the
   extension's own ui/DuobotMods.css; these rules fit it to the demo)
   ===================================================================== */
.sim-window, .mod-vis, .modlab {
  --color-snow: 255, 255, 255; --color-polar: 247, 247, 247; --color-swan: 229, 229, 229; --color-eel: 75, 75, 75; --color-hare: 175, 175, 175;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sim-window, :root:not([data-theme="light"]) .mod-vis, :root:not([data-theme="light"]) .modlab {
    --color-snow: 27, 43, 49; --color-polar: 32, 47, 54; --color-swan: 55, 70, 79; --color-eel: 241, 247, 251; --color-hare: 159, 178, 187;
  }
}
:root[data-theme="dark"] .sim-window, :root[data-theme="dark"] .mod-vis, :root[data-theme="dark"] .modlab {
  --color-snow: 27, 43, 49; --color-polar: 32, 47, 54; --color-swan: 55, 70, 79; --color-eel: 241, 247, 251; --color-hare: 159, 178, 187;
}
.dbm-btn.is-pressed, .dbm-chip.is-pressed { animation: dbmPress .22s ease; }
@keyframes dbmPress { 40% { transform: translateY(3px); border-bottom-width: 1px; } }

.lesson button.tile, .lesson button.opt { font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.lesson button.tile { font: 700 1rem var(--font-body); }
.lesson .tile:not(.is-ghost):not(.is-gone):hover, .lesson .opt:hover { background: var(--surface-2); }
.lesson .tile.is-bad { border-color: var(--red); background: var(--red-soft); color: var(--red-ink); animation: shake .35s; }
.lesson .tile.is-focus, .lesson .opt.is-focus { outline: 3px solid var(--blue); outline-offset: 3px; }
.lesson .opt { background: var(--surface); width: 100%; }
.lesson .opt.dbm-hint, .lesson .tile.dbm-hint { border-color: var(--green) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent); }
.lesson .tile.dbm-hint { animation: hintBob 1.2s ease-in-out infinite; }
@keyframes hintBob { 50% { translate: 0 -3px; } }
.lesson textarea.typebox { display: block; width: 100%; min-height: 96px; resize: none; font: 700 1.1rem var(--font-body); color: var(--ink-strong); caret-color: var(--blue); }
.lesson textarea.typebox:focus, .lesson .dbm-hard-field:focus { outline: none; border-color: var(--blue); }
.lesson textarea.typebox::placeholder { color: var(--faint); }
.lesson__stage > .memo-slot:empty { display: none; }
.lesson__stage { gap: 14px; }
.lesson__chips { margin: -4px 0 -6px; }
.keys-hint::before { content: "⌨ "; }
.ch-say .w { text-decoration: underline dotted var(--faint) 2px; text-underline-offset: 5px; }
.ch-say .w.nw { text-decoration-color: var(--blue); }
.ch-say [data-dbm-new] { display: inline-block; line-height: 1.15; }
.ch-say [data-dbm-new]::after { margin-top: 3px; animation: dbm-pop .3s var(--ease-spring) both; }
.ch-bubble.dbm-audio-host { min-width: min(330px, 100%); }
.ch-say.dbm-veiled { position: relative; }
.ch-bubble .dbm-audio.is-compact { margin-top: 8px; }
.ch-bubble .dbm-audio .dbm-range-wrap { --dbm-thumb: 14px; }
.lesson .dbm-hard { display: grid; gap: 10px; }
.lesson .dbm-hard-field { width: 100%; min-height: 80px; resize: none; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface-2); font: 700 1.05rem var(--font-body); color: var(--ink-strong); }
.lesson .dbm-tools { margin-top: -6px; }
.lesson .dbm-memo { justify-self: start; margin: 0; }
.lesson .dbm-memo svg { width: 18px; height: 18px; }
.lesson .dbm-memo.is-open { text-transform: none; letter-spacing: 0; }
.answer-line.dbm-hard-hidden, .bank.dbm-hard-hidden { display: none; }

.feedback .sol-btn { margin-left: auto; padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.feedback .sol-btn svg { width: 16px; height: 16px; }
.feedback .sol-btn.is-open { border-color: var(--blue); color: var(--blue-ink); }
.sol-pop { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 98px; padding: 12px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 18px; background: var(--surface); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .45); animation: dbm-pop .26s var(--ease-spring); }
.sol-pop__head { display: flex; align-items: center; justify-content: space-between; color: var(--ink-strong); }
.sol-pop__head button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.sol-pop__head button svg { width: 16px; height: 16px; }
.sol-pop .dbm-solutions-list { max-height: 180px; }

.lesson__pill { position: absolute; z-index: 6; left: 50%; top: 58px; translate: -50% -12px; padding: 7px 14px; border-radius: 99px; background: var(--blue); color: #fff; font-size: .82rem; font-weight: 900; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s ease, translate .3s var(--ease-spring); box-shadow: 0 10px 24px -10px rgba(28, 176, 246, .8); }
.lesson__pill::before { content: "⚡ "; }
.lesson__pill.is-on { opacity: 1; translate: -50% 0; }

.lesson__card { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; align-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--surface); animation: fadeIn .25s ease; }
.lesson__card img { width: 110px; animation: celebrate .8s var(--ease-spring); }
.lesson__card h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); color: var(--orange); }
.lesson__card p { color: var(--muted); font-weight: 700; }
.lesson__card .btn { margin-top: 8px; min-width: 200px; }

.lesson__ad { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; padding: 20px; background: rgba(19, 31, 36, .55); backdrop-filter: blur(3px); animation: fadeIn .25s ease; }
.ad-card { position: relative; display: grid; justify-items: center; gap: 10px; width: min(330px, 100%); padding: 26px 22px 18px; border-radius: 26px; background: linear-gradient(160deg, #2b1b5a, #12355e 60%, #0b5b74); color: #fff; text-align: center; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); animation: adIn .45s var(--ease-spring); }
@keyframes adIn { from { transform: translateY(40px) scale(.9); opacity: 0; } }
.ad-card__tag { padding: 4px 12px; border-radius: 10px; background: linear-gradient(90deg, #ce82ff, #1cb0f6 60%, #58cc02); font: 900 .85rem var(--font-body); letter-spacing: .14em; }
.ad-card h3 { color: #fff; font-size: 1.6rem; }
.ad-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-weight: 800; color: #cfe6ff; }
.ad-card ul li::before { content: "✓ "; color: #93d333; }
.ad-card__go { width: 100%; margin-top: 6px; pointer-events: none; }
.ad-card__no { border: 0; background: none; color: #9fd6ff; font: 900 .85rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; padding: 8px; border-radius: 10px; }
.ad-card__no:hover, .ad-card__no.is-pressed { background: rgba(255, 255, 255, .1); }

.snode.dbm-next-node { outline: 4px solid var(--blue); animation: nextPulse 1.6s var(--ease-out) infinite; }
@keyframes nextPulse { 0%, 100% { outline-color: rgba(28, 176, 246, .9); outline-offset: 4px; } 50% { outline-color: rgba(28, 176, 246, .15); outline-offset: 12px; } }
.spath__guidebtns { margin: 8px 0 0; }
.spath__guidebtns .dbm-btn { padding: 5px 10px; font-size: 11px; border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .16); color: #fff; animation: dbm-pop .3s var(--ease-spring) both; }
.spath__guidebtns .dbm-btn:hover { background: rgba(255, 255, 255, .28); }
.lesson.is-practice .lesson__bar i { background: var(--blue); }

/* the panel's longer screens scroll inside it instead of stretching the demo */
.panel-host .db-root .db-account-inner { max-height: 560px; }

/* =====================================================================
   Mods: the lab, the cards and their little loops
   ===================================================================== */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--ink); font-weight: 700; }
.ticks li svg { width: 22px; height: 22px; color: var(--green); margin-top: 1px; }
.band-night .ticks li { color: var(--night-ink); }
.night-muted { color: var(--night-muted); }
.tier { display: inline-block; width: 46px; height: 16px; vertical-align: -3px; flex: none; }

.modlab { position: relative; }
.modlab__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modlab__plan { display: inline-flex; align-items: center; gap: 6px; padding: 5px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); }
.modlab__plan > span { padding: 0 8px 0 6px; color: var(--muted); font-size: .8rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.modlab__plan button { display: grid; place-items: center; height: 34px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; opacity: .45; filter: grayscale(.6); transition: opacity .2s, filter .2s, background-color .2s; }
.modlab__plan button img { width: 52px; height: 18px; }
.modlab__plan button.is-on { opacity: 1; filter: none; background: var(--night); box-shadow: 0 3px 0 #0a1216; }
.modlab__presets { display: flex; flex-wrap: wrap; gap: 8px; }
.modlab__note { margin-top: 14px; color: var(--muted); font-size: .92rem; font-weight: 700; text-align: center; }
.modlab .sim-window { min-height: 600px; }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(14px, 2vw, 22px); }
.mod-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mod-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .mod-grid--2, .mod-grid--3 { grid-template-columns: 1fr; } }
.mcard { display: flex; flex-direction: column; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 26px; background: var(--surface); overflow: hidden; transition: translate .25s var(--ease-spring), border-color .2s; }
.mcard:hover { translate: 0 -4px; border-color: var(--line-strong); }
.mcard__vis { position: relative; height: 168px; display: grid; place-items: center; padding: 16px; background: var(--bg-alt); border-bottom: 2px solid var(--line); overflow: hidden; }
.mcard--wide .mcard__vis { height: 210px; }
.mcard__body { padding: 18px 20px 20px; }
.mcard__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.mcard__head h3 { font-size: 1.2rem; line-height: 1.15; }
.mcard__body p { color: var(--muted); font-size: .97rem; }
.mcard__body p b { color: var(--ink); }

/* shared pieces of the little pictures */
.mv { position: relative; width: 100%; max-width: 330px; display: grid; gap: 10px; font: 700 .95rem var(--font-body); color: var(--ink-strong); }
.mv-bubble { display: flex; align-items: center; gap: 10px; }
.mv-bubble img { width: 46px; flex: none; }
.mv-bubble > span { padding: 9px 13px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.mv-flash { position: absolute; left: 50%; top: 4px; translate: -50% 0; padding: 5px 12px; border-radius: 99px; background: var(--blue); color: #fff; font-size: .75rem; font-weight: 900; white-space: nowrap; opacity: 0; }
.mv-flash::before { content: "⚡ "; }
.mv-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: var(--surface); }
.mv-opt b { display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 8px; font-size: .72rem; color: var(--faint); }
.mv .dbm-btn { pointer-events: none; }
.mv .dbm-audio { margin: 0; max-width: none; animation: none; }
.mv .dbm-audio.is-compact { padding: 8px 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.mv .dbm-audio-vol svg { width: 16px; height: 16px; }
.mv .dbm-audio.is-compact { flex-wrap: nowrap; gap: 8px; }
.mv .dbm-audio-time { min-width: 0; font-size: 11px; }
.mv .dbm-audio-chip { min-width: 0; }

/* skip ads */
.mv-page { display: grid; gap: 8px; padding: 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); }
.mv-page i { height: 12px; border-radius: 6px; background: var(--line); }
.mv-page i:nth-child(2) { width: 70%; } .mv-page i:nth-child(4) { width: 45%; }
.mv-ad { position: absolute; inset: 6px 14px; display: grid; justify-items: center; align-content: center; gap: 6px; padding: 12px; border-radius: 18px; background: linear-gradient(160deg, #2b1b5a, #12355e 60%, #0b5b74); color: #fff; animation: mvAd 5s var(--ease-out) infinite; }
.mv-ad b { padding: 2px 10px; border-radius: 8px; background: linear-gradient(90deg, #ce82ff, #1cb0f6 60%, #58cc02); font-size: .7rem; letter-spacing: .14em; }
.mv-ad span { font-size: .7rem; color: #9fd6ff; text-transform: uppercase; letter-spacing: .08em; }
.mv-ad em { position: absolute; right: 10px; top: 6px; font-style: normal; font-size: 1.3rem; color: #fff; opacity: .8; animation: mvX 5s infinite; }
.mv-ads .mv-flash { animation: mvFlash 5s infinite; animation-delay: .1s; }
@keyframes mvAd { 0%, 6% { transform: translateY(120%); } 18%, 46% { transform: none; opacity: 1; } 54%, 100% { transform: translateY(-20px) scale(.9); opacity: 0; } }
@keyframes mvX { 0%, 40% { transform: none; } 44% { transform: scale(.7); color: #ffc800; } 48%, 100% { transform: none; } }
@keyframes mvFlash { 0%, 48% { opacity: 0; translate: -50% -8px; } 54%, 80% { opacity: 1; translate: -50% 0; } 90%, 100% { opacity: 0; } }

/* skip motivation cards */
.mv-q { display: grid; gap: 8px; padding: 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); }
.mv-q i { height: 12px; border-radius: 6px; background: var(--line); } .mv-q i + i { width: 60%; }
.mv-card { position: absolute; inset: 0 30px; display: grid; justify-items: center; align-content: center; gap: 6px; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 18px; background: var(--surface); color: var(--orange); font-family: var(--font-display); font-size: 1.15rem; }
.mv-card img { width: 46px; }
.mv-card--a { animation: mvCard 4.6s var(--ease-out) infinite; }
.mv-card--b { animation: mvCard 4.6s var(--ease-out) infinite; animation-delay: .5s; color: var(--blue-ink); }
.mv-cards .mv-flash { animation: mvFlash2 4.6s infinite; }
@keyframes mvCard { 0%, 8% { transform: translateY(30px) scale(.9); opacity: 0; } 16%, 34% { transform: none; opacity: 1; } 46%, 100% { transform: translateX(-130%) rotate(-14deg); opacity: 0; } }
@keyframes mvFlash2 { 0%, 40% { opacity: 0; } 50%, 78% { opacity: 1; } 90%, 100% { opacity: 0; } }

/* hide the sentence */
.mv-veil { animation: mvVeil 4.4s infinite; }
@keyframes mvVeil { 0%, 45% { filter: blur(6px); } 52%, 82% { filter: none; } 90%, 100% { filter: blur(6px); } }
.mv-keys { justify-self: center; color: var(--muted); font-size: .8rem; }
.mv-keys kbd { animation: mvKey 4.4s infinite; }
@keyframes mvKey { 0%, 44% { background: var(--surface); } 48%, 54% { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-ink); translate: 0 2px; } 60%, 100% { background: var(--surface); } }

/* arrow keys */
.mv-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mv-grid span { padding: 8px 6px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px; background: var(--surface); text-align: center; }
.mv-ring { position: absolute; left: 0; top: 0; width: calc((100% - 16px) / 3); height: calc((100% - 8px) / 2); border: 3px solid var(--blue); border-radius: 13px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 25%, transparent); animation: mvRing 6s var(--ease-out) infinite; }
@keyframes mvRing {
  0%, 12% { transform: translate(0, 0); }
  18%, 30% { transform: translate(calc(100% + 8px), 0); }
  36%, 48% { transform: translate(calc(100% + 8px), calc(100% + 8px)); }
  54%, 66% { transform: translate(calc(200% + 16px), calc(100% + 8px)); }
  72%, 84% { transform: translate(calc(200% + 16px), 0); }
  90%, 100% { transform: translate(0, 0); }
}
.mv-arrows { display: flex; justify-content: center; gap: 6px; }
.mv-arrows kbd { min-width: 30px; text-align: center; }
.mv-arrows .a4 { animation: mvKey2 6s infinite; } .mv-arrows .a3 { animation: mvKey2 6s infinite 1.1s; } .mv-arrows .a2 { animation: mvKey2 6s infinite 3.3s; } .mv-arrows .a1 { animation: mvKey2 6s infinite 4.4s; }
@keyframes mvKey2 { 0%, 14% { background: var(--surface); } 16%, 20% { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-ink); } 24%, 100% { background: var(--surface); } }

/* audio bar */
.mv-audio-fill { animation: mvFill 3.2s linear infinite; }
@keyframes mvFill { 0% { width: 9px; } 85%, 100% { width: 100%; } }
.mv-audio .dbm-audio-seek { min-width: 60px; }

/* dictate */
.mv-type { min-height: 64px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 1rem; }
.mv-type .caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; vertical-align: -3px; background: var(--blue); animation: caret 1s steps(1) infinite; }
.mv-mic .dbm-tools { margin: 0; }
.mv .dbm-mic.is-listening { animation: micPulse 1.1s var(--ease-out) infinite; }
@keyframes micPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 75, 75, .5); } 100% { box-shadow: 0 0 0 12px rgba(255, 75, 75, 0); } }

/* study hints */
.mv-hints, .mv-auto { gap: 8px; }
.mv-opt--ok { animation: mvHint 3.6s infinite; }
@keyframes mvHint { 0%, 25% { border-color: var(--line); box-shadow: none; } 35%, 90% { border-color: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent); } 100% { border-color: var(--line); } }

/* live typing check */
.mv-typing { height: 100px; }
.mv-tline { position: absolute; inset: 0; display: grid; align-content: center; gap: 10px; justify-items: start; }
.mv-ttext { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); white-space: nowrap; }
.mv-tin { display: inline-block; clip-path: inset(0 100% 0 0); }
.mv-tline--a { animation: mvLineA 7s infinite; } .mv-tline--b { animation: mvLineB 7s infinite; }
.mv-tline--a .mv-tin { animation: mvTypeA 7s steps(18) infinite; } .mv-tline--b .mv-tin { animation: mvTypeB 7s steps(12) infinite; }
.mv-tline .dbm-typing { opacity: 0; }
.mv-tline--a .dbm-typing { animation: mvPillA 7s infinite; } .mv-tline--b .dbm-typing { animation: mvPillB 7s infinite; }
@keyframes mvLineA { 0%, 48% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes mvLineB { 0%, 49% { opacity: 0; } 50%, 98% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mvTypeA { 0% { clip-path: inset(0 100% 0 0); } 30%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes mvTypeB { 0%, 50% { clip-path: inset(0 100% 0 0); } 74%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes mvPillA { 0%, 8% { opacity: 0; } 12%, 48% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes mvPillB { 0%, 68% { opacity: 0; } 72%, 98% { opacity: 1; } 100% { opacity: 0; } }

/* all solutions */
.mv-sol { gap: 8px; }
.mv-fb { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--green-soft); }
.mv-fb__ok { display: flex; align-items: center; gap: 8px; color: var(--green-ink); font-family: var(--font-display); font-size: 1.1rem; }
.mv-fb__ok svg { width: 28px; height: 28px; }
.mv-solbtn { padding: 6px 10px; font-size: 11px; animation: mvBtn 5s infinite; }
.mv-solbtn svg { width: 14px; height: 14px; }
.mv-sol .dbm-solutions-list { margin: 0; padding: 4px; font-size: .85rem; line-height: 1.3; max-height: none; transform-origin: top; animation: mvList 5s var(--ease-out) infinite; }
.mv-sol .dbm-solutions-list li { padding: 4px 8px; }
@keyframes mvBtn { 0%, 18% { transform: none; } 22% { transform: translateY(2px); border-bottom-width: 2px; border-color: var(--dbm-blue); } 26%, 100% { transform: none; } }
@keyframes mvList { 0%, 22% { transform: scaleY(0); opacity: 0; } 30%, 88% { transform: none; opacity: 1; } 96%, 100% { transform: scaleY(0); opacity: 0; } }

/* check by itself */
.mv-opt--pick { animation: mvPick 4.6s infinite; }
@keyframes mvPick { 0%, 15% { border-color: var(--line); background: var(--surface); } 20%, 90% { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); } 100% { border-color: var(--line); } }
.mv-foot { position: relative; height: 48px; }
.mv-check { position: absolute; right: 0; top: 2px; padding: 9px 22px; border-radius: 14px; background: var(--line); color: var(--faint); font-weight: 900; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; animation: mvCheck 4.6s infinite; }
@keyframes mvCheck { 0%, 18% { background: var(--line); color: var(--faint); box-shadow: none; transform: none; } 22%, 30% { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-depth); transform: none; } 33% { transform: translateY(4px); box-shadow: none; } 36%, 100% { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-depth); } }
.mv-good { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 14px; background: var(--green-soft); color: var(--green-ink); font-family: var(--font-display); font-size: 1.1rem; opacity: 0; animation: mvGood 4.6s infinite; }
.mv-good svg { width: 28px; height: 28px; }
@keyframes mvGood { 0%, 36% { opacity: 0; transform: translateY(12px); } 42%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* remember answers */
.mv-memo { justify-items: start; }
.mv-memo-btn { position: relative; display: inline-grid !important; grid-template-columns: 18px auto; animation: mvMemo 5s infinite; }
.mv-memo-btn svg { width: 18px; height: 18px; }
.mv-memo-btn .mv-memo-a, .mv-memo-btn .mv-memo-b { grid-column: 2; grid-row: 1; }
.mv-memo-b { text-transform: none; letter-spacing: 0; opacity: 0; animation: mvMemoB 5s infinite; }
.mv-memo-a { animation: mvMemoA 5s infinite; }
@keyframes mvMemo { 0%, 30% { border-color: var(--dbm-line); color: var(--dbm-ink); } 36%, 88% { border-color: var(--dbm-green); color: var(--dbm-green-edge); } }
@keyframes mvMemoA { 0%, 32% { opacity: 1; } 36%, 88% { opacity: 0; } 92%, 100% { opacity: 1; } }
@keyframes mvMemoB { 0%, 32% { opacity: 0; } 36%, 88% { opacity: 1; } 92%, 100% { opacity: 0; } }
.mv-note { color: var(--muted); font-size: .78rem; font-weight: 800; }

/* hard mode */
.mv-hard .dbm-chips { margin: 0; }
.mv-hard .dbm-chip { pointer-events: none; }
.mv-hfield { position: relative; height: 50px; padding: 12px 14px; border: 2px solid var(--blue); border-radius: 14px; background: var(--surface); animation: mvHField 6s infinite; }
.mv-htext { display: block; white-space: nowrap; clip-path: inset(0 100% 0 0); animation: mvTypeH 6s steps(20) infinite; }
@keyframes mvTypeH { 0%, 4% { clip-path: inset(0 100% 0 0); } 40%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes mvHField { 0%, 44% { border-color: var(--blue); opacity: 1; } 48% { border-color: var(--green); } 56%, 92% { opacity: .35; border-color: var(--green); } 100% { opacity: 1; } }
.mv-hline { display: flex; gap: 6px; min-height: 40px; }
.mv-hline span { padding: 6px 11px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px; background: var(--surface); opacity: 0; animation: mvTap 6s var(--ease-spring) infinite; }
.mv-hline span:nth-child(2) { animation-delay: .15s; } .mv-hline span:nth-child(3) { animation-delay: .3s; } .mv-hline span:nth-child(4) { animation-delay: .45s; }
@keyframes mvTap { 0%, 48% { opacity: 0; transform: translateY(18px) scale(.8); } 54%, 90% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }

/* highlight my next lesson */
.mv-next { height: 100%; overflow: hidden; }
.mv-path { display: grid; justify-items: center; gap: 12px; animation: mvScroll 5s var(--ease-out) infinite; }
.mv-path .n { display: grid; place-items: center; width: 50px; height: 44px; border-radius: 50%; background: var(--line); box-shadow: 0 5px 0 var(--line-strong); color: var(--faint); }
.mv-path .n svg { width: 22px; height: 22px; }
.mv-path .n:nth-child(2) { translate: 34px 0; } .mv-path .n:nth-child(3) { translate: 46px 0; } .mv-path .n:nth-child(4) { translate: 20px 0; } .mv-path .n:nth-child(5) { translate: -16px 0; }
.mv-path .n.is-done { background: var(--gold); box-shadow: 0 5px 0 var(--gold-depth); color: #fff; }
.mv-path .n.is-next { background: var(--green); box-shadow: 0 5px 0 var(--green-depth); color: #fff; outline: 4px solid var(--blue); animation: nextPulse 1.6s var(--ease-out) infinite; }
@keyframes mvScroll { 0%, 10% { transform: translateY(60px); } 40%, 100% { transform: translateY(-40px); } }

/* new word meanings */
.mv-words .mv-bubble > span { font-size: 1.05rem; padding-bottom: 22px; }
.mv-words u { text-decoration: underline dotted var(--faint) 2px; text-underline-offset: 5px; }
.mv-new { position: relative; display: inline-block; text-decoration-color: var(--blue) !important; }
.mv-new::after { content: attr(data-mean); position: absolute; left: 50%; top: 100%; translate: -50% 4px; font: 800 .75rem var(--font-body); color: var(--blue); animation: mvMean 4s var(--ease-spring) infinite; }
@keyframes mvMean { 0%, 20% { opacity: 0; transform: translateY(-6px); } 30%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* guidebook buttons */
.mv-unit { padding: 14px 16px; border-radius: 16px; background: var(--green); box-shadow: 0 4px 0 var(--green-depth); color: #fff; }
.mv-unit small { display: block; font-size: .68rem; font-weight: 900; letter-spacing: .1em; opacity: .85; }
.mv-unit strong { font: 700 1.15rem var(--font-display); }
.mv-unit .dbm-guide { margin: 8px 0 0; }
.mv-unit .dbm-btn { padding: 5px 11px; font-size: 11px; border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .16); color: #fff; animation: mvGuide 4.4s var(--ease-spring) infinite; }
.mv-unit .dbm-btn + .dbm-btn { animation-delay: .15s; }
@keyframes mvGuide { 0%, 15% { opacity: 0; transform: scale(.6); } 25%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* automations */
.auto-stack { display: grid; gap: 16px; max-width: 460px; width: 100%; margin-inline: auto; }
.auto-card .auto-time { padding: 4px 10px; border-radius: 10px; background: #2c3941; color: #cfe0e8; font: 800 .8rem var(--font-body); }
.guard-steps { position: relative; height: 26px; font-weight: 800; color: #cfe0e8; }
.guard-steps span { position: absolute; inset: 0; opacity: 0; }
.guard-steps .g1 { animation: gStep 6s infinite; } .guard-steps .g2 { animation: gStep 6s infinite 2s; } .guard-steps .g3 { animation: gStep 6s infinite 4s; color: #93d333; }
@keyframes gStep { 0% { opacity: 0; transform: translateY(8px); } 6%, 30% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; } }
.guard-flame { display: flex; align-items: baseline; gap: 8px; }
.flame-num { position: relative; display: inline-block; width: 2.6ch; height: 1.1em; font: 700 2rem/1 var(--font-display); color: #ff9600; }
.flame-num b { position: absolute; left: 0; top: 0; }
.flame-num .f-a { animation: fA 6s infinite; } .flame-num .f-b { animation: fB 6s infinite; }
@keyframes fA { 0%, 66% { opacity: 1; transform: none; } 70%, 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes fB { 0%, 68% { opacity: 0; transform: translateY(14px); } 72%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.guard-flame small { color: #9fb0b9; font-weight: 800; }
.auto-card .db-mods-progress { height: 14px; border-radius: 99px; background: #2c3941; overflow: hidden; }
.auto-card .db-mods-progress-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #58cc02, #89e219); transition: width .35s var(--ease-out); }
.farm-meta { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; font-size: .88rem; color: #cfe0e8; }
.farm-meta span:last-child { color: #9fb0b9; }
.farm-days { display: flex; gap: 6px; }
.farm-days span { flex: 1; padding: 5px 0; border-radius: 10px; background: #2c3941; color: #6c818a; text-align: center; font-size: .75rem; font-weight: 900; }
.farm-days span.on { background: color-mix(in srgb, #1cb0f6 30%, #1f2c33); color: #8fd9ff; }

/* toolbar icon */
.tb-demo { display: grid; gap: 14px; max-width: 460px; width: 100%; margin-inline: auto; }
.tb-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.tb-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.tb-url { flex: 1; min-width: 0; margin-left: 6px; padding: 5px 12px; border-radius: 99px; background: var(--surface); color: var(--muted); font-size: .85rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); }
.tb-icon img { width: 28px; height: 28px; }
.tb-icon b { position: absolute; right: -8px; bottom: -6px; min-width: 22px; padding: 1px 5px; border-radius: 6px; background: #ff9600; color: #fff; font-size: .7rem; font-weight: 900; text-align: center; transition: background-color .3s; }
.tb-icon b.is-pop { animation: nodePop .5s var(--ease-spring); }
.tb-caption { min-height: 1.4em; text-align: center; color: var(--muted); font-weight: 800; font-size: .9rem; }
.tb-menu { justify-self: end; display: grid; width: min(330px, 100%); padding: 6px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .4); font: 600 .85rem system-ui, sans-serif; color: var(--ink-strong); }
.tb-menu span { padding: 5px 12px; border-radius: 6px; }
.tb-menu span.is-off { color: var(--faint); }
.tb-menu hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--line); }
.tb-menu__guard { background: var(--blue-soft); color: var(--blue-ink); }

/* home: the mods teaser */
.mods-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.mods-more a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; background: var(--surface); color: var(--ink-strong); font-weight: 800; text-decoration: none; transition: translate .2s var(--ease-spring), border-color .2s; }
.mods-more a:hover { translate: 0 -3px; border-color: var(--purple); }
.mods-more a svg { width: 18px; height: 18px; color: var(--purple); }

@media (prefers-reduced-motion: reduce) {
  .mv *, .mv *::before, .mv *::after, .auto-card *, .mcard { animation: none !important; transition: none !important; }
  .mv-ad, .mv-card, .mv-flash, .mv-tline--b, .mv-memo-b { display: none; }
  .mv-tin, .mv-htext { clip-path: none; }
  .mv-hline span, .mv-tline .dbm-typing, .mv-good { opacity: 1; }
}

.mcard--cta { grid-column: span 2; justify-content: center; gap: 14px; padding: clamp(22px, 3vw, 34px); border: 0; background: linear-gradient(140deg, #3b1f5c, #1d1430); color: #fff; }
.mcard--cta h3 { color: #fff; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); line-height: 1.1; }
.mcard--cta p { color: #cdb8e8; max-width: 52ch; }
.mcard--cta p b { color: #fff; }
.mcard--cta .btn-row { margin-top: 4px; }
@media (max-width: 760px) { .mcard--cta { grid-column: auto; } }
.mv-hints .mv-opt { padding: 6px 12px; }
