/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Smooth Turbo page transitions */
@media (prefers-reduced-motion: no-preference) {
  :root {
    view-transition-name: none;
  }
}

/* Prevent flash of white during page transitions */
html {
  background-color: #0f172a;
  overflow-x: hidden;
}

/* Prevent horizontal scrolling and wobble on mobile */
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Smooth fade transition for Turbo navigation */
.turbo-progress-bar {
  background-color: #6366f1;
  height: 3px;
}

/* Prevent layout shift during transitions */
main {
  min-height: 50vh;
  overflow-x: hidden;
}

:root {
  --surface-page: #070c1b;
  --surface-card: #121a31;
  --surface-raised: #1a2441;
  --accent-primary: #5757f6;
  --accent-bright: #22d3ee;
  --text-muted: #98a6c5;
  --motion-fast: 160ms;
  --motion-card: 380ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.is-today-page {
  background:
    radial-gradient(circle at 50% 16%, rgba(67, 78, 176, 0.18), transparent 26rem),
    var(--surface-page);
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.app-topbar {
  background: rgba(12, 18, 36, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(18px);
}

.app-icon-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #cbd5e1;
  transition: color var(--motion-fast), background-color var(--motion-fast), transform var(--motion-fast);
}

.app-icon-button:hover,
.app-icon-button:focus-visible {
  color: white;
  background: rgba(71, 85, 105, 0.55);
}

.app-icon-button:active { transform: scale(0.94); }
.app-icon-button i.hidden { display: none !important; }

.app-desktop-links { display: none; }

.app-drawer {
  bottom: calc(4rem + env(safe-area-inset-bottom));
}

.today-topbar,
.today-footer {
  display: none;
}

.app-nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.8rem;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color var(--motion-fast), background-color var(--motion-fast);
}

.app-nav-link:hover,
.app-nav-link.is-active {
  color: white;
  background: rgba(87, 87, 246, 0.16);
}

.mobile-drawer-link {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  color: #a9b5cc;
  font-weight: 600;
  transition: background-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}

.mobile-drawer-link:hover,
.mobile-drawer-link.is-active {
  color: white;
  background: rgba(87, 87, 246, 0.18);
}

.mobile-drawer-link:active { transform: scale(0.98); }

.app-bottom-nav {
  position: fixed;
  z-index: 80;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 16, 33, 0.96);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  backdrop-filter: blur(20px);
}

@media (min-width: 1024px) {
  .app-bottom-nav { display: none; }
  .app-drawer { bottom: 0; }
  .today-topbar,
  .today-footer { display: block; }
}

@media (min-width: 1200px) {
  .app-menu-button { display: none; }
  .app-desktop-links { display: flex; }
  .app-drawer { display: none !important; }
}

.app-page {
  width: min(100%, 72rem);
  margin-inline: auto;
}

.app-page--narrow {
  width: min(100%, 48rem);
}

.app-page__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.app-page__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.9rem;
}

.app-page__icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background: rgba(99, 102, 241, 0.14);
  color: #a5b4fc;
  font-size: 1.1rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

.app-page__kicker {
  color: #67e8f9;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.app-page__title {
  margin-top: 0.15rem;
  color: #fff;
  font-size: clamp(1.65rem, 5vw, 2.1rem);
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.app-page__subtitle {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.app-surface {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(18, 26, 49, 0.94);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
}

.collection-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.collection-card {
  position: relative;
  display: block;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 23px;
  background: #151e38;
  padding: 1.15rem;
  box-shadow: 0 9px 0 -5px #202a49, 0 20px 42px rgba(0, 0, 0, 0.22);
  transition: transform var(--motion-fast), border-color var(--motion-fast), background-color var(--motion-fast), box-shadow var(--motion-fast);
}

.collection-card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.55);
  background: #192441;
  box-shadow: 0 12px 0 -6px #253153, 0 26px 52px rgba(0, 0, 0, 0.3);
}

.collection-card:active { transform: translateY(0) scale(0.99); }

.collection-card__top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.collection-card__icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  font-size: 1.25rem;
}

.collection-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.app-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(51, 65, 85, 0.55);
  color: #cbd5e1;
  font-size: 0.72rem;
}

.app-empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.app-empty-state__icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.14);
  color: #a5b4fc;
  font-size: 1.45rem;
}

.settings-choice {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(30, 41, 59, 0.65);
  color: #e2e8f0;
  transition: border-color var(--motion-fast), background-color var(--motion-fast), transform var(--motion-fast);
}

.settings-choice:hover,
.settings-choice.is-active {
  border-color: rgba(129, 140, 248, 0.7);
  background: rgba(99, 102, 241, 0.16);
}

.settings-choice:active { transform: scale(0.985); }

.settings-choice__icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.72);
  color: #a5b4fc;
}

.auth-shell {
  width: min(100%, 30rem);
  margin-inline: auto;
  padding-block: 1.25rem 2rem;
}

.auth-card {
  overflow: hidden;
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 26px;
  background: #151e38;
  box-shadow: 0 10px 0 -5px #202a49, 0 28px 58px rgba(0, 0, 0, 0.3);
}

.auth-card__header {
  padding: 1.5rem 1.25rem 1.1rem;
  text-align: center;
}

.auth-card__icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 19px;
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  font-size: 1.25rem;
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.22);
}

