/* Vitamova Unified Design System
   Goal: one consistent CSS file for shared page layout, cards, heroes,
   buttons, forms, states, modals, toasts, tables, dashboards, and writing flows.
*/

:root {
  /* Brand */
  --vita-yellow: #ffd54a;
  --vita-yellow-dark: #f4bf20;
  --vita-blue: #1f5eff;
  --vita-blue-dark: #1748c6;

  /* Semantic colors */
  --vita-success: #12b76a;
  --vita-success-dark: #067647;
  --vita-warning: #f79009;
  --vita-warning-dark: #b54708;
  --vita-danger: #d92d20;
  --vita-danger-dark: #b42318;
  --vita-green: #16a34a;
  --vita-red: #dc2626;
  --vita-orange: #f97316;

  /* Surface + text */
  --vita-bg: #f7f9ff;
  --vita-soft: #f8fafc;
  --vita-card: #ffffff;
  --vita-text: #1a1f36;
  --vita-text-strong: #111827;
  --vita-muted: #667085;
  --vita-slate: #334155;
  --vita-border: #e6eaf2;
  --vita-border-strong: #e2e8f0;

  /* Effects */
  --vita-shadow-sm: 0 8px 20px rgba(20, 27, 52, 0.08);
  --vita-shadow-md: 0 12px 32px rgba(24, 42, 100, 0.08);
  --vita-shadow-lg: 0 18px 45px rgba(24, 42, 100, 0.12);
  --vita-shadow-xl: 0 24px 70px rgba(15, 23, 42, 0.10);
  --vita-ring: 0 0 0 4px rgba(31, 94, 255, 0.12);

  /* Shape + spacing */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --radius-pill: 999px;
  --page-pad: 24px;
  --page-gap: 22px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--vita-text);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 213, 74, 0.25), transparent 34rem),
    radial-gradient(circle at 90% 20%, rgba(31, 94, 255, 0.18), transparent 36rem),
    linear-gradient(180deg, #fdfefe 0%, var(--vita-bg) 100%);
  padding: var(--page-pad);
}

a { color: inherit; }

button,
input,
select,
textarea { font: inherit; }

img { max-width: 100%; }

.hidden { display: none !important; }
.center { text-align: center; }

/* Page layout */
.page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  gap: var(--page-gap);
}

.page.narrow { max-width: 960px; }
.page.wide { max-width: 1120px; }
.page.split {
  max-width: 980px;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: stretch;
}

.page.centered {
  min-height: calc(100vh - (var(--page-pad) * 2));
  align-items: center;
}

/* Top navigation + brand */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--vita-text);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: var(--vita-shadow-sm);
  flex-shrink: 0;
}

.brand-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Typography */
h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

p {
  color: var(--vita-muted);
  line-height: 1.6;
  font-size: 1rem;
}

.small-note,
.bottom-note {
  color: var(--vita-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.bottom-note { text-align: center; }

.highlight { color: var(--vita-blue); font-weight: 850; }

/* Cards and panels */
.card,
.vita-card,
.panel,
.content-panel,
.login-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--vita-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--vita-shadow-lg);
}

.card,
.panel,
.content-panel,
.login-panel { padding: 26px; }

.vita-card {
  backdrop-filter: blur(16px);
  box-shadow: var(--vita-shadow-xl);
}

.panel h2,
.content-panel h2,
.login-panel h2 { margin-bottom: 8px; }

.panel p,
.content-panel p,
.login-panel p { margin-bottom: 0; }

.surface-card,
.definition-card,
.review-card,
.result-card,
.activity-card,
.quote-box,
.prompt-box,
.benefit,
.detail-box,
.counter-card {
  background: #fff;
  border: 1px solid var(--vita-border);
  border-radius: var(--radius-lg);
}

.surface-card,
.definition-card,
.review-card,
.quote-box,
.prompt-box,
.benefit,
.detail-box,
.counter-card { padding: 18px; }

.soft-card,
.prompt-box,
.quote-box,
.detail-box.primary,
.counter-card,
.definition-card { background: var(--vita-soft); }

