@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@400;600;700;800&display=swap');

:root {
  --font-sans: 'Manrope', sans-serif;
  --font-display: 'Sora', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --tracking-tight: -0.025em;
  --tracking-tighter: -0.05em;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-relaxed: 1.625;
  --bg: #faf7f2;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-muted: #f4f1ea;
  --line: rgba(15, 15, 15, 0.08);
  --text: #1f2f2e;
  --text-soft: #677a78;
  --text-muted: #8da09d;
  --teal: #00bfa6;
  --teal-dark: #008f7c;
  --cyan: #47d9cd;
  --violet: #9b8aca;
  --orange: #e09455;
  --gold: #f4c95d;
  --danger: #df6b67;
  --shadow-sm: 0 10px 24px rgba(42, 67, 63, 0.07);
  --shadow-lg: 0 24px 64px rgba(42, 67, 63, 0.12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme='dark'] {
  --bg: #111816;
  --surface-strong: #18211f;
  --surface-muted: #23302d;
  --line: rgba(255, 255, 255, 0.08);
  --text: #edf4f2;
  --text-soft: #b2c5c1;
  --text-muted: #8ba39e;
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(71, 217, 205, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(155, 138, 202, 0.12), transparent 24%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

body,
#app,
.screen-shell {
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  min-height: 100vh;
}

.landing-shell {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 12%, rgba(71, 217, 205, 0.1), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(244, 201, 93, 0.12), transparent 20%),
    radial-gradient(circle at 50% 52%, rgba(155, 138, 202, 0.08), transparent 26%),
    linear-gradient(180deg, #f8f4ee 0%, #f5f3ef 42%, #f7f3ee 100%);
}

.landing-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(249, 245, 239, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 245, 239, 0.1) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), #000 18%, #000 82%, rgba(0, 0, 0, 0.18));
  opacity: 0.42;
  z-index: 0;
}

.landing-shell::after {
  content: '';
  position: absolute;
  inset: -8% -8% 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(71, 217, 205, 0.18), transparent 18%),
    radial-gradient(circle at 82% 22%, rgba(244, 201, 93, 0.16), transparent 17%),
    radial-gradient(circle at 34% 62%, rgba(155, 138, 202, 0.14), transparent 18%),
    radial-gradient(circle at 74% 72%, rgba(224, 148, 85, 0.12), transparent 16%);
  filter: blur(18px);
  opacity: 0.72;
  transform: translate3d(0, 0, 0) scale(1.04);
  transform-origin: center;
  animation: landingAmbientDrift 26s ease-in-out infinite alternate;
  z-index: 0;
}

.landing-topbar,
.landing-hero,
.landing-process,
.landing-band,
.landing-auth-zone,
.landing-footer {
  z-index: 1;
}

.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 18px 24px;
  backdrop-filter: blur(18px);
  background: rgba(244, 240, 233, 0.66);
  border-bottom: 1px solid rgba(15, 15, 15, 0.05);
}

.landing-topbar__inner,
.landing-hero__inner,
.landing-band__inner,
.landing-auth-zone__inner {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.landing-nav,
.landing-topbar__actions,
.landing-proof,
.landing-checklist,
.landing-summary-grid {
  display: flex;
  gap: 12px;
}

.landing-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-nav {
  flex-wrap: wrap;
  justify-content: center;
}

.landing-nav a {
  text-decoration: none;
  color: rgba(31, 47, 46, 0.74);
  font-size: var(--text-sm);
  font-weight: 700;
}

.landing-nav a:hover,
.landing-nav a:focus-visible {
  color: var(--text);
}

.landing-hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0 26px;
  background:
    radial-gradient(circle at 12% 18%, rgba(244, 201, 93, 0.28), transparent 18%),
    radial-gradient(circle at 84% 22%, rgba(71, 217, 205, 0.28), transparent 24%),
    linear-gradient(180deg, rgba(125, 214, 231, 0.84), rgba(204, 241, 237, 0.82) 62%, rgba(232, 243, 239, 0.94) 86%, rgba(244, 241, 236, 0.96));
}

.landing-hero::before {
  content: '';
  position: absolute;
  inset: auto auto -10% -8%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 215, 0.88), rgba(255, 248, 215, 0));
  filter: blur(6px);
  z-index: 0;
}

.landing-hero::after {
  content: '';
  position: absolute;
  inset: auto 8% 6% auto;
  width: 320px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  filter: blur(20px);
  z-index: 0;
}

.landing-hero__inner,
.landing-band__inner,
.landing-auth-zone__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 52px;
  align-items: center;
}

.landing-band__inner {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.landing-hero__inner {
  grid-template-columns: 1fr;
  gap: 28px;
  position: relative;
  z-index: 2;
}

.landing-auth-zone__inner {
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
}

.landing-reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-hero__copy,
.landing-copy,
.landing-auth-copy {
  position: relative;
  z-index: 1;
}

.landing-hero__copy {
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
}

.landing-hero__visual,
.landing-media-stack {
  width: 100%;
}

.landing-hero__visual {
  justify-self: center;
}

.landing-band__inner > .landing-media-stack {
  justify-self: end;
}

.landing-band__inner--reverse > .landing-media-stack {
  justify-self: start;
}

.landing-hero__copy .brand {
  margin-bottom: 24px;
  justify-content: center;
}

.landing-reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-reveal.is-visible .landing-reveal-item,
.landing-reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-reveal.is-visible .landing-reveal-item:nth-child(1) { transition-delay: 60ms; }
.landing-reveal.is-visible .landing-reveal-item:nth-child(2) { transition-delay: 120ms; }
.landing-reveal.is-visible .landing-reveal-item:nth-child(3) { transition-delay: 180ms; }
.landing-reveal.is-visible .landing-reveal-item:nth-child(4) { transition-delay: 240ms; }
.landing-reveal.is-visible .landing-reveal-item:nth-child(5) { transition-delay: 300ms; }

.landing-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18em 0.24em;
}

.landing-word-wrap {
  display: inline-flex;
  overflow: hidden;
}