.auth-card__title {
  margin-top: 1rem;
  color: white;
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.auth-card__subtitle {
  margin: 0.35rem auto 0;
  max-width: 24rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-card__body {
  padding: 0.4rem 1.25rem 1.5rem;
}

.form-section {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(18, 26, 49, 0.94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.form-section__header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.2rem 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.form-section__icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.form-section__body { padding: 1.25rem; }

.form-fieldset {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.42);
  padding: 1rem;
}

.form-fieldset legend {
  padding-inline: 0.5rem;
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
}

.selection-card {
  display: flex;
  min-height: 56px;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 17px;
  background: rgba(30, 41, 59, 0.6);
  padding: 0.8rem;
  transition: border-color var(--motion-fast), background-color var(--motion-fast), transform var(--motion-fast);
}

.selection-card:hover,
.selection-card:has(input:checked) {
  border-color: rgba(129, 140, 248, 0.58);
  background: rgba(99, 102, 241, 0.12);
}

.selection-card:active { transform: scale(0.992); }
.selection-card input:disabled + span { opacity: 0.5; }

.form-fieldset > .selection-card:not(:has(input:checked)) {
  border-color: transparent;
  background: transparent;
}

.danger-surface {
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 22px;
  background: rgba(127, 29, 29, 0.1);
  padding: 1.25rem;
}

.legal-document {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(18, 26, 49, 0.94);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.2);
}

.legal-document__section {
  padding: 1.25rem;
  color: #cbd5e1;
  line-height: 1.7;
}

.legal-document__section + .legal-document__section {
  border-top: 1px solid rgba(148, 163, 184, 0.13);
}

.brain-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}

.brain-score {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brain-game-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 23px;
  background: #151e38;
  padding: 1.15rem;
  box-shadow: 0 9px 0 -5px #202a49, 0 20px 42px rgba(0, 0, 0, 0.22);
  transition: transform var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.brain-game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.48);
  box-shadow: 0 12px 0 -6px #253153, 0 26px 52px rgba(0, 0, 0, 0.3);
}

@media (min-width: 640px) {
  .auth-card__header { padding: 1.75rem 1.75rem 1.2rem; }
  .auth-card__body { padding: 0.5rem 1.75rem 1.75rem; }
  .form-section__header,
  .form-section__body,
  .legal-document__section { padding: 1.5rem; }
  .brain-summary { grid-template-columns: auto minmax(0, 1fr); }
}

@media (min-width: 640px) {
  .app-page__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .collection-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.bottom-nav-link {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: #74809b;
  font-size: 1rem;
  transition: color var(--motion-fast), background-color var(--motion-fast), transform var(--motion-fast);
}

.bottom-nav-link span { font-size: 0.68rem; font-weight: 600; }
.bottom-nav-link i.hidden { display: none !important; }
.bottom-nav-link.is-active { color: #818cf8; }
.bottom-nav-link:active { transform: scale(0.94); }

.today-dashboard {
  width: min(100%, 30rem);
  margin: 0 auto;
  padding: max(2.35rem, env(safe-area-inset-top)) 1.1rem 1rem;
}

.today-dashboard__header,
.today-dashboard__intro,
.today-streak,
.today-deck__categories {
  animation: rise-in 520ms var(--ease-out) both;
}

.today-dashboard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.today-dashboard__eyebrow {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
}

.today-dashboard__date {
  margin-top: 0.1rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.today-dashboard__profile {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #818cf8, #22d3ee);
  transition: transform var(--motion-fast);
}

.today-dashboard__profile:active { transform: scale(0.94); }
.today-dashboard__avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid var(--surface-page); }
.today-dashboard__online { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #34d399; border: 2px solid var(--surface-page); }

.today-dashboard__intro { margin: 1.85rem 0 1.25rem; animation-delay: 50ms; }
.today-dashboard__intro h1 { color: white; font-size: clamp(1.55rem, 7vw, 2.15rem); line-height: 1.12; font-weight: 750; letter-spacing: -0.035em; }
.today-dashboard__intro p { margin-top: 0.28rem; color: var(--text-muted); font-size: 0.92rem; }

.today-deck { outline: none; }
.today-deck__panel { animation: deck-enter 420ms var(--ease-out) both; }

.today-card {
  position: relative;
  min-height: 334px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(129, 140, 248, 0.44);
  background: linear-gradient(155deg, #20294a 0%, #141c34 58%, #11182d 100%);
  box-shadow:
    0 11px 0 -5px #242d4e,
    0 21px 0 -10px #18213c,
    0 0 0 1px rgba(34, 211, 238, 0.1),
    0 30px 65px rgba(0, 0, 0, 0.38);
}

.today-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 78% 25%, rgba(34, 211, 238, 0.13), transparent 38%);
}

.today-card__category {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(8, 14, 31, 0.72);
  border: 1px solid rgba(129, 140, 248, 0.28);
  color: #dbeafe;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.today-card__visual {
  position: relative;
  width: 100%;
  height: 245px;
  overflow: hidden;
  background:
    linear-gradient(rgba(129, 140, 248, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 140, 248, 0.075) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, rgba(99, 102, 241, 0.32), transparent 34%),
    radial-gradient(circle at 78% 28%, rgba(34, 211, 238, 0.16), transparent 28%);
  background-size: 34px 34px, 34px 34px, auto, auto;
  mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
}

.today-card__visual::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 52px;
  left: 50%;
  bottom: 29px;
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.62);
  filter: blur(13px);
  transform: translateX(-50%);
}

.today-card__visual-icon {
  position: absolute;
  z-index: 2;
  top: 54%;
  left: 50%;
  display: flex;
  width: 104px;
  height: 104px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(165, 180, 252, 0.58);
  border-radius: 31px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.95), rgba(124, 58, 237, 0.88));
  color: white;
  font-size: 2.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 24px 54px rgba(79, 70, 229, 0.5);
  transform: translate(-50%, -50%) rotate(-4deg);
}