.review-card.interactive,
.result-card,
.activity-card,
.answer-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.review-card.interactive:hover,
.result-card:hover,
.activity-card:not(.coming-soon):hover,
.answer-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--vita-shadow-md);
  border-color: rgba(31, 94, 255, 0.28);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: white;
  border-radius: var(--radius-2xl);
  padding: 34px 32px;
  box-shadow: var(--vita-shadow-lg);
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 213, 74, 0.38), transparent 34%),
    linear-gradient(160deg, var(--vita-blue) 0%, #3d7dff 58%, #6aa0ff 100%);
}

.hero.tall {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: var(--radius-pill);
  pointer-events: none;
  filter: blur(2px);
}

.hero::before {
  width: 260px;
  height: 260px;
  top: -90px;
  right: -55px;
  background: rgba(255, 213, 74, 0.35);
}

.hero::after {
  width: 190px;
  height: 190px;
  bottom: -55px;
  left: -45px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-content,
.hero-grid,
.hero .brand,
.feature-chips,
.quick-steps { position: relative; z-index: 1; }

.hero-content { max-width: 780px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: center;
}

.hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 72ch;
}

.hero-kicker,
.trial-pill,
.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.88rem;
  font-weight: 850;
  backdrop-filter: blur(4px);
}

.hero-kicker,
.trial-pill { margin-bottom: 16px; }

.feature-chips,
.status-strip,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-chips,
.status-strip { margin-top: 22px; }

/* Buttons and links */
.btn,
.primary-btn,
.secondary-btn,
.yellow-btn,
.danger-btn,
.home-btn,
.back-link,
.top-link,
.primary-action,
.card-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.yellow-btn:hover,
.danger-btn:hover,
.home-btn:hover,
.back-link:hover,
.top-link:hover,
.primary-action:hover { transform: translateY(-1px); }

.btn:active,
.primary-btn:active,
.secondary-btn:active,
.yellow-btn:active,
.danger-btn:active { transform: translateY(1px); }

.btn-primary,
.primary-btn,
.primary-action {
  background: var(--vita-blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(31, 94, 255, 0.24);
}

.btn-primary:hover,
.primary-btn:hover,
.primary-action:hover {
  background: var(--vita-blue-dark);
  box-shadow: 0 14px 28px rgba(31, 94, 255, 0.28);
}

.btn-secondary,
.secondary-btn,
.back-link,
.top-link {
  background: rgba(31, 94, 255, 0.08);
  color: var(--vita-blue);
  border-color: rgba(31, 94, 255, 0.12);
}

.btn-secondary:hover,
.secondary-btn:hover,
.back-link:hover,
.top-link:hover { background: rgba(31, 94, 255, 0.12); }

.yellow-btn,
.btn-yellow {
  background: var(--vita-yellow);
  color: var(--vita-text-strong);
  border-color: rgba(244, 191, 32, 0.45);
}

.yellow-btn:hover,
.btn-yellow:hover { background: var(--vita-yellow-dark); }

.home-btn,
.btn-neutral {
  background: #fff;
  color: var(--vita-text);
  border-color: var(--vita-border);
}

.danger-btn,
.btn-danger {
  background: var(--vita-danger);
  color: #fff;
}

.btn-google {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  background: var(--vita-blue);
  color: white;
  box-shadow: 0 12px 24px rgba(31, 94, 255, 0.22);
}

.btn-google:hover { background: var(--vita-blue-dark); }

button:disabled,
.btn:disabled,
.primary-btn:disabled,
.secondary-btn:disabled,
.yellow-btn:disabled,
.danger-btn:disabled,
.answer-yes:disabled,
.answer-no:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.actions,
.action-row,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.actions { justify-content: center; margin-top: 24px; }
.action-row { margin-top: 22px; }
.modal-actions { justify-content: flex-end; margin-top: 22px; }

/* Forms */
.form,
.signup-benefits,
.quick-steps,
.results { display: grid; gap: 12px; }
.form { margin-top: 24px; gap: 16px; }

textarea,
.word-input,
.language-select {
  border: 1px solid var(--vita-border);
  color: var(--vita-text);
  background: #fbfcff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea,
.word-input {
  width: 100%;
  resize: vertical;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  line-height: 1.6;
}

textarea { min-height: 280px; }
.word-input { min-height: 86px; font-size: 1.25rem; font-weight: 750; }

textarea:focus,
.word-input:focus,
.language-select:focus-visible {
  border-color: rgba(31, 94, 255, 0.42);
  background: #fff;
  box-shadow: var(--vita-ring);
}

.helper-row,
.counter-row,
.writing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--vita-muted);
  font-weight: 700;
}