.landing-word {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(22px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-headline.is-visible .landing-word,
.landing-reveal.is-visible .landing-headline .landing-word {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.landing-eyebrow {
  margin-bottom: 12px;
}

.landing-eyebrow--sky {
  background: rgba(255, 255, 255, 0.38);
  color: var(--text);
}

.landing-eyebrow--teal {
  background: rgba(0, 191, 166, 0.14);
  color: var(--teal-dark);
}

.landing-eyebrow--violet {
  background: rgba(155, 138, 202, 0.16);
  color: #6f5ba1;
}

.landing-eyebrow--orange {
  background: rgba(224, 148, 85, 0.16);
  color: #af6830;
}

.landing-hero__copy h1,
.landing-copy h2,
.landing-auth-copy h2,
.landing-process__intro h2,
.landing-footer__copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: var(--tracking-tighter);
  color: #17211f;
}

.landing-copy h2,
.landing-auth-copy h2,
.landing-process__intro h2,
.landing-footer__copy h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.landing-hero__copy p,
.landing-copy p,
.landing-auth-copy p {
  margin: 18px 0 0;
  max-width: 620px;
  color: rgba(31, 47, 46, 0.78);
  font-size: var(--text-base);
  line-height: 1.8;
}

.landing-proof {
  flex-wrap: wrap;
  margin-top: 26px;
  justify-content: center;
}

.landing-hero__actions {
  justify-content: center;
  align-items: center;
}

.landing-hero__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(31, 47, 46, 0.46);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 700;
}

.landing-hero__link:hover,
.landing-hero__link:focus-visible {
  color: rgba(31, 47, 46, 0.78);
}

.landing-inline-icon {
  width: 14px;
  height: 14px;
}

.landing-proof span {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(245, 240, 232, 0.62);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 800;
}

.landing-band {
  position: relative;
  padding: 88px 0;
  margin-top: -20px;
  padding-top: 112px;
}

.landing-process,
.landing-footer {
  position: relative;
  overflow: hidden;
  margin-top: -20px;
}

.landing-process {
  padding: 30px 0 72px;
  background:
    radial-gradient(circle at 16% 18%, rgba(71, 217, 205, 0.16), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(244, 201, 93, 0.11), transparent 24%),
    linear-gradient(180deg, rgba(226, 241, 238, 0.06) 0%, rgba(228, 241, 237, 0.82) 16%, rgba(243, 242, 237, 0.88) 52%, rgba(248, 246, 241, 0.32) 100%);
}

.landing-process__inner,
.landing-footer__inner {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-process__intro {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.landing-process__headline,
.landing-footer__headline {
  justify-content: center;
}

.landing-process__intro p {
  margin-left: auto;
  margin-right: auto;
}

.landing-process__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.landing-process-card {
  position: relative;
  padding: 28px;
  border-radius: 30px;
  background: rgba(245, 240, 232, 0.86);
  border: 1px solid rgba(15, 15, 15, 0.06);
  box-shadow:
    0 16px 40px -22px rgba(30, 53, 51, 0.18),
    0 38px 80px -38px rgba(30, 53, 51, 0.18);
  backdrop-filter: blur(14px);
}

.landing-process-card__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.05);
  color: rgba(31, 47, 46, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.landing-process-card__icon {
  width: 52px;
  height: 52px;
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(71, 217, 205, 0.16), rgba(244, 201, 93, 0.18));
  color: #17302d;
}

.landing-process-icon {
  width: 22px;
  height: 22px;
}

.landing-process-card h3 {
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.08;
  color: #17211f;
}

.landing-process-card p {
  margin: 0;
  color: rgba(31, 47, 46, 0.74);
  line-height: 1.75;
}

.landing-metric-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.landing-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(245, 240, 232, 0.9);
  border: 1px solid rgba(15, 15, 15, 0.06);
  box-shadow: 0 18px 32px -24px rgba(30, 53, 51, 0.28);
}

.landing-metric-pill strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #17211f;
}

.landing-metric-pill span {
  color: rgba(31, 47, 46, 0.7);
  font-size: var(--text-sm);
  font-weight: 700;
}

.landing-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248, 244, 238, 0.02), rgba(248, 244, 238, 0.06) 18%, rgba(248, 244, 238, 0.02) 54%, rgba(248, 244, 238, 0.08) 100%);
  pointer-events: none;
  opacity: 0.2;
}

.landing-band::after,
.landing-process::after,
.landing-auth-zone::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 96px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(248, 244, 238, 0), rgba(248, 244, 238, 0.62) 58%, rgba(248, 244, 238, 0.95));
  z-index: 0;
}