.today-card__visual-orbit {
  position: absolute;
  top: 54%;
  left: 50%;
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
}

.today-card__visual-orbit--inner { width: 180px; height: 112px; }
.today-card__visual-orbit--outer { width: 290px; height: 170px; border-color: rgba(34, 211, 238, 0.16); transform: translate(-50%, -50%) rotate(12deg); }

.today-card__visual-note {
  position: absolute;
  z-index: 3;
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(165, 180, 252, 0.35);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: #a5b4fc;
  font-size: 0.72rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.today-card__visual-note--one { top: 33%; left: 20%; transform: rotate(-10deg); }
.today-card__visual-note--two { top: 27%; right: 19%; color: #67e8f9; transform: rotate(9deg); }
.today-card__visual-note--three { right: 25%; bottom: 19%; color: #c4b5fd; transform: rotate(-7deg); }

.today-card__content {
  position: relative;
  z-index: 2;
  margin-top: -3.5rem;
  padding: 0 1.25rem 1.25rem;
}

.today-card__content h2 { color: white; font-size: 1.45rem; line-height: 1.15; font-weight: 750; letter-spacing: -0.025em; }
.today-card__content p { margin-top: 0.6rem; color: var(--text-muted); font-size: 0.78rem; }
.today-card__progress { width: 100%; height: 4px; margin-top: 0.95rem; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, 0.15); }
.today-card__progress span { display: block; width: 68%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6366f1, #22d3ee); }
.today-card--empty { min-height: 300px; }

.today-dashboard__start {
  width: 100%;
  min-height: 54px;
  margin-top: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 17px;
  background: linear-gradient(135deg, #5958f6, #6d5dfb);
  color: white;
  font-weight: 750;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.35);
  transition: transform var(--motion-fast), box-shadow var(--motion-fast), filter var(--motion-fast);
}

.today-dashboard__start:hover { filter: brightness(1.08); box-shadow: 0 16px 34px rgba(79, 70, 229, 0.43); }
.today-dashboard__start:active { transform: translateY(2px) scale(0.985); }

.today-deck__categories { display: flex; justify-content: center; gap: 0.65rem; margin: 1.3rem 0 0.55rem; animation-delay: 150ms; }
.today-deck__category-button { width: 44px; height: 44px; border-radius: 14px; color: #7f8aa6; background: #11182c; border: 1px solid rgba(148, 163, 184, 0.13); transition: color var(--motion-fast), background-color var(--motion-fast), transform var(--motion-fast), border-color var(--motion-fast); }
.today-deck__category-button:hover,
.today-deck__category-button.is-active { color: white; background: #5254e8; border-color: #818cf8; transform: translateY(-2px); }

.today-deck__dots { display: flex; justify-content: center; gap: 0.48rem; }
.today-deck__dots span { width: 6px; height: 6px; border-radius: 50%; background: #33415f; transition: width var(--motion-fast), background-color var(--motion-fast); }
.today-deck__dots span.is-active { width: 18px; border-radius: 999px; background: #6366f1; }

.today-streak {
  margin-top: 1.05rem;
  padding: 0.75rem 0.85rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.25fr;
  align-items: center;
  gap: 0.7rem;
  border-radius: 20px;
  background: rgba(18, 26, 49, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.13);
  animation-delay: 210ms;
}

.today-streak__summary { display: flex; min-width: 0; align-items: center; gap: 0.45rem; }
.today-streak__summary > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.today-streak__summary strong { overflow: hidden; color: white; font-size: 0.75rem; white-space: nowrap; text-overflow: ellipsis; }
.today-streak__summary small { overflow: hidden; color: var(--text-muted); font-size: 0.6rem; white-space: nowrap; text-overflow: ellipsis; }
.today-streak__icon { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 11px; color: #fb923c; background: rgba(251, 146, 60, 0.13); }
.today-streak__week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.18rem; }
.today-streak__day { min-width: 0; display: flex; min-height: 28px; align-items: center; justify-content: center; border-radius: 9px; background: rgba(71, 85, 105, 0.24); color: #64748b; }
.today-streak__day i { display: none; font-size: 0.62rem; }
.today-streak__day small { font-size: 0.64rem; font-weight: 700; }
.today-streak__day.is-active { color: #c4b5fd; background: rgba(99, 102, 241, 0.28); }
.today-streak__day.is-active i { display: block; }
.today-streak__day.is-active small { display: none; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes deck-enter {
  from { opacity: 0; transform: translateX(16px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (min-width: 768px) {
  .today-dashboard { padding-top: 0; }
  .today-card { min-height: 350px; }
  .today-card__visual { height: 255px; }
}

/* Fix table overflow on mobile */
@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent text from causing overflow */
  * {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }
}

.flashcard-scene {
  perspective: 1200px;
}

.flashcard {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform var(--motion-card) var(--ease-out), height 0.25s var(--ease-out);
}

.flashcard-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  backface-visibility: hidden;
  background-color: #0f172a;
  border-radius: 1.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(129, 140, 248, 0.3);
  box-shadow: 0 18px 0 -12px #242d4e, 0 28px 55px rgba(0, 0, 0, 0.34);
}

.flashcard-back {
  transform: rotateY(180deg);
}

.flashcard.is-flipped {
  transform: rotateY(180deg);
}

.realtime-voice-orb {
  position: relative;
  isolation: isolate;
  transition: transform 240ms ease, filter 240ms ease;
}

.realtime-quiz-dock {
  right: 0.75rem;
  bottom: calc(5.75rem + env(safe-area-inset-bottom));
  left: 0.75rem;
}

@media (min-width: 640px) {
  .realtime-quiz-dock {
    right: 1.25rem;
    bottom: 1.25rem;
    left: auto;
    width: min(22rem, calc(100vw - 2.5rem));
  }
}

.realtime-voice-orb::before,
.realtime-voice-orb::after {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: -1;
  border: 1px solid rgba(129, 140, 248, 0.45);
  border-radius: 9999px;
  opacity: 0;
}

.realtime-voice-orb[data-state="connecting"] {
  animation: realtime-orb-breathe 1.6s ease-in-out infinite;
}

.realtime-voice-orb[data-state="speaking"] {
  animation: realtime-orb-speak 760ms ease-in-out infinite alternate;
}

.realtime-voice-orb[data-state="listening"]::before,
.realtime-voice-orb[data-state="listening"]::after {
  animation: realtime-orb-ripple 1.8s ease-out infinite;
}

.realtime-voice-orb[data-state="listening"]::after {
  animation-delay: 600ms;
}

.realtime-voice-orb[data-state="ready"] {
  filter: saturate(1.2) brightness(1.08);
  transform: scale(1.04);
}

.realtime-voice-orb[data-state="error"] {
  filter: grayscale(0.25) hue-rotate(90deg);
}

.mc-option-letter {
  display: inline-flex;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(165, 180, 252, 0.52);
  border-radius: 0.8rem;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.32), rgba(34, 211, 238, 0.12));
  color: #e0e7ff;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

label:has(> input:checked) .mc-option-letter {
  border-color: rgba(103, 232, 249, 0.8);
  background: linear-gradient(145deg, #6366f1, #0891b2);
  color: white;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.3);
}

@keyframes realtime-orb-breathe {
  0%, 100% { transform: scale(0.96); opacity: 0.82; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes realtime-orb-speak {
  from { transform: scale(0.98); box-shadow: 0 12px 40px rgba(99, 102, 241, 0.28); }
  to { transform: scale(1.07); box-shadow: 0 16px 52px rgba(124, 58, 237, 0.5); }
}

@keyframes realtime-orb-ripple {
  0% { transform: scale(0.84); opacity: 0.72; }
  100% { transform: scale(1.42); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Markdown content styling for rendered Markdown with LaTeX */
.markdown-content {
  line-height: 1.6;
}

.markdown-content p {
  margin-bottom: 0.5em;
}

.markdown-content p:last-child {
  margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
  margin-left: 1.5em;
  margin-bottom: 0.5em;
}

.markdown-content li {
  margin-bottom: 0.25em;
}

.markdown-content code {
  background-color: rgba(99, 102, 241, 0.2);
  padding: 0.125em 0.25em;
  border-radius: 0.25em;
  font-family: ui-monospace, monospace;
  font-size: 0.875em;
}

.markdown-content pre {
  background-color: rgba(30, 41, 59, 0.8);
  padding: 1em;
  border-radius: 0.5em;
  overflow-x: auto;
  margin-bottom: 0.5em;
}

.markdown-content pre code {
  background-color: transparent;
  padding: 0;
}

.markdown-content blockquote {
  border-left: 3px solid #6366f1;
  padding-left: 1em;
  margin-left: 0;
  color: #94a3b8;
}

.markdown-content strong {
  font-weight: 600;
}

.markdown-content em {
  font-style: italic;
}

/* MathJax display math spacing */
.markdown-content .MathJax_Display {
  margin: 0.5em 0;
}

/* Public landing page */
.is-landing-page {
  background: #050816;
}

.landing-navigation {
  position: absolute;
  inset: 0 0 auto;
}

.landing-topbar {
  border-bottom-color: rgba(148, 163, 184, 0.1);
  background: rgba(5, 8, 22, 0.58);
  backdrop-filter: blur(24px);
}

.landing-main {
  min-height: 100vh;
  overflow: visible;
}

.landing-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: #060917;
}

.landing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(circle at 50% 7%, rgba(82, 69, 255, 0.16), transparent 31rem),
    linear-gradient(180deg, #050816 0%, #070b1b 57%, #050816 100%);
}

.landing-shell {
  width: min(100% - 2.5rem, 76rem);
  margin-inline: auto;
}

.landing-grid {
  position: absolute;
  inset: 0 0 auto;
  z-index: -2;
  height: 56rem;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(129, 140, 248, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 140, 248, 0.13) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  transform: perspective(620px) rotateX(62deg) scale(1.45) translateY(-11%);
  transform-origin: top;
}

.landing-aurora {
  position: absolute;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.2;
  pointer-events: none;
}

.landing-aurora--one {
  top: 4rem;
  left: -20rem;
  background: #6366f1;
  animation: landing-aurora-one 12s ease-in-out infinite alternate;
}

.landing-aurora--two {
  top: 13rem;
  right: -21rem;
  background: #06b6d4;
  animation: landing-aurora-two 14s ease-in-out infinite alternate;
}

.landing-hero {
  position: relative;
  display: flex;
  min-height: max(52rem, calc(100svh - 3.5rem));
  padding: 7.5rem 0 5rem;
  align-items: center;
}

.landing-hero__layout {
  display: grid;
  align-items: center;
  gap: 4rem;
}

.landing-hero__copy {
  position: relative;
  z-index: 3;
  text-align: center;
}

.landing-eyebrow {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(165, 180, 252, 0.28);
  border-radius: 999px;
  color: #c7d2fe;
  background: rgba(79, 70, 229, 0.12);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.landing-eyebrow__pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 12px #22d3ee;
}

.landing-eyebrow__pulse::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(103, 232, 249, 0.65);
  border-radius: inherit;
  animation: landing-ping 1.8s ease-out infinite;
}

.landing-hero__title {
  max-width: 12ch;
  margin: 1.5rem auto 0;
  color: #f8fafc;
  font-size: clamp(3rem, 12vw, 6.2rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.landing-hero__title span {
  display: block;
  padding-bottom: 0.08em;
  color: transparent;
  background: linear-gradient(100deg, #818cf8 7%, #c084fc 46%, #67e8f9 88%);
  background-size: 180% 180%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: landing-gradient 6s ease infinite;
}

.landing-hero__subtitle {
  max-width: 38rem;
  margin: 1.5rem auto 0;
  color: #aebbd2;
  font-size: clamp(1rem, 3.5vw, 1.18rem);
  line-height: 1.7;
}

.landing-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.landing-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 750;
  transition: transform 220ms var(--ease-out), box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.landing-button:hover { transform: translateY(-2px); }
.landing-button:active { transform: translateY(0) scale(0.98); }
.landing-button:focus-visible { outline: 3px solid rgba(103, 232, 249, 0.55); outline-offset: 3px; }

.landing-button--primary {
  color: white;
  background: linear-gradient(120deg, #5958f5, #7c3aed 64%, #0891b2);
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.34), inset 0 1px rgba(255, 255, 255, 0.2);
}

.landing-button--primary:hover { box-shadow: 0 22px 55px rgba(79, 70, 229, 0.48), inset 0 1px rgba(255, 255, 255, 0.2); }

.landing-button--ghost {
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
}

.landing-button--ghost:hover { border-color: rgba(129, 140, 248, 0.45); background: rgba(30, 41, 59, 0.7); }

.landing-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 1.6rem;
  color: #7f8da7;
  font-size: 0.73rem;
  font-weight: 650;
}

.landing-proof span { display: inline-flex; align-items: center; gap: 0.4rem; }
.landing-proof i { color: #818cf8; }

.landing-showcase {
  --landing-tilt-x: 0deg;
  --landing-tilt-y: 0deg;
  position: relative;
  width: min(100%, 34rem);
  margin-inline: auto;
  padding: 1rem 0;
  perspective: 1100px;
}

.landing-demo {
  position: relative;
  transform: rotateX(var(--landing-tilt-x)) rotateY(var(--landing-tilt-y));
  transform-style: preserve-3d;
  transition: transform 180ms ease-out;
}

.landing-demo::before,
.landing-demo::after {
  content: "";
  position: absolute;
  inset: 1.5rem 0.85rem -0.75rem;
  z-index: -2;
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 28px;
  background: rgba(22, 28, 57, 0.7);
  transform: translateZ(-30px) rotate(2.3deg);
}

.landing-demo::after {
  inset: 2.2rem 1.25rem -1.25rem;
  z-index: -3;
  opacity: 0.65;
  transform: translateZ(-50px) rotate(-2deg);
}

.landing-demo__glow {
  position: absolute;
  inset: 12% 7%;
  z-index: -4;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  filter: blur(58px);
  opacity: 0.28;
  animation: landing-card-glow 4.8s ease-in-out infinite alternate;
}

.landing-demo__card {
  overflow: hidden;
  border: 1px solid rgba(165, 180, 252, 0.22);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(19, 27, 54, 0.97), rgba(9, 14, 34, 0.98));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.46), inset 0 1px rgba(255, 255, 255, 0.08);
  transform: translateZ(22px);
  animation: landing-card-float 6s ease-in-out infinite;
}

.landing-demo__header,
.landing-demo__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.landing-demo__deck { display: flex; min-width: 0; align-items: center; gap: 0.75rem; }
.landing-demo__deck > div { display: flex; min-width: 0; flex-direction: column; }
.landing-demo__deck small { color: #7886a3; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.landing-demo__deck strong { overflow: hidden; color: white; font-size: 0.83rem; white-space: nowrap; text-overflow: ellipsis; }

.landing-demo__deck-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 14px;
  color: #67e8f9;
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.28), rgba(8, 145, 178, 0.16));
}

.landing-demo__progress {
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 9px;
  color: #a5b4fc;
  background: rgba(15, 23, 42, 0.7);
  font-size: 0.66rem;
  font-weight: 800;
}

.landing-demo__bar { height: 3px; margin-inline: 1rem; overflow: hidden; border-radius: 99px; background: rgba(71, 85, 105, 0.32); }
.landing-demo__bar span { display: block; width: 50%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6366f1, #22d3ee); box-shadow: 0 0 12px #6366f1; }

.landing-demo__body { padding: 1.25rem 1rem 1rem; }
.landing-demo__kicker { color: #818cf8; font-size: 0.63rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.landing-demo__body h2 { max-width: 28rem; margin-top: 0.48rem; color: white; font-size: clamp(1.1rem, 4vw, 1.42rem); font-weight: 720; line-height: 1.35; letter-spacing: -0.025em; }

.landing-demo__answers { display: grid; gap: 0.55rem; margin-top: 1.1rem; }

.landing-answer {
  display: grid;
  min-height: 48px;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 13px;
  color: #bac5d8;
  background: rgba(30, 41, 59, 0.47);
  text-align: left;
  font-size: 0.82rem;
  font-weight: 650;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.landing-answer > span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 10px;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  font-size: 0.68rem;
  font-weight: 850;
}

.landing-answer > i { opacity: 0; color: #6ee7b7; }
.landing-answer:hover { transform: translateX(3px); border-color: rgba(129, 140, 248, 0.45); color: white; background: rgba(79, 70, 229, 0.12); }
.landing-answer:focus-visible { outline: 2px solid #67e8f9; outline-offset: 2px; }
.landing-answer.is-correct { border-color: rgba(52, 211, 153, 0.55); color: #d1fae5; background: rgba(16, 185, 129, 0.13); }
.landing-answer.is-correct > span { border-color: rgba(52, 211, 153, 0.6); color: white; background: #059669; }
.landing-answer.is-correct > i { opacity: 1; }
.landing-answer.is-incorrect { border-color: rgba(251, 113, 133, 0.5); color: #ffe4e6; background: rgba(244, 63, 94, 0.1); animation: landing-shake 360ms ease; }

.landing-demo__feedback {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  color: #8492ae;
  font-size: 0.7rem;
  line-height: 1.45;
}

.landing-demo__feedback i { color: #a78bfa; }
.landing-demo__feedback.is-correct { color: #a7f3d0; }
.landing-demo__feedback.is-correct i { color: #34d399; }
.landing-demo__feedback.is-incorrect { color: #fecdd3; }
.landing-demo__feedback.is-incorrect i { color: #fb7185; }

.landing-demo__footer { border-top: 1px solid rgba(148, 163, 184, 0.1); background: rgba(6, 10, 26, 0.55); }

.landing-voice {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 0.55rem;
  color: #aebbd2;
  font-size: 0.7rem;
  font-weight: 700;
}

.landing-voice__orb {
  position: relative;
  display: inline-flex;
  width: 35px;
  height: 35px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.38);
}

.landing-voice.is-listening .landing-voice__orb { background: linear-gradient(135deg, #0891b2, #22d3ee); animation: landing-voice-pulse 1.2s ease-in-out infinite; }
.landing-voice:focus-visible { outline: 2px solid #67e8f9; outline-offset: 3px; border-radius: 12px; }

.landing-voice__waves { display: none; height: 21px; align-items: center; gap: 2px; }
.landing-voice.is-listening .landing-voice__waves { display: flex; }
.landing-voice__waves i { width: 2px; height: 35%; border-radius: 9px; background: #67e8f9; animation: landing-wave 700ms ease-in-out infinite alternate; }
.landing-voice__waves i:nth-child(2) { animation-delay: -220ms; }
.landing-voice__waves i:nth-child(3) { animation-delay: -430ms; }
.landing-voice__waves i:nth-child(4) { animation-delay: -100ms; }

.landing-demo__live { display: inline-flex; align-items: center; gap: 0.38rem; color: #64748b; font-size: 0.61rem; font-weight: 700; }
.landing-demo__live i { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; }

.landing-float {
  position: absolute;
  z-index: 8;
  display: none;
  align-items: center;
  border: 1px solid rgba(165, 180, 252, 0.2);
  background: rgba(13, 19, 42, 0.82);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  animation: landing-float 4.5s ease-in-out infinite;
}

.landing-float--streak { top: 4.5rem; left: -3.3rem; gap: 0.6rem; padding: 0.62rem 0.8rem; border-radius: 16px; }
.landing-float--streak > span { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 11px; color: #fb923c; background: rgba(251, 146, 60, 0.12); }
.landing-float--streak div { display: flex; flex-direction: column; }
.landing-float--streak strong { color: white; font-size: 0.85rem; line-height: 1; }
.landing-float--streak small { margin-top: 0.18rem; color: #7f8da7; font-size: 0.56rem; }
.landing-float--score { right: -2.5rem; bottom: 5.6rem; gap: 0.45rem; padding: 0.7rem 0.85rem; border-radius: 14px; color: #fde68a; animation-delay: -1.7s; }
.landing-float--score i { color: #facc15; }
.landing-float--score strong { font-size: 0.72rem; }

.landing-scroll-cue { position: absolute; bottom: 1.6rem; left: 50%; width: 23px; height: 37px; border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 99px; transform: translateX(-50%); }
.landing-scroll-cue span { position: absolute; top: 7px; left: 50%; width: 3px; height: 7px; border-radius: 99px; background: #a5b4fc; transform: translateX(-50%); animation: landing-scroll 2s ease-in-out infinite; }

.landing-marquee { width: min(calc(100% - 2.5rem), 76rem); margin-inline: auto; overflow: hidden; border: 1px solid rgba(129, 140, 248, 0.16); border-radius: 17px; background: rgba(13, 19, 44, 0.72); box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.035); transform: rotate(-0.35deg); }
.landing-marquee__track { display: flex; width: max-content; animation: landing-marquee 28s linear infinite; }
.landing-marquee__track span { display: inline-flex; min-height: 54px; align-items: center; gap: 0.7rem; padding-inline: 1.55rem; color: #aebbd2; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.landing-marquee__track i { color: #818cf8; font-size: 0.65rem; }

.landing-section { position: relative; padding: 6rem 0; }
.landing-section__heading { max-width: 42rem; margin-inline: auto; text-align: center; }
.landing-section__heading > p { color: #67e8f9; font-size: 0.7rem; font-weight: 850; letter-spacing: 0.15em; text-transform: uppercase; }
.landing-section__heading h2 { margin-top: 0.75rem; color: white; font-size: clamp(2.15rem, 8vw, 4rem); font-weight: 780; letter-spacing: -0.055em; line-height: 1.03; }
.landing-section__heading > span { display: block; margin-top: 1.1rem; color: #8f9db8; font-size: 0.98rem; line-height: 1.7; }

.landing-bento { display: grid; gap: 1rem; margin-top: 3rem; }
.landing-feature { position: relative; min-height: 20rem; overflow: hidden; padding: 1.5rem; border: 1px solid rgba(148, 163, 184, 0.13); border-radius: 25px; background: linear-gradient(145deg, rgba(18, 26, 52, 0.92), rgba(9, 14, 33, 0.94)); box-shadow: inset 0 1px rgba(255, 255, 255, 0.045), 0 30px 60px rgba(0, 0, 0, 0.16); transition: transform 300ms var(--ease-out), border-color 300ms ease; }
.landing-feature::after { content: ""; position: absolute; inset: auto -5rem -7rem auto; width: 13rem; height: 13rem; border-radius: 50%; background: #4f46e5; filter: blur(55px); opacity: 0.12; }
.landing-feature:hover { border-color: rgba(129, 140, 248, 0.3); transform: translateY(-5px); }
.landing-feature__icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border: 1px solid rgba(129, 140, 248, 0.26); border-radius: 15px; color: #c4b5fd; background: rgba(99, 102, 241, 0.13); box-shadow: inset 0 1px rgba(255, 255, 255, 0.06); }
.landing-feature__tag { margin-top: 1.4rem; color: #67e8f9 !important; font-size: 0.65rem !important; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.landing-feature h3 { max-width: 15ch; margin-top: 0.45rem; color: white; font-size: 1.55rem; font-weight: 740; line-height: 1.14; letter-spacing: -0.035em; }
.landing-feature > p:not(.landing-feature__tag) { max-width: 35rem; margin-top: 0.85rem; color: #8795b0; font-size: 0.88rem; line-height: 1.65; }

.landing-waveform { position: absolute; right: 1.5rem; bottom: 1.45rem; left: 1.5rem; display: flex; height: 55px; align-items: center; gap: 0.38rem; opacity: 0.75; }
.landing-waveform i { flex: 1; height: var(--wave-height); border-radius: 99px; background: linear-gradient(to top, #4f46e5, #22d3ee); transform-origin: center; animation: landing-waveform 1.5s ease-in-out infinite alternate; }
.landing-waveform i:nth-child(3n + 1) { animation-delay: -0.7s; }
.landing-waveform i:nth-child(3n + 2) { animation-delay: -1.1s; }

.landing-orbit { position: absolute; right: -2.5rem; bottom: -3.2rem; width: 12rem; height: 12rem; border: 1px solid rgba(129, 140, 248, 0.22); border-radius: 50%; animation: landing-orbit-spin 14s linear infinite; }
.landing-orbit::before { content: ""; position: absolute; inset: 1.7rem; border: 1px dashed rgba(103, 232, 249, 0.2); border-radius: 50%; }
.landing-orbit__center { position: absolute; inset: 50% auto auto 50%; display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 18px; color: #c4b5fd; background: rgba(79, 70, 229, 0.35); box-shadow: 0 0 35px rgba(99, 102, 241, 0.3); transform: translate(-50%, -50%); }
.landing-orbit__dot { position: absolute; width: 13px; height: 13px; border: 3px solid #11172d; border-radius: 50%; background: #67e8f9; box-shadow: 0 0 18px #22d3ee; }
.landing-orbit__dot--one { top: 1.15rem; left: 2.1rem; }
.landing-orbit__dot--two { right: 0.8rem; bottom: 3.2rem; background: #a78bfa; box-shadow: 0 0 18px #8b5cf6; }

.landing-mode-switch { position: absolute; right: 1.25rem; bottom: 1.25rem; left: 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; padding: 0.3rem; border: 1px solid rgba(148, 163, 184, 0.12); border-radius: 15px; background: rgba(5, 8, 22, 0.66); }
.landing-mode-switch span { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 0.45rem; border-radius: 11px; color: #64748b; font-size: 0.7rem; font-weight: 750; }
.landing-mode-switch .is-active { color: #dbeafe; background: linear-gradient(135deg, rgba(79, 70, 229, 0.5), rgba(8, 145, 178, 0.28)); box-shadow: inset 0 1px rgba(255, 255, 255, 0.08); }

.landing-avatars { position: absolute; right: 1.5rem; bottom: 1.5rem; display: flex; }
.landing-avatars span { display: inline-flex; width: 45px; height: 45px; align-items: center; justify-content: center; margin-left: -0.55rem; border: 3px solid #0d132a; border-radius: 50%; color: white; background: linear-gradient(135deg, #6366f1, #8b5cf6); font-size: 0.72rem; font-weight: 850; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24); }
.landing-avatars span:nth-child(2) { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.landing-avatars span:nth-child(3) { background: linear-gradient(135deg, #db2777, #8b5cf6); }
.landing-avatars span:last-child { color: #a5b4fc; background: #17203c; }

.landing-section--flow { border-top: 1px solid rgba(148, 163, 184, 0.09); background: rgba(5, 8, 22, 0.36); }
.landing-flow { display: grid; gap: 2.7rem; margin-top: 3.5rem; }
.landing-flow__step { position: relative; text-align: center; }
.landing-flow__number { position: absolute; top: -1.8rem; left: 50%; z-index: -1; color: rgba(129, 140, 248, 0.08); font-size: 5.5rem; font-weight: 900; line-height: 1; transform: translateX(-50%); }
.landing-flow__icon { display: inline-flex; width: 62px; height: 62px; align-items: center; justify-content: center; border: 1px solid rgba(129, 140, 248, 0.23); border-radius: 21px; color: #c4b5fd; background: linear-gradient(145deg, rgba(79, 70, 229, 0.24), rgba(8, 145, 178, 0.1)); box-shadow: 0 18px 35px rgba(0, 0, 0, 0.2); }
.landing-flow__step h3 { margin-top: 1.2rem; color: white; font-size: 1.2rem; font-weight: 750; }
.landing-flow__step p { max-width: 21rem; margin: 0.65rem auto 0; color: #8290aa; font-size: 0.85rem; line-height: 1.65; }

.landing-cta { position: relative; overflow: hidden; margin: 0 1.25rem 5rem; border: 1px solid rgba(165, 180, 252, 0.2); border-radius: 30px; background: linear-gradient(130deg, #3730a3, #6d28d9 55%, #0e7490); box-shadow: 0 35px 90px rgba(55, 48, 163, 0.3), inset 0 1px rgba(255, 255, 255, 0.15); }
.landing-cta__inner { position: relative; z-index: 2; padding: 4rem 0; text-align: center; }
.landing-cta__badge { display: inline-flex; align-items: center; gap: 0.5rem; color: #e0e7ff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.landing-cta h2 { max-width: 13ch; margin: 0.8rem auto 0; color: white; font-size: clamp(2.1rem, 8vw, 4.2rem); font-weight: 800; letter-spacing: -0.055em; line-height: 1; }
.landing-cta p { max-width: 36rem; margin: 1.1rem auto 0; color: #dbeafe; font-size: 0.95rem; line-height: 1.7; }
.landing-button--light { margin-top: 1.7rem; color: #312e81; background: white; box-shadow: 0 18px 42px rgba(30, 27, 75, 0.25); }
.landing-button--light:hover { box-shadow: 0 22px 55px rgba(30, 27, 75, 0.36); }
.landing-cta__orb { position: absolute; width: 18rem; height: 18rem; border-radius: 50%; filter: blur(40px); opacity: 0.25; }
.landing-cta__orb--one { top: -8rem; left: -6rem; background: #67e8f9; }
.landing-cta__orb--two { right: -5rem; bottom: -10rem; background: #f0abfc; }

.landing-reveal { opacity: 0; transform: translateY(26px); transition: opacity 750ms var(--ease-out), transform 750ms var(--ease-out); }
.landing-reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (min-width: 640px) {
  .landing-shell { width: min(100% - 4rem, 76rem); }
  .landing-marquee { width: min(calc(100% - 4rem), 76rem); }
  .landing-hero { padding-top: 8.5rem; }
  .landing-hero__actions { flex-direction: row; justify-content: center; }
  .landing-button { min-width: 170px; }
  .landing-demo__header, .landing-demo__footer { padding: 1.15rem 1.25rem; }
  .landing-demo__body { padding: 1.45rem 1.25rem 1.2rem; }
  .landing-demo__answers { grid-template-columns: 1fr 1fr; }
  .landing-float { display: flex; }
  .landing-bento { grid-template-columns: 1fr 1fr; }
  .landing-feature--voice { grid-column: span 2; }
  .landing-feature--groups { grid-column: span 2; }
  .landing-flow { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .landing-flow__step:not(:last-child)::after { content: ""; position: absolute; top: 30px; left: calc(50% + 45px); width: calc(100% - 90px); border-top: 1px dashed rgba(129, 140, 248, 0.25); }
  .landing-cta { margin-inline: 2rem; }
}

@media (min-width: 1024px) {
  .landing-hero { min-height: max(51rem, calc(100svh - 3.5rem)); padding-top: 7rem; }
  .landing-hero__layout { grid-template-columns: minmax(0, 1fr) minmax(28rem, 0.92fr); gap: 3.5rem; }
  .landing-hero__copy { text-align: left; }
  .landing-hero__title { margin-inline: 0; }
  .landing-hero__subtitle { margin-inline: 0; }
  .landing-hero__actions { justify-content: flex-start; }
  .landing-proof { justify-content: flex-start; }
  .landing-section { padding-block: 8rem; }
  .landing-bento { grid-template-columns: repeat(6, 1fr); }
  .landing-feature--voice { grid-column: span 4; }
  .landing-feature--adaptive { grid-column: span 2; }
  .landing-feature--exam, .landing-feature--groups { grid-column: span 3; }
  .landing-feature--voice { min-height: 22rem; }
  .landing-feature--adaptive { min-height: 22rem; }
  .landing-cta { width: min(calc(100% - 4rem), 76rem); margin: 0 auto 7rem; }
  .landing-cta__inner { padding-block: 5rem; }
}

@keyframes landing-gradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes landing-ping { 0% { opacity: 0.8; transform: scale(0.55); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes landing-aurora-one { to { transform: translate(10rem, 5rem) scale(1.15); } }
@keyframes landing-aurora-two { to { transform: translate(-9rem, -4rem) scale(0.86); } }
@keyframes landing-card-glow { to { opacity: 0.42; transform: scale(1.15); } }
@keyframes landing-card-float { 0%, 100% { transform: translateZ(22px) translateY(0); } 50% { transform: translateZ(22px) translateY(-7px); } }
@keyframes landing-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes landing-scroll { 0% { opacity: 0; transform: translate(-50%, 0); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 13px); } }
@keyframes landing-marquee { to { transform: translateX(-50%); } }
@keyframes landing-wave { to { height: 95%; } }
@keyframes landing-waveform { to { transform: scaleY(0.45); opacity: 0.5; } }
@keyframes landing-voice-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 30px rgba(34, 211, 238, 0.55); } }
@keyframes landing-orbit-spin { to { transform: rotate(360deg); } }
@keyframes landing-shake { 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }

@media (prefers-reduced-motion: reduce) {
  .landing-reveal { opacity: 1; transform: none; }
  .landing-demo, .landing-demo__card { transform: none !important; }
}