.helper-row { font-size: 0.92rem; line-height: 1.4; }
.counter-row { margin: 14px 0 22px; }
.status-text { font-weight: 750; white-space: nowrap; }
.status-text.loading { color: var(--vita-blue); }
.status-text.error { color: var(--vita-danger); }
.counter-good { color: var(--vita-green); }
.counter-bad { color: var(--vita-orange); }

.language-form { margin: 0; }
.language-select-wrap { position: relative; }
.language-select {
  appearance: none;
  border-radius: var(--radius-pill);
  padding: 10px 34px 10px 14px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(20, 27, 52, 0.06);
  min-width: 128px;
}
.language-select-wrap::after {
  content: "âŒ„";
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-54%);
  color: var(--vita-muted);
  font-weight: 900;
  pointer-events: none;
}

/* Account menu */
.account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-button {
  border: 1px solid var(--vita-border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--vita-text);
  border-radius: var(--radius-pill);
  padding: 8px 10px 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(20, 27, 52, 0.06);
  font-weight: 700;
  max-width: 280px;
}

.account-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  color: var(--vita-muted);
}

.account-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--vita-blue);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 900;
  flex-shrink: 0;
}

.account-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  padding: 8px;
  background: white;
  border: 1px solid var(--vita-border);
  border-radius: var(--radius-md);
  box-shadow: var(--vita-shadow-lg);
  z-index: 50;
}

.account-menu.is-open { display: block; }
.account-menu-form { margin: 0; padding: 0; }

.account-menu a,
.account-menu-link {
  display: block;
  width: 100%;
  color: var(--vita-text);
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.account-menu a:hover,
.account-menu-link:hover { background: var(--vita-bg); }

/* Result / answer states */
.answer-btn,
.result-card {
  width: 100%;
  display: block;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--vita-text);
}

.answer-btn.selected {
  border-color: var(--vita-blue);
  background: rgba(31, 94, 255, 0.08);
}