.landing-band--listening {
  background:
    radial-gradient(circle at 18% 22%, rgba(160, 154, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(242, 241, 253, 0.12) 0%, rgba(242, 241, 253, 0.74) 16%, rgba(235, 240, 252, 0.72) 52%, rgba(247, 244, 239, 0.2) 100%);
}

.landing-band--reading {
  background:
    radial-gradient(circle at 80% 20%, rgba(71, 217, 205, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(220, 243, 238, 0.14) 0%, rgba(220, 243, 238, 0.76) 16%, rgba(228, 246, 238, 0.68) 52%, rgba(247, 244, 239, 0.18) 100%);
}

.landing-band--writing {
  background:
    radial-gradient(circle at 18% 24%, rgba(244, 201, 93, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(247, 237, 221, 0.12) 0%, rgba(247, 237, 221, 0.8) 16%, rgba(248, 240, 228, 0.68) 52%, rgba(249, 245, 239, 0.16) 100%);
}

.landing-band--speaking {
  background:
    radial-gradient(circle at 82% 18%, rgba(224, 148, 85, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(255, 243, 235, 0.18) 0%, rgba(255, 243, 235, 0.82) 16%, rgba(250, 247, 242, 0.8) 56%, rgba(248, 244, 238, 0.22) 100%);
}

.landing-band__inner,
.landing-process__inner,
.landing-auth-zone__inner,
.landing-footer__inner {
  position: relative;
}

.landing-band__inner::before,
.landing-process__inner::before,
.landing-auth-zone__inner::before,
.landing-footer__inner::before {
  content: '';
  position: absolute;
  inset: -40px -20px;
  pointer-events: none;
  border-radius: 40px;
  background:
    radial-gradient(circle at 18% 22%, rgba(247, 243, 236, 0.2), transparent 18%),
    radial-gradient(circle at 82% 28%, rgba(247, 243, 236, 0.14), transparent 18%),
    radial-gradient(circle at 54% 78%, rgba(247, 243, 236, 0.1), transparent 22%);
  filter: blur(36px);
  opacity: 0.7;
  z-index: 0;
}

.landing-band__inner > *,
.landing-process__inner > *,
.landing-auth-zone__inner > *,
.landing-footer__inner > * {
  position: relative;
  z-index: 1;
}

.landing-band__inner--reverse {
  direction: rtl;
}

.landing-band__inner--reverse > * {
  direction: ltr;
}

.landing-copy {
  display: grid;
  gap: 18px;
}

.landing-checklist {
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: rgba(31, 47, 46, 0.8);
  line-height: 1.75;
}

.landing-check-icon {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: var(--teal);
  flex: 0 0 auto;
}

.landing-media-stack {
  position: relative;
}

.landing-media-stack--hero {
  padding: 16px 0 72px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.landing-media-stack--section {
  padding-bottom: 44px;
}

.landing-glow {
  position: absolute;
  pointer-events: none;
  inset: 8% -4% -2%;
  border-radius: 36px;
  filter: blur(74px);
  opacity: 0.28;
  transform: translate3d(var(--parallax-shift-x, 0), var(--parallax-shift-y, 0), 0);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.landing-glow--hero {
  background: rgba(0, 191, 166, 0.28);
}

.landing-glow--listening {
  background: rgba(99, 102, 241, 0.28);
}

.landing-glow--reading {
  background: rgba(0, 153, 125, 0.26);
}

.landing-glow--writing {
  background: rgba(212, 168, 83, 0.28);
}

.landing-glow--speaking {
  background: rgba(224, 148, 85, 0.28);
}

.landing-browser-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(246, 241, 234, 0.9);
  border: 1px solid rgba(15, 15, 15, 0.06);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.03),
    0 8px 24px -8px rgba(0, 0, 0, 0.08),
    0 24px 54px -18px rgba(0, 0, 0, 0.15),
    0 48px 100px -36px rgba(0, 0, 0, 0.16);
  transform: perspective(1200px) translate3d(var(--parallax-shift-x, 0), var(--parallax-shift-y, 0), 0) rotateX(var(--parallax-rotate-x, 0deg)) rotateY(var(--parallax-rotate-y, 0deg)) scale(0.98);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.landing-reveal.is-visible .landing-browser-frame,
.landing-browser-frame:hover {
  transform: perspective(1200px) translate3d(var(--parallax-shift-x, 0), var(--parallax-shift-y, 0), 0) rotateX(calc(var(--parallax-rotate-x, 0deg) + 1.5deg)) rotateY(calc(var(--parallax-rotate-y, 0deg) - 2deg)) scale(1);
}

.landing-browser-frame--hero {
  border-radius: 32px;
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.landing-browser-frame--section {
  box-shadow:
    0 0 0 6px rgba(247, 242, 235, 0.5),
    0 18px 42px -14px rgba(0, 0, 0, 0.16);
  max-width: 760px;
}

.landing-browser-frame--listening {
  box-shadow:
    0 0 0 6px rgba(242, 241, 253, 0.95),
    0 18px 42px -14px rgba(0, 0, 0, 0.14);
}

.landing-browser-frame--reading {
  box-shadow:
    0 0 0 6px rgba(220, 243, 238, 0.98),
    0 18px 42px -14px rgba(0, 0, 0, 0.14);
}

.landing-browser-frame--writing {
  box-shadow:
    0 0 0 6px rgba(247, 237, 221, 0.98),
    0 18px 42px -14px rgba(0, 0, 0, 0.14);
}

.landing-browser-frame--speaking {
  box-shadow:
    0 0 0 6px rgba(255, 243, 235, 0.98),
    0 18px 42px -14px rgba(0, 0, 0, 0.14);
}

.landing-browser-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f6f6f6;
  border-bottom: 1px solid rgba(15, 15, 15, 0.06);
}

.landing-browser-chrome > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff8b62;
}

.landing-browser-chrome > span:nth-child(2) {
  background: #f4c95d;
}

.landing-browser-chrome > span:nth-child(3) {
  background: #2fd6a0;
}

.landing-browser-address {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.05);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.landing-media-mask {
  position: relative;
  overflow: hidden;
  background: transparent;
  mask-image: linear-gradient(180deg, #000 0%, #000 76%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 76%, transparent 100%);
}

.landing-browser-frame--hero {
  background: transparent;
}

.landing-hero .landing-media-mask {
  background: transparent;
}

.landing-media-mask--section {
  mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
}

.landing-media-mask::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 24%;
  background: linear-gradient(180deg, rgba(240, 235, 227, 0), rgba(240, 235, 227, 0.48));
  pointer-events: none;
}

.landing-hero .landing-media-mask::after {
  height: 18%;
  background: linear-gradient(180deg, rgba(225, 239, 233, 0), rgba(225, 239, 233, 0.22) 52%, rgba(228, 236, 231, 0.3));
}

.landing-media {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.02);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), filter 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
video.landing-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-reveal.is-visible .landing-media,
.landing-browser-frame:hover .landing-media {
  transform: scale(1);
}

.landing-media--hero {
  aspect-ratio: 1600 / 1020;
  transform: translateY(-12px) scale(1.04);
}

.landing-media--section {
  aspect-ratio: 1280 / 860;
}

.landing-auth-zone {
  padding: 82px 0 96px;
  margin-top: -20px;
  background:
    radial-gradient(circle at top right, rgba(155, 138, 202, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(71, 217, 205, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(250, 247, 242, 0.12), rgba(250, 247, 242, 0.82) 18%, rgba(247, 243, 238, 0.84) 56%, rgba(244, 240, 234, 0.4));
}

.landing-auth-zone__inner {
  align-items: start;
}

.landing-summary-grid {
  margin-top: 28px;
  flex-wrap: wrap;
}

.landing-summary-card {
  min-width: 170px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(245, 240, 232, 0.82);
  border: 1px solid rgba(15, 15, 15, 0.06);
  box-shadow: var(--shadow-sm);
}

.landing-summary-card strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.landing-summary-card span {
  color: rgba(31, 47, 46, 0.78);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.landing-auth-zone .auth-card h2 {
  color: #17211f;
}

.landing-auth-zone .auth-card p,
.landing-auth-zone .auth-note {
  color: rgba(31, 47, 46, 0.76);
}

.landing-footer {
  overflow: hidden;
  padding: 0 0 12px;
  background:
    radial-gradient(circle at 16% 24%, rgba(155, 138, 202, 0.12), transparent 24%),
    radial-gradient(circle at 82% 22%, rgba(71, 217, 205, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(250, 247, 242, 0.14), rgba(245, 241, 236, 0.82) 24%, rgba(204, 241, 237, 0.28));
}

.landing-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 30px;
  align-items: center;
  padding: 34px 34px 20px;
  border-radius: 34px;
  background: rgba(245, 240, 232, 0.82);
  border: 1px solid rgba(15, 15, 15, 0.06);
  box-shadow:
    0 20px 44px -24px rgba(30, 53, 51, 0.22),
    0 42px 90px -50px rgba(30, 53, 51, 0.24);
  backdrop-filter: blur(14px);
}

.landing-footer__copy p {
  margin-top: 18px;
  max-width: 620px;
  color: rgba(31, 47, 46, 0.76);
  line-height: 1.8;
}

.landing-footer__actions {
  display: grid;
  gap: 16px;
  justify-items: end;
}

.landing-footer__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.landing-footer__meta span {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(70, 62, 52, 0.08);
  color: rgba(31, 47, 46, 0.68);
  font-size: var(--text-xs);
  font-weight: 800;
}

.landing-footer__legal {
  width: min(1320px, calc(100% - 40px));
  margin: 12px auto 0;
  padding: 10px 4px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  text-align: center;
  color: rgba(31, 47, 46, 0.52);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.landing-footer__legal span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.landing-footer__legal a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 47, 46, 0.18);
}

.landing-footer__legal a:hover,
.landing-footer__legal a:focus-visible {
  border-bottom-color: rgba(31, 47, 46, 0.48);
}

html[data-theme='dark'] .landing-topbar {
  background: rgba(17, 24, 22, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme='dark'] .landing-shell {
  background:
    radial-gradient(circle at 14% 12%, rgba(71, 217, 205, 0.08), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(244, 201, 93, 0.08), transparent 20%),
    radial-gradient(circle at 50% 52%, rgba(155, 138, 202, 0.07), transparent 26%),
    linear-gradient(180deg, #0f1716 0%, #111917 42%, #101817 100%);
}

html[data-theme='dark'] .landing-shell::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  opacity: 0.34;
}

html[data-theme='dark'] .landing-shell::after {
  background:
    radial-gradient(circle at 18% 18%, rgba(71, 217, 205, 0.12), transparent 18%),
    radial-gradient(circle at 82% 22%, rgba(244, 201, 93, 0.08), transparent 17%),
    radial-gradient(circle at 34% 62%, rgba(155, 138, 202, 0.1), transparent 18%),
    radial-gradient(circle at 74% 72%, rgba(224, 148, 85, 0.08), transparent 16%);
  opacity: 0.74;
}

html[data-theme='dark'] .landing-nav a {
  color: rgba(237, 244, 242, 0.76);
}

html[data-theme='dark'] .landing-hero__link {
  color: rgba(237, 244, 242, 0.48);
}

html[data-theme='dark'] .landing-hero__link:hover,
html[data-theme='dark'] .landing-hero__link:focus-visible {
  color: rgba(237, 244, 242, 0.84);
}

html[data-theme='dark'] .landing-nav a:hover,
html[data-theme='dark'] .landing-nav a:focus-visible {
  color: #edf4f2;
}

html[data-theme='dark'] .landing-proof span,
html[data-theme='dark'] .landing-browser-address {
  color: var(--text-soft);
}

html[data-theme='dark'] .landing-hero__copy h1,
html[data-theme='dark'] .landing-copy h2,
html[data-theme='dark'] .landing-auth-copy h2,
html[data-theme='dark'] .landing-process__intro h2,
html[data-theme='dark'] .landing-footer__copy h2,
html[data-theme='dark'] .landing-auth-zone .auth-card h2 {
  color: #f2f8f6;
}

html[data-theme='dark'] .landing-hero__copy p,
html[data-theme='dark'] .landing-copy p,
html[data-theme='dark'] .landing-auth-copy p,
html[data-theme='dark'] .landing-checklist li,
html[data-theme='dark'] .landing-summary-card span,
html[data-theme='dark'] .landing-auth-zone .auth-card p,
html[data-theme='dark'] .landing-auth-zone .auth-note {
  color: rgba(237, 244, 242, 0.8);
}

html[data-theme='dark'] .landing-proof span,
html[data-theme='dark'] .landing-summary-card,
html[data-theme='dark'] .landing-browser-frame,
html[data-theme='dark'] .landing-browser-chrome,
html[data-theme='dark'] .landing-process-card,
html[data-theme='dark'] .landing-metric-pill,
html[data-theme='dark'] .landing-footer__inner,
html[data-theme='dark'] .landing-footer__meta span {
  background: rgba(24, 33, 31, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .landing-process {
  background:
    radial-gradient(circle at 16% 18%, rgba(71, 217, 205, 0.1), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(244, 201, 93, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(19, 31, 29, 0.06) 0%, rgba(18, 29, 27, 0.88) 16%, rgba(13, 19, 18, 0.92) 56%, rgba(13, 19, 18, 0.2) 100%);
}

html[data-theme='dark'] .landing-footer {
  background:
    radial-gradient(circle at 16% 24%, rgba(155, 138, 202, 0.08), transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(71, 217, 205, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(11, 17, 16, 0.12), rgba(13, 19, 18, 0.82) 26%, rgba(0, 191, 166, 0.06));
}

html[data-theme='dark'] .landing-footer__legal {
  color: rgba(237, 244, 242, 0.54);
}

html[data-theme='dark'] .landing-footer__legal a {
  border-bottom-color: rgba(237, 244, 242, 0.22);
}

html[data-theme='dark'] .landing-footer__legal a:hover,
html[data-theme='dark'] .landing-footer__legal a:focus-visible {
  border-bottom-color: rgba(237, 244, 242, 0.56);
}

html[data-theme='dark'] .landing-process-card__step,
html[data-theme='dark'] .landing-footer__meta span {
  color: rgba(237, 244, 242, 0.68);
}

html[data-theme='dark'] .landing-process-card__icon {
  background: linear-gradient(135deg, rgba(71, 217, 205, 0.16), rgba(244, 201, 93, 0.14));
  color: #eff7f5;
}

html[data-theme='dark'] .landing-process-card h3,
html[data-theme='dark'] .landing-metric-pill strong,
html[data-theme='dark'] .landing-footer__copy p,
html[data-theme='dark'] .landing-footer__meta span {
  color: #f2f8f6;
}

html[data-theme='dark'] .landing-process-card p,
html[data-theme='dark'] .landing-metric-pill span {
  color: rgba(237, 244, 242, 0.78);
}

html[data-theme='dark'] .landing-browser-address {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .landing-media-mask {
  background: rgba(14, 22, 20, 0.96);
}

html[data-theme='dark'] .landing-media-mask::after {
  background: linear-gradient(180deg, rgba(17, 24, 22, 0), rgba(17, 24, 22, 0.82));
}

html[data-theme='dark'] .landing-hero .landing-media-mask::after {
  background: linear-gradient(180deg, rgba(18, 30, 28, 0), rgba(18, 30, 28, 0.42) 52%, rgba(17, 25, 23, 0.58));
}

html[data-theme='dark'] .landing-browser-frame--section {
  box-shadow:
    0 0 0 6px rgba(24, 33, 31, 0.86),
    0 18px 42px -14px rgba(0, 0, 0, 0.28);
}

html[data-theme='dark'] .landing-band--listening {
  background:
    radial-gradient(circle at 18% 22%, rgba(113, 112, 241, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(27, 28, 44, 0.12) 0%, rgba(27, 28, 44, 0.84) 16%, rgba(24, 27, 40, 0.88) 56%, rgba(15, 24, 22, 0.2) 100%);
}

html[data-theme='dark'] .landing-band--reading {
  background:
    radial-gradient(circle at 82% 18%, rgba(71, 217, 205, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(18, 38, 37, 0.1) 0%, rgba(18, 38, 37, 0.84) 16%, rgba(17, 33, 32, 0.86) 56%, rgba(15, 24, 22, 0.18) 100%);
}

html[data-theme='dark'] .landing-band--writing {
  background:
    radial-gradient(circle at 18% 24%, rgba(244, 201, 93, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(38, 31, 23, 0.1) 0%, rgba(38, 31, 23, 0.86) 16%, rgba(31, 26, 21, 0.88) 56%, rgba(15, 24, 22, 0.18) 100%);
}

html[data-theme='dark'] .landing-band--speaking {
  background:
    radial-gradient(circle at 82% 18%, rgba(224, 148, 85, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(38, 26, 19, 0.14) 0%, rgba(38, 26, 19, 0.88) 16%, rgba(17, 24, 22, 0.92) 60%, rgba(17, 24, 22, 0.2) 100%);
}

html[data-theme='dark'] .landing-auth-zone {
  background:
    radial-gradient(circle at top right, rgba(155, 138, 202, 0.12), transparent 28%),
    radial-gradient(circle at bottom left, rgba(71, 217, 205, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(17, 24, 22, 0.1), rgba(17, 24, 22, 0.86) 18%, rgba(14, 22, 20, 0.88) 56%, rgba(14, 22, 20, 0.26));
}

html[data-theme='dark'] .landing-band__inner::before,
html[data-theme='dark'] .landing-process__inner::before,
html[data-theme='dark'] .landing-auth-zone__inner::before,
html[data-theme='dark'] .landing-footer__inner::before {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.08), transparent 18%),
    radial-gradient(circle at 82% 28%, rgba(255, 255, 255, 0.06), transparent 18%),
    radial-gradient(circle at 54% 78%, rgba(71, 217, 205, 0.06), transparent 22%);
  opacity: 0.62;
}

html[data-theme='dark'] .landing-band::after,
html[data-theme='dark'] .landing-process::after,
html[data-theme='dark'] .landing-auth-zone::after {
  background: linear-gradient(180deg, rgba(14, 22, 20, 0), rgba(14, 22, 20, 0.58) 58%, rgba(14, 22, 20, 0.94));
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 48px;
  background: linear-gradient(145deg, rgba(29, 101, 95, 0.95), rgba(53, 137, 129, 0.88));
  color: #f4fffd;
}

.auth-visual::before,
.dashboard-hero::before {
  content: '';
  position: absolute;
  left: -70px;
  bottom: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.auth-visual::after,
.dashboard-hero::after {
  content: '';
  position: absolute;
  top: 26px;
  right: 70px;
  width: 220px;
  height: 140px;
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.15) 2px, transparent 3px),
    radial-gradient(circle at 58px 28px, rgba(255, 255, 255, 0.18) 2px, transparent 3px),
    radial-gradient(circle at 108px 12px, rgba(255, 255, 255, 0.15) 2px, transparent 3px),
    radial-gradient(circle at 170px 34px, rgba(255, 255, 255, 0.16) 2px, transparent 3px),
    radial-gradient(circle at 204px 14px, rgba(255, 255, 255, 0.15) 2px, transparent 3px);
  opacity: 0.7;
  transform: rotate(-7deg);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
}

.brand-mark {
  width: 18px;
  height: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.brand-mark span {
  display: block;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
}

.brand-mark span:nth-child(2),
.brand-mark span:nth-child(3) {
  background: rgba(71, 217, 205, 0.92);
}

.brand strong {
  font-size: 1.15rem;
}

.brand strong em {
  color: var(--cyan);
  font-style: normal;
}

.auth-copy,
.page-copy {
  position: relative;
  z-index: 1;
}

.auth-copy {
  max-width: 560px;
  margin-top: 84px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
}

.auth-copy h1,
.page-copy h1,
.dashboard-hero h1 {
  margin: 18px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.8vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: var(--tracking-tighter);
}

.auth-copy p,
.page-copy p,
.dashboard-hero p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.auth-copy p,
.dashboard-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.page-copy p {
  color: var(--text-soft);
}

.auth-feature-grid,
.stats-grid,
.practice-grid,
.mode-grid,
.feature-grid,
.resource-grid,
.metrics-grid,
.plan-grid,
.profile-grid {
  display: grid;
  gap: 16px;
}

.auth-feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 36px;
}

.stats-grid,
.profile-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.practice-grid,
.mode-grid,
.feature-grid,
.resource-grid,
.plan-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.metrics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.glass-card,
.focus-card,
.panel-card,
.plan-card,
.stat-card,
.study-card,
.practice-card,
.mode-card,
.feature-card,
.resource-card,
.metrics-card,
.profile-card,
.activity-card,
.library-panel,
.empty-card {
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.glass-card,
.focus-card,
.panel-card,
.plan-card,
.metrics-card,
.profile-card,
.activity-card,
.library-panel,
.empty-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.glass-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.glass-card h3,
.feature-card h3,
.practice-card h3,
.resource-card h3,
.metrics-card h3,
.profile-card h3,
.activity-card h3,
.focus-card h3,
.panel-card h3,
.plan-card h3,
.mode-card h3,
.library-panel h3 {
  margin: 0 0 8px;
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
}

.glass-card p,
.feature-card p,
.practice-card p,
.resource-card p,
.metrics-card p,
.profile-card p,
.activity-card p,
.focus-card p,
.panel-card p,
.plan-card p,
.mode-card p,
.library-panel p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 30px;
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.auth-card h2 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-tight);
}

.auth-card p {
  margin: 0 0 20px;
  color: var(--text-soft);
}

.auth-toggle {
  display: inline-flex;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface-muted);
  gap: 4px;
}

.auth-toggle button {
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 700;
}

.auth-toggle .is-active {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(31, 50, 47, 0.08);
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  color: var(--text-soft);
}

.input,
.textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus,
.textarea:focus {
  border-color: rgba(0, 191, 166, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 191, 166, 0.12);
}

.button-row,
.hero-meta,
.topbar-tools,
.sound-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-row {
  margin-top: 20px;
}

.btn,
.nav-button,
.sidebar-action,
.sound-button,
.list-link,
.tag-button {
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
}

.btn:hover,
.nav-button:hover,
.sidebar-action:hover,
.sound-button:hover,
.list-link:hover,
.tag-button:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #f4fffd;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  box-shadow: 0 12px 24px rgba(31, 95, 90, 0.24);
}

.btn-secondary {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
}

.btn-ghost {
  color: var(--text-soft);
  background: transparent;
  border: 1px solid var(--line);
}

.auth-note,
.muted-label,
.resource-meta,
.card-subtle,
.activity-time,
.list-meta,
.micro-kicker,
.stat-label {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.auth-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(223, 107, 103, 0.12);
  color: #8e3835;
  font-size: var(--text-sm);
  font-weight: 700;
}

/* Auth modal */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 20, 18, 0.62);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-modal {
  position: relative;
  width: min(480px, 100%);
  padding: 36px 32px 30px;
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(5, 20, 18, 0.28);
  max-height: 90dvh;
  overflow-y: auto;
}

.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.auth-modal__close:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.auth-modal__title {
  margin: 14px 0 8px;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-tight);
}

.auth-modal__desc {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: var(--text-sm);
}

.writing-studio-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8600;
  background: rgba(5, 20, 18, 0.58);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

@keyframes ws-modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.writing-studio-modal {
  position: relative;
  width: min(900px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 36px 32px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 15, 15, 0.07);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 32px 80px rgba(5, 20, 18, 0.22);
  animation: ws-modal-in 0.24s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.writing-studio-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-right: 40px;
  margin-bottom: 0;
}

.writing-studio-kicker {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 191, 166, 0.12);
  color: var(--teal-dark);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.writing-studio-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  line-height: var(--leading-tight);
}

.writing-studio-subtitle {
  margin: 0;
  color: var(--text-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: 620px;
}

.writing-studio-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.writing-studio-close:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.leave-section-modal {
  width: min(560px, 100%);
  padding: 30px 28px 24px;
}

.leave-section-header {
  margin-right: 0;
  padding-bottom: 16px;
}

.leave-section-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

/* File upload styled button */
.file-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.file-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.file-upload-btn {
  cursor: pointer;
  white-space: nowrap;
}

.file-upload-name {
  font-size: var(--text-sm);
  color: var(--text-soft);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Password show/hide */
.password-field-wrap {
  position: relative;
}

.password-input {
  padding-right: 82px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.password-toggle:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 14px 16px;
  border-right: 1px solid rgba(15, 15, 15, 0.06);
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(18px);
}

.sidebar-top {
  display: grid;
  gap: 20px;
}

.sidebar .brand {
  color: var(--text);
}

.sidebar .brand-mark span {
  background: rgba(15, 15, 15, 0.15);
}

.sidebar .brand-mark span:nth-child(2),
.sidebar .brand-mark span:nth-child(3) {
  background: rgba(0, 191, 166, 0.92);
}

.nav-list,
.sidebar-actions,
.sound-list,
.mini-list,
.metric-list,
.feedback-list,
.activity-list,
.library-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-button,
.sidebar-action,
.sound-button,
.list-link,
.tag-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
}

.nav-button,
.sidebar-action {
  font-size: var(--text-sm);
}

.nav-button.is-active {
  background: rgba(0, 191, 166, 0.13);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px rgba(0, 191, 166, 0.14);
}

.nav-icon,
.action-icon,
.skill-icon,
.mode-icon,
.metric-icon,
.resource-icon,
.stat-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.sidebar-bottom {
  display: grid;
  gap: 14px;
}

.sidebar-actions {
  display: grid;
  gap: 10px;
}

.sidebar-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.sidebar-icon-action {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
.brand-mark--image {
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
}
.brand-mark--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(15, 15, 15, 0.06);
}

.sidebar-icon-action:hover,
.sidebar-icon-action:focus-visible {
  background: rgba(0, 191, 166, 0.13);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px rgba(0, 191, 166, 0.16);
}

.focus-fab {
  position: relative;
}

.focus-fab-trigger {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid rgba(0, 191, 166, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal-dark);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.focus-fab-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 12px);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 10;
}

.focus-fab:hover .focus-fab-panel,
.focus-fab:focus-within .focus-fab-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.focus-fab-panel h3 {
  margin: 0;
}

.focus-fab-panel p {
  margin: 0;
}

.focus-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.focus-control-button {
  padding: 10px 12px;
  font-size: var(--text-xs);
}

.focus-status {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.sound-button,
.tag-button {
  width: auto;
  padding: 8px 11px;
  border: 1px solid transparent;
  background: var(--surface-muted);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
}

.tag-button--listening {
  min-height: 42px;
  padding: 13px 18px;
  background: rgba(71, 217, 205, 0.12);
  border-color: rgba(0, 191, 166, 0.18);
  color: var(--teal-dark);
}

.sound-button.is-active,
.tag-button.is-active {
  color: #f4fffd;
  background: var(--teal);
}

.workspace {
  padding: 20px 22px 26px;
}

.workspace-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.topbar,
.stat-top,
.card-head,
.resource-head,
.mode-head,
.study-head,
.activity-head,
.card-footer,
.resource-footer,
.panel-footer,
.metric-row,
.settings-row,
.preview-header,
.study-meta,
.activity-item,
.resource-item,
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar {
  margin-bottom: 18px;
}

.page-copy h1 {
  margin: 8px 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.chip,
.pill,
.hero-pill,
.status-pill,
.preview-pdf-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 800;
}

.chip {
  color: var(--teal-dark);
  background: rgba(0, 191, 166, 0.12);
}

button.chip {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 800;
  transition: background 0.15s;
}

button.chip:hover {
  background: rgba(0, 191, 166, 0.22);
}

.pill {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 15, 15, 0.08);
}

.pill--audio {
  min-height: 32px;
  background: rgba(71, 217, 205, 0.1);
  border-color: rgba(0, 191, 166, 0.14);
  color: var(--teal-dark);
}

.hero-pill {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #2b6f6d, #3c8581);
  color: #f4fffd;
  box-shadow: var(--shadow-lg);
}

.section-heading {
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card,
.study-card,
.practice-card,
.mode-card,
.feature-card,
.resource-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.stat-card {
  display: grid;
  gap: 16px;
  min-height: 132px;
}

.stat-icon-wrap,
.metric-badge,
.mode-badge,
.resource-badge,
.skill-badge {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.accent-teal { background: rgba(71, 217, 205, 0.14); color: var(--teal-dark); }
.accent-violet { background: rgba(157, 141, 255, 0.14); color: #6759d5; }
.accent-orange { background: rgba(224, 148, 85, 0.16); color: #d17325; }
.accent-gold { background: rgba(244, 201, 93, 0.2); color: #b18514; }

.stat-value,
.band-value,
.metrics-value,
.study-ring strong,
.plan-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: var(--tracking-tighter);
}

.study-card {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.study-progress {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

.study-ring {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, #fff 77%, transparent 78%), conic-gradient(var(--teal) var(--progress, 0%), rgba(0, 191, 166, 0.12) 0);
}

.study-ring span {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
}

.practice-card,
.mode-card,
.resource-card {
  position: relative;
  overflow: hidden;
}

.practice-card::before,
.mode-card::before,
.resource-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent, var(--teal));
}

.practice-card[data-accent='writing'] { --accent: #ba9ef6; }
.practice-card[data-accent='reading'] { --accent: #44c6c0; }
.practice-card[data-accent='listening'] { --accent: #8f8afc; }
.practice-card[data-accent='speaking'] { --accent: #ffb16b; }

.status-pill {
  background: var(--surface-muted);
  color: var(--text-soft);
}

.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.two-column {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 18px;
}

.activity-list,
.mini-list,
.metric-list,
.feedback-list {
  display: grid;
  gap: 10px;
}

.activity-item,
.resource-item,
.list-item {
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(244, 241, 234, 0.78);
}

.activity-item {
  align-items: flex-start;
  gap: 16px;
  border: 1px solid rgba(15, 15, 15, 0.06);
}

.activity-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.activity-copy strong {
  color: var(--text);
  line-height: 1.4;
}

.activity-detail {
  color: var(--text-soft);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.activity-meta {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

.activity-time {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.mini-list li,
.metric-list li,
.feedback-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.5;
}

.mini-list li::before,
.metric-list li::before,
.feedback-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 191, 166, 0.45);
}

.library-layout {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.library-panel {
  min-height: 720px;
}

.library-panel:first-child {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 247, 0.9));
}

.library-search {
  margin: 14px 0 12px;
}

.library-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(233, 245, 242, 0.62);
  border: 1px solid rgba(0, 191, 166, 0.08);
}

.library-list::-webkit-scrollbar,
.preview-content::-webkit-scrollbar,
.library-preview-body::-webkit-scrollbar {
  width: 8px;
}

.library-list::-webkit-scrollbar-thumb,
.preview-content::-webkit-scrollbar-thumb,
.library-preview-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.12);
}

.list-link {
  border: 1px solid rgba(0, 191, 166, 0.08);
  border-radius: 16px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.library-list .list-link:nth-child(even) {
  background: rgba(247, 251, 250, 0.96);
}

.list-link:hover {
  background: rgba(232, 247, 244, 0.92);
  border-color: rgba(0, 191, 166, 0.12);
}

.list-link.is-active {
  background: rgba(0, 191, 166, 0.11);
  border-color: rgba(0, 191, 166, 0.18);
  color: var(--teal-dark);
}

.list-link-copy {
  min-width: 0;
}

.list-link-top {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.library-item-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.list-link strong {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.list-link .list-meta {
  color: var(--text-soft);
}

.library-preview-body {
  min-height: 590px;
  max-height: 760px;
  overflow: auto;
}

.preview-frame {
  padding: 18px;
  border-radius: 20px;
  background: rgba(245, 242, 235, 0.72);
  border: 1px solid rgba(15, 15, 15, 0.06);
}

.preview-wrap {
  display: grid;
  gap: 16px;
}

.preview-header {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 15, 15, 0.08);
}

.preview-title {
  font-weight: 800;
}

.preview-pdf-warning {
  background: rgba(223, 107, 103, 0.12);
  color: #983f3b;
}

.preview-pdf-iframe,
.preview-html {
  width: 100%;
  min-height: 620px;
  border: 1px solid rgba(15, 15, 15, 0.1);
  border-radius: 18px;
  background: #fff;
}

.preview-container,
.preview-content {
  min-height: 520px;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pdf-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

.pdf-page-input {
  width: 60px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
}

.pdf-canvas-wrap {
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
}

.pdf-canvas-wrap canvas {
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(15, 15, 15, 0.12);
}

.preview-image {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 22px rgba(15, 15, 15, 0.1);
}

.preview-audio {
  width: min(520px, 100%);
}

.preview-loading,
.preview-error,
.activity-empty,
.library-empty,
.preview-placeholder-panel {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
}

.preview-loading-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  border: 3px solid rgba(15, 15, 15, 0.12);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.preview-fallback {
  display: inline-flex;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(0, 191, 166, 0.12);
  text-decoration: none;
  font-weight: 800;
}

.markdown-body {
  color: var(--text-soft);
  line-height: 1.8;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: var(--text);
  font-family: var(--font-display);
}

.markdown-body img {
  max-width: 100%;
  border-radius: 18px;
}

.markdown-body code,
.markdown-body pre {
  border-radius: 12px;
  background: rgba(15, 15, 15, 0.06);
}

.markdown-body code {
  padding: 2px 6px;
}

.markdown-body pre {
  padding: 16px;
  overflow: auto;
}

.plan-card.is-highlighted {
  background: linear-gradient(145deg, rgba(44, 120, 114, 0.96), rgba(31, 95, 90, 0.96));
  color: #f4fffd;
}

.plan-card.is-highlighted p,
.plan-card.is-highlighted .muted-label,
.plan-card.is-highlighted .mini-list li {
  color: rgba(244, 255, 253, 0.78);
}

.plan-price span {
  font-size: var(--text-sm);
  font-family: var(--font-sans);
}

.profile-card--span-2 {
  grid-column: span 2;
}

.plans-board {
  margin-top: 18px;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.plan-option {
  width: 100%;
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.plan-option:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 28px rgba(17, 28, 26, 0.14);
}

.plan-option.is-selected {
  border-color: rgba(0, 191, 166, 0.44);
  box-shadow: 0 0 0 2px rgba(0, 191, 166, 0.14), 0 12px 24px rgba(17, 28, 26, 0.14);
}

.plan-option__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-option__price {
  margin-top: 8px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: var(--text-sm);
}

.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.metric-row,
.settings-row {
  padding: 12px 0;
}

.metric-row + .metric-row,
.settings-row + .settings-row {
  border-top: 1px solid rgba(15, 15, 15, 0.06);
}

.toggle {
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: rgba(0, 191, 166, 0.18);
  position: relative;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
}

.toggle.is-off {
  background: rgba(141, 160, 157, 0.25);
}

.toggle.is-off::after {
  right: auto;
  left: 4px;
  background: rgba(141, 160, 157, 0.85);
}

.auth-success {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 191, 166, 0.14);
  color: var(--teal-dark);
  font-size: var(--text-sm);
  font-weight: 700;
}

.form-grid--single {
  grid-template-columns: 1fr;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: var(--text-sm);
}

.activity-item--form {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.admin-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.form-grid--admin {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-upload-form {
  display: grid;
  gap: 16px;
}

.btn:disabled,
.nav-button:disabled,
.sidebar-action:disabled,
.sound-button:disabled,
.tag-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ai-test-shell {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.ai-builder-card,
.ai-session-card,
.ai-score-card,
.ai-questions-card {
  background: rgba(255, 255, 255, 0.9);
}

.ai-form-grid,
.ai-listening-grid,
.ai-meta-grid {
  display: grid;
  gap: 14px;
}

.ai-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.ai-form-span {
  grid-column: 1 / -1;
}

.ai-listening-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.audio-card,
.ai-question-card,
.ai-mini-card,
.ai-review-item,
.ai-option {
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: 16px;
  background: rgba(244, 241, 234, 0.72);
}

.audio-card,
.ai-mini-card,
.ai-review-item {
  padding: 14px;
}

.audio-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.ai-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.ai-meta-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-mini-card {
  display: grid;
  gap: 6px;
}

.ai-mini-card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.ai-question-list,
.ai-review-list,
.ai-option-list {
  display: grid;
  gap: 12px;
}

.ai-builder-card input[type='file'] {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.98);
}

.speaking-recorder-card {
  margin-bottom: 16px;
}

.ai-question-list,
.ai-review-list {
  margin-top: 18px;
}

.ai-question-card {
  padding: 16px;
}

.ai-question-card p {
  margin: 10px 0 14px;
  color: var(--text-soft);
}

.ai-question-header,
.ai-review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.ai-option input {
  margin: 0;
}

.ai-review-item.is-correct {
  border-color: rgba(0, 143, 124, 0.18);
  background: rgba(0, 191, 166, 0.08);
}

.ai-review-item.is-wrong {
  border-color: rgba(223, 107, 103, 0.18);
  background: rgba(223, 107, 103, 0.06);
}

.flow-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.flow-stack {
  display: grid;
  gap: 16px;
}

.panel-card--nested {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 15, 15, 0.06);
  box-shadow: none;
}

.reading-passage,
.writing-sample {
  white-space: pre-wrap;
  line-height: 1.75;
  color: var(--text-soft);
  font-size: var(--text-sm);
}

.reading-question,
.result-row {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(15, 15, 15, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 15, 15, 0.06);
  color: var(--text-soft);
}

.choice-option input {
  margin-top: 3px;
}

.metrics-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pill-success {
  background: rgba(0, 191, 166, 0.14);
  color: var(--teal-dark);
}

.pill-warning {
  background: rgba(214, 150, 56, 0.16);
  color: #9d6200;
}

.pill-danger {
  background: rgba(223, 107, 103, 0.12);
  color: #8e3835;
}

.pill-neutral {
  background: rgba(103, 122, 120, 0.12);
  color: var(--text-soft);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

html[data-theme='dark'] {
  color-scheme: dark;
}

html[data-theme='dark'] body {
  background:
    radial-gradient(circle at top left, rgba(71, 217, 205, 0.1), transparent 28%),
    radial-gradient(circle at bottom right, rgba(155, 138, 202, 0.08), transparent 22%),
    var(--bg);
}

html[data-theme='dark'] .sidebar {
  background: rgba(17, 24, 22, 0.76);
  border-right-color: rgba(255, 255, 255, 0.06);
}

html[data-theme='dark'] .glass-card,
html[data-theme='dark'] .focus-card,
html[data-theme='dark'] .panel-card,
html[data-theme='dark'] .plan-card,
html[data-theme='dark'] .stat-card,
html[data-theme='dark'] .study-card,
html[data-theme='dark'] .practice-card,
html[data-theme='dark'] .mode-card,
html[data-theme='dark'] .feature-card,
html[data-theme='dark'] .resource-card,
html[data-theme='dark'] .metrics-card,
html[data-theme='dark'] .profile-card,
html[data-theme='dark'] .activity-card,
html[data-theme='dark'] .library-panel,
html[data-theme='dark'] .empty-card,
html[data-theme='dark'] .auth-card,
html[data-theme='dark'] .focus-fab-trigger,
html[data-theme='dark'] .focus-fab-panel,
html[data-theme='dark'] .sidebar-icon-action,
html[data-theme='dark'] .panel-card--nested,
html[data-theme='dark'] .reading-question,
html[data-theme='dark'] .result-row,
html[data-theme='dark'] .choice-option,
html[data-theme='dark'] .preview-pdf-iframe,
html[data-theme='dark'] .preview-html,
html[data-theme='dark'] .pdf-canvas-wrap,
html[data-theme='dark'] .preview-placeholder-panel,
html[data-theme='dark'] .audio-card,
html[data-theme='dark'] .ai-mini-card,
html[data-theme='dark'] .ai-review-item,
html[data-theme='dark'] .ai-option,
html[data-theme='dark'] .ai-question-card {
  background: rgba(24, 33, 31, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

html[data-theme='dark'] .input,
html[data-theme='dark'] .textarea,
html[data-theme='dark'] .ai-builder-card input[type='file'],
html[data-theme='dark'] .pdf-page-input {
  background: rgba(14, 20, 19, 0.96);
  border-color: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

html[data-theme='dark'] .input::placeholder,
html[data-theme='dark'] .textarea::placeholder {
  color: var(--text-muted);
}

html[data-theme='dark'] .btn-secondary {
  background: rgba(24, 33, 31, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

html[data-theme='dark'] .btn-secondary:hover,
html[data-theme='dark'] .btn-secondary:focus-visible {
  background: rgba(31, 42, 39, 0.98);
  border-color: rgba(0, 191, 166, 0.18);
  color: #edf4f2;
  box-shadow: 0 0 0 4px rgba(0, 191, 166, 0.12);
}

html[data-theme='dark'] .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
}

html[data-theme='dark'] .btn-ghost:hover,
html[data-theme='dark'] .btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

html[data-theme='dark'] .plan-option {
  background: rgba(24, 33, 31, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .plan-option:hover {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

@media (max-width: 980px) {
  .plan-options {
    grid-template-columns: 1fr;
  }
}

html[data-theme='dark'] .btn-secondary:disabled,
html[data-theme='dark'] .btn-ghost:disabled {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  box-shadow: none;
}

html[data-theme='dark'] .pill,
html[data-theme='dark'] .preview-pdf-warning {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
}

html[data-theme='dark'] .pill--audio {
  background: rgba(0, 191, 166, 0.16);
  border-color: rgba(0, 191, 166, 0.18);
  color: #dff8f3;
}

html[data-theme='dark'] .pill-success {
  background: rgba(0, 191, 166, 0.18);
  border-color: rgba(0, 191, 166, 0.2);
  color: #dff8f3;
}

html[data-theme='dark'] .pill-warning {
  background: rgba(224, 148, 85, 0.18);
  border-color: rgba(224, 148, 85, 0.22);
  color: #ffd9b8;
}

html[data-theme='dark'] .pill-danger {
  background: rgba(223, 107, 103, 0.18);
  border-color: rgba(223, 107, 103, 0.22);
  color: #ffc1bd;
}

html[data-theme='dark'] .pill-neutral {
  background: rgba(178, 197, 193, 0.12);
  border-color: rgba(178, 197, 193, 0.14);
  color: #d5e3e0;
}

html[data-theme='dark'] .btn-ghost,
html[data-theme='dark'] .nav-button,
html[data-theme='dark'] .sidebar-action,
html[data-theme='dark'] .sound-button,
html[data-theme='dark'] .list-link,
html[data-theme='dark'] .tag-button {
  color: var(--text-soft);
}

html[data-theme='dark'] .library-list {
  background: rgba(16, 24, 22, 0.82);
  border-color: rgba(0, 191, 166, 0.1);
}

html[data-theme='dark'] .list-link {
  background: rgba(24, 33, 31, 0.94);
  border-color: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

html[data-theme='dark'] .library-list .list-link:nth-child(even) {
  background: rgba(28, 38, 36, 0.96);
}

html[data-theme='dark'] .list-link strong {
  color: var(--text);
}

html[data-theme='dark'] .list-link .list-meta {
  color: var(--text-soft);
}

html[data-theme='dark'] .tag-button--listening {
  background: rgba(0, 191, 166, 0.16);
  border-color: rgba(0, 191, 166, 0.2);
  color: #dff8f3;
}

html[data-theme='dark'] .library-panel:first-child {
  background: linear-gradient(180deg, rgba(24, 33, 31, 0.98), rgba(19, 27, 25, 0.94));
}

html[data-theme='dark'] .list-link:hover {
  background: rgba(0, 191, 166, 0.1);
  border-color: rgba(0, 191, 166, 0.14);
}

html[data-theme='dark'] .list-link.is-active {
  background: rgba(0, 191, 166, 0.14);
  border-color: rgba(0, 191, 166, 0.2);
  color: #dff8f3;
}

html[data-theme='dark'] .auth-toggle .is-active,
html[data-theme='dark'] .nav-button.is-active,
html[data-theme='dark'] .sound-button.is-active,
html[data-theme='dark'] .tag-button.is-active,
html[data-theme='dark'] .list-link.is-active,
html[data-theme='dark'] .sidebar-icon-action:hover,
html[data-theme='dark'] .sidebar-icon-action:focus-visible,
html[data-theme='dark'] .focus-fab-trigger:hover,
html[data-theme='dark'] .focus-fab-trigger:focus-visible {
  background: rgba(0, 191, 166, 0.16);
  color: #dff8f3;
  box-shadow: inset 0 0 0 1px rgba(0, 191, 166, 0.18);
}

html[data-theme='dark'] .study-ring {
  background: radial-gradient(circle closest-side, #18211f 77%, transparent 78%), conic-gradient(var(--teal) var(--progress, 0%), rgba(0, 191, 166, 0.14) 0);
}

html[data-theme='dark'] .pdf-canvas-wrap canvas,
html[data-theme='dark'] .preview-image {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

html[data-theme='dark'] .preview-audio {
  color-scheme: dark;
}

html[data-theme='dark'] .metric-row + .metric-row,
html[data-theme='dark'] .settings-row + .settings-row,
html[data-theme='dark'] .choice-option,
html[data-theme='dark'] .reading-question,
html[data-theme='dark'] .result-row {
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .activity-item {
  background: rgba(31, 42, 39, 0.76);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .activity-detail {
  color: var(--text-soft);
}

html[data-theme='dark'] .activity-time {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .markdown-body code,
html[data-theme='dark'] .markdown-body pre {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .auth-error {
  background: rgba(223, 107, 103, 0.14);
  color: #ffb5b1;
}

html[data-theme='dark'] .auth-modal {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

html[data-theme='dark'] .auth-modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
}

html[data-theme='dark'] .writing-studio-backdrop {
  background: rgba(0, 0, 0, 0.72);
}

html[data-theme='dark'] .writing-studio-modal {
  background: var(--surface-strong);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}

html[data-theme='dark'] .writing-studio-kicker {
  background: rgba(0, 191, 166, 0.15);
  color: var(--cyan);
}

html[data-theme='dark'] .muted-label,
html[data-theme='dark'] .resource-meta,
html[data-theme='dark'] .card-subtle,
html[data-theme='dark'] .activity-time,
html[data-theme='dark'] .list-meta,
html[data-theme='dark'] .micro-kicker,
html[data-theme='dark'] .stat-label,
html[data-theme='dark'] .reading-passage,
html[data-theme='dark'] .writing-sample,
html[data-theme='dark'] .ai-question-card p,
html[data-theme='dark'] .focus-status,
html[data-theme='dark'] .focus-fab-panel p {
  color: var(--text-soft);
}

@media (max-width: 1200px) {
  .stats-grid,
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column,
  .library-layout,
  .auth-shell,
  .landing-hero__inner,
  .landing-band__inner,
  .landing-auth-zone__inner,
  .ai-listening-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero__visual,
  .landing-band__inner > .landing-media-stack,
  .landing-band__inner--reverse > .landing-media-stack {
    justify-self: stretch;
  }

  .landing-browser-frame--hero,
  .landing-browser-frame--section {
    max-width: none;
  }

  .landing-band__inner--reverse {
    direction: ltr;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(15, 15, 15, 0.06);
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .practice-grid,
  .mode-grid,
  .feature-grid,
  .resource-grid,
  .plan-grid,
  .landing-topbar__inner,
  .landing-process__grid,
  .landing-footer__inner,
  .ai-form-grid,
  .ai-meta-grid {
    grid-template-columns: 1fr;
  }

  .landing-topbar {
    padding: 16px;
  }

  .landing-topbar__inner {
    display: grid;
    justify-items: start;
  }

  .landing-nav {
    justify-content: flex-start;
  }

  .landing-hero,
  .landing-band,
  .landing-auth-zone,
  .landing-process {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .landing-footer {
    padding-top: 52px;
    padding-bottom: 12px;
  }

  .landing-footer__actions,
  .landing-footer__meta {
    justify-items: start;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .auth-visual,
  .auth-panel,
  .workspace {
    padding: 20px;
  }

  .auth-card {
    padding: 24px;
  }

  .stats-grid,
  .profile-grid,
  .metrics-grid,
  .metrics-grid--compact,
  .nav-list,
  .landing-summary-grid,
  .landing-process__grid {
    grid-template-columns: 1fr;
  }

  .landing-topbar__inner,
  .landing-hero__inner,
  .landing-band__inner,
  .landing-auth-zone__inner,
  .landing-process__inner,
  .landing-footer__inner,
  .landing-footer__legal {
    width: min(100% - 24px, 100%);
  }

  .landing-footer__legal {
    justify-content: center;
  }

  .landing-hero__copy h1,
  .landing-copy h2,
  .landing-auth-copy h2,
  .landing-process__intro h2,
  .landing-footer__copy h2 {
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

  .landing-process-card,
  .landing-footer__inner {
    padding: 22px 22px 14px;
    border-radius: 24px;
  }

  .landing-metric-pill {
    width: 100%;
    justify-content: center;
  }


@media (prefers-reduced-motion: reduce) {
  .landing-reveal,
  .landing-reveal-item,
  .landing-word,
  .landing-glow,
  .landing-browser-frame,
  .landing-media {
    transition: none !important;
  }

  .landing-reveal,
  .landing-reveal-item,
  .landing-word {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .landing-glow,
  .landing-browser-frame,
  .landing-media {
    transform: none !important;
  }

  .landing-shell::after {
    animation: none !important;
  }
}

@keyframes landingAmbientDrift {
  0% {
    transform: translate3d(-1.5%, -1.2%, 0) scale(1.03);
  }
  50% {
    transform: translate3d(1.2%, 1.6%, 0) scale(1.07);
  }
  100% {
    transform: translate3d(-0.8%, 2.2%, 0) scale(1.04);
  }
}
  .landing-proof,
  .landing-nav,
  .landing-topbar__actions {
    gap: 8px;
  }

  .landing-summary-card {
    min-width: 0;
  }

  .landing-browser {
    min-height: 260px;
  }

  .study-progress {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .stat-card,
  .study-card,
  .practice-card,
  .mode-card,
  .feature-card,
  .resource-card,
  .panel-card,
  .plan-card,
  .profile-card,
  .activity-card,
  .library-panel,
  .focus-card {
    padding: 18px;
  }

  .activity-item {
    flex-direction: column;
  }

  .activity-meta {
    width: 100%;
    justify-content: flex-start;
  }
}