.answer-correct,
.answer-yes {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.answer-wrong,
.answer-no {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.result-word {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.result-translation {
  margin: 5px 0 0;
  color: var(--vita-text);
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.4;
}

.result-meta {
  margin: 5px 0 0;
  color: var(--vita-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.lemma-display {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.05;
}

/* Detail boxes */
.detail-box {
  border-color: var(--vita-border-strong);
  padding: 1rem;
}

.detail-box.primary { padding: 1.5rem; }

.detail-label,
.progress-label,
.edge-range-label,
.priority-label {
  display: block;
  font-size: 0.72rem;
  line-height: 1rem;
  font-weight: 900;
  color: var(--vita-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.detail-value {
  color: var(--vita-slate);
  font-weight: 650;
  line-height: 1.6;
}

.detail-value.large { font-size: 1.08rem; }
.detail-value.translation { color: var(--vita-blue); font-size: 1.15rem; font-weight: 850; }

.detail-grid,
.definition-grid,
.before-after {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

.detail-grid.two-column,
.definition-grid,
.before-after { grid-template-columns: repeat(2, 1fr); }

/* Messages, empty states, notes */
.empty-state {
  display: none;
  border: 1px dashed rgba(102, 112, 133, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--vita-muted);
  line-height: 1.55;
}

.empty-state strong { color: var(--vita-text); }

.message-box {
  display: none;
  border-radius: 18px;
  padding: 14px 16px;
  line-height: 1.45;
  font-weight: 750;
}

.message-box.success,
.message-box.warning,
.message-box.error { display: block; }

.message-box.success,
.login-kicker {
  background: rgba(18, 183, 106, 0.10);
  color: var(--vita-success-dark);
  border: 1px solid rgba(18, 183, 106, 0.18);
}

.message-box.warning {
  background: rgba(247, 144, 9, 0.10);
  color: var(--vita-warning-dark);
  border: 1px solid rgba(247, 144, 9, 0.18);
}

.message-box.error {
  background: rgba(217, 45, 32, 0.10);
  color: var(--vita-danger-dark);
  border: 1px solid rgba(217, 45, 32, 0.18);
}

.note {
  border-radius: var(--radius-lg);
  background: rgba(31, 94, 255, 0.08);
  border: 1px solid rgba(31, 94, 255, 0.12);
  padding: 18px;
  margin-top: 18px;
}

.note p {
  margin: 0;
  color: #315191;
  font-weight: 700;
  line-height: 1.55;
}

.pill {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  background: #fff7d6;
  border: 1px solid rgba(255, 213, 74, 0.75);
  font-weight: 800;
  font-size: 0.9rem;
}

/* Highlight / priority cards */
.edge-card,
.priority-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 213, 74, 0.42), transparent 34%),
    linear-gradient(135deg, #fff 0%, #fff7d0 100%);
  border: 1px solid rgba(244, 191, 32, 0.55);
  border-radius: var(--radius-2xl);
  padding: 24px;
  box-shadow: 0 16px 38px rgba(155, 116, 0, 0.13);
}

.priority-copy {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.edge-range-box,
.priority-badge,
.score-circle {
  background: var(--vita-blue);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px rgba(31, 94, 255, 0.24);
}

.edge-range-box {
  min-width: 210px;
  border-radius: 22px;
  padding: 20px;
  text-align: center;
}

.priority-badge {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-xl);
  flex-shrink: 0;
}

.edge-range-label,
.priority-label { color: rgba(255, 255, 255, 0.76); }
.edge-range-value,
.priority-value { display: block; font-weight: 950; letter-spacing: -0.05em; line-height: 1; }
.edge-range-value { font-size: clamp(1.5rem, 4vw, 2.2rem); }
.priority-value { font-size: 1.8rem; }

/* Progress and metrics */
.hero-progress-card {
  position: relative;
  background: radial-gradient(circle at 90% 12%, rgba(255, 213, 74, 0.30), transparent 38%), rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 18px 42px rgba(0, 30, 120, 0.18);
  backdrop-filter: blur(10px);
  text-align: center;
  overflow: hidden;
}

.progress-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.progress-stat {
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.progress-label { color: rgba(255, 255, 255, 0.78); }
.progress-value {
  display: block;
  margin-top: 8px;
  color: white;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  font-weight: 950;
  letter-spacing: -0.07em;
  line-height: 0.95;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.progress-value.small { font-size: clamp(1.95rem, 4.2vw, 3.25rem); }
.progress-note { margin-top: 14px; color: rgba(255, 255, 255, 0.88); font-size: 0.88rem; font-weight: 750; line-height: 1.42; }
.progress-details-link { margin-top: 14px; }

.meter,
.progress-shell {
  width: 100%;
  border-radius: var(--radius-pill);
  background: #edf1f7;
  overflow: hidden;
}

.meter { height: 9px; margin-top: 7px; }
.progress-shell { height: 12px; margin-top: 8px; }

.meter-fill,
.progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--vita-blue);
  transition: width 0.2s ease;
}

.meter-fill.coverage { background: var(--vita-yellow-dark); }

.timer {
  font-size: 2rem;
  font-weight: 950;
  letter-spacing: -0.05em;
  color: var(--vita-blue);
}
.timer.warning { color: var(--vita-orange); }
.timer.danger { color: var(--vita-red); animation: pulse 1s infinite; }

.score-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 22px;
  box-shadow: 0 18px 40px rgba(31, 94, 255, 0.28);
}
.score-number { font-size: 4rem; font-weight: 950; letter-spacing: -0.08em; }

/* Dashboard modules */
.dashboard-section { display: grid; gap: 14px; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}
.section-title-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-chevron {
  display: none;
  color: var(--vita-muted);
  font-weight: 950;
  font-size: 1.1rem;
  transition: transform 0.15s ease;
}
.section-content { display: grid; gap: 16px; }
.module-row,
.module-row.single {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}

.activity-card {
  position: relative;
  min-height: 238px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--vita-text);
  overflow: hidden;
  box-shadow: var(--vita-shadow-md);
  padding: 22px;
}
.activity-card.highlighted {
  border-color: rgba(31, 94, 255, 0.42);
  box-shadow: 0 18px 45px rgba(31, 94, 255, 0.18);
  animation: attentionPulse 1.8s ease-in-out infinite;
}
.activity-card.highlighted::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 10%, rgba(255, 213, 74, 0.32), transparent 38%);
  pointer-events: none;
}
.activity-card.coming-soon {
  opacity: 0.54;
  filter: grayscale(0.25);
  cursor: not-allowed;
  border-style: dashed;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.72)), radial-gradient(circle at 90% 12%, rgba(102,112,133,0.10), transparent 36%);
}
.activity-card.coming-soon:hover { transform: none; box-shadow: var(--vita-shadow-md); border-color: var(--vita-border); }
.card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.icon-circle,
.benefit-icon,
.step-number,
.level-zero-badge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 950;
}
.icon-circle {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(31, 94, 255, 0.09);
  color: var(--vita-blue);
  font-size: 1.35rem;
}
.highlighted .icon-circle { background: var(--vita-blue); color: white; }
.coming-soon .icon-circle { background: rgba(102, 112, 133, 0.10); color: var(--vita-muted); }
.mini-badge {
  background: rgba(31, 94, 255, 0.09);
  color: var(--vita-blue);
  border-radius: var(--radius-pill);
  padding: 6px 9px;
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}
.mini-badge.review { background: rgba(247, 144, 9, 0.12); color: var(--vita-warning-dark); }
.mini-badge.soon { background: rgba(102, 112, 133, 0.10); color: var(--vita-muted); }
.activity-card h3 { position: relative; z-index: 1; margin: 20px 0 9px; }
.activity-card p { position: relative; z-index: 1; margin: 0; font-size: 0.94rem; line-height: 1.5; }
.card-action {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--vita-blue);
  font-weight: 850;
  font-size: 0.94rem;
}
.coming-soon .card-action { color: var(--vita-muted); }

/* Login / signup extras */
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 500px;
}
.login-kicker {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 900;
  margin-bottom: 16px;
}
.benefit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fbfcff;
  border-radius: var(--radius-md);
  padding: 12px;
}
.benefit-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(31, 94, 255, 0.09);
  color: var(--vita-blue);
}
.benefit p { margin: 0; font-size: 0.94rem; line-height: 1.45; }
.benefit strong { color: var(--vita-text); }
.google-icon-wrap {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: white;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.google-icon { width: 16px; height: 16px; display: inline-block; flex-shrink: 0; }

.quick-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
}
.step-number {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--vita-yellow);
  color: var(--vita-blue);
  font-size: 0.85rem;
}
.quick-step p { margin: 0; font-size: 0.94rem; line-height: 1.45; color: rgba(255,255,255,0.92); }

.level-zero-card { position: relative; z-index: 1; display: grid; gap: 14px; }
.level-zero-badge {
  justify-self: center;
  width: 86px;
  height: 86px;
  border-radius: 26px;
  background: rgba(255, 213, 74, 0.95);
  color: var(--vita-blue);
  font-size: 2.4rem;
  box-shadow: 0 16px 34px rgba(0, 30, 120, 0.18);
}
.level-zero-title { color: white; font-size: 1.15rem; font-weight: 950; letter-spacing: -0.02em; }
.level-zero-copy { margin: 0; color: rgba(255,255,255,0.86); font-size: 0.9rem; font-weight: 700; line-height: 1.45; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--vita-border);
  border-radius: var(--radius-lg);
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--vita-border);
  vertical-align: middle;
}

th {
  background: var(--vita-bg);
  color: var(--vita-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 950;
}

tr:last-child td { border-bottom: none; }
.level-cell,
.metric-value { font-weight: 950; color: var(--vita-text); }
.range-cell { color: var(--vita-muted); font-weight: 750; white-space: nowrap; }
.metric-value { white-space: nowrap; }

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.48);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  width: 100%;
  max-width: 440px;
  background: white;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.30);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.modal p { margin: 10px 0 0; }
.modal-word { color: var(--vita-blue); font-weight: 950; }
.modal-translation { display: none; margin-top: 8px; color: var(--vita-text); font-weight: 750; line-height: 1.45; }

/* Toasts and loading */
.xp-toast {
  position: fixed;
  left: 1.25rem;
  top: 1.25rem;
  z-index: 80;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.xp-toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: auto;
  display: grid;
  gap: 10px;
  z-index: 9999;
}
.toast {
  background: var(--vita-text-strong);
  color: white;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0,0,0,0.22);
  font-weight: 800;
  animation: toastIn 0.2s ease;
}
.loading-orb {
  width: 86px;
  height: 86px;
  border-radius: var(--radius-pill);
  background: conic-gradient(from 0deg, var(--vita-blue), var(--vita-yellow), var(--vita-blue));
  margin: 0 auto 22px;
  animation: spin 1.1s linear infinite;
  position: relative;
}
.loading-orb::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: var(--radius-pill);
  background: white;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes attentionPulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Responsive */
@media (min-width: 768px) {
  .detail-grid.two-column { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .hero-grid,
  .page.split,
  .priority-panel,
  .edge-card { grid-template-columns: 1fr; }
  .hero-progress-card { max-width: 420px; }
  .module-row,
  .module-row.single { grid-template-columns: repeat(2, 1fr); }
  .primary-action { justify-self: start; }
  .login-panel,
  .hero.tall { min-height: auto; }
}

@media (max-width: 820px) {
  .definition-grid,
  .before-after { grid-template-columns: 1fr; }
  .edge-range-box { width: 100%; }
}

@media (max-width: 640px) {
  :root { --page-pad: 18px; }
  .topbar { align-items: flex-start; }
  .topbar-actions { flex-direction: column-reverse; align-items: flex-end; gap: 8px; }
  .account-button,
  .language-select { max-width: 190px; }
  .hero,
  .card,
  .panel,
  .content-panel,
  .login-panel,
  .priority-panel,
  .edge-card { padding: 22px; border-radius: 22px; }
  .progress-grid,
  .module-row,
  .module-row.single,
  .writing-meta { grid-template-columns: 1fr; }
  .helper-row,
  .counter-row { display: block; }
  .status-text { display: block; margin-top: 8px; }
  .priority-copy { align-items: flex-start; flex-direction: column; }
  .priority-badge { width: 88px; height: 88px; }
  .section-header { display: block; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn,
  .actions .btn.full-mobile { width: 100%; }
  .timer { font-size: 1.6rem; }

  .dashboard-section.mobile-collapsible {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--vita-border);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(24, 42, 100, 0.06);
  }
  .dashboard-section.mobile-collapsible .section-title-button { cursor: pointer; }
  .dashboard-section.mobile-collapsible .section-chevron { display: inline-block; }
  .dashboard-section.mobile-collapsible.is-open .section-chevron { transform: rotate(180deg); }
  .dashboard-section.mobile-collapsible .section-content { display: none; padding-top: 14px; }
  .dashboard-section.mobile-collapsible.is-open .section-content { display: grid; }
  .dashboard-section.mobile-collapsible .section-header p { display: none; }
  .dashboard-section.mobile-collapsible.is-open .section-header p { display: block; }
}

@media (max-width: 520px) {
  .feature-chips { gap: 8px; }
  .chip { font-size: 0.84rem; }
  h1 { font-size: clamp(2rem, 12vw, 2.6rem); }
}